| name | implement |
| description | Drives feature implementation following structured development protocols. Triggers: "implement this feature", "build this", "write the code", "TDD implementation", "execute the plan". |
| version | 3 |
| tier | protocol |
Drives feature implementation following structured development protocols.
Implementation Protocol (The Builder's Code)
Execute §CMD_EXECUTE_SKILL_PHASES.
Session Parameters
{
"taskType": "IMPLEMENTATION",
"phases": [
{"label": "0", "name": "Setup",
"steps": ["§CMD_REPORT_INTENT", "§CMD_PARSE_PARAMETERS", "§CMD_SELECT_MODE", "§CMD_INGEST_CONTEXT_BEFORE_WORK"],
"commands": [],
"proof": ["mode", "sessionDir", "parametersParsed"], "gate": false},
{"label": "1", "name": "Interrogation",
"steps": ["§CMD_REPORT_INTENT", "§CMD_INTERROGATE"],
"commands": ["§CMD_ASK_ROUND", "§CMD_LOG_INTERACTION"],
"proof": ["depthChosen", "roundsCompleted"]},
{"label": "2", "name": "Planning",
"steps": ["§CMD_REPORT_INTENT", "§CMD_GENERATE_PLAN", "§CMD_WALK_THROUGH_RESULTS", "§CMD_OFFER_COUNCIL_REVIEW", "§CMD_OFFER_GRAPH_VIZ"],
"commands": ["§CMD_LINK_FILE"],
"proof": ["planWritten", "planPresented", "userApproved", "reviewOffered", "decision", "graphOffered"]},
{"label": "3", "name": "Execution",
"steps": ["§CMD_SET_TICKET_IN_PROGRESS", "§CMD_SELECT_EXECUTION_PATH"],
"commands": [],
"proof": ["pathChosen", "pathsAvailable"], "gate": false},
{"label": "3.A", "name": "Build Loop",
"steps": ["§CMD_REPORT_INTENT"],
"commands": ["§CMD_APPEND_LOG", "§CMD_TRACK_PROGRESS", "§CMD_ASK_USER_IF_STUCK"],
"proof": ["planStepsCompleted", "testsPass", "logEntries", "unresolvedBlocks"]},
{"label": "3.B", "name": "Agent Handoff",
"steps": ["§CMD_HANDOFF_TO_AGENT"], "commands": [], "proof": []},
{"label": "3.C", "name": "Parallel Agent Handoff",
"steps": ["§CMD_PARALLEL_HANDOFF"], "commands": [], "proof": []},
{"label": "4", "name": "Synthesis",
"steps": ["§CMD_REPORT_INTENT", "§CMD_RUN_SYNTHESIS_PIPELINE"], "commands": [], "proof": [], "gate": false},
{"label": "4.1", "name": "Checklists",
"steps": ["§CMD_VALIDATE_ARTIFACTS", "§CMD_RESOLVE_BARE_TAGS", "§CMD_PROCESS_CHECKLISTS"], "commands": [], "proof": [], "gate": false},
{"label": "4.2", "name": "Debrief",
"steps": ["§CMD_GENERATE_DEBRIEF"], "commands": [], "proof": ["debriefFile", "debriefTags"], "gate": false},
{"label": "4.3", "name": "Pipeline",
"steps": ["§CMD_MANAGE_DIRECTIVES", "§CMD_PROCESS_DELEGATIONS", "§CMD_DISPATCH_APPROVAL", "§CMD_CAPTURE_SIDE_DISCOVERIES", "§CMD_RESOLVE_CROSS_SESSION_TAGS", "§CMD_MANAGE_BACKLINKS", "§CMD_MANAGE_ALERTS", "§CMD_REPORT_LEFTOVER_WORK"], "commands": [], "proof": [], "gate": false},
{"label": "4.4", "name": "Close",
"steps": ["§CMD_REPORT_ARTIFACTS", "§CMD_REPORT_SUMMARY", "§CMD_SURFACE_OPPORTUNITIES", "§CMD_OFFER_COUNCIL_REVIEW", "§CMD_CLOSE_SESSION", "§CMD_PRESENT_NEXT_STEPS"], "commands": [], "proof": ["reviewOffered", "decision"], "gate": false}
],
"nextSkills": ["/test", "/document", "/analyze", "/fix", "/prove", "/chores"],
"directives": ["TESTING.md", "PITFALLS.md", "CONTRIBUTING.md", "CHECKLIST.md"],
"planTemplate": "assets/TEMPLATE_IMPLEMENTATION_PLAN.md",
"logTemplate": "assets/TEMPLATE_IMPLEMENTATION_LOG.md",
"debriefTemplate": "assets/TEMPLATE_IMPLEMENTATION.md",
"requestTemplate": "assets/TEMPLATE_IMPLEMENTATION_REQUEST.md",
"responseTemplate": "assets/TEMPLATE_IMPLEMENTATION_RESPONSE.md",
"modes": {
"general": {"label": "General", "description": "Pragmatic balance", "file": "modes/general.md"},
"tdd": {"label": "TDD", "description": "Test-driven rigor", "file": "modes/tdd.md"},
"experimentation": {"label": "Experimentation", "description": "Fast prototyping", "file": "modes/experimentation.md"},
"custom": {"label": "Custom", "description": "User-defined", "file": "modes/custom.md"}
}
}
0. Setup
§CMD_REPORT_INTENT:
0: Implementing ___ feature. Trigger: ___.
Focus: ___.
Not: ___.
§CMD_EXECUTE_PHASE_STEPS(0.0.*)
- Scope: Understand the [Topic] and [Goal].
Mode Selection (§CMD_SELECT_MODE):
On selection: Read the corresponding modes/{mode}.md file. It defines Role, Goal, Mindset, and Configuration.
On "Custom": Read ALL 3 named mode files first (modes/tdd.md, modes/experimentation.md, modes/general.md), then accept user's framing. Parse into role/goal/mindset.
Record: Store the selected mode. It configures:
- Phase 0 role (from mode file)
- Phase 1 interrogation depth (from mode file)
- Phase 3.A build approach (from mode file)
1. Interrogation
§CMD_REPORT_INTENT:
1: Interrogating ___ assumptions before planning implementation. ___.
Focus: ___.
Not: ___.
§CMD_EXECUTE_PHASE_STEPS(1.0.*)
Topics (Implementation)
Standard topics for the command to draw from. Adapt to the task -- skip irrelevant ones, invent new ones as needed.
- Scope & constraints -- boundaries, what's in/out, existing patterns to follow
- Data flow -- who owns the data, state transitions, schemas involved
- Edge cases -- error handling, empty states, concurrency, race conditions
- Testing strategy -- unit vs integration, mocking approach, fixtures, coverage goals
- Risks & unknowns -- reversibility, assumptions being made, what could go wrong
- Performance & security -- latency concerns, auth, input validation, resource limits
- Dependencies -- external services, package changes, deployment, migration
- API surface & naming -- public interfaces, backwards compatibility, naming conventions
- Failure modes -- rollback strategy, monitoring, alerting, degraded operation
- Integration -- how this fits existing systems, circular dependencies, shared state
2. Planning
§CMD_REPORT_INTENT:
2: Planning ___ implementation. ___ steps identified.
Focus: ___.
Not: ___.
§CMD_EXECUTE_PHASE_STEPS(2.0.*)
Unless the user points to an existing plan, you MUST create one.
- Plan: Fill in every section -- invariants check, interface design, pitfalls, test plan, and the step-by-step strategy with
Depends/Files fields for parallel execution analysis.
Walk-through (optional):
§CMD_WALK_THROUGH_RESULTS Configuration:
mode: "plan"
gateQuestion: "Plan is ready. Walk through the steps before building?"
debriefFile: "IMPLEMENTATION_PLAN.md"
planQuestions:
- "Any concerns about this step's approach or complexity?"
- "Should the scope change -- expand, narrow, or split this step?"
- "Dependencies or risks I'm missing?"
If any items are flagged for revision, return to the plan for edits before proceeding.
Once the plan is approved, offer a /council panel review on the plan <IMPLEMENTATION_PLAN.md> via §CMD_OFFER_COUNCIL_REVIEW (offer, not force) -- catch a bad plan before any code exists. Then offer a /graph flowgraph of the plan's step-dependency graph (from the Depends/Files fields) via §CMD_OFFER_GRAPH_VIZ (offer, context-gated -- skips linear artifacts).
3. Execution
§CMD_REPORT_INTENT:
3: Selecting execution path for implementation. ___.
Focus: ___.
Not: ___.
§CMD_EXECUTE_PHASE_STEPS(3.0.*)
Gateway phase — first flips an associated ticket to In Progress (§CMD_SET_TICKET_IN_PROGRESS — silent no-op when no ticket is attached), then presents the inline/agent/parallel choice and enters the selected branch. The flip runs here, before the branch split, so every execution path is covered.
3.A. Build Loop (TDD Cycle)
Execute the plan step by step in this conversation.
§CMD_REPORT_INTENT:
3.A: Executing ___-step build plan. Target: ___.
Focus: ___.
Not: ___.
§CMD_EXECUTE_PHASE_STEPS(3.A.*)
Build Cycle:
- Write Test (Red): Create the test case.
- Code (Green): Implement the solution.
- Log:
§CMD_APPEND_LOG to IMPLEMENTATION_LOG.md.
- Tick: Mark
[x] in IMPLEMENTATION_PLAN.md.
Keep the plan live (¶INV_KEEP_PLAN_LIVE): when build work deviates from IMPLEMENTATION_PLAN.md mid-loop — a new discovery, a scope shift, re-cut chunks, a superseded step — proactively append a dated ## 🔄 STATUS RECONCILIATION (YYYY-MM-DD) section (preserving the original plan; surgical checkbox edits only) and offer to log the course change to the ticket via /snapshot (skip-the-commit mode: description touch + a comment through §CMD_POST_TICKET_COMMENT). A stale plan misleads the next session.
On "Other" (free-text) at phase transition: The user is describing new requirements or additional work. Route to Phase 1 (Interrogation) to scope it before building -- do NOT stay in Phase 3.A or jump to synthesis.
3.B. Agent Handoff
Hand off to a single autonomous agent.
§CMD_EXECUTE_PHASE_STEPS(3.B.*)
§CMD_HANDOFF_TO_AGENT with:
{
"agentName": "builder",
"startAtPhase": "3.A: Build Loop",
"planOrDirective": "[sessionDir]/IMPLEMENTATION_PLAN.md",
"logFile": "IMPLEMENTATION_LOG.md",
"taskSummary": "Execute the implementation plan: [brief description]"
}
3.C. Parallel Agent Handoff
Hand off to multiple agents working in parallel on independent plan chunks.
§CMD_EXECUTE_PHASE_STEPS(3.C.*)
§CMD_PARALLEL_HANDOFF with:
{
"agentName": "builder",
"planFile": "[sessionDir]/IMPLEMENTATION_PLAN.md",
"logFile": "IMPLEMENTATION_LOG.md",
"taskSummary": "Execute the implementation plan: [brief description]"
}
4. Synthesis
When all tasks are complete.
§CMD_REPORT_INTENT:
4: Synthesizing. ___ plan steps completed, ___ tests passing.
Focus: ___.
Not: ___.
§CMD_EXECUTE_PHASE_STEPS(4.0.*)
Debrief notes (for IMPLEMENTATION.md):
- Deviation Analysis: Compare Plan vs. Log. Where did we struggle?
- Tech Debt: What did we hack to get it working?
- The Story: Narrate the build journey.
- Next Steps: Clear recommendations for the next session.
Walk-through config:
§CMD_WALK_THROUGH_RESULTS Configuration:
mode: "results"
gateQuestion: "Implementation complete. Walk through the changes?"
debriefFile: "IMPLEMENTATION.md"
Before closing, offer a /council panel review on the built session <dir> via §CMD_OFFER_COUNCIL_REVIEW (offer, not force) -- diverse expert eyes on what was actually built.