원클릭으로
subagent-driven
Execute a multi-task plan. Use when the user says "execute with subagents", or hands you an ordered multi-task plan to run.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Execute a multi-task plan. Use when the user says "execute with subagents", or hands you an ordered multi-task plan to run.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Demolish bloated code and re-derive it clean, cutting every surface the rebuilt contract does not name. Use for a repo-wide bloat sweep, when patching a subsystem has stopped paying, or when the user says "this whole module is bloated", "rewrite this properly", or "break it and rebuild".
Use when the user says "deslop", "remove debug code", "find placeholders or stub code", or "remove dead code".
Dispatch compress operations. Use when the user says "tidy" or names a file, diff, memory, workspace, git stack, or doc to tidy.
Reduce internal duplication, dead code, and ceremony. Use when you spot dead fields, redundant wrappers, or speculative abstractions in code you are already editing.
Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly.
Use when the user says "simplify this diff", or asks for a compression pass over a change-set.
| name | subagent-driven |
| description | Execute a multi-task plan. Use when the user says "execute with subagents", or hands you an ordered multi-task plan to run. |
| metadata | {"short-description":"Per-task implementer→reviewer loop with an audit gate between tasks"} |
Execute a plan as a chain of delegated subagents. Each task gets a fresh implementer with a self-contained brief; a fresh reviewer audits the result before the next task starts; a broad whole-branch review closes the run.
Continuous execution. Run every task in the plan without stopping. Stop only for: a BLOCKED status you cannot resolve, an ambiguity that genuinely blocks progress, or all tasks complete. "Should I continue?" prompts waste the user's time. They asked you to execute the plan.
Narration. Between tool calls, at most one short line. The ledger and tool results carry the record.
Work decomposes into ordered tasks with clean boundaries and you want each delegated, audited, and committed before the next starts: a written plan, a checklist, "execute this with subagents."
Before Task 1, scan the plan once for self-conflicts: tasks that contradict each other or the Global Constraints, or anything the plan mandates that standard review practice would flag as a defect (a test asserting nothing, verbatim duplication of a logic block). Batch every finding into one question to the user (each beside the plan text that mandates it, asking which governs) before execution, not one interrupt per discovery. Clean scan → proceed silently.
For each task, in order:
scripts/task-brief PLAN_FILE N. It extracts the task's
full text to a uniquely named file and prints the path. The brief is the
single source of requirements; the dispatch only frames it.implementer-prompt.md filled in. Fresh per task: no carried context,
no resumed worker. Let the agent select the appropriate specialized
subagent for the task. Record the BASE commit (current HEAD) before dispatching.
You need it for the review package.scripts/review-package BASE HEAD. It
writes one file (commit list, stat summary, full diff with context) that
never enters your context, and reports that file's path. Use the BASE you
recorded. Never HEAD~1, which silently drops all but the last commit of a
multi-commit task.task-reviewer-prompt.md, handing it the brief path, the report path, the
diff-package path, and the verbatim Global Constraints. Let the agent select
the appropriate specialized subagent for the review. The audit checks
spec compliance (does what the brief asked, nothing more, nothing less) and
code quality (clean separation, no dangling references, follows existing
patterns). Worker output is trusted after this audit, not before.Each brief is self-contained. The worker reads only what the brief points to. Pass file paths, not contents; keep static material under ~50 lines inline, point to everything larger.
A dispatch describes one task, not the session's history. Never paste accumulated prior-task summaries ("state after Tasks 1-3") into later dispatches. A fresh subagent needs its task, the interfaces it touches, and the global constraints. Nothing else.
Parallel-dispatch mechanics — the independence proof, per-worker worktree
isolation, and integration ordering — live in
references/parallel-dispatch.md. Read it when a batch of tasks has no
shared files and no ordering dependency and you are about to dispatch more
than one worker concurrently.
Use the least capable model that fits the role, but turn count beats token price, and the cheapest models often take 2-3× the turns on multi-step work.
Always specify the model explicitly when dispatching. An omitted model inherits your session's, usually the most expensive, and silently defeats this.
Workers report one of four. Handle each:
Never ignore an escalation, and never force the same model to retry unchanged. If the worker said it is stuck, something must change before the retry.
The reviewer may report Cannot verify from diff items: requirements living in unchanged code or spanning tasks. They do not block the rest of the review, but you resolve each one yourself before marking the task complete: you hold the cross-task context the reviewer lacks. A confirmed gap is a failed spec review; return to the implementer, then re-review.
The loop's gate is the local task-reviewer-prompt.md dispatched to a fresh
subagent. Let the agent select the appropriate specialized subagent for the review.
There is no hard dependency on any external named agent.
The gate stays honest only if you don't pre-cook it:
The brief, the report, and the diff package are files, not context you carry.
scripts/task-brief and scripts/review-package exist so the controller never
holds a full diff or a full plan section in its own context:
scripts/review-package BASE HEAD).
The diff never enters your context; the reviewer sees commits, stat, and full
diff in one Read.scripts/task-brief PLAN N):
introduce it as "read this first. It is your requirements, with the exact
values to use verbatim."Conversation memory does not survive compaction. Controllers that lost their place have re-dispatched entire completed task sequences, the single most expensive failure. Track progress in a ledger file, not only in todos.
cat "$(git rev-parse --show-toplevel)/.outline/sdd/progress.md". Tasks marked
complete there are DONE. Do not re-dispatch; resume at the first incomplete task.Task N: complete (commits <base7>..<head7>, review clean).git log over recollection.git clean -fdx destroys the ledger (git-ignored scratch); if that happens,
recover from git log.The workspace (scripts/sd-workspace → .outline/sdd) holds briefs, reports,
review packages, and the ledger. It self-ignores, so it never shows in
git status and never gets committed.
Recovery from a worker that died mid-task and left a dirty tree lives in
references/recovery.md. Read it when a dispatched worker crashes or is
killed before completing its task.
After all tasks land:
scripts/review-package MERGE_BASE HEAD where
MERGE_BASE = git merge-base main HEAD. Hand the printed path to a final
reviewer on the most capable model. Point it at the Minor findings the ledger
accumulated so it can triage what must be fixed before merge.submit, or run
commit-push. Do not invent a branch-finishing or code-review-request flow
outside this path.A condensed run through two tasks: one clean pass, one fix-and-re-review.
[Read plan.md once; create todos for every task; check the ledger — empty,
starting fresh]
Task 1: rate limiter
[Run scripts/task-brief plan.md 1 → task-1-brief.md]
[Dispatch implementer, model: standard — brief path, report path,
scene-setting context]
Implementer: "Brief doesn't say what happens past the limit — 429 or drop
silently?"
Controller: "429 with a Retry-After header, per the API constraints section."
Implementer: [implements, tests, self-reviews, commits]
DONE — 6/6 tests passing. Committed a1b2c3d.
[Run scripts/review-package BASE HEAD → task-1-diff.md]
[Dispatch reviewer, model: standard — brief, report, diff paths, global
constraints]
Reviewer: Spec Compliance ✅. Code Quality ✅. Task quality: Approved.
[Append to ledger: "Task 1: complete (commits a1b2c3d..a1b2c3d, review
clean)"]
[Mark Task 1 done in todos; move to Task 2]
Task 2: batch import progress
[Run scripts/task-brief plan.md 2 → task-2-brief.md]
[Dispatch implementer, model: standard]
Implementer: [no questions; implements, tests, self-reviews, commits]
DONE — 8/8 tests passing. Committed d4e5f6a.
[Run scripts/review-package BASE HEAD → task-2-diff.md]
[Dispatch reviewer]
Reviewer: Spec Compliance ❌ Issues found:
- Missing: "report progress every 100 items" (spec requirement)
- Extra: unrequested --json flag on the import command
Code Quality ❌ Important: magic number 100 hardcoded at importer.go:84.
Task quality: Needs fixes.
[Dispatch ONE fix worker with the complete findings list]
Fixer: removed --json flag, added progress reporting, extracted the
PROGRESS_INTERVAL constant, re-ran the covering tests (8/8 passing).
Committed 7a8b9c0.
[Re-run scripts/review-package BASE HEAD; dispatch reviewer again]
Reviewer: Spec Compliance ✅. Code Quality ✅. Task quality: Approved.
[Append to ledger: "Task 2: complete (commits d4e5f6a..7a8b9c0, review
clean)"]
[All tasks land]
[Run scripts/review-package MERGE_BASE HEAD; dispatch final reviewer on the
most capable model]
Final reviewer: all requirements met, Minor findings triaged, ready to ship.
[Ship via the ODIN atomic path — atomic commits, not a squash]
Parallel-dispatch pitfalls (two workers editing one file, corrupting each
other's diffs) live in references/parallel-dispatch.md. Read it before
dispatching more than one worker concurrently.