一键导入
cvg-code-review
Review implementation against the plan and contract. Distinguish code bugs from contract gaps. Bounded convergence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review implementation against the plan and contract. Distinguish code bugs from contract gaps. Bounded convergence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrate the build loop with split engines - Codex CLI sessions implement and take every first-pass review round while a high-taste Claude design model holds the final exit gate. Use when the user asks for a hybrid, split-model, or cross-model build loop, such as codex implementing with fable as the closer or final reviewer. Claude Code only.
Orchestrate the plan loop with split engines - a high-taste Claude design model drafts and revises the plan while Codex CLI sessions gate it as fresh plan reviewers. Use when the user asks for a hybrid, split-model, or cross-model planning loop, such as fable planning with codex reviewing. Claude Code only.
Orchestrate a monitored implementation loop where a worker implements the plan and fresh code reviewers gate the exit. Use when the user asks to run a supervised implementation or build loop on Codex threads or Claude Code background agents.
Orchestrate a monitored planning loop where a planner drafts the plan and fresh plan reviewers gate the exit. Use when the user asks to create or revise a plan through supervised specialist sessions on Codex threads or Claude Code background agents.
Review a plan against the actual codebase. Verify slices are sufficient, surfaces are complete, and invariants are correct.
Create a plan for the assigned issue. Reads issue scope and codebase, produces a plan document with slices and invariant matrix when the work is cross-cutting.
| name | cvg-code-review |
| description | Review implementation against the plan and contract. Distinguish code bugs from contract gaps. Bounded convergence. |
Review the implementation against the plan. The goal is to verify that the plan's criteria are met and no P0/P1 bugs were introduced.
The task context provides the plan path and the current implementation head. Read the plan, any linked behavior contract, and the diff.
Read project stage guidance from the task context before applying this skill.
For code review, stage affects P1/P2 severity and merge-blocking criteria; contract gaps still block. Stage can calibrate whether missing edge-case resilience is blocking, but it cannot excuse an unmet plan criterion, a missing real surface, or broken error propagation.
Read:
docs/impl-notes/<issue-id>.md, if present; read
this before the diff to understand why the implementation looks the way it doesgit diff <base>..HEAD)Fresh-review evidence boundary: Main reviewer must not consult project memory, prior sessions, rollout summaries, or external history. The repository's own git history (log, blame, commit messages) is repo evidence, not external history. Use only explicit task input, the plan, linked contract, repo-local implementation notes, current diff, repo files read during this review, and test/build output produced in this run. Do not cite memory or include memory citations.
Write a 2-3 line intent summary after reading the plan and implementation notes. This anchors the review.
Intent: Enforce sandbox receipt rejection across all billing entry points.
Must not regress existing production billing flows. Eight surfaces in the
invariant matrix must all pass.
Create a per-review audit directory before dispatching auxiliary reviewers:
RUN_ID=$(date +%Y%m%d-%H%M%S)-$RANDOM
mkdir -p "/tmp/convergo/cvg-code-review/$RUN_ID"
Use this run id for every auxiliary reviewer and for the final review artifact. The artifact directory is the durable audit record for this review run.
Skip this step for Review mode: focused-re-review. Focused re-review is a
scoped check of prior findings plus the repair diff; it must not dispatch
auxiliary reviewers or synthesize inline auxiliary coverage.
Dispatch sub-agent reviewers in parallel with your own step 4 review. Each
reviewer is a skill-local persona under references/personas/.
Always select (both in parallel):
correctness-reviewer - "Review for logic errors, edge cases, state bugs,
error propagation. Intent: . Plan: . Base: ."testing-reviewer - "Review for coverage gaps, weak assertions, brittle
tests. Intent: . Plan: . Base: ."When diff touches auth, public endpoints, user input, permissions, or data handling:
security-reviewer - "Review for security vulnerabilities. Intent:
. Plan: . Base: ."When the diff's failure or abuse consequences are severe — auth, payments, data mutations, external APIs, or wherever your risk read says emergent misuse is plausible:
adversarial-reviewer - "Review for failure scenarios and abuse cases.
Intent: . Plan: . Base: ."When diff touches error handling, retries, timeouts, background jobs, or performance-sensitive paths (hot queries, loops over unbounded data, allocation-heavy code):
reliability-reviewer - "Review for production reliability issues.
Intent: . Plan: . Base: ."Beyond the two always-on lenses, select by the diff's actual risk surface —
size is not a signal. Record the rationale, including lenses considered and
omitted, as the top-level selection_rationale field of review.json —
never inside the auxiliary coverage object, which stays keyed by reviewer
name because literal checkers iterate its entries.
For each selected reviewer:
references/personas/<reviewer-name>.md.subagent_type, or platform-level
custom-agent registration for these reviewer personas.When auxiliary delegation is available, run the relevant reviewers in parallel. If it is not available, perform the same checks yourself.
Final fresh exit mode: When the task says Review mode: final-fresh-exit,
selected auxiliary reviewers must be real generic-subagent dispatches with the
persona prompt. In this mode,
inline auxiliary coverage cannot produce a final exit pass. If any selected
reviewer cannot be dispatched, has a null agent_id, returns
invalid JSON, or fails to write its artifact, set the verdict to Not ready
with a degraded auxiliary coverage finding and state that the review cannot
satisfy the final fresh-exit gate.
Immediately after each dispatch, initialize an auxiliary coverage record for
that reviewer. Record the platform child identifier returned by the dispatch
tool (spawn id, session id, or thread id) in agent_id. If the identifier is
exposed only in a later completion notification, update the coverage record
before writing review.json. If delegation is unavailable, keep the reviewer
in the coverage object with inline or skipped status and a null agent_id.
Auxiliary coverage must be an object keyed by reviewer name. Each reviewer's
artifact lives at <run-dir>/<reviewer-name>.json; do not repeat the path in
the record.
{
"security-reviewer": {
"status": "dispatched | inline | skipped | failed",
"agent_id": "<platform child id: spawn, session, or thread id, or null>",
"artifact_written": true
}
}
Do not collapse selected reviewers to plain status strings. The audit artifact must make it possible to distinguish a real generic-subagent dispatch from an inline fallback with the same reviewer persona.
When dispatching auxiliary reviewers, include the project stage and the
domain-risk override rule in the sub-agent prompt. Include the full content of
references/findings-schema.md in every sub-agent prompt; it defines the JSON
shape, severity definitions, and confidence anchors the reviewer must use.
Replace <run-id> and <reviewer-name> with the actual values before dispatch.
Also include this output contract verbatim:
Use only the review prompt, plan, diff, and repository files you read for this
review. Do not consult project memory, prior sessions, rollout summaries, or
external history. The repository's own git history (log, blame, commit
messages) is repo evidence, not external history.
Audit artifact: /tmp/convergo/cvg-code-review/<run-id>/<reviewer-name>.json
Before returning, write the exact JSON object you will return to that artifact
path. You may run the project's read-only checks and targeted tests to confirm
a finding — prefer targeted tests over full suites; several reviewers share
this worktree in parallel. Do not edit repository files, change branches,
commit, push, or create artifacts outside your run directory beyond the
transient outputs those checks produce. If the artifact write fails, still
return the JSON and include no extra prose.
Return exactly one raw JSON object matching the findings schema. Do not wrap it
in markdown and do not append prose, citations, memory citations, or any text
after the JSON.
Sub-agent findings merge with yours in step 5.
Check in order:
Slice completion: For each slice, verify its "done when" criterion is met. Missing or incomplete slice = blocking finding.
Invariant matrix (cross-cutting plans): For each cell, verify the invariant is enforced on that surface and a test exists. Check ALL cells in ONE pass; if 3 are missing, capture all 3.
Implementation correctness: In changed code, look for P0 (critical breakage, data loss, security) and P1 (bugs in normal usage, contract violations).
Merge sub-agent findings with your own. Consume the JSON object from each
sub-agent return. If the return wraps the JSON in markdown or prose, extract
the JSON object and use it; discard the extra text and do not treat citations
or prose around it as findings. If no JSON object conforming to
references/findings-schema.md can be extracted,
treat that auxiliary result as failed and perform that review lens yourself. If a selected auxiliary
reviewer does not leave its artifact file, set artifact_written to false in
the audit coverage but still use a valid raw JSON return for merge.
Apply the schema's merge rules: drop findings below confidence 75 unless they are P0 at confidence 50+, deduplicate by file+line, keep highest severity on overlap. Classify each surviving finding as:
Code bug - the plan says to do X, the code does X wrong.
Contract gap - the plan is missing something the implementation reveals is needed.
Pre-existing issue - the problem existed before this change.
Treating a contract gap as a code bug causes whack-a-mole.
Before responding, write a single audit artifact
/tmp/convergo/cvg-code-review/<run-id>/review.json:
{
"run_id": "<run-id>",
"branch": "<git branch --show-current>",
"head_sha": "<git rev-parse HEAD>",
"verdict": "<Ready to merge | Ready with fixes | Not ready>",
"completed_at": "<ISO 8601 UTC timestamp>",
"auxiliary_coverage": "<object-form coverage from step 3>",
"selection_rationale": "<why these lenses fit this diff, and what was considered but omitted>",
"findings": "<merged findings>"
}
Start the response with:
Audit artifact: /tmp/convergo/cvg-code-review/<run-id>/
Auxiliary coverage: correctness-reviewer=<dispatched|inline|failed>, testing-reviewer=<dispatched|inline|failed>, security-reviewer=<dispatched|inline|skipped|failed>, adversarial-reviewer=<dispatched|inline|skipped|failed>, reliability-reviewer=<dispatched|inline|skipped|failed>
The response coverage line is a compact summary only. review.json must retain
the full object-form auxiliary coverage with status, agent_id, and
artifact_written for every selected, skipped, failed, or inline reviewer.
If this review is completed as part of an orchestrated callback workflow, include
Audit artifact: /tmp/convergo/cvg-code-review/<run-id>/ in the
callback text.
Use one of these verdicts:
For orchestrated loops, both "Ready to merge" and "Ready with fixes" satisfy the exit gate; report them distinctly so the orchestrator can decide whether to schedule P2 cleanup. Only "Not ready" blocks.
For "not ready", include every blocking finding you can see in one pass. For "ready with fixes", include P2s as non-blocking notes and do not loop on them.
Focused re-review mode overrides the full-review artifact shape:
Auxiliary coverage: response line.review.json with
review_mode: "focused-re-review", verdict, findings, checks, branch, head
sha, and completed timestamp.Same-reviewer recheck is exhaustive within recheck scope: verify the old findings, check the fix diff and newly changed code for new P0/P1 issues, and include all new issues in one pass.