No slash command · from DevFlow Skills Collection
Executes a single implementation plan phase with quality gates: implementation, verification, testing, code review, ADR compliance, and plan sync. Called by implement-plan or directly via /implement-phase.
Ships in DevFlow Skills Collection. 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.
Reference files (open one when a step points to it):
references/optional-steps.md: Optional stepsreferences/phase-steps.md: Phase Steps Referencereferences/return-value.md: Return valuereferences/step-details.md: Step details — subagent patterns and output specsreferences/subagent-protocol.md: Subagent Communication Protocolreferences/tdd-mode.md: TDD Mode (optional)Execute a single phase from an implementation plan with comprehensive quality gates. Designed to be called by implement-plan, but can also be invoked directly. Either way it runs inline: the session that invoked it is the phase lead.
This session is the phase lead and an orchestrator. Never implement code directly.
| DO (orchestrator) | DON'T (direct implementation) |
|---|---|
| Spawn subagents to write code | Write code yourself |
| Spawn subagents to create files | Use Write/Edit tools directly |
| Spawn subagents to run tests | Run tests yourself |
| Spawn subagents to fix issues | Fix code yourself |
| Read files to understand context | Read files to copy/paste code |
| Track progress with Task tools | Implement while tracking |
| Coordinate and delegate | Do the work yourself |
Violations: using Write/Edit/NotebookEdit directly, creating files without spawning a subagent, fixing code without spawning a subagent, running implementation commands directly.
This holds whenever the Agent tool is available. "Foreground", "no background agents" or "don't poll" in the user's words is about how you wait for agents, not about who writes the code; only an explicit "write the code yourself in this session" overrides the rule, and when you're unsure, ask. If Agent isn't in your tool list at all, do the steps' work in this session.
Why orchestrate?
Subagent communication protocol → references/subagent-protocol.md. Every subagent prompt must include a response-format block demanding terse STATUS/FILES/ERRORS output and disk-based logs for large output. Verbose subagent responses are the single biggest context waster this skill faces.
Steps 1–8 execute as one continuous operation. The phase lead does not stop for the user between them.
current_step = 1
while current_step <= 8:
result = execute_step(current_step)
if result == PASS:
current_step += 1 # AUTO-CONTINUE, no user pause
elif result == FAIL:
fix_and_retry(current_step) # Stay on step, spawn fix subagent, retry
elif result == BLOCKED:
ask_user() # Blocker protocol, then resume this step
return COMPLETE # Only stop here (after Step 8)
Agents report asynchronously. An Agent call returns at once; the agent's report arrives later as a message in this session, and that message resumes you. After dispatching, do any independent work that's left (another independent dispatch, preparing the next step's context). When nothing is left, end the turn with one line saying what you're waiting for, e.g. Waiting for: test writer (1a), implementer (1b). Waiting on a report is not a pause: the report resumes the step. Never poll with sleep or wait loops, never say you'll wait and then stop, and never do the dispatched work yourself in the meantime, since it would collide with the agent's.
Keep track of what's in flight. Before ending a turn, note which agents are running and for which step or sub-task (the tracker's IN FLIGHT line), so a resumed or compacted session can tell what is still outstanding.
The only valid pause points are:
PHASE_RESULT have been presented; the next phase waits for the user.Everything else is a fix loop, not a pause. Verification failed → spawn fix subagent → re-run → PASS → continue. Code review returned NEEDS_CHANGES → spawn fix subagent → re-run → PASS → continue. None of these require user input; they require retries.
After each step, output a progress tracker and continue. Example after Step 4:
┌─────────────────────────────────────────┐
│ PROGRESS: Step 4 → Step 5 │
├─────────────────────────────────────────┤
│ ✅ Step 1: Implementation [DONE] │
│ ✅ Step 2: Exit Conditions [DONE] │
│ ✅ Step 3: Integration Test [DONE] │
│ ✅ Step 4: Code Review [DONE] │
│ ⏳ Step 5: ADR Compliance [CURRENT] │
│ ⬚ Step 6: Plan Sync [PENDING] │
│ ⬚ Step 7: Prompt Archival [PENDING] │
│ ⬚ Step 8: Completion Report [PENDING] │
├─────────────────────────────────────────┤
│ IN FLIGHT: none │
│ NEXT ACTION: Check ADR compliance now │
└─────────────────────────────────────────┘
NEXT ACTION must describe executing the next step (or, mid-step, the reports you're waiting for), not "waiting for user confirmation." Any tracker whose NEXT ACTION says otherwise (before Step 8) is a contract violation.
Self-check after a skill invocation (like code-review):
A blocker is something you cannot fix autonomously. Do not stop for fixable issues.
Valid blockers:
| Blocker | Example |
|---|---|
| Permission denied | Subagent cannot write to a protected directory |
| Infrastructure unavailable | Cannot reach required inference server |
| Missing credentials | API key not configured, auth token expired |
| External service down | Third-party API returning 503 |
| Ambiguous requirements | Plan says "integrate with payment system" but doesn't specify which |
| Destructive operation | Phase requires dropping a production database |
NOT blockers — fix these yourself: test fails, lint errors, build errors, type errors, code-review feedback, API returning an error, UI element not found.
When you hit a genuine blocker, ask the user directly — you're running in their session. Stop dispatching new work, note what's still in flight, and present the blocker (with AskUserQuestion for the options when it's available):
⛔ BLOCKED: [brief description]
Phase: [N] - [Name]
Step: [current step]
Blocker Type: [Permission | Infrastructure | Credentials | External | Ambiguous | Destructive]
Details:
[what failed and why]
What I need:
[specific action from user]
Options:
A) [resolve and continue]
B) [skip this verification and proceed with risk]
C) [abort phase]
After the user answers, resume from the blocked step (not Step 1). End the phase with status: BLOCKED in PHASE_RESULT only when the caller said the run is unattended and no one can be asked; fill in blocker with what would unblock it.
Non-negotiable — a phase cannot complete until all are satisfied.
| Condition | Requirement | Why |
|---|---|---|
| verification-loop PASS | All 6 checks pass (Build, Type, Lint, Test, Security, Diff) | Code must compile, type-check, pass linting, tests, and security |
| Integration tests PASS | All API/UI tests pass | Feature must work end-to-end |
| Code review PASS | STATUS: PASS (NOTEs may remain) | No blocking issues or recommendations outstanding |
| All recommendations fixed | Every recommendation addressed | Recommendations are blocking, not optional |
| ADR compliance PASS | Follows existing ADRs, new decisions documented | Architectural consistency |
| Plan verified | All work items confirmed complete | Specification fulfilled |
Why recommendations are mandatory, not "nice to have":
The only acceptable Step 4 outcome is clean PASS.
Plan Path: [path to plan file]
Phase: [number or name]
Task ID: [from implement-plan's TaskList]
Prompt Path: [optional - path to pre-generated prompt from prompt-generator]
Changed Files: [optional - auto-detected if not provided]
Skip Steps: [optional - list of steps to skip, for testing]
TDD Mode: [enabled/disabled - see references/tdd-mode.md]
Coverage Threshold: [percentage - default 80%, applies when TDD enabled]
If a Prompt Path is provided (from prompt-generator):
implement-plan (orchestrates full plan)
│
└── implement-phase (this skill — one phase at a time, in the same session)
│
├── 1. Implementation (spawn subagents)
├── 2. Exit Condition Verification (verification-loop skill)
├── 3. Automated Integration Testing (API or Playwright)
├── 4. Code Review (code-review skill)
├── 5. ADR Compliance Check
├── 6. Plan Synchronization
├── 7. Prompt Archival (if prompt provided)
└── 8. Phase Completion Report
Full subagent-spawning patterns and per-step output formats live in references/step-details.md. Read that file when you're about to execute a step. Summary here:
Spawn test subagents first (verification-first pattern), then implementation subagents with a coding-standards pointer embedded. Monitor, collect changed files. If TDD mode is enabled, the order reverses and adds a RED → GREEN → REFACTOR cycle — see references/tdd-mode.md.
Output: IMPLEMENTATION_STATUS, FILES_CREATED/MODIFIED, TEST_RESULTS. Gate: PASS. Next: Step 2.
Invoke the verification-loop skill. It runs 6 checks (Build, Type, Lint, Test, Security, Diff).
Output: VERIFICATION_LOOP_STATUS, per-check results. Gate: all 6 PASS. Next: Step 3.
You are the tester. Not the user. API → curl/httpie/fetch subagent. Web UI → browser-verification-agent (one test scenario per spawn; or general-purpose with claude-in-chrome if it isn't in your agent list). CLI → execute and verify output. Database → query and verify.
Output: aggregated INTEGRATION_TEST_STATUS, pass/fail counts, evidence paths. Gate: PASS. Next: Step 4.
Invoke devflow:code-review (this collection's skill, invoked as devflow:code-review; not Claude Code's built-in /code-review, which returns a different result) with phase context. PASS is required; NEEDS_CHANGES (any blocking issue or recommendation) requires fix subagents and re-review (max 3 retries). NOTEs are informational and never block.
Output: CODE_REVIEW_STATUS, blocking issues, recommendations, notes. Gate: PASS. Next: Step 5.
Read docs/decisions/INDEX.md, check against applicable ADRs, invoke the adr skill if new decisions need documentation.
Output: ADR_COMPLIANCE_STATUS, applicable ADRs, any new ADR numbers. Gate: PASS. Next: Step 6.
Verify all work items completed, add ADR references, note deviations. Per ADR-0001, plans are specification documents — progress lives in Task tools (TaskUpdate), not checkbox edits.
Output: PLAN_SYNC_STATUS, work-items count. Gate: PASS. Next: Step 7.
If a prompt file was used, move it to docs/prompts/completed/. If none, mark skipped.
Output: PROMPT_ARCHIVAL_STATUS. Gate: non-blocking (a failed archive logs but doesn't stop completion). Next: Step 8.
Final. Generate the summary (see references/step-details.md for the format), invoke continuous-learning (it confirms any learned skills with the user before writing them), present the report and the PHASE_RESULT block, stop. If implement-plan invoked you, it continues from that block in this same session.
Some pipelines insert additional steps at specific points. See references/optional-steps.md for the full list and enablement mechanism. Currently supported:
devflow:security-review (not the built-in /security-review).Optional. When enabled (via plan metadata, --tdd flag, or global settings), Step 1 follows the RED → GREEN → REFACTOR cycle and a coverage-verification check is added. See references/tdd-mode.md for full details.
The pipeline is defined as an ordered list of steps:
PHASE_STEPS = [
{ name: "implementation", required: true, skill: null },
{ name: "exit_conditions", required: true, skill: null },
{ name: "integration_testing", required: true, skill: null },
{ name: "code_review", required: true, skill: "devflow:code-review" },
{ name: "adr_compliance", required: true, skill: "adr" },
{ name: "plan_sync", required: true, skill: null },
{ name: "prompt_archival", required: false, skill: null },
{ name: "completion_report", required: true, skill: null },
]
Adding a new step: define gate criteria, insert at the right position, implement the logic or delegate to a skill. Steps can be conditional (e.g., phase-type-based, metadata-flag-gated). Full step-config schema, gate-criteria field definitions, retry/timeout semantics, and worked examples for security-scan / performance-check / docs-update → references/phase-steps.md.
Step failures:
Retry limit: default 3 per step. Exhausted retries escalate:
⛔ PHASE BLOCKED: [Step Name] failed after 3 attempts
Last Error: [details]
Options:
A) Retry with different approach
B) Skip this step (if non-blocking)
C) Abort phase and return to plan
How should I proceed?
Blocker protocol (above): stop dispatching new work, note what's in flight, ask the user with full context, resume the blocked step after their answer.
# In the plan file
phase_config:
strict_mode: true # Fail on any warning
skip_steps: []
additional_steps: []
retry_limit: 3
tdd_mode: false
coverage_threshold: 80
# Global defaults (~/.claude/settings.json)
implement_phase:
default_retry_limit: 3
always_run_security: false
require_adr_for_decisions: true
default_tdd_mode: false
default_coverage_threshold: 80
From implement-plan (primary use):
Skill(skill="implement-phase"): Execute Phase 2 of the implementation plan.
Context:
- Plan: docs/plans/auth-implementation.md
- Phase: 2 (Authentication Service)
- Previous Phase Status: Complete
Execute all quality gates and end with the PHASE_RESULT block.
The procedure loads into implement-plan's session, which becomes the phase lead; implement-plan picks up again from the PHASE_RESULT block.
Manual:
/implement-phase docs/plans/my-plan.md phase:3
Or interactively:
/implement-phase
> Which plan? docs/plans/auth-implementation.md
> Which phase? 2
Step 8 ends with a structured PHASE_RESULT block, the phase's closing summary in the same session, with per-step status, files changed, test results, ADR info, and a ready_for_next flag. When implement-plan invoked the phase, it reads this block and continues. Full schema in references/return-value.md.
/clear or /compact.Future extensibility: the step design allows adding security-scan, performance-check, documentation-update, changelog-entry, and similar quality gates without modifying the core logic.
For implement-plan authors:
PHASE_RESULT block that ends the phase.status: BLOCKED only from unattended runs; otherwise the phase asks the user itself.For direct users:
docs/decisions/INDEX.md available.For step developers:
required, whether it wraps a skill.references/step-details.md with the subagent pattern and references/phase-steps.md with the step's config entry.references/subagent-protocol.md — mandatory response-format block, concise-response examples, disk-based communication patterns, coding-standards pointer templatereferences/step-details.md — detailed subagent-spawning patterns and per-step output formats for all 8 default stepsreferences/tdd-mode.md — optional Step 1 inversion: RED → GREEN → REFACTOR cycle, TDD subagent prompts, coverage verificationreferences/optional-steps.md — Step 4.5 Security Review insertion point, enablement via plan metadata, per-phase overridesreferences/phase-steps.md — default pipeline table, step config schema, adding custom steps, conditional execution rules, step insertion pointsreferences/return-value.md — full PHASE_RESULT schema returned to implement-plan, status values per step, ready_for_next semanticsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mhylle/claude-skills-collection --plugin devflow35 skills in this plugin
/adrDocument architectural decisions in standardized ADR format. This skill should be used when making significant technical decisions, choosing between approaches, establishing patterns, or when other skills (create-plan, implement-plan, brainstorm) identify decisions that need documentation. Triggers on "document decision", "create ADR", "architectural decision", or automatically when invoked by other skills during planning and implementation./adversarial-reviewerAdversarial code review by three independent subagent personas (Saboteur, New Hire, Security Auditor) running in parallel, isolated contexts that know nothing of the author's intent or Claude's earlier conclusions. Reviews a diff by default (staged/unstaged, a ref or a file); --codebase reviews a whole repo or subtree for tech debt, attack surface and knowledge silos. Use before merging a PR; when the user asks for a hostile, harsh, critical, skeptical or second-opinion review; when a /devflow:code-review came back suspiciously clean; when the user is tired after a long session or has a gut feeling something is off; or for a quick audit of an inherited repo ("what am I inheriting"). Differs from /devflow:code-review (routine per-phase review, no isolation) and /devflow:security-review (single-lens OWASP depth).Other plugins' skills for the same job