/d3nexus:subagent-driven-developmentfrom d3nexus
Use when executing implementation plans with independent tasks in the current session
Ships in d3nexus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Execute plan by dispatching a fresh implementer subagent per task, a task review (spec compliance + code quality) after each, and a broad whole-branch review at the end.
Why subagents: You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
Core principle: Fresh subagent per task + task review (spec + quality) + broad final review = high quality, fast iteration
Narration: between tool calls, narrate at most one short line — the ledger and the tool results carry the record.
Continuous execution: Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are the four named below, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
Rulings, not stalls. A running plan does not wait on a human. Conflicts,
ambiguities, plan defects, a cap you would have asked to exceed — decide
them. The spec is the binding authority, the plan is its argument, and your
judgment settles what neither answers. Record every decision in the ledger as
Ruling: <what you decided> — <why> — <what it costs if wrong>, and keep
going. A wrong ruling costs rework your human partner can see and undo; a
session parked on a question costs their whole day and buys nothing.
Four things stop you, and only these: an irreversible or destructive operation; a security-sensitive action; a side effect outside this worktree that norms say you ask about first (a merge, a push to a shared branch, a publish); and a plan so broken that every path forward is a guess. For those, stop and ask.
digraph when_to_use {
"Have implementation plan?" [shape=diamond];
"Tasks mostly independent?" [shape=diamond];
"Stay in this session?" [shape=diamond];
"subagent-driven-development" [shape=box];
"executing-plans" [shape=box];
"Manual execution or brainstorm first" [shape=box];
"Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
"Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
"Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
"Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
"Stay in this session?" -> "subagent-driven-development" [label="yes"];
"Stay in this session?" -> "executing-plans" [label="no - parallel session"];
}
vs. Executing Plans (parallel session):
digraph process {
rankdir=TB;
subgraph cluster_per_task {
label="Per Task";
"Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
"Implementer asks questions?" [shape=diamond];
"Answer questions, provide context" [shape=box];
"Implementer implements, tests, commits (or records verify, uncommitted), self-reviews" [shape=box];
"Selective review required?" [shape=diamond];
"Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" [shape=box];
"Spec APPROVED (0 BLOCKERs)?" [shape=diamond];
"Finding conflicts with plan text?" [shape=diamond];
"Rule on the conflict, ledger the ruling" [shape=box];
"Fix Pass 1 (max_fix_passes = 1): fix blockers only" [shape=box];
"Tier 1 triage-fix / Tier 2 RiskAssessment?" [shape=diamond];
"Dispatch Pass 2 Delta-Only re-review (./re-review-prompt.md)" [shape=box];
"Pass 2 complete + mechanical gates PASS (max_task_review_passes = 2)" [shape=box];
"Finalize via finalize-slot (done + commit + merge)" [shape=box];
"Append completion to ledger, mark todo complete" [shape=box];
}
"Setup: worktree, ledger check, read plan, pre-flight review" [shape=box];
"More tasks remain?" [shape=diamond];
"Dispatch final code reviewer (../requesting-code-review/code-reviewer.md)" [shape=box];
"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals" [shape=box];
"Final review clean: delete this plan's workspace" [shape=box];
"Use d3nexus:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
"Setup: worktree, ledger check, read plan, pre-flight review" -> "Dispatch implementer subagent (./implementer-prompt.md)";
"Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer asks questions?";
"Implementer asks questions?" -> "Answer questions, provide context" [label="yes"];
"Answer questions, provide context" -> "Implementer implements, tests, commits (or records verify, uncommitted), self-reviews";
"Implementer asks questions?" -> "Implementer implements, tests, commits (or records verify, uncommitted), self-reviews" [label="no"];
"Implementer implements, tests, commits (or records verify, uncommitted), self-reviews" -> "Selective review required?";
"Selective review required?" -> "Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" [label="yes"];
"Selective review required?" -> "Append completion to ledger, mark todo complete" [label="no (skip trivial single-file)"];
"Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" -> "Spec APPROVED (0 BLOCKERs)?";
"Spec APPROVED (0 BLOCKERs)?" -> "Finalize via finalize-slot (done + commit + merge)" [label="yes"];
"Spec APPROVED (0 BLOCKERs)?" -> "Finding conflicts with plan text?" [label="no (CHANGES_REQUESTED)"];
"Finding conflicts with plan text?" -> "Rule on the conflict, ledger the ruling" [label="yes"];
"Rule on the conflict, ledger the ruling" -> "Fix Pass 1 (max_fix_passes = 1): fix blockers only";
"Finding conflicts with plan text?" -> "Fix Pass 1 (max_fix_passes = 1): fix blockers only" [label="no"];
"Fix Pass 1 (max_fix_passes = 1): fix blockers only" -> "Tier 1 triage-fix / Tier 2 RiskAssessment?";
"Tier 1 triage-fix / Tier 2 RiskAssessment?" -> "Finalize via finalize-slot (done + commit + merge)" [label="ELIGIBLE + Tier 2 LOW"];
"Tier 1 triage-fix / Tier 2 RiskAssessment?" -> "Dispatch Pass 2 Delta-Only re-review (./re-review-prompt.md)" [label="HIGH_RISK or Tier 2 MEDIUM/HIGH"];
"Dispatch Pass 2 Delta-Only re-review (./re-review-prompt.md)" -> "Pass 2 complete + mechanical gates PASS (max_task_review_passes = 2)";
"Pass 2 complete + mechanical gates PASS (max_task_review_passes = 2)" -> "Finalize via finalize-slot (done + commit + merge)";
"Finalize via finalize-slot (done + commit + merge)" -> "Append completion to ledger, mark todo complete";
"Append completion to ledger, mark todo complete" -> "More tasks remain?";
"More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
"More tasks remain?" -> "Dispatch final code reviewer (../requesting-code-review/code-reviewer.md)" [label="no"];
"Dispatch final code reviewer (../requesting-code-review/code-reviewer.md)" -> "Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals";
"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals" -> "Final review clean: delete this plan's workspace";
"Final review clean: delete this plan's workspace" -> "Use d3nexus:finishing-a-development-branch";
}
Read references/setup.md before dispatching Task 1: the isolated workspace, the plan's ledger, and the pre-flight conflict scan.
Read references/model-selection.md before every dispatch: in an
epic the Role 2.3 and Role 2.1 bindings come from dev_config.py resolve; outside one,
the tiers there apply.
Batch small same-shape work. When the plan lists several tasks that are each a small, independent edit of the same kind — the same one-line fix, constant change, or field addition repeated across files — do not dispatch one subagent per task. Compose ONE dispatch brief listing every file and its change, send the whole batch to a single subagent, and review its diff as one unit. Reserve one-dispatch-per-task for work that needs its own judgment, its own tests, or its own review surface.
Everything you paste into a dispatch prompt — and everything a subagent prints back — stays resident in your context for the rest of the session and is re-read on every later turn. Hand artifacts over as files.
Waiting on dispatched subagents: never poll a wait interface with short timeouts, and never sit in one silent, open-ended wait either. While you have local work — ledger updates, packaging the next review, reading reports — keep working; child results arrive on their own. When you are genuinely idle, wait in bounded stretches (five to ten minutes, where your platform allows), and between stretches post one line of status and reconcile your live children: list them, and chase any that finished without reporting. A bounded stretch keeps nearly all of a long wait's efficiency while guaranteeing a stuck or lost child is noticed within minutes, not at the end of the session.
invoke_subagent: on runtimes supporting reactive timers, pair invoke_subagent dispatches with schedule(DurationSeconds=180, TimerCondition="any") (complementing 240s watchdogs on backgrounded shell/agy tasks) so interactive-stdin hangs are caught within 3 minutes.Record BASE (git rev-parse HEAD) before dispatching — the review package
and fix-round diffs need it.
Pre-Dispatch Status Gate (tasks with a Verification table): Transition the
task to in-progress BEFORE dispatching the implementer:
main_wt clean): python3 skills/dev-implementation/resources/scripts/manage_worker_pool.py sync --epic-dir <epic_dir> --epic-slug <epic_slug> --slot <1|2> --task <id> [--wave <k>] --status workingpython3 skills/dev-implementation/resources/scripts/sync_task_status.py task <id> in-progressA task with a Verification table (an epic task run by
d3nexus:dev-implementation) is never committed by the implementer when needs_review is true. For every task, the implementer must execute and pass all mechanical Verification phases (RED -> GREEN -> REGRESSION -> TIER-B -> TIER-C): it runs run_task_checks.py red before implementing and run_task_checks.py verify after its last change and after every fix round, then ticks every - [ ] checkbox in ## Definition of Done to - [x] with a brief mechanical result summary (e.g. exit 0, 42 passed) before run_task_checks.py status (done gate: PASS) or sync_task_status.py task <id> done can succeed (updating frontmatter to status: "done" or completedAt while any - [ ] remains is forbidden). When needs_review is true, it leaves the change uncommitted: the done gate refuses evidence recorded after a commit. You
build every review package from the uncommitted diff (WORKTREE in place of
HEAD, below), and you make the task's single commit yourself, after
sync_task_status.py task <id> done passes (dev-implementation Phase 2).
A task without a Verification table keeps the commit flow described here.
scripts/task-brief PLAN_FILE N — it extracts the task's full text to a
uniquely named file and prints the path. Compose the dispatch so the
brief stays the single source of
requirements. Your dispatch should contain: (1) one line on where this
task fits in the project; (2) the brief path, introduced as "read this
first — it is your requirements, with the exact values to use verbatim";
(3) interfaces and decisions from earlier tasks that the brief cannot
know; (4) your resolution of any ambiguity you noticed in the brief;
(5) the report-file path and report contract. For a task with a
Verification table, also fill the templates' [SCRIPTS] (the absolute
path of dev-implementation's resources/scripts directory) and
[TASK_MIRROR] (the task's file under .devtool/epic/<epic_dir>/), in
the implementer and the task-reviewer dispatch alike. Exact values (numbers,
magic strings, signatures, test cases) appear only in the brief. Never
make a subagent read the whole plan file.…/task-N-brief.md → report …/task-N-report.md) and put it in
the dispatch prompt. The implementer writes the full report there and
returns only status, commits, a one-line test summary, and concerns.Template: implementer-prompt.md
Implementer subagents report one of four statuses. Handle each appropriately:
DONE: Generate the review package (scripts/review-package PLAN_FILE BASE HEAD, from this skill's directory — it prints the unique file path it wrote; BASE is the commit you recorded before dispatching the implementer — never HEAD~1, which silently drops all but the last commit of a multi-commit task; for a task with a Verification table, pass WORKTREE as HEAD), then dispatch the task reviewer with the printed path.
DONE_WITH_CONCERNS: The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
NEEDS_CONTEXT: The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
BLOCKED: The implementer cannot complete the task. Assess the blocker:
Never ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
If the implementer asks questions — before starting or mid-task — answer clearly and completely, provide additional context if needed, and don't rush it into implementation.
Read references/task-review.md whenever a task reaches review: when a
task-reviewer is dispatched, the Role 2.1 Blocker-Only rubric, and the review package.
Read references/fix-loop.md when Pass 1 returns CHANGES_REQUESTED: the
Role 2.2 Tier 1 and Tier 2 routing, and the standalone fix round.
When the review returns APPROVED — or after Pass 2 / Tier 2 LOW short-circuit finalizes at the cap — in 2-slot pool mode manage_worker_pool.py finalize-slot commits, syncs done, reconciles .devtool/ mirrors, merges into epic/<epic_slug>, and returns the slot to idle (or in standalone mode run sync_task_status.py task <id> done, commit, and manage_worker_pool.py merge --slot <1|2> --task <id>). Append to the ledger (Task <N>: complete (...)) and mark the todo complete.
The final whole-branch review gets a package too: run
scripts/review-package PLAN_FILE MERGE_BASE HEAD (MERGE_BASE = the commit the
branch started from, e.g. git merge-base main HEAD) and include the
printed path in the final review dispatch, so the final reviewer reads
one file instead of re-deriving the branch diff with git commands. Dispatch
on the most capable available model (see Model Selection), using
d3nexus:requesting-code-review's
code-reviewer.md. Point it at
the ledger's deferred-minor and parked lines so it can triage which must be
fixed before merge.
If the final whole-branch review returns findings, dispatch ONE fix subagent
with the complete findings list — not one fixer per finding.
Per-finding fixers each rebuild context and re-run suites; a real
session's final-review fix wave cost more than all its tasks combined.
Then run exactly one scoped re-review of the fix wave
(scripts/review-package PLAN_FILE FIX_BASE HEAD over the fix range,
re-review-prompt.md).
Adjudicate any residual findings as in the task loop's breaker: park with
rulings, or rule on the load-bearing ones and ledger what you decided. Only
the four classes above stop you here. There is no second fix wave —
residual load-bearing findings surface to your human partner when
finishing-a-development-branch presents the options.
Before you delete anything, collect every ledger line containing Ruling: —
preflight rulings, parked findings, breaker adjudications, all of them — into
your final message under "Rulings I made", in the order you made them, each
with what it costs if wrong. The list is exhaustive: if the ledger holds a
ruling, the list holds it. That list is the only place the decisions you
took on your human partner's behalf reach them — they read it and rework
whatever you got wrong. A ruling that dies with the workspace was a decision
made in secret.
When the final whole-branch review is clean and its fixes are merged,
delete this plan's workspace (rm -rf <workspace>) — the git history is
the record now. Sibling directories belong to other plans; leave them
alone.
Use d3nexus:finishing-a-development-branch.
Read references/common-rationalizations.md when tempted to skip a review, fix a finding yourself, or stop the loop early.
Read references/example-workflow.md for a worked run of two tasks, one with a fix round.
implementer-prompt.md (opens in a new tab)re-review-prompt.md (opens in a new tab)references/common-rationalizations.md (opens in a new tab)references/example-workflow.md (opens in a new tab)references/fix-loop.md (opens in a new tab)references/model-selection.md (opens in a new tab)references/setup.md (opens in a new tab)references/task-review.md (opens in a new tab)scripts/review-package (opens in a new tab)scripts/sdd-workspace (opens in a new tab)scripts/task-brief (opens in a new tab)task-reviewer-prompt.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub danhdue/ai-agent-tools --plugin d3nexus72 skills in this plugin
/android-api-integrationGenerates a standardized Network Module, API Interface, Remote Data Source, Repository, UseCase, Models, and ViewModel updates for Android using the Hybrid Network Architecture and MVI Pattern./android-quality-checkRead-only Android quality assurance provider implementing the common quality contract. Executes project-configured Gradle, Spotless, Detekt, and Konsist capabilities from .agents/quality/android-quality.json, enforces BCV and architecture policies, and outputs structured results bound to repository SHA./android-ui-auditAudits Jetpack Compose and Android UI code for recomposition stability, state hoisting, Material3 design system adherence, and modifier best practices.Other plugins' skills for the same job