feat: add global system prompt and seed AGENTS templates; update proposal to include meta/ and prompts/global/; add project AGENTS template\n\nchore: update AGENTS.md and dev logs; encode governance/propagation rule
This commit is contained in:
@@ -11,10 +11,31 @@
|
||||
- Binary: detect `codex` then `codex-cli`; override `CODEX_BIN`.
|
||||
- Safety: no overwrites without `--force`; never `git push` for user projects.
|
||||
- Outputs: `<project>/runs/<ts>/...`.
|
||||
- Layout (repo): `CodexHelper`, `bin/install.sh`, `prompts/global/system.md`, `modes/<Name>/{mode.md,system.md?,defaults.yaml}`, `templates/project/<Name>/...`.
|
||||
- Layout (project): `prompts/{project.md,style.md?}`, `prompts/_mode/`, `codex.yaml`, `codex.sh`, `runs/`.
|
||||
- Layout (repo): `CodexHelper`, `bin/install.sh`, `prompts/global/{system.md,system.llm.md}`, `modes/<Name>/{mode.md,system.md?,defaults.yaml}`, `templates/project/<Name>/...`, `templates/project/_shared/AGENTS.md`, `meta/{AGENTS.seed.md,AGENTS.seed.llm.md}`.
|
||||
- Layout (project): `AGENTS.md`, `prompts/{project.md,style.md?}`, `prompts/_mode/`, `codex.yaml`, `codex.sh`, `runs/`.
|
||||
- Governance/Propagation: non-project-specific workflow changes get recorded in `prompts/global/` and seed AGENTS templates; proposal/plan updated so scaffolding includes them.
|
||||
- Phase 1 acceptance:
|
||||
- new-mode creates mode skeleton
|
||||
- new-project scaffolds without overwrites
|
||||
- run composes and calls detected codex; writes under runs/
|
||||
- precedence respected; running in repo errors for run/new-project
|
||||
- new-project copies `templates/project/_shared/AGENTS.md` into project root as `AGENTS.md`
|
||||
- prompts/global present and used in prompt composition
|
||||
- governance rule: changes to global norms propagate to prompts/global and AGENTS templates; logged in DevLog
|
||||
\n+## Approval — Tick All That Apply
|
||||
|
||||
- Subcommands approved: `new-project`, `run`, `new-mode` [ ]
|
||||
- Scope approved: repo→`new-mode` only; outside→`new-project`/`run` [ ]
|
||||
- Prompts order approved: global→mode-system?→mode→project [ ]
|
||||
- Config+precedence approved: YAML+yq; CLI>ENV>project>mode>global [ ]
|
||||
- Safety approved: `--force` to overwrite; no `git push`; outputs to `<project>/runs/<ts>/...` [ ]
|
||||
- Repo layout approved (modes, templates, global prompts) [ ]
|
||||
- Project layout approved (prompts, `_mode/`, codex.yaml, codex.sh, .gitignore) [ ]
|
||||
- Include empty `prompts/style.md` by default [ ]
|
||||
- Binary discovery: `codex`→`codex-cli`; override `CODEX_BIN` [ ]
|
||||
- Pass-through flags: `--mode --prompt-file --config --sandbox --full-auto` [ ]
|
||||
- Block `run`/`new-project` inside repo with helpful error [ ]
|
||||
- Phase 1 (Crawl) scope acceptable [ ]
|
||||
- Add `docs/ROADMAP.md`; MCP deferred [ ]
|
||||
|
||||
Final: Reply in the human doc with “Approved for Plan” when all are checked.
|
||||
|
@@ -31,13 +31,17 @@ Purpose: Implement a bash wrapper (CodexHelper) around codex-cli with “modes
|
||||
## Repository Layout (this repo)
|
||||
- `CodexHelper` (bash)
|
||||
- `bin/install.sh` (optional symlink helper)
|
||||
- `prompts/global/system.md` (global system rules)
|
||||
- `prompts/global/{system.md, system.llm.md}` (global system rules; human + LLM)
|
||||
- `modes/<ModeName>/mode.md` (mode rules)
|
||||
- `modes/<ModeName>/system.md` (optional mode-specific system overlay)
|
||||
- `modes/<ModeName>/defaults.yaml` (default codex settings, optional MCP placeholders)
|
||||
- `templates/project/<ModeName>/...` (project scaffolding templates copied on `new-project`)
|
||||
- `templates/project/_shared/AGENTS.md` (AGENTS template copied into projects)
|
||||
- `meta/{AGENTS.seed.md, AGENTS.seed.llm.md}` (seed AGENTS templates for bootstrap/reference)
|
||||
- Governance/Propagation: maintain global norms in `prompts/global/` and seed AGENTS templates; reflect such changes in proposal/plan for scaffolding.
|
||||
|
||||
## Project Layout (generated)
|
||||
- `AGENTS.md` (from `templates/project/_shared/AGENTS.md`)
|
||||
- `prompts/project.md` (+ optional `prompts/style.md`)
|
||||
- `prompts/_mode/` (read-only copies from this repo)
|
||||
- `codex.yaml` (project config)
|
||||
@@ -55,7 +59,9 @@ Purpose: Implement a bash wrapper (CodexHelper) around codex-cli with “modes
|
||||
|
||||
## Prompt Composition
|
||||
- Order: Global system → Mode system overlay (if any) → Mode rules → Project narrative.
|
||||
- Implementation: `codex.sh` concatenates/feeds prompts to `codex` in that order (exact mechanism depends on codex-cli interface; we’ll use files/flags as supported).
|
||||
- Implementation: `codex.sh` concatenates/feeds prompts to `codex` in that order (exact mechanism depends on codex-cli interface; we’ll use files/flags as supported).
|
||||
- Explicit: `prompts/global/` is present and used as the base of composition.
|
||||
- Governance/Propagation: non-project-specific rules are folded back into global/system and templates; changes logged.
|
||||
|
||||
## Safety
|
||||
- Guardrails:
|
||||
@@ -87,6 +93,9 @@ Purpose: Implement a bash wrapper (CodexHelper) around codex-cli with “modes
|
||||
- Inside that project, `CodexHelper run --full-auto` composes prompts and calls the detected `codex` binary. It writes artifacts under `runs/<timestamp>/...`.
|
||||
- Precedence works: CLI options override env, which override project config, which override mode defaults.
|
||||
- Running `CodexHelper run` in this repo prints an error guiding usage.
|
||||
- Project scaffold includes `AGENTS.md` copied from `templates/project/_shared/AGENTS.md`.
|
||||
- `prompts/global/{system.md, system.llm.md}` exist and are included in composition.
|
||||
- Governance/Propagation honored: when norms change, update `prompts/global/` and AGENTS templates; log in DevLog.
|
||||
|
||||
## Open Items for Confirmation
|
||||
- Template coverage: include `prompts/style.md` by default? (we’ll include as optional, empty file)
|
||||
@@ -95,3 +104,19 @@ Purpose: Implement a bash wrapper (CodexHelper) around codex-cli with “modes
|
||||
## Next Step
|
||||
- On approval, I will create a concrete implementation plan at `collab/plan/01-codexhelper.md` and proceed with the Crawl phase implementation.
|
||||
|
||||
## Approval Checklist
|
||||
Please answer inline. When all are approved, reply “Approved for Plan”.
|
||||
|
||||
1) Subcommands: approve `new-project`, `run`, `new-mode`? Any renames?
|
||||
2) Scope: inside this repo allow only `new-mode`; outside allow `new-project` and `run`?
|
||||
3) Prompts order: global system → mode system overlay (optional) → mode rules → project narrative?
|
||||
4) Config format/precedence: YAML with `yq`; CLI > env > project > mode > global?
|
||||
5) Safety: require `--force` to overwrite; never `git push` for user projects; outputs under `<project>/runs/<timestamp>/...`?
|
||||
6) Repo layout: `CodexHelper`, `prompts/global/system.md`, `modes/<Name>/{mode.md, system.md?, defaults.yaml}`, `templates/project/<Name>/...`?
|
||||
7) Project layout: `prompts/{project.md, style.md?}`, `prompts/_mode/` (read-only copies), `codex.yaml`, `codex.sh`, `.gitignore (runs/)`?
|
||||
8) Include empty `prompts/style.md` by default?
|
||||
9) Binary discovery: try `codex` then `codex-cli`; allow override `CODEX_BIN`?
|
||||
10) Pass-through flags: `--mode`, `--prompt-file`, `--config`, `--sandbox`, `--full-auto` to underlying `codex`?
|
||||
11) Block `run` and `new-project` inside this repo with a helpful error?
|
||||
12) Phase 1 (Crawl) scope acceptable as listed?
|
||||
13) Roadmap: add `docs/ROADMAP.md`; defer MCP integration for now?
|
||||
|
Reference in New Issue
Block a user