From s-kit
Orchestrate parallel implementation of a feature specification by dispatching coder agents Phase-by-Phase with spec-compliance and code-quality review gates between Phases. Use this skill when the user says "implement this feature", "start implementing", "run the spec", "execute the plan", "continue implementing", or wants to begin coding a previously planned feature from a docs/specs/YYYY-MM-DD-{feature-name}/ folder. Also use when the user says "/build-feature" or drags a spec folder into the conversation and asks to implement it. This skill does NOT write code itself - it orchestrates coder subagents that work in parallel.
How this skill is triggered — by the user, by Claude, or both
Slash command
/s-kit:build-featureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Orchestrate the parallel implementation of a feature specification by dispatching coder agents Phase by Phase. This skill reads a spec folder created by `plan-feature`, uses `spec.json` as the machine-readable contract, dispatches coder agents for each ready task, runs a behavior-preserving simplification pass, runs spec-compliance review before code-quality review, and appends execution eviden...
Orchestrate the parallel implementation of a feature specification by dispatching coder agents Phase by Phase. This skill reads a spec folder created by plan-feature, uses spec.json as the machine-readable contract, dispatches coder agents for each ready task, runs a behavior-preserving simplification pass, runs spec-compliance review before code-quality review, and appends execution evidence to implementation-log.md.
The orchestrator never writes code itself when subagents are available. Its job is to:
spec.json, task files, README checkboxes, and implementation-log.mdA docs/specs/YYYY-MM-DD-{feature-name}/ directory containing:
README.md with Phase assignments and task status checkboxesspec.json with task IDs, Phases, dependencies, file ownership, status values, and verification commandsrequirements.md with feature contextaction-required.md with manual human actionsimplementation-log.md for append-only execution notestasks/task-{nn}-*.md files, one self-contained task per implementation unitThe matching approved design must exist at docs/design/YYYY-MM-DD-{feature-name}/design.md.
This structure is produced by the plan-feature skill. If the user does not have a spec folder, suggest creating one first.
Use these values exactly:
pending - not startedin-progress - currently assigned or being workedblocked - cannot proceed without user action or an external environment changeneeds-context - implementation needs clarification or missing project contextdone-with-concerns - implementation completed but review concerns remainreview-failed - a spec or code review failed and fixes are requiredcomplete - accepted after required review and verificationOnly complete maps to a checked README checkbox. Every other status maps to an unchecked checkbox.
docs/specs/*-{feature-name}.plan-feature.docs/design/<resolved-spec-folder-name>/design.md.<resolved-spec-folder>/spec.json<resolved-spec-folder>/README.md<resolved-spec-folder>/requirements.md<resolved-spec-folder>/action-required.md<resolved-spec-folder>/implementation-log.mddocs/design/<resolved-spec-folder-name>/design.mdCONTEXT-MAP.md, relevant CONTEXT.md files, and ADRs in docs/adr/ when presentREADME.md, spec.json, requirements.md, action-required.md, implementation-log.md, tasks/, and the matching design file must exist.spec.json.designPath must equal docs/design/<resolved-spec-folder-name>/design.md.spec.json.specPath must equal docs/specs/<resolved-spec-folder-name>.spec.json.implementationLogPath must equal docs/specs/<resolved-spec-folder-name>/implementation-log.md.spec.json.allowedTaskStatuses must contain exactly the status values listed above.../../design/<resolved-spec-folder-name>/design.md.tasks/.tasks/ must be linked from README.spec.json.tasks[] must point to an existing task file.tasks/ must be represented in spec.json.tasks[].## Status with one of the allowed status values.## Phase with a positive integer.## Verification Plan, ### RED, ### GREEN, and ### Final Verification.spec.json.tasks[].status must agree.spec.json.tasks[].files.create or spec.json.tasks[].files.modify.spec.json.tasks[].verificationCommands, or the repository's standard test command). If the baseline fails, report the failing commands and ask the user whether to proceed (failures will be attributed to the pre-existing baseline in implementation-log.md) or stop. Record the baseline result in implementation-log.md either way.spec.json.tasks[] as the source of truth for task IDs, Phases, statuses, dependencies, file ownership, and verification commands.complete.This makes the skill resumable. If invoked on a partially completed spec, it picks up exactly where the manifest says it left off.
For each Phase starting from the current one, execute Steps 3 through 9 below, then advance to the next Phase.
Before starting a Phase, append a dated entry to implementation-log.md with the Phase number, task IDs, starting statuses, and planned verification commands.
Read all incomplete task files for this Phase from the tasks/ subfolder.
Confirm every task dependency in dependsOn has status complete. If not, mark the task blocked, update README/task file/manifest consistently, append the blocker to implementation-log.md, and stop.
Check for file overlaps from spec.json.tasks[].files.create and spec.json.tasks[].files.modify across all incomplete tasks in this Phase. If any file appears in more than one task, warn the user:
Warning: File overlap detected in Phase {N}:
- {file-path} is owned by both task-{nn} and task-{mm}
Options:
1. Proceed anyway with conflict risk
2. Run these tasks sequentially instead of in parallel
Wait for the user's decision before proceeding.
Update each dispatched task to in-progress in spec.json, its task file, and README checkbox state. Append the assignment to implementation-log.md.
Before dispatching coder agents, create a short, read-only Phase Risk Preflight for the current Phase.
requirements.md, current Phase task files, spec.json file ownership, completed task summaries, current Phase verification commands, and any loaded context docs or ADRs.implementation-log.md before coder dispatch.Before dispatching, choose the host adapter:
| Host | Coder dispatch | Simplifier dispatch | Review dispatch |
|---|---|---|---|
| Claude Code | Task tool with the strongest available coding/general agent | Task tool with s-kit-code-simplifier when available, otherwise the simplifier prompt | Task tool with a review-focused prompt |
| Copilot CLI | task with agent_type: "general-purpose" unless a coding-specific type exists | task with agent_type: "general-purpose" and the simplifier prompt | task with agent_type: "general-purpose" and the review prompt |
| Codex with multi-agent enabled | spawn_agent for each coder prompt, then wait for all spawned agents | spawn_agent once with the simplifier prompt | spawn_agent once with the review prompt |
| No subagent tool | Report the limitation and ask whether to execute the Phase sequentially in the current session | Run the simplification pass sequentially only if the user chose current-session execution | Report the limitation and ask whether to execute the Phase sequentially in the current session |
For each incomplete task in the Phase, dispatch one coder agent using the selected host adapter. Dispatch all coder agents for the Phase in a single message when the host supports parallel execution.
Read references/coder-prompt-template.md and construct each agent's prompt by filling in:
spec.json task entry and global paths/status rulesThe coder agents should not commit their changes.
Wait for all coder agents in the Phase to complete. Each agent should report:
complete, blocked, needs-context, or done-with-concernsIf any agent fails, returns an error, or reports missing context, set that task to needs-context or blocked as appropriate, update spec files consistently, append the outcome to implementation-log.md, and continue collecting remaining results. Report unresolved failures before review.
After coder or fix agents complete and before review, run one behavior-preserving simplification pass for the current Phase.
spec.json.tasks[].files.create and spec.json.tasks[].files.modify entries. Restrict the simplifier to this set. If an agent reports no changed files, use that task's manifest file ownership as the fallback scope.s-kit-code-simplifier agent when the host supports bundled agents. Otherwise, read references/simplifier-prompt-template.md and construct the prompt by filling in:
requirements.mddocs/design/YYYY-MM-DD-{feature-name}/design.mdspec.json.tasks[].verificationCommands plus any affected project-level lint, typecheck, or test commandsno-op when the implementation is already clear. It must preserve behavior, avoid unrelated fixes, respect the contracts in the approved design and task summaries, and rerun relevant verification after edits.no-op result must include Final Verification command output for each task in scope. A no-op without verification evidence sets the affected tasks to done-with-concerns instead of allowing complete.implementation-log.md.blocked, fails verification, changes behavior, or edits outside the changed-file scope, set the affected tasks to review-failed, append the details to implementation-log.md, and go to Step 7.Before dispatching any review agent, build a concrete review scope from the latest coder or fixer completion reports, the simplifier result, the current Phase's changed-file scope, and the current Phase's spec.json.tasks[].files.create and spec.json.tasks[].files.modify entries. Prefer a git range or task diff when one is already known; otherwise pass the exact file set reviewed. If no concrete git range, task diff, or file set can be identified, stop and request that scope instead of asking the reviewer to discover the whole repository.
Review agents are read-only. Do not ask them to modify files, the index, HEAD, branch state, staged changes, task statuses, or generated artifacts. Historical comparison is allowed only through read-only git commands or a separate temporary worktree.
Dispatch a single review agent using the selected host adapter.
Read references/review-prompt-template.md and construct the prompt with {review_type} set to Spec Compliance. Fill in:
references/read-only-review-contract.md, pasted verbatimrequirements.mddocs/design/YYYY-MM-DD-{feature-name}/design.mdspec.json.tasks[].verificationCommandsThe review agent should verify:
action-required.md.Return a structured verdict: PASS or FAIL with the git range, task diff, or file set reviewed and specific issues grouped by task.
If this review fails, do not run code-quality review yet. Set affected tasks to review-failed, append the verdict to implementation-log.md, and go to Step 7.
Run this only after simplification and spec-compliance review pass.
Dispatch a single review agent using the selected host adapter and the same references/review-prompt-template.md, with {review_type} set to Code Quality. Fill in the same placeholders as Step 6A, including the pasted {read_only_contract}.
Use the same concrete {review_scope} unless code-quality review needs a narrower task diff or file set; if it does, state that narrowed scope explicitly in the prompt.
If the Phase was flagged security-sensitive in the Phase Risk Preflight, also dispatch the s-kit-security-auditor agent (read-only) in parallel with the code-quality review, scoped to the same concrete review scope. Treat a CHANGES REQUESTED audit verdict exactly like a code-quality review FAIL: set affected tasks to review-failed, append the findings to implementation-log.md, and go to Step 7.
The review agent should:
CONTEXT.md glossary terms or contradict accepted ADRs.Return a structured verdict: PASS or FAIL with specific issues grouped by task.
If this review fails, set affected tasks to review-failed, append the verdict to implementation-log.md, and go to Step 7.
If Step 5A fails or either review returns FAIL:
implementation-log.md.spec.json.tasks[].files.create and spec.json.tasks[].files.modify. When complete punch-list mode was used, group every issue from the punch list before dispatching fix agents.references/fix-prompt-template.md and fill in:
implementation-log.md.Cap at 3 simplification/review cycles per Phase. If the third cycle still fails, stop and report to the user:
Phase {N} review failed after 3 cycles. Outstanding issues:
{list of remaining issues}
Options:
1. Fix these manually and re-run /build-feature
2. Proceed to the next Phase anyway
3. Stop here
After both reviews pass, or the user explicitly chooses to proceed:
Update task files: for each accepted task, change the Status field to complete; if proceeding with concerns, use done-with-concerns.
Update spec.json.tasks[].status to match each task file.
Update README.md checkboxes: [x] only for complete; [ ] for all other statuses.
Append the simplification result, spec-compliance verdict, code-quality verdict, verification evidence, and final task statuses to implementation-log.md.
Commit policy: do not commit if the user asked not to commit. Otherwise, follow the repository's delivery instructions for commits.
Report Phase completion:
Phase {N} of {total} complete.
Tasks completed:
- task-{nn}-{name}: {one-line summary}
- task-{mm}-{name}: {one-line summary}
Spec compliance review: PASS
Simplification: {status}
Code quality review: PASS
Commit: {hash or "not committed by request"}
Next: Phase {N+1} has {count} tasks ready for parallel execution.
After all Phases are complete:
implementation-log.md are the compliance record. Do not re-inject all task summaries; the review receives the scope, the design, the requirements, and the verification commands. Use references/review-prompt-template.md with {review_type} = Code Quality and {phase_number} = final, pasting {read_only_contract} as in Step 6A. Fill {task_summaries} with a one-line-per-task roll-up of all completed tasks, and set {phase_risk_preflight} to None — final integration review (per-Phase preflights are already in the log).implementation-log.md.Feature "{feature}" implementation complete.
Phases completed: {N}/{N}
Total tasks: {T}
Verification:
- Project verification: {PASS/FAIL}
- Per-Phase spec compliance verdicts: {all PASS / list exceptions}
- Full code quality review: {PASS/FAIL with notes}
Next steps:
- Review the changes
- Push and create a PR when ready
needs-context, blocked, or review-failed depending on the failure. Report to the user and append the event to implementation-log.md.blocked, report the missing dependency, and stop before dispatching the Phase.plan-feature.complete task is reopened (set back to in-progress, needs-context, or review-failed), revert every transitive dependent task to blocked, update spec.json, task files, and README checkboxes consistently, and append a dated entry to implementation-log.md stating the reason before any re-dispatch.spec.json is the orchestration contract. README checkboxes and task file status fields mirror it.implementation-log.md. The log records what happened, what was verified, what failed, and what was accepted.npx claudepluginhub j03fr0st/s-kit --plugin s-kitSets up isolated workspaces using native worktree tools or git worktree fallback. Use before starting feature work to protect the current branch.