Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .codex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Codex Operating Manual (Autopilot Loop)

**Mission**: Work from the directives under `.codex/directives/`, keep a living checklist,
open PRs, and report progress after every merged PR or blocking failure.

**Loop**:
1. Read directives and propose a plan in a PR description checklist.
2. Implement in small PRs from branches named `codex/{feature}`.
3. After merge or block: update `.codex/status.md` with outcomes, decisions, new tasks.
4. Keep the backlog in `.codex/backlog.md` (append-only), prune superseded tasks.

**Definitions of Done**:
- CI green on required jobs (`validate`, `e2e`, `security`).
- PR checklist ticked, notes captured in `.codex/status.md`.
- If blocked by policy/org settings, document exact blocker and open an issue.

**Conventions**:
- Branches: `codex/{feature}` (Codex setting already matches).
- Commits: small, descriptive; include “Co-authored-by: Codex”.
- Checklists: live in PR description and `.codex/status.md`.
1 change: 1 addition & 0 deletions .codex/backlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Backlog (append-only; Codex curates)
19 changes: 19 additions & 0 deletions .codex/directives/000-meta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Directive 000 — Meta: turn on the loop

## Goal
Initialize the Codex loop, create the first plan and checklists, and confirm the repo builds locally (Dev Container) and in CI.

## Constraints
- Cross-platform scripts (no bash-only).
- Keep job names: `validate`, `e2e`, `security` to satisfy branch protection.
- Minimal changes per PR; update `.codex/status.md` after each PR.

## Deliverables
- A PR titled "Codex: bootstrap plan" containing:
- A task checklist derived from all current directives.
- A proposed PR sequence with acceptance criteria.
- Links to created issues for each major task.

## Done When
- Checklist exists and references subsequent PRs/issues Codex will open.
- `.codex/status.md` created with the initial state.
22 changes: 22 additions & 0 deletions .codex/directives/010-workspace-hygiene.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Directive 010 — Workspace hygiene (builds/lint/tests)

## Goal
`pnpm -w build`, `pnpm -w test`, and `pnpm -w lint` succeed locally (Dev Container) and in CI.

## Tasks
- Ensure every package that runs `tsup`/`rimraf` declares them in that package's devDependencies.
- ESLint v9 flat-config only (no `.eslintignore`); use `ignores` in the config.
- Make pre-commit pass: fix lint-staged config and ESLint imports.
- If `config/eslint.config.mjs` imports `typescript-eslint`, either install `typescript-eslint` or switch to `@typescript-eslint/*` packages only.
- Replace any bash-only scripts with Node-based scripts.
- Keep job names for branch protection: `validate`, `e2e`, `security`.

## Acceptance Criteria
- CI workflows green on Ubuntu and Windows runners.
- `pnpm -w build` runs without “Cannot find module …/tsup…”.
- Pre-commit completes without errors on a small staged change.

## Artifacts
- Updated package.json files (per-package devDeps).
- Updated ESLint config + lint-staged config.
- PR checklist showing each subtask complete.
17 changes: 17 additions & 0 deletions .codex/directives/020-devcontainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Directive 020 — Dev Container & cross-platform

## Goal
Add a Dev Container so local development is reproducible and Linux-like everywhere.
Normalize line endings.

## Tasks
- Add `.devcontainer/devcontainer.json` using Node 20 image and pnpm bootstrap.
- Add `.gitattributes` with LF normalization and PS1/BAT CRLF hints.
- Update CONTRIBUTING with "Open in Dev Container" quick start.

## Acceptance Criteria
- “Reopen in Container” yields `pnpm -w install` success.
- Line-ending churn disappears in new commits.

## Artifacts
- `.devcontainer/devcontainer.json`, `.gitattributes`, CONTRIBUTING updates.
1 change: 1 addition & 0 deletions .codex/status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Status log (append newest at top)
8 changes: 8 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "echoforge",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"features": { "ghcr.io/devcontainers/features/git:1": {} },
"postCreateCommand": "corepack enable && corepack prepare pnpm@9.14.4 --activate && pnpm -w install",
"mounts": ["source=${localWorkspaceFolder}/.pnpm-store,target=/home/node/.pnpm-store,type=bind"],
"remoteUser": "node"
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
*.sh text eol=lf
*.ps1 text eol=crlf
*.bat text eol=crlf
50 changes: 6 additions & 44 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,47 +1,9 @@
# CODEOWNERS
# Lines are: <path pattern> <@org/team or @user> [...additional owners]
# The last matching pattern takes precedence.

# See https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# Default owners for everything
* @echoforge/maintainers

# Apps
/apps/ @echoforge/app-maintainers
/apps/echo-terminal/ @echoforge/cli-maintainers
/apps/dashboard/ @echoforge/web-maintainers
/apps/echo-cloud/ @echoforge/infra

# Packages (library ownership)
/packages/ @echoforge/pkg-maintainers
/packages/echocore/ @echoforge/agents-maintainers
/packages/forgekit/ @echoforge/core-utils
/packages/codalism/ @echoforge/research
/packages/validator/ @echoforge/qa
/packages/blueprint/ @echoforge/devx
/packages/mirror/ @echoforge/sync
/packages/recomposer/ @echoforge/research

# Python agents and ops scripts
/agents/ @echoforge/ai-agents
/scripts/ @echoforge/ops

# Research/prototypes
/echoforge/ @echoforge/research
* @AvaPrime @codessa-ai/owners

# Documentation and policies
/docs/ @echoforge/docs
/README.md @echoforge/docs @echoforge/maintainers
/AGENTS.md @echoforge/docs
/CONTRIBUTING.md @echoforge/docs @echoforge/maintainers
/SECURITY.md @echoforge/security @echoforge/maintainers
# Example: UI bits
/apps/dashboard/** @codessa-ai/frontend

# Repo configuration & CI
/.github/ @echoforge/infra @echoforge/maintainers
/.github/workflows/ @echoforge/infra
/package.json @echoforge/maintainers
/pnpm-lock.yaml @echoforge/infra
/turbo.json @echoforge/infra
/vitest.config.ts @echoforge/qa @echoforge/maintainers
/eslint.config.js @echoforge/qa @echoforge/maintainers
/tsconfig.json @echoforge/maintainers
/tsconfig.base.json @echoforge/maintainers
# Example: core engine
/packages/echocore/** @codessa-ai/core
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See supported keys: https://docs.github.com/sponsors/integrating-with-github-sponsors/displaying-a-sponsor-button-in-your-repository
github: AvaPrime
patreon: your-patreon
open_collective: your-collective
ko_fi: your-kofi
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/codex-task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Codex task
description: Use for Codex-created tasks
labels: ["codex","automation"]
body:
- type: input
id: goal
attributes: { label: Goal }
- type: textarea
id: constraints
attributes: { label: Constraints }
- type: textarea
id: deliverables
attributes: { label: Deliverables }
- type: textarea
id: acceptance
attributes: { label: Acceptance Criteria }
57 changes: 12 additions & 45 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,15 @@
# Pull Request Checklist

## Summary

- Briefly describe the change and the motivation.

## Related Issues

- Closes #<issue-number> (add more as needed)

## Type of Change

- [ ] feat: new feature
- [ ] fix: bug fix
- [ ] refactor: code refactor (no behavior change)
- [ ] perf: performance improvement
- [ ] test: add/update tests only
- [ ] docs: documentation updates
- [ ] chore/ci: tooling or CI only
- [ ] breaking change

## Scope

- Affected workspace(s)/package(s): `@echoforge/<name>`
- Suggested filter command: `pnpm --filter @echoforge/<name> <cmd>`

## How to Test

- Commands to validate locally:
- `pnpm build`
- `pnpm test:run` (or `pnpm test:coverage`)
- `pnpm lint` and `pnpm format`

## Screenshots / UI Notes (if applicable)

- Include before/after images or short clips.
- Goal:
- Scope:
- Linked directives: <!-- e.g. 000-meta, 010-workspace-hygiene -->

## Checklist

- [ ] Code builds: `pnpm build` succeeds
- [ ] Tests pass: `pnpm test:run` (added/updated tests for changes)
- [ ] Lint/format: `pnpm lint` and `pnpm format` pass
- [ ] Scope: used `pnpm --filter` for targeted tasks where appropriate
- [ ] Docs updated: README/AGENTS.md or package docs if needed
- [ ] No secrets committed; uses `.env` (see `.env.example`)
- [ ] For breaking changes: migration notes included

<!-- Keep the template concise and actionable. -->
- [ ] Plan reviewed against directives
- [ ] CI jobs added/updated: validate / e2e / security
- [ ] Lint & pre-commit pass locally
- [ ] Docs updated (CHANGELOG/CONTRIBUTING if needed)
- [ ] Status updated in `.codex/status.md`

## Notes
- Decisions:
- Follow-ups (added to `.codex/backlog.md`):
4 changes: 0 additions & 4 deletions .lintstagedrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,jsx,ts,tsx,md,css,json,yml,yaml}": ["prettier -w"],
"*.{js,jsx,ts,tsx}": ["eslint --fix"]
}
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Contributing (Quick Start)

1. Open this repo in VS Code → “Reopen in Container”.
2. Run:
- `pnpm -w build`
- `pnpm -w test`
- `pnpm -w lint`
3. Branch naming: `codex/{feature}` (for Codex) or `chore/`, `feat/`, etc.
4. All PRs must pass `validate`, `e2e`, `security`.

Codex works from `.codex/directives/` and maintains `.codex/status.md` & `.codex/backlog.md`.
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
MIT License

Copyright (c) 2025

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to do so, subject to the following conditions:

[snip: standard MIT, keep full text in your repo]
39 changes: 15 additions & 24 deletions config/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
import js from '@eslint/js';
import ts from 'typescript-eslint';
import globals from 'globals';
import js from "@eslint/js";
import tseslint from "typescript-eslint";

export default ts.config(js.configs.recommended, ...ts.configs.recommended, {
languageOptions: { globals: globals.node },
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
'../*',
'../../*',
'**/src/*',
'*/src/*',
'@echoforge/*/src/*'
],
},
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': ['warn', { allow: ['warn', 'error'] }]
},
ignores: ['**/dist/**', '**/coverage/**', '**/node_modules/**', '**/*.d.ts'],
});
export default [
{ ignores: ["**/dist/**", "**/node_modules/**"] },
js.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
parserOptions: { ecmaVersion: "latest", sourceType: "module" }
},
rules: {
// add repo rules here as needed
}
}
];
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"prettier": "prettier --write .",
"format": "prettier --write .",
"release": "changeset version && pnpm -w install && turbo run build && changeset publish",
"postinstall": "bash ./scripts/check-env.sh || true && pnpm -F @echoforge/env-check run check || true",
"postinstall": "node scripts/postinstall.mjs",
"test:env-check": "pnpm -F @echoforge/env-check run test",
"init:env-check": "node scripts/init-env-check.js"
},
Expand All @@ -53,6 +53,8 @@
"tsup": "^8.0.2",
"turbo": "^2.5.4",
"typescript": "^5.9.2",
"typescript-eslint": "^8.41.0",
"vitest": "^3.2.4"
}
},
"type": "module"
}
4 changes: 2 additions & 2 deletions packages/blueprint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"clean": "rimraf dist"
},
"devDependencies": {
"rimraf": "^5.0.10",
"tsup": "^8.5.0",
"typescript": "^5.4.0",
"rimraf": "^5.0.0",
"tsup": "^8.0.2",
"vitest": "^3.2.4"
},
"private": true
Expand Down
14 changes: 7 additions & 7 deletions packages/codalism/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@
},
"dependencies": {
"@echoforge/echocore": "workspace:*",
"uuid": "^9.0.1",
"chalk": "^4.1.2",
"commander": "^11.1.0",
"figlet": "^1.7.0",
"gradient-string": "^2.0.2",
"marked": "^11.1.0",
"nanospinner": "^1.1.0"
"nanospinner": "^1.1.0",
"uuid": "^9.0.1"
},
"devDependencies": {
"typescript": "^5.4.0",
"rimraf": "^5.0.0",
"vitest": "^3.2.4",
"@types/uuid": "^9.0.8",
"@types/figlet": "^1.5.8",
"@types/gradient-string": "^1.1.5",
"@types/uuid": "^9.0.8",
"rimraf": "^5.0.10",
"ts-node": "^10.9.2",
"tsup": "^8.0.2"
"tsup": "^8.5.0",
"typescript": "^5.4.0",
"vitest": "^3.2.4"
},
"private": true
}
4 changes: 2 additions & 2 deletions packages/codessa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"clean": "rimraf dist"
},
"devDependencies": {
"rimraf": "^5.0.10",
"tsup": "^8.5.0",
"typescript": "^5.4.0",
"rimraf": "^5.0.0",
"tsup": "^8.0.2",
"vitest": "^3.2.4"
},
"private": true
Expand Down
Loading
Loading