This skill executes cc10x router workflows by detecting intent, loading memory, and continuously updating state to complete tasks.
npx playbooks add skill romiluz13/cc10x --skill cc10x-router
The router runs trust-first orchestration: route intent, hydrate workflow state, write workflow artifacts, execute the task graph, validate agent output, and fail closed on ambiguity, skipped work, or missing persistence.
A keyword hit only NOMINATES a row; the request's primary deliverable DECIDES the route (e.g. "triage incoming issues" contains issue but its deliverable is triage, so it routes TRIAGE, not DEBUG). When the primary-deliverable test genuinely holds for more than one row, the lower Priority number wins. The QA, ORIENT, and REVIEW cases below are applications of this test, not exceptions to it.
| Priority | Signal | Keywords | Workflow | Chain |
| ---------- | -------- | ---------- | ---------- | ------- |
| 1 | ERROR | error, bug, fix, broken, crash, fail, debug, troubleshoot, issue | DEBUG | bug-investigator -> code-reviewer -> integration-verifier |
| 2 | PLAN | plan, design, architect, roadmap, strategy, spec, brainstorm | PLAN | exploration -> planner -> bounded fresh review loop |
| 3 | REVIEW | review, audit, analyze, assess, "is this good" | REVIEW | code-reviewer |
| 4 | ORIENT | zoom out, explain, understand, "how does X work", unfamiliar, "map this", "walk me through", "where is", "what does this do" | ORIENT | advisory orientation (no agents) |
| 5 | QA | test, QA, e2e, end-to-end, integration test, test plan, test coverage, regression, smoke test, "verify my feature", "prove it works" | QA | qa-researcher (fan-out) → qa-plan → plan-gap-reviewer → qa-preflight → qa-harness-builder → [code-reviewer ‖ failure-hunter] → qa-executor |
| 6 | TRIAGE | triage, "incoming issues", "look at #", "triage #" | TRIAGE | triage-agent → optional exploration → agent-ready brief |
| 7 | CODEBASE-HEALTH | "codebase health", "improve architecture", "deepening", "ball of mud", "shallow modules", "architecture audit" | CODEBASE-HEALTH | architecture-scanner → HTML report → human picks → exploration (grilling) → feeds PLAN |
| 8 | DEFAULT | Everything else | BUILD | component-builder → [code-reviewer ‖ failure-hunter] → integration-verifier |
Rules:
plan_file and run the fresh-review gate over it) rather than discarding it. Default to the CC10x PLAN workflow for "plan", "design", "architect", "brainstorm" requests.triage or incoming issues or look at # / triage #). A request that mentions a bug/issue/feature but asks to implement/fix/change it is BUILD or DEBUG — the primary deliverable is the change, not the triage. Do not route to TRIAGE unless the user explicitly asks to triage.codebase health, improve architecture, deepening, ball of mud, shallow modules, or architecture audit). A request that asks to refactor/fix/change specific code is BUILD — the primary deliverable is the change, not the audit.references/build-workflow.md): trivial scope (1-2 files, single change, one testable outcome, no cross-module wiring) runs a reduced builder → verifier → memory graph; everything else, and all planned work, runs the full builder → [reviewer || hunter] → verifier → doc-sync → memory chain. The reviewer and hunter run in parallel (two read-only agents in the same message) and the router merges their findings before verifier handoff. The builder escalates trivial → full on any scope increase. The router is still the sole entry point for every BUILD — the gradient scales the graph to the work, it does not bypass routing.-> {WORKFLOW} workflow (signals: {matched keywords})Triggered when the user wants to understand existing code, not change it ("zoom out", "explain", "how does X work", "I'm unfamiliar with", "map this", "walk me through", "where is X", "what does this do"). The router answers inline — no TaskCreate, no NEW workflow artifact, no phase graph, no write agents. (Edge case: if an artifact was pre-created before routing resolved — §2a permits early creation with workflow_type: pending — set its workflow_type to ORIENT and phase_cursor to orient, record the close in status_history, and create no phase graph. That is the only reason ORIENT/orient appear in the artifact enums.)
Orientation procedure:
Glob / Grep to locate, Read only the slices needed to explain). Octocode local tools (localViewStructure, localSearchCode), when mounted, are optional accelerators.LSP tool (incomingCalls, findReferences) where a language server is configured, else Grep; locate the exact line and column with Grep before any LSP call. Octocode lspCallHierarchy is an optional accelerator.Distinguish from REVIEW: REVIEW judges quality ("is this good", audit); ORIENT only explains structure and flow. The deliverable decides: "help me understand" is ORIENT, "tell me what's wrong" is REVIEW; only a genuine tie goes to REVIEW (lower number).
Always run this before routing or resuming:
1. Bash("mkdir -p .cc10x/")
2. Read(".cc10x/activeContext.md")
3. Read(".cc10x/patterns.md")
4. Read(".cc10x/progress.md")
Do not parallelize step 1 with reads — the reads assume the directory exists.
If a memory file is missing:
cc10x:memory-and-handoff template.Required sections:
| File | Required Sections |
| ------ | ------------------- |
| activeContext.md | ## Current Focus, ## Recent Changes, ## Next Steps, ## Decisions, ## Learnings, ## References, ## Blockers, ## Session Settings, ## Last Updated |
| progress.md | ## Current Workflow, ## Tasks, ## Completed, ## Verification, ## Last Updated |
| patterns.md | ## User Standards, ## Common Gotchas, ## Project SKILL_HINTS, ## Last Updated |
Auto-heal rule:
## Last Updated.Edit(...), immediately Read(...) and verify the new section exists.JUST_GO:
activeContext.md ## Session Settings.AUTO_PROCEED: true, set JUST_GO=true.JUST_GO=true, auto-default AskUserQuestion gates to the recommended option EXCEPT: REVERT, failure-stop gates, destructive finishing options (auto-pick Keep as-is; never merge/push/discard), drop-work confirmations (the §14 drop-work rule and Discard's typed discard), and plans with unresolved Open Decisions (BUILD may not start). A JUST_GO auto-answer is never the user's agreement. Log each auto-choice in ## Decisions.Trust rule:
JUST_GO never overrides explicit user/project standards, open plan decisions, or failure-stop gates.Open Decisions, BUILD may not start, even in JUST_GO.Core law:
.cc10x/workflows/{workflow_uuid}.json.cc10x/workflows/{workflow_uuid}.events.jsonlplan_trust_gate, phase_exit_gate, failure_stop_gate, memory_sync_gate, and skill_precedence_gateMandatory reference read:
references/workflow-artifact-and-hook-policy.md.Plugin root for commands in reference files: ${CLAUDE_PLUGIN_ROOT}; Claude Code substitutes it when this skill loads, but reference files read through Read arrive with the placeholder literal. When a reference command carries the plugin-root placeholder, build the absolute path from the value on this line; never run the placeholder as-is.
Every CC10X task description starts with normalized metadata lines:
wf:{workflow_uuid}
kind:{workflow|agent|remfix|memory|reverify|research}
origin:{router|component-builder|bug-investigator|code-reviewer|failure-hunter|integration-verifier|planner|qa-harness-builder|qa-executor}
phase:{build|build-implement|build-review|build-hunt|build-verify|build-doc-sync|build-finish|debug|debug-investigate|debug-review|debug-verify|review|review-audit|plan|plan-create|plan-review-gap-1|plan-review-gap-2|plan-review-amendment|qa|qa-research|qa-plan|qa-plan-review|qa-re-plan|qa-plan-review-2|qa-preflight|qa-build|qa-review|qa-hunt|qa-execute|memory-finalize|re-review|re-hunt|re-verify|re-plan|re-qa-build|re-qa-execute|research-web|research-github|triage|codebase-health}
plan:{path|N/A}
scope:{ALL_ISSUES|CRITICAL_ONLY|N/A|{source}|code:{repo}}
reason:{short reason or N/A}
Rules:
wf:, kind:, origin:, phase:, plan:, scope:, reason:) are present on EVERY CC10X task — use N/A where a field does not apply. The task-graph templates already satisfy it.wf: always carries the generated workflow_uuid (wf-<ts>-<hex>), never a Claude TaskCreate task id. This aligns with the hard rule "never treat stored task IDs as durable truth across workflows."workflow_uuid before TaskCreate() and use it from the first write.kind: drives resume, routing, and counting logic.origin: on a kind:remfix task names the agent whose findings triggered the fix (never N/A there).plan: carries the real plan path on workflow, agent, reverify, and memory tasks when a plan exists.reason: carries a meaningful short reason (not N/A) on remediation and research tasks.After memory load:
TaskList()
Task tools are optional. Claude Code ships TaskCreate/TaskList/TaskGet/TaskUpdate by default only on some models; the Agent tool is a separate primitive and stays available without them. The workflow artifact is the source of truth and task metadata mirrors it. When the Task tools are absent, do not fail and do not run inline: use ARTIFACT-ONLY GRAPH MODE. Phase state, task ids and ordering are tracked in the artifact (task_ids, phase_status, phase_cursor, results) and the events log; every agent is still dispatched through the Agent tool with fresh context; validation and every gate apply as written; completion is recorded by the router in the artifact, because no agent holds TaskUpdate or is told to call it (the router completes every task after contract validation). The inline no-subagent fallback (§12) applies only when the Agent/dispatch primitive itself is unavailable. CLAUDE_CODE_ENABLE_TODO_TOOLS=1 restores the tools on every model (recommended); CLAUDE_CODE_TASK_LIST_ID shares one task list across sessions (optional).
Hydration rules:
CC10X BUILD:, CC10X DEBUG:, CC10X REVIEW:, CC10X PLAN:, CC10X QA:. TRIAGE and CODEBASE-HEALTH create no parent task: find them by CC10X triage-agent: / CC10X architecture-scanner: or the pending CC10X Memory Update: task, scoped by wf:; a paused workflow has no Memory Update task yet, and its artifact pending_gate names the open question. In Task-tools mode, when no such task is found for an advisory route, fall back to the non-terminal artifacts that carry a pending_gate and have workflow_type TRIAGE or CODEBASE-HEALTH (they have no parent task). ORIENT creates no task.wf: markers. Do not resume a workflow you cannot scope confidently.TaskList() and TaskGet() using wf: + kind: + phase:. Do not rely on stored task IDs for correctness..cc10x/ state namespace (memory .cc10x/.md, workflows .cc10x/workflows/). Ignore any legacy version-segmented layout such as .cc10x/v10/ or .claude/cc10x/ left over from older installs during hydration.[cc10x-internal] memory_task_id in activeContext.md is only a transient optimization. If it is missing, stale, or points to a different wf:, ignore it and reconstruct the memory task from the current workflow scope. [EASY TO MISS: stale memory_task_id is the #1 cause of cross-workflow pollution]Resume algorithm:
.cc10x/stop-state.json or .cc10x/precompact-state.json exists (written by the Stop/PreCompact hooks), read it as a HINT for which wf: and phase_cursor were live when the session last ended. It is a hint only — task metadata and the workflow artifact stay authoritative; discard the hint on any mismatch.workflow_uuid from the wf: line.wf:.status and blockedBy.kind:memory task in the same wf:..cc10x/workflows/.json, drop the terminal ones, and keep the artifacts whose workflow_uuid the user named or whose user_request matches the current conversation, never by modification time alone; one match resumes it, more than one, ask which; when none matches, look up the paused workflow a bare reply answers: the candidates are the non-terminal artifacts with a non-null pending_gate (the wf the step 0 hint names counts when its artifact is non-terminal and has one); exactly one candidate means the reply is the answer to its pending_gate, more than one, ask which (list each gate name and user_request), none starts a new workflow (say so); (b) read pending_gate first and answer it, then phase_cursor, phase_status and results; (c) a graph step is complete only if the events log holds a result_persisted event for its agent and task phase with details.phase_id equal to the current phase_cursor, appended after the latest phase_started or remediation_created event for that phase_id (file order decides; the workflow start event is the boundary when neither exists, and after a remediation_created the current graph is the remediation graph: REM-FIX, re-review, re-hunt, re-verify (REM-FIX is the component-builder step with the originating task phase; a pending original verifier that has not run takes the re-verify slot and keeps its task phase; doc-sync follows the verifier on the BUILD route as usual)); results. holds only the latest value and never proves a step done; null, missing and N/A phase_id values compare equal (a BUILD with no plan phases has a null phase_cursor); a result_persisted whose decision is NEEDS_INFO or NEEDS_GRILLING is the pause of a pass that a second pass of the same agent and task phase follows, so it does not complete its step and only a terminal-status result does (CANDIDATES_FOUND completes the scanner step: no second pass follows and pending_gate carries the pause); the next step is the first step of that route's graph that is not complete, and a partial or blocked step is re-entered only through its remediation or clarification gate.references/qa-workflow.md step 2a's resume and legacy bullets and step 0c's resume bullet, and fill every QA dispatch's Denied reads: line from intent.constraints at dispatch.Terminal test: a workflow is terminal when its events log or status_history holds memory_finalized, workflow_completed or workflow_failed, or its phase_cursor is memory-finalize and completed. Pending gate (both modes): if a non-terminal artifact carries pending_gate, read it first; the user's reply answers it, and the router CLEARS it (sets null and records the answer in status_history in the user's exact words) once answered and also when the workflow reaches a terminal state.
Scope-decision resume:
activeContext.md ## Decisions for a live marker:[SCOPE-DECISION-PENDING: wf:{workflow_uuid} reason:{...}]critical only -> create the pending REM-FIX with scope:CRITICAL_ONLYall issues -> create the pending REM-FIX with scope:ALL_ISSUESWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.