Software implementation planning
Write a plan another engineer or agent can implement without rediscovering the architecture or inventing missing decisions. Scale the plan to the change; a focused refactor should not receive a platform-migration document.
Confirm the real requirements
Extract requirements already present in the request. Investigate discoverable facts yourself and ask only about choices that materially affect behavior, compatibility, safety, or scope.
Record:
- User-visible behavior and acceptance criteria.
- Compatibility, performance, security, and operational constraints.
- Explicit non-goals.
- Migration or rollback expectations when state changes.
Do not add a confirmation round merely to restate a clear request.
Research the repository
Before designing:
- Read applicable project instructions.
- Trace the current implementation through its entry points, interfaces, state, and tests.
- Find the closest existing feature or pattern to reuse.
- Read actual types, schemas, APIs, and dependency documentation for every contract the plan names.
- Record exact
file:line citations for findings that drive the design.
Never design around a symbol, flag, event, endpoint, or tool inferred only from memory. Label anything not verified as an assumption or implementation-time check.
Choose one design
Recommend one approach and explain the important tradeoffs. Avoid leaving routine architectural decisions to the implementer.
Cover only the dimensions relevant to the change:
- Files and responsibilities.
- Public interfaces, request/response shapes, and compatibility.
- Data ownership, persistence, caching, and migration.
- Initialization, shutdown, reload, retry, cancellation, and cleanup.
- Ordering and success boundaries around fallible operations.
- Authorization, privacy, and least privilege.
- Error, empty, degraded, and recovery states.
- Concurrency, idempotency, or drift where they can affect correctness.
Reuse project utilities before adding dependencies or external commands. Before destructive or difficult-to-reverse operations, require explicit authorization, detect whether the target drifted since inspection, and abort rather than guess when the intended inverse is ambiguous. Define rollback narrowly so it restores only this change's effects and preserves unrelated user data.
Describe file-level implementation
List each file to create or modify with:
- Its role in the design.
- The existing source or pattern it follows.
- Key symbols or contracts changed.
- Tests or callers affected.
Do not invent files solely to make the plan look complete. Keep documentation and configuration changes tied to real implementation needs.
Make verification executable
Provide an ordered verification sequence:
- Focused automated tests.
- Type, lint, build, or schema checks that apply.
- Integration checks across changed boundaries.
- Manual behavior checks only where automation is impractical.
- Migration, rollback, restart, cleanup, or failure-path checks when relevant.
State expected evidence, not just commands. Include environment variants and edge cases only when the feature supports them.
Recommended output
- Requirements and scope
- Verified findings with
file:line citations
- Implementation design
- File changes
- Interfaces, state, and lifecycle
- Failure and compatibility behavior
- Risks or unresolved decisions
- Verification sequence
Omit empty sections. Keep risks honest rather than forcing a non-empty ledger.
Final review
Check that:
- Every important API claim was verified in source.
- Existing patterns and utilities were considered first.
- The design commits to one implementable approach.
- State ownership and lifecycle are explicit where relevant.
- Failures and destructive actions preserve unrelated work.
- Every requirement maps to implementation and verification.
- The plan is concise enough to execute without another planning pass.
1---2name: software-implementation-planning3description: Produce a decision-complete implementation plan for a software feature, refactor, migration, integration, or extension. Use when code changes need repository research, verified interfaces, file-level design, lifecycle and failure behavior, risks, and executable verification.4---56# Software implementation planning78Write a plan another engineer or agent can implement without rediscovering the architecture or inventing missing decisions. Scale the plan to the change; a focused refactor should not receive a platform-migration document.910## Confirm the real requirements1112Extract requirements already present in the request. Investigate discoverable facts yourself and ask only about choices that materially affect behavior, compatibility, safety, or scope.1314Record:1516- User-visible behavior and acceptance criteria.17- Compatibility, performance, security, and operational constraints.18- Explicit non-goals.19- Migration or rollback expectations when state changes.2021Do not add a confirmation round merely to restate a clear request.2223## Research the repository2425Before designing:26271. Read applicable project instructions.282. Trace the current implementation through its entry points, interfaces, state, and tests.293. Find the closest existing feature or pattern to reuse.304. Read actual types, schemas, APIs, and dependency documentation for every contract the plan names.315. Record exact `file:line` citations for findings that drive the design.3233Never design around a symbol, flag, event, endpoint, or tool inferred only from memory. Label anything not verified as an assumption or implementation-time check.3435## Choose one design3637Recommend one approach and explain the important tradeoffs. Avoid leaving routine architectural decisions to the implementer.3839Cover only the dimensions relevant to the change:4041- Files and responsibilities.42- Public interfaces, request/response shapes, and compatibility.43- Data ownership, persistence, caching, and migration.44- Initialization, shutdown, reload, retry, cancellation, and cleanup.45- Ordering and success boundaries around fallible operations.46- Authorization, privacy, and least privilege.47- Error, empty, degraded, and recovery states.48- Concurrency, idempotency, or drift where they can affect correctness.4950Reuse project utilities before adding dependencies or external commands. Before destructive or difficult-to-reverse operations, require explicit authorization, detect whether the target drifted since inspection, and abort rather than guess when the intended inverse is ambiguous. Define rollback narrowly so it restores only this change's effects and preserves unrelated user data.5152## Describe file-level implementation5354List each file to create or modify with:5556- Its role in the design.57- The existing source or pattern it follows.58- Key symbols or contracts changed.59- Tests or callers affected.6061Do not invent files solely to make the plan look complete. Keep documentation and configuration changes tied to real implementation needs.6263## Make verification executable6465Provide an ordered verification sequence:66671. Focused automated tests.682. Type, lint, build, or schema checks that apply.693. Integration checks across changed boundaries.704. Manual behavior checks only where automation is impractical.715. Migration, rollback, restart, cleanup, or failure-path checks when relevant.7273State expected evidence, not just commands. Include environment variants and edge cases only when the feature supports them.7475## Recommended output76771. **Requirements and scope**782. **Verified findings** with `file:line` citations793. **Implementation design**804. **File changes**815. **Interfaces, state, and lifecycle**826. **Failure and compatibility behavior**837. **Risks or unresolved decisions**848. **Verification sequence**8586Omit empty sections. Keep risks honest rather than forcing a non-empty ledger.8788## Final review8990Check that:9192- Every important API claim was verified in source.93- Existing patterns and utilities were considered first.94- The design commits to one implementable approach.95- State ownership and lifecycle are explicit where relevant.96- Failures and destructive actions preserve unrelated work.97- Every requirement maps to implementation and verification.98- The plan is concise enough to execute without another planning pass.