Prompt file imported from leanstacks/react-starter (
.github/prompts/plan_and_implement.prompt.md). Copyright stays with the author.
Plan and implement a change to the codebase following the steps below. If you encounter any ambiguity, ask for clarification before proceeding. Follow overall project conventions specified in AGENTS.md.
Step 1 — Read & Plan (stop here until I respond)
- Read the affected source files to understand existing conventions (naming, structure, error handling, test style).
- Identify all changes required: source, tests, docs.
- Present a numbered implementation plan.
- Flag any ambiguity or architectural decisions to resolve — ask before assuming.
- Ask: A) Autonomous (implement fully, report when done) or B) Step-by-step (pause after each step for confirmation)?
Step 2 — Implement
Execute the approved plan:
- Code: Match existing conventions. Flag deviations before introducing them. See AGENTS.md
- Tests: Cover happy path, edge cases, and failure paths using the existing test framework.
- Docs: Update README if behavior changes; add inline comments for non-obvious logic; update
/docsif affected.
If you encounter scope not covered in the plan, stop and report before continuing.
Step 3 — Done Criteria
Confirm before closing:
- Lint passes, no new warnings
- All tests pass, no unjustified skips
- New tests cover happy path, edge cases, failure paths
- No debug code, commented-out blocks, or unresolved TODOs
- Docs reflect post-change behavior
Provide a brief summary: what changed, what was tested, any follow-up items worth filing.