Prompt file imported from Basio0916/spec-driven-planning (
.codex/prompts/sdp-implement.prompt.md). Copyright stays with the author.
SDP Implementation Executor
Implement repository changes for the specified requirement by executing the approved task plan.
Command Usage
sdp-implement <slug> [task-id ...]
<slug>corresponds to.sdp/specs/<slug>/- Optional
task-idarguments (e.g.,T-002) restrict execution to those tasks - When no task IDs are supplied, execute all tasks defined in
tasks.yml
Language Configuration
Read .sdp/config/language.yml:
language: en→ produce summaries in Englishlanguage: ja→ produce summaries in Japanese
Use templates from .sdp/templates/<lang>/ to structure artifacts.
Required Context Files
Read before starting:
.sdp/specs/<slug>/requirement.md.sdp/specs/<slug>/design.md.sdp/specs/<slug>/tasks.yml.sdp/product.md.sdp/tech.md.sdp/structure.md.sdp/specs/<slug>/implementation.md(if present)
Pre-Flight Checks
- Ensure
.sdp/specs/<slug>/exists. - Ensure
requirement.mdandtasks.ymlexist; warn (but continue) ifdesign.mdis missing. - Validate provided task IDs; abort if any are unknown.
- Confirm working tree status and surface existing uncommitted changes.
- Respect task dependencies declared in
tasks.yml; notify if the requested subset violates ordering.
Implementation Loop
For each selected task:
- Intent Alignment
- Summarize task objective referencing design, steering docs, and task metadata.
- Plan
- Outline required code edits, new files, migrations, docs, and tests.
- Execute
- Modify repository files using native tools only.
- Follow project conventions (style, naming, folder placement).
- Update or add tests that satisfy the Definition of Done.
- Verify
- Run appropriate tests or commands tied to the task’s DoD.
- Record failures, retries, and resolutions (or residual issues).
- Document
- Update
.sdp/specs/<slug>/implementation.mdusing.sdp/templates/<lang>/implementation.md. - Append a new section per task run, capturing:
- Date/time, task ID & title
- Code change summary and rationale
- Files touched (with purpose)
- DoD verification steps
- Test commands and outcomes
- New risks or follow-up actions
- Update
Implementation Log Handling
- CREATE mode: When
implementation.mdis absent, instantiate it from the template. - UPDATE mode: Append a new iteration section while preserving existing history.
- Maintain chronological ordering and clearly separated task entries.
Completion Summary
Output a localized summary:
【実装完了】 / 【Implementation Complete】
📐 Requirement: <slug>
🛠️ Tasks executed: <T-IDs>
📁 Files changed: <count>
✅ Test status: <pass/fail with notes>
⚠️ Follow-ups: <list or "None">
💡 Next steps:
- Suggest review or subsequent commands (e.g., /sdp-show-plan <slug>)
Principles
- Minimize scope creep—deliver only what the task requires.
- Surface assumptions and blockers transparently in the log.
- Never leave the repository broken; if unavoidable, document rollback steps.
- Do not use shell commands outside the supported toolset.
Allowed Tools
Read, Write, Edit, File Search, Grep
