@open-code-review/agents 1.3.1 → 1.5.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.
@@ -0,0 +1,273 @@
1
+ # Code Review Map Template
2
+
3
+ Template for the final map output (`map.md`). Optimized for reviewer workflow: understand context first, then track per-file review progress.
4
+
5
+ ---
6
+
7
+ ## Complete Template
8
+
9
+ ```markdown
10
+ # Code Review Map
11
+
12
+ **Session**: {session_id} | **Generated**: {timestamp} | **Files**: {file_count} | **Sections**: {section_count}
13
+
14
+ > Mark `X` in Done column as you complete review. Requirements: ✅ full | ⚠️ partial | ❌ none
15
+
16
+ ---
17
+
18
+ ## Executive Summary
19
+
20
+ {1-2 paragraph narrative explaining what this changeset accomplishes. Frame as a hypothesis.}
21
+
22
+ **Hypothesis**: {One sentence summary of inferred intent}
23
+
24
+ **Key Approaches**:
25
+ - {Approach 1}: {Brief description}
26
+ - {Approach 2}: {Brief description}
27
+
28
+ ---
29
+
30
+ ## Questions & Clarifications
31
+
32
+ > Ambiguities and assumptions that need verification with the author.
33
+
34
+ ### Questions for Author
35
+
36
+ - {Question about unclear intent or ambiguous requirement}
37
+ - {Question about design choice or deferred work}
38
+
39
+ ### Assumptions Made
40
+
41
+ - {Assumption 1 — verify if uncertain}
42
+ - {Assumption 2 — verify if uncertain}
43
+
44
+ ---
45
+
46
+ ## Requirements Coverage
47
+
48
+ {Only include if requirements were provided}
49
+
50
+ | Requirement | Status | Implementing Files |
51
+ |-------------|--------|-------------------|
52
+ | REQ-1: {description} | ✅ Full | `file1.ts`, `file2.ts` |
53
+ | REQ-2: {description} | ⚠️ Partial | `file3.ts` |
54
+ | REQ-3: {description} | ❌ Not covered | — |
55
+
56
+ **Gaps**: {Brief note on unaddressed requirements, if any}
57
+
58
+ ---
59
+
60
+ ## Critical Review Focus
61
+
62
+ > High-value areas where human judgment matters most. Review these carefully.
63
+
64
+ | Focus Area | Files | Why It Matters | Req / Concern |
65
+ |------------|-------|----------------|---------------|
66
+ | {Area, e.g., "Business Logic"} | `file1.ts`, `file2.ts` | {Reason, e.g., "Complex pricing conditionals"} | REQ-1 |
67
+ | {Area, e.g., "Security"} | `auth.ts` | {Reason, e.g., "Token validation"} | Security |
68
+ | {Area, e.g., "Edge Cases"} | `processor.ts:78` | {Reason, e.g., "Empty array returns null"} | Correctness |
69
+
70
+ ---
71
+
72
+ ## Manual Verification
73
+
74
+ > Run these tests before or during code review to verify the changeset works.
75
+
76
+ ### Critical Path
77
+
78
+ - [ ] **{Test Name}** (REQ-1) — {Steps} → Expected: {outcome}
79
+ - [ ] **{Test Name}** (REQ-2) — {Steps} → Expected: {outcome}
80
+
81
+ ### Edge Cases & Error Handling
82
+
83
+ - [ ] **{Edge case}** (`file.ts:42`) — {Steps} → Expected: {behavior}
84
+ - [ ] **{Error scenario}** — Trigger: {how} → Expected: {handling}
85
+
86
+ ### Non-Functional
87
+
88
+ - [ ] **Performance**: {Specific check}
89
+ - [ ] **Security**: {Specific check}
90
+
91
+ ---
92
+
93
+ ## File Review
94
+
95
+ {Main tracking section. Review files in section order, checking boxes as you go.}
96
+
97
+ ### Section 1: {Section Title}
98
+
99
+ {1-2 sentence narrative hypothesis about this section's purpose}
100
+
101
+ | Done | File | Role |
102
+ |:----:|------|------|
103
+ | | `path/to/file1.ts` | {brief role description} |
104
+ | | `path/to/file2.ts` | {brief role description} |
105
+ | | `path/to/file3.test.ts` | {brief role description} |
106
+
107
+ **Flow**: {Entry point} → {calls} → {tests}
108
+
109
+ **Requirements**: REQ-1 ✅, REQ-2 ⚠️
110
+
111
+ **Review Suggestions**:
112
+ - {Specific area to pay attention to, mapped to requirement or concern}
113
+ - {Only include if there are key things reviewer should watch for}
114
+
115
+ ---
116
+
117
+ ### Section 2: {Section Title}
118
+
119
+ {1-2 sentence narrative hypothesis}
120
+
121
+ | Done | File | Role |
122
+ |:----:|------|------|
123
+ | | `path/to/file.ts` | {role} |
124
+
125
+ **Flow**: {flow summary}
126
+
127
+ **Requirements**: {coverage}
128
+
129
+ ---
130
+
131
+ {Repeat for each section}
132
+
133
+ ---
134
+
135
+ ### Unrelated Changes
136
+
137
+ > Files that don't fit the main sections — opportunistic fixes or supporting changes.
138
+
139
+ | Done | File | Description |
140
+ |:----:|------|-------------|
141
+ | | `path/to/unrelated1.ts` | {description} |
142
+ | | `path/to/unrelated2.ts` | {description} |
143
+
144
+ ---
145
+
146
+ ## Section Dependencies
147
+
148
+ > How sections connect. Used by the dashboard dependency graph.
149
+
150
+ | From | To | Relationship |
151
+ |------|-----|-------------|
152
+ | 1: {Section Title} | 2: {Section Title} | {3-8 word description of dependency} |
153
+ | 2: {Section Title} | 3: {Section Title} | {3-8 word description of dependency} |
154
+
155
+ ---
156
+
157
+ ## File Index
158
+
159
+ | File | Section |
160
+ |------|---------|
161
+ | `path/to/api/auth.ts` | 1: {name} |
162
+ | `path/to/services/auth.service.ts` | 1: {name} |
163
+ | `path/to/utils/helper.ts` | Unrelated |
164
+
165
+ **Total**: {file_count} files
166
+
167
+ ---
168
+
169
+ ## Map Metadata
170
+
171
+ **Run**: {run_number} | **Flow Analysts**: {count} | **Requirements Mappers**: {count} | **Completeness**: {file_count}/{file_count} ✅
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Format Guidelines
177
+
178
+ ### Section Structure
179
+
180
+ ```markdown
181
+ ### Section {n}: {Title}
182
+
183
+ {1-2 sentence narrative hypothesis}
184
+
185
+ | Done | File | Role |
186
+ |:----:|------|------|
187
+ | | `path/to/file.ts` | {role} |
188
+
189
+ **Flow**: {entry} → {calls} → {tests}
190
+
191
+ **Requirements**: REQ-1 ✅, REQ-2 ⚠️
192
+
193
+ **Review Suggestions**:
194
+ - {Only if key things to watch for}
195
+ ```
196
+
197
+ **Titles**: Use descriptive names (✅ "Authentication Flow", ❌ "Files 1-5")
198
+
199
+ **Role descriptions**: 3-10 words explaining what the file does
200
+
201
+ ### Review Suggestions (per section)
202
+
203
+ Include ONLY if there are specific areas worth highlighting:
204
+ - Business logic requiring human judgment
205
+ - Security-sensitive code paths
206
+ - Edge cases spotted during mapping
207
+ - Architectural decisions to verify
208
+
209
+ Map suggestions to requirements or concerns. Do NOT perform code review — just flag areas for the reviewer's attention.
210
+
211
+ **Good**: "Complex pricing conditionals — verify tier logic matches REQ-4"
212
+ **Bad**: "This function has a bug on line 42" (that's code review)
213
+
214
+ ### Section Dependencies
215
+
216
+ Populate from cross-file flows identified during flow analysis:
217
+
218
+ - Use `{number}: {Title}` format matching section headings (e.g., `1: Authentication Flow`)
219
+ - Direction follows call/data flow: caller section → callee section
220
+ - Relationship is a 3-8 word description (e.g., "Auth middleware protects routes")
221
+ - Only include meaningful cross-section dependencies — not every possible connection
222
+ - If sections are independent, leave the table body empty (keep headers)
223
+
224
+ ### Requirements Coverage Indicators
225
+
226
+ - ✅ Full coverage
227
+ - ⚠️ Partial coverage
228
+ - ❌ Not covered
229
+ - ❓ Cannot assess
230
+
231
+ ### Writing Hypotheses
232
+
233
+ Frame as hypotheses, not assertions:
234
+
235
+ ❌ "This changeset adds authentication."
236
+ ✅ "This changeset appears to add authentication based on new auth handlers."
237
+
238
+ ### Critical Review Focus
239
+
240
+ Focus on areas where **human judgment adds value**:
241
+
242
+ **Good candidates**:
243
+ - Business logic correctness
244
+ - Algorithm matching spec
245
+ - Security-sensitive code
246
+ - Edge case handling
247
+
248
+ **NOT candidates** (automated):
249
+ - Code style
250
+ - Type safety
251
+ - Test coverage
252
+
253
+ ### Manual Verification Tests
254
+
255
+ Derive from:
256
+ - **Requirements** → Critical path happy-path tests
257
+ - **Implementation** → Edge cases (boundary conditions, null checks, error handling)
258
+
259
+ Omit ONLY if changeset is purely docs/config with no behavioral changes.
260
+
261
+ ---
262
+
263
+ ## Completeness Validation
264
+
265
+ The map MUST include every changed file:
266
+
267
+ ```bash
268
+ EXPECTED=$(git diff --cached --name-only | sort)
269
+ MAPPED=$(grep -oE '\| `[^`]+` \|' map.md | sed 's/.*`\([^`]*\)`.*/\1/' | sort)
270
+ diff <(echo "$EXPECTED") <(echo "$MAPPED")
271
+ ```
272
+
273
+ If any files are missing, add them to "Unrelated Changes" section.