From kit
The default vehicle for implementing a coherent batch of code changes — a feature, refactor, bug fixes, or remediation from an audit/review — via a background TDD workflow with an independent spec+quality review gate and staged fix-loop (pausing only when blocked). Use it the moment you are about to edit source files for such a batch, whether the plan came from kit:writing-plans, a docs/plans/*.md file, an audit/analysis you just ran, or asks like "execute the plan", "implement this", "do the refactor", or "remediate the findings" — even for small batches. In ultracode mode, implement via build-flow rather than hand-editing or a one-off workflow. DO NOT TRIGGER for a new feature with no design yet (use kit:brainstorming first), for pure analysis/research/review that changes no code (author a plain workflow), or for a single trivial edit.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kit:build-flowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute an approved plan via a bundled dynamic workflow. The main session is the durable orchestrator (it holds the plan, the decisions ledger, and the human checkpoints); the workflow's ephemeral subagents are disposable muscle. No persistent teams.
Execute an approved plan via a bundled dynamic workflow. The main session is the durable orchestrator (it holds the plan, the decisions ledger, and the human checkpoints); the workflow's ephemeral subagents are disposable muscle. No persistent teams.
Core principle: Orchestrator + ephemeral workflow agents + an explicit ledger = high quality, low token overhead, autonomous until genuinely blocked.
docs/plans/*.md.Markdown stays the human format — you parse it into structure at runtime.
{ decisions: [], conventions: [], deviations: [] } — the compact cross-batch record that replaces persistent reviewer memory.<base>/build.workflow.js.Workflow({ scriptPath: "<base>/build.workflow.js", args: { batches, ledger, startBatch, maxFixRounds: 3 } })args as a real JSON object — never a JSON-encoded string. The Workflow tool forwards args verbatim, so a stringified blob (args: "{\"batches\":…}") reaches the script as a string and args.batches is undefined. Write batches/ledger as actual nested JSON in the tool call; do not JSON.stringify them.scriptPath rejects a bundled path, read the file and pass its contents as inline script instead.blocked with a "no batches" reason, or (on an older runner) done with empty results — your args were malformed, usually stringified. Fix the args and relaunch; never report a no-op as success.status: 'done' → merge the returned ledger, present a final summary, then the iteration choice below.status: 'blocked' → surface reason, blockedAtBatch, and any findings, resolve with your human partner, then re-launch with startBatch = blockedAtBatch and the updated ledger.The workflow runs batches back-to-back without pausing. It returns blocked ONLY when:
maxFixRounds (staged Sonnet→Opus fixing), orneedsHumanInput — task ambiguous/underspecified, contradicts the codebase, an unplanned decision, or a destructive/irreversible action.Otherwise it drives to done. Do not insert routine human checkpoints.
| Stage | Model | Effort |
|---|---|---|
| Implementation | Sonnet | high |
| Spec review | Sonnet | high |
| Quality review | Opus | xhigh |
| Fix (staged) | Sonnet → Opus | high |
Planning (kit:brainstorming, kit:writing-plans) runs in the main session — run those in an Opus max/xhigh session. The workflow pins the above regardless of session model.
Background execution keeps this session live — watch progress via /workflows and interject anytime. To stop, TaskStop the workflow; relaunch with resumeFromRunId to resume from cached agent results (same session). Small batches keep work-at-risk low.
The workflow emits log() progress and descriptive labels; every batch returns schema-structured results and findings, surfaced at each return. The ledger is the durable, human-readable execution record.
Ask your human partner explicitly:
Implementation complete. What would you like to do?
1. Finish the branch — finalize this work (kit:finish-branch presents options)
2. Quick iteration — describe what needs changing, I'll continue
3. New brainstorming cycle — restart design on this worktree (kit:brainstorming)
Always ask. Never decide automatically.
Invocable either way. The only difference is a reminder: if continuing in a long session, check how much context you've burned — a fresh session may be cleaner. The orchestrator's own context stays compact; heavy work runs in clean-context background workflows.
Never:
args.build.workflow.js exists.args as a JSON-stringified blob — it must be a real object, or the runner sees zero batches and blocks.results as success — that's a malformed-args no-op; fix the args and relaunch.args first; the runner now blocks loudly to point you there../build.workflow.js — The bundled batch runner this skill launches.npx claudepluginhub shousper/claude-kit --plugin kitCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.