# Phase Prompts Use these templates for `codex exec --json` child runs. Replace ``, ``, and ``. ## Phase 1: Context ```text You are the context phase for task "" in repository . Read CLAUDE.md for the basic coding rules and guidelines. Read AGENTS.md and all relevant source files. Write a focused context doc: - .ai//context.md Include: 1. Relevant files and why they matter 2. Existing patterns to follow 3. Risks and unknowns 4. Verification hooks (what to build/test later) Do not implement code in this phase. ``` ## Phase 2: Plan ```text You are the planning phase for task "" in repository . Read CLAUDE.md for the basic coding rules and guidelines. Read: - .ai//inputs.md - .ai//context.md Create: - .ai//plan.md Plan requirements: 1. Concrete file-level edits 2. Ordered phases 3. Verification commands 4. Rollback/risk notes ``` ## Phase 3: Implement ```text You are the implementation phase for task "" in repository . Read CLAUDE.md for the basic coding rules and guidelines. Read: - .ai//inputs.md - .ai//context.md - .ai//plan.md Implement the plan in code. Then write: - .ai//implementation.md Include: 1. Files changed 2. What was implemented 3. Any deviations from plan and why ``` ## Phase 4: Verify ```text You are the verification phase for task "" in repository . Read CLAUDE.md for the basic coding rules and guidelines. Read: - .ai//plan.md - .ai//implementation.md Run the relevant build/test commands from AGENTS.md and plan.md. Append results to: - .ai//implementation.md If blocked by locked files or access errors, stop and report exact blocker. ``` ## Phase 5: Review ```text You are the review phase for task "" in repository . Read CLAUDE.md for the basic coding rules and guidelines. Read: - .ai//context.md - .ai//plan.md - .ai//implementation.md Perform a code review focused on regressions, thread-safety, performance, and missing tests. Write: - .ai//review.md If issues are found, implement fixes and update implementation.md/review.md with final status. ``` ## Example Runner Commands ```powershell codex exec --json -C "" | Tee-Object .ai//logs/phase-1-context.jsonl codex exec --json -C "" | Tee-Object .ai//logs/phase-2-plan.jsonl codex exec --json -C "" | Tee-Object .ai//logs/phase-3-implement.jsonl codex exec --json -C "" | Tee-Object .ai//logs/phase-4-verify.jsonl codex exec --json -C "" | Tee-Object .ai//logs/phase-5-review.jsonl ```