Implement
Purpose
Turn a prompt or plan file into a correct, verified implementation.
Input handling
- •Accept either:
- •A direct prompt describing the requested change, or
- •A file path pointing to a plan.
- •If the input is a path and the file exists, read it and treat its contents as the plan.
- •Otherwise, treat the input as a prompt.
Standard implementation workflow
- •Read repo instructions
- •Check for
docs/overview.mdand read it if present. - •Read
AGENTS.mdand~/.codex/docs/style-guide.md.
- •Plan before implementing
- •If given a plan file, summarize the plan and confirm it is executable.
- •If given a prompt, draft a concise plan and confirm it before coding.
- •Implement
- •Make the minimal correct change set.
- •Follow repo idioms and TypeScript discipline (no
any, no unsafe casts). - •Use
function name() {}syntax for named functions.
- •Tests
- •Add TypeScript tests for happy paths and key edge cases.
- •Reuse existing test setup patterns when possible.
- •Validate
- •Run linter, typecheck, and tests as required by the repo.
- •Prefer non-watch/CI-safe invocations to avoid hanging:
- •Use
CI=1 npm test(ornpm test -- --run) for Vitest to run once. - •Use
NODE_ENV=production npm run typescriptto keep blueprint watching disabled.
- •Use
- •Verify the goal
- •Add an explicit verification step that confirms the requested behavior is achieved.
- •Use tests when possible; otherwise describe a concrete manual or UI-driven verification.
- •Report
- •Summarize changes, tests run, and any follow-ups.
- •Append a concise summary and actionable notes to
factory/context.md.
Output format
- •Short summary of actions taken.
- •List of changes with file paths.
- •Tests run (or "Not run").
- •Any remaining risks or open questions.