nightytidy 0.3.8 → 0.3.9

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.
Files changed (36) hide show
  1. package/bin/nightytidy.js +1 -1
  2. package/package.json +1 -1
  3. package/src/claude.js +1 -1
  4. package/src/prompts/manifest.json +138 -138
  5. package/src/prompts/steps/02-test-coverage.md +181 -181
  6. package/src/prompts/steps/03-test-hardening.md +181 -181
  7. package/src/prompts/steps/04-test-architecture.md +130 -130
  8. package/src/prompts/steps/05-test-consolidation.md +165 -165
  9. package/src/prompts/steps/06-test-quality.md +211 -211
  10. package/src/prompts/steps/07-api-design.md +165 -165
  11. package/src/prompts/steps/08-security-sweep.md +207 -207
  12. package/src/prompts/steps/09-dependency-health.md +217 -217
  13. package/src/prompts/steps/10-codebase-cleanup.md +189 -189
  14. package/src/prompts/steps/11-crosscutting-concerns.md +196 -196
  15. package/src/prompts/steps/12-file-decomposition.md +263 -263
  16. package/src/prompts/steps/13-code-elegance.md +329 -329
  17. package/src/prompts/steps/14-architectural-complexity.md +297 -297
  18. package/src/prompts/steps/15-type-safety.md +192 -192
  19. package/src/prompts/steps/16-logging-error-message.md +173 -173
  20. package/src/prompts/steps/17-data-integrity.md +139 -139
  21. package/src/prompts/steps/18-performance.md +183 -183
  22. package/src/prompts/steps/19-cost-resource-optimization.md +136 -136
  23. package/src/prompts/steps/20-error-recovery.md +145 -145
  24. package/src/prompts/steps/21-race-condition-audit.md +178 -178
  25. package/src/prompts/steps/22-bug-hunt.md +229 -229
  26. package/src/prompts/steps/23-frontend-quality.md +210 -210
  27. package/src/prompts/steps/24-uiux-audit.md +284 -284
  28. package/src/prompts/steps/25-state-management.md +170 -170
  29. package/src/prompts/steps/26-perceived-performance.md +190 -190
  30. package/src/prompts/steps/27-devops.md +165 -165
  31. package/src/prompts/steps/28-scheduled-job-chron-jobs.md +141 -141
  32. package/src/prompts/steps/29-observability.md +152 -152
  33. package/src/prompts/steps/30-backup-check.md +155 -155
  34. package/src/prompts/steps/31-product-polish-ux-friction.md +122 -122
  35. package/src/prompts/steps/32-feature-discovery-opportunity.md +128 -128
  36. package/src/prompts/steps/33-strategic-opportunities.md +217 -217
@@ -1,181 +1,181 @@
1
- You are running an overnight test coverage expansion. Be thorough and methodical. Your job is to dramatically improve test coverage by writing high-quality tests that catch bugs, not just inflate coverage numbers.
2
-
3
- ## Mission
4
-
5
- Expand coverage across six phases in order: smoke tests → coverage gap analysis → unit tests → E2E tests → mutation testing → quality assessment. Work on branch `test-coverage-[date]`.
6
-
7
- ### Phase 1: Smoke Tests
8
- Before doing anything else, verify the app is alive and the critical path isn't broken. Smoke tests are the bouncer at the door — if the app can't get past them, nothing else matters.
9
-
10
- **Write and run smoke tests that verify:**
11
- 1. **The app loads** — hitting the main URL (or running the entry point) doesn't crash or return an error
12
- 2. **Auth works** — the login page renders or a test user can authenticate
13
- 3. **The main page/view renders** — the primary dashboard or home screen shows up with data
14
- 4. **The API responds** — key backend endpoints return 200, not 500
15
- 5. **The database connects** — a basic read operation succeeds
16
-
17
- **Standards:**
18
- - Target 3–7 tests total. These are intentionally shallow and fast (under 30 seconds for the full smoke suite).
19
- - Smoke tests check "is it on fire?" — not "is every feature correct." Don't test edge cases here.
20
- - If ANY smoke test fails, stop and document the failure in the report as a **CRITICAL** finding before proceeding. Do not write deeper tests against a fundamentally broken app.
21
- - Place smoke tests in a clearly labeled file/suite (e.g., `smoke.test.ts` or `__tests__/smoke/`) so they can be run independently after deploys.
22
- - Match existing test conventions.
23
-
24
- **After smoke tests pass**, proceed to deeper analysis.
25
-
26
- ### Phase 2: Coverage Gap Analysis
27
- Before writing tests, understand what's missing.
28
- - Run the existing suite and generate a coverage report if tooling is available
29
- - If not, manually identify: modules with zero tests, uncovered functions, unexercised code paths
30
- - Categorize uncovered code by risk:
31
- - **Critical**: Public APIs, auth, payment/billing, data mutation, user-facing
32
- - **High**: Business logic, data transforms, validation, error handling
33
- - **Medium**: Internal utilities, helpers, config
34
- - **Low**: Logging, formatting, UI presentation
35
- - Produce a prioritized list. Work top-down from Critical.
36
-
37
- ### Phase 3: Unit Test Generation
38
- For each uncovered function/module, starting with Critical:
39
-
40
- **Before writing tests:** Read the function and its callees. Understand inputs, outputs, side effects, and the implicit contract. Match existing test style/conventions.
41
-
42
- **Cover these categories:**
43
- 1. **Happy path** — normal usage with valid inputs
44
- 2. **Edge cases** — null/undefined/empty, boundary values (0, -1, MAX_INT), single-element collections, unicode/special chars, long strings, concurrency if applicable
45
- 3. **Error paths** — invalid types, missing fields, network/DB failures, permission denied
46
- 4. **State transitions** — for stateful code, test transitions not just end states
47
-
48
- **Quality standards:**
49
- - Descriptive test names: `should return empty array when user has no orders` not `test1`
50
- - One assertion per test where practical; tests must be independent
51
- - Descriptive variable names; mock external dependencies (DB, APIs, filesystem)
52
- - Match existing file structure and conventions
53
-
54
- **After writing tests for each module:**
55
- - Run them — they must pass
56
- - If a test reveals an actual bug, DO NOT fix it. Mark as skipped with `// BUG: [description]` and document in the report
57
-
58
- ### Phase 4: End-to-End Tests
59
-
60
- **If browser automation (Playwright MCP, etc.) is available:**
61
- - Test critical user journeys: sign up/login/logout, core product workflow, payment/checkout, settings, any CRUD flow
62
- - For each: happy path, validation errors, navigation, state persistence
63
-
64
- **If not available:**
65
- - Write API-level integration tests for critical endpoints
66
- - Include auth in setup; test sequences representing real user workflows
67
-
68
- **E2E standards:** Independent tests, self-managed test data with cleanup, deterministic data (not random), proper async waits (no `sleep()`), test user experience not implementation.
69
-
70
- ### Phase 5: Mutation Testing on Critical Business Logic
71
-
72
- Coverage tells you lines were executed, not that tests would catch bugs on those lines. Manual mutation testing answers: "If I introduced a bug, would any test catch it?"
73
-
74
- **Step 1: Select targets (10-20 functions)**
75
- Focus on functions where a silent bug causes: financial impact (pricing, billing, tax), data corruption (DB writes, import/export, migrations), security bypass (auth, permissions, input validation), or incorrect business decisions (analytics, threshold checks, eligibility, scoring).
76
-
77
- Skip: presentation/UI logic, logging, test utilities, config/bootstrap, code already covered by strong contract/E2E tests.
78
-
79
- **Step 2: Apply mutations one at a time**
80
- For each target, apply mutations from these categories (prioritize comparison/boundary first, then arithmetic, logical, null/empty):
81
-
82
- - **Arithmetic**: `+↔-`, `*↔/`, `%→*`, `+1→-1`, remove operation (`a+b→a`)
83
- - **Comparison**: `>↔>=`, `<↔<=`, `==↔!=`, `>↔<`
84
- - **Boundary**: constants ±1, array index bounds ±1, string slice ±1
85
- - **Logical**: `&&↔||`, remove negation, remove conditional branch, `true↔false`, remove early return
86
- - **Null/empty**: return `null`, `[]`, `{}`, `0`, or `""` instead of computed value
87
-
88
- **For each mutation:**
89
- 1. Make the single change
90
- 2. Run relevant test file(s) only (not full suite)
91
- 3. Record: **KILLED** (test failed ✓), **SURVIVED** (tests pass — gap found), **TIMED OUT** (inconclusive), or **COMPILE ERROR** (type safety win)
92
- 4. REVERT immediately. Verify original tests pass before next mutation.
93
-
94
- **Step 3: Write tests for surviving mutants**
95
- For every surviving mutation, write a test that fails with the mutation and passes without it. Verify the kill by re-applying the mutation. Revert and commit: `test: add mutation-killing test for [function] — [mutation type]`
96
-
97
- **Step 4: Assess type system kills**
98
- Note which mutation categories types catch automatically vs. which need tests. Document functions where stronger types would improve coverage (feeds into Type Safety prompt).
99
-
100
- **Step 5: Calculate mutation scores**
101
- Per function: mutation score = (killed by tests + killed by types) / total × 100%. Below 80% on critical logic is a red flag.
102
-
103
- ### Phase 6: Test Quality Assessment
104
- For all tests (existing and new):
105
- - Are assertions meaningful? (Calling functions without asserting results is useless)
106
- - Are tests testing the unit or just testing mocks?
107
- - Cross-reference Phase 5: functions with low mutation scores despite high line coverage are top priority
108
- - For critical logic not covered by Phase 5: try flipping a comparison or removing a conditional — would any test catch it?
109
-
110
- ## Report
111
-
112
- Create `audit-reports/` in project root if needed. Save as `audit-reports/02_TEST_COVERAGE_REPORT_[run-number]_[date]_[time in user's local time].md`, incrementing run number based on existing reports.
113
-
114
- ### Sections:
115
- 1. **Summary** — Starting/ending coverage %, test files created, test cases written, pass/fail/skip counts, mutation score on critical logic, smoke test results (pass/fail)
116
- 2. **Smoke Test Results** — Pass/fail status for each smoke test. If any failed, document what was broken and whether it was resolved before deeper testing proceeded.
117
- 3. **Coverage Gap Analysis** — Uncovered modules by priority; covered vs. remaining
118
- 4. **Bugs Discovered** — File, line, description, severity, and the skipped test that reveals it
119
- 5. **Mutation Testing Results**
120
- - Per-function table: Function | File | Risk | Mutations | Killed (tests) | Killed (types) | Survived | Score
121
- - Overall mutation score for critical logic
122
- - Surviving mutants addressed (new tests): Function | Mutation | New Test | Confirms Kill?
123
- - Surviving mutants NOT addressed: Function | Mutation | Why Survived | Risk
124
- - Type system effectiveness analysis; functions needing stronger types
125
- 6. **Tests Written** — Organized by module with brief descriptions
126
- 7. **Remaining Gaps** — What needs coverage and why (time, complexity, infra); functions with low mutation scores
127
- 8. **Testing Infrastructure Recommendations** — Missing utilities, suggested patterns, infra improvements, whether a mutation framework (Stryker, mutmut, etc.) is worth adopting
128
-
129
- ## Rules
130
- - Branch: `test-coverage-[date]`
131
- - Every test must pass (or be explicitly skipped with a bug comment)
132
- - Match existing conventions — don't introduce new frameworks
133
- - Don't modify source code — test what exists
134
- - Document genuinely untestable functions in the report
135
- - Prioritize CRITICAL/HIGH. Don't spend time on LOW if CRITICAL gaps remain.
136
- - Quality over quantity. 50 meaningful tests > 200 trivial ones.
137
- - NEVER commit a mutation. Always revert and verify before proceeding.
138
- - Focus mutation testing on 10-20 critical functions, not the entire codebase.
139
- - If mutation testing a single function exceeds 20 minutes, move on and note it.
140
- - When a mutation survives, write a killing test before moving to the next function.
141
- - Skip mutations a linter/formatter would catch — focus on plausible real-world bugs.
142
- - If any smoke test fails, document the failure as CRITICAL before proceeding to deeper phases.
143
- - You have all night. Be thorough.
144
-
145
- ## Chat Output Requirement
146
-
147
- In addition to writing the full report file, you MUST print a summary directly in the conversation when you finish. Do not make the user open the report to get the highlights. The chat summary should include:
148
-
149
- ### 1. Status Line
150
- One sentence: what you did, how long it took, and whether all tests still pass.
151
-
152
- ### 2. Key Findings
153
- The most important things discovered — bugs, risks, wins, or surprises. Each bullet should be specific and actionable, not vague. Lead with severity or impact.
154
-
155
- **Good:** "CRITICAL: No backup configuration found for the primary Postgres database — total data loss risk."
156
- **Bad:** "Found some issues with backups."
157
-
158
- ### 3. Changes Made (if applicable)
159
- Bullet list of what was actually modified, added, or removed. Skip this section for read-only analysis runs.
160
-
161
- ### 4. Recommendations
162
-
163
- If there are legitimately beneficial recommendations worth pursuing right now, present them in a table. Do **not** force recommendations — if the audit surfaced no actionable improvements, simply state that no recommendations are warranted at this time and move on.
164
-
165
- When recommendations exist, use this table format:
166
-
167
- | # | Recommendation | Impact | Risk if Ignored | Worth Doing? | Details |
168
- |---|---|---|---|---|---|
169
- | *Sequential number* | *Short description (≤10 words)* | *What improves if addressed* | *Low / Medium / High / Critical* | *Yes / Probably / Only if time allows* | *1–3 sentences explaining the reasoning, context, or implementation guidance* |
170
-
171
- Order rows by risk descending (Critical → High → Medium → Low). Be honest in the "Worth Doing?" column — not everything flagged is worth the engineering time. If a recommendation is marginal, say so.
172
-
173
- ### 5. Report Location
174
- State the full path to the detailed report file for deeper review.
175
-
176
- ---
177
-
178
- **Formatting rules for chat output:**
179
- - Use markdown headers, bold for severity labels, and bullet points for scannability.
180
- - Do not duplicate the full report contents — just the highlights and recommendations.
181
- - If you made zero findings in a phase, say so in one line rather than omitting it silently.
1
+ You are running an overnight test coverage expansion. Be thorough and methodical. Your job is to dramatically improve test coverage by writing high-quality tests that catch bugs, not just inflate coverage numbers.
2
+
3
+ ## Mission
4
+
5
+ Expand coverage across six phases in order: smoke tests → coverage gap analysis → unit tests → E2E tests → mutation testing → quality assessment. Work on branch `test-coverage-[date]`.
6
+
7
+ ### Phase 1: Smoke Tests
8
+ Before doing anything else, verify the app is alive and the critical path isn't broken. Smoke tests are the bouncer at the door — if the app can't get past them, nothing else matters.
9
+
10
+ **Write and run smoke tests that verify:**
11
+ 1. **The app loads** — hitting the main URL (or running the entry point) doesn't crash or return an error
12
+ 2. **Auth works** — the login page renders or a test user can authenticate
13
+ 3. **The main page/view renders** — the primary dashboard or home screen shows up with data
14
+ 4. **The API responds** — key backend endpoints return 200, not 500
15
+ 5. **The database connects** — a basic read operation succeeds
16
+
17
+ **Standards:**
18
+ - Target 3–7 tests total. These are intentionally shallow and fast (under 30 seconds for the full smoke suite).
19
+ - Smoke tests check "is it on fire?" — not "is every feature correct." Don't test edge cases here.
20
+ - If ANY smoke test fails, stop and document the failure in the report as a **CRITICAL** finding before proceeding. Do not write deeper tests against a fundamentally broken app.
21
+ - Place smoke tests in a clearly labeled file/suite (e.g., `smoke.test.ts` or `__tests__/smoke/`) so they can be run independently after deploys.
22
+ - Match existing test conventions.
23
+
24
+ **After smoke tests pass**, proceed to deeper analysis.
25
+
26
+ ### Phase 2: Coverage Gap Analysis
27
+ Before writing tests, understand what's missing.
28
+ - Run the existing suite and generate a coverage report if tooling is available
29
+ - If not, manually identify: modules with zero tests, uncovered functions, unexercised code paths
30
+ - Categorize uncovered code by risk:
31
+ - **Critical**: Public APIs, auth, payment/billing, data mutation, user-facing
32
+ - **High**: Business logic, data transforms, validation, error handling
33
+ - **Medium**: Internal utilities, helpers, config
34
+ - **Low**: Logging, formatting, UI presentation
35
+ - Produce a prioritized list. Work top-down from Critical.
36
+
37
+ ### Phase 3: Unit Test Generation
38
+ For each uncovered function/module, starting with Critical:
39
+
40
+ **Before writing tests:** Read the function and its callees. Understand inputs, outputs, side effects, and the implicit contract. Match existing test style/conventions.
41
+
42
+ **Cover these categories:**
43
+ 1. **Happy path** — normal usage with valid inputs
44
+ 2. **Edge cases** — null/undefined/empty, boundary values (0, -1, MAX_INT), single-element collections, unicode/special chars, long strings, concurrency if applicable
45
+ 3. **Error paths** — invalid types, missing fields, network/DB failures, permission denied
46
+ 4. **State transitions** — for stateful code, test transitions not just end states
47
+
48
+ **Quality standards:**
49
+ - Descriptive test names: `should return empty array when user has no orders` not `test1`
50
+ - One assertion per test where practical; tests must be independent
51
+ - Descriptive variable names; mock external dependencies (DB, APIs, filesystem)
52
+ - Match existing file structure and conventions
53
+
54
+ **After writing tests for each module:**
55
+ - Run them — they must pass
56
+ - If a test reveals an actual bug, DO NOT fix it. Mark as skipped with `// BUG: [description]` and document in the report
57
+
58
+ ### Phase 4: End-to-End Tests
59
+
60
+ **If browser automation (Playwright MCP, etc.) is available:**
61
+ - Test critical user journeys: sign up/login/logout, core product workflow, payment/checkout, settings, any CRUD flow
62
+ - For each: happy path, validation errors, navigation, state persistence
63
+
64
+ **If not available:**
65
+ - Write API-level integration tests for critical endpoints
66
+ - Include auth in setup; test sequences representing real user workflows
67
+
68
+ **E2E standards:** Independent tests, self-managed test data with cleanup, deterministic data (not random), proper async waits (no `sleep()`), test user experience not implementation.
69
+
70
+ ### Phase 5: Mutation Testing on Critical Business Logic
71
+
72
+ Coverage tells you lines were executed, not that tests would catch bugs on those lines. Manual mutation testing answers: "If I introduced a bug, would any test catch it?"
73
+
74
+ **Step 1: Select targets (10-20 functions)**
75
+ Focus on functions where a silent bug causes: financial impact (pricing, billing, tax), data corruption (DB writes, import/export, migrations), security bypass (auth, permissions, input validation), or incorrect business decisions (analytics, threshold checks, eligibility, scoring).
76
+
77
+ Skip: presentation/UI logic, logging, test utilities, config/bootstrap, code already covered by strong contract/E2E tests.
78
+
79
+ **Step 2: Apply mutations one at a time**
80
+ For each target, apply mutations from these categories (prioritize comparison/boundary first, then arithmetic, logical, null/empty):
81
+
82
+ - **Arithmetic**: `+↔-`, `*↔/`, `%→*`, `+1→-1`, remove operation (`a+b→a`)
83
+ - **Comparison**: `>↔>=`, `<↔<=`, `==↔!=`, `>↔<`
84
+ - **Boundary**: constants ±1, array index bounds ±1, string slice ±1
85
+ - **Logical**: `&&↔||`, remove negation, remove conditional branch, `true↔false`, remove early return
86
+ - **Null/empty**: return `null`, `[]`, `{}`, `0`, or `""` instead of computed value
87
+
88
+ **For each mutation:**
89
+ 1. Make the single change
90
+ 2. Run relevant test file(s) only (not full suite)
91
+ 3. Record: **KILLED** (test failed ✓), **SURVIVED** (tests pass — gap found), **TIMED OUT** (inconclusive), or **COMPILE ERROR** (type safety win)
92
+ 4. REVERT immediately. Verify original tests pass before next mutation.
93
+
94
+ **Step 3: Write tests for surviving mutants**
95
+ For every surviving mutation, write a test that fails with the mutation and passes without it. Verify the kill by re-applying the mutation. Revert and commit: `test: add mutation-killing test for [function] — [mutation type]`
96
+
97
+ **Step 4: Assess type system kills**
98
+ Note which mutation categories types catch automatically vs. which need tests. Document functions where stronger types would improve coverage (feeds into Type Safety prompt).
99
+
100
+ **Step 5: Calculate mutation scores**
101
+ Per function: mutation score = (killed by tests + killed by types) / total × 100%. Below 80% on critical logic is a red flag.
102
+
103
+ ### Phase 6: Test Quality Assessment
104
+ For all tests (existing and new):
105
+ - Are assertions meaningful? (Calling functions without asserting results is useless)
106
+ - Are tests testing the unit or just testing mocks?
107
+ - Cross-reference Phase 5: functions with low mutation scores despite high line coverage are top priority
108
+ - For critical logic not covered by Phase 5: try flipping a comparison or removing a conditional — would any test catch it?
109
+
110
+ ## Report
111
+
112
+ Create `audit-reports/` in project root if needed. Save as `audit-reports/02_TEST_COVERAGE_REPORT_[run-number]_[date]_[time in user's local time].md`, incrementing run number based on existing reports.
113
+
114
+ ### Sections:
115
+ 1. **Summary** — Starting/ending coverage %, test files created, test cases written, pass/fail/skip counts, mutation score on critical logic, smoke test results (pass/fail)
116
+ 2. **Smoke Test Results** — Pass/fail status for each smoke test. If any failed, document what was broken and whether it was resolved before deeper testing proceeded.
117
+ 3. **Coverage Gap Analysis** — Uncovered modules by priority; covered vs. remaining
118
+ 4. **Bugs Discovered** — File, line, description, severity, and the skipped test that reveals it
119
+ 5. **Mutation Testing Results**
120
+ - Per-function table: Function | File | Risk | Mutations | Killed (tests) | Killed (types) | Survived | Score
121
+ - Overall mutation score for critical logic
122
+ - Surviving mutants addressed (new tests): Function | Mutation | New Test | Confirms Kill?
123
+ - Surviving mutants NOT addressed: Function | Mutation | Why Survived | Risk
124
+ - Type system effectiveness analysis; functions needing stronger types
125
+ 6. **Tests Written** — Organized by module with brief descriptions
126
+ 7. **Remaining Gaps** — What needs coverage and why (time, complexity, infra); functions with low mutation scores
127
+ 8. **Testing Infrastructure Recommendations** — Missing utilities, suggested patterns, infra improvements, whether a mutation framework (Stryker, mutmut, etc.) is worth adopting
128
+
129
+ ## Rules
130
+ - Branch: `test-coverage-[date]`
131
+ - Every test must pass (or be explicitly skipped with a bug comment)
132
+ - Match existing conventions — don't introduce new frameworks
133
+ - Don't modify source code — test what exists
134
+ - Document genuinely untestable functions in the report
135
+ - Prioritize CRITICAL/HIGH. Don't spend time on LOW if CRITICAL gaps remain.
136
+ - Quality over quantity. 50 meaningful tests > 200 trivial ones.
137
+ - NEVER commit a mutation. Always revert and verify before proceeding.
138
+ - Focus mutation testing on 10-20 critical functions, not the entire codebase.
139
+ - If mutation testing a single function exceeds 20 minutes, move on and note it.
140
+ - When a mutation survives, write a killing test before moving to the next function.
141
+ - Skip mutations a linter/formatter would catch — focus on plausible real-world bugs.
142
+ - If any smoke test fails, document the failure as CRITICAL before proceeding to deeper phases.
143
+ - You have all night. Be thorough.
144
+
145
+ ## Chat Output Requirement
146
+
147
+ In addition to writing the full report file, you MUST print a summary directly in the conversation when you finish. Do not make the user open the report to get the highlights. The chat summary should include:
148
+
149
+ ### 1. Status Line
150
+ One sentence: what you did, how long it took, and whether all tests still pass.
151
+
152
+ ### 2. Key Findings
153
+ The most important things discovered — bugs, risks, wins, or surprises. Each bullet should be specific and actionable, not vague. Lead with severity or impact.
154
+
155
+ **Good:** "CRITICAL: No backup configuration found for the primary Postgres database — total data loss risk."
156
+ **Bad:** "Found some issues with backups."
157
+
158
+ ### 3. Changes Made (if applicable)
159
+ Bullet list of what was actually modified, added, or removed. Skip this section for read-only analysis runs.
160
+
161
+ ### 4. Recommendations
162
+
163
+ If there are legitimately beneficial recommendations worth pursuing right now, present them in a table. Do **not** force recommendations — if the audit surfaced no actionable improvements, simply state that no recommendations are warranted at this time and move on.
164
+
165
+ When recommendations exist, use this table format:
166
+
167
+ | # | Recommendation | Impact | Risk if Ignored | Worth Doing? | Details |
168
+ |---|---|---|---|---|---|
169
+ | *Sequential number* | *Short description (≤10 words)* | *What improves if addressed* | *Low / Medium / High / Critical* | *Yes / Probably / Only if time allows* | *1–3 sentences explaining the reasoning, context, or implementation guidance* |
170
+
171
+ Order rows by risk descending (Critical → High → Medium → Low). Be honest in the "Worth Doing?" column — not everything flagged is worth the engineering time. If a recommendation is marginal, say so.
172
+
173
+ ### 5. Report Location
174
+ State the full path to the detailed report file for deeper review.
175
+
176
+ ---
177
+
178
+ **Formatting rules for chat output:**
179
+ - Use markdown headers, bold for severity labels, and bullet points for scannability.
180
+ - Do not duplicate the full report contents — just the highlights and recommendations.
181
+ - If you made zero findings in a phase, say so in one line rather than omitting it silently.