code-review-chunk-dispatch
✅ PROMOTED: TDD Cycle 1 (caller-context refactor) + TDD Cycle 2 (Mini-Verify-Fallback pass, S3 Pattern-Mode value-prop confirmed) passed. Auto-discoverable. Polish items from Mini-Verify subagent feedback incorporated: sample definition, counter-thesis depth hierarchy (Critical=mandatory / Important=recommended / Minor=optional), tabular trust-verdict format in fallback, TDD progression as Background label.
STOP — Caller-Context-Check (before anything else)
This skill recommends parallel dispatch via sub-subagents. That presumes: YOU (the caller) have an Agent/Task tool.
Before doing anything else, check:
| Caller check |
Action |
Do I have access to the Agent tool (top-level orchestrator, main Claude session)? |
✓ → continue with ## Pattern (short form) and dispatch |
I do NOT have the Agent tool (e.g., I'm a subagent myself)? |
→ jump to ## Fallback: Sequential-Triage-Mode BELOW. Do not try to force the chunk pattern sequentially. |
Anti-pattern: blindly following the skill and chunking sequentially even though you can't parallel-dispatch — that's worse than natural risk-based triage. Proven by TDD-Test (see ## TDD progression below): GREEN subagent without Agent-tool produced WORSE result (1 instead of 4 Critical findings, +70% wallclock) through forced chunking than a baseline subagent without skill that applied natural risk-based triage.
Rationalization trap:
| Rationalization |
Reality |
| "The skill says chunk, so I chunk sequentially" |
The skill presumes PARALLEL dispatch. Sequential chunking does NOT deliver the skill's promise, but has the overhead. |
| "My caller surely has Agent-tool, I'm a code-reviewer after all" |
Check it. If Agent-tool not in your tool-set → you are a subagent. |
| "A bit of chunking is better than none" |
Wrong. Risk-based triage without artificial chunks is better documented (see fallback). |
| "The caller wants to see chunks" |
The caller wants good bugs. Coverage-disclosure in the report is more transparent than chunk-theater. |
Pattern (short form)
When the code-review-backlog is large (heuristic: >30 commits OR >5,000 LoC OR >4 weeks without review):
- Measure scope reality —
git log --since, git diff --stat, commit count
- Identify thematic chunks — ≤15 commits per chunk, ≤6 chunks total covering high-stake-recent-work, tail (old + less time-critical) as a separate backlog block
- Determine per-chunk a BASE_SHA / HEAD_SHA range with
git rev-parse <sha>~1 for inclusive starts
- Parallel dispatch in a single message block with multiple Agent-tool invocations (NOT sequentially — wastes wallclock)
- Aggregate findings by Critical / Important / Minor + chunk-trust assessment (Acceptable / Acceptable-with-fixes / Rollback-suggested)
Fallback: Sequential-Triage-Mode (when you have NO Agent-tool)
You landed here because the caller-context check above showed: you can't parallel-dispatch. DON'T chunk, do risk-based triage:
- Measure scope as above (
git log --since, git diff --stat, commit count) — still required for reporting
- Identify risk domains instead of thematic chunks:
| Domain |
Content |
Read depth |
| HIGHEST |
Money-path (trading logic, payments, auth, live persistence, order execution) |
Full-text read of all touched files |
| HIGH |
Adjacent to money-path (notifications, schedulers, background jobs, ML inference, DB migrations) |
Full-text read of diff-relevant files |
| MEDIUM |
Operations / UI / cockpit |
Sample = at least core methods (entry points + public API) of each diff-relevant file, plus targeted grep passes for suspected anti-patterns. Files <200 LoC completely. |
| LOW |
Tests, docs, templates, legacy moves, config reshuffles |
Skim via commit messages + git diff --stat, not line-by-line. Sample only when test logic backstops a Critical fix. |
- Targeted grep passes for domain-typical anti-patterns (e.g.
_load_* 2x in the same statement, direction.*==.*"LONG" for casing drift, cur.execute.*UPDATE.*WHERE without rowcount check)
- Findings by severity as in the main pattern (Critical / Important / Minor)
- Counter-thesis check:
- Critical → MANDATORY: can the bug have another explanation? Is the diagnosis backed by code/schema/log?
- Important → RECOMMENDED: for non-obvious findings explicitly write out counter-thesis
- Minor → OPTIONAL: only when reviewer is uncertain
- EXPLICIT-COVERAGE-DISCLOSURE in the report — mandatory:
- Which files / modules did I read COMPLETELY?
- Which did I sample?
- Which did I NOT read?
- That way the caller knows what the review does NOT cover → can specifically request more.
Why not artificial chunking? Without parallel dispatch, chunking is pure-overhead — it forces you to allow less depth per chunk, without delivering the throughput advantage. Risk-based triage scales better on single-threaded and delivered more Critical findings in the RED-S1-Test than the forced sequential chunking in the GREEN-S1-Test.
Output format for fallback mode (same as main pattern, plus coverage-disclosure + tabular verdict):
## Approach
[Risk-based triage, which domain tiers were read at what depth]
## Coverage-Disclosure
Fully read: [list of files]
Sample (core methods + grep): [list]
Not read: [list or domain description]
## Findings
### Critical (each with counter-thesis check)
### Important (with counter-thesis check for non-obvious)
### Minor
## Trust-Verdict (tabular, one row per domain)
| Domain | Read depth | Verdict |
|---|---|---|
| HIGHEST | Full text | Acceptable / Acceptable-with-fixes / Patch-immediately |
| HIGH | Full text (diff-relevant) | ... |
| MEDIUM | Sample | ... |
| LOW | Skim | (usually: Acceptable) |
## Recommendation
IMMEDIATELY / IN backlog / TRIVIAL — what when?
Concrete example
Scope snapshot: 246 commits over 4 weeks, 287 files, +44,872 / -1,492 LoC.
Single-subagent attempt would have failed: 44k lines diff exceed context limit. Even if not: output would be "code looks OK, some TODOs present" — generic, no finding-value.
Chunk split:
| Chunk |
Range |
Commits |
Theme |
Risk |
| A |
5e5dd37..9a2cecb |
4 |
Today's dashboard bug + charts + race-fix |
medium |
| B |
1b32427..5e5dd37 |
13 |
Yesterday's cockpit Phase B + Phase A refactor |
high (production-deployed) |
| C |
344671a..44c2e09 |
9 |
Setup detector + ML / strategic |
very high (live production) |
| D |
44c2e09..1b32427 |
4 |
Telegram bot + dashboard SSD |
high |
| E |
<base>..04fb03e |
~216 |
Tail (older work) |
unknown, low (old) |
→ Chunks A-D = 30 commits = ~12% of backlog, but 100% of high-stake-recent work. Chunk E documented as a separate backlog item.
Parallel dispatch in a single message block:
<function_calls>
<Agent description="Review Chunk A" prompt="...">...</Agent>
<Agent description="Review Chunk B" prompt="...">...</Agent>
<Agent description="Review Chunk C" prompt="...">...</Agent>
<Agent description="Review Chunk D" prompt="...">...</Agent>
</function_calls>
Wallclock: 10-15 min for all 4. If sequential: 40-60 min for the same output quality.
Aggregation:
- 3 Critical (all in Chunk C — production logic)
- 11 Important across all 4 chunks
- Various Minor per chunk
- Chunk trust assessment: A=Acceptable, B-D=Acceptable-with-fixes, C additionally "patch-immediately" due to Critical
Chunk strategies (which chunks?)
| Strategy |
When |
| Thematic (Cockpit, ML, Bot) |
When commits are clearly grouped by feature themes |
| Chronological (per week, per sprint) |
When no clear themes — fallback |
| Path-based (per subdir or module) |
For very large monorepos |
Critical-files-first (security/, payments/, Auth) |
For stake differentiation |
Heuristic: theme clusters are better than purely chronological chunks, because the reviewer subagent can then assess coherent logic (e.g. "this refactor + this test + this migration") instead of scattered commits.
Subagent prompt template per chunk
Each subagent receives:
- Repo path (absolute path, because subagent has no conversation context)
- Chunk description: what was built (1 paragraph)
- Plan/requirements pointer: Daily-Note + spec files (subagent can read them)
- SHA range: BASE_SHA + HEAD_SHA with example
git diff commands
- Review checklist from
superpowers:requesting-code-review/code-reviewer.md:
- Plan alignment
- Code quality (separation-of-concerns, error-handling, type-safety, edge-cases)
- Architecture (security, scalability, integration)
- Testing (real-behavior vs mocks, edge-cases, integration)
- Production-readiness (migrations, backward-compat, docs)
- Domain-specific lenses (e.g. "check display-name maxim", "check numeric-value verification")
- Output format: Strengths + Issues by Severity + Recommendations + Assessment Verdict
Aggregation pattern
After parallel dispatch you have 4 structures. Aggregation:
- Critical collection list across all chunks (sorted by risk impact)
- Important collection list grouped by chunk
- Minor collection list compact (1-liner per item)
- Trust table per chunk with verdict
- Top recommendation: which items IMMEDIATELY (Critical), which IN backlog (Important), which TRIVIAL (Minor)
Anti-patterns
- ❌ Single subagent for 200+ commits — output is generic
- ❌ Sequential subagent dispatches (40 min instead of 10) — no wallclock savings
- ❌ Chunks with overlapping SHA ranges — same commits get double-reviewed, findings duplicated
- ❌ Ignore tail-chunk without backlog entry — falls through the cracks tomorrow
- ❌ Don't aggregate findings, show 4 separate reports — user has to synthesize themselves, loses overview
- ❌ Subagent prompts without repo path (subagent has no conversation context, doesn't know where the code is)
Background: TDD progression (Bulletproofing log)
This section is history + design-decision rationale, NOT instruction for the executing caller. Caller follows the sections above (STOP, Pattern, Fallback).
Cycle 1 — Insight: Caller-Context-Mismatch
RED-S1 (general-purpose subagent, repo: production app, range: 200 commits / 231 files / +33,009 LoC, skill explicitly forbidden):
- Subagent spontaneously chose risk-based triage (domain tiers HIGHEST/HIGH/MEDIUM/LOW)
- Result: 4 Critical / 9 Important / 6 Minor with file:line precision
- Wallclock: 334 s | Tokens: 213k | Tool-uses: 43
- Including counter-thesis check per Critical, honest coverage-disclosure
- Note at the end: "skill exists per CLAUDE.md, but was forbidden to me" → CLAUDE.md mention is a confounder, should be temporarily masked for clean tests
GREEN-S1 (general-purpose subagent, same scope, skill directive: "load & use"):
- Subagent loaded the skill, but could NOT execute parallel dispatch (subagent has no Agent tool)
- Fallback to forced sequential chunking (6 chunks A-F)
- Result: 1 Critical (+re-verification of today's fixes) / 7 Important / 5 Minor
- Wallclock: 566 s (+70%) | Tokens: 134k (-37%) | Tool-uses: 54
- Meta-awareness bonus: recognized "today's commits are themselves code-review fixes, I'm reviewing re-reviews"
- Output objectively WORSE than RED for bug discovery (1 vs 4 Critical) despite consuming more wallclock time
Skill design bug discovered: caller-context-mismatch. Skill implicitly presumes the caller has Agent tool. With subagent-caller without Agent tool, chunking is pure overhead and blocks natural risk-based triage.
Refactor applied (R1+R2+R3):
- R1 (caller-context guard): new STOP section at the very top, subagent check before everything else
- R2 (Fallback mode): new section "Sequential-Triage-Mode" with risk-based-triage template for non-dispatch callers
- R3 (description filter): description extended with "AND caller has Agent/Task-tool" + Do-NOT-load for subagent-caller (removes at the same time the description-trap of the workflow-summary)
Cycle 2 — Mini-Verify-Fallback pass + S3 Pattern-Mode value-prop confirmed
Mini-Verify RED (general-purpose subagent, 35 commits, skill directive "load & use"):
- Subagent read STOP section FIRST, recognized missing Agent tool, jumped to fallback mode (explicitly documented in skill self-reflection)
- Risk-based triage applied, 2 Critical (real bugs) / 7 Important / 7 Minor in 380s / 255k tokens
- Coverage disclosure as own section, counter-thesis check per Critical
- R1-guard works. R2-fallback-mode works. R3-description filters correctly.
- Subagent returned 4 constructive polish hints (incorporated: sample definition, counter-thesis depth hierarchy, tabular trust-verdict in fallback, TDD progression as Background label)
S3 Pattern-Mode value-prop test (top-level caller with Agent tool, 80 commits, 5 chunks A-E dispatched in parallel):
- Wallclock: 488s parallel vs ~1500s sequential-estimated = 3x speedup
- Tokens: 581k total (5 chunks). Per finding: 10.4k vs 16k single-subagent = 38% efficiency win
- Findings: 10 Critical / 20 Important / 27 Minor
- of which 6 truly-NEW Critical (4 IMMEDIATE items in production app)
- 4 Critical confirmed-already-fixed via cross-chunk triangulation (Chunk C + E confirm each other)
- Coverage depth: each chunk read touched files FULLY (Chunk A: 632 LoC v3_live_monitor.py + 456 LoC tests)
- Trust verdicts per chunk: A=Acceptable-with-fixes, B=Acceptable-with-fixes, C=Confirmed-fixed-in-follow-ups, D=Acceptable-with-C1-fix, E=HIGH-Trust for Critical fixes
Test limitation documented: S2 (Grayzone threshold loophole) + S3-Time-Pressure-Loophole-Test are not cleanly executable with the current test environment — subagents have no Agent tool (Pattern Mode not executable), top-level caller (main Claude) is biased in the test setup by skill-design knowledge. Pending for future tests in "naive" sessions without skill-design context.
Status: PROMOTED. Skill is auto-discoverable and productively usable.
Cross-references
superpowers:requesting-code-review — base skill for single review (chunk-dispatch is its multi-skill counterpart)
superpowers:dispatching-parallel-agents — pattern base for parallel subagent dispatch
core-memories.md "Code review must become standard" — meta-maxim that demands regular reviews; chunk-dispatch is the remedy when the maxim has been broken for a while
post-session-skill-review — what to do after a successful chunk review (extract skill candidates from findings)
Real-world impact
User push-back at 09:30: "complete code-review, hasn't been done for weeks."
- Scope measurement: 246 commits / 287 files / +44k LoC
- Single-subagent attempt would fail (context + generic output)
- Chunk strategy: 4 chunks (A-D) parallel, ~10 min wallclock
- Output: 4 detailed reports with 3 Critical (live production), 11 Important, various Minor
- Follow-up session: 8 of 9 follow-up tasks completed, all Critical bugs eliminated, all user-visible bugs fixed
- Time-to-value: without chunk strategy this would not have been doable in one session, Critical bugs would have stayed under the radar
1---2name: code-review-chunk-dispatch3description: Use when the code-review-backlog is large (>30 commits OR >5,000 LoC changed since last review) AND the caller has Agent/Task-tool dispatch capability (.e., top-level orchestrator or main Claude session). Trigger on phrases like "code-review backlog is big", "no review for weeks", "many commits without review", "review of 100+ commits", "how do I review these 200 commits", "chunk review", "parallel code-reviewer subagents". Do NOT load for single-PR review (use superpowers:requesting-code-review directly), for <30-commit backlog (single subagent suffices), for non-Git codebases (chunking-by-SHA-range presumes git workflow), or when running as a subagent yourself without Agent-tool access (the chunk-dispatch pattern is then unexecutable — use risk-based-triage instead, documented in the skill's Fallback section). Complements (sub-of) `superpowers:requesting-code-review` and `superpowers:dispatching-parallel-agents`.4---56# code-review-chunk-dispatch78> ✅ **PROMOTED**: TDD Cycle 1 (caller-context refactor) + TDD Cycle 2 (Mini-Verify-Fallback pass, S3 Pattern-Mode value-prop confirmed) passed. Auto-discoverable. Polish items from Mini-Verify subagent feedback incorporated: sample definition, counter-thesis depth hierarchy (Critical=mandatory / Important=recommended / Minor=optional), tabular trust-verdict format in fallback, TDD progression as Background label.910## STOP — Caller-Context-Check (before anything else)1112This skill recommends **parallel dispatch via sub-subagents**. That presumes: **YOU (the caller) have an `Agent`/`Task` tool**.1314**Before doing anything else, check**:1516| Caller check | Action |17|---|---|18| Do I have access to the `Agent` tool (top-level orchestrator, main Claude session)? | ✓ → continue with `## Pattern (short form)` and dispatch |19| I do NOT have the `Agent` tool (e.g., I'm a subagent myself)? | → jump to `## Fallback: Sequential-Triage-Mode` BELOW. **Do not try to force the chunk pattern sequentially.** |2021**Anti-pattern**: blindly following the skill and chunking sequentially even though you can't parallel-dispatch — that's **worse** than natural risk-based triage. Proven by TDD-Test (see `## TDD progression` below): GREEN subagent without Agent-tool produced WORSE result (1 instead of 4 Critical findings, +70% wallclock) through forced chunking than a baseline subagent without skill that applied natural risk-based triage.2223**Rationalization trap**:2425| Rationalization | Reality |26|---|---|27| "The skill says chunk, so I chunk sequentially" | The skill presumes PARALLEL dispatch. Sequential chunking does NOT deliver the skill's promise, but has the overhead. |28| "My caller surely has Agent-tool, I'm a code-reviewer after all" | Check it. If `Agent`-tool not in your tool-set → you are a subagent. |29| "A bit of chunking is better than none" | Wrong. Risk-based triage without artificial chunks is better documented (see fallback). |30| "The caller wants to see chunks" | The caller wants good bugs. Coverage-disclosure in the report is more transparent than chunk-theater. |3132## Pattern (short form)3334When the code-review-backlog is large (heuristic: >30 commits OR >5,000 LoC OR >4 weeks without review):35361. **Measure scope reality** — `git log --since`, `git diff --stat`, commit count372. **Identify thematic chunks** — ≤15 commits per chunk, ≤6 chunks total covering high-stake-recent-work, tail (old + less time-critical) as a separate backlog block383. **Determine per-chunk a BASE_SHA / HEAD_SHA range** with `git rev-parse <sha>~1` for inclusive starts394. **Parallel dispatch** in a single message block with multiple Agent-tool invocations (NOT sequentially — wastes wallclock)405. **Aggregate** findings by Critical / Important / Minor + chunk-trust assessment (Acceptable / Acceptable-with-fixes / Rollback-suggested)4142## Fallback: Sequential-Triage-Mode (when you have NO Agent-tool)4344You landed here because the caller-context check above showed: you can't parallel-dispatch. **DON'T chunk**, do risk-based triage:45461. **Measure scope** as above (`git log --since`, `git diff --stat`, commit count) — still required for reporting472. **Identify risk domains** instead of thematic chunks:4849| Domain | Content | Read depth |50|---|---|---|51| HIGHEST | Money-path (trading logic, payments, auth, live persistence, order execution) | Full-text read of all touched files |52| HIGH | Adjacent to money-path (notifications, schedulers, background jobs, ML inference, DB migrations) | Full-text read of diff-relevant files |53| MEDIUM | Operations / UI / cockpit | **Sample = at least core methods (entry points + public API) of each diff-relevant file, plus targeted grep passes for suspected anti-patterns. Files <200 LoC completely.** |54| LOW | Tests, docs, templates, legacy moves, config reshuffles | Skim via commit messages + `git diff --stat`, not line-by-line. Sample only when test logic backstops a Critical fix. |55563. **Targeted grep passes** for domain-typical anti-patterns (e.g. `_load_*` 2x in the same statement, `direction.*==.*"LONG"` for casing drift, `cur.execute.*UPDATE.*WHERE` without `rowcount` check)574. **Findings by severity** as in the main pattern (Critical / Important / Minor)585. **Counter-thesis check**: 59 - **Critical → MANDATORY**: can the bug have another explanation? Is the diagnosis backed by code/schema/log?60 - **Important → RECOMMENDED**: for non-obvious findings explicitly write out counter-thesis61 - **Minor → OPTIONAL**: only when reviewer is uncertain626. **EXPLICIT-COVERAGE-DISCLOSURE in the report — mandatory**:63 - Which files / modules did I read COMPLETELY?64 - Which did I sample?65 - Which did I NOT read?66 - That way the caller knows what the review does NOT cover → can specifically request more.6768**Why not artificial chunking?** Without parallel dispatch, chunking is pure-overhead — it forces you to allow less depth per chunk, without delivering the throughput advantage. Risk-based triage scales better on single-threaded and delivered more Critical findings in the RED-S1-Test than the forced sequential chunking in the GREEN-S1-Test.6970**Output format for fallback mode** (same as main pattern, plus coverage-disclosure + tabular verdict):71```72## Approach73[Risk-based triage, which domain tiers were read at what depth]7475## Coverage-Disclosure76Fully read: [list of files]77Sample (core methods + grep): [list]78Not read: [list or domain description]7980## Findings81### Critical (each with counter-thesis check)82### Important (with counter-thesis check for non-obvious)83### Minor8485## Trust-Verdict (tabular, one row per domain)86| Domain | Read depth | Verdict |87|---|---|---|88| HIGHEST | Full text | Acceptable / Acceptable-with-fixes / Patch-immediately |89| HIGH | Full text (diff-relevant) | ... |90| MEDIUM | Sample | ... |91| LOW | Skim | (usually: Acceptable) |9293## Recommendation94IMMEDIATELY / IN backlog / TRIVIAL — what when?95```9697## Concrete example9899**Scope snapshot**: 246 commits over 4 weeks, 287 files, +44,872 / -1,492 LoC.100101**Single-subagent attempt would have failed**: 44k lines diff exceed context limit. Even if not: output would be "code looks OK, some TODOs present" — generic, no finding-value.102103**Chunk split**:104105| Chunk | Range | Commits | Theme | Risk |106|-------|-------|---------|-------|------|107| A | `5e5dd37..9a2cecb` | 4 | Today's dashboard bug + charts + race-fix | medium |108| B | `1b32427..5e5dd37` | 13 | Yesterday's cockpit Phase B + Phase A refactor | high (production-deployed) |109| C | `344671a..44c2e09` | 9 | Setup detector + ML / strategic | very high (live production) |110| D | `44c2e09..1b32427` | 4 | Telegram bot + dashboard SSD | high |111| E | `<base>..04fb03e` | ~216 | Tail (older work) | unknown, low (old) |112113→ Chunks A-D = 30 commits = ~12% of backlog, but 100% of high-stake-recent work. Chunk E documented as a separate backlog item.114115**Parallel dispatch** in a single message block:116```117<function_calls>118 <Agent description="Review Chunk A" prompt="...">...</Agent>119 <Agent description="Review Chunk B" prompt="...">...</Agent>120 <Agent description="Review Chunk C" prompt="...">...</Agent>121 <Agent description="Review Chunk D" prompt="...">...</Agent>122</function_calls>123```124125Wallclock: 10-15 min for all 4. If sequential: 40-60 min for the same output quality.126127**Aggregation**:128- 3 Critical (all in Chunk C — production logic)129- 11 Important across all 4 chunks130- Various Minor per chunk131- Chunk trust assessment: A=Acceptable, B-D=Acceptable-with-fixes, C additionally "patch-immediately" due to Critical132133## Chunk strategies (which chunks?)134135| Strategy | When |136|---|---|137| **Thematic** (Cockpit, ML, Bot) | When commits are clearly grouped by feature themes |138| **Chronological** (per week, per sprint) | When no clear themes — fallback |139| **Path-based** (per subdir or module) | For very large monorepos |140| **Critical-files-first** (`security/`, `payments/`, Auth) | For stake differentiation |141142**Heuristic**: theme clusters are better than purely chronological chunks, because the reviewer subagent can then assess coherent logic (e.g. "this refactor + this test + this migration") instead of scattered commits.143144## Subagent prompt template per chunk145146Each subagent receives:147- **Repo path** (absolute path, because subagent has no conversation context)148- **Chunk description**: what was built (1 paragraph)149- **Plan/requirements pointer**: Daily-Note + spec files (subagent can read them)150- **SHA range**: BASE_SHA + HEAD_SHA with example `git diff` commands151- **Review checklist** from `superpowers:requesting-code-review/code-reviewer.md`:152 - Plan alignment153 - Code quality (separation-of-concerns, error-handling, type-safety, edge-cases)154 - Architecture (security, scalability, integration)155 - Testing (real-behavior vs mocks, edge-cases, integration)156 - Production-readiness (migrations, backward-compat, docs)157- **Domain-specific lenses** (e.g. "check display-name maxim", "check numeric-value verification")158- **Output format**: Strengths + Issues by Severity + Recommendations + Assessment Verdict159160## Aggregation pattern161162After parallel dispatch you have 4 structures. Aggregation:1631. **Critical collection list** across all chunks (sorted by risk impact)1642. **Important collection list** grouped by chunk1653. **Minor collection list** compact (1-liner per item)1664. **Trust table** per chunk with verdict1675. **Top recommendation**: which items IMMEDIATELY (Critical), which IN backlog (Important), which TRIVIAL (Minor)168169## Anti-patterns170171- ❌ Single subagent for 200+ commits — output is generic172- ❌ Sequential subagent dispatches (40 min instead of 10) — no wallclock savings173- ❌ Chunks with overlapping SHA ranges — same commits get double-reviewed, findings duplicated174- ❌ Ignore tail-chunk without backlog entry — falls through the cracks tomorrow175- ❌ Don't aggregate findings, show 4 separate reports — user has to synthesize themselves, loses overview176- ❌ Subagent prompts without repo path (subagent has no conversation context, doesn't know where the code is)177178## Background: TDD progression (Bulletproofing log)179180> This section is history + design-decision rationale, NOT instruction for the executing caller. Caller follows the sections above (STOP, Pattern, Fallback).181182### Cycle 1 — Insight: Caller-Context-Mismatch183184**RED-S1** (general-purpose subagent, repo: production app, range: 200 commits / 231 files / +33,009 LoC, skill explicitly forbidden):185- Subagent spontaneously chose **risk-based triage** (domain tiers HIGHEST/HIGH/MEDIUM/LOW)186- Result: **4 Critical / 9 Important / 6 Minor** with file:line precision187- Wallclock: 334 s | Tokens: 213k | Tool-uses: 43188- Including counter-thesis check per Critical, honest coverage-disclosure189- Note at the end: "skill exists per CLAUDE.md, but was forbidden to me" → CLAUDE.md mention is a confounder, should be temporarily masked for clean tests190191**GREEN-S1** (general-purpose subagent, same scope, skill directive: "load & use"):192- Subagent loaded the skill, **but could NOT execute parallel dispatch** (subagent has no Agent tool)193- Fallback to **forced sequential chunking** (6 chunks A-F)194- Result: **1 Critical (+re-verification of today's fixes) / 7 Important / 5 Minor**195- Wallclock: 566 s (+70%) | Tokens: 134k (-37%) | Tool-uses: 54196- Meta-awareness bonus: recognized "today's commits are themselves code-review fixes, I'm reviewing re-reviews"197- **Output objectively WORSE than RED** for bug discovery (1 vs 4 Critical) despite consuming more wallclock time198199**Skill design bug discovered**: caller-context-mismatch. Skill implicitly presumes the caller has Agent tool. With subagent-caller without Agent tool, chunking is pure overhead and blocks natural risk-based triage.200201**Refactor applied** (R1+R2+R3):202- **R1** (caller-context guard): new STOP section at the very top, subagent check before everything else203- **R2** (Fallback mode): new section "Sequential-Triage-Mode" with risk-based-triage template for non-dispatch callers204- **R3** (description filter): description extended with "AND caller has Agent/Task-tool" + Do-NOT-load for subagent-caller (removes at the same time the description-trap of the workflow-summary)205206### Cycle 2 — Mini-Verify-Fallback pass + S3 Pattern-Mode value-prop confirmed207208**Mini-Verify RED** (general-purpose subagent, 35 commits, skill directive "load & use"):209- Subagent read STOP section FIRST, recognized missing Agent tool, jumped to fallback mode (explicitly documented in skill self-reflection)210- Risk-based triage applied, **2 Critical (real bugs) / 7 Important / 7 Minor** in 380s / 255k tokens211- Coverage disclosure as own section, counter-thesis check per Critical212- R1-guard works. R2-fallback-mode works. R3-description filters correctly.213- Subagent returned 4 constructive polish hints (incorporated: sample definition, counter-thesis depth hierarchy, tabular trust-verdict in fallback, TDD progression as Background label)214215**S3 Pattern-Mode value-prop test** (top-level caller with Agent tool, 80 commits, 5 chunks A-E dispatched in parallel):216- Wallclock: **488s parallel** vs ~1500s sequential-estimated = **3x speedup**217- Tokens: 581k total (5 chunks). Per finding: **10.4k vs 16k single-subagent = 38% efficiency win**218- Findings: **10 Critical / 20 Important / 27 Minor**219 - of which **6 truly-NEW Critical** (4 IMMEDIATE items in production app)220 - 4 Critical confirmed-already-fixed via cross-chunk triangulation (Chunk C + E confirm each other)221- Coverage depth: each chunk read touched files FULLY (Chunk A: 632 LoC v3_live_monitor.py + 456 LoC tests)222- Trust verdicts per chunk: A=Acceptable-with-fixes, B=Acceptable-with-fixes, C=Confirmed-fixed-in-follow-ups, D=Acceptable-with-C1-fix, E=**HIGH-Trust for Critical fixes**223224**Test limitation documented**: S2 (Grayzone threshold loophole) + S3-Time-Pressure-Loophole-Test are not cleanly executable with the current test environment — subagents have no Agent tool (Pattern Mode not executable), top-level caller (main Claude) is biased in the test setup by skill-design knowledge. Pending for future tests in "naive" sessions without skill-design context.225226**Status**: PROMOTED. Skill is auto-discoverable and productively usable.227228## Cross-references229230- `superpowers:requesting-code-review` — base skill for single review (chunk-dispatch is its multi-skill counterpart)231- `superpowers:dispatching-parallel-agents` — pattern base for parallel subagent dispatch232- `core-memories.md` "Code review must become standard" — meta-maxim that demands regular reviews; chunk-dispatch is the remedy when the maxim has been broken for a while233- `post-session-skill-review` — what to do after a successful chunk review (extract skill candidates from findings)234235## Real-world impact236237User push-back at 09:30: "complete code-review, hasn't been done for weeks."238- Scope measurement: 246 commits / 287 files / +44k LoC239- Single-subagent attempt would fail (context + generic output)240- Chunk strategy: 4 chunks (A-D) parallel, ~10 min wallclock241- Output: 4 detailed reports with 3 Critical (live production), 11 Important, various Minor242- Follow-up session: 8 of 9 follow-up tasks completed, all Critical bugs eliminated, all user-visible bugs fixed243- **Time-to-value**: without chunk strategy this would not have been doable in one session, Critical bugs would have stayed under the radar