@event4u/agent-config 16.0.0 → 16.2.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 (382) hide show
  1. package/.augment-plugin/marketplace.json +3 -3
  2. package/.augment-plugin/plugin.json +1 -1
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/CHANGELOG.md +289 -140
  5. package/CONTRIBUTING.md +9 -0
  6. package/README.md +2 -2
  7. package/dist/agent-src/commands/analyze/inbox.md +26 -0
  8. package/dist/agent-src/commands/analyze/roadmap-repos.md +27 -0
  9. package/dist/agent-src/commands/challenge-me/closure.md +178 -0
  10. package/dist/agent-src/commands/challenge-me.md +9 -2
  11. package/dist/agent-src/commands/council/default.md +25 -5
  12. package/dist/agent-src/commands/feature/plan.md +28 -1
  13. package/dist/agent-src/commands/feature/roadmap.md +28 -1
  14. package/dist/agent-src/commands/implement-ticket.md +27 -0
  15. package/dist/agent-src/commands/jira-ticket.md +27 -0
  16. package/dist/agent-src/commands/pr/create.md +29 -0
  17. package/dist/agent-src/commands/pr/merge.md +60 -9
  18. package/dist/agent-src/commands/roadmap/ai-council.md +7 -1
  19. package/dist/agent-src/commands/roadmap/create.md +74 -27
  20. package/dist/agent-src/commands/roadmap/materialize.md +27 -0
  21. package/dist/agent-src/commands/roadmap/process-full.md +123 -18
  22. package/dist/agent-src/commands/team.md +22 -0
  23. package/dist/agent-src/commands/work.md +4 -0
  24. package/dist/agent-src/contexts/authority/scope-growth-ownership.md +80 -0
  25. package/dist/agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +47 -0
  26. package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +44 -3
  27. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +19 -23
  28. package/dist/agent-src/contexts/execution/decision-closure-execution.md +93 -0
  29. package/dist/agent-src/contexts/execution/fix-loop-ladder.md +108 -0
  30. package/dist/agent-src/contexts/execution/plan-confidence-gate.md +4 -2
  31. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +75 -6
  32. package/dist/agent-src/guidelines/agent-infra/active-remediation-mechanics.md +57 -0
  33. package/dist/agent-src/guidelines/agent-infra/evaluator-independence-mechanics.md +102 -0
  34. package/dist/agent-src/guidelines/design-fidelity-routing.md +29 -0
  35. package/dist/agent-src/rules/autonomous-execution.md +15 -8
  36. package/dist/agent-src/rules/delegation-policy.md +23 -45
  37. package/dist/agent-src/rules/design-fidelity.md +32 -37
  38. package/dist/agent-src/rules/evaluator-independence.md +43 -49
  39. package/dist/agent-src/rules/test-first.md +41 -0
  40. package/dist/agent-src/rules/ui-audit-gate.md +1 -2
  41. package/dist/agent-src/skills/accessibility-auditor/data/aria-patterns.csv +1 -1
  42. package/dist/agent-src/skills/accessibility-auditor/data/manifest.json +3 -3
  43. package/dist/agent-src/skills/ai-council/SKILL.md +11 -3
  44. package/dist/agent-src/skills/api-design/data/manifest.json +3 -3
  45. package/dist/agent-src/skills/database/data/manifest.json +4 -4
  46. package/dist/agent-src/skills/database/data/query-tuning.csv +3 -3
  47. package/dist/agent-src/skills/design-review/SKILL.md +80 -4
  48. package/dist/agent-src/skills/design-review/references/verification-automation.md +32 -0
  49. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +30 -5
  50. package/dist/agent-src/skills/existing-ui-audit/references/component-taxonomy-detection.md +56 -0
  51. package/dist/agent-src/skills/experiment-loop/SKILL.md +31 -1
  52. package/dist/agent-src/skills/markitdown/SKILL.md +4 -0
  53. package/dist/agent-src/skills/playwright-testing/SKILL.md +30 -6
  54. package/dist/agent-src/skills/roadmap-writing/SKILL.md +1 -1
  55. package/dist/agent-src/skills/storybook-workshop/SKILL.md +42 -3
  56. package/dist/agent-src/skills/threat-modeling/SKILL.md +9 -4
  57. package/dist/agent-src/skills/threat-modeling/data/manifest.json +4 -4
  58. package/dist/agent-src/skills/ui-component-architect/SKILL.md +23 -0
  59. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +37 -3
  60. package/dist/agent-src/templates/agent-settings.md +1 -1
  61. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  62. package/dist/agent-src/templates/roadmaps.md +218 -0
  63. package/dist/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  64. package/dist/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  65. package/dist/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  66. package/dist/agent-src/templates/scripts/work_engine/directives/ui/app_spec.ts +10 -4
  67. package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +260 -21
  68. package/dist/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +22 -3
  69. package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +6 -1
  70. package/dist/agent-src/templates/scripts/work_engine/state.ts +57 -7
  71. package/dist/agent-src/templates/scripts/work_engine/taxonomy/detect.ts +500 -0
  72. package/dist/agent-src/templates/scripts/work_engine/taxonomy/place.ts +183 -0
  73. package/dist/cli/python/knowledge_ingest.js +1 -1
  74. package/dist/cli/python/workspace_drive.js +1 -1
  75. package/dist/cli-delegate/check_update_banner.js +40 -2
  76. package/dist/cli-delegate/chunk-4E2W63DA.js +335 -0
  77. package/dist/cli-delegate/{chunk-S3VFXMTM.js → chunk-4XFP2Y3E.js} +1 -1
  78. package/dist/cli-delegate/chunk-5R7HOLAF.js +99 -0
  79. package/dist/cli-delegate/{chunk-IVBPRCQO.js → chunk-6KFEC3G7.js} +1 -1
  80. package/dist/cli-delegate/{chunk-2TAQ2K4V.js → chunk-6KM6ORRY.js} +55 -386
  81. package/dist/cli-delegate/{chunk-AK6HODNQ.js → chunk-7XGBX6ZH.js} +973 -555
  82. package/dist/cli-delegate/{chunk-2XY7ILBT.js → chunk-FC75PGJE.js} +42 -2
  83. package/dist/cli-delegate/{chunk-55ACLDUE.js → chunk-FP36SWJD.js} +587 -141
  84. package/dist/cli-delegate/{chunk-3FKR64R5.js → chunk-IGD6ERX6.js} +62 -7
  85. package/dist/cli-delegate/{chunk-GYC3VRYN.js → chunk-JNMVLWLR.js} +99 -14
  86. package/dist/cli-delegate/{chunk-H32DGUJH.js → chunk-P6ZHP5W2.js} +1 -1
  87. package/dist/cli-delegate/{chunk-57PN4GYJ.js → chunk-RGNIWTEA.js} +1 -1
  88. package/dist/cli-delegate/chunk-ROYYTEZU.js +39 -0
  89. package/dist/cli-delegate/{chunk-2DK2VJWG.js → chunk-WGXTVKCQ.js} +20 -6
  90. package/dist/cli-delegate/chunk-YDPILCOL.js +152 -0
  91. package/dist/cli-delegate/{chunk-QJWAUMJW.js → chunk-YJ72UIAK.js} +730 -15
  92. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  93. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  94. package/dist/cli-delegate/cmd_conformance.js +985 -831
  95. package/dist/cli-delegate/cmd_doctor.js +7 -5
  96. package/dist/cli-delegate/cmd_explain.js +2 -2
  97. package/dist/cli-delegate/cmd_export.js +9 -7
  98. package/dist/cli-delegate/cmd_fleet.js +4 -2
  99. package/dist/cli-delegate/cmd_handoff.js +7 -7
  100. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  101. package/dist/cli-delegate/cmd_memory_get.js +1 -1
  102. package/dist/cli-delegate/cmd_migrate.js +2 -2
  103. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  104. package/dist/cli-delegate/cmd_preflight.js +4 -2
  105. package/dist/cli-delegate/cmd_prune.js +10 -8
  106. package/dist/cli-delegate/cmd_route_audit.js +3 -3
  107. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  108. package/dist/cli-delegate/cmd_session_recycle.js +4 -4
  109. package/dist/cli-delegate/cmd_settings_get.js +28 -2
  110. package/dist/cli-delegate/cmd_settings_migrate.js +9 -7
  111. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  112. package/dist/cli-delegate/cmd_sync.js +10 -8
  113. package/dist/cli-delegate/cmd_uninstall.js +16 -13
  114. package/dist/cli-delegate/cmd_update.js +1 -1
  115. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  116. package/dist/cli-delegate/cmd_validate.js +12 -10
  117. package/dist/cli-delegate/cmd_versions.js +1 -1
  118. package/dist/discovery/deprecation-report.md +1 -1
  119. package/dist/discovery/discovery-manifest.json +90 -43
  120. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  121. package/dist/discovery/discovery-manifest.summary.md +4 -4
  122. package/dist/discovery/dormancy-report.md +1 -1
  123. package/dist/discovery/orphan-report.md +1 -1
  124. package/dist/discovery/packs.json +10 -8
  125. package/dist/discovery/trust-report.md +3 -3
  126. package/dist/discovery/workspaces.json +8 -6
  127. package/dist/hooks/dispatch.js +7682 -2772
  128. package/dist/hooks/dispatch.sha256 +1 -0
  129. package/dist/install/claudeRuleRewrite.js +14 -3
  130. package/dist/install/conflict.js +60 -10
  131. package/dist/install/conflictTracker.js +218 -0
  132. package/dist/install/fsPrimitives.js +54 -0
  133. package/dist/install/install.mjs +2200 -1559
  134. package/dist/install/manifestFiles.js +259 -0
  135. package/dist/install/preflight.js +14 -2
  136. package/dist/install/preserve.js +157 -0
  137. package/dist/install/recordedOwnership.js +132 -0
  138. package/dist/install/txlog.js +11 -2
  139. package/dist/mcp/registry-manifest.json +3 -3
  140. package/dist/mcp/server.json +2 -2
  141. package/dist/mcp/server.mjs +3066 -1470
  142. package/dist/router.json +1 -1
  143. package/dist/scripts/_lib/agent_settings.js +3 -2
  144. package/dist/scripts/_lib/fs_atomic.js +167 -0
  145. package/dist/scripts/_lib/installed_tools.js +460 -0
  146. package/dist/scripts/_lib/lean_projection_mode.js +3 -2
  147. package/dist/scripts/_lib/settings_renamed_keys.js +78 -0
  148. package/dist/server/routes/install.js +8 -0
  149. package/dist/server/routes/wizard.js +9 -3
  150. package/dist/server/schemas/settings.js +40 -5
  151. package/dist/shared/missionExecution.js +97 -0
  152. package/dist/ui/assets/index-Cwq4d0hX.js +23 -0
  153. package/dist/ui/assets/index-Cyjy8bWO.css +1 -0
  154. package/dist/ui/index.html +2 -2
  155. package/docs/MIGRATION.md +103 -0
  156. package/docs/contracts/settings-classes.md +28 -7
  157. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +57 -0
  158. package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +102 -0
  159. package/docs/guidelines/design-fidelity-routing.md +29 -0
  160. package/package.json +4 -4
  161. package/src/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +62 -2
  162. package/src/agent-src/templates/scripts/work_engine/directives/backend/test.ts +1 -0
  163. package/src/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +1 -0
  164. package/src/agent-src/templates/scripts/work_engine/directives/ui/app_spec.ts +10 -4
  165. package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +260 -21
  166. package/src/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +22 -3
  167. package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +6 -1
  168. package/src/agent-src/templates/scripts/work_engine/state.ts +57 -7
  169. package/src/agent-src/templates/scripts/work_engine/taxonomy/detect.ts +500 -0
  170. package/src/agent-src/templates/scripts/work_engine/taxonomy/place.ts +183 -0
  171. package/src/config/agent-settings.template.yml +168 -27
  172. package/src/config/auto-rule-budget.json +16 -0
  173. package/src/config/ci-local-parity.yml +36 -5
  174. package/src/config/continuity-surface.json +23 -2
  175. package/src/config/gate-coverage.yml +377 -13
  176. package/src/config/gate-violation-baselines.json +10 -6
  177. package/src/config/hook-latency-budget.json +21 -0
  178. package/src/config/hook-token-budget.json +4 -2
  179. package/src/config/loop-surfaces.yaml +215 -0
  180. package/src/config/metric-registry.yml +114 -0
  181. package/src/config/placeholder-drift-budget.json +10 -0
  182. package/src/config/platform-anchor.json +3 -2
  183. package/src/config/release-gate-locality.yml +11 -0
  184. package/src/config/routing-coverage-seed.json +33 -5
  185. package/src/config/rule-enforcement-baseline.json +0 -1
  186. package/src/install/claudeRuleRewrite.ts +16 -2
  187. package/src/install/conflict.ts +65 -9
  188. package/src/install/conflictTracker.ts +299 -0
  189. package/src/install/fsPrimitives.ts +54 -0
  190. package/src/install/manifestFiles.ts +312 -0
  191. package/src/install/preflight.ts +16 -2
  192. package/src/install/preserve.ts +205 -0
  193. package/src/install/recordedOwnership.ts +149 -0
  194. package/src/install/txlog.ts +11 -2
  195. package/src/install/types.ts +19 -4
  196. package/src/scripts/_cli/cmd_conformance.ts +88 -15
  197. package/src/scripts/_cli/cmd_doctor.ts +7 -20
  198. package/src/scripts/_cli/cmd_route_explain.ts +9 -2
  199. package/src/scripts/_cli/cmd_settings_get.ts +44 -0
  200. package/src/scripts/_cli/doctor_execution.ts +173 -0
  201. package/src/scripts/_cli/doctor_network_posture.ts +226 -0
  202. package/src/scripts/_lib/activation_payload.ts +247 -0
  203. package/src/scripts/_lib/agent_settings.ts +4 -2
  204. package/src/scripts/_lib/authority_path.ts +102 -0
  205. package/src/scripts/_lib/body_portable.ts +102 -0
  206. package/src/scripts/_lib/cascade_base.ts +94 -0
  207. package/src/scripts/_lib/cc_transcript.ts +132 -1
  208. package/src/scripts/_lib/changelog_eras.ts +7 -2
  209. package/src/scripts/_lib/concern_sla_window.ts +200 -0
  210. package/src/scripts/_lib/continuation_ladder.ts +149 -2
  211. package/src/scripts/_lib/council_transport.ts +129 -0
  212. package/src/scripts/_lib/delivery_ready.ts +112 -0
  213. package/src/scripts/_lib/forge_protection.ts +381 -0
  214. package/src/scripts/_lib/forge_reader.ts +558 -0
  215. package/src/scripts/_lib/hook_platform_keys.ts +27 -0
  216. package/src/scripts/_lib/host_env_write.ts +111 -0
  217. package/src/scripts/_lib/json_python_parity.ts +127 -0
  218. package/src/scripts/_lib/lean_projection_mode.ts +14 -3
  219. package/src/scripts/_lib/llm_proposer_transport.ts +14 -4
  220. package/src/scripts/_lib/loop_surfaces.ts +382 -0
  221. package/src/scripts/_lib/mission_record.ts +190 -0
  222. package/src/scripts/_lib/obligation_frequency.ts +217 -0
  223. package/src/scripts/_lib/obligations.ts +513 -0
  224. package/src/scripts/_lib/orchestration_record.ts +11 -20
  225. package/src/scripts/_lib/probe_inputs.ts +271 -0
  226. package/src/scripts/_lib/read_surface_scan.ts +322 -0
  227. package/src/scripts/_lib/release_highlights.ts +201 -11
  228. package/src/scripts/_lib/release_holds.ts +493 -0
  229. package/src/scripts/_lib/release_migration_gate.ts +184 -0
  230. package/src/scripts/_lib/retrieval_sanitize.ts +77 -16
  231. package/src/scripts/_lib/rides_along.ts +102 -0
  232. package/src/scripts/_lib/settings_renamed_keys.ts +82 -0
  233. package/src/scripts/_lib/shell_write_shapes.ts +108 -0
  234. package/src/scripts/_lib/structural_hiding.ts +622 -0
  235. package/src/scripts/_lib/test_delta.ts +166 -0
  236. package/src/scripts/_lib/test_provenance.ts +171 -0
  237. package/src/scripts/_lib/turn_end_refusals.ts +525 -4
  238. package/src/scripts/_lib/turn_end_transcript.ts +216 -0
  239. package/src/scripts/_lib/typed_op_grant.ts +246 -0
  240. package/src/scripts/_lib/typed_op_watch.ts +185 -0
  241. package/src/scripts/_lib/verification_command.ts +324 -0
  242. package/src/scripts/_lib/verification_evidence.ts +647 -0
  243. package/src/scripts/_lib/verify_clause.ts +280 -0
  244. package/src/scripts/ai_council/config.ts +8 -11
  245. package/src/scripts/ai_council/fallback_config.ts +5 -3
  246. package/src/scripts/ai_council/ownership_classes.ts +118 -0
  247. package/src/scripts/ai_team/team_dispatch.ts +4 -0
  248. package/src/scripts/ask_block_census.ts +285 -15
  249. package/src/scripts/before_complete_hook.ts +340 -23
  250. package/src/scripts/bench_hook_latency.ts +412 -5
  251. package/src/scripts/cache_realization_report.ts +61 -1
  252. package/src/scripts/check_argument_hint.ts +287 -0
  253. package/src/scripts/check_claims.ts +125 -1
  254. package/src/scripts/check_enforcement_coverage.ts +38 -9
  255. package/src/scripts/check_enforcement_matrix.ts +866 -0
  256. package/src/scripts/check_finding_dispositions.ts +22 -3
  257. package/src/scripts/check_gate_reachability.ts +173 -10
  258. package/src/scripts/check_generator_sync.ts +1025 -0
  259. package/src/scripts/check_host_docs_digest.ts +786 -0
  260. package/src/scripts/check_host_format_column.ts +559 -0
  261. package/src/scripts/check_input_references.ts +228 -0
  262. package/src/scripts/check_inputs_parity.ts +235 -0
  263. package/src/scripts/check_kernel_edit_ratified.ts +47 -5
  264. package/src/scripts/check_kill_switch_table.ts +294 -0
  265. package/src/scripts/check_placeholder_drift.ts +221 -0
  266. package/src/scripts/check_preamble_payload_budget.ts +75 -2
  267. package/src/scripts/check_read_surface_coverage.ts +515 -0
  268. package/src/scripts/check_release_highlights.ts +33 -1
  269. package/src/scripts/check_release_holds.ts +568 -0
  270. package/src/scripts/check_routing_coverage.ts +378 -11
  271. package/src/scripts/check_rule_projection_integrity.ts +22 -12
  272. package/src/scripts/check_static_parity.ts +17 -0
  273. package/src/scripts/check_test_delta.ts +294 -0
  274. package/src/scripts/check_test_weakening.ts +299 -0
  275. package/src/scripts/ci_settle.ts +145 -19
  276. package/src/scripts/closure_scan.ts +447 -0
  277. package/src/scripts/compile_hook_manifest.ts +102 -18
  278. package/src/scripts/council_record_shape.ts +209 -0
  279. package/src/scripts/external_sources_denylist.json +29 -4
  280. package/src/scripts/hook_manifest.json +1 -1
  281. package/src/scripts/hook_manifest.yaml +127 -11
  282. package/src/scripts/hooks/block_config_weakening.ts +229 -4
  283. package/src/scripts/hooks/block_kernel_rule_writes.ts +9 -78
  284. package/src/scripts/hooks/block_plumbing_writes.ts +314 -0
  285. package/src/scripts/hooks/bundle_integrity.ts +291 -0
  286. package/src/scripts/hooks/chain_nudge_hook.ts +1 -2
  287. package/src/scripts/hooks/code_graph_context_hook.ts +1 -2
  288. package/src/scripts/hooks/comment_discipline_hook.ts +1 -3
  289. package/src/scripts/hooks/concern_registry.ts +6 -0
  290. package/src/scripts/hooks/concern_timings.ts +94 -0
  291. package/src/scripts/hooks/delegation_nudge_hook.ts +1 -2
  292. package/src/scripts/hooks/design_pass_hook.ts +221 -5
  293. package/src/scripts/hooks/design_slop_hook.ts +1 -2
  294. package/src/scripts/hooks/dispatch_hook.ts +25 -19
  295. package/src/scripts/hooks/edit_shape_hook.ts +1 -2
  296. package/src/scripts/hooks/end_review_nudge_hook.ts +1 -1
  297. package/src/scripts/hooks/evidence_independence.ts +97 -2
  298. package/src/scripts/hooks/exit_codes.ts +128 -0
  299. package/src/scripts/hooks/host_lowering.json +1 -0
  300. package/src/scripts/hooks/host_lowering.ts +128 -3
  301. package/src/scripts/hooks/host_lowering.yaml +262 -46
  302. package/src/scripts/hooks/host_semantics.ts +30 -2
  303. package/src/scripts/hooks/injection_budget.ts +9 -2
  304. package/src/scripts/hooks/interruption_ledger_hook.ts +1 -2
  305. package/src/scripts/hooks/journal_record_hook.ts +1 -2
  306. package/src/scripts/hooks/memory_recall_hook.ts +539 -0
  307. package/src/scripts/hooks/obligation_settle_hook.ts +328 -0
  308. package/src/scripts/hooks/one_question_per_ask_hook.ts +25 -4
  309. package/src/scripts/hooks/orchestration_record_hook.ts +1 -2
  310. package/src/scripts/hooks/permission_gate.ts +1 -2
  311. package/src/scripts/hooks/push_settle_hook.ts +1 -3
  312. package/src/scripts/hooks/replay_hook.ts +2 -1
  313. package/src/scripts/hooks/reread_guard_hook.ts +1 -2
  314. package/src/scripts/hooks/review_baseline_hook.ts +1 -2
  315. package/src/scripts/hooks/rtk_wrap_hook.ts +1 -2
  316. package/src/scripts/hooks/rule_inject_hook.ts +55 -4
  317. package/src/scripts/hooks/run_continuation_hook.ts +30 -35
  318. package/src/scripts/hooks/skill_route_hook.ts +1 -2
  319. package/src/scripts/hooks/source_first_gate_hook.ts +1 -2
  320. package/src/scripts/hooks/spawn_guard_shadow_hook.ts +1 -2
  321. package/src/scripts/hooks/subagent_ledger_hook.ts +1 -2
  322. package/src/scripts/hooks/suggestion_capture_hook.ts +1 -1
  323. package/src/scripts/hooks/table_fingerprint.ts +49 -0
  324. package/src/scripts/hooks/telemetry_flush_hook.ts +1 -2
  325. package/src/scripts/hooks/telemetry_usage_hook.ts +1 -2
  326. package/src/scripts/hooks/tool_result_bytes_hook.ts +93 -9
  327. package/src/scripts/hooks/turn_end_gate_hook.ts +337 -324
  328. package/src/scripts/hooks/ui_route_nudge_hook.ts +1 -2
  329. package/src/scripts/hooks_doctor.ts +85 -0
  330. package/src/scripts/hooks_status.ts +19 -0
  331. package/src/scripts/install.ts +109 -210
  332. package/src/scripts/janitor.ts +7 -0
  333. package/src/scripts/lint_decision_classes.ts +464 -0
  334. package/src/scripts/lint_deny_text.ts +419 -0
  335. package/src/scripts/lint_exit_codes.ts +262 -0
  336. package/src/scripts/lint_hook_manifest.ts +66 -0
  337. package/src/scripts/lint_major_migration_sections.ts +450 -0
  338. package/src/scripts/lint_plan_risk_register.ts +47 -3
  339. package/src/scripts/lint_roadmap_blockers.ts +139 -12
  340. package/src/scripts/lint_roadmap_producers.ts +202 -0
  341. package/src/scripts/lint_skill_descriptions.ts +1 -1
  342. package/src/scripts/lint_skill_scripts_readonly.ts +1 -1
  343. package/src/scripts/mcp_server/prompts.ts +142 -1
  344. package/src/scripts/measure_rule_budget.ts +101 -5
  345. package/src/scripts/measure_skill_ranker_baseline.ts +305 -51
  346. package/src/scripts/measure_turn_end_gate.ts +193 -0
  347. package/src/scripts/memory_lookup.ts +1 -1
  348. package/src/scripts/new_roadmap.ts +37 -0
  349. package/src/scripts/orchestration_record.ts +0 -5
  350. package/src/scripts/prepack-check.mjs +53 -0
  351. package/src/scripts/release.ts +14 -98
  352. package/src/scripts/release_drill.ts +267 -1
  353. package/src/scripts/release_publication.ts +64 -1
  354. package/src/scripts/report_enforcement_drift.ts +566 -0
  355. package/src/scripts/report_host_injection_effect.ts +3 -11
  356. package/src/scripts/report_invocation_surface.ts +383 -0
  357. package/src/scripts/report_obligation_carriers.ts +699 -0
  358. package/src/scripts/report_obligation_writer_split.ts +236 -0
  359. package/src/scripts/report_skill_menu_census.ts +208 -0
  360. package/src/scripts/report_standing_payload_by_host.ts +26 -152
  361. package/src/scripts/roadmap_verify_share.ts +213 -0
  362. package/src/scripts/schemas/agent-settings.schema.json +23 -0
  363. package/src/scripts/schemas/command.schema.json +48 -0
  364. package/src/scripts/schemas/review-findings.schema.json +4 -0
  365. package/src/scripts/schemas/skill.schema.json +44 -0
  366. package/src/scripts/scope_growth.ts +219 -0
  367. package/src/scripts/self_review_gate.ts +359 -10
  368. package/src/scripts/semantic_parity_census.ts +314 -0
  369. package/src/scripts/session_eol_report.ts +54 -1
  370. package/src/scripts/sweep_dead_scan_roots.ts +1 -1
  371. package/src/scripts/trigger_eval_grandfather.json +0 -3
  372. package/src/scripts/trigger_eval_rotation.ts +122 -27
  373. package/src/scripts/ui_conformance_probe.ts +774 -0
  374. package/src/scripts/update_prices.ts +85 -3
  375. package/src/scripts/write_bundle_digest.mjs +74 -0
  376. package/src/server/schemas/settings.ts +62 -7
  377. package/src/shared/missionExecution.ts +126 -0
  378. package/src/templates/consumer-settings/ONBOARDING.md +1 -0
  379. package/dist/cli-delegate/chunk-523HCFYO.js +0 -90
  380. package/dist/ui/assets/index-D0jaCRPM.js +0 -29
  381. package/dist/ui/assets/index-jSfMW8_t.css +0 -1
  382. /package/dist/cli-delegate/{chunk-YUM5KURG.js → chunk-7RQP4UDH.js} +0 -0
@@ -28,7 +28,7 @@
28
28
  "refresh_cadence": "quarterly",
29
29
  "upstream": {
30
30
  "repo": "derived: RFC 9110/9457/7396/8288 + httpapi WG drafts",
31
- "sha": "RFC set as of 2026-06",
32
- "last_checked": "2026-06-07"
31
+ "sha": "RFC 9110 (STD 97) / 9457 / 7396 / 8288 \u2014 verified 2026-09-18: 9110 neither obsoleted nor updated; 9457 current and obsoletes 7807",
32
+ "last_checked": "2026-09-18"
33
33
  }
34
- }
34
+ }
@@ -28,8 +28,8 @@
28
28
  "owner": "package-maintainer",
29
29
  "refresh_cadence": "quarterly",
30
30
  "upstream": {
31
- "repo": "derived: PostgreSQL 16 + MySQL 8 reference docs",
32
- "sha": "PostgreSQL 16.x / MySQL 8.4 docs",
33
- "last_checked": "2026-06-07"
31
+ "repo": "derived: PostgreSQL 18 + MySQL 9.7 reference docs (previously PostgreSQL 16 + MySQL 8)",
32
+ "sha": "re-derived 2026-09-27 against PostgreSQL 18.x / MySQL 9.7: all 12 rows of query-tuning.csv still apply as written on both engines. Three rows gained a version-scoped annotation for a genuinely new capability rather than a rewrite \u2014 row 1 (Slow WHERE on large table) notes PG18's B-tree skip scan, which relaxes the equality-first composite-index rule on PG18+ only; row 5 (JOIN explosion) notes MySQL 9.7's Hypergraph Optimizer, now GA in Community Edition, improving join-order choices automatically; row 12 (JSON column filtering) notes that PG18 flips the GENERATED-column default from STORED to VIRTUAL, and VIRTUAL columns are not indexable, so STORED must now be explicit. PostgreSQL 16.x and MySQL 8.4 remain supported and the patterns apply there unchanged",
33
+ "last_checked": "2026-09-18"
34
34
  }
35
- }
35
+ }
@@ -1,13 +1,13 @@
1
1
  Symptom,Keywords,Root Cause,Strategy,Code Good,Anti-Pattern,Verification,Severity
2
- Slow WHERE on large table,slow query where filter full scan seq scan,Sequential scan despite selective predicate,B-tree index on the filtered column(s); composite index ordered by equality-first then range,"CREATE INDEX idx_orders_status_created ON orders (status, created_at)",Indexing low-cardinality boolean alone; composite ordered range-first,EXPLAIN (ANALYZE) shows Index Scan; rows estimate ≈ actual,HIGH
2
+ Slow WHERE on large table,slow query where filter full scan seq scan,Sequential scan despite selective predicate,B-tree index on the filtered column(s); composite index ordered by equality-first then range (PostgreSQL 18+: skip scan lets the planner use later columns without a leading-column equality predicate — MySQL and pre-18 Postgres still need equality-first ordering),"CREATE INDEX idx_orders_status_created ON orders (status, created_at)",Indexing low-cardinality boolean alone; composite ordered range-first,EXPLAIN (ANALYZE) shows Index Scan (PG 18+: or Index Searches for a skip scan); rows estimate ≈ actual,HIGH
3
3
  ORDER BY ... LIMIT slow,order by limit sort top n latest,Sort node over the whole table for a top-N query,Index matching the ORDER BY direction (including DESC/NULLS) so LIMIT walks the index,CREATE INDEX idx_events_created_desc ON events (created_at DESC),OFFSET pagination for infinite feeds (use keyset),Plan shows Index Scan Backward / no Sort node,HIGH
4
4
  N+1 query loop,n+1 loop per row lazy load orm repeated query,Hundreds of identical queries differing only by id,Eager-load relations / batch with IN(...) or JOIN; dataloader pattern at the API layer,SELECT * FROM comments WHERE post_id IN (...),Fixing with a cache instead of the access pattern,Query count per request flat vs item count,HIGH
5
5
  LIKE '%term%' search,like contains search wildcard fulltext,Leading-wildcard LIKE can't use B-tree,Trigram index (pg_trgm GIN) or full-text search (tsvector + GIN); dedicated engine beyond ~10M rows,CREATE INDEX idx_users_name_trgm ON users USING gin (name gin_trgm_ops),Forcing LOWER() without an expression index,Plan shows Bitmap Index Scan on the GIN index,MEDIUM
6
- JOIN explosion,join many tables slow hash join nested loop,Mis-estimated join order / missing join keys index,Index every FK used in joins; verify row estimates; break monster joins into CTE/temp stages when estimates collapse,ANALYZE tables; index fk columns,Disabling nested loops globally; hint-chasing before stats are fresh,Estimates within ~10x of actuals at every join node,HIGH
6
+ JOIN explosion,join many tables slow hash join nested loop,Mis-estimated join order / missing join keys index,Index every FK used in joins; verify row estimates; break monster joins into CTE/temp stages when estimates collapse (MySQL 9.7: the Hypergraph Optimizer is now GA in Community Edition and can materially improve join-order choices on its own — verify estimates before assuming a manual rewrite is still needed),ANALYZE tables; index fk columns,Disabling nested loops globally; hint-chasing before stats are fresh,Estimates within ~10x of actuals at every join node,HIGH
7
7
  Aggregation over millions of rows,group by count sum report aggregate slow,Repeated full-table aggregation for dashboards,Pre-aggregate: materialized view / rollup table refreshed on schedule or trigger; partial indexes for hot subsets,CREATE MATERIALIZED VIEW daily_rev AS ... REFRESH CONCURRENTLY,Caching in app memory only (cold-start storms),"Dashboard reads hit the rollup, not base tables",MEDIUM
8
8
  Pagination deep offset,offset page 10000 slow deep pagination,OFFSET N scans+discards N rows,Keyset/cursor pagination on a unique ordered key,"WHERE (created_at,id) < (:c,:i) ORDER BY created_at DESC,id DESC LIMIT 20",Hiding offset behind a 'page' param and capping at 1000 as a fix,p99 latency flat across page depth,HIGH
9
9
  Write contention / lock waits,deadlock lock wait contention update hot row,"Hot-row updates serialize (counters, balances)",Row-level design: ledger inserts over UPDATE-in-place; batch with SKIP LOCKED queues; keep transactions short,SELECT ... FOR UPDATE SKIP LOCKED for workers,Retrying deadlocks blindly without ordering writes,Lock wait time ~0 under load test; deadlock rate 0,HIGH
10
10
  Missing/stale statistics,wrong plan estimate stale statistics analyze,Optimizer estimates wildly off → bad plans,Auto-analyze tuned for big tables; manual ANALYZE after bulk loads; extended statistics for correlated columns,"CREATE STATISTICS s_dist (dependencies) ON city,country FROM addr",Hinting every query instead of fixing stats,Plan estimates ≈ actuals after ANALYZE,MEDIUM
11
11
  Over-indexing writes,insert slow many indexes write amplification,Each extra index taxes every INSERT/UPDATE,Audit with index-usage stats; drop unused; covering index to replace several near-duplicates,pg_stat_user_indexes idx_scan = 0 candidates,Adding an index per slow query without retiring old ones,Write p95 recovers; no unused-index rows,MEDIUM
12
12
  SELECT * over wide rows,select star wide row toast network payload,Fetching unused columns (TOAST/LOB) dominates IO,Project needed columns; covering index enables index-only scans,"SELECT id,status,total FROM orders ...",Compressing payloads instead of trimming the select list,Plan shows Index Only Scan where applicable,LOW
13
- JSON column filtering,json jsonb attribute filter schemaless,Filtering inside JSON without index = full scan,"GIN index on jsonb path ops, or generated column + B-tree for hot keys",ALTER TABLE t ADD COLUMN status text GENERATED ALWAYS AS (doc->>'status') STORED; CREATE INDEX ...,Stuffing relational data into one JSON blob,Plan uses the GIN/generated-column index,MEDIUM
13
+ JSON column filtering,json jsonb attribute filter schemaless,Filtering inside JSON without index = full scan,"GIN index on jsonb path ops, or generated column + B-tree for hot keys",ALTER TABLE t ADD COLUMN status text GENERATED ALWAYS AS (doc->>'status') STORED; CREATE INDEX ...; -- PG18+: STORED must be explicit (default flipped to VIRTUAL — not indexable),Stuffing relational data into one JSON blob; relying on the pre-PG18 STORED default,Plan uses the GIN/generated-column index,MEDIUM
@@ -44,7 +44,7 @@ A **live preview URL** is required for testing.
44
44
 
45
45
  ## Procedure: Design review
46
46
 
47
- 1. **Inspect the PR and preview** — Read the PR description, diff, and identify changed components/pages; capture a baseline screenshot of the preview URL.
47
+ 1. **Inspect the PR and preview** — Read the PR description, diff, and identify changed components/pages; read the probe artifact and run the appearance floor over the preview URL (Phase 0).
48
48
  2. **Walk the interactions** — Run Phase 1; cover hover/focus/active/disabled, keyboard, loading, and form error states.
49
49
  3. **Cover responsiveness, polish, a11y, robustness** — Run Phases 2–5 in order; record findings per phase.
50
50
  4. **Audit code-health and content** — Run Phases 6–7; check tokens, dead styles, copy, console warnings.
@@ -55,7 +55,11 @@ A **live preview URL** is required for testing.
55
55
  - Read PR description and git diff.
56
56
  - Identify changed components and affected pages.
57
57
  - Navigate to preview URL.
58
- - Take baseline screenshot.
58
+ - **Read the probe artifact** `agents/runtime/state/ui-conformance.json`
59
+ (`ui_conformance_probe --target <file> --reference <file>`) — its per-dimension counters are the
60
+ behavioral evidence Phases 1–2 report against. Absent is absent, never clean; a dimension the host
61
+ could not exercise carries a not-applicable row with its reason rather than a zero.
62
+ - **Run the appearance floor** (§ Appearance verification) — mandatory on every review.
59
63
 
60
64
  ### Phase 1: Interaction
61
65
 
@@ -102,7 +106,9 @@ asserted floor outside the measured set is an assertion nobody checks; 375px
102
106
  passing says nothing about 320px, which is where a two-column grid or a fixed
103
107
  `min-width` actually breaks.
104
108
 
105
- - Take screenshots at each viewport.
109
+ - **Read the probe artifact's `viewport_matrix` rows** — one per declared width, recording whether the
110
+ layout property that should change at that breakpoint did. A not-applicable row is missing evidence, not a pass.
111
+ - **Run the appearance floor** (§ Appearance verification) at every one of the four widths.
106
112
  - **Scroll-driven surface** — read the `scroll_evidence` artefact
107
113
  ([`references/verification-automation.md`](references/verification-automation.md)
108
114
  § Scroll evidence) and report every sample whose asserted `state` and
@@ -156,6 +162,26 @@ passing says nothing about 320px, which is where a two-column grid or a fixed
156
162
  - No placeholder text left in production.
157
163
  - Check browser console for JavaScript errors or warnings.
158
164
 
165
+ ## Appearance verification — mandatory, and explicitly appearance-only
166
+
167
+ ```
168
+ APPEARANCE VERIFICATION IS MANDATORY WHEREVER APPEARANCE CAN BE AFFECTED.
169
+ THE PROBE DEMOTES THE IMAGE FROM PRIMARY EVIDENCE — IT DOES NOT MOVE THE FLOOR.
170
+ AN IMAGE IS NEVER EVIDENCE FOR HOVER, FOCUS, KEYBOARD, BREAKPOINT OR JS BEHAVIOR.
171
+ AN UNRUN APPEARANCE CHECK IS REPORTED AS UNRUN, NEVER AS PASSED.
172
+ ```
173
+
174
+ **Trigger — identical to the two capture steps it replaces**, not merely as broad: Phase 0
175
+ unconditionally, Phase 2 once per width. Only what the image is evidence *for* narrowed.
176
+ **Two jobs, and the older one comes first:** (1) presence and sanity — *"presence + sanity
177
+ check that nothing renders broken. Not pixel-perfect regression"* — no blank frame, no
178
+ collapsed or overlapping layout, no missing region, no unstyled flash; **no probe dimension
179
+ covers it**, because a computed style can be correct on a node nobody can see; (2) pixel
180
+ comparison against a baseline where one exists, element-scoped, dynamic content masked. No
181
+ render capability → scope the verdict and say so per the gate at the top of this skill;
182
+ degrading is reported, never a pass. What a clean render does *not* answer:
183
+ [`references/verification-automation.md`](references/verification-automation.md) § Appearance verification.
184
+
159
185
  ## Reviewer posture
160
186
 
161
187
  **Approval is earned, not assumed. Default to flagging.**
@@ -187,7 +213,7 @@ excessive copy, and redundant UI chrome.
187
213
  Load the reference file whose sections the review needs — never all of them by default:
188
214
 
189
215
  - [`references/review-communication.md`](references/review-communication.md) — Before / After / Why output format · Communication principles · Report structure · Design Review Summary
190
- - [`references/verification-automation.md`](references/verification-automation.md) — Visual QA with browser automation · Async-verifier pattern (keep the main context clean)
216
+ - [`references/verification-automation.md`](references/verification-automation.md) — Visual QA with browser automation · Async-verifier pattern (keep the main context clean) · Appearance verification (what a clean render does not answer)
191
217
 
192
218
  ## Output format
193
219
 
@@ -234,6 +260,56 @@ THE Q1-Q6 FLOOR SET IS IDENTICAL IN ALL FOUR MODES.
234
260
  Do not re-derive any of these fields here. This skill is a declared consumer of
235
261
  that object, and the contract's consumer table names it.
236
262
 
263
+ ## Fidelity proof — the chapter matrix
264
+
265
+ ```
266
+ A 1:1 CLAIM IS PROVEN BY A COMMITTED MATRIX, NEVER BY A GREEN SUITE.
267
+ ONE ROW PER HANDOVER CHAPTER. ONE EVIDENCE KIND PER ROW. NO EMPTY CELL.
268
+ A BEHAVIOR TEST ANSWERS "DOES IT WORK", NOT "DOES IT MATCH".
269
+ ```
270
+
271
+ This discharges [`design-fidelity`](../../rules/design-fidelity.md)'s proof
272
+ clause. It fires when a numbered handover is the spec — chapters like
273
+ `10-datenmodell-api.md` … `46-roadmap-achse-randtage.md`, each an abgegrenzter
274
+ contract. Such a handover is already a checklist; the failure it prevents is
275
+ reading it and never working it as one.
276
+
277
+ **Build the matrix from the handover's own numbering**, one row per chapter:
278
+
279
+ | Chapter | Claim it makes | Evidence | Status |
280
+
281
+ **Evidence is exactly one of four kinds**, and the row names which:
282
+
283
+ 1. **Element-scoped screenshot baseline** — `toHaveScreenshot` on the component,
284
+ not the page. Built into Playwright via pixelmatch, so no new dependency
285
+ ([`playwright-testing`](../playwright-testing/SKILL.md)). Mask dynamic
286
+ content (timestamps, running numbers, ids) or the baseline flakes on data
287
+ rather than on design.
288
+ 2. **`toHaveCSS` assertion on the value the chapter names** — the right kind
289
+ when the chapter states a token, a spacing step or a color rather than a
290
+ shape.
291
+ 3. **Behavior spec with a sensitivity probe** — legitimate where the chapter
292
+ describes an interaction. The probe is not optional: neutralise the
293
+ mechanism, watch the spec go red, restore it. A spec never seen red has
294
+ unknown sensitivity and is not evidence.
295
+ 4. **Explicitly not implemented, with the reason** — a real row, not a gap. An
296
+ honest `not implemented` is what makes the other three trustworthy.
297
+
298
+ **The matrix is committed**, not written into a reply. A matrix that lives in a
299
+ chat message dies with the session, which is the difference between a method and
300
+ an artifact — and the whole reason this section exists rather than a paragraph
301
+ telling a reviewer to be thorough.
302
+
303
+ **The staleness trap.** A new handover version ships and the baselines stay
304
+ pinned to the old one, so every screenshot row passes against a reference nobody
305
+ uses any more. Check the baseline timestamps against the handover's own
306
+ CHANGELOG before reading a green matrix as a pass.
307
+
308
+ **What the matrix does not do.** It records what was compared, never that the
309
+ comparison was honest — nothing in this tree reads a handover, so a row naming
310
+ evidence nobody took looks exactly like one naming evidence that was. The
311
+ control is that a reviewer can open it.
312
+
237
313
  ## Review independence — two passes, isolated, in this order
238
314
 
239
315
  ```
@@ -122,3 +122,35 @@ the async verifier above, which captures the fan-out's main win without spinning
122
122
  up four separate views. Reconsider only when `design-review` runs as a standalone
123
123
  heavy batch over many *independent* surfaces, where per-surface
124
124
  `do-in-parallel` genuinely pays.
125
+
126
+ ## Appearance verification — what a clean render does not answer
127
+
128
+ The skill body carries the floor: appearance verification is mandatory wherever
129
+ appearance can be affected, its trigger is identical to the two capture steps it
130
+ replaces, and presence-and-sanity comes before pixel comparison. This section is
131
+ the part a reviewer looks up rather than obeys — the division of labour between a
132
+ render and the probe's four dimensions.
133
+
134
+ A render is a resting frame. It can only show what the surface looks like with
135
+ nothing driving it, which is why a clean one says nothing about:
136
+
137
+ | The question | Why the render cannot answer it | What does |
138
+ |---|---|---|
139
+ | Does hover / focus / active feedback exist? | the state is never entered | `interaction` |
140
+ | Does the keyboard reach it, and does the handler fire? | no input is delivered | `interaction` |
141
+ | Did the breakpoint change the layout, or did the media query silently not fire? | the same picture comes back either way | `viewport_matrix` |
142
+ | Is the resolved value the token intended, after cascade and fallback? | a wrong value can look plausible | `computed_style` |
143
+ | Is `prefers-reduced-motion` honoured, and with *what* instead? | the preference is never emulated | `media_emulation` |
144
+
145
+ Reading a clean render as though it covered a row of this table is the
146
+ substitution the appearance-only marking exists to prevent, and it is the reason
147
+ the floor lists its two jobs separately rather than as one "visual check": the
148
+ first job is the one no probe dimension replaces, and the second is the one the
149
+ probe supersedes for behavior.
150
+
151
+ **The converse holds and is the less obvious half.** No probe dimension covers
152
+ presence and sanity. A `computed_style` row can be green on a node that is
153
+ off-screen, transparent, zero-height or painted under an overlay — correct
154
+ resolved values on something nobody can see. That asymmetry is why demoting the
155
+ image from *primary evidence* is not the same as removing it, and why an unrun
156
+ appearance check is reported as unrun rather than folded into a probe verdict.
@@ -97,6 +97,14 @@ nobody can test is how the previous mismatch happened.
97
97
  It reads zero in a JavaScript tree by construction, which is not the same as
98
98
  unused.
99
99
 
100
+ ### 1b. Detect the component-granularity taxonomy the project already chose
101
+
102
+ ```bash
103
+ npx tsx scripts/work_engine/taxonomy/detect.ts # or import detect_component_taxonomy(root)
104
+ ```
105
+
106
+ Returns the project's **own** tier names joined with `/` — `atoms/molecules/organisms`, `primitives/patterns/features`, whatever it actually uses — or `none`. Record it as `state.ui_audit.component_taxonomy`, with `state.ui_audit.component_root` for where the components live. `none` is a real answer, and leaves every downstream step behaving exactly as it did before this detection existed. Never write a taxonomy the project does not evidence, and never "tidy" a layout into one — this step *finds* the project's structure, it never supplies one. Detection rules, the declared-beats-inferred precedence and the two collision floors: [`references/component-taxonomy-detection.md`](references/component-taxonomy-detection.md).
107
+
100
108
  ### 2. Identify the design system
101
109
 
102
110
  Detect markers, in order. **Stop at the first match** — projects rarely run more than one design system.
@@ -163,10 +171,20 @@ Read `components.json` for the registered style + base color, then read the `pac
163
171
  ### 4b. Prefer a live Storybook read over the hand-read inventory — when one is running
164
172
 
165
173
  When the project carries `@storybook/addon-mcp` **and** a Storybook is running, query it
166
- instead of reading files: `list-all-documentation` for the inventory, then `get-documentation`
167
- for the components that matter. **The live read wins; the hand-read inventory of step 4 is the
168
- fallback and is never removed** — an agent that cannot reach a running Storybook must still be
169
- able to inventory the library. The channel disappearing is normal, not an error.
174
+ instead of reading files: `docs-list` for the inventory, then `docs-show` for the components
175
+ that matter. **The live read wins; the hand-read inventory of step 4 is the fallback and is
176
+ never removed** — an agent that cannot reach a running Storybook must still be able to
177
+ inventory the library. The channel disappearing is normal, not an error.
178
+
179
+ **The names are version-bound, and these are the current ones.** Own derivation, from a
180
+ throwaway `npm install` on 2026-09-13, not from any document: at `@storybook/addon-mcp@10.6.0`
181
+ the docs tools are registered by `storybook`'s own `createDocsToolset` under the method ids
182
+ `docs.list` / `docs.show` / `docs.showStory`, and `toMcpToolName` renders those as `docs-list`,
183
+ `docs-show` and `docs-show-story`. The older `list-all-documentation` / `get-documentation` were
184
+ the literal names at `@storybook/addon-mcp@0.7.0` (via `@storybook/mcp@0.8.0`); at 10.6.0 they
185
+ survive only as the tools' human-readable **titles**. There is no 10.5.x of the addon — it goes
186
+ 0.7.0 → 10.6.0 — so a project on the current scaffold gets the `docs-*` names. If a live
187
+ `tools/list` disagrees, the live read wins over this paragraph.
170
188
 
171
189
  **React-only while the toolset is in preview.** Storybook's own MCP FAQ (docs **10.5**,
172
190
  `docs/ai/mcp/overview` § FAQ) states the documentation toolset supports React only during
@@ -261,6 +279,9 @@ then set `state.ui_audit.greenfield = true` and emit a halt:
261
279
  > before building (recommended for projects with >1 planned screen)
262
280
  > 2. Proceed bare with Tailwind defaults (recommended for one-off prototypes)
263
281
  > 3. Point me at an external design-system reference (URL or file)
282
+ > 4. Scaffold + a granularity convention — as 1, and new components go into
283
+ > named granularity folders you pick the names for; rename or drop it later
284
+ > and nothing here objects
264
285
 
265
286
  **Recommendation: 1 — Scaffold tokens + primitives** — even one extra screen
266
287
  benefits from a shared base; the scaffold cost is ~10 min and saves
@@ -268,7 +289,9 @@ re-doing every primitive on screen 2. Caveat: flip to 2 if this is a
268
289
  demo or single-page prototype that will not grow.
269
290
  ```
270
291
 
271
- Record the user's pick in `state.ui_audit.greenfield_decision` (`scaffold` | `bare` | `external_reference`). Re-running the skill on the same state-file with `greenfield_decision` set is a no-op for the halt (audit findings stay).
292
+ Option 4 is an **offer**, and the only one made anywhere: a project that already exists is never asked (§ 1b reads what it chose), and a greenfield project picking any other number has declined terminally, because the halt is a no-op once any decision is recorded. It stays one more number in the same block rather than a second question — a single number still answers it, which is what the reply-shape rule requires.
293
+
294
+ Record the user's pick in `state.ui_audit.greenfield_decision` (`scaffold` | `bare` | `external_reference` | `granularity_convention`). Re-running the skill on the same state-file with `greenfield_decision` set is a no-op for the halt (audit findings stay). `granularity_convention` takes the same scaffold path as `scaffold` — it adds the convention, it does not replace the scaffolding.
272
295
 
273
296
  ### 8. (Optional) Capture an a11y baseline
274
297
 
@@ -322,6 +345,7 @@ violations will surface as new findings on every run.
322
345
  Load on demand once the audit needs the pitfall catalog:
323
346
 
324
347
  - [`references/anti-slop-cross-reference.md`](references/anti-slop-cross-reference.md) — Anti-slop cross-reference
348
+ - [`references/component-taxonomy-detection.md`](references/component-taxonomy-detection.md) — Component-taxonomy detection rules
325
349
 
326
350
  - [`references/output-and-pitfalls.md`](references/output-and-pitfalls.md) — Output format · Gotcha · Anti-slop cross-reference
327
351
 
@@ -334,6 +358,7 @@ Load on demand once the audit needs the pitfall catalog:
334
358
  5. **`state.ui_audit.patterns`** — object with forms, tables, modals, empty_states, navigation, data_display arrays
335
359
  6. **`state.ui_audit.candidates`** — top-5 similarity matches for the current input (may be empty)
336
360
  7. **`state.ui_audit.greenfield`** — boolean; when true, `greenfield_decision` MUST also be set before the dispatcher advances
361
+ 7b. **`state.ui_audit.component_taxonomy`** / **`component_root`** — the project's own granularity tiers joined with `/` (or `none`), and where the components live relative to the project root. Never a canonical tier list — a project with three tiers records three; `none` is the value that leaves every downstream step unchanged.
337
362
  8. **`state.ui_audit.a11y_baseline`** *(optional)* — array of `{rule, selector, severity?}` entries documenting pre-existing a11y violations the review gate should treat as informational. Omit the key entirely when no baseline applies; do not write `[]` for "I checked and there are none" — that disables the gate's filter for every future run.
338
363
 
339
364
  **Design-system export (current-repo source):** when the goal is to seed
@@ -0,0 +1,56 @@
1
+ # existing-ui-audit — component-taxonomy detection
2
+
3
+ > Section-level entry point of the `existing-ui-audit` skill (progressive
4
+ > disclosure). Load this file when § 1b of SKILL.md routes here — it carries
5
+ > the detection rules and the boundary the step must not cross.
6
+
7
+ ## What the detector answers
8
+
9
+ The question is *"has this project already chosen a way to organize its
10
+ components by granularity, and if so what does it call the tiers?"* — never
11
+ *"which taxonomy should this project use?"*. The recorded value is the
12
+ project's **own** tier directory names, in the project's own order, joined
13
+ with `/`, or `none`. Nothing canonical is ever written: a project with three
14
+ tiers records three, and a project whose tiers are called
15
+ `primitives / patterns / features` records exactly that.
16
+
17
+ ## Three properties, each pinned by a test
18
+
19
+ - **Declared outranks inferred.** A `## Component taxonomy` section in the
20
+ consumer project's own `DESIGN.md`, at its root or under `docs/`, listing
21
+ backticked directory names as list items wins, provided at least two of
22
+ those directories exist
23
+ under the component root. The name may be bolded — `- **\`atoms\`** — ...`
24
+ is read exactly like `` - `atoms` — ... ``. Grounding the declaration against
25
+ the tree keeps a stale doc from declaring a taxonomy the tree does not have,
26
+ and a backticked name in prose rather than in a list item is a mention, not a
27
+ declaration. This is how a project whose tiers appear in no vocabulary the
28
+ detector knows still gets conformance. The first doc that *qualifies* wins:
29
+ one with no section, or one naming fewer than two tiers that exist on disk,
30
+ falls through to the next.
31
+
32
+ - **A folder that merely sounds like a tier is a collision, not a convention.**
33
+ `components/{checkout,billing,molecules}` records `none`, and so does the
34
+ ordinary kind split `components/{layout,pages,forms}` — `layout`, `page`,
35
+ `block`, `element`, `part` and `cell` are all everyday folder names as well
36
+ as granularity words. Inference needs at least two tier-shaped buckets **and**
37
+ more than two thirds of the weighed ones; support folders (`hooks`, `utils`,
38
+ `types`, `lib`, `styles`, …) are left out of the denominator, so three
39
+ ordinary siblings cannot hide a taxonomy that is really there. Each floor has
40
+ its own fixture, because at one hit in three buckets either floor alone would
41
+ still refuse and neither would be tested.
42
+
43
+ - **`none` is a real answer, not a failure.** A flat tree, an unreadable tree,
44
+ a missing component folder, a permission error: all record `none`, and every
45
+ downstream step then behaves exactly as it did before this detection
46
+ existed. Detection never throws — degrading to `none` is the safe direction,
47
+ because `none` is precisely the value that leaves the project's own
48
+ structures untouched.
49
+
50
+ ## The boundary
51
+
52
+ Never write a taxonomy the project does not evidence, and never "tidy" an
53
+ existing layout into one. Holding to the project's own structures is the
54
+ standing rule; this step exists to *find* that structure, not to supply one.
55
+ The single place a taxonomy is ever *offered* is the greenfield halt in § 7,
56
+ and a decline there is terminal.
@@ -91,7 +91,37 @@ twice, leaving the branch one iteration ahead of its own record.
91
91
  1. **The register path**, and the iteration count actually run against the bound.
92
92
  2. **A metric line**: baseline → final, and the number of keeps versus reverts.
93
93
  3. **The exit condition that fired**, named — bound reached, or exit signal.
94
- 4. **Every reverted iteration listed** with its reason. A revert is a result the
94
+ 4. **A `run_terminal` value** — the exit in the vocabulary every other loop in
95
+ this tree reports in, so a reader can count this run's stop alongside the
96
+ continuation hook's and the self-fix lanes' without a per-surface
97
+ translation table.
98
+
99
+ | exit condition | `run_terminal` |
100
+ |---|---|
101
+ | `score >= target` — the run had a destination and reached it | `success` |
102
+ | `iterations_run >= max_iterations` — the declared bound | `exhausted` |
103
+ | `consecutive_reverts >= N` — the exit signal fired | `stagnated` |
104
+ | the evaluator was red on the unchanged tree, so no iteration ran | `clean-no-op` |
105
+ | the run stopped on a missing precondition (metric unreadable, verifier absent) | `blocked` |
106
+
107
+ The value set is `RunTerminalState` — `success`, `clean-no-op`, `blocked`,
108
+ `approval-required`, `exhausted`, `stagnated`, `premise-invalidated` —
109
+ declared once at `src/scripts/_lib/outcome_vocabularies.ts`
110
+ (`RUN_TERMINAL_STATES`) and described in
111
+ [`terminal-states`](../../agent-src/contexts/execution/terminal-states.md).
112
+ A new exit condition maps onto an existing member or it is not a terminal
113
+ state; never invent a value here.
114
+
115
+ `exhausted` and `stagnated` stay distinct on purpose. This skill's own pivot
116
+ ladder already treats them differently — a spent bound may deserve a larger
117
+ one, while consecutive reverts mean the hypothesis class is done and route to
118
+ the ladder instead. Reporting both as "stopped" throws away the part that
119
+ decides what happens next.
120
+
121
+ Reaching the bound is a normal exit, not a failure, and `exhausted` does not
122
+ say otherwise — it says where the run stopped, never whether it was worth
123
+ running. A published null is still a result.
124
+ 5. **Every reverted iteration listed** with its reason. A revert is a result the
95
125
  next run needs, not noise to summarise away.
96
126
 
97
127
  ## Gotcha
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  model_tier: medium
3
3
  name: markitdown
4
+ inputs:
5
+ - name: source
6
+ type: string
7
+ description: "URI of the document to convert — file:, https: or data: (http: is refused). Absent means the skill is being read for its scheme discipline rather than invoked."
4
8
  description: "Convert PDF, DOCX, XLSX, PPTX, EPUB, images, or audio to Markdown via the markitdown-mcp server — 'extract this PDF', 'OCR this image', 'transcribe this audio'."
5
9
  status: active
6
10
  tier: senior
@@ -144,22 +144,46 @@ test('homepage visual regression', async ({ page }) => {
144
144
 
145
145
  ## Viewport testing
146
146
 
147
+ A viewport loop whose only assertion is an image proves that the page rendered,
148
+ not that the breakpoint did anything: the same picture comes back whether the
149
+ media query fired or silently did not. Assert the layout property the breakpoint
150
+ is supposed to change, then keep the capture and name it for the one thing it
151
+ proves.
152
+
147
153
  ```ts
148
154
  test.describe('Responsive design', () => {
149
155
  for (const viewport of [
150
- { width: 1440, height: 900, name: 'desktop' },
151
- { width: 768, height: 1024, name: 'tablet' },
152
- { width: 375, height: 812, name: 'mobile' },
156
+ { width: 1440, height: 900, name: 'desktop', columns: '1fr 1fr 1fr' },
157
+ { width: 768, height: 1024, name: 'tablet', columns: '1fr 1fr' },
158
+ { width: 375, height: 812, name: 'mobile', columns: '1fr' },
153
159
  ]) {
154
- test(`renders correctly on ${viewport.name}`, async ({ page }) => {
155
- await page.setViewportSize(viewport)
160
+ test(`lays out correctly on ${viewport.name}`, async ({ page }) => {
161
+ await page.setViewportSize({ width: viewport.width, height: viewport.height })
156
162
  await page.goto('/')
157
- await expect(page).toHaveScreenshot(`home-${viewport.name}.png`)
163
+ // Behaviour: the declared breakpoint actually changed the layout.
164
+ await expect(page.locator('#grid')).toHaveCSS('grid-template-columns', viewport.columns)
165
+ // Appearance only: presence + sanity that nothing renders broken.
166
+ await expect(page).toHaveScreenshot(`appearance-${viewport.name}.png`)
158
167
  })
159
168
  }
160
169
  })
161
170
  ```
162
171
 
172
+ **Read the probe artifact rather than re-deriving the matrix by hand.**
173
+ `agents/runtime/state/ui-conformance.json` — produced by
174
+ `ui_conformance_probe --target <file> --reference <file>` — carries a
175
+ `viewport_matrix` row per declared width, plus a not-applicable row with its
176
+ reason wherever the host could not cross the breakpoint. A width with no row is
177
+ missing evidence, not a pass, and no dimension reads zero findings because it did
178
+ not run.
179
+
180
+ **The capture above is appearance-only, and it stays mandatory.** It proves
181
+ presence and sanity — the surface rendered and nothing renders obviously broken —
182
+ and proves nothing about hover, focus, keyboard or a media-preference branch.
183
+ Demoting it from behavioral evidence does not narrow when it runs: it still runs
184
+ at every width in the matrix. Floor and division of labour:
185
+ [`design-review`](../design-review/SKILL.md) § Appearance verification.
186
+
163
187
  ## Debugging
164
188
 
165
189
  ```bash
@@ -191,7 +191,7 @@ the owner can decide in one sitting: one option named and why, what the delay
191
191
  costs, a command or path per option rather than prose, and an offer to walk
192
192
  them through it. Ratcheted by `lint_roadmap_blockers`. Full shape:
193
193
  [`templates/roadmaps.md` rule 20](../../agent-src/templates/roadmaps.md).
194
- Omit it entirely when there is no such gate; run the § 4c gate-test first.
194
+ Omit it entirely when there is no such gate; run the § 4c gate-test first. A **hold** is the publication-side twin — a blocker stops execution, a hold stops publication; ask once whether an intermediate tree state must stay unpublished (default **no**; roadmap incompleteness never is one), walk `re-sequence → guard → hold`, and record the avoided outcome as well as the taken one, per [`templates/roadmaps.md` rule 28](../../agent-src/templates/roadmaps.md) and the § 5c self-check in [`/roadmap:create`](../../domains/product-basic/roadmap/create/command.md).
195
195
 
196
196
  ### 5c. Risk review (Gate R1) — after draft, before save
197
197
 
@@ -52,6 +52,43 @@ single prop's effect because every value is co-present. Split it, one axis per s
52
52
  Stories render under the **same semantic tokens** as the app and the `.dark` class; a
53
53
  hardcoded preview theme makes the workshop lie about what the component looks like in place.
54
54
 
55
+ ### The five behavioral stories — assert a value, never an image
56
+
57
+ `Hover`, `Focus`, `Active`, `Keyboard` and `ReducedMotion` join the set above, and they
58
+ carry one extra rule: **each asserts a resolved computed style or a handler effect, never a
59
+ screenshot.** A component that owes a state checklist and proves it with a pixel diff has
60
+ not proved it — a screenshot is a resting frame, and none of these five is a resting frame.
61
+
62
+ | Story | Drive | Assert |
63
+ |---|---|---|
64
+ | `Hover` | `userEvent.hover(el)` | the resolved property the hover rule is supposed to change actually changed |
65
+ | `Focus` | focus the element | the `:focus` styles resolve as intended |
66
+ | `Keyboard` | `userEvent.tab()` until the element is active | a visible `:focus-visible` indicator resolves — programmatic focus does **not** set it in Chromium, so a `.focus()` call reports a real focus ring as absent |
67
+ | `Active` | press and hold | what pressing adds **on top of hover** — a pointer cannot press without hovering, so asserting against the resting style makes one removed hover rule fail two stories |
68
+ | `ReducedMotion` | emulate `prefers-reduced-motion: reduce` | what the surface presents *instead of* the motion, per [`accessibility-auditor`](../accessibility-auditor/SKILL.md) § 2 — not that the media block exists |
69
+
70
+ The `Active` and `Keyboard` rows are not style advice. Both are measured failure modes from
71
+ building the probe that backs this set, recorded here so the next author does not rediscover
72
+ them: the first produced a duplicate finding for a single defect, the second reports a focus
73
+ ring that is present as missing.
74
+
75
+ ### Responsive rows — one row per declared breakpoint
76
+
77
+ Beside the state stories, each responsive component owes a row per declared breakpoint
78
+ (1440 / 768 / 375 / 320) asserting **the layout property that is supposed to change there** —
79
+ `flex-direction`, `grid-template-columns`, `display`. One row per breakpoint, not one per
80
+ property: a single media rule usually moves several properties at once, and one finding each
81
+ counts one defect several times.
82
+
83
+ **Where a workshop is absent, this set is still assertable.** These stories are a contract
84
+ about what is asserted, not about a particular runner — the `ui_conformance_probe` script
85
+ exercises the same five states and the same breakpoint rows against a file URL. It and its
86
+ sensitivity fixture live in the package repository and are **not** shipped to consumers,
87
+ which is why both are named rather than linked: a path to either resolves nowhere in an
88
+ install. The fixture is the evidence for the two sensitivity claims above — removing one
89
+ hover rule turns exactly the hover assertion red and nothing else, and removing one media
90
+ rule turns exactly the matching breakpoint row red.
91
+
55
92
  ## JSDoc `@summary` is required, and the reason is mechanical
56
93
 
57
94
  The manifest an agent reads **truncates descriptions**. A component whose summary is a
@@ -81,7 +118,7 @@ files otherwise — and only then decide whether anything needs writing.
81
118
  1. **Inspect the existing story set before authoring anything.** Read what the library
82
119
  already has — via the MCP channel below when it is available, otherwise by reading the
83
120
  story files — and check the component against it by name and by shape.
84
- - **Source of truth:** the story files, or `list-all-documentation` over a running Storybook.
121
+ - **Source of truth:** the story files, or `docs-list` over a running Storybook.
85
122
  - **Verify:** the component you are about to write does not already exist under another name.
86
123
  2. **One story per concept**, named from the state set above.
87
124
  - **Verify:** no story name joins two axes with `And`.
@@ -142,10 +179,12 @@ up yet"*, so its presence is not evidence the channel works.
142
179
 
143
180
  When the project has `@storybook/addon-mcp` **and** a running Storybook,
144
181
  [`existing-ui-audit`](../existing-ui-audit/SKILL.md) prefers the live tools —
145
- `list-all-documentation`, then `get-documentation` for the components that matter — over the
182
+ `docs-list`, then `docs-show` for the components that matter — over the
146
183
  hand-read inventory. **The live read wins; the file read is the fallback**, and the fallback
147
184
  is never removed: an agent that cannot reach a running Storybook must still be able to
148
- inventory the library.
185
+ inventory the library. The tool names are version-bound and were re-derived from a throwaway
186
+ installation on 2026-09-13 — [`existing-ui-audit`](../existing-ui-audit/SKILL.md) § 4b carries
187
+ the derivation and the version boundary; do not restate it here.
149
188
 
150
189
  **React-only while in preview.** Storybook's own MCP FAQ (docs 10.5) states the documentation
151
190
  toolset supports React only during preview, so Vue, Angular, and Web Components take the
@@ -25,8 +25,8 @@ triggers:
25
25
  > "<surface description>"` returns the surface class, ATT&CK/CWE-cited
26
26
  > threats, required controls, and negative tests, with confidence +
27
27
  > evidence-gap. Propose grounded findings; the human confirms. Corpus:
28
- > [`data/threats.csv`](data/threats.csv) (MITRE ATT&CK v16 / OWASP
29
- > ASVS-derived, owner + cadence in the manifest).
28
+ > [`data/threats.csv`](data/threats.csv) (MITRE ATT&CK v19.x / OWASP
29
+ > ASVS 5.0.0-derived, owner + cadence in the manifest).
30
30
 
31
31
  > You are a reviewer specialized in **pre-implementation threat analysis**.
32
32
  > Your only job is to produce a compact threat model for a planned change —
@@ -215,8 +215,13 @@ run tests**.
215
215
  *Threat Modeling: Designing for Security* (2014). Framing basis for the
216
216
  Actors / Assets / Entry Points / Trust Boundaries / Abuse Cases rubric.
217
217
  [learn.microsoft.com/en-us/security/engineering/threat-modeling-tool-threats](https://learn.microsoft.com/en-us/security/engineering/threat-modeling-tool-threats)
218
- - **OWASP ASVS v4.0.3** — Authorization (V4), Validation & Encoding (V5),
219
- Session Management (V3) — default baseline for "Missing control" entries.
218
+ - **OWASP ASVS v5.0.0** — Authorization (V8), Encoding and Sanitization (V1)
219
+ + Validation and Business Logic (V2), Session Management (V7) — default
220
+ baseline for "Missing control" entries. Renumbered from 4.0.3's V4/V5/V3
221
+ per the standard's own 4.0→5.0 migration guide (`5.0/en/0x05-For-Users-Of-4.0.md`
222
+ in the ASVS repo) — 5.0.0 splits the old V5 Validation/Sanitization/Encoding
223
+ chapter into separate Encoding-and-Sanitization and Validation-and-Business-Logic
224
+ chapters, and drops direct CWE/NIST cross-mappings from the requirements.
220
225
  [owasp.org/www-project-application-security-verification-standard/](https://owasp.org/www-project-application-security-verification-standard/)
221
226
  - **OWASP Top 10 2021** — A01 Broken Access Control, A04 Insecure Design,
222
227
  A05 Security Misconfiguration — cross-reference when naming abuse cases.
@@ -76,8 +76,8 @@
76
76
  "owner": "package-maintainer",
77
77
  "refresh_cadence": "quarterly",
78
78
  "upstream": {
79
- "repo": "derived: MITRE ATT&CK + CWE + OWASP API Top 10 / ASVS 4.0",
80
- "sha": "ATT&CK v16 / ASVS 4.0.3",
81
- "last_checked": "2026-06-07"
79
+ "repo": "derived: MITRE ATT&CK + CWE + OWASP API Top 10 / ASVS 5.0",
80
+ "sha": "re-derived 2026-09-27 against ATT&CK v19.x and ASVS 5.0.0: every ATT&CK id cited in threats.csv's Source Refs column (T1110, T1563, T1105, T1090, T1499, T1552, T1552.001, T1190, T1078.004) resolves in the current Enterprise matrix and none is deprecated or revoked \u2014 threats.csv itself carries no ASVS identifiers, so there is nothing to remap there. SKILL.md's References section cited ASVS 4.0.3's V3/V4/V5 by the old numbering; updated to 5.0.0's V7 Session Management, V8 Authorization, and V1 Encoding and Sanitization + V2 Validation and Business Logic, per the standard's own 4.0\u21925.0 migration guide",
81
+ "last_checked": "2026-09-18"
82
82
  }
83
- }
83
+ }
@@ -69,6 +69,29 @@ still exists in the tree. Absent or empty → fall through to
69
69
  Then review existing components in the codebase for the same
70
70
  responsibility — extend rather than rebuild when a match is found.
71
71
 
72
+ **Read `state.ui_audit.component_taxonomy` before you decide where the
73
+ component goes.** The audit (§ 1b of
74
+ [`existing-ui-audit`](../existing-ui-audit/SKILL.md)) records the project's
75
+ **own** granularity tiers, joined with `/`, or `none`:
76
+
77
+ - **It names tiers** → record the chosen tier on the component's
78
+ `state.ui_design.components[]` entry as `tier` (the apply step reads that
79
+ field and nothing else writes it), then place the component inside it and say
80
+ which:
81
+ *"conforming to the project's `primitives/patterns/features` taxonomy —
82
+ `Checkout` goes under `src/components/features/`"*. Match the tier by name;
83
+ there is no rule here that computes a tier, and there must not be one.
84
+ - **A component fits no tier** → report it as a named conformance gap with the
85
+ reason, and leave it unplaced. Do not put it somewhere else quietly, and do
86
+ not invent a tier for it — picking one would need exactly the per-tier rule
87
+ the measurement below shows is not derivable.
88
+ - **`none`** → behave exactly as you would without this paragraph. A project
89
+ that organizes its components some other way must not be able to tell that
90
+ this step exists. Never propose a taxonomy to a project that has one you did
91
+ not recognise, and never propose one mid-task to a project that has none —
92
+ the single offer is made once, at the greenfield halt, and a decline there is
93
+ terminal.
94
+
72
95
  **A new component's workshop is part of its design where the project has one —
73
96
  size-conditional, never a generic mandate.** The boundary is
74
97
  [`component-oriented-and-oop-development`](../../guidelines/component-oriented-and-oop-development.md)