Apply
Implement the tasks for an existing change.
- Determine the target change:
- If the user's request names a change, use
.sdd/changes/<name>/. - Otherwise, infer it from conversation context or the most recently modified directory under
.sdd/changes/. - If ambiguous, list the available
.sdd/changes/*/directories and ask the user to pick one.
- If the user's request names a change, use
- If
.sdd/changes/<name>/tasks.mddoesn't exist, stop and tell the user to run/sdd:proposefirst — this command never creates missing artifacts. - Read
proposal.md,design.md,tasks.md, andspecs/*.mdin the change directory to load full context before writing code. - Work through the unchecked tasks in
tasks.mdin order:- Implement each task in the real codebase, following existing project conventions.
- Check off the task (
- [x]) intasks.mdimmediately once it's done and verified (run tests/build where applicable). - If implementation reveals a fork the plan didn't anticipate — a genuinely ambiguous choice with real alternatives, not a trivial detail — ask the user with the clarification UI (the
clarification_uitool) before proceeding. List the recommended option first, marked "(Recommended)", plus up to three genuine alternatives; the UI's free-text option covers anything else. - If implementation reveals that
design.mdorproposal.mdneeds to change (a flawed assumption, a missed edge case, or the resolution of a fork above), edit that artifact directly and keep going — don't restart or ask permission for small course corrections, but do flag any change that alters the original scope.
- Only edit files that are either planning artifacts under
.sdd/changes/<name>/or code required by a task — don't scope-creep into unrelated files. - Once all tasks are checked off, before declaring the change ready, self-review:
- Review the full diff against
design.md,proposal.md, and existing project conventions. - Report the findings (bugs, convention drift, leftover comments, duplicated helpers, unused code) — even if the list is empty, say so.
- Fix/address each finding in the same pass. Don't wait for the user to ask for a review — this step runs by default.
- Review the full diff against
- Tell the user the change is ready for
/sdd:archive.