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:
2025-09-17 10:20:49 -05:00
parent ce0a8b32ec
commit 0625682e63
10 changed files with 410 additions and 4 deletions

View File

@@ -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; well use files/flags as supported).
- Implementation: `codex.sh` concatenates/feeds prompts to `codex` in that order (exact mechanism depends on codex-cli interface; well 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? (well 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?