π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Deep Review Β· Claude Code Manual
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.
Step 0 β Scope and background
Follow ../scoping.md. Produce {changes}, a β€ 200-word scope summary, and PR
metadata in PR mode.
Step 1 β Select dimensions
- Apply
SKILL.mdpruning and record each skipped dimension with one reason. - Detect sibling
deep-review-*extension packs. Collect built-in plus extension paths for every surviving dimension; extension-only files add dimensions.
Step 2 β Spawn reviewers
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.
Step 3 β Validate, aggregate, and verify
Maintain these accumulators for the entire run:
reportPoolreleaseChecksmissingSourcesworkflowFeedbackneedsContext- verification statistics
On every reviewer return:
- Validate the fenced payload with
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. - Append
missing_sources,release_checks, andworkflow_feedbackto their accumulators before partitioning findings. - Findings from
verify: falsedimensions go directly toreportPool. - For verifiable findings, instantiate
../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 with
validate-output.ts verify. - Compare input and output ids one-to-one. Missing, duplicate, or invented ids β spawn a fresh verifier for the unresolved original ids.
- Apply
severity_overrideand the nature/exposure overrides before cross-checking invariants: effective P0 must block release, effective P2 must not, and effectiverelease-riskorexposed_legacyfindings must not be auto-fixes. Re-spawn a verifier only when the effective values still violate these invariants. - Append verifier
workflow_feedback. confirmedβreportPoolafter 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.
Step 4 β Consolidate duplicate roots
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.
Step 5 β Render the report
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.
Step 6 β Offer the safe batch
When Safe to fix now is non-empty, use AskUserQuestion:
- Question:
"Safe to fix now" has N low-risk findings β apply them all in one pass? - Options:
Fix all/Not now; free text covers partial picks.
Apply selected fixes and regression tests where need_test: true. Empty batch skips silently.
Step 7 β Walk remaining decisions
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.
Step 8 β Offer legacy hand-off tasks
When Hand off to owner is non-empty, ask once whether to create all, some, or no LobeHub tasks.
Create nothing before approval. On approval, create them with lh task create and include location, culprit,
scenario, likelihood, and verification evidence.
Notes
- Small diff: β€ 200 lines and β€ 5 files; inline it. Otherwise pass fetch commands.
- PR mode: GitHub URL or unambiguous
PR #123/pr 123/pull request 123; a bare#123is not. - If Tasks cannot be spawned, stop and offer light mode. Never simulate deep mode in the main agent.