@mechanai/deepreview 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,22 @@ You will receive a path to a synthesis file. Read it.
|
|
|
23
23
|
2. For each finding, read ONLY the specific function or block referenced (use the Read tool with offset/limit to read ~50 lines around the referenced line — do NOT read entire files)
|
|
24
24
|
3. Write exact code changes for each fix
|
|
25
25
|
|
|
26
|
+
## Documentation Drift handling
|
|
27
|
+
|
|
28
|
+
If the synthesis contains a "Documentation Drift" section with a batched checklist, consolidate all those items into a **single** fix entry in the plan. Do not create separate fix entries for each documentation item. Use this format:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
### Fix [N]: Documentation Updates
|
|
32
|
+
**File(s):** [list all affected files]
|
|
33
|
+
**Priority:** suggestion
|
|
34
|
+
**Approach:** Batch update stale/verbose documentation
|
|
35
|
+
**Code changes:**
|
|
36
|
+
[Group changes by file. For each file, show the exact text replacement.]
|
|
37
|
+
**Verification:** Confirm updated docs match current code behavior
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Critical documentation findings (which appear individually in the "Critical Issues" section, not in "Documentation Drift") should still get their own fix entries.
|
|
41
|
+
|
|
26
42
|
## Quality rules
|
|
27
43
|
|
|
28
44
|
- **One clean solution per fix.** Do not include your reasoning process, rejected approaches, or self-corrections in the output. If you are unsure which approach is best, pick the simplest one and add a one-line "Alternative:" note.
|
|
@@ -25,8 +25,20 @@ If your prompt begins with a "Prior Findings" preamble, reviewers were instructe
|
|
|
25
25
|
|
|
26
26
|
1. Read all validated review files
|
|
27
27
|
2. Deduplicate: if multiple validators confirmed the same issue, merge into one entry and note agreement
|
|
28
|
-
3.
|
|
29
|
-
4.
|
|
28
|
+
3. Batch non-critical documentation findings into a single grouped checklist (see "Documentation finding batching" below)
|
|
29
|
+
4. Rank remaining findings by severity (critical first, then warning, then suggestion)
|
|
30
|
+
5. Within each severity level, rank by confidence (high before medium)
|
|
31
|
+
|
|
32
|
+
## Documentation finding batching
|
|
33
|
+
|
|
34
|
+
Documentation findings (stale comments, outdated counts, dead references, verbose docs) at **warning** or **suggestion** severity should be collapsed into a single "Documentation Drift" section rather than appearing as individual top-level entries in the severity sections.
|
|
35
|
+
|
|
36
|
+
Rules:
|
|
37
|
+
|
|
38
|
+
- **Critical** doc findings (false claims that would cause API misuse) remain as individual entries in "Critical Issues" — they are NOT batched
|
|
39
|
+
- **Warning** and **suggestion** doc findings are batched into a checklist in the dedicated "Documentation Drift" section
|
|
40
|
+
- Each checklist item gets one line: `- [ ] [what to fix] in \`path/to/file:line\``
|
|
41
|
+
- If there are zero non-critical doc findings, omit the "Documentation Drift" section entirely
|
|
30
42
|
|
|
31
43
|
## Output format
|
|
32
44
|
|
|
@@ -42,10 +54,16 @@ Write your synthesis to the output path provided. Use this structure:
|
|
|
42
54
|
[All critical severity items, deduplicated and ranked by confidence]
|
|
43
55
|
|
|
44
56
|
## Warnings (should fix)
|
|
45
|
-
[All warning severity items, deduplicated]
|
|
57
|
+
[All warning severity items, deduplicated — excludes documentation findings, which are batched below]
|
|
46
58
|
|
|
47
59
|
## Suggestions (nice to have)
|
|
48
|
-
[All suggestion items, grouped by theme]
|
|
60
|
+
[All suggestion items, grouped by theme — excludes documentation findings, which are batched below]
|
|
61
|
+
|
|
62
|
+
## Documentation Drift
|
|
63
|
+
The following doc/comment updates were identified (suggestion-level):
|
|
64
|
+
- [ ] [description of fix] in `path/to/file:line`
|
|
65
|
+
- [ ] [description of fix] in `path/to/file:line`
|
|
66
|
+
[Omit this section if there are no non-critical documentation findings]
|
|
49
67
|
|
|
50
68
|
## Points of Agreement
|
|
51
69
|
[Issues confirmed by multiple validators — these are highest confidence]
|
|
@@ -134,7 +134,19 @@ Task — Use the Task tool with subagent_type="general":
|
|
|
134
134
|
|
|
135
135
|
## Prior Findings (already reported — do not re-report or verify)
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
For each finding, include the title, category, location, AND a 1-sentence mechanism description explaining what the underlying problem is:
|
|
138
|
+
|
|
139
|
+
- [Short Issue Title] ([category]) — [file:line] — [1-sentence description of the underlying mechanism/problem]
|
|
140
|
+
|
|
141
|
+
Example:
|
|
142
|
+
|
|
143
|
+
- Missing semaphore guard (architecture) — src/module.rs:245 — concurrent operations share mutable state without synchronization
|
|
144
|
+
|
|
145
|
+
## Known Issue Locations (same file:line = likely same issue — justify if reporting again)
|
|
146
|
+
|
|
147
|
+
List every file:line from Prior Findings in a condensed location-first index:
|
|
148
|
+
|
|
149
|
+
- [file:line] — [condensed mechanism] ([category])
|
|
138
150
|
|
|
139
151
|
## Applied Fixes (changes made by previous iterations — new bugs here are regressions)
|
|
140
152
|
|
|
@@ -144,7 +156,7 @@ Task — Use the Task tool with subagent_type="general":
|
|
|
144
156
|
|
|
145
157
|
- [file:line-range] (pad each finding's file:line by 20 lines in each direction)
|
|
146
158
|
|
|
147
|
-
Deduplicate findings that appear in multiple syntheses. Return ONLY these
|
|
159
|
+
Deduplicate findings that appear in multiple syntheses. Return ONLY these four sections, nothing else."
|
|
148
160
|
|
|
149
161
|
Set PRIOR_CONTEXT to the returned text. Validate that it contains "## Prior Findings" — if not, warn the user ("Helper returned malformed prior context — proceeding without deduplication") and set PRIOR_CONTEXT="". If CONTEXT_FILE exists, prepend:
|
|
150
162
|
"## Design Decisions (intentional — do not flag)\nThe following are deliberate design choices. Do NOT flag these as issues or suggest alternatives.\n`\n" + contents of CONTEXT_FILE + "\n`\n\n"
|
|
@@ -155,7 +167,14 @@ Stage 1 — DISPATCH 5 PARALLEL REVIEWERS:
|
|
|
155
167
|
Each reviewer prompt MUST include PRIOR_CONTEXT and the novelty-seeking framing below.
|
|
156
168
|
|
|
157
169
|
The REVIEWER_PREAMBLE for all iter2+ reviewers is:
|
|
158
|
-
"Your goal is to find issues that PREVIOUS reviewers missed. Do NOT re-report, verify, or comment on prior findings.
|
|
170
|
+
"Your goal is to find issues that PREVIOUS reviewers missed. Do NOT re-report, verify, or comment on prior findings.
|
|
171
|
+
|
|
172
|
+
When you encounter a potential issue:
|
|
173
|
+
|
|
174
|
+
1. Check "Known Issue Locations" — if your finding is at or near a listed location, it is almost certainly already reported. Only report it if the mechanism is genuinely different (not just differently worded).
|
|
175
|
+
2. Check "Prior Findings" — if your finding matches an existing mechanism description (even at a different location), it is a variant of an already-reported issue. Do not report it.
|
|
176
|
+
|
|
177
|
+
If you find a bug in code listed under 'Applied Fixes', flag it as a regression.
|
|
159
178
|
|
|
160
179
|
$PRIOR_CONTEXT
|
|
161
180
|
|
|
@@ -94,7 +94,19 @@ Task — Use the Task tool with subagent_type="general":
|
|
|
94
94
|
|
|
95
95
|
## Prior Findings (already reported — do not re-report or verify)
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
For each finding, include the title, category, location, AND a 1-sentence mechanism description explaining what the underlying problem is:
|
|
98
|
+
|
|
99
|
+
- [Short Issue Title] ([category]) — [file:line or section reference] — [1-sentence description of the underlying mechanism/problem]
|
|
100
|
+
|
|
101
|
+
Example:
|
|
102
|
+
|
|
103
|
+
- Missing error recovery path (completeness) — spec.md:§3.2 — no defined behavior when upstream service returns partial data
|
|
104
|
+
|
|
105
|
+
## Known Issue Locations (same location = likely same issue — justify if reporting again)
|
|
106
|
+
|
|
107
|
+
List every location from Prior Findings in a condensed location-first index:
|
|
108
|
+
|
|
109
|
+
- [file:line or section reference] — [condensed mechanism] ([category])
|
|
98
110
|
|
|
99
111
|
## Applied Fixes (changes made by previous iterations — new bugs here are regressions)
|
|
100
112
|
|
|
@@ -104,7 +116,7 @@ Task — Use the Task tool with subagent_type="general":
|
|
|
104
116
|
|
|
105
117
|
- [file or section references, padded generously around each finding location]
|
|
106
118
|
|
|
107
|
-
Deduplicate findings that appear in multiple syntheses. Return ONLY these
|
|
119
|
+
Deduplicate findings that appear in multiple syntheses. Return ONLY these four sections, nothing else."
|
|
108
120
|
|
|
109
121
|
Set PRIOR_CONTEXT to the returned text. Validate that it contains "## Prior Findings" — if not, warn the user ("Helper returned malformed prior context — proceeding without deduplication") and set PRIOR_CONTEXT="". If CONTEXT_FILE exists, prepend:
|
|
110
122
|
"## Design Decisions (intentional — do not flag)\nThe following are deliberate design choices. Do NOT flag these as issues or suggest alternatives.\n`\n" + contents of CONTEXT_FILE + "\n`\n\n"
|
|
@@ -112,6 +124,11 @@ Set PRIOR_CONTEXT to the returned text. Validate that it contains "## Prior Find
|
|
|
112
124
|
The REVIEWER_PREAMBLE for all iter2+ reviewers is:
|
|
113
125
|
"Your goal is to find issues that PREVIOUS reviewers missed. Do NOT re-report, verify, or comment on prior findings.
|
|
114
126
|
|
|
127
|
+
When you encounter a potential issue:
|
|
128
|
+
|
|
129
|
+
1. Check "Known Issue Locations" — if your finding is at or near a listed location, it is almost certainly already reported. Only report it if the mechanism is genuinely different (not just differently worded).
|
|
130
|
+
2. Check "Prior Findings" — if your finding matches an existing mechanism description (even at a different location), it is a variant of an already-reported issue. Do not report it.
|
|
131
|
+
|
|
115
132
|
$PRIOR_CONTEXT
|
|
116
133
|
|
|
117
134
|
Find genuinely new issues. You may find different issues in covered regions, but prioritize areas not yet examined. Focus ONLY on objective issues — do NOT flag stylistic preferences."
|