Lite Router - Task Router (No Opus)
Performs task classification and routing WITHOUT spawning the CEO (Opus) agent. All classification happens in the current session context (Sonnet-level), and agents are dispatched using only Sonnet and Haiku tiers.
When to Activate
- User runs
/crew lite "description"
- User runs
/crew task --lite "description" (backward compatible)
Prerequisites
These files MUST exist (run /crew init first):
.claude/crew-profile.md — project context
.claude/crew-team.json — agent configuration
.claude/crew-skills.json — skill catalog
.claude/crew-index.json — codebase index (Layer 1)
.claude/crew-symbols.json — symbol map (Layer 2)
If any are missing, tell the user to run /crew init first.
Lite Mode Advantage
In LITE mode:
- 0 Opus calls — CEO is bypassed entirely
- Classification is done by this skill (runs in user's Sonnet session)
- vp-engineering (Sonnet) takes over planning/architecture duties that CEO would normally handle
Routing Algorithm
Step 1: Read Context
1. Read .claude/crew-profile.md for project context
2. Read .claude/crew-team.json for available agents
3. Read .claude/crew-index.json for codebase awareness
4. Check for .claude/.index-stale — if present, invoke index-updater for listed files, then delete the marker
Step 2: Classify Task
Task Type (pick one):
| Type |
Signals |
bug-fix |
"fix", "bug", "broken", "error", "crash", "not working", "issue" |
feature |
"add", "implement", "create", "build", "new", "feature" |
refactor |
"refactor", "clean up", "reorganize", "restructure", "improve" |
docs |
"document", "readme", "comment", "explain", "docs" |
test |
"test", "coverage", "spec", "TDD", "unit test", "e2e" |
security |
"security", "vulnerability", "auth", "permission", "XSS", "injection" |
devops |
"deploy", "docker", "CI/CD", "pipeline", "kubernetes", "build" |
review |
"review", "check", "audit", "quality" |
performance |
"slow", "optimize", "performance", "speed", "memory", "cache" |
Complexity (assess based on scope):
| Level |
Signals |
trivial |
Single word change, typo, formatting, one-line fix |
simple |
Single file, clear fix, under 20 lines changed |
moderate |
2-4 files, some design decisions, 20-100 lines |
complex |
5+ files, architecture decisions, new patterns, 100+ lines |
architectural |
System-wide changes, new subsystems, major refactors |
Step 3: Select Agent Chain (LITE — No Opus)
LITE ROUTING TABLE (Sonnet + Haiku only):
bug-fix:
trivial → junior-dev (haiku)
simple → debugger (sonnet) investigates → junior-dev (haiku) fixes
moderate → debugger (sonnet) investigates → senior-dev (sonnet) fixes
complex → vp-engineering (sonnet) analyzes → debugger investigates → senior-dev fixes → code-reviewer reviews
architectural → vp-engineering (sonnet) plans → debugger + senior-dev execute → vp-quality reviews
feature:
trivial → junior-dev (haiku)
simple → senior-dev (sonnet)
moderate → vp-engineering (sonnet) plans → senior-dev implements → test-engineer tests
complex → vp-engineering (sonnet) architects → [parallel: senior-dev implements, test-engineer writes tests] → code-reviewer reviews
architectural → vp-engineering (sonnet) designs + plans → [parallel: multiple agents] → vp-quality reviews all
refactor:
any → vp-engineering (sonnet) plans → senior-dev executes → code-reviewer reviews
docs:
any → doc-writer (haiku)
test:
trivial/simple → test-engineer (sonnet)
moderate+ → vp-quality (sonnet) strategizes → test-engineer implements
security:
any → security-analyst (sonnet) → senior-dev fixes findings
devops:
trivial/simple → devops-engineer (haiku)
moderate+ → senior-dev (sonnet) handles complex infra
review:
any → code-reviewer (sonnet) → report to user
performance:
any → vp-engineering (sonnet) analyzes → senior-dev optimizes → test-engineer verifies
Key difference from full mode: vp-engineering (Sonnet) takes over the CEO's planning and architecture role. No Opus agent is ever spawned.
Step 4: Decide Execution Strategy
PARALLEL when:
- Subtasks operate on DIFFERENT files (check via crew-index.json)
- Implementation + test writing (test-engineer on test files, senior-dev on source files)
- Multiple independent bug fixes
- Documentation for different components
SEQUENTIAL when:
- Investigation must complete before fix begins
- Planning must complete before implementation
- Implementation must complete before review
- Subtasks modify the SAME files
HYBRID (most common for moderate+ tasks):
1. Sequential: investigation/planning phase
2. Parallel: independent implementation subtasks
3. Sequential: integration review
Step 5: Inject Relevant Skills
Read .claude/crew-skills.json and select skills to inject into agent prompts:
1. Always include: "always" category skills
2. Add stack-specific skills based on detectedStack
3. Add task-type skills based on classified type
4. Each agent gets ONLY the skills relevant to their subtask
5. vp-engineering gets expanded budget (2500 tokens) when acting as planner in lite mode
Step 6: Generate Execution Plan
Create a structured plan before executing:
[LITE] {type}/{complexity}: "{task}"
1. {agent} → {subtask}
2. {agent} + {agent} → {subtask A} | {subtask B}
3. {agent} → {review}
Display this plan to the user, then execute.
Step 7: Execute
Use the execution-orchestrator skill to dispatch agents according to the plan.
For each agent dispatch, construct a self-contained prompt that includes:
- The subtask description
- Relevant project context from crew-profile.md
- The Index-First Protocol instructions
- Injected skill guidance
- Files the agent should focus on (from index analysis)
- Expected output format
- Note: In lite mode, if an agent needs to escalate, escalate to vp-engineering (not CEO)
Step 8: Collect Results & Report
After all agents complete:
- Collect each agent's output
- Check for conflicts (multiple agents editing same lines)
- If conflicts: escalate to vp-engineering for resolution (NOT CEO)
- Auto-update index for all
FILES_MODIFIED (handled automatically by execution-orchestrator)
- Log task to
.claude/crew-history.json (with "mode": "lite" flag, including skillsInjected and agent details)
- Report final status to user (including index update status and skills injected)
- Include skills used in the report — execution-orchestrator's Result Collection template handles the format
Error Handling
- If agent fails → retry once with more context
- If agent reports index is stale → trigger incremental update, then retry
- If parallel agents conflict → fall back to sequential for conflicting files
- If task is unclear → ask user for clarification instead of guessing
- If task complexity exceeds expectations → escalate to vp-engineering (NOT CEO)
1---2name: lite-router3description: Lite task router that bypasses Opus CEO entirely. Classifies tasks and routes directly to Sonnet and Haiku agents only. Use when user runs /crew lite or /crew task --lite.4---56# Lite Router - Task Router (No Opus)78Performs task classification and routing WITHOUT spawning the CEO (Opus) agent. All classification happens in the current session context (Sonnet-level), and agents are dispatched using only Sonnet and Haiku tiers.910## When to Activate1112- User runs `/crew lite "description"`13- User runs `/crew task --lite "description"` (backward compatible)1415## Prerequisites1617These files MUST exist (run `/crew init` first):18- `.claude/crew-profile.md` — project context19- `.claude/crew-team.json` — agent configuration20- `.claude/crew-skills.json` — skill catalog21- `.claude/crew-index.json` — codebase index (Layer 1)22- `.claude/crew-symbols.json` — symbol map (Layer 2)2324If any are missing, tell the user to run `/crew init` first.2526## Lite Mode Advantage2728In LITE mode:29- **0 Opus calls** — CEO is bypassed entirely30- Classification is done by this skill (runs in user's Sonnet session)31- vp-engineering (Sonnet) takes over planning/architecture duties that CEO would normally handle3233## Routing Algorithm3435### Step 1: Read Context36```371. Read .claude/crew-profile.md for project context382. Read .claude/crew-team.json for available agents393. Read .claude/crew-index.json for codebase awareness404. Check for .claude/.index-stale — if present, invoke index-updater for listed files, then delete the marker41```4243### Step 2: Classify Task4445**Task Type** (pick one):46| Type | Signals |47|------|---------|48| `bug-fix` | "fix", "bug", "broken", "error", "crash", "not working", "issue" |49| `feature` | "add", "implement", "create", "build", "new", "feature" |50| `refactor` | "refactor", "clean up", "reorganize", "restructure", "improve" |51| `docs` | "document", "readme", "comment", "explain", "docs" |52| `test` | "test", "coverage", "spec", "TDD", "unit test", "e2e" |53| `security` | "security", "vulnerability", "auth", "permission", "XSS", "injection" |54| `devops` | "deploy", "docker", "CI/CD", "pipeline", "kubernetes", "build" |55| `review` | "review", "check", "audit", "quality" |56| `performance` | "slow", "optimize", "performance", "speed", "memory", "cache" |5758**Complexity** (assess based on scope):59| Level | Signals |60|-------|---------|61| `trivial` | Single word change, typo, formatting, one-line fix |62| `simple` | Single file, clear fix, under 20 lines changed |63| `moderate` | 2-4 files, some design decisions, 20-100 lines |64| `complex` | 5+ files, architecture decisions, new patterns, 100+ lines |65| `architectural` | System-wide changes, new subsystems, major refactors |6667### Step 3: Select Agent Chain (LITE — No Opus)6869```70LITE ROUTING TABLE (Sonnet + Haiku only):7172bug-fix:73 trivial → junior-dev (haiku)74 simple → debugger (sonnet) investigates → junior-dev (haiku) fixes75 moderate → debugger (sonnet) investigates → senior-dev (sonnet) fixes76 complex → vp-engineering (sonnet) analyzes → debugger investigates → senior-dev fixes → code-reviewer reviews77 architectural → vp-engineering (sonnet) plans → debugger + senior-dev execute → vp-quality reviews7879feature:80 trivial → junior-dev (haiku)81 simple → senior-dev (sonnet)82 moderate → vp-engineering (sonnet) plans → senior-dev implements → test-engineer tests83 complex → vp-engineering (sonnet) architects → [parallel: senior-dev implements, test-engineer writes tests] → code-reviewer reviews84 architectural → vp-engineering (sonnet) designs + plans → [parallel: multiple agents] → vp-quality reviews all8586refactor:87 any → vp-engineering (sonnet) plans → senior-dev executes → code-reviewer reviews8889docs:90 any → doc-writer (haiku)9192test:93 trivial/simple → test-engineer (sonnet)94 moderate+ → vp-quality (sonnet) strategizes → test-engineer implements9596security:97 any → security-analyst (sonnet) → senior-dev fixes findings9899devops:100 trivial/simple → devops-engineer (haiku)101 moderate+ → senior-dev (sonnet) handles complex infra102103review:104 any → code-reviewer (sonnet) → report to user105106performance:107 any → vp-engineering (sonnet) analyzes → senior-dev optimizes → test-engineer verifies108```109110**Key difference from full mode**: vp-engineering (Sonnet) takes over the CEO's planning and architecture role. No Opus agent is ever spawned.111112### Step 4: Decide Execution Strategy113114```115PARALLEL when:116- Subtasks operate on DIFFERENT files (check via crew-index.json)117- Implementation + test writing (test-engineer on test files, senior-dev on source files)118- Multiple independent bug fixes119- Documentation for different components120121SEQUENTIAL when:122- Investigation must complete before fix begins123- Planning must complete before implementation124- Implementation must complete before review125- Subtasks modify the SAME files126127HYBRID (most common for moderate+ tasks):1281. Sequential: investigation/planning phase1292. Parallel: independent implementation subtasks1303. Sequential: integration review131```132133### Step 5: Inject Relevant Skills134135Read `.claude/crew-skills.json` and select skills to inject into agent prompts:136137```1381. Always include: "always" category skills1392. Add stack-specific skills based on detectedStack1403. Add task-type skills based on classified type1414. Each agent gets ONLY the skills relevant to their subtask1425. vp-engineering gets expanded budget (2500 tokens) when acting as planner in lite mode143```144145### Step 6: Generate Execution Plan146147Create a structured plan before executing:148149```150[LITE] {type}/{complexity}: "{task}"151 1. {agent} → {subtask}152 2. {agent} + {agent} → {subtask A} | {subtask B}153 3. {agent} → {review}154```155156Display this plan to the user, then execute.157158### Step 7: Execute159160Use the **execution-orchestrator** skill to dispatch agents according to the plan.161162For each agent dispatch, construct a self-contained prompt that includes:1631. The subtask description1642. Relevant project context from crew-profile.md1653. The Index-First Protocol instructions1664. Injected skill guidance1675. Files the agent should focus on (from index analysis)1686. Expected output format1697. **Note**: In lite mode, if an agent needs to escalate, escalate to vp-engineering (not CEO)170171### Step 8: Collect Results & Report172173After all agents complete:1741. Collect each agent's output1752. Check for conflicts (multiple agents editing same lines)1763. If conflicts: escalate to vp-engineering for resolution (NOT CEO)1774. Auto-update index for all `FILES_MODIFIED` (handled automatically by execution-orchestrator)1785. Log task to `.claude/crew-history.json` (with `"mode": "lite"` flag, including `skillsInjected` and agent details)1796. Report final status to user (including index update status and skills injected)1807. Include skills used in the report — execution-orchestrator's Result Collection template handles the format181182## Error Handling183184- If agent fails → retry once with more context185- If agent reports index is stale → trigger incremental update, then retry186- If parallel agents conflict → fall back to sequential for conflicting files187- If task is unclear → ask user for clarification instead of guessing188- If task complexity exceeds expectations → escalate to vp-engineering (NOT CEO)