Execute an approved Implementation Plan by walking through Execution Groups, validating at checkpoints, generating tests and docs, and producing commits.
From rootnpx claudepluginhub brandcast-signage/root --plugin rootroot//implImplements features from session spec via plan analysis, task breakdown, iterative implementation with Codex review, commits, and doc updates.
/implImplements coding plan from specified plan-file directory using persistent markdown files (task_plan.md, findings.md, progress.md) for state, progress, and rules enforcement.
/implUse when implementing a feature — executes TDD tasks via sub-agents with state tracking and auto-resume. Supports --repos for parallel multi-repo implementation.
/implThis command provides a detailed implementation plan with discrete, trackable tasks and sub-tasks.
/implAutonomous beads task implementation - spawns background workers to implement, commit, and verify
Execute an approved Implementation Plan by walking through Execution Groups, validating at checkpoints, generating tests and docs, and producing commits.
Parse the first word of the argument to determine the action. Default to run if no argument.
/tmp/root-session.json. Extract tier, plan_path, issue.root.config.json. Extract:
validation.lintCommand (e.g., npm run lint && npm run type-check)validation.testCommand (e.g., npm test -- <pattern>)codingStandards arrayproject.docsDir for doc generation/root:impl run docs/plans/my-feature.md)
b. Session state plan_path
c. If neither exists: "No plan found. Run /root <task> first." and stop.Subcommands that generate docs use these variables:
RAG_BIN="${HOME}/.root-framework/mcp/node_modules/mcp-local-rag/dist/index.js"
DB_PATH=$(python3 -c "import json; print(json.load(open('root.config.json')).get('ingest', {}).get('dbPath', '.root/rag-db'))" 2>/dev/null || echo ".root/rag-db")
CACHE_DIR="${HOME}/.cache/mcp-local-rag/models"
Before executing any plan, validate it against this rubric. If the plan fails, stop and report what needs more detail. Do NOT proceed with a plan that fails the rubric.
Every Change Manifest entry MUST have:
create: expected exports, function signatures with parameter types and return typesmodify: what the current behavior is AND what it becomesEvery Execution Group MUST have:
Verification Plan MUST have:
If the rubric fails, output:
## Plan Quality Check — FAILED
<n> issues found:
1. Change #3 (src/services/foo.ts): Description "update as needed" is not specific enough.
Required: describe what the current behavior is and what it becomes.
2. Group B: No test task specified.
Required: at least one test task with file path and scenarios.
Fix these issues in the plan before running /root:impl.
run [plan-path] (default)Execute the Implementation Plan.
Read the plan file. For Tier 1, extract:
-->) = hard dependencies. Dashed arrows (.->) = soft dependencies.For Tier 2: parse as a numbered step list. Skip to the Tier 2 section below.
Run the Plan Quality Rubric. If any entry fails, output the failures and stop.
Use AskUserQuestion to ask the user:
For each Execution Group that should become an issue:
gh issue create --title "Group <letter>: <name>" --body "<body>"
Created <n> issues:
#201 — Group A: Backend Pipeline
#202 — Group B: Frontend Components (depends on #201)
#203 — Group C: Integration Tests (depends on #201, #202)
Stop after issue creation. The user runs /root:impl again when ready to implement.
Scan the Change Manifest Status column for completed markers:
[x] or [x] (<sha>) = complete[~] = in progress (treat as incomplete)[ ] = pendingIf completed groups exist: "Resuming from Group <X> — <N> of <M> groups complete."
From the Dependency Graph, determine which groups can run simultaneously:
-->) are complete.->) can start but need integration after the dependency completesExample batch ordering:
Batch 1: Groups A, B (no dependencies)
Batch 2: Group C (depends on A), Group D (depends on B)
Batch 3: Group E (depends on C and D)
For each batch of parallel-ready groups:
Spawn one agent per group using the Agent tool with isolation: "worktree":
Gemini CLI does not have native agent team support. Execute groups sequentially in dependency order. If multiple groups in a batch have no dependency relationship, suggest:
These groups are independent and can run in parallel.
To parallelize, open additional Gemini CLI sessions in separate worktrees:
git worktree add ../<project>-group-b group-b
cd ../<project>-group-b && gemini
Whether parallel or sequential, each group follows this process:
---
## Executing Group <letter>: <name>
Changes: #1, #2, #3
Sequence: types (#1) → service (#2) → route (#3)
Tests: <test file and scenarios>
---
For each change in the group's sequence:
modify or delete)create: Write the new file. Include all exports, types, and function signatures specified in the Change Manifest.modify: Edit the specified section/function. The Change Manifest describes what the current behavior is and what it becomes — follow that exactly.delete: Remove the file.root.config.json → codingStandards[ ] to [~] for this entryTests are a required deliverable for every group:
# Use validation.testCommand scoped to the test file
# Execute validation.lintCommand from root.config.json
If it fails, fix the errors before proceeding.# Execute validation.testCommand with patterns matching changed files
Create one commit for this group:
feat(<scope>): <description> or fix(<scope>): <description>(#1132)Update the Change Manifest in the plan file:
[~] to [x] (<sha>) for each entry in this group<sha> is the first 7 characters of the commit hashAfter each batch of groups completes, pause for human verification:
### Checkpoint: Group(s) <letters> Complete
Files changed: <list>
Tests added: <list of test files>
Commits:
<sha> — <message>
<sha> — <message>
Lint: PASS/FAIL
Tests: <n> passed, <n> failed
Progress: <completed>/<total> groups
Next batch: Group(s) <letters> (<n> changes)
Use AskUserQuestion:
git log --oneline -<n> and git diff HEAD~<n> for this batch's commits, then ask again/root:impl resumeAfter all code groups are complete, before final validation:
create actions on source files (not test files)/root:docs Doc Quality Rubric:
project.docsDirnode "$RAG_BIN" --db-path "$DB_PATH" --cache-dir "$CACHE_DIR" ingest <doc-path>
validation.lintCommand across the entire project (not scoped to changed files)validation.testCommand without file pattern restrictions## Implementation Complete
Plan: <title>
Issue: #<number> — <title>
Groups completed: <N>/<N>
Commits: <list of SHAs and messages>
### Changes
<list all files from Change Manifest with actions>
### Tests Added
<list all test files created>
### Docs Created
<list any docs generated in Step 8>
### Verification
Lint: PASS | Type-check: PASS
Tests: <n> passed, <n> failed
Manual verification: <status>
Coding standards: <n>/<n> checked
Write PR metadata to /tmp/root-pr-context.txt:
Use AskUserQuestion:
gh pr create with generated title and bodyFor Tier 2 plans (no Change Manifest, no Execution Groups):
validation.lintCommand and validation.testCommandresumePick up from the last incomplete Execution Group.
[ ] or [~]) changesrun flow from Step 5 (identify parallel groups) for remaining workIf all groups are complete: "All groups complete. Run /root:impl finalize to run final validation and create PR."
statusShow current implementation progress.
## Implementation Status
Plan: <title>
Tier: <tier>
Issue: #<number> — <title>
### Execution Groups
| Group | Name | Changes | Tests | Complete | Commit |
|-------|------|---------|-------|----------|--------|
| A | Backend | #1, #2, #3 | 3 scenarios | 3/3 | a1b2c3d |
| B | Frontend | #4 | 2 scenarios | 0/1 | — |
Progress: 1/2 groups (3/4 changes)
Next: Group B: Frontend
Resume: /root:impl resume
For Tier 2: show the numbered step list with checkmarks.
finalizeRun final validation and produce commit/PR without re-executing changes. Use when: