@exaudeus/workrail 0.2.5-beta.6 → 0.2.5-beta.8
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.
package/package.json
CHANGED
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
"Document I/O: create/update the file at reviewDocPath using file-writing tools. If the agent cannot write files, output the exact doc content with the intended path so the user can save it.",
|
|
26
26
|
"If a function requires inputs that are missing, state exactly what is missing and pause. Otherwise, do not ask for confirmation.",
|
|
27
27
|
"If prompt text and a function definition conflict, prefer the function definition for the how, and the step prompt for the what.",
|
|
28
|
-
"collectNits(): Extract 'Nit:'/Minor items; update nitFindings, nitsCount.",
|
|
29
|
-
"collectNits() details: nitFindings entries = {title, details, filePath, line, analysisDepth}.",
|
|
30
|
-
"prepareNitAppendix(): Group nitFindings by file; format 'filePath:line - short desc'.",
|
|
31
|
-
"prepareNitAppendix() details: write markdown to nitAppendix; set nitAppendixReady=true.",
|
|
32
28
|
"discoverModulePatterns(): Compute moduleRoot; scan only moduleRoot to build patternCatalog.",
|
|
33
29
|
"discoverModulePatterns() details: moduleRoot = nearest common ancestor, clamped to package/src; catalog = naming, DI, errors, logging, tests, layout.",
|
|
34
30
|
"consolidatePatternFindings(): Compare changes to patternCatalog (scoped to moduleRoot).",
|
|
@@ -39,7 +35,6 @@
|
|
|
39
35
|
"appendChangedFileRow(): Append/update Changed Files table row: File | +/- | Summary | Risk.",
|
|
40
36
|
"appendFinding(): Append finding under severity (Critical/Major/Minor) with path:line, 1–2-line rationale, optional tiny diff.",
|
|
41
37
|
"appendPatternResult(): Append Pattern Adherence row (Check | Result | Note); add brief per-file deviations.",
|
|
42
|
-
"appendNit(): Append Nit grouped by file: 'path:line — nit text'.",
|
|
43
38
|
"appendMRComment(): Append copy-ready MR comment: file:line, short title, rationale, optional tiny diff.",
|
|
44
39
|
"logRevision(): Append timestamped message to the Revision Log describing the update.",
|
|
45
40
|
"discoverHygieneSignals(): Scan moduleRoot changed files + neighbors for hygiene issues.",
|
|
@@ -71,21 +66,16 @@
|
|
|
71
66
|
"prompt": "My goal is to ensure I fully understand the MR before the deep analysis. Based on the context you provided, I will perform the following tasks:\n\n1. **Summarize Goal:** Briefly summarize what I understand to be the primary goal and scope of this MR.\n2. **File Overview:** List all changed files (added, modified, deleted) and provide a one-sentence summary of the changes for each.\n3. **Initial Questions:** Formulate any immediate questions I have about the MR's purpose or requirements.\n4. **Confirmation Gate:** Does my summary accurately reflect the MR's goal? Please confirm before I proceed.\n\nI will also update the live review document with the Changed Files table and the Context summary.",
|
|
72
67
|
"agentRole": "You are a thorough code review analyst specializing in requirement comprehension and change impact assessment. Your strength is quickly understanding the intent and scope of code changes while identifying potential gaps in understanding early in the review process.",
|
|
73
68
|
"guidance": [
|
|
74
|
-
"This is a critical sanity check. If the agent's summary is incorrect, correct it now to prevent a flawed review. This step is skipped for 'Trivial' reviews."
|
|
69
|
+
"This is a critical sanity check. If the agent's summary is incorrect, correct it now to prevent a flawed review. This step is skipped for 'Trivial' reviews.",
|
|
70
|
+
"Doc writes: update only 'Context Summary' and 'Changed Files' sections; do not add 'Questions' or extra headings.",
|
|
71
|
+
"Ask any clarifying questions in chat only; do not write them into the doc.",
|
|
72
|
+
"Do not create placeholders for issues (Critical/Major/Minor) in this step."
|
|
75
73
|
],
|
|
76
74
|
"runCondition": { "var": "complexity", "not_equals": "Trivial" },
|
|
77
75
|
"requireConfirmation": true,
|
|
78
76
|
"functionReferences": ["upsertSection()", "appendChangedFileRow()", "logRevision()"]
|
|
79
77
|
},
|
|
80
|
-
|
|
81
|
-
"id": "phase-1-context-setup",
|
|
82
|
-
"title": "Phase 1: Initializing Analysis State",
|
|
83
|
-
"prompt": "Initializing state for progressive depth analysis. Setting analysisDepth = 1, analysisComplete = false, and majorIssuesFound = false.",
|
|
84
|
-
"agentRole": "You are a state manager preparing the workflow for an iterative review process.",
|
|
85
|
-
"guidance": ["This is an automated step to prepare for the analysis loop."],
|
|
86
|
-
"runCondition": { "and": [ { "var": "complexity", "not_equals": "Trivial" }, { "or": [ { "var": "contextGatheringComplete", "equals": true }, { "var": "skipContextGathering", "equals": true } ] } ] },
|
|
87
|
-
"requireConfirmation": false
|
|
88
|
-
},
|
|
78
|
+
|
|
89
79
|
{
|
|
90
80
|
"id": "phase-1a-llm-context-gathering",
|
|
91
81
|
"title": "Phase 1a: Comprehensive Context Gathering",
|
|
@@ -95,25 +85,50 @@
|
|
|
95
85
|
"runCondition": { "var": "complexity", "not_equals": "Trivial" },
|
|
96
86
|
"requireConfirmation": true
|
|
97
87
|
},
|
|
88
|
+
{
|
|
89
|
+
"id": "phase-1b-familiarization",
|
|
90
|
+
"title": "Phase 1b: Neighborhood, Call Graph, and Contracts Familiarization",
|
|
91
|
+
"prompt": "Build a lightweight understanding of surrounding code to increase review accuracy.\n\nTasks:\n1) Neighborhood Map: For each changed file, list immediate neighbors in moduleRoot (imports/exports/same-folder), co-located tests, and closest entry points (routes/endpoints/commands). Cap neighbors per file.\n2) Bounded Call Graph: For changed functions/classes, gather callers and callees up to 2 hops within moduleRoot; cap nodes/edges; prioritize edges touching changed code.\n3) Contracts & Invariants: List public symbols, API endpoints, DB/tables/messages touched nearby. Capture any stated invariants or assumptions from comments.\n\nDoc-first: Upsert sections 'Neighborhood Map', 'Bounded Call Graph', and 'Contracts & Invariants' with concise tables/bullets. Include only the highest-signal items (apply caps).",
|
|
92
|
+
"agentRole": "You are a codebase navigator building context around the change to improve downstream analysis.",
|
|
93
|
+
"guidance": [
|
|
94
|
+
"Initialize majorIssuesFound = false.",
|
|
95
|
+
"Scope strictly to moduleRoot and changed files plus immediate neighbors.",
|
|
96
|
+
"Cap per-file neighbors and graph size to avoid noise; prefer edges directly related to the diff.",
|
|
97
|
+
"Write full details to the live doc; in chat, keep output minimal.",
|
|
98
|
+
"Render 'ASCII Call Graphs' under 'Bounded Call Graph': edges 'A -> B', width ≤100, highlight changed as [*name*], include tiny legend.",
|
|
99
|
+
"Paths: for each changed symbol show top 2–3 inbound and outbound paths, depth ≤2, dedupe, shortest-first then alphabetical.",
|
|
100
|
+
"Caps: ≤12 nodes, ≤20 edges across graphs; if exceeded, fall back to an adjacency list with per-edge counts.",
|
|
101
|
+
"Flow Anchors: map entrypoints to changed symbols; table 'Anchor | Type | Target Symbol | Notes'; cap ≤5 anchors.",
|
|
102
|
+
"Hot-Path ranking: score edges (diff touch, anchor, ticket keyword, test ref); tag HOT if score ≥ threshold; prefer HOT paths in ASCII output.",
|
|
103
|
+
"Legend in doc: [*name*]=changed; HOT=high-impact; 'A -> B'=calls; 'Route -> Handler'; 'Job -> Worker'.",
|
|
104
|
+
"If caps exceeded, write 'Adjacency Summary': 'Node | In | Out | Notes' (top-K by degree/frequency) and add 1–2 uncertainty questions."
|
|
105
|
+
],
|
|
106
|
+
"runCondition": { "and": [ { "var": "complexity", "not_equals": "Trivial" }, { "or": [ { "var": "contextGatheringComplete", "equals": true }, { "var": "skipContextGathering", "equals": true } ] } ] },
|
|
107
|
+
"functionReferences": ["upsertSection()", "logRevision()"],
|
|
108
|
+
"requireConfirmation": false
|
|
109
|
+
},
|
|
98
110
|
{
|
|
99
111
|
"id": "phase-2-depth-analysis-loop",
|
|
100
112
|
"type": "loop",
|
|
101
113
|
"title": "Phase 2: Progressive Depth Analysis",
|
|
102
114
|
"runCondition": { "and": [ { "var": "complexity", "not_equals": "Trivial" }, { "or": [ { "var": "contextGatheringComplete", "equals": true }, { "var": "skipContextGathering", "equals": true } ] } ] },
|
|
103
115
|
"loop": {
|
|
104
|
-
"type": "
|
|
105
|
-
"
|
|
106
|
-
"maxIterations":
|
|
116
|
+
"type": "for",
|
|
117
|
+
"count": 4,
|
|
118
|
+
"maxIterations": 4,
|
|
107
119
|
"iterationVar": "analysisDepth"
|
|
108
120
|
},
|
|
109
121
|
"body": [
|
|
110
122
|
{
|
|
111
123
|
"id": "discover-module-patterns",
|
|
112
124
|
"title": "Discover Module Patterns (Depth 1)",
|
|
113
|
-
"prompt": "Compute `moduleRoot` as the nearest common ancestor of changed files, clamped to the package or `src/` subtree. Scan only within `moduleRoot` to gather exemplars (naming, DI, error handling, logging, test style, file layout). Produce `patternCatalog` and `patternExamples` in context. Do not block or require confirmation.",
|
|
125
|
+
"prompt": "Compute `moduleRoot` as the nearest common ancestor of changed files, clamped to the package or `src/` subtree. Scan only within `moduleRoot` to gather exemplars (naming, DI, error handling, logging, test style, file layout). Exclude changed files from discovery so they cannot define patterns. Only elevate a rule to a 'pattern' when observed ≥2 times across distinct files; record singletons as 'candidate conventions'. Produce `patternCatalog` (validated patterns) and `patternExamples` (1–3 exemplars per pattern) in context. Do not block or require confirmation.",
|
|
114
126
|
"agentRole": "You are a codebase pattern scout building a concise pattern catalog for the current module.",
|
|
115
127
|
"guidance": [
|
|
116
128
|
"Scope strictly to `moduleRoot` discovered from changed files.",
|
|
129
|
+
"Exclude changed files from discovery; use them only later for comparison.",
|
|
130
|
+
"Require ≥2 occurrences across distinct files to qualify as a pattern; otherwise mark as 'candidate convention'.",
|
|
131
|
+
"Capture 1–3 exemplars per validated pattern with file:line for the doc.",
|
|
117
132
|
"Cap exemplars (e.g., 3–5 per concern) for speed."
|
|
118
133
|
],
|
|
119
134
|
"runCondition": { "var": "analysisDepth", "equals": 1 },
|
|
@@ -122,22 +137,38 @@
|
|
|
122
137
|
},
|
|
123
138
|
{
|
|
124
139
|
"id": "perform-analysis-pass",
|
|
125
|
-
"title": "Analysis Pass {{analysisDepth}} of
|
|
140
|
+
"title": "Analysis Pass {{analysisDepth}} of 4",
|
|
126
141
|
"prompt": "Act as a Senior Staff Engineer. Your task is to review the code based on the checklist for the current analysis depth. Think step-by-step.\n\n**Current Depth: {{analysisDepth}}**\n\n**Checklist:**\n* **Depth 1 (Basic Scan):** Check for style guide violations, simple bugs (e.g., typos, unused variables), and common security vulnerabilities (OWASP Top 10).\n* **Depth 2 (Standard Review):** Check for logical errors, edge cases, adherence to SOLID principles, and maintainability issues.\n* **Depth 3 (Deep Architectural Review):** Check for alignment with system architecture, long-term impact, performance bottlenecks, and dependency risks.\n\n**Instructions:**\n1. **Summarize Focus:** State which depth level you are on and what you will focus on.\n2. **Analyze:** Perform the review based on the checklist for depth {{analysisDepth}}.\n3. **List Findings:** Document your findings, categorizing them as 'Critical', 'Major', or 'Minor'.\n4. **Set Flag:** If you find any 'Critical' or 'Major' issues, set the context variable `majorIssuesFound = true`.",
|
|
127
142
|
"agentRole": "You are a Senior Staff Engineer performing a structured, multi-pass code review with increasing levels of scrutiny.",
|
|
128
143
|
"guidance": [
|
|
129
144
|
"At each depth, focus only on the items in that checklist.",
|
|
130
|
-
"Use Chain-of-Thought reasoning to explain your findings."
|
|
145
|
+
"Use Chain-of-Thought reasoning to explain your findings (keep chat concise; write full details to the doc).",
|
|
146
|
+
"Retrieval bias: Prefer reading files/functions from 'Neighborhood Map' and HOT paths before broader scans.",
|
|
147
|
+
"Depth 2: Prefer Flow Anchors and HOT paths; walk 2–3 inbound/outbound traces; verify control/data flow vs invariants; record surprises.",
|
|
148
|
+
"Depth 3: On HOT paths, check module boundaries, DI patterns, performance, and consumer contracts; note potential breakages.",
|
|
149
|
+
"Propose tiny diffs (non-blocking) for the top 1–2 Major findings: fenced unified diff with file paths; ≤8 changed lines total and ≤2 hunks per patch; add one-line rationale; scope narrow; skip if ambiguous and state why.",
|
|
150
|
+
"For each proposed patch, add a matching ready-to-copy MR comment (file:line + rationale).",
|
|
151
|
+
"Append patches to the 'Proposed Patches' section; append MR comments and log the revision.",
|
|
152
|
+
"Caps per pass: ≤2 patches; ≤3 MR comments; ≤1200 chars of total patch text.",
|
|
153
|
+
"Self-critique: list 1–2 least-confident areas and what would increase confidence under 'Confidence & Follow-ups'."
|
|
131
154
|
],
|
|
132
|
-
"
|
|
155
|
+
"runCondition": { "or": [ { "var": "analysisDepth", "equals": 1 }, { "var": "analysisDepth", "equals": 2 }, { "var": "analysisDepth", "equals": 3 } ] },
|
|
156
|
+
"functionReferences": ["upsertSection()", "appendFinding()", "appendMRComment()", "logRevision()"],
|
|
133
157
|
"requireConfirmation": false
|
|
134
158
|
},
|
|
135
159
|
{
|
|
136
|
-
"id": "
|
|
137
|
-
"title": "
|
|
138
|
-
"prompt": "
|
|
139
|
-
"agentRole": "You are
|
|
140
|
-
"guidance": [
|
|
160
|
+
"id": "perform-nit-hunt",
|
|
161
|
+
"title": "Nit Hunt (Depth 4)",
|
|
162
|
+
"prompt": "Perform a focused nit hunt in `moduleRoot` on changed files and immediate neighbors. Be picky but objective. Provide concise, actionable nits with one-line rationale and suggested fix.",
|
|
163
|
+
"agentRole": "You are a meticulous reviewer surfacing small, high-signal improvements.",
|
|
164
|
+
"guidance": [
|
|
165
|
+
"Targets: naming clarity; small readability/style inconsistencies; redundant comments; commented/dead code; import/order polish; safe micro-perf; test naming/structure.",
|
|
166
|
+
"Quotas: if majorIssuesFound==true aim 5–8 (cap 12); else aim 8–12 (cap 15); ≤3 per category; 1–2 lines each; dedupe; group by file; prefix 'Nit:'.",
|
|
167
|
+
"Add ready-to-copy MR comments for the top 3 nits; log the revision.",
|
|
168
|
+
"Append Nit grouped by file: 'path:line — nit text'."
|
|
169
|
+
],
|
|
170
|
+
"runCondition": { "var": "analysisDepth", "equals": 4 },
|
|
171
|
+
"functionReferences": ["appendMRComment()", "upsertSection()", "logRevision()"],
|
|
141
172
|
"requireConfirmation": false
|
|
142
173
|
}
|
|
143
174
|
]
|
|
@@ -145,11 +176,14 @@
|
|
|
145
176
|
{
|
|
146
177
|
"id": "consolidate-patterns",
|
|
147
178
|
"title": "Consolidate Pattern Findings",
|
|
148
|
-
"prompt": "Using `moduleRoot` and `patternCatalog`, compare the MR changes to
|
|
179
|
+
"prompt": "Using `moduleRoot` and `patternCatalog`, compare the MR changes to validated patterns (patterns observed ≥2 times across distinct files). Do not use changed code to define patterns. Summarize adherence and deviations, and generate a grouped `patternAppendix` (by directory/file). If no patterns meet the threshold, state this and list 'candidate conventions' separately as informative only. Set `patternAppendixReady = true`.",
|
|
149
180
|
"agentRole": "You are a senior engineer consolidating pattern adherence findings for clear reporting.",
|
|
150
181
|
"guidance": [
|
|
151
182
|
"Restrict to the module of the MR (`moduleRoot`).",
|
|
152
|
-
"Avoid re-scanning if `patternCatalog` already exists; reuse it."
|
|
183
|
+
"Avoid re-scanning if `patternCatalog` already exists; reuse it.",
|
|
184
|
+
"Do not treat changed code as patterns; match only against validated patterns from `patternCatalog` (≥2 distinct occurrences).",
|
|
185
|
+
"Produce 'Patterns' and 'Pattern Deviations' sections: adherence table with confidence + counts; deviation ledger with file:line, rationale, and suggested alignment.",
|
|
186
|
+
"Include per-pattern occurrence counts in the module (excluding changed files)."
|
|
153
187
|
],
|
|
154
188
|
"runCondition": { "var": "complexity", "not_equals": "Trivial" },
|
|
155
189
|
"functionReferences": ["consolidatePatternFindings()", "appendPatternResult()", "upsertSection()", "logRevision()"],
|
|
@@ -158,12 +192,18 @@
|
|
|
158
192
|
{
|
|
159
193
|
"id": "phase-3-impact-analysis",
|
|
160
194
|
"title": "Phase 3: Testing, Documentation & Impact Analysis",
|
|
161
|
-
"prompt": "My goal is to assess the secondary impacts of this change.\n\n1. **Testing:** Based on the code changes, what tests would be expected (unit, integration, etc.)? Are new tests included? Are existing tests updated? Are there obvious gaps in test coverage for the new logic?\n2. **Documentation:** Is new or complex logic adequately commented? Could any external documentation (e.g., READMEs) be affected by this change?\n3. **Breaking Changes:** Are there any changes that could break backward compatibility for APIs or other parts of the codebase
|
|
195
|
+
"prompt": "My goal is to assess the secondary impacts of this change.\n\n1. **Testing:** Based on the code changes, what tests would be expected (unit, integration, etc.)? Are new tests included? Are existing tests updated? Are there obvious gaps in test coverage for the new logic?\n2. **Documentation:** Is new or complex logic adequately commented? Could any external documentation (e.g., READMEs) be affected by this change?\n3. **Breaking Changes:** Are there any changes that could break backward compatibility for APIs or other parts of the codebase?\n\nDoc-first subsections to add/update:\n- Impacted User Flows: table 'Flow/Anchor | Type | Path/ID | Handler Chain (short) | Impact | Risk(L/M/H)'.\n- Affected Consumers: table 'Consumer | Type | Breakage Risk | Migration Note'.\n- Test Gaps & Proposals: table 'Scope | Target | Purpose | Sketch'.",
|
|
162
196
|
"agentRole": "You are a software quality engineer specializing in testing strategy and impact analysis. Your expertise includes identifying testing gaps, documentation requirements, and potential breaking changes that could affect system stability or user experience.",
|
|
163
197
|
"guidance": [
|
|
164
|
-
"Assessing test coverage is critical. A lack of tests for new logic is often a 'Major' or 'Critical' concern."
|
|
198
|
+
"Assessing test coverage is critical. A lack of tests for new logic is often a 'Major' or 'Critical' concern.",
|
|
199
|
+
"Derive Impacted User Flows from Flow Anchors and HOT paths (depth ≤2); cap ≤5 flows; prefer acceptance-criteria keywords.",
|
|
200
|
+
"List Affected Consumers (importers/API clients/message consumers); cap ≤8; rank by usage frequency and proximity to changed code.",
|
|
201
|
+
"Test skeletons: for top-risk flows/consumers, add concise code fences (project test style if clear) with a suggested file path comment at top; ≤25 lines per sketch; ≤6 total sketches (≤2 per top risk).",
|
|
202
|
+
"For data/schema/API changes, add at least one Contract test proposal; total test proposals cap ≤10.",
|
|
203
|
+
"Add 2 ready-to-copy MR comments for the highest-risk gaps; log the revision."
|
|
165
204
|
],
|
|
166
205
|
"runCondition": { "and": [ { "var": "complexity", "not_equals": "Trivial" }, { "or": [ { "var": "contextGatheringComplete", "equals": true }, { "var": "skipContextGathering", "equals": true } ] } ] },
|
|
206
|
+
"functionReferences": ["upsertSection()", "appendMRComment()", "logRevision()"],
|
|
167
207
|
"requireConfirmation": false
|
|
168
208
|
},
|
|
169
209
|
{
|
|
@@ -186,10 +226,16 @@
|
|
|
186
226
|
"agentRole": "You are a meticulous note-taker consolidating non-blocking suggestions for clarity and follow-through.",
|
|
187
227
|
"guidance": [
|
|
188
228
|
"This step is non-blocking and purely for documentation quality.",
|
|
189
|
-
"
|
|
229
|
+
"Deterministic ordering: sort by file path ASC → line ASC → category ASC; group by file.",
|
|
230
|
+
"Categories: Naming; Readability; Style; Comments; Imports/Order; Tests (naming/structure); Minor Perf.",
|
|
231
|
+
"Row format: 'path:line — Nit: short text (≤2 lines); suggested fix: <one-liner> [category]'; optional tiny diff snippet ≤6 lines only if helpful.",
|
|
232
|
+
"Dedupe: identical path:line + similar text → keep one; if overlap with Hygiene/Patterns, keep in the most specific section and cross-reference in the other.",
|
|
233
|
+
"Caps: ≤15 total; ≤3 per category; if exceeded, append a single 'More items omitted due to caps.' line.",
|
|
234
|
+
"Cross-link any existing MR comments to their nit rows (e.g., 'MR: MR-##').",
|
|
235
|
+
"Chat: minimal recap with doc path and counts; full details live in the doc."
|
|
190
236
|
],
|
|
191
237
|
"runCondition": { "and": [ { "var": "complexity", "not_equals": "Trivial" }, { "or": [ { "var": "contextGatheringComplete", "equals": true }, { "var": "skipContextGathering", "equals": true } ] } ] },
|
|
192
|
-
"functionReferences": ["
|
|
238
|
+
"functionReferences": ["upsertSection()", "logRevision()"],
|
|
193
239
|
"requireConfirmation": false
|
|
194
240
|
},
|
|
195
241
|
{
|
|
@@ -198,9 +244,18 @@
|
|
|
198
244
|
"prompt": "Finalize the live review document (no new analysis).\n\nBranching:\n- If `complexity == 'Trivial'`:\n 1) Upsert a brief Executive Summary (1–2 lines) with 'Recommendation: Approve'.\n 2) Perform light hygiene (≤2 items) on changed files; write concise bullets under 'Hygiene & Inconsistencies'.\n 3) Quick Nit sweep; write bullets under 'Nit Appendix'.\n 4) Update Header: set status=Final; include final counts.\n 5) Append 'Finalized trivial review' to the Revision Log.\n\n- Otherwise (non-trivial):\n 1) Upsert Executive Summary (3 positives, 3 risks, final recommendation).\n 2) Dedupe and sort Findings (Severity → File → Line).\n 3) Ensure sections exist: Patterns, Pattern Deviations, Tests & Docs, Ideas & Alternatives, Nits, MR Comments.\n 4) Ensure every Critical/Major finding has a curated MR comment; add minimal ones if missing.\n 5) Update Header: set status=Final; include final counts and decision.\n 6) Append 'Finalized document' to the Revision Log.\n\nChat: Provide a concise recap (Trivial: 2–3 lines; Non-trivial: ≤10 lines) with decision and the doc path.",
|
|
199
245
|
"agentRole": "You are a facilitator ensuring the final document is complete, accurate, and consumable.",
|
|
200
246
|
"guidance": [
|
|
201
|
-
"Write full details to the live doc; keep chat to a concise recap with the doc path."
|
|
247
|
+
"Write full details to the live doc; keep chat to a concise recap with the doc path.",
|
|
248
|
+
"Ensure sections exist: 'Executive Summary', 'Decision Criteria', 'Risk Heatmap', 'Proposed Patches', 'Test Gaps & Proposals', 'Confidence & Follow-ups'; create missing sections with stable anchors.",
|
|
249
|
+
"Executive Summary template: 3 positives (≤120 chars each); 3 risks (≤120 chars each); decision & rationale (≤2 lines); add links to Patterns, Deviations, Tests, Hygiene; total ≤12 lines.",
|
|
250
|
+
"Decision Criteria checklist: Scope fit; Tests adequate; Pattern adherence; Performance risk; Backwards compatibility; Security basics. Render as 'Criteria: [✓/✗] label — 1 phrase note' in fixed order.",
|
|
251
|
+
"Risk Heatmap table: rows 'Risk | Area | Likelihood(L/M/H) | Impact(L/M/H) | Mitigation(≤1 line)'; sort by Impact desc then Likelihood desc; cap ≤6 rows; add 'omitted due to caps' line if needed.",
|
|
252
|
+
"Dedupe patches and MR comments; ensure every Critical/Major has either a patch or a copy-ready MR comment.",
|
|
253
|
+
"If any Critical/Major lacks an MR comment, generate a minimal ready-to-copy comment (file:line, short title, 1–2 line rationale, optional tiny diff snippet).",
|
|
254
|
+
"Group MR comments by file and dedupe similar entries; add a 'Missing Comments Summary' note if any comments were auto-added.",
|
|
255
|
+
"Cross-link each MR comment to its related Proposed Patch when applicable ('See Proposed Patch: <title>').",
|
|
256
|
+
"Keep all caps deterministic; if any list exceeds its cap, add a single trailing 'More items omitted due to caps.' line."
|
|
202
257
|
],
|
|
203
|
-
"functionReferences": ["finalizeReviewDocument()", "
|
|
258
|
+
"functionReferences": ["finalizeReviewDocument()", "upsertSection()", "discoverHygieneSignals()", "consolidateHygieneFindings()", "appendHygieneFinding()", "logRevision()"],
|
|
204
259
|
"requireConfirmation": false
|
|
205
260
|
}
|
|
206
261
|
]
|