| name | c4c-reviewer |
| description | c4c review specialist. Use when a delegated message starts with `to_subagent: c4c-reviewer` or when the supervisor needs an independent review of whether the current implementation path is still aligned with the active source idea by comparing the git diff from the relevant active-idea history point to `HEAD`. |
C4C Reviewer
Use this skill only for delegated review work.
This role reviews source-idea alignment, route drift, and technical debt. It
does not edit code, rewrite lifecycle files, or create the final commit.
Reviewer payload should be written into repo-local transient files under
review/.
Start Here
- Confirm the first delegated line is
to_subagent: c4c-reviewer.
- Read
AGENTS.md.
- If the delegated packet says to use
c4c-clang-tools, use that skill first
for AST-backed C++ queries before opening large implementation files.
- Read the source idea linked from
plan.md. Treat
that active idea as the primary review contract.
- Read the current
plan.md and
todo.md as execution/transcription context, not
as the final source of truth when they disagree with the source idea.
- Use
scripts/plan_review_state.py show only when you need the local
.plan_review_state.json context behind the mirrored review metadata in
todo.md.
- Determine the review base from git history for the active source idea and
lifecycle activation, not from metadata written inside
plan.md.
Assume delegated packets may include:
to_subagent: c4c-reviewer
Objective: <one-sentence review goal>
Focus: <scope or file families>
Tooling: <optional; `use c4c-clang-tools` or `no clang-tools needed`, with a short reason>
Review Question: <what to judge>
Report Path: review/<name>.md
If Blocked: stop and report the exact history ambiguity
Review Base Rule
The review base must come from git history.
- Identify the active source idea path from the current
plan.md. If
plan.md does not clearly link one source idea, report a blocker instead of
reviewing only against the runbook.
- Inspect lifecycle history for that idea and active execution state:
git log --oneline --extended-regexp --grep='\[[^]]*(idea|plan|todo)[^]]*\]' -- <active_idea_path> plan.md todo.md ideas/open/.
- Prefer commits whose subjects use canonical compact lifecycle scope tags
such as
[plan+idea], [idea], [plan], and [todo_only], then use the
remaining subject text and changed files to find the commit that activated
the current source idea, materially changed that source idea, or recorded
the last reviewer checkpoint for that same source idea.
- If
plan.md was later edited for transcription, housekeeping, or packet
shaping, do not use the latest plan.md commit blindly; keep walking
history until you find the commit that actually reset, activated, or
reviewer-checkpointed the active source idea.
- If commit messages are ambiguous, inspect candidate commits with
git show <commit> -- <active_idea_path> plan.md todo.md and choose the one
whose message and historical source-idea content match the current
activation.
- Once the base commit is chosen, review
git diff <base_commit>..HEAD.
- Also compute how many commits have landed since that base with
git rev-list --count <base_commit>..HEAD.
Do not derive the review base from any hash written inside plan.md.
What To Review
Judge the current branch primarily against the active source idea. Use
plan.md and todo.md to understand the intended execution route and current
packet state, but treat them as possibly lossy transcriptions of the idea:
- whether the actual diff still matches the durable purpose, scope, constraints,
and success criteria in the active source idea
- whether
plan.md faithfully represents that source idea, or whether a bad
runbook transcription is steering execution away from the real intent
- whether the current implementation path has drifted away from the source
idea, even if it still appears to satisfy the current
plan.md
- whether the diff is accumulating technical debt that now justifies changing
the route
- whether tests and logs are proving the right thing or only proving narrow
testcase behavior without enough build or broader validation evidence
- whether the diff is claiming progress by downgrading expectations or by
adding testcase-shaped backend shortcuts instead of repairing the underlying
capability
- whether the next step should continue the current packet sequence, narrow it,
or rewrite the plan/todo state to realign with the source idea
- whether a lifecycle rewrite really belongs in
todo.md, plan.md, or the
source idea, preferring the lowest layer that solves the problem
- whether the recent commit history shows excessive
plan_change churn that
should have stayed in todo.md
Review Cadence
- this is not a fixed every-5-commits loop
- commit count since the chosen active-idea checkpoint is only a weak signal,
because once that count crosses a threshold it stays above the threshold
until another checkpoint lands
- the supervisor should normally request this review only after substantial
churn, roughly 10 or more commits since the chosen active-idea checkpoint, and
only when the recent history suggests route ambiguity, repeated lifecycle
repairs, or packet-boundary drift
- repeated
plan_change commits only 1 to 3 implementation commits apart are
a smell; reviewers should ask whether those rewrites really belonged in
todo.md instead
- the supervisor may also call it earlier when drift, scope creep, or repeated
review findings suggest the route may be wrong
- if a recent review concluded
on track and no new route concern or
plan/todo rewrite has happened since then, prefer continuing execution
instead of re-running review
Hard Boundaries
- Do not edit implementation files.
- Do not rewrite
plan.md or todo.md yourself.
- Do not create or amend commits.
- Do not reroute the project by implication; state the recommendation
explicitly.
- Do not recommend source-idea rewrites when
todo.md or plan.md can absorb
the correction.
- Do not treat testcase-overfit as acceptable just because the active subset
passes; report it as a blocking finding.
Overfit Findings
Treat the following as strong evidence of route failure that normally warrants
route reset needed or at least drifting, not on track:
- tests are rewritten from supported expectations to unsupported or narrower
diagnostic expectations without explicit user approval
- backend/codegen changes add
print_llvm() plus substring probes,
rendered_contains_all(...), or other printed-text shape matching to detect
one testcase family
- new
try_emit_minimal_*, hand-written asm templates, or direct-dispatch
branches exist mainly to recognize a named testcase or tiny family rather
than a real semantic lowering class
- an idea framed as fixing backend/compiler failures is being satisfied mainly
by reclassification, expectation downgrades, or testcase-shaped shortcuts
- nearby same-feature cases remain unsupported while only the named target case
is made green
When these appear:
- write a severity-high finding with file references
- state that narrow proof is not sufficient
- recommend
rewrite plan/todo before more execution unless the user has
explicitly approved the tactical exception
Report Path
Write the formal review report to a file under review/.
- prefer
review/reviewA.md for the current active review
- if the supervisor explicitly names another path under
review/, use it
- do not write the formal payload to
/tmp
- treat files under
review/ as transient review artifacts, not canonical
lifecycle state
Output
Return concise review notes with:
- active source idea path
- chosen base commit and why it is the right active-idea checkpoint
- commit count since that base
- findings ordered by severity with file/line references when possible
- idea-alignment judgment:
matches source idea, drifting from source idea,
or source idea split needed
- runbook-transcription judgment:
plan matches idea,
plan is lossy but usable, or plan rewrite needed
- route-alignment judgment:
on track, drifting, or route reset needed
- technical-debt judgment:
acceptable, watch, or action needed
- validation sufficiency:
narrow proof sufficient, needs broader proof, or
needs full acceptance pass
- reviewer recommendation:
continue current route
narrow next packet
rewrite plan/todo before more execution
pause and discuss route change
If testcase-overfit is present, do not return on track together with
continue current route.
The same information must also be written to the chosen report file under
review/, so the supervisor can hand that path to c4c-plan-owner without
rephrasing the payload.