When to use
User says implement / apply / do the change after a proposal exists under openspec/changes/<id>/.
Mandatory pre-apply gate
Before any product code:
sdd_statuswithchange_id— must beapply_readysdd_request_apply_mode— get the questionAsk the user in chat (show the prompt):
- self — main agent does all tasks
- subagents — dispatch by assignee (
mainstays on main) - hybrid — strictly follow each assignee
Wait for the answer. Then
sdd_set_apply_modewithself|subagents|hybridsdd_apply— only proceeds if mode is set; returns plan (task → executor).
For subagents/hybrid it auto-dispatches using the exact assignee fromtasks.md(e.g.coder-python).
If mode is missing, sdd_apply fails on purpose. Do not start coding.
Implement
- Follow the plan from
sdd_applyonly; respect delta specs - Mode self: you execute every task (ignore assignees; do not spawn subagents)
- Mode subagents / hybrid: trust auto-dispatch /
sdd_dispatchjob ids — they use tasks.md assignee (custom types). Same type →type-1,type-2, … in parallel. Dispatch budgetsmax_stepsfrom each task's size (xs/s/m). Thenwait_subagent_result; domaintasks yourself.
Successful subagent jobs auto-mark their task checkbox intasks.md— you do not needsdd_check_taskfor those. Still callsdd_check_taskfor main tasks and if auto-mark failed. - After each main task:
sdd_check_task - When all done: suggest archive (
holix-sdd-archive/sdd_archive) - If a sub-agent thrash-fails on a still-large task: split that task in
tasks.mdinto smaller XS/S items and re-dispatch — do not just raise max_steps
Do NOT
- Do not code before user chooses apply mode
- Do not invent tasks outside
tasks.md - Do not call
delegate_to_subagentwith built-incoderwhen assignee is a custom type (coder-python, …) — that ignores the user's agent - Do not archive until user agrees (unless they asked)