|
| 1 | +--- |
| 2 | +name: cavecrew |
| 3 | +description: > |
| 4 | + Decision guide for delegating to caveman-style subagents. Tells the main |
| 5 | + thread WHEN to spawn `cavecrew-investigator` (locate code), `cavecrew-builder` |
| 6 | + (1-2 file edit), or `cavecrew-reviewer` (diff review) instead of doing the |
| 7 | + work inline or using vanilla `Explore`. Subagent output is caveman-compressed |
| 8 | + so the tool-result injected back into main context is ~60% smaller — main |
| 9 | + context lasts longer across long sessions. |
| 10 | + Trigger: "delegate to subagent", "use cavecrew", "spawn investigator/builder/reviewer", |
| 11 | + "save context", "compressed agent output". |
| 12 | +--- |
| 13 | + |
| 14 | +Cavecrew = three subagent presets that emit caveman output. Same job as Anthropic defaults (`Explore`, edit-style agents, reviewer); difference is the tool-result they return is compressed, so main context shrinks per delegation. |
| 15 | + |
| 16 | +## When to use cavecrew vs alternatives |
| 17 | + |
| 18 | +| Task | Use | |
| 19 | +|---|---| |
| 20 | +| "Where is X defined / what calls Y / list uses of Z" | `cavecrew-investigator` | |
| 21 | +| Same but you also want suggestions/architecture commentary | `Explore` (vanilla) | |
| 22 | +| Surgical edit, ≤2 files, scope obvious | `cavecrew-builder` | |
| 23 | +| New feature / 3+ files / cross-cutting refactor | Main thread or `feature-dev:code-architect` | |
| 24 | +| Review diff, branch, or file for bugs | `cavecrew-reviewer` | |
| 25 | +| Deep code review with rationale + alternatives | `Code Reviewer` (vanilla) | |
| 26 | +| One-line answer you already know | Main thread, no subagent | |
| 27 | + |
| 28 | +Rule of thumb: **if you'd want the subagent's output in 1/3 the tokens, pick cavecrew. If you'd want prose, pick vanilla.** |
| 29 | + |
| 30 | +## Why this exists (the real win) |
| 31 | + |
| 32 | +Subagent tool results get injected into main context verbatim. A vanilla `Explore` that returns 2k tokens of prose costs 2k tokens of main-context budget every time. The same finding from `cavecrew-investigator` returns ~700 tokens. Across 20 delegations in one session that's the difference between context exhaustion and finishing the task. |
| 33 | + |
| 34 | +## Output contracts |
| 35 | + |
| 36 | +What main thread can rely on per agent: |
| 37 | + |
| 38 | +**`cavecrew-investigator`** |
| 39 | +``` |
| 40 | +<Header>: |
| 41 | +- path:line — `symbol` — short note |
| 42 | +totals: <counts>. |
| 43 | +``` |
| 44 | +Or `No match.` Always file-path-first, line-number-attached, backticked symbols. Safe to grep with `path:\d+`. |
| 45 | + |
| 46 | +**`cavecrew-builder`** |
| 47 | +``` |
| 48 | +<path:line-range> — <change ≤10 words>. |
| 49 | +verified: <re-read OK | mismatch @ path:line>. |
| 50 | +``` |
| 51 | +Or one of: `too-big.` / `needs-confirm.` / `ambiguous.` / `regressed.` (terminal first token). |
| 52 | + |
| 53 | +**`cavecrew-reviewer`** |
| 54 | +``` |
| 55 | +path:line: <emoji> <severity>: <problem>. <fix>. |
| 56 | +totals: N🔴 N🟡 N🔵 N❓ |
| 57 | +``` |
| 58 | +Or `No issues.` Findings sorted file → line ascending. |
| 59 | + |
| 60 | +## Chaining patterns |
| 61 | + |
| 62 | +**Locate → fix → verify** (most common): |
| 63 | +1. `cavecrew-investigator` returns site list. |
| 64 | +2. Main thread picks 1-2 sites, hands paths to `cavecrew-builder`. |
| 65 | +3. `cavecrew-reviewer` audits the diff. |
| 66 | + |
| 67 | +**Parallel scout** (when investigation is broad): |
| 68 | +Spawn 2-3 `cavecrew-investigator` calls in one message (different angles: defs vs callers vs tests). Aggregate in main thread. |
| 69 | + |
| 70 | +**Single-shot edit** (when site is already known): |
| 71 | +Skip investigator. Hand exact path:line to `cavecrew-builder` directly. |
| 72 | + |
| 73 | +## What NOT to do |
| 74 | + |
| 75 | +- Don't use `cavecrew-builder` when you don't already know the file. Spawn investigator first or main thread will eat tokens passing context. |
| 76 | +- Don't chain `cavecrew-investigator → cavecrew-builder` for a 5-file refactor. Builder will return `too-big.` and you'll have wasted a turn. |
| 77 | +- Don't ask `cavecrew-reviewer` for "general feedback" — it returns findings only, no architecture opinions. Use `Code Reviewer` for that. |
| 78 | +- Don't expect prose. Cavecrew output is structured, sometimes terse to the point of cryptic. If a human will read it directly, paraphrase. |
| 79 | + |
| 80 | +## Auto-clarity (inherited) |
| 81 | + |
| 82 | +Subagents drop caveman → normal English for security warnings, irreversible-action confirmations, and any output where fragment ambiguity could be misread. Resume caveman after. |
0 commit comments