.agents/skills/deep-review/references/report-template.md
This file is deep mode's output contract and overrides any environment-default review format. Render the full report; never compress the result into a plain findings list. Write the report in the conversation's language — the structure below is the contract, the wording translates.
Only verdict: confirmed findings are rendered (plus unverified dimensions — see below). Order: severity p0 → p1 → p2; within a severity bucket, group by dimension in table order from SKILL.md; within a dimension keep reviewer order.
nature: "introduced" → omit the line (default). nature: "exposed_legacy" → render **Nature**: legacy surfaced by this change.issue_type verbatim — never the dimension name.blocks_release (yes/no) on every confirmed finding — this is the user's ship/no-ship signal; never omit. Same-root merged entries take the value belonging to the highest merged severity.reuse-architecture dedup findings, listing all entries.rule_source when present.fix_options_override / nature_override before rendering.same_root_as: X fold into X's entry — no separate number; add **Same root**: id (location, issue_type), ... at the entry's end; entry severity upgrades to the highest among merged; statistics count merged entries once.More P2: **#n** [issue_type] summary (file:line).workflow findings render under Process, skill-freshness under Skill updates — outside the severity buckets, excluded from P0/P1/P2 statistics. These findings use the same JSON schema as everything else; render one line each mapped from those fields: fact = summary, evidence = location (plus scenario when present), suggested action = the first fix_options entry. Their severity is advisory and never rendered.missing_sources, append a note recommending the listed rule files be fixed/restored.sources: code-style, verify), render at the end; omit the section when empty.Merge verdict between TL;DR and Findings. Otherwise omit the section entirely. Bare #123 / pr 123 do NOT trigger PR mode.First match wins:
| Condition | Verdict |
|---|---|
isDraft: true | do not merge yet |
mergeable: "CONFLICTING" | do not merge yet |
any check conclusion: "FAILURE" | do not merge yet |
| P0 confirmed > 0 | fix before merge |
| P1 confirmed > 0 | fix before merge |
| otherwise (P2 only / clean) | good to merge |
Severity only — nature does not matter (a confirmed exposed-legacy P0 still blocks). Fallbacks: mergeable: "UNKNOWN" → treat as mergeable; all checks in progress/queued → CI pending, not blocking; no checks configured → CI pass. "fix before merge" lists all P0/P1 numbers + one-line summaries as prerequisites; "good to merge" lists P2s as follow-ups.
Before sending, confirm every item; fix and re-render if any is missing:
# Deep Review Report
**Scope**: {e.g. `feat/user-batch-delete` vs local `main`, 8 files +240/-37, incl. submodule lobehub}
**Background**: {1-2 sentence core of the step-0 scope summary}
**Execution**: {N} dimension reviewers ({list}) + {M} verifiers; pruned: {dimension — one-line reason, or "none"}
## TL;DR
{1-2 sentences: X confirmed (P0 a / P1 b / P2 c, K legacy-surfaced), the single biggest risk, one suggested next action.}
> Only findings related to this change are kept. Findings marked "legacy surfaced by this change" live in old code that this diff triggers or depends on; everything else is newly introduced.
📣 {N} workflow feedback item(s) at the end of this report ← only when workflow_feedback is non-empty
## Merge verdict ← PR mode only
**Verdict**: {good to merge | fix before merge | do not merge yet}
**Basis**: P0 {x} / P1 {y} / P2 {z} confirmed | CI {pass|fail|pending} | draft {yes|no} | mergeable {ok|conflicting}
**Prerequisites**: #{n} {summary} ← "fix before merge" only
**Follow-ups**: #{n} {summary} ← "good to merge" with P2s only
---
## 📌 Findings
### 🔴 P0 ({n})
#### 1. {summary}
- **Issue type**: {issue_type}
- **Location**: `src/api/user.ts:87`
- **Blocks release**: yes
- **Nature**: legacy surfaced by this change ← exposed_legacy only
- **Existing implementations**: `src/foo.ts:62-138`, ... ← reuse dedup only
- **Rule source**: {rule_source} ← when present
- **Core problem**: {core_problem}
- **Scenario**: {scenario}
- **Evidence**: {verify evidence}
- **Fix cost**: low
- **Fix options**:
- Option A: ...
- Option B: ...
- **Needs test**: yes
- **Same root**: {id} ({location}, {issue_type}) ← merged entries only
### 🟡 P1 ({n})
...
### 🟢 P2 ({n})
...
**More P2** ← only when P2 > 6
- **#{n}** [{issue_type}] {summary} ({file:line})
---
## 🔁 Process ← workflow dimension findings, omit when empty
- {summary} — {location}{; scenario when present}; suggested: {fix_options[0]}
## 📚 Skill updates ← skill-freshness findings, omit when empty
- {location: stale skill file:line or proposed skill} — {summary}; suggested: {fix_options[0]}
## Statistics
- Confirmed: {n} ({k} legacy-surfaced) | False positives: {fp} (incl. {os} over-scrutiny) | Need more context: {nc}
- Must-fix this round: {p0+p1} | Blocks release: {n}
- By dimension: {dimension: count, ...}
## 🚀 Safe to fix now ({n}) ← omit when empty
> Single obvious fix, low risk, no product decisions. Can be applied in one batch.
- **#{n}** `[{issue_type}]` {summary} (`file:line`)
## Needs your input ← need_more_context only, omit when empty
- [ ] {summary} — missing: {missing}
## 📣 Workflow feedback ({n}) ← omit when empty
> Observations from this run's subagents about the review workflow itself. Not action items — use them to decide whether to update the skill files.
- **Suggestion**: {suggestion}
**Why**: {why}
**Sources**: {code-style, verify}