Root development workflow framework. Classifies work tier, fetches issue context, loads relevant docs via RAG, drives planning, and initializes session tracking. Run at the start of every task. Examples: /root fix issue 1132, /root new calendar integration, /root #1234
From rootnpx claudepluginhub brandcast-signage/root --plugin rootThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Entry point for the Root development workflow framework. Provides tier-based planning, doc-aware context gathering, and session tracking.
Root reads project-specific settings from root.config.json in the project root. If the config file doesn't exist, use sensible defaults:
docsDir: "docs"plansDir: "docs/plans"prdsDir: "docs/prds"Execute all steps in order. Steps 1-7 run autonomously. Step 8 drives planning (tier-dependent). Step 9 generates tasks after plan approval.
Before anything else, check if /tmp/root-session.json exists.
If the argument is reset:
/tmp/root-session.json if it existsIf session file exists AND contains a plan_path field:
Otherwise: proceed to Step 1.
Extract from the argument text:
#1234, issue 1234, GH-1234, bare number, or github.com/.../issues/1234 URLIf no argument was provided, ask the user what they're working on and stop.
Run:
gh issue view <number> --json number,title,body,labels,state,assignees
Store the result. The issue title, body, and labels inform tier classification and doc matching.
Using the task description AND issue context (if available), classify as:
| Tier | Criteria |
|---|---|
| Tier 1 (Full Process) | New features, large refactors, multi-package changes, schema changes, new integrations, architectural work. Hours-to-days scope. |
| Tier 2 (Light Process) | Bug fixes, single-file changes, config updates, dependency bumps, small improvements. Minutes-to-an-hour scope. |
Rules:
type:feature leans Tier 1, type:bug leans Tier 2RAG_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"
node "$RAG_BIN" --db-path "$DB_PATH" --cache-dir "$CACHE_DIR" query "<query from task description + issue title/body>"
limit: 10 to get a broad set of resultsRead root.config.json and match against all three mapping types:
For each doc loaded in Step 4, check its path against docMappings[].pattern (regex match). Collect matching agents and skills.
For each label on the issue, check against labelMappings[].label. Collect matching agents.
For each entry in keywordMappings, check if any keywords appear in the task description or issue title/body. Collect matching agents.
Write /tmp/root-session.json (overwrite if exists):
{
"tier": "tier1|tier2",
"issue": {
"number": 1132,
"title": "...",
"labels": ["area:frontend", "type:feature"],
"state": "OPEN"
},
"docs_read": ["docs/AUTH_SYSTEM.md"],
"docs_suggested": [],
"skills_recommended": [],
"agents_recommended": ["specialist-backend"],
"plan_path": null,
"files_edited": [],
"docs_edited": [],
"started": "2026-03-19T12:00:00Z"
}
issue is null if no issue was referenceddocs_read contains paths of docs actually read in Step 4skills_recommended and agents_recommended come from Step 5 (empty arrays if no matches)plan_path is null initially — set by Step 8 when a plan is writtenPrint a structured summary. Example for Tier 2:
## Root Session Initialized
**Tier**: 2 (Light Process) — [brief reason]
**Issue**: #1132 — Fix auth token refresh loop
**Labels**: area:backend, type:bug
**State**: OPEN
### Docs Loaded
- `docs/AUTH_SYSTEM.md` — Authentication System
### Recommended Agents
- **Agent**: `specialist-backend` — area:backend label, auth-related docs
### Workflow (Tier 2)
1. Understand → Read the relevant code, trace the issue
2. Fix → Make the change
3. Validate → lint + type-check + relevant tests
4. Commit → Conventional commit format
Example for Tier 1:
## Root Session Initialized
**Tier**: 1 (Full Process) — [brief reason]
**Issue**: #1200 — New weather integration
**Labels**: area:backend, type:feature
### Docs Loaded
- `docs/INTEGRATIONS.md` — Integration Architecture
### Recommended Agents
- **Agent**: `specialist-backend` — area:backend, integration-related docs
### Workflow (Tier 1)
1. PRD → Write in <prdsDir>
2. Implementation Plan → Write in <plansDir> using TEMPLATE.md
3. Review → Plan mode for human approval
4. Implement → Task tracking with TodoWrite
5. Validate → Full quality gate
6. Document → Update relevant docs
7. Commit → Zero errors, conventional format
### Next Step
Write the PRD. Use `team-architect` agent for design.
After outputting the summary, proceed to Step 8.
Planning is tier-dependent. Execute the appropriate path below.
Read root.config.json to get project.plansDir and project.prdsDir.
Check for PRD: Look for a PRD in <prdsDir> that matches the issue or task slug.
"Tier 1 requires a PRD before the implementation plan. Starting guided PRD authoring."
/root:prd new <task description or issue number> to guide the user through PRD creation./root.Read the PRD: Extract the functional requirements (REQ IDs), proposed solution, and technical scope. These drive the Change Manifest.
Trace code paths: Spawn up to 3 Explore agents in parallel. Each agent should:
Write the Implementation Plan: Create <plansDir>/<slug>.md using the Implementation Plan template (check <plansDir>/TEMPLATE.md). Populate:
codingStandards from root.config.json, plus proactive cleanup items found during tracingroot.config.json → validationUpdate session state: Set plan_path in /tmp/root-session.json to the plan file path.
Ingest the plan into RAG:
node "$RAG_BIN" --db-path "$DB_PATH" --cache-dir "$CACHE_DIR" ingest <plan-path>
Enter plan mode: Use EnterPlanMode so the user can review and approve the Implementation Plan. Output:
"Implementation plan written to
<plansDir>/<slug>.md. Entering plan mode for review."
Enter plan mode: Use EnterPlanMode to create an ephemeral plan in .claude/plans/ (or .gemini/plans/ if using Gemini CLI).
Write a lightweight plan covering:
root.config.json → validationUpdate session state: Set plan_path to the .claude/plans/ (or .gemini/plans/) file path.
The plan is ready when the user approves it via plan mode. GitHub issue/PR linkage provides traceability.
After the user approves the plan (exits plan mode), hand off to /root:impl:
"Implementation Plan approved. Run
/root:implto begin execution, or/root:impl statusto review the plan."
The plan file is the source of truth — /root:impl reads the Change Manifest and Execution Groups directly. No intermediate task list is needed.