@design-ai/cli 4.55.0 → 4.56.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.
Files changed (52) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +39 -0
  3. package/README.ko.md +7 -7
  4. package/README.md +9 -9
  5. package/cli/lib/mcp-server.mjs +208 -10
  6. package/cli/lib/site-analysis.mjs +297 -0
  7. package/cli/lib/site-args.mjs +433 -0
  8. package/cli/lib/site-bundle-build.mjs +127 -0
  9. package/cli/lib/site-bundle-check.mjs +454 -0
  10. package/cli/lib/site-bundle-commands.mjs +95 -0
  11. package/cli/lib/site-bundle-compare.mjs +157 -0
  12. package/cli/lib/site-bundle-contract.mjs +79 -0
  13. package/cli/lib/site-bundle-files.mjs +87 -0
  14. package/cli/lib/site-bundle-handoff-runbook-actions.mjs +113 -0
  15. package/cli/lib/site-bundle-handoff-runbook-evidence-fields.mjs +164 -0
  16. package/cli/lib/site-bundle-handoff-runbook-evidence.mjs +334 -0
  17. package/cli/lib/site-bundle-handoff-runbook-format.mjs +31 -0
  18. package/cli/lib/site-bundle-handoff-runbook-stage-metadata.mjs +84 -0
  19. package/cli/lib/site-bundle-handoff-runbook.mjs +1331 -0
  20. package/cli/lib/site-bundle-handoff-summary.mjs +183 -0
  21. package/cli/lib/site-bundle-handoff.mjs +271 -0
  22. package/cli/lib/site-bundle-readme.mjs +98 -0
  23. package/cli/lib/site-bundle-repair-report.mjs +143 -0
  24. package/cli/lib/site-bundle-repair.mjs +68 -0
  25. package/cli/lib/site-content.mjs +399 -0
  26. package/cli/lib/site-evidence.mjs +35 -0
  27. package/cli/lib/site-mcp-commands.mjs +28 -0
  28. package/cli/lib/site-mcp-probes.mjs +159 -0
  29. package/cli/lib/site-mcp-readiness.mjs +157 -0
  30. package/cli/lib/site-mcp-report.mjs +324 -0
  31. package/cli/lib/site-next-actions.mjs +333 -0
  32. package/cli/lib/site-options.mjs +104 -0
  33. package/cli/lib/site-prompts.mjs +332 -0
  34. package/cli/lib/site-starter.mjs +153 -0
  35. package/cli/lib/site-strings.mjs +23 -0
  36. package/cli/lib/site-tasks.mjs +93 -0
  37. package/cli/lib/site-workflow-graph.mjs +309 -0
  38. package/cli/lib/site-workspace.mjs +492 -0
  39. package/cli/lib/site.mjs +108 -6617
  40. package/docs/DISTRIBUTION.ko.md +35 -6
  41. package/docs/DISTRIBUTION.md +35 -8
  42. package/docs/RELEASE-CHECKLIST.md +20 -3
  43. package/docs/ROADMAP.md +2179 -0
  44. package/docs/external-status.md +22 -7
  45. package/docs/integrations/design-ai-mcp-server.md +32 -0
  46. package/docs/integrations/vscode-walkthrough.ko.md +3 -3
  47. package/docs/integrations/vscode-walkthrough.md +3 -3
  48. package/docs/site-overrides/main.html +1 -1
  49. package/package.json +1 -1
  50. package/tools/audit/package-smoke.py +106 -0
  51. package/tools/audit/registry-smoke.py +378 -10
  52. package/tools/audit/smoke_assertions.py +83 -22
package/docs/ROADMAP.md CHANGED
@@ -1,5 +1,2184 @@
1
1
  # Roadmap
2
2
 
3
+ ## Phase 753 — MCP Protocol Hardening Release (v4.56.0) ✓ ready
4
+
5
+ The next public package release groups the post-v4.55 MCP protocol hardening work and the published MCP client evidence refresh into one versioned handoff.
6
+
7
+ ### Changed
8
+ - Hardened JSON-RPC envelope, method, id, params, notification, initialize, and tools/call validation paths so malformed MCP requests fail before CLI execution.
9
+ - Preserved existing Claude Code, Codex, Website Improvement, package smoke, and registry smoke contracts while making invalid inputs easier to diagnose.
10
+ - Refreshed public npm MCP entrypoint evidence and local Claude/Codex MCP client connection evidence.
11
+
12
+ ### Verified
13
+ - All 8 audits passed.
14
+ - `npm run release:check`.
15
+ - `npm run release:metadata`.
16
+ - `npm run audit:strict`.
17
+ - `git diff --check`.
18
+ - Main-branch GitHub Actions passed for `Design-AI audit` and `Deploy doc site` after the MCP evidence refresh.
19
+
20
+ ### Versions
21
+ - `package.json` + `.claude-plugin/plugin.json`: 4.55.0 → 4.56.0.
22
+ - `vscode-extension/package.json`: remains 0.4.1.
23
+
24
+ ### What this enables
25
+ - Claude Code and Codex users get deterministic MCP protocol errors for malformed requests while valid local stdio tool calls stay unchanged.
26
+ - Maintainers can publish the hardened MCP server with current evidence for public npm and local client connection paths.
27
+
28
+ ### What's still ahead
29
+ - Push the v4.56.0 release commit and tag, then verify npm publish, GitHub Release, registry smoke, and docs deployment workflows.
30
+ - Refresh Homebrew formula SHA-256 after the v4.56.0 tag tarball is available.
31
+
32
+ ## Phase 752 — Published MCP Client Connection Evidence Refresh (unreleased)
33
+
34
+ The external distribution status now includes current proof that the published npm MCP entrypoint and local Claude Code / Codex MCP client registrations are usable.
35
+
36
+ ### Changed
37
+ - Refreshed npm registry and VS Code Marketplace status evidence for the current published versions.
38
+ - Added public npm `design-ai-mcp` protocol-smoke evidence from a clean temporary directory.
39
+ - Added local Claude Code and Codex MCP client status evidence for the clone-backed `design-ai` server.
40
+ - Documented the npm one-shot verification gotcha when running from inside the package source checkout.
41
+
42
+ ### Impact
43
+ - Operators can distinguish already-published package state from actions that would fail by republishing the same version.
44
+ - Claude Code and Codex setup guidance now has current evidence for both client connection and public npm entrypoint behavior.
45
+ - No runtime code, package version, public API, or release workflow behavior changed.
46
+
47
+ ### Verification Plan
48
+ - `npm view @design-ai/cli version name time.modified dist-tags --json`
49
+ - VS Code Marketplace Gallery API query for `sungjin.design-ai-vscode`
50
+ - Public npm MCP protocol smoke with `npm exec --yes --package=@design-ai/cli@4.55.0 -- design-ai-mcp`
51
+ - `codex mcp get design-ai`
52
+ - `claude mcp list`
53
+ - `git diff --check`
54
+
55
+ ## Phase 751 — design-ai MCP Initialize Blank Protocol Version Guard (unreleased)
56
+
57
+ The MCP stdio server now rejects blank-only `initialize.params.protocolVersion` strings with JSON-RPC `-32602`, so version negotiation inputs must be meaningful strings when provided.
58
+
59
+ ### Changed
60
+ - Added a blank-string guard for `initialize.params.protocolVersion`.
61
+ - Added unit coverage for whitespace-only protocol versions.
62
+ - Preserved fallback behavior for unsupported but non-empty protocol version strings.
63
+
64
+ ### Impact
65
+ - Claude Code, Codex, and other MCP clients get clear invalid-params feedback for malformed initialize version negotiation.
66
+ - Valid initialize requests, omitted initialize params, unsupported non-empty string protocol versions, notifications, ping, tools/list, tools/call, resources/list, prompts/list, package smoke, Website Improvement readiness behavior, and CLI runtime failure reporting stay unchanged.
67
+
68
+ ### Verification Plan
69
+ - `node --check cli/lib/mcp-server.mjs`
70
+ - `node --test cli/lib/mcp-server.test.mjs`
71
+ - `npm test`
72
+ - `npm run audit:strict`
73
+ - `npm run release:metadata`
74
+ - `npm run package:smoke:self-test`
75
+ - `npm run release:check`
76
+ - `git diff --check`
77
+
78
+ ## Phase 750 — design-ai MCP Blank String Argument Guard (unreleased)
79
+
80
+ The MCP stdio server now rejects blank-only string arguments for schema fields that declare `minLength`, so required text inputs fail as JSON-RPC `-32602` before CLI invocation instead of surfacing later as tool execution errors.
81
+
82
+ ### Changed
83
+ - Added whitespace-only validation for MCP string inputs with `minLength`.
84
+ - Added unit coverage proving a blank `design_ai_route.brief` is rejected before the CLI runner is called.
85
+ - Kept optional string fields without `minLength` on their existing CLI-mapping path.
86
+
87
+ ### Impact
88
+ - Claude Code, Codex, and other MCP clients get immediate invalid-params feedback for blank required text fields.
89
+ - Valid non-empty strings, optional string omission, initialize, notifications, ping, tools/list, tools/call success, resources/list, prompts/list, package smoke, Website Improvement readiness behavior, and CLI runtime failure reporting stay unchanged.
90
+
91
+ ### Verification Plan
92
+ - `node --check cli/lib/mcp-server.mjs`
93
+ - `node --test cli/lib/mcp-server.test.mjs`
94
+ - `npm test`
95
+ - `npm run audit:strict`
96
+ - `npm run release:metadata`
97
+ - `npm run package:smoke:self-test`
98
+ - `npm run release:check`
99
+ - `git diff --check`
100
+
101
+ ## Phase 749 — design-ai MCP Notification Namespace Guard (unreleased)
102
+
103
+ The MCP stdio server now treats the whole `notifications/` method namespace consistently: notification messages must not include request ids, and valid id-less notifications are ignored without writing a response.
104
+
105
+ ### Changed
106
+ - Added a small notification-method predicate for the `notifications/` namespace.
107
+ - Generalized the request-id rejection from `notifications/initialized` to every `notifications/*` method.
108
+ - Preserved silent handling for valid id-less notifications, including unsupported notification names that the local server does not need to act on.
109
+ - Added unit and subprocess coverage for `notifications/progress` with and without ids.
110
+
111
+ ### Impact
112
+ - Claude Code, Codex, and other MCP clients get deterministic `-32600` feedback when a notification is accidentally sent as a request.
113
+ - Valid initialized notifications, progress-style notifications without ids, initialize, ping, tools/list, tools/call, resources/list, prompts/list, package smoke, Website Improvement readiness behavior, and CLI runtime failure reporting stay unchanged.
114
+
115
+ ### Verification Plan
116
+ - `node --check cli/lib/mcp-server.mjs`
117
+ - `node --test cli/lib/mcp-server.test.mjs`
118
+ - `npm test`
119
+ - `npm run audit:strict`
120
+ - `npm run release:metadata`
121
+ - `npm run package:smoke:self-test`
122
+ - `npm run release:check`
123
+ - `git diff --check`
124
+
125
+ ## Phase 748 — design-ai MCP Initialize Protocol Version Type Guard (unreleased)
126
+
127
+ The MCP stdio server now rejects non-string `initialize.params.protocolVersion` values with JSON-RPC `-32602`, so malformed initialize payloads get the same explicit invalid-params handling as other MCP request parameter mistakes.
128
+
129
+ ### Changed
130
+ - Added a focused initialize params validator that keeps optional params supported while checking `protocolVersion` when provided.
131
+ - Added unit coverage for numeric `protocolVersion` values so the server no longer silently falls back when the client sends the wrong JSON type.
132
+
133
+ ### Impact
134
+ - Claude Code, Codex, and other MCP clients get deterministic feedback when initialize version negotiation is malformed.
135
+ - Valid initialize requests, omitted initialize params, unsupported string protocol versions, initialized notifications, ping, tools/list, tools/call, resources/list, prompts/list, package smoke, Website Improvement readiness behavior, and CLI runtime failure reporting stay unchanged.
136
+
137
+ ### Verification Plan
138
+ - `node --check cli/lib/mcp-server.mjs`
139
+ - `node --test cli/lib/mcp-server.test.mjs`
140
+ - `npm test`
141
+ - `npm run audit:strict`
142
+ - `npm run release:metadata`
143
+ - `npm run package:smoke:self-test`
144
+ - `npm run release:check`
145
+ - `git diff --check`
146
+
147
+ ## Phase 747 — design-ai MCP Tool Argument Invalid Params Guard (unreleased)
148
+
149
+ The MCP stdio server now returns JSON-RPC `-32602` for schema-invalid `tools/call.params.arguments` payloads before CLI execution, so known-tool argument errors use the same invalid-params response shape as malformed `tools/call.params`.
150
+
151
+ ### Changed
152
+ - Added pre-execution tool schema argument validation inside the `tools/call` request branch.
153
+ - Converted unknown tool arguments and wrong argument types from successful MCP tool-result errors to JSON-RPC invalid params errors.
154
+ - Preserved CLI failure reporting as successful MCP tool results with `isError: true`.
155
+ - Updated package and registry smoke assertions so publish-time MCP protocol checks verify the JSON-RPC invalid-params response shape.
156
+
157
+ ### Impact
158
+ - Claude Code, Codex, and other MCP clients can handle known-tool schema mistakes through standard JSON-RPC invalid-params handling.
159
+ - Valid initialize, id-less initialized notifications, ping, tools/list, resources/list, prompts/list, id-bearing tools/call, request id validation, output truncation, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, learning write behavior, and CLI runtime failure reporting stay unchanged.
160
+ - Package and registry smoke coverage now treats schema-invalid known-tool arguments as JSON-RPC invalid params instead of successful MCP tool-result errors.
161
+
162
+ ### Verification Plan
163
+ - `node --check cli/lib/mcp-server.mjs`
164
+ - `node --test cli/lib/mcp-server.test.mjs`
165
+ - `npm test`
166
+ - `npm run audit:strict`
167
+ - `npm run release:metadata`
168
+ - `npm run package:smoke:self-test`
169
+ - `npm run release:check`
170
+ - `git diff --check`
171
+
172
+ ## Phase 746 — design-ai MCP Response Request ID Guard (unreleased)
173
+
174
+ The MCP stdio server now requires request ids for every response-bearing MCP method, so `initialize`, `ping`, `tools/list`, `tools/call`, `resources/list`, and `prompts/list` cannot be sent as silent notifications.
175
+
176
+ ### Changed
177
+ - Added an explicit response-method set for MCP methods that must include a request id.
178
+ - Reused the same request-id guard across initialize, ping, list methods, and tools/call.
179
+ - Added unit and subprocess coverage for id-less response-bearing MCP methods while preserving silent handling for valid initialized notifications.
180
+
181
+ ### Impact
182
+ - Claude Code, Codex, and other MCP clients get deterministic feedback when response-bearing MCP requests are accidentally sent without correlation ids.
183
+ - Valid initialize, id-less initialized notifications, ping, tools/list, resources/list, prompts/list, id-bearing tools/call, request id validation, argument validation, output truncation, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
184
+
185
+ ### Verification Plan
186
+ - `node --check cli/lib/mcp-server.mjs`
187
+ - `node --test cli/lib/mcp-server.test.mjs`
188
+ - `npm test`
189
+ - `npm run audit:strict`
190
+ - `npm run release:metadata`
191
+ - `npm run package:smoke:self-test`
192
+ - `npm run release:check`
193
+ - `git diff --check`
194
+
195
+ ## Phase 745 — design-ai MCP Tool Call Request ID Guard (unreleased)
196
+
197
+ The MCP stdio server now rejects `tools/call` payloads that omit a request id before any CLI work starts, so request-shaped tool execution cannot run silently as a JSON-RPC notification.
198
+
199
+ ### Changed
200
+ - Added a `tools/call` request-id requirement guard before tool lookup or CLI invocation.
201
+ - Preserved normal `tools/call` behavior for valid string, number, and null ids.
202
+ - Added unit and subprocess coverage proving id-less `tools/call` receives `-32600` feedback and does not execute the CLI.
203
+
204
+ ### Impact
205
+ - Claude Code, Codex, and other MCP clients get deterministic feedback when a tool invocation is accidentally sent without a correlation id.
206
+ - Valid initialize, id-less initialized notifications, ping, tools/list, resources/list, prompts/list, id-bearing tools/call, request id validation, argument validation, output truncation, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
207
+
208
+ ### Verification Plan
209
+ - `node --check cli/lib/mcp-server.mjs`
210
+ - `node --test cli/lib/mcp-server.test.mjs`
211
+ - `npm test`
212
+ - `npm run audit:strict`
213
+ - `npm run release:metadata`
214
+ - `npm run package:smoke:self-test`
215
+ - `npm run release:check`
216
+ - `git diff --check`
217
+
218
+ ## Phase 744 — design-ai MCP Optional Params Container Guard (unreleased)
219
+
220
+ The MCP stdio server now validates optional `params` containers for `ping`, `tools/list`, `resources/list`, and `prompts/list`, so malformed array, string, null, or boolean params receive deterministic `-32602` feedback instead of being silently accepted.
221
+
222
+ ### Changed
223
+ - Added a shared optional object-params guard for no-body MCP methods that still accept future object-shaped params.
224
+ - Preserved successful handling for omitted params and `{}` params on `ping` and `tools/list`.
225
+ - Added unit coverage for malformed optional params on `ping`, `tools/list`, `resources/list`, and `prompts/list`.
226
+
227
+ ### Impact
228
+ - Claude Code, Codex, and other MCP clients get clearer invalid-params feedback when list or ping requests carry malformed params.
229
+ - Valid initialize, id-less initialized notifications, ping, tools/list, resources/list, prompts/list, tools/call, request id validation, argument validation, output truncation, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
230
+
231
+ ### Verification Plan
232
+ - `node --check cli/lib/mcp-server.mjs`
233
+ - `node --test cli/lib/mcp-server.test.mjs`
234
+ - `npm test`
235
+ - `npm run audit:strict`
236
+ - `npm run release:metadata`
237
+ - `npm run package:smoke:self-test`
238
+ - `npm run release:check`
239
+ - `git diff --check`
240
+
241
+ ## Phase 743 — design-ai MCP Initialized Notification ID Guard (unreleased)
242
+
243
+ The MCP stdio server now rejects `notifications/initialized` payloads that include an `id`, so request-shaped initialized notifications receive deterministic `-32600` feedback instead of being silently dropped.
244
+
245
+ ### Changed
246
+ - Added a notification-shape guard for `notifications/initialized`.
247
+ - Preserved silent handling for valid id-less initialized notifications.
248
+ - Added unit and subprocess coverage for request-shaped initialized notification payloads.
249
+
250
+ ### Impact
251
+ - Claude Code, Codex, and other MCP clients get a clear protocol error when an initialized notification is accidentally sent as a request.
252
+ - Valid id-less notifications, initialize, tools/list, tools/call, request id validation, argument validation, output truncation, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
253
+
254
+ ### Verification Plan
255
+ - `node --check cli/lib/mcp-server.mjs`
256
+ - `node --test cli/lib/mcp-server.test.mjs`
257
+ - `npm test`
258
+ - `npm run audit:strict`
259
+ - `npm run release:metadata`
260
+ - `npm run package:smoke:self-test`
261
+ - `npm run release:check`
262
+ - `git diff --check`
263
+
264
+ ## Phase 742 — design-ai MCP Request ID Guard (unreleased)
265
+
266
+ The MCP stdio server now validates JSON-RPC request ids before dispatch, so malformed object, array, or boolean ids receive deterministic `-32600` feedback with `id: null` instead of being echoed back to clients.
267
+
268
+ ### Changed
269
+ - Added a JSON-RPC request id guard for `string`, `number`, and `null` ids.
270
+ - Normalized invalid request ids to `id: null` in protocol error responses.
271
+ - Added unit and subprocess coverage for invalid object, array, and boolean id payloads while preserving explicit `id: null` requests.
272
+
273
+ ### Impact
274
+ - Claude Code, Codex, and other MCP clients get clearer protocol feedback when request correlation ids are malformed.
275
+ - Valid string, number, and null ids, notifications, initialize, tools/list, tools/call, argument validation, output truncation, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
276
+
277
+ ### Verification Plan
278
+ - `node --check cli/lib/mcp-server.mjs`
279
+ - `node --test cli/lib/mcp-server.test.mjs`
280
+ - `npm test`
281
+ - `npm run audit:strict`
282
+ - `npm run release:metadata`
283
+ - `npm run package:smoke:self-test`
284
+ - `npm run release:check`
285
+ - `git diff --check`
286
+
287
+ ## Phase 741 — design-ai MCP JSON-RPC Envelope Guard (unreleased)
288
+
289
+ The MCP stdio server now rejects requests without `jsonrpc: "2.0"` before method dispatch, so malformed clients cannot reach normal initialize/list/call handlers with an invalid JSON-RPC envelope.
290
+
291
+ ### Changed
292
+ - Added a JSON-RPC envelope guard before MCP method validation.
293
+ - Preserved deterministic `-32600` responses for id-less malformed requests.
294
+ - Added unit and subprocess coverage for missing and unsupported `jsonrpc` payloads.
295
+
296
+ ### Impact
297
+ - Claude Code, Codex, and other MCP clients get clearer protocol feedback when a malformed JSON-RPC envelope reaches the stdio server.
298
+ - Valid JSON-RPC 2.0 initialize, notifications, tools/list, tools/call, argument validation, output truncation, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
299
+
300
+ ### Verification Plan
301
+ - `node --check cli/lib/mcp-server.mjs`
302
+ - `node --test cli/lib/mcp-server.test.mjs`
303
+ - `npm test`
304
+ - `npm run audit:strict`
305
+ - `npm run release:metadata`
306
+ - `npm run package:smoke:self-test`
307
+ - `npm run release:check`
308
+ - `git diff --check`
309
+
310
+ ## Phase 740 — design-ai MCP Request Method Shape Guard (unreleased)
311
+
312
+ The MCP stdio server now treats non-string or empty request methods as JSON-RPC invalid requests, so malformed notification-like payloads without ids still receive deterministic `-32600` feedback while valid notifications remain silent.
313
+
314
+ ### Changed
315
+ - Added a request-method shape guard before MCP method dispatch.
316
+ - Updated stdio response writing so id-less `-32600` invalid requests are emitted without also responding to valid unknown-method notifications.
317
+ - Added unit and subprocess coverage for numeric and empty `method` payloads.
318
+
319
+ ### Impact
320
+ - Claude Code, Codex, and other MCP clients get clearer protocol feedback when a malformed request method reaches the stdio server.
321
+ - Valid notifications, unknown-method notifications without ids, initialize, tools/list, tools/call, argument validation, output truncation, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
322
+
323
+ ### Verification Plan
324
+ - `node --check cli/lib/mcp-server.mjs`
325
+ - `node --test cli/lib/mcp-server.test.mjs`
326
+ - `npm test`
327
+ - `npm run audit:strict`
328
+ - `npm run release:metadata`
329
+ - `npm run package:smoke:self-test`
330
+ - `npm run release:check`
331
+ - `git diff --check`
332
+
333
+ ## Phase 739 — design-ai MCP Tool Arguments Container Guard (unreleased)
334
+
335
+ The MCP server now rejects malformed `tools/call.params.arguments` containers before tool lookup or CLI execution, so omitted arguments still default to `{}` while explicit `null`, array, or primitive argument payloads return JSON-RPC `-32602` feedback.
336
+
337
+ ### Changed
338
+ - Added a `tools/call.params.arguments` object-shape check to the MCP request boundary.
339
+ - Preserved omitted `arguments` support for no-argument tools such as `design_ai_version`.
340
+ - Added unit coverage for `arguments: null` and array argument payloads.
341
+
342
+ ### Impact
343
+ - Claude Code, Codex, and other MCP clients get clearer protocol feedback when a tool call includes a malformed arguments container.
344
+ - Normal `tools/call` execution, tool-schema argument validation, unknown-tool handling, initialize, notifications, tools/list, package smoke, Website Improvement readiness behavior, external MCP call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
345
+
346
+ ### Verification Plan
347
+ - `node --check cli/lib/mcp-server.mjs`
348
+ - `node --test cli/lib/mcp-server.test.mjs`
349
+ - `npm test`
350
+ - `npm run audit:strict`
351
+ - `npm run release:metadata`
352
+ - `npm run package:smoke:self-test`
353
+ - `npm run release:check`
354
+ - `git diff --check`
355
+
356
+ ## Phase 738 — design-ai MCP Invalid Request Stdio Response (unreleased)
357
+
358
+ The MCP stdio server now distinguishes valid notifications from malformed request objects without ids, so invalid JSON-RPC payloads such as `{}`, `[]`, or `null` receive deterministic `-32600` responses with `id: null` while normal `notifications/initialized` messages remain silent.
359
+
360
+ ### Changed
361
+ - Added a small response-write predicate for MCP stdio output.
362
+ - Preserved silent handling for valid JSON-RPC notifications.
363
+ - Added subprocess coverage for invalid request objects without ids.
364
+
365
+ ### Impact
366
+ - Claude Code, Codex, and other MCP clients get clearer protocol feedback when a malformed payload reaches the stdio server.
367
+ - Valid initialize requests, notifications, tools/list, tools/call, CLI argument mapping, output truncation, Website Improvement readiness behavior, external call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
368
+
369
+ ### Verification Plan
370
+ - `node --check cli/lib/mcp-server.mjs`
371
+ - `node --test cli/lib/mcp-server.test.mjs`
372
+ - `npm test`
373
+ - `npm run audit:strict`
374
+ - `npm run release:metadata`
375
+ - `git diff --check`
376
+
377
+ ## Phase 737 — design-ai MCP Request Param Guard (unreleased)
378
+
379
+ The MCP server now rejects malformed `initialize` and `tools/call` request parameters at the protocol boundary, so Claude Code and Codex clients get clear JSON-RPC `-32602` errors instead of less specific request handling or internal exceptions.
380
+
381
+ ### Changed
382
+ - Added a small MCP request-boundary guard for `tools/call` params.
383
+ - Added a matching MCP request-boundary guard for `initialize` params.
384
+ - Added unit coverage for malformed `initialize` params, `tools/call` `params: null`, and missing `params.name`.
385
+
386
+ ### Impact
387
+ - Malformed MCP clients receive deterministic protocol errors instead of falling into less specific request handling.
388
+ - Valid tool calls, tool schemas, CLI argument mapping, output truncation, protocol version fallback, Website Improvement readiness behavior, external call boundaries, target-repo mutation rules, and learning write behavior stay unchanged.
389
+
390
+ ### Verification Plan
391
+ - `node --test cli/lib/mcp-server.test.mjs`
392
+ - `npm test`
393
+ - `npm run audit:strict`
394
+ - `npm run release:metadata`
395
+ - `git diff --check`
396
+
397
+ ## Phase 736 — design-ai MCP Test Subprocess Readability (unreleased)
398
+
399
+ MCP stdio subprocess tests now share one small response collector, so parse-error and route-call smoke tests read as protocol scenarios instead of repeated stream plumbing.
400
+
401
+ ### Changed
402
+ - Added a focused MCP subprocess test helper for stdout line buffering and JSON-RPC response collection.
403
+ - Reused the helper in stdio parse-error and initialize/list/route subprocess tests.
404
+ - Kept timeout cleanup explicit so failed subprocess tests do not leave a child process running.
405
+
406
+ ### Impact
407
+ - MCP test code is easier to scan while preserving the same runtime behavior and assertions.
408
+ - No MCP server implementation, protocol response shape, tool schema, CLI mapping, package contents, Website Improvement readiness output, external call boundary, or learning write behavior changes.
409
+
410
+ ### Verification Plan
411
+ - `node --test cli/lib/mcp-server.test.mjs`
412
+ - `npm test`
413
+ - `npm run audit:strict`
414
+ - `npm run release:metadata`
415
+ - `git diff --check`
416
+
417
+ ## Phase 735 — design-ai MCP Negative Response Coverage (unreleased)
418
+
419
+ The MCP server test suite now pins common client failure paths, so malformed Claude/Codex requests keep returning deterministic JSON-RPC errors without starting the design-ai CLI unnecessarily.
420
+
421
+ ### Changed
422
+ - Added coverage for unknown MCP tool calls to prove the CLI runner is not invoked.
423
+ - Added request-level error coverage for missing and unsupported MCP methods.
424
+ - Added stdio subprocess coverage for invalid JSON input and parse-error responses.
425
+
426
+ ### Impact
427
+ - Claude Code and Codex integrations get stronger regression coverage for setup mistakes and malformed client messages.
428
+ - The existing MCP runtime behavior, tool names, schemas, protocol version fallback, CLI command mappings, output truncation, and typed tool argument validation stay unchanged.
429
+ - No package names, Website Improvement readiness outputs, external MCP calls, target-repo mutation rules, or learning writes change.
430
+
431
+ ### Verification Plan
432
+ - `node --test cli/lib/mcp-server.test.mjs`
433
+ - `npm test`
434
+ - `npm run audit:strict`
435
+ - `npm run release:metadata`
436
+ - `git diff --check`
437
+ - `npm run release:self-test`
438
+ - `npm run release:check`
439
+
440
+ ## Phase 734 — design-ai MCP Public Registry Smoke Coverage (unreleased)
441
+
442
+ Public registry smoke now verifies the published `design-ai-mcp` bin through `npm exec --package @design-ai/cli@<version>`, so the post-publish gate covers the same Claude Code and Codex stdio server path as the packed-tarball release smoke.
443
+
444
+ ### Changed
445
+ - Moved the MCP protocol smoke input and response assertion into shared smoke helpers.
446
+ - Added public registry `design-ai-mcp` protocol coverage after `npm exec` version metadata checks.
447
+ - Added registry smoke self-test coverage for the MCP server name, expected tools, and typed invalid-argument response.
448
+
449
+ ### Impact
450
+ - Public npm verification now catches a missing `design-ai-mcp` bin, broken stdio startup, missing design-ai tools, or lost typed validation after publish.
451
+ - Package smoke and registry smoke share the same MCP protocol assertion for Claude/Codex setup paths.
452
+ - No CLI command names, package names, Website Improvement readiness outputs, external MCP calls, target-repo mutation rules, or learning writes change.
453
+
454
+ ### Verification Plan
455
+ - `python3 -m py_compile tools/audit/smoke_assertions.py tools/audit/package-smoke.py tools/audit/registry-smoke.py`
456
+ - `python3 -B tools/audit/package-smoke.py --self-test`
457
+ - `python3 -B tools/audit/registry-smoke.py --self-test`
458
+ - `npm run package:smoke:self-test`
459
+ - `npm run registry:smoke:self-test`
460
+ - `npm run release:self-test`
461
+ - `npm test`
462
+ - `npm run audit:strict`
463
+ - `npm run release:metadata`
464
+ - `python3 -B tools/audit/local-ci.py --docs-only`
465
+ - `git diff --check`
466
+ - `npm run release:check`
467
+
468
+ ## Phase 733 — design-ai MCP Package Entrypoint Smoke Coverage (unreleased)
469
+
470
+ Packed-tarball release smoke now verifies the standalone `design-ai-mcp` bin after package installation and through one-shot `npm exec`, so Claude Code and Codex MCP setup cannot silently lose the stdio server entrypoint.
471
+
472
+ ### Changed
473
+ - Added a package-smoke MCP protocol helper that sends `initialize`, `tools/list`, and invalid `tools/call` JSON-RPC messages over stdin.
474
+ - Verified the installed `node_modules/.bin/design-ai-mcp` shim and the one-shot `npm exec --package <tarball> -- design-ai-mcp` path.
475
+ - Added self-test coverage for the MCP protocol assertion so typed argument validation remains visible in package smoke failures.
476
+
477
+ ### Impact
478
+ - Release smoke now covers the actual MCP server bin that Claude Code and Codex configuration examples use.
479
+ - The smoke keeps the same protocol version, tool names, JSON-RPC response shape, and typed validation message checked by unit tests.
480
+ - No CLI commands, package names, Website Improvement readiness outputs, external MCP calls, target-repo mutation rules, or learning writes change.
481
+
482
+ ### Verification Plan
483
+ - `python3 -B tools/audit/package-smoke.py --self-test`
484
+ - `npm run package:smoke:self-test`
485
+ - `npm run package:check`
486
+ - `npm run release:self-test`
487
+ - `npm run release:check`
488
+ - `npm test`
489
+ - `npm run audit:strict`
490
+ - `npm run release:metadata`
491
+ - `python3 -B tools/audit/local-ci.py --docs-only`
492
+ - `git diff --check`
493
+
494
+ ## Phase 732 — design-ai MCP Tool Argument Validation (unreleased)
495
+
496
+ The design-ai MCP server now validates tool arguments before invoking the CLI, so Claude Code and Codex get immediate, typed feedback for malformed tool calls instead of opaque downstream command failures.
497
+
498
+ ### Changed
499
+ - Added MCP tool argument validation for required fields, unknown fields, string length, boolean values, and integer ranges.
500
+ - Added MCP server tests proving invalid arguments are rejected before the CLI runner is called.
501
+ - Added troubleshooting notes for common Claude/Codex MCP setup and tool-call failures.
502
+
503
+ ### Impact
504
+ - `design-ai mcp` and `design-ai-mcp` keep the same tool names, schemas, protocol version, JSON-RPC response shape, and CLI command mappings.
505
+ - Claude Code and Codex integrations now fail earlier and with clearer messages when a client sends malformed tool input.
506
+ - No external MCP calls, target-repo mutation, learning writes, CLI flags, package bin names, or Website Improvement readiness contracts change.
507
+
508
+ ### Verification Plan
509
+ - `node --check cli/lib/mcp-server.mjs`
510
+ - `node --test cli/lib/mcp-server.test.mjs`
511
+ - `npm test`
512
+ - `npm run audit:strict`
513
+ - `npm run release:metadata`
514
+ - `python3 -B tools/audit/local-ci.py --docs-only`
515
+ - `git diff --check`
516
+ - `npm run package:check`
517
+ - `npm run release:self-test`
518
+ - `npm run release:check`
519
+
520
+ ## Phase 731 — Website Improvement Bundle Handoff Next Stage Command Summary Snapshot Cleanup (unreleased)
521
+
522
+ Website Improvement bundle handoff runbook next-stage command summary now groups stage classification, command metadata, and execution context into named internal snapshots before returning the same fields.
523
+
524
+ ### Changed
525
+ - Added internal next-stage snapshots for stage classification, command metadata, and execution context.
526
+ - Replaced the long inline `nextStageCommandSummary` assembly with ordered snapshot spreads while keeping the existing returned field names unchanged.
527
+
528
+ ### Impact
529
+ - `buildBundleHandoffOperatorRunbook` keeps the same `nextStage*` command and execution contract.
530
+ - Website Improvement handoff wrappers and tests can continue to consume the same next-stage kind, required flag, run policy, safety level, command lists, output files, command/manual state, and mutation boundary fields without migration.
531
+ - No CLI flags, bundle files, command manifest fields, stage/action/evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
532
+
533
+ ### Verification Plan
534
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
535
+ - `node --test cli/lib/site.test.mjs`
536
+ - `npm test`
537
+ - `npm run audit:strict`
538
+ - `npm run release:metadata`
539
+ - `python3 -B tools/audit/local-ci.py --docs-only`
540
+ - `git diff --check`
541
+ - `npm run package:check`
542
+ - `npm run release:self-test`
543
+ - `npm run release:check`
544
+
545
+ ## Phase 730 — Website Improvement Bundle Handoff Next Action Summary Snapshot Cleanup (unreleased)
546
+
547
+ Website Improvement bundle handoff runbook next-action summary now groups action basics, evidence-capture metadata, payload mapping, validation state, field rules, counts, and run context into named internal snapshots before returning the same fields.
548
+
549
+ ### Changed
550
+ - Added internal next-action snapshots for core action state, evidence-capture field metadata, payload templates and bindings, validation state, field rules, field counts, and run context.
551
+ - Replaced the long inline `nextActionSummary` assembly with ordered snapshot spreads while keeping the existing returned field names unchanged.
552
+
553
+ ### Impact
554
+ - `buildBundleHandoffOperatorRunbook` keeps the same `nextAction*` and `nextActionEvidenceCapture*` contract.
555
+ - Website Improvement handoff wrappers and tests can continue to consume the same next-action status, dependency, evidence, evidence-capture, run policy, and safety fields without migration.
556
+ - No CLI flags, bundle files, command manifest fields, stage/action/evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
557
+
558
+ ### Verification Plan
559
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
560
+ - `node --test cli/lib/site.test.mjs`
561
+ - `npm test`
562
+ - `npm run audit:strict`
563
+ - `npm run release:metadata`
564
+ - `python3 -B tools/audit/local-ci.py --docs-only`
565
+ - `git diff --check`
566
+ - `npm run package:check`
567
+ - `npm run release:self-test`
568
+ - `npm run release:check`
569
+
570
+ ## Phase 729 — Website Improvement Bundle Handoff Next Stage Evidence Capture Snapshot Cleanup (unreleased)
571
+
572
+ Website Improvement bundle handoff runbook next-stage evidence capture now groups field metadata, payload mapping, validation state, field rules, and field counts into named internal snapshots before returning the same fields.
573
+
574
+ ### Changed
575
+ - Added internal next-stage evidence-capture snapshots for field metadata, payload templates and bindings, validation state, field rules, and field counts.
576
+ - Replaced the long inline `nextStageEvidenceCapture` assembly with ordered snapshot spreads while keeping the existing returned field names unchanged.
577
+
578
+ ### Impact
579
+ - `buildBundleHandoffOperatorRunbook` keeps the same `nextStageActionEvidenceCapture*` contract.
580
+ - Website Improvement handoff wrappers and tests can continue to consume the same next-stage evidence-capture fields without migration.
581
+ - No CLI flags, bundle files, command manifest fields, stage/action/evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
582
+
583
+ ### Verification Plan
584
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
585
+ - `node --test cli/lib/site.test.mjs`
586
+ - `npm test`
587
+ - `npm run audit:strict`
588
+ - `npm run release:metadata`
589
+ - `python3 -B tools/audit/local-ci.py --docs-only`
590
+ - `git diff --check`
591
+ - `npm run package:check`
592
+ - `npm run release:self-test`
593
+ - `npm run release:check`
594
+
595
+ ## Phase 728 — Website Improvement Bundle Handoff Next Stage Human Line Summary Snapshot Cleanup (unreleased)
596
+
597
+ Website Improvement bundle handoff runbook next-stage identity now prepares the next-stage human-line summary as a named internal snapshot before returning the same identity fields.
598
+
599
+ ### Changed
600
+ - Added an internal `nextStageHumanLineSummary` snapshot for the next-stage line, evidence-progress status, progress label, and first unchecked evidence label.
601
+ - Replaced the nested inline `nextStageHumanLineSummary` assembly inside `nextStageIdentity` with a direct snapshot reference while keeping the existing returned field names unchanged.
602
+
603
+ ### Impact
604
+ - `buildBundleHandoffOperatorRunbook` keeps the same `nextStageHumanLineSummary` and `nextStageIdentity` contract.
605
+ - Website Improvement handoff wrappers and tests can continue to consume the same next-stage human-line summary fields without migration.
606
+ - No CLI flags, bundle files, command manifest fields, stage/action/evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
607
+
608
+ ### Verification Plan
609
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
610
+ - `node --test cli/lib/site.test.mjs`
611
+ - `npm test`
612
+ - `npm run audit:strict`
613
+ - `npm run release:metadata`
614
+ - `python3 -B tools/audit/local-ci.py --docs-only`
615
+ - `git diff --check`
616
+ - `npm run package:check`
617
+ - `npm run release:self-test`
618
+ - `npm run release:check`
619
+
620
+ ## Phase 727 — Website Improvement Bundle Handoff Human Line Summary Snapshot Cleanup (unreleased)
621
+
622
+ Website Improvement bundle handoff runbook human-line summary now groups count, evidence-progress, and first-value fields into named internal snapshots before returning the same summary fields.
623
+
624
+ ### Changed
625
+ - Added internal human-line summary snapshots for base counts, evidence-progress counts, and first stage/line values.
626
+ - Replaced the long inline `stageHumanLineSummary` assembly with snapshot spreads while keeping the existing summary field names unchanged.
627
+
628
+ ### Impact
629
+ - `buildBundleHandoffOperatorRunbook` keeps the same `stageHumanLineSummary` contract.
630
+ - Website Improvement handoff wrappers and tests can continue to consume the same human-line count, progress, and first-value summary fields without migration.
631
+ - No CLI flags, bundle files, command manifest fields, stage/action/evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
632
+
633
+ ### Verification Plan
634
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
635
+ - `node --test cli/lib/site.test.mjs`
636
+ - `npm test`
637
+ - `npm run audit:strict`
638
+ - `npm run release:metadata`
639
+ - `python3 -B tools/audit/local-ci.py --docs-only`
640
+ - `git diff --check`
641
+ - `npm run package:check`
642
+ - `npm run release:self-test`
643
+ - `npm run release:check`
644
+
645
+ ## Phase 726 — Website Improvement Bundle Handoff Human Line Display Row Summary Snapshot Cleanup (unreleased)
646
+
647
+ Website Improvement bundle handoff runbook human-line display row summary now groups count, action-status, evidence-progress, and first-key fields into named internal snapshots before returning the same summary fields.
648
+
649
+ ### Changed
650
+ - Added internal display-row summary snapshots for base counts, action-status counts, evidence-progress counts, and first matching row keys.
651
+ - Replaced the long inline `stageHumanLineDisplayRowSummary` assembly with snapshot spreads while keeping the existing summary field names unchanged.
652
+
653
+ ### Impact
654
+ - `buildBundleHandoffOperatorRunbook` keeps the same `stageHumanLineDisplayRowSummary` contract.
655
+ - Website Improvement handoff wrappers and tests can continue to consume the same count, status, progress, and first-key summary fields without migration.
656
+ - No CLI flags, bundle files, command manifest fields, stage/action/evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
657
+
658
+ ### Verification Plan
659
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
660
+ - `node --test cli/lib/site.test.mjs`
661
+ - `npm test`
662
+ - `npm run audit:strict`
663
+ - `npm run release:metadata`
664
+ - `python3 -B tools/audit/local-ci.py --docs-only`
665
+ - `git diff --check`
666
+ - `npm run package:check`
667
+ - `npm run release:self-test`
668
+ - `npm run release:check`
669
+
670
+ ## Phase 725 — Website Improvement Bundle Handoff Human Line Display Row Snapshot Cleanup (unreleased)
671
+
672
+ Website Improvement bundle handoff runbook human-line display rows now group row identity, execution context, action status, and evidence progress fields into named internal snapshots before returning the same display-row fields.
673
+
674
+ ### Changed
675
+ - Added internal display-row snapshots for stage identity, execution context, action status, and evidence progress metadata.
676
+ - Replaced the long inline `stageHumanLineDisplayRows` return assembly with snapshot spreads while keeping the existing display-row field names unchanged.
677
+
678
+ ### Impact
679
+ - `buildBundleHandoffOperatorRunbook` keeps the same `stageHumanLineDisplayRows[*]` contract.
680
+ - Website Improvement handoff wrappers can continue to consume the same stage line, required/manual, command count, action status, and evidence-progress display fields without migration.
681
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
682
+
683
+ ### Verification Plan
684
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
685
+ - `node --test cli/lib/site.test.mjs`
686
+ - `npm test`
687
+ - `npm run audit:strict`
688
+ - `npm run release:metadata`
689
+ - `python3 -B tools/audit/local-ci.py --docs-only`
690
+ - `git diff --check`
691
+ - `npm run package:check`
692
+ - `npm run release:self-test`
693
+ - `npm run release:check`
694
+
695
+ ## Phase 724 — Website Improvement Bundle Handoff Action Row Snapshot Cleanup (unreleased)
696
+
697
+ Website Improvement bundle handoff runbook action rows now group action identity, status, dependency, evidence, evidence-capture, and execution fields into named internal snapshots before returning the same row fields.
698
+
699
+ ### Changed
700
+ - Added internal action-row snapshots for action identity, status, dependency/completion metadata, and execution metadata.
701
+ - Replaced the long inline action-row return assembly with snapshot spreads while keeping the existing action-row field names unchanged.
702
+
703
+ ### Impact
704
+ - `buildBundleHandoffOperatorRunbook` keeps the same `stageActionRows[*]` contract.
705
+ - Website Improvement handoff wrappers can continue to consume the same action identity, status, dependency, evidence, evidence-capture, command, safety, and boundary fields without migration.
706
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
707
+
708
+ ### Verification Plan
709
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
710
+ - `node --test cli/lib/site.test.mjs`
711
+ - `npm test`
712
+ - `npm run audit:strict`
713
+ - `npm run release:metadata`
714
+ - `python3 -B tools/audit/local-ci.py --docs-only`
715
+ - `git diff --check`
716
+ - `npm run package:check`
717
+ - `npm run release:self-test`
718
+ - `npm run release:check`
719
+
720
+ ## Phase 723 — Website Improvement Bundle Handoff Stage Snapshot Cleanup (unreleased)
721
+
722
+ Website Improvement bundle handoff runbook stage assembly now groups stage identity, command metadata, and safety metadata into named internal snapshots before returning the same public stage fields.
723
+
724
+ ### Changed
725
+ - Added internal stage snapshots for stage identity, command summary, and safety summary inside `buildStage`.
726
+ - Replaced the long inline stage return assembly with snapshot spreads while keeping the existing stage field names unchanged.
727
+
728
+ ### Impact
729
+ - `buildBundleHandoffOperatorRunbook` keeps the same top-level `stages[*]` contract.
730
+ - Website Improvement handoff wrappers can continue to consume the same stage identity fields, command lists, command counts, run policies, safety levels, output files, and safety flags without migration.
731
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
732
+
733
+ ### Verification Plan
734
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
735
+ - `node --test cli/lib/site.test.mjs`
736
+ - `npm test`
737
+ - `npm run audit:strict`
738
+ - `npm run release:metadata`
739
+ - `python3 -B tools/audit/local-ci.py --docs-only`
740
+ - `git diff --check`
741
+ - `npm run package:check`
742
+ - `npm run release:self-test`
743
+ - `npm run release:check`
744
+
745
+ ## Phase 722 — Website Improvement Bundle Handoff Command Manifest Return Snapshot Cleanup (unreleased)
746
+
747
+ Website Improvement bundle handoff command manifest return assembly now groups command counts, selected task ids, and strict task command keys into named internal snapshots before returning the same public fields.
748
+
749
+ ### Changed
750
+ - Added internal return snapshots for command manifest counts, task selection ids, and strict task command keys.
751
+ - Replaced the long inline command manifest return assembly with snapshot spreads while keeping the existing returned field names unchanged.
752
+
753
+ ### Impact
754
+ - `buildBundleHandoffCommandManifest` keeps the same top-level command manifest contract.
755
+ - Website Improvement bundle handoff wrappers can continue to consume the same command counts, task ids, strict task command keys, and `commands` array without migration.
756
+ - No CLI flags, bundle files, command entries, command scopes, run policies, safety flags, task selection behavior, output-file selection, target-repo mutation rules, external-call boundaries, or generated output files change.
757
+
758
+ ### Verification Plan
759
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
760
+ - `node --test cli/lib/site.test.mjs`
761
+ - `npm test`
762
+ - `npm run audit:strict`
763
+ - `npm run release:metadata`
764
+ - `python3 -B tools/audit/local-ci.py --docs-only`
765
+ - `git diff --check`
766
+ - `npm run package:check`
767
+ - `npm run release:self-test`
768
+ - `npm run release:check`
769
+
770
+ ## Phase 721 — Website Improvement Bundle Handoff Runbook Return Snapshot Cleanup (unreleased)
771
+
772
+ Website Improvement bundle handoff runbook return assembly now groups count, stage identity, human-line, action, evidence-capture, execution, and next-step fields into named internal snapshots before returning the same public fields.
773
+
774
+ ### Changed
775
+ - Added internal return snapshots for runbook counts, stage identity maps, human-line maps, action status maps, action dependency maps, action evidence maps, evidence-capture maps, stage execution maps, and next-step summary fields.
776
+ - Replaced the long inline operator runbook return assembly with snapshot spreads while keeping the existing returned field names unchanged.
777
+
778
+ ### Impact
779
+ - `buildBundleHandoffOperatorRunbook` keeps the same top-level operator runbook contract.
780
+ - Website Improvement handoff wrappers can continue to consume the same stage maps, action maps, evidence-capture maps, `actionSummary`, next-stage fields, next-command fields, and `stages` array without migration.
781
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, human runbook lines, or generated output files change.
782
+
783
+ ### Verification Plan
784
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
785
+ - `node --test cli/lib/site.test.mjs`
786
+ - `npm test`
787
+ - `npm run audit:strict`
788
+ - `npm run release:metadata`
789
+ - `python3 -B tools/audit/local-ci.py --docs-only`
790
+ - `git diff --check`
791
+ - `npm run package:check`
792
+ - `npm run release:self-test`
793
+ - `npm run release:check`
794
+
795
+ ## Phase 720 — Website Improvement Bundle Handoff Runbook Action Summary Snapshot Cleanup (unreleased)
796
+
797
+ Website Improvement bundle handoff runbook action summary now groups action count, dependency, evidence, evidence-capture, validation, human-line, lookup, and boundary aggregates into named internal snapshots.
798
+
799
+ ### Changed
800
+ - Added internal action summary snapshots for action counts, dependency/completion metadata, evidence target counts, evidence-capture field counts, payload counts, validation counts, initial validation counts, checklist counts, human-line display counts, validated field counts, run-policy counts, first-action lookups, and boundary flags.
801
+ - Replaced the long inline `actionSummary` assembly with snapshot spreads while keeping the existing action summary field names unchanged.
802
+
803
+ ### Impact
804
+ - `buildBundleHandoffOperatorRunbook` keeps the same returned `actionSummary` contract.
805
+ - Website Improvement handoff wrappers can continue to consume the same action count, evidence-capture, validation, next-action, first-action lookup, and boundary fields without migration.
806
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, or human runbook lines change.
807
+
808
+ ### Verification Plan
809
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
810
+ - `node --test cli/lib/site.test.mjs`
811
+ - `npm test`
812
+ - `npm run audit:strict`
813
+ - `npm run release:metadata`
814
+ - `python3 -B tools/audit/local-ci.py --docs-only`
815
+ - `git diff --check`
816
+ - `npm run package:check`
817
+ - `npm run release:self-test`
818
+ - `npm run release:check`
819
+
820
+ ## Phase 719 — Website Improvement Bundle Handoff Runbook Action Row Evidence Snapshot Cleanup (unreleased)
821
+
822
+ Website Improvement bundle handoff runbook action rows now group evidence and evidence-capture assembly into named internal snapshots before returning the same row fields.
823
+
824
+ ### Changed
825
+ - Added an internal `actionEvidenceSummary` snapshot for evidence requirements, evidence-required state, and evidence target metadata.
826
+ - Added an internal `actionEvidenceCaptureSummary` snapshot for evidence-capture fields, field metadata, payload templates, validation metadata, checklist summaries, and capture counts.
827
+ - Replaced the long inline `stageActionRows` evidence assembly with snapshot spreads while keeping the existing action-row field names unchanged.
828
+
829
+ ### Impact
830
+ - `buildBundleHandoffOperatorRunbook` keeps the same `stageActionRows[*].actionEvidence*` and `stageActionRows[*].actionEvidenceCapture*` contract.
831
+ - Downstream Website Improvement handoff wrappers can continue to consume the same action-row evidence fields without migration.
832
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, or human runbook lines change.
833
+
834
+ ### Verification Plan
835
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
836
+ - `node --test cli/lib/site.test.mjs`
837
+ - `npm test`
838
+ - `npm run audit:strict`
839
+ - `npm run release:metadata`
840
+ - `python3 -B tools/audit/local-ci.py --docs-only`
841
+ - `git diff --check`
842
+ - `npm run package:check`
843
+ - `npm run release:self-test`
844
+ - `npm run release:check`
845
+
846
+ ## Phase 718 — Website Improvement Bundle Handoff Runbook Action Summary Next Snapshot Cleanup (unreleased)
847
+
848
+ Website Improvement bundle handoff runbook action summary now groups the internal `nextAction*` assembly into a named snapshot object before returning the same public fields.
849
+
850
+ ### Changed
851
+ - Added a grouped internal `nextActionSummary` snapshot for next-action status, dependency/completion metadata, evidence metadata, evidence-capture metadata, and stage linkage metadata.
852
+ - Replaced the long inline `actionSummary` assembly for `nextAction*` fields with the grouped snapshot spread.
853
+ - Kept the existing next-action accessor helpers and public field names unchanged.
854
+
855
+ ### Impact
856
+ - `buildBundleHandoffOperatorRunbook` keeps the same returned `actionSummary.nextAction*` contract.
857
+ - Website Improvement handoff wrappers can continue to consume the same runbook next-action summary fields without migration.
858
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, or human runbook lines change.
859
+
860
+ ### Verification Plan
861
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
862
+ - `node --test cli/lib/site.test.mjs`
863
+ - `npm test`
864
+ - `npm run audit:strict`
865
+ - `npm run release:metadata`
866
+ - `python3 -B tools/audit/local-ci.py --docs-only`
867
+ - `git diff --check`
868
+ - `npm run package:check`
869
+ - `npm run release:self-test`
870
+ - `npm run release:check`
871
+
872
+ ## Phase 717 — Website Improvement Bundle Handoff Runbook Next Snapshot Cleanup (unreleased)
873
+
874
+ Website Improvement bundle handoff runbook next-stage output now groups the internal `nextStage*`, `nextStageAction*`, evidence-capture, and `nextCommand*` assembly into named snapshot objects before returning the same public fields.
875
+
876
+ ### Changed
877
+ - Renamed generic next-action and next-stage accessors so scalar, list, object, number, and boolean reads are explicit at the call site.
878
+ - Added grouped internal snapshots for next-stage identity, action status, dependency/completion metadata, evidence metadata, evidence-capture metadata, command-stage metadata, and next-command metadata.
879
+ - Replaced the long inline return assembly for `nextStage*` and `nextCommand*` fields with those grouped snapshots.
880
+
881
+ ### Impact
882
+ - `buildBundleHandoffOperatorRunbook` keeps the same returned `nextStage*`, `nextStageAction*`, `nextCommand*`, evidence-capture, command, safety, and stage fields.
883
+ - Website Improvement handoff wrappers can continue to consume the same runbook next-step contract without migration.
884
+ - No CLI flags, bundle files, command manifest fields, stage/action field names, evidence field names, validation status values, next-action keys, target-repo mutation rules, external-call boundaries, or human runbook lines change.
885
+
886
+ ### Verification Plan
887
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
888
+ - `node --test cli/lib/site.test.mjs`
889
+ - `npm test`
890
+ - `npm run audit:strict`
891
+ - `npm run release:metadata`
892
+ - `python3 -B tools/audit/local-ci.py --docs-only`
893
+ - `git diff --check`
894
+ - `npm run release:check`
895
+
896
+ ## Phase 716 — Website Improvement Bundle Handoff Runbook Evidence Predicate Cleanup (unreleased)
897
+
898
+ Website Improvement bundle handoff evidence-capture summaries now use named predicates for evidence field input type, value shape, payload mapping, validation state, display state, and checklist item state.
899
+
900
+ ### Changed
901
+ - Added evidence-capture field predicates for input type, value shape, multi-value behavior, empty values, placeholder, ARIA label, help text, section membership, payload mapping, and validation rules.
902
+ - Added shared required/optional and multi-value predicates for evidence payload bindings, validation specs, and checklist items.
903
+ - Added initial validation state, display row, and checklist item predicates for valid/invalid, blocking/non-blocking, checked/unchecked, and completion-blocking summary counts.
904
+ - Reused those predicates in evidence-capture summary counts and first evidence-capture action lookups.
905
+
906
+ ### Impact
907
+ - `buildBundleHandoffOperatorRunbook` keeps the same evidence-capture summary fields and first-action lookup fields.
908
+ - Website Improvement handoff wrappers can continue to consume the same runbook evidence summary contract without migration.
909
+ - No CLI flags, bundle files, command manifest fields, stage fields, action field names, evidence field names, evidence targets, validation status values, first-action keys, target-repo mutation rules, external-call boundaries, or human runbook lines change.
910
+
911
+ ### Verification Plan
912
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
913
+ - `node --test cli/lib/site.test.mjs`
914
+ - `npm test`
915
+ - `npm run audit:strict`
916
+ - `npm run release:metadata`
917
+ - `python3 -B tools/audit/local-ci.py --docs-only`
918
+ - `git diff --check`
919
+ - `npm run release:check`
920
+
921
+ ## Phase 715 — Website Improvement Bundle Handoff Runbook Action Predicate Cleanup (unreleased)
922
+
923
+ Website Improvement bundle handoff action summaries now use named predicates for action enabled state, prerequisites, evidence targets, evidence-capture presence, and first-action lookups.
924
+
925
+ ### Changed
926
+ - Added action-row predicates for enabled, disabled, manual-disabled, prerequisite, dependency, blocking, completion-criteria, and evidence-required states.
927
+ - Added action evidence-target predicates for local command output, local output file, target repo working tree, and handoff evidence record.
928
+ - Added evidence-capture predicates for field presence, required/optional field presence, multiple sections, multiple payload namespaces, and payload template presence.
929
+ - Reused those predicates in action summary counts and first-action lookup fields.
930
+
931
+ ### Impact
932
+ - `buildBundleHandoffOperatorRunbook` keeps the same action summary fields and first-action lookup fields.
933
+ - Website Improvement handoff wrappers can continue to consume the same runbook action summary contract without migration.
934
+ - No CLI flags, bundle files, command manifest fields, stage fields, action field names, evidence field names, evidence targets, first-action keys, target-repo mutation rules, external-call boundaries, or human runbook lines change.
935
+
936
+ ### Verification Plan
937
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
938
+ - `node --test cli/lib/site.test.mjs`
939
+ - `npm test`
940
+ - `npm run audit:strict`
941
+ - `npm run release:metadata`
942
+ - `python3 -B tools/audit/local-ci.py --docs-only`
943
+ - `git diff --check`
944
+ - `npm run release:check`
945
+
946
+ ## Phase 714 — Website Improvement Bundle Handoff Runbook Display Row Predicate Cleanup (unreleased)
947
+
948
+ Website Improvement bundle handoff display-row summaries now use named predicates for required/manual rows, command rows, action status, and evidence-progress status.
949
+
950
+ ### Changed
951
+ - Added display-row predicates for required, optional, command-backed, and manual rows.
952
+ - Added display-row predicates for ready, optional, manual, and blocked action statuses.
953
+ - Added display-row predicates for evidence-progress presence plus blocked and ready evidence-progress states.
954
+ - Reused those predicates in display-row status key maps, summary counts, and first-row lookups.
955
+
956
+ ### Impact
957
+ - `buildBundleHandoffOperatorRunbook` keeps the same display-row summary fields.
958
+ - Website Improvement handoff wrappers can continue to consume the same human-line display row contract without migration.
959
+ - No CLI flags, bundle files, command manifest fields, stage fields, action fields, evidence field names, status labels, evidence-progress values, target-repo mutation rules, external-call boundaries, or human runbook lines change.
960
+
961
+ ### Verification Plan
962
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
963
+ - `node --test cli/lib/site.test.mjs`
964
+ - `npm test`
965
+ - `npm run audit:strict`
966
+ - `npm run release:metadata`
967
+ - `python3 -B tools/audit/local-ci.py --docs-only`
968
+ - `git diff --check`
969
+ - `npm run release:check`
970
+
971
+ ## Phase 713 — Website Improvement Bundle Handoff Runbook Scope and Safety Predicate Cleanup (unreleased)
972
+
973
+ Website Improvement bundle handoff command and operator summaries now use named predicates for command scope, safety flags, required stages, and external/target-repo boundary counts.
974
+
975
+ ### Changed
976
+ - Added command-manifest predicates for source-bundle and task-handoff scope counts.
977
+ - Added command-manifest safety predicates for external calls, target-repo mutation, clean-workspace requirements, and review-before-mutation requirements.
978
+ - Added runbook-stage predicates for required/optional stages and external/target-repo boundary checks.
979
+ - Reused those predicates in manifest counts, action summaries, first-stage lookups, returned stage counts, and top-level boundary booleans.
980
+
981
+ ### Impact
982
+ - `buildBundleHandoffCommandManifest` keeps the same command count and safety count fields.
983
+ - `buildBundleHandoffOperatorRunbook` keeps the same stage count, action summary, first-stage key, and boundary fields.
984
+ - Website Improvement handoff wrappers can continue to consume the same manifest and runbook contracts without migration.
985
+ - No CLI flags, bundle files, command manifest field names, target-repo mutation rules, external-call boundaries, evidence field names, action counts, first-stage keys, or human runbook lines change.
986
+
987
+ ### Verification Plan
988
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
989
+ - `node --test cli/lib/site.test.mjs`
990
+ - `npm test`
991
+ - `npm run audit:strict`
992
+ - `npm run release:metadata`
993
+ - `python3 -B tools/audit/local-ci.py --docs-only`
994
+ - `git diff --check`
995
+ - `npm run release:check`
996
+
997
+ ## Phase 712 — Website Improvement Bundle Handoff Runbook Run Policy Predicate Cleanup (unreleased)
998
+
999
+ Website Improvement bundle handoff command and operator summaries now use named predicates for read-only and local-output run policy counts.
1000
+
1001
+ ### Changed
1002
+ - Added command-manifest run policy predicates for read-only and local-output command counts.
1003
+ - Added a runbook-stage `usesReadOnlyRunPolicy` predicate beside the existing local-output predicate.
1004
+ - Reused those predicates for manifest counts, action summary counts, and returned command-stage summary counts.
1005
+
1006
+ ### Impact
1007
+ - `buildBundleHandoffCommandManifest` keeps the same command count fields.
1008
+ - `buildBundleHandoffOperatorRunbook` keeps the same read-only and local-output summary fields.
1009
+ - Website Improvement handoff wrappers can continue to consume the same manifest and runbook contracts without migration.
1010
+ - No CLI flags, bundle files, command manifest field names, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1011
+
1012
+ ### Verification Plan
1013
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1014
+ - `node --test cli/lib/site.test.mjs`
1015
+ - `npm test`
1016
+ - `npm run audit:strict`
1017
+ - `npm run release:metadata`
1018
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1019
+ - `git diff --check`
1020
+ - `npm run release:check`
1021
+
1022
+ ## Phase 711 — Website Improvement Bundle Handoff Runbook Output Predicate Cleanup (unreleased)
1023
+
1024
+ Website Improvement bundle handoff operator stage summaries now use named predicates for local-output run policy and output-file checks.
1025
+
1026
+ ### Changed
1027
+ - Added local `usesLocalOutputRunPolicy` for `writes-local-file` run-policy checks.
1028
+ - Added local `hasOutputFile` for output-file presence checks.
1029
+ - Reused those predicates in action summary and returned command-stage summary counts.
1030
+
1031
+ ### Impact
1032
+ - `buildBundleHandoffOperatorRunbook` keeps the same local-output and output-file count fields.
1033
+ - Website Improvement handoff wrappers can continue to consume the same runbook summary contract without migration.
1034
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1035
+
1036
+ ### Verification Plan
1037
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1038
+ - `node --test cli/lib/site.test.mjs`
1039
+ - `npm test`
1040
+ - `npm run audit:strict`
1041
+ - `npm run release:metadata`
1042
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1043
+ - `git diff --check`
1044
+ - `npm run release:check`
1045
+
1046
+ ## Phase 710 — Website Improvement Bundle Handoff Runbook Display Row Summary Cleanup (unreleased)
1047
+
1048
+ Website Improvement bundle handoff operator action summaries now reuse the prepared human-line display-row summary for display-row counts.
1049
+
1050
+ ### Changed
1051
+ - Reused `stageHumanLineDisplayRowSummary.count` for `humanLineDisplayRowCount`.
1052
+ - Reused `stageHumanLineDisplayRowSummary.byKeyCount` for `humanLineDisplayRowByKeyCount`.
1053
+ - Removed repeated direct display-row length and by-key object counting inside `actionSummary`.
1054
+
1055
+ ### Impact
1056
+ - `buildBundleHandoffOperatorRunbook` keeps the same human-line display-row action summary fields.
1057
+ - Website Improvement handoff wrappers can continue to consume the same action summary contract without migration.
1058
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1059
+
1060
+ ### Verification Plan
1061
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1062
+ - `node --test cli/lib/site.test.mjs`
1063
+ - `npm test`
1064
+ - `npm run audit:strict`
1065
+ - `npm run release:metadata`
1066
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1067
+ - `git diff --check`
1068
+ - `npm run release:check`
1069
+
1070
+ ## Phase 709 — Website Improvement Bundle Handoff Runbook Initial Validation Summary Cleanup (unreleased)
1071
+
1072
+ Website Improvement bundle handoff operator action summaries now route initial validation summary and checklist summary aggregations through named local helpers.
1073
+
1074
+ ### Changed
1075
+ - Added local `countActionsBySummary` and `sumSummaryValues` helpers for action-row summary objects.
1076
+ - Added local initial-validation summary wrappers for field-count, status, completion, and blocking totals.
1077
+ - Added local initial-checklist summary wrappers for item-count, status, completion, checked, unchecked, and blocking-unchecked totals.
1078
+ - Replaced repeated direct `actionEvidenceCaptureInitialValidationSummary` and `actionEvidenceCaptureInitialValidationChecklistSummary` accesses inside `actionSummary`.
1079
+
1080
+ ### Impact
1081
+ - `buildBundleHandoffOperatorRunbook` keeps the same initial validation summary and checklist summary fields.
1082
+ - Website Improvement handoff wrappers can continue to consume the same action summary contract without migration.
1083
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1084
+
1085
+ ### Verification Plan
1086
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1087
+ - `node --test cli/lib/site.test.mjs`
1088
+ - `npm test`
1089
+ - `npm run audit:strict`
1090
+ - `npm run release:metadata`
1091
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1092
+ - `git diff --check`
1093
+ - `npm run release:check`
1094
+
1095
+ ## Phase 708 — Website Improvement Bundle Handoff Runbook Action Item Count Cleanup (unreleased)
1096
+
1097
+ Website Improvement bundle handoff operator action summaries now name repeated item-count and item-value aggregations before assembling evidence-capture totals.
1098
+
1099
+ ### Changed
1100
+ - Added local `countActionsWithItems` for action rows that contain at least one item in a named list field.
1101
+ - Added local `sumActionItems` for total item counts across action rows.
1102
+ - Added local `sumActionItemValues` for numeric totals derived from list item values.
1103
+ - Replaced repeated `.length > 0`, `.length`, and nested `reduce` summary calculations with the named helpers.
1104
+
1105
+ ### Impact
1106
+ - `buildBundleHandoffOperatorRunbook` keeps the same payload binding, validation spec, initial validation state, display metadata, checklist, and minimum-length summary fields.
1107
+ - Website Improvement handoff wrappers can continue to consume the same action summary fields without migration.
1108
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1109
+
1110
+ ### Verification Plan
1111
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1112
+ - `node --test cli/lib/site.test.mjs`
1113
+ - `npm test`
1114
+ - `npm run audit:strict`
1115
+ - `npm run release:metadata`
1116
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1117
+ - `git diff --check`
1118
+ - `npm run release:check`
1119
+
1120
+ ## Phase 707 — Website Improvement Bundle Handoff Runbook Payload Summary Cleanup (unreleased)
1121
+
1122
+ Website Improvement bundle handoff operator action summaries now name the payload template and unique-list summary calculations before returning the runbook payload.
1123
+
1124
+ ### Changed
1125
+ - Added local `uniqueActionListValueCount` for unique action-list summary counts.
1126
+ - Added local `payloadTemplatePathCount` for payload flat-template path counts.
1127
+ - Replaced inline `flatMap`/`Object.keys(...).length` summary calculations with the named helpers.
1128
+
1129
+ ### Impact
1130
+ - `buildBundleHandoffOperatorRunbook` keeps the same payload template path counts, unique section counts, unique payload namespace counts, action summary fields, and returned runbook contract.
1131
+ - Website Improvement handoff wrappers can continue to consume the same summary fields without migration.
1132
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1133
+
1134
+ ### Verification Plan
1135
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1136
+ - `node --test cli/lib/site.test.mjs`
1137
+ - `npm test`
1138
+ - `npm run audit:strict`
1139
+ - `npm run release:metadata`
1140
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1141
+ - `git diff --check`
1142
+ - `npm run release:check`
1143
+
1144
+ ## Phase 706 — Website Improvement Bundle Handoff Runbook Action Item Summary Cleanup (unreleased)
1145
+
1146
+ Website Improvement bundle handoff operator action summaries now use shared local item-summary helpers for repeated evidence item counts and first-action lookups.
1147
+
1148
+ ### Changed
1149
+ - Added local `countActionItems` and `maxActionItemValue` helpers near the `actionSummary` assembly.
1150
+ - Reused the item-summary helpers for evidence capture fields, payload bindings, validation specs, initial validation state rows, display rows, and checklist items.
1151
+ - Added `firstActionWithEvidenceCaptureField` for first-action evidence field lookups.
1152
+
1153
+ ### Impact
1154
+ - `buildBundleHandoffOperatorRunbook` keeps the same action summary counts, first-action keys, evidence capture metadata, and returned runbook contract.
1155
+ - Website Improvement handoff wrappers can continue to consume the same summary fields without migration.
1156
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1157
+
1158
+ ### Verification Plan
1159
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1160
+ - `node --test cli/lib/site.test.mjs`
1161
+ - `npm test`
1162
+ - `npm run audit:strict`
1163
+ - `npm run release:metadata`
1164
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1165
+ - `git diff --check`
1166
+ - `npm run release:check`
1167
+
1168
+ ## Phase 705 — Website Improvement Bundle Handoff Runbook Evidence Field Value Cleanup (unreleased)
1169
+
1170
+ Website Improvement bundle handoff operator action rows now read evidence-capture field values through one local helper before assembling the row payload.
1171
+
1172
+ ### Changed
1173
+ - Added a local `evidenceFieldValues` helper inside the `stageActionRows` mapper.
1174
+ - Replaced repeated `evidenceCaptureFields.map(...)` field extraction calls with `evidenceFieldValues`.
1175
+ - Reused the same helper for evidence capture section labels and payload namespaces before returning action row metadata.
1176
+
1177
+ ### Impact
1178
+ - `buildBundleHandoffOperatorRunbook` keeps the same evidence-capture field arrays, section metadata, payload namespace metadata, validation metadata, and action row contract.
1179
+ - Website Improvement handoff wrappers can continue to consume the same stage action evidence fields without migration.
1180
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence field names, action counts, or human runbook lines change.
1181
+
1182
+ ### Verification Plan
1183
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1184
+ - `node --test cli/lib/site.test.mjs`
1185
+ - `npm test`
1186
+ - `npm run audit:strict`
1187
+ - `npm run release:metadata`
1188
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1189
+ - `git diff --check`
1190
+ - `npm run release:check`
1191
+
1192
+ ## Phase 704 — Website Improvement Bundle Handoff Runbook Manual Stage Predicate Cleanup (unreleased)
1193
+
1194
+ Website Improvement bundle handoff operator stages now use named predicates for command-backed and manual stage checks instead of repeating `commandCount` comparisons inline.
1195
+
1196
+ ### Changed
1197
+ - Added local `hasCommands` and `isManualStage` predicates inside `buildBundleHandoffOperatorRunbook`.
1198
+ - Replaced repeated `stage.commandCount > 0` checks with `hasCommands`.
1199
+ - Replaced repeated `stage.commandCount === 0` checks with `isManualStage`.
1200
+
1201
+ ### Impact
1202
+ - `buildBundleHandoffOperatorRunbook` keeps the same command-stage counts, manual-stage counts, lookup maps, next-action summary fields, and stage lists.
1203
+ - Website Improvement handoff wrappers can continue to consume the same stage and action fields without migration.
1204
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence fields, action counts, or human runbook lines change.
1205
+
1206
+ ### Verification Plan
1207
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1208
+ - `node --test cli/lib/site.test.mjs`
1209
+ - `npm test`
1210
+ - `npm run audit:strict`
1211
+ - `npm run release:metadata`
1212
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1213
+ - `git diff --check`
1214
+ - `npm run release:check`
1215
+
1216
+ ## Phase 703 — Website Improvement Bundle Handoff Runbook Stage Command Safety Cleanup (unreleased)
1217
+
1218
+ Website Improvement bundle handoff operator stages now read first-command run policy and safety metadata through named local values before assembling each stage record.
1219
+
1220
+ ### Changed
1221
+ - Added local `firstCommand`, `firstCommandSafety`, and `commandHasSafetyFlag` values inside `buildStage`.
1222
+ - Replaced repeated `stageCommands[0]?.*` lookups with the named first-command values.
1223
+ - Replaced repeated stage-command safety flag predicates with `commandHasSafetyFlag`.
1224
+
1225
+ ### Impact
1226
+ - `buildBundleHandoffOperatorRunbook` keeps the same stage run policy, safety level, local-output, external-call, and target-repo mutation metadata.
1227
+ - Website Improvement handoff wrappers can continue to consume the same stage and command fields without migration.
1228
+ - No CLI flags, bundle files, command manifest fields, target-repo mutation rules, external-call boundaries, evidence fields, action counts, or human runbook lines change.
1229
+
1230
+ ### Verification Plan
1231
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1232
+ - `node --test cli/lib/site.test.mjs`
1233
+ - `npm test`
1234
+ - `npm run audit:strict`
1235
+ - `npm run release:metadata`
1236
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1237
+ - `git diff --check`
1238
+ - `npm run release:check`
1239
+
1240
+ ## Phase 702 — Website Improvement Bundle Handoff Command Manifest Fallback Cleanup (unreleased)
1241
+
1242
+ Website Improvement bundle handoff command manifest entries now read source-bundle and task command metadata through small local fallback helpers before assembling each command record.
1243
+
1244
+ ### Changed
1245
+ - Added a local `sourceValue` helper inside `buildBundleHandoffCommandManifest` for source-bundle command, args, run-policy, and safety metadata.
1246
+ - Read source-bundle safety once per source command so `strict` comes from the same object that is returned in the command manifest.
1247
+ - Added a local `taskValue` helper inside `pushTaskCommand` and read task safety once before deriving strict task command metadata and output file fallback.
1248
+
1249
+ ### Impact
1250
+ - `buildBundleHandoffCommandManifest` keeps the same command keys, task ids, output file fallback, strict flags, safety metadata, and manifest JSON contract.
1251
+ - Website Improvement handoff wrappers can continue to consume the same command manifest fields without migration.
1252
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, operator runbook fields, evidence fields, action counts, or human runbook lines change.
1253
+
1254
+ ### Verification Plan
1255
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1256
+ - `node --test cli/lib/site.test.mjs`
1257
+ - `npm test`
1258
+ - `npm run audit:strict`
1259
+ - `npm run release:metadata`
1260
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1261
+ - `git diff --check`
1262
+ - `npm run release:check`
1263
+
1264
+ ## Phase 701 — Website Improvement Bundle Handoff Runbook Next Stage Return Cleanup (unreleased)
1265
+
1266
+ Website Improvement target-repo handoff runbook next-stage and next-command return metadata now use the same local fallback style as the next-action fields.
1267
+
1268
+ ### Changed
1269
+ - Added local `nextStageList`, `nextStageFlag`, `nextCommandValue`, and `nextCommandList` helpers inside `buildBundleHandoffOperatorRunbook`.
1270
+ - Precomputed the next-stage human line, display row, command count, and command safety before assembling the returned runbook payload.
1271
+ - Replaced the remaining repeated `nextStage?.*` and `nextCommandEntry?.*` fallback expressions in the return object with named values or helper calls.
1272
+
1273
+ ### Impact
1274
+ - `buildBundleHandoffOperatorRunbook` keeps the same next-stage labels, command metadata, safety metadata, human-line summary, and JSON contract.
1275
+ - Target-repo handoff wrappers can continue to consume the same next-stage and next-command fields without migration.
1276
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, lookup maps, evidence fields, action counts, or human runbook lines change.
1277
+
1278
+ ### Verification Plan
1279
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1280
+ - `node --test cli/lib/site.test.mjs`
1281
+ - `npm test`
1282
+ - `npm run audit:strict`
1283
+ - `npm run release:metadata`
1284
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1285
+ - `git diff --check`
1286
+ - `npm run release:check`
1287
+
1288
+ ## Phase 700 — Website Improvement Bundle Handoff Runbook Next Action Fallback Cleanup (unreleased)
1289
+
1290
+ Website Improvement target-repo handoff runbook next-action metadata now uses small local fallback helpers instead of repeating the same optional-chaining defaults in `actionSummary` and the returned runbook payload.
1291
+
1292
+ ### Changed
1293
+ - Added local `nextActionValue`, `nextActionList`, `nextActionObject`, `nextActionCount`, `nextActionFlag`, `nextStageValue`, and `nextStageCommandList` helpers inside `buildBundleHandoffOperatorRunbook`.
1294
+ - Replaced repeated `nextAction*` and `nextStageAction*` fallback expressions with helper calls while keeping every exported field name unchanged.
1295
+ - Read the nested next-stage evidence progress summary once before writing the human-line summary fields.
1296
+
1297
+ ### Impact
1298
+ - `buildBundleHandoffOperatorRunbook` keeps the same next-action, next-stage action, evidence progress, command metadata, and JSON contract.
1299
+ - Target-repo handoff wrappers can continue to consume the same next-action and next-stage fields without migration.
1300
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, lookup maps, evidence fields, action counts, or human runbook lines change.
1301
+
1302
+ ### Verification Plan
1303
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1304
+ - `node --test cli/lib/site.test.mjs`
1305
+ - `npm test`
1306
+ - `npm run audit:strict`
1307
+ - `npm run release:metadata`
1308
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1309
+ - `git diff --check`
1310
+
1311
+ ## Phase 699 — Website Improvement Bundle Handoff Runbook Stage Command Lookup Cleanup (unreleased)
1312
+
1313
+ Website Improvement target-repo handoff runbook stage command lookup maps now use named helpers instead of repeating command-list mapping expressions inline.
1314
+
1315
+ ### Changed
1316
+ - Added local `commandListByKey` and `stageKeysBy` helpers inside `buildBundleHandoffOperatorRunbook`.
1317
+ - Replaced repeated stage command label, command string, command args, run policy, and safety-level lookup map construction with `commandListByKey`.
1318
+ - Replaced command/manual stage key list construction with `stageKeysBy` while keeping the exported arrays unchanged.
1319
+
1320
+ ### Impact
1321
+ - `buildBundleHandoffOperatorRunbook` keeps the same command lookup maps, stage key arrays, action summaries, and JSON contract.
1322
+ - Target-repo handoff wrappers can continue to consume the same stage command metadata without migration.
1323
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, evidence fields, action counts, or human runbook lines change.
1324
+
1325
+ ### Verification Plan
1326
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1327
+ - `node --test cli/lib/site.test.mjs`
1328
+ - `npm test`
1329
+ - `npm run audit:strict`
1330
+ - `npm run release:metadata`
1331
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1332
+ - `git diff --check`
1333
+
1334
+ ## Phase 698 — Website Improvement Bundle Handoff Runbook Human Line Summary Cleanup (unreleased)
1335
+
1336
+ Website Improvement target-repo handoff runbook human-line display summaries and first-action key fields now use small named helpers instead of repeating row and action scans inline.
1337
+
1338
+ ### Changed
1339
+ - Added local display-row count, key-list, first-key, and action first-key helpers inside `buildBundleHandoffOperatorRunbook`.
1340
+ - Replaced repeated human-line display row status counts, evidence-progress counts, and first-row lookups with named helper calls.
1341
+ - Replaced repeated first action key lookups in `actionSummary` with the shared `firstActionKey` helper while keeping every exported field name unchanged.
1342
+
1343
+ ### Impact
1344
+ - `buildBundleHandoffOperatorRunbook` keeps the same human-line summary, display-row summary, first-action key fields, and JSON contract.
1345
+ - Target-repo handoff wrappers can continue to consume the same stage human-line, evidence-progress, and first-action metadata without migration.
1346
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, lookup maps, evidence fields, action counts, or human runbook lines change.
1347
+
1348
+ ### Verification Plan
1349
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1350
+ - `node --test cli/lib/site.test.mjs`
1351
+ - `npm test`
1352
+ - `npm run audit:strict`
1353
+ - `npm run release:metadata`
1354
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1355
+ - `git diff --check`
1356
+
1357
+ ## Phase 697 — Website Improvement Bundle Handoff Runbook Action Summary Count Cleanup (unreleased)
1358
+
1359
+ Website Improvement target-repo handoff runbook action summary count and aggregate calculations now use named local helpers instead of repeating filter, reduce, max, and evidence-capture traversal expressions.
1360
+
1361
+ ### Changed
1362
+ - Added local `countActions`, `sumActions`, `maxActionValue`, and evidence-capture aggregate helpers inside `buildBundleHandoffOperatorRunbook`.
1363
+ - Replaced repeated action summary count, sum, max, payload binding, validation spec, validation state, display metadata, and checklist aggregate expressions with named helper calls.
1364
+ - Kept the action summary object keys and computed values unchanged.
1365
+
1366
+ ### Impact
1367
+ - `buildBundleHandoffOperatorRunbook` keeps the same `actionSummary` JSON contract while the summary section reads as a set of named aggregate calculations.
1368
+ - Target-repo handoff wrappers can continue to consume the same summary fields without migration.
1369
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, lookup maps, evidence fields, or human runbook lines change.
1370
+
1371
+ ### Verification Plan
1372
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1373
+ - `node --test cli/lib/site.test.mjs`
1374
+ - `npm test`
1375
+ - `npm run audit:strict`
1376
+ - `npm run release:metadata`
1377
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1378
+ - `git diff --check`
1379
+
1380
+ ## Phase 696 — Website Improvement Bundle Handoff Runbook Lookup Assembly Cleanup (unreleased)
1381
+
1382
+ Website Improvement target-repo handoff runbook lookup map assembly now uses a small shared helper instead of repeating the same `Object.fromEntries` pattern through the assembly body.
1383
+
1384
+ ### Changed
1385
+ - Added local `byKey`, `fieldByKey`, `stageFieldByKey`, and `actionFieldByKey` helpers inside `buildBundleHandoffOperatorRunbook`.
1386
+ - Replaced repeated stage/action lookup map construction with named helper calls while keeping every exported lookup object and key unchanged.
1387
+ - Kept nested command lookup maps explicit where they derive arrays from stage commands.
1388
+
1389
+ ### Impact
1390
+ - `buildBundleHandoffOperatorRunbook` keeps the same lookup maps, action rows, summaries, next-action fields, and JSON contract.
1391
+ - Target-repo handoff wrappers can continue to read the same `stage*ByKey` and `stageAction*ByKey` objects without migration.
1392
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, evidence fields, or human runbook lines change.
1393
+
1394
+ ### Verification Plan
1395
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs`
1396
+ - `node --test cli/lib/site.test.mjs`
1397
+ - `npm test`
1398
+ - `npm run audit:strict`
1399
+ - `npm run release:metadata`
1400
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1401
+ - `git diff --check`
1402
+
1403
+ ## Phase 695 — Website Improvement Bundle Handoff Runbook Stage Metadata Split (unreleased)
1404
+
1405
+ Website Improvement target-repo handoff runbook stage dependency and requirement metadata now lives outside the runbook assembly body.
1406
+
1407
+ ### Changed
1408
+ - Moved stage prerequisite, blocked-stage, dependency reason, completion criteria, and evidence requirement helpers into `cli/lib/site-bundle-handoff-runbook-stage-metadata.mjs`.
1409
+ - Kept `cli/lib/site-bundle-handoff-runbook.mjs` focused on building stages, action rows, lookup maps, summaries, and the final operator runbook payload.
1410
+ - Reworked action row assembly to compute prerequisite, blocking, completion, evidence requirement, and evidence capture values once per stage before writing the public row fields.
1411
+
1412
+ ### Impact
1413
+ - `buildBundleHandoffOperatorRunbook` keeps the same stage action dependency, completion criteria, evidence requirement, and evidence capture JSON contract.
1414
+ - Target-repo handoff wrappers can continue to read the same prerequisite keys, blocked-stage labels, dependency reason codes, completion criteria, evidence requirements, payload templates, and validation metadata.
1415
+ - No CLI flags, bundle files, target-repo mutation rules, external-call boundaries, or human runbook lines change.
1416
+
1417
+ ### Verification Plan
1418
+ - `node --check cli/lib/site-bundle-handoff-runbook-stage-metadata.mjs && node --check cli/lib/site-bundle-handoff-runbook.mjs`
1419
+ - `node --test cli/lib/site.test.mjs`
1420
+ - `npm test`
1421
+ - `npm run audit:strict`
1422
+ - `npm run release:metadata`
1423
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1424
+ - `git diff --check`
1425
+
1426
+ ## Phase 694 — Website Improvement Bundle Handoff Runbook Evidence Field Split (unreleased)
1427
+
1428
+ Website Improvement target-repo handoff runbook stage-specific evidence field definitions now live outside the runbook assembly body.
1429
+
1430
+ ### Changed
1431
+ - Moved stage-specific evidence capture field definitions and field enrichment into `cli/lib/site-bundle-handoff-runbook-evidence-fields.mjs`.
1432
+ - Kept `cli/lib/site-bundle-handoff-runbook.mjs` focused on assembling stage action rows, summaries, lookup maps, and the final operator runbook payload.
1433
+ - Reused the existing action metadata and generic evidence helper modules so evidence targets, field shapes, payload paths, sections, and validation metadata stay consistent.
1434
+
1435
+ ### Impact
1436
+ - `buildBundleHandoffOperatorRunbook` keeps the same evidence capture fields and JSON contract while the runbook assembly reads as a shorter flow.
1437
+ - Target-repo handoff wrappers can continue to consume the same field keys, placeholders, examples, validation hints, payload paths, and section metadata.
1438
+ - No CLI flags, bundle files, target-repo mutation rules, or external-call boundaries change.
1439
+
1440
+ ### Verification Plan
1441
+ - `node --check cli/lib/site-bundle-handoff-runbook-evidence-fields.mjs && node --check cli/lib/site-bundle-handoff-runbook.mjs`
1442
+ - `node --test cli/lib/site.test.mjs`
1443
+ - `npm test`
1444
+ - `npm run audit:strict`
1445
+ - `npm run release:metadata`
1446
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1447
+ - `git diff --check`
1448
+
1449
+ ## Phase 693 — Website Improvement Bundle Handoff Runbook Evidence Helper Split (unreleased)
1450
+
1451
+ Website Improvement target-repo handoff runbook evidence capture helper logic now lives outside the runbook assembly body.
1452
+
1453
+ ### Changed
1454
+ - Moved evidence capture field shape, section, payload binding, validation spec, and initial checklist/summary helpers into `cli/lib/site-bundle-handoff-runbook-evidence.mjs`.
1455
+ - Kept stage-specific evidence field selection in `cli/lib/site-bundle-handoff-runbook.mjs`, where it still has access to the current runbook stage context.
1456
+ - Preserved existing evidence capture payload paths, validation labels, section keys, checklist summaries, and next-action metadata.
1457
+
1458
+ ### Impact
1459
+ - `buildBundleHandoffOperatorRunbook` keeps the same evidence capture JSON contract while the generic evidence helper code has a focused module boundary.
1460
+ - Target-repo handoff wrappers can continue to consume the same payload template, flat template, validation specs, checklist rows, and summary fields.
1461
+ - No CLI flags, bundle files, target-repo mutation rules, or external-call boundaries change.
1462
+
1463
+ ### Verification Plan
1464
+ - `node --check cli/lib/site-bundle-handoff-runbook-evidence.mjs && node --check cli/lib/site-bundle-handoff-runbook.mjs`
1465
+ - `node --test cli/lib/site.test.mjs`
1466
+ - `npm test`
1467
+ - `npm run audit:strict`
1468
+ - `npm run release:metadata`
1469
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1470
+ - `git diff --check`
1471
+
1472
+ ## Phase 692 — Website Improvement Bundle Handoff Runbook Action Metadata Split (unreleased)
1473
+
1474
+ Website Improvement target-repo handoff runbook action metadata now lives outside the runbook assembly body.
1475
+
1476
+ ### Changed
1477
+ - Moved stage action type, labels, instructions, button labels, affordances, status metadata, disabled reasons, and evidence target labels into `cli/lib/site-bundle-handoff-runbook-actions.mjs`.
1478
+ - Kept `cli/lib/site-bundle-handoff-runbook.mjs` focused on command manifest input, stage assembly, evidence capture rows, and the final runbook payload.
1479
+ - Preserved the existing runbook JSON keys and human output by importing the same helper behavior from the new action metadata module.
1480
+
1481
+ ### Impact
1482
+ - `buildBundleHandoffOperatorRunbook` keeps its current public contract while the stage action wording and UI-oriented metadata have a focused module boundary.
1483
+ - Target-repo handoff wrappers can still consume the same action fields, status labels, evidence targets, and disabled reason codes.
1484
+ - No bundle files, CLI flags, target-repo mutation rules, or external-call boundaries change.
1485
+
1486
+ ### Verification Plan
1487
+ - `node --check cli/lib/site-bundle-handoff-runbook-actions.mjs && node --check cli/lib/site-bundle-handoff-runbook.mjs`
1488
+ - `node --test cli/lib/site.test.mjs`
1489
+ - `npm test`
1490
+ - `npm run audit:strict`
1491
+ - `npm run release:metadata`
1492
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1493
+ - `git diff --check`
1494
+
1495
+ ## Phase 691 — Website Improvement Bundle Handoff Runbook Formatter Split (unreleased)
1496
+
1497
+ Website Improvement target-repo handoff runbook line formatting now lives outside the runbook assembly module.
1498
+
1499
+ ### Changed
1500
+ - Moved operator runbook human line formatting into `cli/lib/site-bundle-handoff-runbook-format.mjs`.
1501
+ - Kept `cli/lib/site-bundle-handoff-runbook.mjs` responsible for command manifest and operator runbook assembly.
1502
+ - Re-exported the existing public formatter from the runbook module so current imports keep working.
1503
+
1504
+ ### Impact
1505
+ - `buildBundleHandoffOperatorRunbook` keeps the same JSON contract and stage metadata.
1506
+ - Human runbook lines remain available through the same public helper while formatting logic has a smaller module boundary.
1507
+ - Target-repo handoff command manifest, runbook stages, evidence capture metadata, and existing CLI output contracts are unchanged.
1508
+
1509
+ ### Verification Plan
1510
+ - `node --check cli/lib/site-bundle-handoff-runbook-format.mjs && node --check cli/lib/site-bundle-handoff-runbook.mjs`
1511
+ - `node --test cli/lib/site.test.mjs`
1512
+ - `npm test`
1513
+ - `npm run audit:strict`
1514
+ - `npm run release:metadata`
1515
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1516
+ - `git diff --check`
1517
+
1518
+ ## Phase 690 — Website Improvement Bundle Repair Report Split (unreleased)
1519
+
1520
+ Website Improvement bundle repair report orchestration now lives outside the public site helper surface.
1521
+
1522
+ ### Changed
1523
+ - Moved bundle repair preview, repair bundle creation, applied repair report assembly, and JSON/human repair formatters into `cli/lib/site-bundle-repair-report.mjs`.
1524
+ - Kept `cli/lib/site.mjs` as a public compatibility surface by re-exporting repair report helpers.
1525
+ - Avoided a circular dependency with `cli/lib/site-bundle-check.mjs` by keeping repair guidance helpers in `cli/lib/site-bundle-repair.mjs` and repair orchestration in a separate module.
1526
+
1527
+ ### Impact
1528
+ - `cli/lib/site.mjs` now acts as a compact Website Improvement public export surface instead of owning bundle workflow bodies.
1529
+ - `design-ai site <bundle-dir> --bundle-repair` continues to expose the same preview/apply report contracts.
1530
+ - Bundle check, repair guidance, and repair report orchestration remain separated by dependency direction.
1531
+
1532
+ ### Verification Plan
1533
+ - `node --check cli/lib/site-bundle-repair-report.mjs && node --check cli/lib/site.mjs`
1534
+ - `node --test cli/lib/site.test.mjs`
1535
+ - `npm test`
1536
+ - `npm run audit:strict`
1537
+ - `npm run release:metadata`
1538
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1539
+ - `git diff --check`
1540
+
1541
+ ## Phase 689 — Website Improvement Bundle Handoff Report Split (unreleased)
1542
+
1543
+ Website Improvement target-repo handoff report construction now lives outside the main site workflow module.
1544
+
1545
+ ### Changed
1546
+ - Moved target-repo handoff workspace loading, prompt assembly, task selection handling, command manifest/runbook wiring, and JSON/human formatters into `cli/lib/site-bundle-handoff.mjs`.
1547
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting bundle handoff helpers.
1548
+ - Removed local imports from `cli/lib/site.mjs` that were only needed by handoff report construction.
1549
+
1550
+ ### Impact
1551
+ - `cli/lib/site.mjs` no longer owns the target-repo handoff report body.
1552
+ - `design-ai site <bundle-dir> --bundle-handoff` continues to expose the same prompt and JSON report contracts.
1553
+ - Handoff report assembly now sits beside the handoff summary and operator runbook helpers instead of remaining in the workflow orchestration module.
1554
+
1555
+ ### Verification Plan
1556
+ - `node --check cli/lib/site-bundle-handoff.mjs && node --check cli/lib/site.mjs`
1557
+ - `node --test cli/lib/site.test.mjs`
1558
+ - `npm test`
1559
+ - `npm run audit:strict`
1560
+ - `npm run release:metadata`
1561
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1562
+ - `git diff --check`
1563
+
1564
+ ## Phase 688 — Website Improvement Bundle Compare Report Split (unreleased)
1565
+
1566
+ Website Improvement handoff bundle comparison report construction now lives with the compare helpers.
1567
+
1568
+ ### Changed
1569
+ - Moved `buildSiteBundleCompareReport` into `cli/lib/site-bundle-compare.mjs`.
1570
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting the compare report builder.
1571
+ - Preserved compare issue ids, digest comparison, metadata diffing, changed file reporting, and JSON/human formatter contracts.
1572
+
1573
+ ### Impact
1574
+ - `cli/lib/site.mjs` no longer owns bundle comparison report assembly.
1575
+ - `design-ai site <bundle-dir> --bundle-compare other-bundle-dir` continues to use the same report shape and formatter outputs.
1576
+ - Bundle comparison logic is grouped with its checksum/metadata diff helpers instead of remaining in the workflow orchestration module.
1577
+
1578
+ ### Verification Plan
1579
+ - `node --check cli/lib/site-bundle-compare.mjs && node --check cli/lib/site.mjs`
1580
+ - `node --test cli/lib/site.test.mjs`
1581
+ - `npm test`
1582
+ - `npm run audit:strict`
1583
+ - `npm run release:metadata`
1584
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1585
+ - `git diff --check`
1586
+
1587
+ ## Phase 687 — Website Improvement Bundle Check Module Split (unreleased)
1588
+
1589
+ Website Improvement handoff bundle validation now lives outside the main site workflow module.
1590
+
1591
+ ### Changed
1592
+ - Moved bundle directory validation, summary/checksum verification, MCP recomputation checks, generated contract checks, and bundle check formatting into `cli/lib/site-bundle-check.mjs`.
1593
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting bundle check helpers.
1594
+ - Removed local imports that were only needed by the moved bundle check implementation.
1595
+
1596
+ ### Impact
1597
+ - `cli/lib/site.mjs` no longer owns the large bundle check validation body.
1598
+ - Bundle repair, bundle compare, and target-repo handoff flows continue to consume the same `buildSiteBundleCheckReport` shape.
1599
+ - Bundle validation now sits with the bundle-specific helper modules instead of being embedded in the remaining workflow orchestration file.
1600
+
1601
+ ### Verification Plan
1602
+ - `node --check cli/lib/site-bundle-check.mjs && node --check cli/lib/site.mjs`
1603
+ - `node --test cli/lib/site.test.mjs`
1604
+ - `npm test`
1605
+ - `npm run audit:strict`
1606
+ - `npm run release:metadata`
1607
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1608
+ - `git diff --check`
1609
+
1610
+ ## Phase 686 — Website Improvement Generated Contract Helper Split (unreleased)
1611
+
1612
+ Website Improvement generated bundle contract helpers now live outside the main site workflow module.
1613
+
1614
+ ### Changed
1615
+ - Moved generated contract construction, drift issue creation, and drift summary formatting into `cli/lib/site-bundle-contract.mjs`.
1616
+ - Kept `cli/lib/site.mjs` focused on bundle check and handoff orchestration by importing the generated contract helpers.
1617
+ - Preserved generated bundle contract comparison behavior, digest formatting, repair guidance inputs, and bundle check report shape.
1618
+
1619
+ ### Impact
1620
+ - `cli/lib/site.mjs` no longer owns the generated bundle contract helper bodies.
1621
+ - Bundle check, bundle repair, bundle compare, and target-repo handoff flows continue to receive the same `generatedContract` data.
1622
+ - Generated contract logic now sits beside bundle file/checksum helpers instead of being embedded in the main workflow module.
1623
+
1624
+ ### Verification Plan
1625
+ - `node --check cli/lib/site-bundle-contract.mjs && node --check cli/lib/site.mjs`
1626
+ - `node --test cli/lib/site.test.mjs`
1627
+ - `npm test`
1628
+ - `npm run audit:strict`
1629
+ - `npm run release:metadata`
1630
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1631
+ - `git diff --check`
1632
+
1633
+ ## Phase 685 — Website Improvement Handoff Bundle Builder Split (unreleased)
1634
+
1635
+ Website Improvement handoff bundle assembly now lives outside the main site workflow module.
1636
+
1637
+ ### Changed
1638
+ - Moved `buildSiteHandoffBundle` into `cli/lib/site-bundle-build.mjs`.
1639
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting the bundle builder.
1640
+ - Preserved bundle summary, file ordering, checksums, README generation, MCP artifacts, and prompt artifacts without changing output contracts.
1641
+
1642
+ ### Impact
1643
+ - `cli/lib/site.mjs` no longer owns the handoff bundle file assembly body.
1644
+ - Existing imports from `cli/lib/site.mjs`, `design-ai site --bundle`, bundle repair, generated-contract comparison, and bundle handoff flows remain behavior-compatible.
1645
+ - Bundle construction is now grouped with its deterministic artifact dependencies while bundle check/repair orchestration remains in the main workflow module.
1646
+
1647
+ ### Verification Plan
1648
+ - `node --check cli/lib/site-bundle-build.mjs && node --check cli/lib/site.mjs`
1649
+ - `node --test cli/lib/site.test.mjs`
1650
+ - `npm test`
1651
+ - `npm run audit:strict`
1652
+ - `npm run release:metadata`
1653
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1654
+ - `git diff --check`
1655
+
1656
+ ## Phase 684 — Website Improvement Task and Workflow Graph Helper Split (unreleased)
1657
+
1658
+ Website Improvement generated task planning and portable workflow graph rendering now live outside the main site workflow module.
1659
+
1660
+ ### Changed
1661
+ - Moved deterministic refactor task generation into `cli/lib/site-tasks.mjs`.
1662
+ - Moved workflow graph node/edge construction plus JSON/Markdown graph formatters into `cli/lib/site-workflow-graph.mjs`.
1663
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting task and graph helpers.
1664
+
1665
+ ### Impact
1666
+ - `cli/lib/site.mjs` no longer owns generated task prompt bodies or graph rendering bodies.
1667
+ - Existing imports from `cli/lib/site.mjs`, `design-ai site --tasks`, and `design-ai site --graph` remain behavior-compatible.
1668
+ - Task planning can now be reused by graph and bundle orchestration without forcing those deterministic helpers to stay in the main workflow module.
1669
+
1670
+ ### Verification Plan
1671
+ - `node --check cli/lib/site-tasks.mjs && node --check cli/lib/site-workflow-graph.mjs && node --check cli/lib/site.mjs`
1672
+ - `node --test cli/lib/site.test.mjs`
1673
+ - `npm test`
1674
+ - `npm run audit:strict`
1675
+ - `npm run release:metadata`
1676
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1677
+ - `git diff --check`
1678
+
1679
+ ## Phase 683 — Website Improvement Analysis Helper Split (unreleased)
1680
+
1681
+ Website Improvement workspace validation, summary generation, JSON loading, and report formatting now live outside the main site workflow module.
1682
+
1683
+ ### Changed
1684
+ - Moved raw workspace validation, issue status reduction, summary counts, `analyzeSiteWorkspace`, `loadSiteWorkspaceInput`, `buildSiteReport`, and `formatSiteJson` into `cli/lib/site-analysis.mjs`.
1685
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting the existing analysis/report helper API.
1686
+ - Imported `addIssue`, `statusFromIssues`, `analyzeSiteWorkspace`, and `loadSiteWorkspaceInput` back into `cli/lib/site.mjs` for bundle repair/check/handoff orchestration.
1687
+
1688
+ ### Impact
1689
+ - `cli/lib/site.mjs` no longer owns schema validation, report input loading, or workspace summary construction bodies.
1690
+ - Existing imports from `cli/lib/site.mjs`, report JSON output, strict workspace validation, and bundle consistency checks remain behavior-compatible.
1691
+ - Analysis rules now sit beside workspace normalization while bundle orchestration remains in the main site workflow module.
1692
+
1693
+ ### Verification Plan
1694
+ - `node --check cli/lib/site-analysis.mjs && node --check cli/lib/site.mjs`
1695
+ - `node --test cli/lib/site.test.mjs`
1696
+ - `npm test`
1697
+ - `npm run audit:strict`
1698
+ - `npm run release:metadata`
1699
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1700
+ - `git diff --check`
1701
+
1702
+ ## Phase 682 — Website Improvement Workspace Builder Split (unreleased)
1703
+
1704
+ Website Improvement workspace initialization, intake parsing, and normalization now live outside the main site workflow module.
1705
+
1706
+ ### Changed
1707
+ - Moved real-project `--init` workspace construction, filled intake Markdown parsing, and workspace normalization into `cli/lib/site-workspace.mjs`.
1708
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting workspace builder helpers.
1709
+ - Imported only `normalizeSiteWorkspace` and `normalizeObject` back into `cli/lib/site.mjs` for report validation and bundle summary orchestration.
1710
+
1711
+ ### Impact
1712
+ - `cli/lib/site.mjs` no longer owns workspace creation, intake table parsing, or schema normalization bodies.
1713
+ - Existing imports from `cli/lib/site.mjs`, `design-ai site --init`, and `design-ai site --from-intake` remain behavior-compatible.
1714
+ - Workspace construction is grouped with its defaults and normalization rules, leaving the main site module focused on analysis, reports, graphs, and bundle orchestration.
1715
+
1716
+ ### Verification Plan
1717
+ - `node --check cli/lib/site-workspace.mjs && node --check cli/lib/site.mjs`
1718
+ - `node --test cli/lib/site.test.mjs`
1719
+ - `npm test`
1720
+ - `npm run audit:strict`
1721
+ - `npm run release:metadata`
1722
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1723
+ - `git diff --check`
1724
+
1725
+ ## Phase 681 — Website Improvement Starter Artifact Helper Split (unreleased)
1726
+
1727
+ Website Improvement intake template and sample workspace builders now live outside the main site workflow module.
1728
+
1729
+ ### Changed
1730
+ - Moved intake template Markdown/JSON rendering and sample workspace construction into `cli/lib/site-starter.mjs`.
1731
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting the starter helper API.
1732
+ - Preserved the sample workspace as the normalization fallback by importing it from the starter module.
1733
+
1734
+ ### Impact
1735
+ - `cli/lib/site.mjs` no longer owns starter artifact bodies for `--intake-template` and `--sample`.
1736
+ - Intake template output, sample workspace output, CLI import paths, and normalization fallback behavior remain behavior-compatible.
1737
+ - Starter artifacts now live with their static content dependencies instead of mixing with workspace analysis and bundle orchestration.
1738
+
1739
+ ### Verification Plan
1740
+ - `node --check cli/lib/site-starter.mjs && node --check cli/lib/site.mjs`
1741
+ - `node --test cli/lib/site.test.mjs`
1742
+ - `npm test`
1743
+ - `npm run audit:strict`
1744
+ - `npm run release:metadata`
1745
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1746
+ - `git diff --check`
1747
+
1748
+ ## Phase 680 — Website Improvement Bundle README Helper Split (unreleased)
1749
+
1750
+ Website Improvement bundle README and strict handoff guidance builders now live outside the main site workflow module.
1751
+
1752
+ ### Changed
1753
+ - Moved bundle handoff guidance construction and bundle README Markdown assembly into `cli/lib/site-bundle-readme.mjs`.
1754
+ - Kept bundle generation orchestration, checksum creation, and artifact ordering in `cli/lib/site.mjs`.
1755
+ - Reused the existing target-repo execution checklist contract from `cli/lib/site-bundle-handoff-summary.mjs`.
1756
+
1757
+ ### Impact
1758
+ - `cli/lib/site.mjs` no longer owns bundle README copy or strict/draft handoff command guidance.
1759
+ - Bundle contents, README text, handoff readiness metadata, and existing bundle check behavior remain behavior-compatible.
1760
+ - The remaining bundle generation flow is easier to scan because artifact orchestration is separated from README prose assembly.
1761
+
1762
+ ### Verification Plan
1763
+ - `node --check cli/lib/site-bundle-readme.mjs && node --check cli/lib/site.mjs`
1764
+ - `node --test cli/lib/site.test.mjs`
1765
+ - `npm test`
1766
+ - `npm run audit:strict`
1767
+ - `npm run release:metadata`
1768
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1769
+ - `git diff --check`
1770
+
1771
+ ## Phase 679 — Website Improvement CLI Argument Parser Split (unreleased)
1772
+
1773
+ Website Improvement CLI argument parsing now lives outside the main site workflow module.
1774
+
1775
+ ### Changed
1776
+ - Moved `SITE_OPTIONS`, option value parsing, and `parseSiteArgs` into `cli/lib/site-args.mjs`.
1777
+ - Exported shared Website Improvement option enums from `cli/lib/site-options.mjs` so parsing, intake, normalization, and validation use the same catalogs.
1778
+ - Kept `cli/lib/site.mjs` as the public compatibility surface by re-exporting the parser API.
1779
+
1780
+ ### Impact
1781
+ - `cli/lib/site.mjs` no longer owns command-line parsing rules.
1782
+ - `design-ai site` argument behavior, error messages, and existing imports from `cli/lib/site.mjs` remain behavior-compatible.
1783
+ - The remaining site workflow module is easier to scan because CLI parsing is separated from workspace construction and report generation.
1784
+
1785
+ ### Verification Plan
1786
+ - `node --check cli/lib/site-args.mjs && node --check cli/lib/site-options.mjs && node --check cli/lib/site.mjs`
1787
+ - `node --test cli/lib/site.test.mjs`
1788
+ - `npm test`
1789
+ - `npm run audit:strict`
1790
+ - `npm run release:metadata`
1791
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1792
+ - `git diff --check`
1793
+
1794
+ ## Phase 678 — Website Improvement Prompt Helper Consolidation (unreleased)
1795
+
1796
+ Website Improvement prompt template formatters and bundle implementation prompt fallback now live with the prompt builders.
1797
+
1798
+ ### Changed
1799
+ - Moved prompt template JSON/human formatters and bundle implementation prompt fallback rendering into `cli/lib/site-prompts.mjs`.
1800
+ - Kept `cli/lib/site.mjs` as the public re-export surface and bundle orchestration caller for existing imports.
1801
+ - Reused the existing prompt builder helpers for the no-task bundle fallback instead of keeping prompt body composition in the site workflow module.
1802
+
1803
+ ### Impact
1804
+ - `cli/lib/site.mjs` no longer owns prompt-template display or bundle implementation prompt body construction.
1805
+ - Prompt list CLI output, prompt bundle generation, and handoff bundle `codex-implementation.md` content remain behavior-compatible.
1806
+ - Prompt-related rendering is grouped with the rest of the prompt/handoff report code, making the remaining site workflow module easier to scan.
1807
+
1808
+ ### Verification Plan
1809
+ - `node --check cli/lib/site-prompts.mjs && node --check cli/lib/site.mjs`
1810
+ - `node --test cli/lib/site.test.mjs`
1811
+ - `npm test`
1812
+ - `npm run audit:strict`
1813
+ - `npm run release:metadata`
1814
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1815
+ - `git diff --check`
1816
+
1817
+ ## Phase 677 — Website Improvement Bundle Handoff Summary Helper Split (unreleased)
1818
+
1819
+ Website Improvement bundle handoff task catalog and source summary helpers now live outside the main site workflow module.
1820
+
1821
+ ### Changed
1822
+ - Moved target-repo execution checklist, bundle task catalog summaries, selected-task summary, handoff issue/task catalog line formatting, handoff boundaries, and source bundle command summary into `cli/lib/site-bundle-handoff-summary.mjs`.
1823
+ - Kept bundle workspace loading, task selection orchestration, handoff prompt construction, and final handoff report assembly in `cli/lib/site.mjs`.
1824
+ - Reused the extracted summary helpers in bundle readme/check validation and target-repo handoff output paths without changing the JSON or Markdown contracts.
1825
+
1826
+ ### Impact
1827
+ - `cli/lib/site.mjs` no longer owns task catalog shaping or source bundle command summary construction.
1828
+ - Bundle check validation, handoff prompt checklist text, selected-task command metadata, and command manifest inputs remain behavior-compatible.
1829
+ - This makes the remaining handoff flow easier to scan because catalog/source summary data is separated from report orchestration.
1830
+
1831
+ ### Verification Plan
1832
+ - `node --check cli/lib/site-bundle-handoff-summary.mjs && node --check cli/lib/site.mjs`
1833
+ - `node --test cli/lib/site.test.mjs`
1834
+ - `npm test`
1835
+ - `npm run audit:strict`
1836
+ - `npm run release:metadata`
1837
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1838
+ - `git diff --check`
1839
+
1840
+ ## Phase 676 — Website Improvement Bundle Handoff Runbook Helper Split (unreleased)
1841
+
1842
+ Website Improvement bundle handoff command manifest and operator runbook helpers now live outside the main site workflow module.
1843
+
1844
+ ### Changed
1845
+ - Moved bundle handoff command manifest construction, operator runbook assembly, and runbook Markdown line formatting into `cli/lib/site-bundle-handoff-runbook.mjs`.
1846
+ - Kept bundle validation, task selection, prompt construction, and final handoff report assembly in `cli/lib/site.mjs`.
1847
+ - Reused the extracted runbook helpers from the existing bundle handoff report path without changing JSON or human-readable output contracts.
1848
+
1849
+ ### Impact
1850
+ - `cli/lib/site.mjs` no longer owns the large deterministic operator runbook payload builder.
1851
+ - Bundle handoff JSON snapshots, task command manifests, evidence capture metadata, and target-repo prompt output remain behavior-compatible.
1852
+ - This leaves the remaining handoff flow easier to read because report orchestration is separated from runbook payload construction.
1853
+
1854
+ ### Verification Plan
1855
+ - `node --check cli/lib/site-bundle-handoff-runbook.mjs && node --check cli/lib/site.mjs`
1856
+ - `node --test cli/lib/site.test.mjs`
1857
+ - `npm test`
1858
+ - `npm run audit:strict`
1859
+ - `npm run release:metadata`
1860
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1861
+ - `git diff --check`
1862
+
1863
+ ## Phase 675 — Website Improvement Bundle Compare Helper Split (unreleased)
1864
+
1865
+ Website Improvement bundle compare summary, diff, and formatter helpers now live outside the main site workflow module.
1866
+
1867
+ ### Changed
1868
+ - Moved bundle compare summaries, metadata/file diff builders, and JSON/Markdown compare formatters into `cli/lib/site-bundle-compare.mjs`.
1869
+ - Kept bundle check orchestration and compare report assembly in `cli/lib/site.mjs` because compare report creation still depends on strict bundle validation.
1870
+ - Re-exported compare formatters from `cli/lib/site.mjs` so existing imports keep their public API.
1871
+
1872
+ ### Impact
1873
+ - `cli/lib/site.mjs` no longer owns deterministic compare formatting or checksum diff construction.
1874
+ - Bundle compare JSON and human-readable output keep the existing output contract.
1875
+ - This narrows the remaining bundle orchestration surface before larger check/handoff boundaries are split.
1876
+
1877
+ ### Verification Plan
1878
+ - `node --check cli/lib/site-bundle-compare.mjs && node --check cli/lib/site.mjs`
1879
+ - `node --test cli/lib/site.test.mjs`
1880
+ - `npm test`
1881
+ - `npm run audit:strict`
1882
+ - `npm run release:metadata`
1883
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1884
+ - `git diff --check`
1885
+
1886
+ ## Phase 674 — Website Improvement Bundle Repair Helper Split (unreleased)
1887
+
1888
+ Website Improvement bundle repair guidance helpers now live outside the main site workflow module.
1889
+
1890
+ ### Changed
1891
+ - Moved bundle repair command guidance, repair guidance Markdown lines, and before/after repair check summaries into `cli/lib/site-bundle-repair.mjs`.
1892
+ - Kept repair preview, repair bundle regeneration, applied repair verification, and bundle check orchestration in `cli/lib/site.mjs`.
1893
+ - Reused the extracted repair guidance in bundle check reports, repair reports, and target-repo handoff prompts.
1894
+
1895
+ ### Impact
1896
+ - `cli/lib/site.mjs` no longer owns repair command construction or repair check summary formatting.
1897
+ - Bundle repair preview/apply, strict bundle check, and handoff prompt repair sections keep their existing JSON/Markdown output contract.
1898
+ - This leaves repair execution in the orchestrator while moving deterministic repair guidance into a smaller module.
1899
+
1900
+ ### Verification Plan
1901
+ - `node --check cli/lib/site-bundle-repair.mjs && node --check cli/lib/site.mjs`
1902
+ - `node --test cli/lib/site.test.mjs`
1903
+ - `npm test`
1904
+ - `npm run audit:strict`
1905
+ - `npm run release:metadata`
1906
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1907
+ - `git diff --check`
1908
+
1909
+ ## Phase 673 — Website Improvement Bundle File Helper Split (unreleased)
1910
+
1911
+ Website Improvement bundle file, digest, and lightweight validation helpers now live outside the main site workflow module.
1912
+
1913
+ ### Changed
1914
+ - Moved SHA-256 digest creation, bundle checksum manifest hashing, bundle file reads, JSON parsing, Markdown fragment checks, short digest rendering, and array equality checks into `cli/lib/site-bundle-files.mjs`.
1915
+ - Kept bundle generation, generated-contract comparison, repair, check, compare, and target-repo handoff report assembly in `cli/lib/site.mjs`.
1916
+ - Reused the extracted helpers for bundle creation checksums, strict bundle verification, generated file drift reporting, and handoff prompt context reads.
1917
+
1918
+ ### Impact
1919
+ - `cli/lib/site.mjs` no longer owns low-level bundle file parsing or checksum mechanics.
1920
+ - Bundle check, repair, compare, handoff, and checksum validation keep the existing JSON/Markdown output contract.
1921
+ - This keeps the next bundle split safer because filesystem and digest helpers are now isolated from workspace analysis and report assembly.
1922
+
1923
+ ### Verification Plan
1924
+ - `node --check cli/lib/site-bundle-files.mjs && node --check cli/lib/site.mjs`
1925
+ - `node --test cli/lib/site.test.mjs`
1926
+ - `npm test`
1927
+ - `npm run audit:strict`
1928
+ - `npm run release:metadata`
1929
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1930
+ - `git diff --check`
1931
+
1932
+ ## Phase 672 — Website Improvement Bundle Command Helper Split (unreleased)
1933
+
1934
+ Website Improvement bundle handoff command and safety helpers now live outside the main site workflow module.
1935
+
1936
+ ### Changed
1937
+ - Moved bundle task handoff command args, check/handoff command args, shell quoting, output-file naming, and command safety policy helpers into `cli/lib/site-bundle-commands.mjs`.
1938
+ - Kept bundle check, repair, compare, and target-repo handoff report assembly in `cli/lib/site.mjs` so this split stays limited to deterministic command construction.
1939
+ - Reused the same helper outputs for task catalogs, operator runbooks, repair guidance, and source bundle verification prompts.
1940
+
1941
+ ### Impact
1942
+ - `cli/lib/site.mjs` no longer owns low-level bundle command string construction or local/read-only safety policy payloads.
1943
+ - Bundle repair guidance, strict bundle checks, task-specific handoff commands, and target-repo handoff prompts keep the existing command and JSON contract.
1944
+ - This prepares the remaining bundle check/repair/handoff logic for smaller future module boundaries without changing external behavior.
1945
+
1946
+ ### Verification Plan
1947
+ - `node --check cli/lib/site-bundle-commands.mjs && node --check cli/lib/site.mjs`
1948
+ - `node --test cli/lib/site.test.mjs`
1949
+ - `npm test`
1950
+ - `npm run audit:strict`
1951
+ - `npm run release:metadata`
1952
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1953
+ - `git diff --check`
1954
+
1955
+ ## Phase 671 — Website Improvement Prompt Module Split (unreleased)
1956
+
1957
+ Website Improvement prompt and handoff report builders now live outside the main site workflow module.
1958
+
1959
+ ### Changed
1960
+ - Moved Codex/Claude prompt rendering, task selection, ordered refactor-task sorting, and Website Improvement handoff report Markdown into `cli/lib/site-prompts.mjs`.
1961
+ - Moved audit category catalog and category lookup into `cli/lib/site-options.mjs` so prompts, workflow graphs, task normalization, and reports share one source.
1962
+ - Moved default implementation risk normalization into `cli/lib/site-evidence.mjs` so handoff reports and workspace normalization share the same evidence defaults.
1963
+ - Re-exported prompt and handoff helpers from `cli/lib/site.mjs` so existing imports keep working.
1964
+
1965
+ ### Impact
1966
+ - `cli/lib/site.mjs` no longer owns Codex/Claude prompt body composition or final handoff report rendering.
1967
+ - Bundle creation, bundle handoff, workflow graph, and prompt CLI flows keep their existing output contracts and local-only safety boundaries.
1968
+ - This keeps the Website Improvement CLI moving toward smaller, readable modules without weakening verification, evidence, or MCP readiness tracking.
1969
+
1970
+ ### Verification Plan
1971
+ - `node --check cli/lib/site-options.mjs && node --check cli/lib/site-evidence.mjs && node --check cli/lib/site-prompts.mjs && node --check cli/lib/site.mjs`
1972
+ - `node --test cli/lib/site.test.mjs`
1973
+ - `npm test`
1974
+ - `npm run audit:strict`
1975
+ - `npm run release:metadata`
1976
+ - `python3 -B tools/audit/local-ci.py --docs-only`
1977
+ - `git diff --check`
1978
+
1979
+ ## Phase 670 — Website Improvement Next Actions Module Split (unreleased)
1980
+
1981
+ Website Improvement next-action reports now live outside the main site workflow module.
1982
+
1983
+ ### Changed
1984
+ - Moved standard, init, and intake next-action report builders plus next-action JSON/human formatting into `cli/lib/site-next-actions.mjs`.
1985
+ - Moved implementation evidence key/count helpers into `cli/lib/site-evidence.mjs` so next-action reports, bundles, and bundle checks share the same evidence counting rules.
1986
+ - Re-exported next-action helpers from `cli/lib/site.mjs` so existing imports keep working.
1987
+
1988
+ ### Impact
1989
+ - `cli/lib/site.mjs` no longer owns operator next-action prioritization or setup command rendering.
1990
+ - Website Improvement init, intake, readiness, task generation, prompt, handoff, and bundle guidance keep their existing command and output contracts.
1991
+ - This continues the split toward smaller modules while preserving verification, handoff evidence, and local-only safety boundaries.
1992
+
1993
+ ### Verification Plan
1994
+ - `node --check cli/lib/site-evidence.mjs && node --check cli/lib/site-next-actions.mjs && node --check cli/lib/site.mjs`
1995
+ - `node --test cli/lib/site.test.mjs`
1996
+ - `npm test`
1997
+ - `npm run audit:strict`
1998
+ - `npm run release:metadata`
1999
+ - `python3 -B tools/audit/local-ci.py --docs-only`
2000
+ - `git diff --check`
2001
+
2002
+ ## Phase 669 — Website Improvement MCP Report Module Split (unreleased)
2003
+
2004
+ Website Improvement MCP readiness reports and action plans now live outside the main site workflow module.
2005
+
2006
+ ### Changed
2007
+ - Moved MCP status combination, MCP key normalization, task/MCP gap detection, readiness check report formatting, and MCP action plan rendering into `cli/lib/site-mcp-report.mjs`.
2008
+ - Moved shared MCP item and priority option catalogs into `cli/lib/site-options.mjs` so `site.mjs` and MCP report helpers can share them without circular imports.
2009
+ - Re-exported the public MCP report/action-plan helpers from `cli/lib/site.mjs` so existing imports keep working.
2010
+
2011
+ ### Impact
2012
+ - `cli/lib/site.mjs` no longer owns MCP readiness report construction or action-plan Markdown rendering.
2013
+ - Website Improvement MCP check, probe-aware MCP check, MCP action plan, next-actions, workflow graph, bundle, and handoff flows keep the same output contract.
2014
+ - This leaves `site.mjs` closer to orchestration while MCP handoff logic is grouped in a dedicated module for Claude/Codex MCP use.
2015
+
2016
+ ### Verification Plan
2017
+ - `node --check cli/lib/site-options.mjs && node --check cli/lib/site-mcp-report.mjs && node --check cli/lib/site.mjs`
2018
+ - `node --test cli/lib/site.test.mjs`
2019
+ - `npm test`
2020
+ - `npm run audit:strict`
2021
+ - `npm run release:metadata`
2022
+ - `python3 -B tools/audit/local-ci.py --docs-only`
2023
+ - `git diff --check`
2024
+
2025
+ ## Phase 668 — Website Improvement String Helper Split (unreleased)
2026
+
2027
+ Website Improvement string normalization and Markdown rendering helpers now live outside the main site workflow module.
2028
+
2029
+ ### Changed
2030
+ - Moved `normalizeStringArray`, `markdownTable`, and `markdownList` into `cli/lib/site-strings.mjs`.
2031
+ - Kept the existing Markdown output shape for MCP action plans, workflow graphs, bundle READMEs, handoff reports, and prompt bundles.
2032
+ - Left browser-console helpers in `docs/website-console/app.js` untouched because this change only affects the CLI module boundary.
2033
+
2034
+ ### Impact
2035
+ - `cli/lib/site.mjs` no longer owns low-level string cleanup and Markdown table/list rendering.
2036
+ - Future Website Improvement action-plan and bundle modules can share the same small formatting helpers without circular imports.
2037
+ - Existing CLI JSON/human/Markdown output contracts remain unchanged.
2038
+
2039
+ ### Verification Plan
2040
+ - `node --check cli/lib/site-strings.mjs && node --check cli/lib/site.mjs`
2041
+ - `node --test cli/lib/site.test.mjs`
2042
+ - `npm test`
2043
+ - `npm run audit:strict`
2044
+ - `npm run release:metadata`
2045
+ - `python3 -B tools/audit/local-ci.py --docs-only`
2046
+ - `git diff --check`
2047
+
2048
+ ## Phase 667 — Website Improvement MCP Command Helper Split (unreleased)
2049
+
2050
+ Website Improvement MCP readiness command strings now live outside the main site workflow module.
2051
+
2052
+ ### Changed
2053
+ - Moved MCP probe command generation, next-action command generation, and stdin command-target normalization into `cli/lib/site-mcp-commands.mjs`.
2054
+ - Kept the existing command names and output paths unchanged for `--mcp-check`, `--mcp-plan`, `--tasks`, `--prompt`, `--report`, and `--bundle` flows.
2055
+ - Left report assembly in `cli/lib/site.mjs` so this split stays limited to deterministic command construction.
2056
+
2057
+ ### Impact
2058
+ - `cli/lib/site.mjs` no longer owns repeated MCP/readiness command string construction.
2059
+ - MCP readiness reports, action plans, next-actions output, and bundle handoff guidance keep their current CLI command contract.
2060
+ - This continues the Website Improvement module split toward a cleaner Claude/Codex MCP handoff surface without changing runtime behavior.
2061
+
2062
+ ### Verification Plan
2063
+ - `node --check cli/lib/site-mcp-commands.mjs && node --check cli/lib/site.mjs`
2064
+ - `node --test cli/lib/site.test.mjs`
2065
+ - `npm test`
2066
+ - `npm run audit:strict`
2067
+ - `npm run release:metadata`
2068
+ - `python3 -B tools/audit/local-ci.py --docs-only`
2069
+ - `git diff --check`
2070
+
2071
+ ## Phase 666 — Website Improvement MCP Readiness Helper Split (unreleased)
2072
+
2073
+ Website Improvement MCP readiness scoring now lives outside the main site workflow module.
2074
+
2075
+ ### Changed
2076
+ - Moved MCP readiness evidence collection, readiness item construction, and aggregate check status scoring into `cli/lib/site-mcp-readiness.mjs`.
2077
+ - Kept task/MCP gap detection in `cli/lib/site.mjs` because it still depends on normalized task metadata and local workspace structures.
2078
+ - Left the existing `buildSiteMcpCheckReport` JSON and human report contract unchanged.
2079
+
2080
+ ### Impact
2081
+ - `cli/lib/site.mjs` is smaller and now focuses on command/report assembly rather than low-level MCP readiness rules.
2082
+ - MCP readiness, probe output, task gap warnings, and generated next actions keep the same behavior for existing Website Improvement workspaces.
2083
+ - This continues the incremental Website Improvement module split while preserving MCP handoff evidence and verification surfaces.
2084
+
2085
+ ### Verification Plan
2086
+ - `node --check cli/lib/site-mcp-readiness.mjs && node --check cli/lib/site.mjs`
2087
+ - `node --test cli/lib/site.test.mjs`
2088
+ - `npm test`
2089
+ - `npm run audit:strict`
2090
+ - `npm run release:metadata`
2091
+ - `python3 -B tools/audit/local-ci.py --docs-only`
2092
+ - `git diff --check`
2093
+
2094
+ ## Phase 665 — Website Improvement MCP Probe Helper Split (unreleased)
2095
+
2096
+ Website Improvement read-only MCP probe logic now lives outside the main site workflow module.
2097
+
2098
+ ### Changed
2099
+ - Moved URL parsing, GitHub/Figma reference parsing, local repo directory probe checks, probe item construction, and `buildSiteMcpProbeReport` into `cli/lib/site-mcp-probes.mjs`.
2100
+ - Re-exported `buildSiteMcpProbeReport` from `cli/lib/site.mjs` so existing tests and consumers keep the same helper import surface.
2101
+ - Kept broader MCP readiness scoring and task/MCP gap logic in `cli/lib/site.mjs` for now because it still depends on workspace normalization and task ranking helpers.
2102
+
2103
+ ### Impact
2104
+ - `cli/lib/site.mjs` is smaller and its MCP readiness section now focuses on report assembly rather than low-level URL/path probe mechanics.
2105
+ - The probe report remains read-only, makes no external MCP calls, and keeps the same JSON/human output contract.
2106
+ - This continues the incremental Website Improvement module split without changing CLI flags, bundle checks, or handoff evidence surfaces.
2107
+
2108
+ ### Verification Plan
2109
+ - `node --check cli/lib/site-mcp-probes.mjs && node --check cli/lib/site.mjs`
2110
+ - `node --test cli/lib/site.test.mjs`
2111
+ - `npm test`
2112
+ - `npm run audit:strict`
2113
+ - `npm run release:metadata`
2114
+ - `git diff --check`
2115
+
2116
+ ## Phase 664 — Website Improvement Intake Template Content Split (unreleased)
2117
+
2118
+ Website Improvement intake template Markdown now lives with the static content catalog instead of the main workflow module.
2119
+
2120
+ ### Changed
2121
+ - Moved English and Korean intake template Markdown plus the intake section list into `cli/lib/site-content.mjs`.
2122
+ - Kept `buildSiteIntakeTemplateMarkdown` and `formatSiteIntakeTemplateJson` in `cli/lib/site.mjs` so command behavior and public helper names remain unchanged.
2123
+
2124
+ ### Impact
2125
+ - `cli/lib/site.mjs` no longer carries the long intake template bodies inline, making the executable workflow code easier to scan.
2126
+ - The generated English/Korean intake Markdown, JSON metadata, CLI flags, and tests remain unchanged.
2127
+ - This continues the incremental split of static Website Improvement content without reducing validation, bundle, or handoff evidence surfaces.
2128
+
2129
+ ### Verification Plan
2130
+ - `node --check cli/lib/site-content.mjs && node --check cli/lib/site.mjs`
2131
+ - `node --test cli/lib/site.test.mjs`
2132
+ - `npm test`
2133
+ - `npm run audit:strict`
2134
+ - `npm run release:metadata`
2135
+ - `git diff --check`
2136
+
2137
+ ## Phase 663 — Website Improvement Static Content Module Split (unreleased)
2138
+
2139
+ Website Improvement prompt and bundle catalogs now live outside the main site workflow module.
2140
+
2141
+ ### Changed
2142
+ - Moved Website Improvement prompt template ids, prompt template metadata, bundle file manifest, and bundle checksum manifest into `cli/lib/site-content.mjs`.
2143
+ - Re-exported the public constants from `cli/lib/site.mjs` so existing tests and consumers keep the same import surface.
2144
+ - Kept the prompt template ordering assertion next to the catalog data it protects.
2145
+
2146
+ ### Impact
2147
+ - `cli/lib/site.mjs` is smaller and its executable workflow logic is easier to scan.
2148
+ - No CLI behavior, JSON contract, bundle manifest, prompt catalog, or test import path changes.
2149
+ - This is the first low-risk split toward reducing the oversized Website Improvement module without reducing verification or evidence surfaces.
2150
+
2151
+ ### Verification Plan
2152
+ - `node --check cli/lib/site-content.mjs && node --check cli/lib/site.mjs`
2153
+ - `node --test cli/lib/site.test.mjs`
2154
+ - `npm test`
2155
+ - `npm run audit:strict`
2156
+ - `npm run release:metadata`
2157
+ - `git diff --check`
2158
+
2159
+ ## Phase 662 — VS Code Extension Dev Dependency Audit Hygiene (unreleased)
2160
+
2161
+ VS Code extension development dependencies now install with a clean npm audit report.
2162
+
2163
+ ### Changed
2164
+ - Pinned the Mocha integration-test harness at `11.3.0` to avoid the vulnerable newer `diff` range while keeping the extension e2e runner on the current major.
2165
+ - Added npm `overrides` for `js-yaml` and `serialize-javascript` so transitive Mocha audit findings resolve without changing extension runtime dependencies.
2166
+ - Refreshed `vscode-extension/package-lock.json` from the updated dependency policy.
2167
+
2168
+ ### Impact
2169
+ - `npm audit --prefix vscode-extension --audit-level=moderate` now reports zero vulnerabilities.
2170
+ - The published VSIX runtime surface remains unchanged because the extension still has no production dependencies.
2171
+ - The integration test harness still uses Mocha and remains covered by the VS Code extension e2e test.
2172
+
2173
+ ### Verification Plan
2174
+ - `npm audit --prefix vscode-extension --audit-level=moderate`
2175
+ - `npm run compile --prefix vscode-extension`
2176
+ - `npm test --prefix vscode-extension`
2177
+ - `npm run test:e2e --prefix vscode-extension`
2178
+ - `npm test`
2179
+ - `npm run audit:strict`
2180
+ - `git diff --check`
2181
+
3
2182
  ## Phase 661 — Website Console Revalidation Gate JSON Action Labels (unreleased)
4
2183
 
5
2184
  Website Console revalidation gate action buttons now identify that they produce compact gate JSON.