ワンクリックで
execute-spec
Execute an implementation spec generated by ideation. Invokes scout agent for codebase exploration, builds components with feedback loops, then runs a verify-review-fix cycle with the reviewer agent before committing.
メニュー
Execute an implementation spec generated by ideation. Invokes scout agent for codebase exploration, builds components with feedback loops, then runs a verify-review-fix cycle with the reviewer agent before committing.
| name | execute-spec |
| description | Execute an implementation spec generated by ideation. Invokes scout agent for codebase exploration, builds components with feedback loops, then runs a verify-review-fix cycle with the reviewer agent before committing. |
Execute a spec file generated by the ideation skill.
Parse arguments:
--parallel flag: Enable parallel execution via subagentsExample: /skill:execute-spec --parallel or /skill:execute-spec docs/ideation/foo/spec-phase-1.md
If argument provided: Read the spec file directly.
If no argument: Search for specs:
./docs/ideation/*/spec-phase-*.md
If multiple found, ask the user to select one.
Invoke the Scout agent to explore the codebase and produce a structured context map. The scout runs as a read-only subagent, scores implementation readiness, and persists its findings.
Determine the project directory from the spec file path. If the spec is at docs/ideation/my-project/spec-phase-1.md, the project directory is docs/ideation/my-project/.
Invoke the Scout using the subagent tool:
scoutcontext-map.md existsThe scout's agent definition (agents/scout.md in this package) instructs read-only behavior — it uses only read, grep, find, and ls tools.
The scout may perform up to 2 internal exploration rounds before reaching a verdict.
After the scout completes, parse the scout's text response for the context map and verdict. Write the context map to {project-directory}/context-map.md.
If scout returns GO (confidence >= 70):
If scout returns HOLD (confidence < 70):
Scout confidence is {score}/100 (below 70 threshold).
Gaps: {summary of lowest dimensions}. How to proceed?
1. **Proceed anyway** — Build with known gaps. May require more iteration.
2. **Update spec** — The spec may be underspecified. Pause to revise.
3. **Abort** — Stop execution for this phase.
If the user chose "Proceed anyway" after HOLD: The context map may have gaps. During build, treat missing sections as unavailable and read files directly. Pay extra attention to the Risks section of a partial context map.
If no scout agent is available (subagent tool not installed or invocation fails): Fall back to inline exploration:
grep to check what imports or references the modified files (blast radius)AGENTS.md, CLAUDE.md, or project README for conventionsExtract from the spec file (and template if applicable):
Also extract and retain for the review cycle:
Before implementing any component, establish the spec's feedback environment. This is a one-time setup.
Read the Feedback Strategy section from the spec. Identify the playground type and inner-loop command.
Auto-detect feedback infrastructure — even if the spec has no Feedback Strategy section, probe the codebase:
package.json (or equivalent manifest) for scripts: test, dev, start, storybook, typecheckjest.config.*, vitest.config.*, .mocharc.*, pytest.ini, go.modvite.config.*, next.config.*, webpack.config.*.storybook/ directoryscripts/, bin/, MakefileSet up the playground if it requires infrastructure:
Verify the inner-loop command runs (even if it does nothing yet). This catches environment issues before they block implementation.
Fallback: If no Feedback Strategy in the spec AND no feedback infrastructure detected, fall back to Validation Commands as the post-implementation check.
Work through components in dependency order:
After implementing a component:
If validation fails:
--parallel flag)Default (no flag): Sequential execution — work through components one at a time.
With --parallel flag: Use pi-subagents for independent components:
/parallel worker "implement component A per spec" -> worker "implement component B per spec"Review cycle in parallel mode: Subagents only build — they do not run their own review cycles. After all components are complete, run a single verify-review-fix loop on the combined diff.
After all components are completed, enter the review cycle. Code is not committed until the review passes or the user explicitly accepts remaining issues.
Do not stage files until after the review passes. The reviewer uses git diff HEAD to see all changes.
Run all commands from the spec's "Validation Commands" section:
If any validation command fails, fix the issue before proceeding to review. Validation failures do not consume a review cycle.
If git diff is empty (no changes to review): Skip the review cycle entirely. Report that all components were no-ops and proceed to the completion report.
Invoke the Reviewer agent using the subagent tool:
reviewerThe reviewer's agent definition (agents/reviewer.md in this package) instructs it to only use bash for git diff HEAD commands and to never edit files.
Parse the reviewer's output:
**Verdict**: PASS or **Verdict**: FAILcritical/, high/, medium/, low/critical AND zero high → PASScritical or high → FAILIf the reviewer fails or returns no verdict: Fall back to validation-only mode — treat validation command results as sufficient. Log a warning. Continue to commit.
Review passed. Proceed to commit and completion report.
Report medium and low findings to the user for awareness, but they do not block the commit.
critical and high finding→ action part)Escalation. Present remaining findings to the user:
Review cycle 3 still has {N} critical/high findings. How to proceed?
1. **Fix manually** — You fix the remaining issues yourself. Re-run /skill:execute-spec after fixing.
2. **Accept with issues** — Commit with known issues. Findings included in completion report.
3. **Abort** — Do not commit. Leave changes unstaged for manual review.
Only reached after PASS or user acceptance:
git add -A)## Phase {N} Implementation Complete
### Implemented
- {List of components implemented}
### Files Changed
- {List of files created/modified}
### Review Summary
- Cycles: {N} of 3 max
- Findings addressed: {count} ({critical} critical, {high} high auto-fixed)
- Remaining (non-blocking): {count} ({medium} medium, {low} low)
- Acknowledged issues: {count, if user accepted with issues}
### Validation Results
- Type check: PASS/FAIL
- Lint: PASS/FAIL
- Tests: PASS/FAIL
### Acceptance Criteria
- [x] {Met criteria}
- [ ] {Unmet criteria with notes}
### Next Steps
- Review changes: `git log -1 --stat`
- For next phase: `/skill:execute-spec spec-phase-{N+1}.md`