.agents/skills/deep-review/references/claude-code/main.md
Deep mode in Claude Code, end to end. Every Task prompt is self-contained; never rely on inherited conversation context.
Use a balanced/fast model tier for review and verification. Rules carry the quality.
Follow ../scoping.md. Produce {changes}, a ≤ 200-word scope summary, and PR
metadata in PR mode.
SKILL.md pruning and record each skipped dimension with one reason.deep-review-* extension packs. Collect built-in plus extension paths for every
surviving dimension; extension-only files add dimensions.Launch every selected dimension concurrently in one response, one Task per dimension.
Instantiate ../review-prompt.md with {dimensions}, {dimension_files},
{scope_summary}, and {changes}. Use description: review: <dimension> and
subagent_type: general-purpose.
Maintain these accumulators for the entire run:
reportPoolreleaseChecksmissingSourcesworkflowFeedbackneedsContextOn every reviewer return:
bun run .agents/skills/deep-review/scripts/validate-output.ts review, passing the response on
stdin or through a task-scoped temp file. Validation failure → reject and re-spawn the reviewer
with the same prompt.missing_sources, release_checks, and workflow_feedback to their accumulators before
partitioning findings.verify: false dimensions go directly to reportPool.../verify-prompt.md. Include only
the dimension-specific verification addenda that the payload requires. Spawn verification as
soon as that reviewer returns; do not wait for other reviewers.On every verifier return:
validate-output.ts verify.severity_override and the nature/exposure overrides before cross-checking invariants:
effective P0 must block release, effective P2 must not, and effective release-risk or
exposed_legacy findings must not be auto-fixes. Re-spawn a verifier only when the effective
values still violate these invariants.workflow_feedback.confirmed → reportPool after applying overrides; false_positive → statistics only;
need_more_context → needsContext.Split a verifier payload only when it exceeds 20 findings. Never let the main agent re-verify a candidate.
When at least two confirmed findings remain, spawn one fresh Task using
../consolidate-prompt.md. Pass confirmed findings after verifier
overrides, in report order.
Validate the result with validate-output.ts consolidate, then reject any invented id, self-map,
cycle, or root that occurs after its duplicate. Invalid output → re-spawn consolidation. Apply the
map only after validation.
Zero or one confirmed finding skips this step.
Render strictly per ../report-template.md. Include the aggregated missing
sources and workflow feedback, optional consolidation in the execution line, statistics, and the
PR-mode merge verdict. Run the template's pre-send self-check.
When Safe to fix now is non-empty, use AskUserQuestion:
"Safe to fix now" has N low-risk findings — apply them all in one pass?Fix all / Not now; free text covers partial picks.Apply selected fixes and regression tests where need_test: true. Empty batch skips silently.
Ask about confirmed can_auto_fix: false findings and needsContext, up to four questions per
call. Order P0 → P1 → P2, blocking first. Exclude every legacy hand-off item. Skip low-likelihood,
non-blocking items on repeat review unless the user asks.
When Hand off to owner is non-empty, ask once whether to create all, some, or no Linear issues.
Create nothing before approval. On approval, use the linear skill and include location, culprit,
scenario, likelihood, and verification evidence.
PR #123 / pr 123 / pull request 123; a bare #123 is not.