@event4u/agent-config 14.9.0 → 14.11.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 (426) 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 +384 -0
  5. package/README.md +1 -1
  6. package/dist/agent-src/commands/design.md +88 -0
  7. package/dist/agent-src/commands/project/analyze.md +47 -0
  8. package/dist/agent-src/commands/review/changes.md +67 -6
  9. package/dist/agent-src/commands/roadmap/create.md +49 -0
  10. package/dist/agent-src/commands/roadmap/next.md +27 -11
  11. package/dist/agent-src/commands/roadmap/process-full.md +14 -0
  12. package/dist/agent-src/commands/video/from-script.md +60 -3
  13. package/dist/agent-src/commands/video/stitch.md +14 -0
  14. package/dist/agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -0
  15. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +154 -2
  16. package/dist/agent-src/rules/active-remediation.md +3 -3
  17. package/dist/agent-src/rules/code-provenance.md +2 -2
  18. package/dist/agent-src/rules/context-hygiene.md +13 -33
  19. package/dist/agent-src/rules/council-availability.md +2 -2
  20. package/dist/agent-src/rules/decision-revisit-gate.md +3 -1
  21. package/dist/agent-src/rules/design-fidelity.md +18 -0
  22. package/dist/agent-src/rules/design-review-after-ui-write.md +2 -2
  23. package/dist/agent-src/rules/evaluator-independence.md +56 -44
  24. package/dist/agent-src/rules/fix-what-you-see.md +9 -1
  25. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +1 -1
  26. package/dist/agent-src/rules/minimal-safe-diff.md +14 -20
  27. package/dist/agent-src/rules/missing-skill-recovery.md +13 -1
  28. package/dist/agent-src/rules/playbook-precedence.md +105 -0
  29. package/dist/agent-src/rules/recurring-criticism.md +3 -1
  30. package/dist/agent-src/rules/roadmap-progress-sync.md +14 -13
  31. package/dist/agent-src/rules/scale-discipline.md +24 -0
  32. package/dist/agent-src/rules/security-sensitive-stop.md +2 -2
  33. package/dist/agent-src/rules/settings-ask-protocol.md +2 -2
  34. package/dist/agent-src/rules/ui-audit-gate.md +27 -15
  35. package/dist/agent-src/rules/untrusted-input-defense.md +2 -2
  36. package/dist/agent-src/skills/accessibility-auditor/SKILL.md +19 -0
  37. package/dist/agent-src/skills/adr-create/SKILL.md +7 -0
  38. package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +33 -0
  39. package/dist/agent-src/skills/ai-council/references/advanced-modes.md +17 -3
  40. package/dist/agent-src/skills/ai-council/references/output-and-synthesis.md +31 -0
  41. package/dist/agent-src/skills/ai-council/references/procedure.md +19 -0
  42. package/dist/agent-src/skills/alerting-doctrine/SKILL.md +225 -0
  43. package/dist/agent-src/skills/alerting-doctrine/evals/triggers.json +17 -0
  44. package/dist/agent-src/skills/async-python-patterns/SKILL.md +1 -1
  45. package/dist/agent-src/skills/authz-review/SKILL.md +0 -1
  46. package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +32 -0
  47. package/dist/agent-src/skills/brand/SKILL.md +3 -0
  48. package/dist/agent-src/skills/brand-asset-generation/SKILL.md +3 -0
  49. package/dist/agent-src/skills/brand-audit/SKILL.md +3 -0
  50. package/dist/agent-src/skills/brand-identity/SKILL.md +3 -0
  51. package/dist/agent-src/skills/brand-strategy/SKILL.md +3 -0
  52. package/dist/agent-src/skills/brand-to-tokens/SKILL.md +3 -0
  53. package/dist/agent-src/skills/check-refs/SKILL.md +3 -0
  54. package/dist/agent-src/skills/code-refactoring/SKILL.md +1 -1
  55. package/dist/agent-src/skills/code-review/SKILL.md +11 -0
  56. package/dist/agent-src/skills/command-routing/SKILL.md +6 -0
  57. package/dist/agent-src/skills/condense-memory/SKILL.md +4 -1
  58. package/dist/agent-src/skills/context-authoring/SKILL.md +1 -1
  59. package/dist/agent-src/skills/conventional-commits-writing/SKILL.md +4 -1
  60. package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +10 -0
  61. package/dist/agent-src/skills/corpus-grounding/SKILL.md +3 -0
  62. package/dist/agent-src/skills/design-intelligence/SKILL.md +3 -0
  63. package/dist/agent-src/skills/design-intelligence/data/landing.csv +36 -35
  64. package/dist/agent-src/skills/design-intelligence/data/stacks/threejs.csv +1 -0
  65. package/dist/agent-src/skills/design-review/SKILL.md +80 -2
  66. package/dist/agent-src/skills/design-review/references/verification-automation.md +41 -0
  67. package/dist/agent-src/skills/design-system-capture/SKILL.md +35 -40
  68. package/dist/agent-src/skills/design-system-capture/references/import-procedure.md +50 -0
  69. package/dist/agent-src/skills/design-tokens/SKILL.md +3 -0
  70. package/dist/agent-src/skills/design-variations/SKILL.md +3 -0
  71. package/dist/agent-src/skills/developer-like-execution/SKILL.md +3 -0
  72. package/dist/agent-src/skills/discovery-interview/SKILL.md +1 -1
  73. package/dist/agent-src/skills/doc-coauthoring/SKILL.md +1 -1
  74. package/dist/agent-src/skills/docx-authoring/SKILL.md +1 -1
  75. package/dist/agent-src/skills/editorial-calendar/SKILL.md +1 -1
  76. package/dist/agent-src/skills/estimate-ticket/SKILL.md +3 -0
  77. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +20 -3
  78. package/dist/agent-src/skills/fe-design/SKILL.md +74 -41
  79. package/dist/agent-src/skills/fe-design/evals/triggers.json +65 -53
  80. package/dist/agent-src/skills/fe-design/references/craft-floor.md +52 -0
  81. package/dist/agent-src/skills/fe-design/references/source-led-port.md +36 -0
  82. package/dist/agent-src/skills/file-editor/SKILL.md +5 -0
  83. package/dist/agent-src/skills/finishing-a-development-branch/SKILL.md +2 -2
  84. package/dist/agent-src/skills/git-workflow/SKILL.md +3 -0
  85. package/dist/agent-src/skills/github-ci/SKILL.md +1 -1
  86. package/dist/agent-src/skills/html-deck/SKILL.md +3 -0
  87. package/dist/agent-src/skills/iconography/SKILL.md +3 -0
  88. package/dist/agent-src/skills/image-editing/SKILL.md +3 -0
  89. package/dist/agent-src/skills/image-generation/SKILL.md +3 -0
  90. package/dist/agent-src/skills/image-provider-routing/SKILL.md +3 -0
  91. package/dist/agent-src/skills/incident-commander/SKILL.md +10 -0
  92. package/dist/agent-src/skills/js-library-packaging/SKILL.md +173 -0
  93. package/dist/agent-src/skills/js-library-packaging/evals/triggers.json +17 -0
  94. package/dist/agent-src/skills/js-library-packaging/scripts/check_package_surface.ts +270 -0
  95. package/dist/agent-src/skills/judge-artifact-completeness/SKILL.md +1 -1
  96. package/dist/agent-src/skills/judge-injection-defense/SKILL.md +1 -1
  97. package/dist/agent-src/skills/laravel-migration/SKILL.md +3 -0
  98. package/dist/agent-src/skills/laravel-validation/SKILL.md +1 -1
  99. package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +3 -0
  100. package/dist/agent-src/skills/legal-intake-triage/SKILL.md +1 -1
  101. package/dist/agent-src/skills/legal-practice-profile/SKILL.md +1 -1
  102. package/dist/agent-src/skills/lint-skills/SKILL.md +3 -0
  103. package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +3 -0
  104. package/dist/agent-src/skills/logging-monitoring/SKILL.md +234 -51
  105. package/dist/agent-src/skills/logo-generation/SKILL.md +3 -0
  106. package/dist/agent-src/skills/md-language-check/SKILL.md +3 -0
  107. package/dist/agent-src/skills/messaging-architecture/SKILL.md +1 -1
  108. package/dist/agent-src/skills/migration-architect/SKILL.md +1 -1
  109. package/dist/agent-src/skills/module-detect-on-the-fly/SKILL.md +1 -1
  110. package/dist/agent-src/skills/module-management/SKILL.md +1 -1
  111. package/dist/agent-src/skills/monorepo-workspace/SKILL.md +149 -0
  112. package/dist/agent-src/skills/monorepo-workspace/evals/triggers.json +17 -0
  113. package/dist/agent-src/skills/motion-choreographer/SKILL.md +7 -1
  114. package/dist/agent-src/skills/multi-tenancy/SKILL.md +4 -0
  115. package/dist/agent-src/skills/onboarding-program/SKILL.md +1 -1
  116. package/dist/agent-src/skills/operational-readiness/SKILL.md +184 -0
  117. package/dist/agent-src/skills/operational-readiness/evals/triggers.json +17 -0
  118. package/dist/agent-src/skills/override-management/SKILL.md +3 -0
  119. package/dist/agent-src/skills/perf-feedback-craft/SKILL.md +1 -1
  120. package/dist/agent-src/skills/persona-improvement/SKILL.md +3 -0
  121. package/dist/agent-src/skills/pest-testing/SKILL.md +3 -0
  122. package/dist/agent-src/skills/playbook-authoring/SKILL.md +162 -0
  123. package/dist/agent-src/skills/playwright-testing/SKILL.md +3 -0
  124. package/dist/agent-src/skills/privacy-review/SKILL.md +3 -0
  125. package/dist/agent-src/skills/prompt-engineering-image/SKILL.md +3 -0
  126. package/dist/agent-src/skills/prompt-optimizer/SKILL.md +1 -1
  127. package/dist/agent-src/skills/quality-tools/SKILL.md +5 -0
  128. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +52 -21
  129. package/dist/agent-src/skills/readme-reviewer/SKILL.md +3 -0
  130. package/dist/agent-src/skills/readme-writing/SKILL.md +3 -0
  131. package/dist/agent-src/skills/readme-writing-package/SKILL.md +3 -0
  132. package/dist/agent-src/skills/receiving-code-review/SKILL.md +3 -3
  133. package/dist/agent-src/skills/refine-prompt/SKILL.md +3 -0
  134. package/dist/agent-src/skills/refine-ticket/SKILL.md +3 -0
  135. package/dist/agent-src/skills/requesting-code-review/SKILL.md +2 -2
  136. package/dist/agent-src/skills/review-routing/SKILL.md +2 -2
  137. package/dist/agent-src/skills/roadmap-writing/SKILL.md +23 -41
  138. package/dist/agent-src/skills/roadmap-writing/references/follow-up-roadmap-shape.md +47 -0
  139. package/dist/agent-src/skills/rtk-output-filtering/SKILL.md +22 -6
  140. package/dist/agent-src/skills/runway-cognition/SKILL.md +3 -0
  141. package/dist/agent-src/skills/scene-expander/SKILL.md +1 -1
  142. package/dist/agent-src/skills/scene-expander/scene-blueprint.schema.yaml +26 -0
  143. package/dist/agent-src/skills/secrets-management/SKILL.md +5 -1
  144. package/dist/agent-src/skills/server-hardening/SKILL.md +159 -0
  145. package/dist/agent-src/skills/server-hardening/evals/triggers.json +17 -0
  146. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +3 -0
  147. package/dist/agent-src/skills/skill-management/SKILL.md +3 -0
  148. package/dist/agent-src/skills/skill-reviewer/SKILL.md +3 -0
  149. package/dist/agent-src/skills/skill-writing/SKILL.md +6 -0
  150. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +3 -0
  151. package/dist/agent-src/skills/storybook-workshop/SKILL.md +194 -0
  152. package/dist/agent-src/skills/storybook-workshop/evals/triggers.json +17 -0
  153. package/dist/agent-src/skills/storybook-workshop/scripts/story_contrast_floor.ts +134 -0
  154. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +1 -1
  155. package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +25 -0
  156. package/dist/agent-src/skills/supply-chain-intake/SKILL.md +12 -0
  157. package/dist/agent-src/skills/systematic-debugging/SKILL.md +1 -1
  158. package/dist/agent-src/skills/terraform/SKILL.md +3 -0
  159. package/dist/agent-src/skills/test-driven-development/SKILL.md +1 -1
  160. package/dist/agent-src/skills/threat-modeling/SKILL.md +0 -3
  161. package/dist/agent-src/skills/token-optimizer/SKILL.md +3 -0
  162. package/dist/agent-src/skills/typography-system/SKILL.md +3 -0
  163. package/dist/agent-src/skills/ui-component-architect/SKILL.md +9 -1
  164. package/dist/agent-src/skills/upstream-contribute/SKILL.md +3 -0
  165. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +1 -1
  166. package/dist/agent-src/skills/validate-feature-fit/SKILL.md +3 -0
  167. package/dist/agent-src/skills/verify-completion-evidence/SKILL.md +2 -2
  168. package/dist/agent-src/skills/wireframe/SKILL.md +3 -0
  169. package/dist/agent-src/skills/wireframe/references/story-beat-ledger.schema.json +115 -0
  170. package/dist/agent-src/skills/workspace-link/SKILL.md +131 -0
  171. package/dist/agent-src/skills/workspace-link/evals/triggers.json +17 -0
  172. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  173. package/dist/agent-src/templates/playbook.md +75 -0
  174. package/dist/agent-src/templates/roadmaps.md +37 -0
  175. package/dist/agent-src/templates/scripts/check_playbook_invokes.ts +231 -0
  176. package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +24 -0
  177. package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -0
  178. package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +216 -0
  179. package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +159 -0
  180. package/dist/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +73 -4
  181. package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +325 -40
  182. package/dist/cli/commands/uiAudit.js +221 -0
  183. package/dist/cli/commands/uiAudit.js.map +1 -0
  184. package/dist/cli/commands/uiRender.js +206 -0
  185. package/dist/cli/commands/uiRender.js.map +1 -0
  186. package/dist/cli/main.js +22 -1
  187. package/dist/cli/main.js.map +1 -1
  188. package/dist/cli/mcp/content.js +64 -1
  189. package/dist/cli/mcp/content.js.map +1 -1
  190. package/dist/cli/mcp/dispatch.js +175 -10
  191. package/dist/cli/mcp/dispatch.js.map +1 -1
  192. package/dist/cli/registry.js +3 -0
  193. package/dist/cli/registry.js.map +1 -1
  194. package/dist/cli-delegate/{chunk-H4VIVD4C.js → chunk-236PNQZK.js} +413 -391
  195. package/dist/cli-delegate/{chunk-G23AT6GD.js → chunk-DMSZHXZS.js} +57 -1
  196. package/dist/cli-delegate/{chunk-77GR3VD4.js → chunk-FF7WAFMR.js} +58 -3
  197. package/dist/cli-delegate/{chunk-PLSG6UL5.js → chunk-K4FFODTS.js} +341 -204
  198. package/dist/cli-delegate/{chunk-YM4GZDJG.js → chunk-L43NCYPB.js} +5 -0
  199. package/dist/cli-delegate/{chunk-B2ERU2VA.js → chunk-WOKWX5PL.js} +1 -1
  200. package/dist/cli-delegate/cmd_brand_status.js +8 -6
  201. package/dist/cli-delegate/cmd_conformance.js +3 -3
  202. package/dist/cli-delegate/cmd_doctor.js +3 -3
  203. package/dist/cli-delegate/cmd_export.js +4 -4
  204. package/dist/cli-delegate/cmd_handoff.js +1 -1
  205. package/dist/cli-delegate/cmd_preflight.js +2 -2
  206. package/dist/cli-delegate/cmd_prune.js +4 -4
  207. package/dist/cli-delegate/cmd_session_recycle.js +70 -9
  208. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  209. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  210. package/dist/cli-delegate/cmd_sync.js +4 -4
  211. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  212. package/dist/cli-delegate/cmd_validate.js +4 -4
  213. package/dist/discovery/deprecation-report.md +1 -1
  214. package/dist/discovery/discovery-manifest.json +380 -145
  215. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  216. package/dist/discovery/discovery-manifest.summary.md +4 -4
  217. package/dist/discovery/dormancy-report.md +1 -1
  218. package/dist/discovery/orphan-report.md +1 -1
  219. package/dist/discovery/packs.json +18 -8
  220. package/dist/discovery/trust-report.md +3 -3
  221. package/dist/discovery/workspaces.json +16 -6
  222. package/dist/hooks/dispatch.js +2337 -1436
  223. package/dist/install/install.mjs +795 -708
  224. package/dist/mcp/registry-manifest.json +3 -3
  225. package/dist/mcp/server.json +2 -2
  226. package/dist/mcp/server.mjs +1685 -1250
  227. package/dist/router.json +1 -1
  228. package/dist/scripts/_lib/lean_projection_mode.js +40 -0
  229. package/dist/scripts/_lib/lean_projection_mode.js.map +1 -0
  230. package/dist/scripts/_lib/scoped_projection.js +84 -0
  231. package/dist/scripts/_lib/scoped_projection.js.map +1 -1
  232. package/dist/scripts/_lib/ui_surface.js +89 -0
  233. package/dist/scripts/_lib/ui_surface.js.map +1 -0
  234. package/dist/scripts/condense.js +6 -10
  235. package/dist/scripts/condense.js.map +1 -1
  236. package/dist/scripts/project_thin_rules.js +40 -2
  237. package/dist/scripts/project_thin_rules.js.map +1 -1
  238. package/dist/server/schemas/settings.js +3 -0
  239. package/dist/server/schemas/settings.js.map +1 -1
  240. package/dist/shared/skillRanking.js +159 -0
  241. package/dist/shared/skillRanking.js.map +1 -0
  242. package/docs/contracts/provider-lifecycle.md +47 -18
  243. package/docs/contracts/settings-classes.md +14 -4
  244. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +49 -0
  245. package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +92 -0
  246. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +45 -1
  247. package/docs/guidelines/agent-infra/roadmap-deferred-resolution-provenance.md +54 -0
  248. package/docs/guidelines/design-antipatterns.md +4 -2
  249. package/docs/guidelines/design-asset-discipline.md +38 -0
  250. package/docs/guidelines/design-fidelity-mechanics.md +45 -29
  251. package/docs/guidelines/design-handover-extraction.md +35 -5
  252. package/docs/guidelines/design-modes.md +41 -1
  253. package/docs/guidelines/monorepo-antipatterns.md +141 -0
  254. package/llms.txt +50 -39
  255. package/package.json +1 -1
  256. package/src/agent-src/templates/scripts/check_playbook_invokes.ts +231 -0
  257. package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +24 -0
  258. package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -0
  259. package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +216 -0
  260. package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +159 -0
  261. package/src/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +73 -4
  262. package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +325 -40
  263. package/src/config/agent-settings.template.yml +28 -0
  264. package/src/config/assurance-capability-registry.json +223 -0
  265. package/src/config/assurance-threshold-budget.json +65 -0
  266. package/src/config/ci-local-parity.yml +14 -0
  267. package/src/config/discovery/unassigned-artefacts.yml +2 -0
  268. package/src/config/dispatch-economy-metrics.json +4 -2
  269. package/src/config/evaluator-budgets.json +14 -14
  270. package/src/config/gate-coverage.yml +227 -8
  271. package/src/config/gate-violation-baselines.json +76 -72
  272. package/src/config/hook-latency-budget.json +1 -0
  273. package/src/config/hook-token-budget.json +137 -125
  274. package/src/config/pack-size-budget.json +4 -2
  275. package/src/config/preamble-payload-budget.json +71 -67
  276. package/src/config/quorum-attendance-budget.json +12 -4
  277. package/src/config/rule-activation-census.json +7 -3
  278. package/src/config/rule-enforcement-baseline.json +0 -1
  279. package/src/config/rule-stub-ceilings.json +112 -91
  280. package/src/scripts/_cli/cmd_doctor.ts +15 -16
  281. package/src/scripts/_cli/doctor_install_mode.ts +49 -0
  282. package/src/scripts/_cli/doctor_overrides.ts +154 -0
  283. package/src/scripts/_dispatch.bash +17 -0
  284. package/src/scripts/_lib/as_of.ts +412 -0
  285. package/src/scripts/_lib/exec_evidence.ts +7 -0
  286. package/src/scripts/_lib/hook_settings.ts +33 -0
  287. package/src/scripts/_lib/host_listing_model.ts +192 -0
  288. package/src/scripts/_lib/lean_projection_mode.ts +44 -0
  289. package/src/scripts/_lib/mcp_bridge.ts +199 -0
  290. package/src/scripts/_lib/review_independence.ts +62 -10
  291. package/src/scripts/_lib/rule_injection.ts +239 -0
  292. package/src/scripts/_lib/run_checkpoint.ts +54 -1
  293. package/src/scripts/_lib/scoped_projection.ts +96 -0
  294. package/src/scripts/_lib/session_register.ts +44 -2
  295. package/src/scripts/_lib/skill_catalogue.ts +38 -2
  296. package/src/scripts/_lib/transcript_reads.ts +207 -0
  297. package/src/scripts/_lib/ui_authority.test.ts +251 -0
  298. package/src/scripts/_lib/ui_authority.ts +343 -0
  299. package/src/scripts/ai-video/adapters/fal.sh +8 -3
  300. package/src/scripts/ai-video/adapters/gemini-veo.sh +10 -0
  301. package/src/scripts/ai-video/adapters/higgsfield.sh +10 -2
  302. package/src/scripts/ai-video/adapters/kling.sh +10 -0
  303. package/src/scripts/ai-video/adapters/sora.sh +10 -0
  304. package/src/scripts/ai-video/lib/calibrate-cost.sh +145 -0
  305. package/src/scripts/ai-video/lib/model-capabilities/README.md +53 -7
  306. package/src/scripts/ai-video/lib/model-capabilities/comfyui.json +15 -3
  307. package/src/scripts/ai-video/lib/model-capabilities/fal.json +36 -6
  308. package/src/scripts/ai-video/lib/model-capabilities/gemini-veo.json +23 -0
  309. package/src/scripts/ai-video/lib/model-capabilities/higgsfield.json +23 -0
  310. package/src/scripts/ai-video/lib/model-capabilities/kling.json +23 -0
  311. package/src/scripts/ai-video/lib/model-capabilities/musetalk.json +8 -2
  312. package/src/scripts/ai-video/lib/model-capabilities/replicate.json +36 -6
  313. package/src/scripts/ai-video/lib/model-capabilities/sora.json +45 -0
  314. package/src/scripts/ai-video/lib/model-capabilities/syncso.json +8 -2
  315. package/src/scripts/ai-video/lib/parse-blueprint.sh +52 -5
  316. package/src/scripts/ai-video/lib/resume-scan.sh +92 -3
  317. package/src/scripts/ai-video/lib/seam-plan.sh +212 -0
  318. package/src/scripts/ai-video/smoke-trace.sh +450 -2
  319. package/src/scripts/ai-video/stitch.sh +191 -10
  320. package/src/scripts/ai-video/test-pipeline.sh +84 -6
  321. package/src/scripts/ai_council/cli_agency_bounds.ts +139 -0
  322. package/src/scripts/ai_council/cli_least_agency_canary.ts +347 -0
  323. package/src/scripts/ai_council/clients.ts +3 -2
  324. package/src/scripts/ai_council/consensus.ts +63 -6
  325. package/src/scripts/ai_council/events_log.ts +46 -1
  326. package/src/scripts/ai_council/orchestrator.ts +103 -108
  327. package/src/scripts/ai_council/orchestrator_results.ts +166 -0
  328. package/src/scripts/ai_council/prompts.ts +12 -5
  329. package/src/scripts/ai_council/quorum.ts +82 -1
  330. package/src/scripts/ai_council/quorum_wiring.ts +82 -5
  331. package/src/scripts/ai_council/seating.ts +211 -0
  332. package/src/scripts/ai_council/stance_tally.ts +22 -0
  333. package/src/scripts/bench_hook_latency.ts +62 -0
  334. package/src/scripts/build_proof.ts +12 -1
  335. package/src/scripts/capture_skill_catalogue.ts +21 -0
  336. package/src/scripts/check_always_budget.ts +2 -1
  337. package/src/scripts/check_augmentignore.ts +2 -1
  338. package/src/scripts/check_beta_review_markers.ts +2 -1
  339. package/src/scripts/check_composite_arming.ts +364 -0
  340. package/src/scripts/check_corpus_staleness.ts +2 -1
  341. package/src/scripts/check_council_pin_staleness.ts +3 -1
  342. package/src/scripts/check_enforcement_coverage.ts +116 -3
  343. package/src/scripts/check_enforcement_denominator.ts +365 -0
  344. package/src/scripts/check_gate_coverage.ts +2 -1
  345. package/src/scripts/check_hook_bundle_freshness.ts +13 -1
  346. package/src/scripts/check_knowledge_cards.ts +2 -1
  347. package/src/scripts/check_knowledge_pages.ts +3 -2
  348. package/src/scripts/check_memory.ts +2 -1
  349. package/src/scripts/check_no_automerge_key.ts +287 -0
  350. package/src/scripts/check_pack_conformance_fixture.ts +565 -0
  351. package/src/scripts/check_pack_passport_reconciliation.ts +274 -0
  352. package/src/scripts/check_proposal.ts +2 -1
  353. package/src/scripts/check_reach_staleness.ts +2 -1
  354. package/src/scripts/check_release_adjacent_health.ts +2 -1
  355. package/src/scripts/check_release_pr_shape.ts +5 -0
  356. package/src/scripts/check_review_schema.ts +34 -1
  357. package/src/scripts/check_roadmap_trackable.ts +48 -3
  358. package/src/scripts/check_source_size_budget.ts +2 -1
  359. package/src/scripts/check_standing_payload_delta.ts +505 -0
  360. package/src/scripts/check_trigger_evals.ts +2 -1
  361. package/src/scripts/classify_change_risk.ts +281 -0
  362. package/src/scripts/compute_skill_tiers.ts +186 -0
  363. package/src/scripts/condense.ts +8 -13
  364. package/src/scripts/council_attendance_metrics.ts +183 -0
  365. package/src/scripts/council_cli.ts +10 -8
  366. package/src/scripts/council_parse_rate.ts +116 -0
  367. package/src/scripts/derive_playbooks.ts +406 -0
  368. package/src/scripts/design_slop_rules.test.ts +7 -0
  369. package/src/scripts/design_slop_rules.ts +56 -2
  370. package/src/scripts/dispatch_r2_reviewer.ts +16 -0
  371. package/src/scripts/frontend_corpus_hash.ts +116 -0
  372. package/src/scripts/generate_pack_manifests.ts +78 -0
  373. package/src/scripts/grade_target_readiness.ts +478 -0
  374. package/src/scripts/hook_manifest.json +1 -1
  375. package/src/scripts/hook_manifest.yaml +97 -16
  376. package/src/scripts/hooks/concern_registry.ts +4 -0
  377. package/src/scripts/hooks/design_pass_hook.ts +356 -0
  378. package/src/scripts/hooks/rtk_wrap_hook.ts +30 -7
  379. package/src/scripts/hooks/rule_inject_hook.ts +318 -0
  380. package/src/scripts/hot_context_hook.ts +74 -7
  381. package/src/scripts/install.ts +40 -89
  382. package/src/scripts/lint_adapter_tier.ts +663 -0
  383. package/src/scripts/lint_archived_skills.ts +93 -0
  384. package/src/scripts/lint_budget_ownership.ts +2 -1
  385. package/src/scripts/lint_deterministic_time.ts +470 -0
  386. package/src/scripts/lint_framework_leakage.ts +5 -0
  387. package/src/scripts/lint_handoffs.ts +525 -1
  388. package/src/scripts/lint_judge_prompt_expectation.ts +155 -0
  389. package/src/scripts/lint_marketplace.ts +88 -0
  390. package/src/scripts/lint_media_policy_linkage.ts +140 -1
  391. package/src/scripts/lint_one_off_age.ts +6 -1
  392. package/src/scripts/lint_override_kernel_guard.ts +87 -5
  393. package/src/scripts/lint_roadmap_complexity.ts +56 -0
  394. package/src/scripts/lint_rule_enforcement_declaration.ts +24 -7
  395. package/src/scripts/lint_rule_norm_pin.ts +321 -0
  396. package/src/scripts/lint_spawn_payload.ts +42 -5
  397. package/src/scripts/lint_symptom_intake.ts +2 -1
  398. package/src/scripts/mcp_parity_smoke.ts +30 -4
  399. package/src/scripts/mcp_render.ts +66 -1
  400. package/src/scripts/mcp_tool_fingerprint.ts +241 -0
  401. package/src/scripts/measure_risk_class_drift.ts +140 -0
  402. package/src/scripts/measure_skill_ranker_baseline.ts +212 -0
  403. package/src/scripts/media/lib/adapter-common.sh +211 -1
  404. package/src/scripts/media/lib/adapter-contract.md +74 -6
  405. package/src/scripts/model_rule_injection.ts +907 -0
  406. package/src/scripts/project_thin_rules.ts +45 -2
  407. package/src/scripts/release.ts +66 -860
  408. package/src/scripts/release_drill.ts +59 -3
  409. package/src/scripts/release_env.ts +298 -0
  410. package/src/scripts/release_publication.ts +720 -0
  411. package/src/scripts/roadmap_context.ts +778 -0
  412. package/src/scripts/schemas/fidelity-measurement-sheet.schema.json +169 -0
  413. package/src/scripts/schemas/pack.schema.json +62 -4
  414. package/src/scripts/schemas/rule.schema.json +24 -2
  415. package/src/scripts/schemas/skill.schema.json +41 -2
  416. package/src/scripts/schemas/ui-authority.schema.json +114 -0
  417. package/src/scripts/session_register_hook.ts +29 -3
  418. package/src/scripts/sessions_cli.ts +67 -3
  419. package/src/scripts/skill_tools/score_skill_relevance.ts +36 -53
  420. package/src/scripts/tighten_skill_descriptions.ts +264 -0
  421. package/src/scripts/token_sink_report.ts +239 -0
  422. package/src/scripts/trigger_coverage.ts +122 -3
  423. package/src/scripts/update_counts.ts +7 -3
  424. package/src/scripts/validate_frontmatter.ts +66 -0
  425. package/src/server/schemas/settings.ts +5 -0
  426. package/src/shared/skillRanking.ts +183 -0
@@ -0,0 +1,194 @@
1
+ ---
2
+ model_tier: medium
3
+ name: storybook-workshop
4
+ description: "Use when a component library needs a workshop — one story per concept, JSDoc summaries the manifest can carry, stories run as tests, and an opt-in MCP channel that replaces guessing with querying."
5
+ domain: engineering
6
+ workspaces:
7
+ - engineering
8
+ packs:
9
+ - engineering-base
10
+ ---
11
+
12
+ # storybook-workshop
13
+
14
+ A story is not a demo. It is the component's **executable documentation**: the artefact an
15
+ agent reads to learn what the component accepts, and the harness that catches a contrast or
16
+ focus defect while the component is still in isolation. Stack-agnostic — the tool is
17
+ Storybook, the discipline is not.
18
+
19
+ Lifted out of [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) § Component workshop, which
20
+ keeps a pointer here rather than a copy.
21
+
22
+ ## The Iron Law
23
+
24
+ ```
25
+ ONE CONCEPT PER STORY. NEVER A "SizesAndVariants" STORY.
26
+ EVERY COMPONENT EXPORT AND EVERY STORY CARRIES A JSDoc @summary.
27
+ A STORY THAT SHOWS AN ANTI-PATTERN IS TAGGED `!manifest` OR THE AGENT LEARNS FROM IT.
28
+ STORIES RUN. A STORY NOBODY RUNS IS A SCREENSHOT WITH EXTRA STEPS.
29
+ ```
30
+
31
+ ## When to use
32
+
33
+ A shared component library exists or is being started, and one of: stories are being added,
34
+ an agent needs an inventory of what the library already offers, an a11y regression should be
35
+ caught in isolation rather than on a screen, or a Storybook MCP channel is available and
36
+ nobody has decided whether to use it.
37
+
38
+ **Skip it** for a handful of one-off components with a single consumer — the setup and
39
+ upkeep outweigh the return, and that judgement belongs to the reader rather than to this
40
+ skill.
41
+
42
+ ## The story set — one concept per story
43
+
44
+ The state-coverage rows every reusable component owes become **story names**:
45
+ `Default`, `Loading`, `Empty`, `Error`, `Disabled`, `Dark`. One concept each.
46
+
47
+ A combined story — the canonical anti-pattern is `SizesAndVariants` — fails at both jobs it
48
+ has: a human cannot tell which knob caused what, and an agent reading it cannot learn a
49
+ single prop's effect because every value is co-present. Split it, one axis per story
50
+ (Storybook's own guidance on writing effective stories).
51
+
52
+ Stories render under the **same semantic tokens** as the app and the `.dark` class; a
53
+ hardcoded preview theme makes the workshop lie about what the component looks like in place.
54
+
55
+ ## JSDoc `@summary` is required, and the reason is mechanical
56
+
57
+ The manifest an agent reads **truncates descriptions**. A component whose summary is a
58
+ paragraph arrives as a fragment, and the agent then infers the rest. So:
59
+
60
+ ```ts
61
+ /** @summary A single-action button. Owns its own focus ring; never wrap in an anchor. */
62
+ export const Button = …
63
+
64
+ /** @summary Disabled — the click handler is not attached, not merely ignored. */
65
+ export const Disabled: StoryObj<typeof Button> = …
66
+ ```
67
+
68
+ One sentence, front-loaded with the fact that changes a caller's decision.
69
+
70
+ ## Before authoring — review what the library already has
71
+
72
+ The first step is not a story, it is an inventory. A library large enough to want a workshop
73
+ is large enough that the component being asked for already exists under another name, and a
74
+ second `Badge` is the failure this skill's own § Do NOT is trying to prevent elsewhere.
75
+
76
+ Read the existing stories — via the MCP channel below when it is available, by reading the
77
+ files otherwise — and only then decide whether anything needs writing.
78
+
79
+ ## Procedure
80
+
81
+ 1. **Inspect the existing story set before authoring anything.** Read what the library
82
+ already has — via the MCP channel below when it is available, otherwise by reading the
83
+ 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.
85
+ - **Verify:** the component you are about to write does not already exist under another name.
86
+ 2. **One story per concept**, named from the state set above.
87
+ - **Verify:** no story name joins two axes with `And`.
88
+ 3. **Write the `@summary` on the export and on each story.**
89
+ - **Verify:** every export in the file has one, and each is a single sentence.
90
+ 4. **Tag what must not be learned from** — see § Do NOT.
91
+ - **Verify:** every anti-pattern or deprecated story carries `tags: ['!manifest']`.
92
+ 5. **Run them** — § Validate.
93
+ - **Verify:** the run reports pass/fail per story, and a11y findings land in the shape below.
94
+
95
+ ## Validate — stories are tests
96
+
97
+ Run the project's story test command (the Vitest addon's `storybook test`, or whatever
98
+ `package.json` declares — read it, do not assume a name), then read the a11y result.
99
+
100
+ Write findings into `state.ui_review.a11y` in the shape
101
+ [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) § Review pass already defines:
102
+
103
+ ```
104
+ {violations: [{rule, selector, severity}, …], severity_floor?, accepted_violations?}
105
+ ```
106
+
107
+ **Use that shape exactly.** The engine de-duplicates on it, so a finding written in a
108
+ different shape is not a differently-formatted finding — it is a finding the engine counts
109
+ twice.
110
+
111
+ Browser tooling stays a **consumer dependency**, the same posture as `react-shadcn-ui`: this
112
+ package installs no browser and runs none. Absent the tooling, say the a11y half did not run
113
+ rather than reporting zero violations — an unrun check and a clean check produce the same
114
+ number and mean opposite things.
115
+
116
+ **One finding is decidable without a browser**, and it ships beside this skill:
117
+ `scripts/story_contrast_floor.ts` computes the WCAG 2.1 contrast ratio between two colours a
118
+ story *declares in its own args* and emits the same `(rule, selector, severity)` shape. It is
119
+ **not axe** and not a substitute for § Validate — it sees no rendered page, so role, focus,
120
+ and computed-style defects are all outside it, and a colour arriving through a token
121
+ indirection is invisible to it. It exists because "we cannot run axe here" is not a reason to
122
+ check nothing, and a declared colour pair is decidable from the file.
123
+
124
+ ## Security constraints
125
+
126
+ `scripts/story_contrast_floor.ts` reads story files and computes arithmetic. No network, no
127
+ subprocess, no writes, and it never evaluates the story it reads — it matches declared literals
128
+ with a regex rather than importing the module, so running it over an untrusted repository
129
+ executes none of that repository's code. Importing a story to inspect its args would run
130
+ that file, which is the one thing a static checker must not start doing.
131
+
132
+ ## MCP path — opt-in channel, never a dependency
133
+
134
+ When the project has `@storybook/addon-mcp` **and** a running Storybook,
135
+ [`existing-ui-audit`](../existing-ui-audit/SKILL.md) prefers the live tools —
136
+ `list-all-documentation`, then `get-documentation` for the components that matter — over the
137
+ hand-read inventory. **The live read wins; the file read is the fallback**, and the fallback
138
+ is never removed: an agent that cannot reach a running Storybook must still be able to
139
+ inventory the library.
140
+
141
+ **React-only while in preview.** Storybook's own MCP FAQ (docs 10.5) states the documentation
142
+ toolset supports React only during preview, so Vue, Angular, and Web Components take the
143
+ file-read path. Stated here rather than discovered at runtime.
144
+
145
+ Two operative rules, restated from Storybook's suggested agent instructions rather than
146
+ copied verbatim:
147
+
148
+ - **Never use an undocumented prop.** If the manifest does not carry it, it is not part of
149
+ the component's surface — reading it out of the implementation is how a private prop
150
+ becomes a de-facto API.
151
+ - **Fetch the story instructions before writing a story.** The project's own conventions
152
+ live there; writing first and reconciling later produces a story that matches nothing.
153
+
154
+ ## Output format
155
+
156
+ 1. Name the inventory source used — MCP or file read — and why.
157
+ 2. List the stories authored or changed, one line each, with their concept.
158
+ 3. Report the story-test result, and the a11y findings in the `(rule, selector, severity)`
159
+ shape.
160
+ 4. State explicitly what did not run (no browser tooling, no running Storybook, non-React
161
+ renderer).
162
+
163
+ ## Gotchas
164
+
165
+ - **`SizesAndVariants` looks efficient and destroys both jobs** — a human cannot attribute
166
+ the effect, and an agent cannot learn a single prop from it.
167
+ - **A truncated description reads as a complete one.** The manifest cuts the tail without
168
+ marking it, so a paragraph-long summary arrives as a confident fragment.
169
+ - **A stale story is worse than no story.** It props-drills values the component no longer
170
+ accepts and documents an API that does not exist; keep stories beside the component and
171
+ change them in the same commit.
172
+ - **An unrun a11y check reports zero violations** — the same number a clean run reports.
173
+ Say which one happened.
174
+ - **The MCP channel disappearing is normal**, not an error: no running Storybook is the
175
+ fallback's whole purpose.
176
+
177
+ ## Do NOT
178
+
179
+ - Do NOT combine two axes in one story.
180
+ - Do NOT ship a component export or a story without a `@summary`.
181
+ - Do NOT leave an anti-pattern or deprecated story untagged: it carries
182
+ `tags: ['!manifest']` so it is excluded from the manifest and the agent never learns from
183
+ it (Storybook's own tag mechanism for curating what the manifest exposes).
184
+ - Do NOT hardcode a preview theme in a story.
185
+ - Do NOT make the MCP channel required, and do NOT remove the file-read fallback.
186
+ - Do NOT report zero a11y violations when the a11y tooling did not run.
187
+
188
+ ## See also
189
+
190
+ - [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) — the React stack lane, and the `(rule, selector, severity)` shape § Validate writes into.
191
+ - [`existing-ui-audit`](../existing-ui-audit/SKILL.md) — the inventory the MCP path accelerates.
192
+ - [`js-library-packaging`](../js-library-packaging/SKILL.md) — the package around the workshop.
193
+ - [`accessibility-auditor`](../accessibility-auditor/SKILL.md) — the WCAG depth behind the a11y half.
194
+ - [`fe-design`](../fe-design/SKILL.md) § Component Architecture — the stack-agnostic isolate-and-document principle.
@@ -0,0 +1,17 @@
1
+ {
2
+ "skill": "storybook-workshop",
3
+ "last_eval": "2026-08-23",
4
+ "description": "5 should-trigger + 5 should-not-trigger. Should-trigger covers the named authoring ask, the inventory ask, the story-as-test ask, the MCP-channel question, and a DE phrasing. Should-not-trigger covers the near-misses this skill sits between: authoring the component itself (ui-component-architect), a full WCAG audit of a shipped page (accessibility-auditor), an E2E flow test, the package surface (js-library-packaging), and a visual-design question.",
5
+ "queries": [
6
+ { "q": "add stories for the card", "trigger": true },
7
+ { "q": "what components does our library already have?", "trigger": true },
8
+ { "q": "can the stories run as tests in CI?", "trigger": true },
9
+ { "q": "should we wire up the storybook mcp addon?", "trigger": true },
10
+ { "q": "schreib Stories für die neuen Primitives", "trigger": true },
11
+ { "q": "build me a Card component with a footer slot", "trigger": false },
12
+ { "q": "run a full WCAG audit on the checkout page", "trigger": false },
13
+ { "q": "write a playwright test for the signup flow", "trigger": false },
14
+ { "q": "why does my hook say invalid hook call", "trigger": false },
15
+ { "q": "pick a colour palette for the dashboard", "trigger": false }
16
+ ]
17
+ }
@@ -0,0 +1,134 @@
1
+ /**
2
+ * story_contrast_floor — the one a11y finding a story can yield WITHOUT a browser.
3
+ *
4
+ * Scope, stated first because overclaiming here would be the whole defect: this is **not**
5
+ * axe and it is not the § Validate path. It computes the WCAG 2.1 contrast ratio between two
6
+ * colours a story DECLARES in its own args, and emits a finding in the
7
+ * `(rule, selector, severity)` shape the engine de-duplicates on. It sees no rendered page,
8
+ * so it cannot find a role, focus, or computed-style defect — which is most of what axe finds.
9
+ *
10
+ * It exists because the browser tooling is a consumer dependency this package does not
11
+ * install, and "we cannot run axe" is not a reason to check nothing. A declared colour pair
12
+ * is decidable from the file.
13
+ *
14
+ * Usage:
15
+ * story_contrast_floor <story-file> [<story-file> …]
16
+ * story_contrast_floor --self-test
17
+ */
18
+
19
+ import * as fs from 'node:fs';
20
+
21
+ /** WCAG AA floor for normal-size body text. */
22
+ export const AA_NORMAL = 4.5;
23
+ /** WCAG AA floor for large text (>= 18.66px bold, or >= 24px). */
24
+ export const AA_LARGE = 3;
25
+
26
+ export interface Violation {
27
+ readonly rule: string;
28
+ readonly selector: string;
29
+ readonly severity: 'error' | 'warning';
30
+ /** The measured ratio, so a reader can see how far off it is rather than only that it failed. */
31
+ readonly ratio: number;
32
+ }
33
+
34
+ const clamp01 = (n: number): number => (n < 0 ? 0 : n > 1 ? 1 : n);
35
+
36
+ /** sRGB → relative luminance, per WCAG 2.1 § relative luminance. */
37
+ export const luminance = (hex: string): number | null => {
38
+ const m = /^#?([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(hex.trim());
39
+ if (m === null) return null;
40
+ let h = m[1] as string;
41
+ if (h.length === 3) h = h.split('').map((c) => `${c}${c}`).join('');
42
+ const channel = (pair: string): number => {
43
+ const v = clamp01(parseInt(pair, 16) / 255);
44
+ return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
45
+ };
46
+ const r = channel(h.slice(0, 2));
47
+ const g = channel(h.slice(2, 4));
48
+ const b = channel(h.slice(4, 6));
49
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
50
+ };
51
+
52
+ /** WCAG contrast ratio. Returns null when either colour is unreadable. */
53
+ export const contrastRatio = (fg: string, bg: string): number | null => {
54
+ const a = luminance(fg);
55
+ const b = luminance(bg);
56
+ if (a === null || b === null) return null;
57
+ const [hi, lo] = a >= b ? [a, b] : [b, a];
58
+ return (hi + 0.05) / (lo + 0.05);
59
+ };
60
+
61
+ /**
62
+ * Colour pairs a story declares in its args, as `(storyName, fg, bg)`.
63
+ *
64
+ * Reads only DECLARED literals. A colour arriving through a token indirection is invisible
65
+ * here, and pretending otherwise would be worse than the gap: the caller would believe the
66
+ * story was checked.
67
+ */
68
+ export const declaredPairs = (source: string): Array<{ story: string; fg: string; bg: string }> => {
69
+ const out: Array<{ story: string; fg: string; bg: string }> = [];
70
+ // `export const Name: StoryObj<…> = { args: { … } }` — one story per export.
71
+ const exportRe = /export\s+const\s+([A-Za-z0-9_]+)\s*:[^=]*=\s*\{([\s\S]*?)\n\};/g;
72
+ for (const m of source.matchAll(exportRe)) {
73
+ const story = m[1] as string;
74
+ const body = m[2] as string;
75
+ const fg = /(?:color|fg|foreground)\s*:\s*['"](#[0-9a-fA-F]{3,6})['"]/.exec(body);
76
+ const bg = /(?:background|bg|backgroundColor)\s*:\s*['"](#[0-9a-fA-F]{3,6})['"]/.exec(body);
77
+ if (fg?.[1] !== undefined && bg?.[1] !== undefined) {
78
+ out.push({ story, fg: fg[1], bg: bg[1] });
79
+ }
80
+ }
81
+ return out;
82
+ };
83
+
84
+ export const checkStoryFile = (file: string, floor: number = AA_NORMAL): Violation[] => {
85
+ let source = '';
86
+ try {
87
+ source = fs.readFileSync(file, 'utf8');
88
+ } catch {
89
+ return [];
90
+ }
91
+ const out: Violation[] = [];
92
+ for (const { story, fg, bg } of declaredPairs(source)) {
93
+ const ratio = contrastRatio(fg, bg);
94
+ if (ratio === null || ratio >= floor) continue;
95
+ out.push({
96
+ rule: 'color-contrast',
97
+ // The story is the addressable unit here — there is no DOM to select into.
98
+ selector: `story:${story}`,
99
+ severity: 'error',
100
+ ratio: Math.round(ratio * 100) / 100,
101
+ });
102
+ }
103
+ return out;
104
+ };
105
+
106
+ const selfTest = (): number => {
107
+ let failed = 0;
108
+ const check = (label: string, cond: boolean): void => {
109
+ if (!cond) {
110
+ process.stderr.write(`❌ ${label}\n`);
111
+ failed += 1;
112
+ }
113
+ };
114
+ const r = contrastRatio('#000000', '#ffffff');
115
+ check('black on white is the maximum 21:1', r !== null && Math.abs(r - 21) < 0.01);
116
+ check('a colour on itself is 1:1', Math.abs((contrastRatio('#777777', '#777777') ?? 0) - 1) < 0.01);
117
+ check('an unreadable colour is null, not 0', contrastRatio('nope', '#fff') === null);
118
+ check('shorthand hex is expanded', contrastRatio('#000', '#fff') !== null);
119
+ process.stdout.write(failed === 0 ? '✅ story_contrast_floor: self-test passed\n' : `❌ ${String(failed)} failure(s)\n`);
120
+ return failed === 0 ? 0 : 1;
121
+ };
122
+
123
+ const main = (): number => {
124
+ const argv = process.argv.slice(2);
125
+ if (argv.includes('--self-test')) return selfTest();
126
+ const files = argv.filter((a) => !a.startsWith('--'));
127
+ const violations = files.flatMap((f) => checkStoryFile(f));
128
+ process.stdout.write(`${JSON.stringify({ violations }, null, 2)}\n`);
129
+ return violations.length > 0 ? 1 : 0;
130
+ };
131
+
132
+ if (process.argv[1] !== undefined && process.argv[1].includes('story_contrast_floor')) {
133
+ process.exit(main());
134
+ }
@@ -385,5 +385,5 @@ Skip emit when `emergency.orchestration_halt` is set or `spawn_count == 0`
385
385
  | Standalone judge on an existing diff | Inline — see judge prompt in [`prompts/do-and-judge.md`](prompts/do-and-judge.md) |
386
386
  | External / networked second opinion | [`ai-council`](../ai-council/SKILL.md) |
387
387
  | Cross-model review WITH repo access | [`/team`](../../domains/meta/team/command.md) (collaborative; subagents are in-session same-weights) |
388
- | Verifying completeness | [`verify-before-complete`](../verify-before-complete/SKILL.md) |
388
+ | Verifying completeness | [`verify-completion-evidence`](../verify-completion-evidence/SKILL.md) |
389
389
  | What a subagent owns vs never owns | [`subagent-boundary`](../../../docs/contracts/subagent-boundary.md) |
@@ -106,3 +106,28 @@ Every dispatchable mode named in `SKILL.md` § *The nine modes* maps to a
106
106
  prompt file in the table above (mode 8 is gated/experimental — its
107
107
  live-app rubric lives in the `subagent-modes-detail` context, not here);
108
108
  each prompt mentions all four status enum values.
109
+
110
+ ## The implementer envelope: hand it to a judge, never to a fresh reviewer
111
+
112
+ Several templates here carry an `IMPLEMENTER ENVELOPE:` line — `do-and-judge.md:70` and
113
+ `do-and-judge-two-stage.md:72` among them. **That is correct, and it is correct for a
114
+ specific reason:** a judge is validating a *claim*. It needs to know what the implementer
115
+ said it did, because the question is whether the diff supports the claim. Withholding the
116
+ envelope from a judge makes it guess at the claim it is meant to test.
117
+
118
+ **It is wrong for a fresh reviewer**, and the asymmetry is the whole point of that role. A
119
+ fresh reviewer's value is a negative property: it has **no implementation context**, so it
120
+ cannot inherit the author's framing of what the change is for or what counts as done.
121
+ Handing it the envelope destroys exactly the property it was dispatched for — and it does
122
+ so invisibly, because the output still looks like a review.
123
+
124
+ So, for the next author of a template in this directory:
125
+
126
+ ```
127
+ COPYING THE ENVELOPE LINE INTO A FRESH-REVIEWER TEMPLATE SILENTLY REMOVES
128
+ THE ONE PROPERTY THAT MADE IT WORTH A SEPARATE DISPATCH.
129
+ JUDGE -> ENVELOPE. FRESH REVIEWER -> DIFF AND SCOPE ONLY.
130
+ ```
131
+
132
+ Recorded here rather than only in the route that consumes it (`/review:changes` § 4b-fresh)
133
+ because the line is copied from *these* files, so this is where a reader meets it.
@@ -97,6 +97,18 @@ rg -n 'curl[^|]*\|\s*(bash|sh)|wget[^|]*\|\s*(bash|sh)' .
97
97
  - A package that exists but was published this week with 12 downloads is a slopsquat candidate, not a safe dep — weigh age + usage, not just existence.
98
98
  - Lockfile integrity is part of the threat model: an unhashed or floating entry can pull a freshly-poisoned release even when a lockfile is "present".
99
99
 
100
+ ## Known pitfalls
101
+
102
+ - **Name-similarity is not provenance.** An organisation whose name is
103
+ near-identical to a widely used tool's, whose site ranks for that tool's
104
+ queries, and whose "download" button points at a third-party page is not that
105
+ tool — and may ship no code at all. Observed while harvesting an external
106
+ reference on 2026-08-22: the lookalike existed only as an SEO surface. The
107
+ registry entry, the repository URL and the publisher are the provenance; the
108
+ name, the ranking and the visual resemblance are not. Resolve the package
109
+ through the registry and follow the declared repository, never through a search
110
+ result that merely looks right.
111
+
100
112
  ## Do NOT
101
113
 
102
114
  - Do NOT run an install command for a package you have not existence-checked this session.
@@ -352,7 +352,7 @@ emit the `context_stale` event above it for the consolidation pass.
352
352
  * Playwright / E2E test failures → [`playwright-testing`](../playwright-testing/SKILL.md)
353
353
  * PHPStan / Rector / ECS output → [`quality-tools`](../quality-tools/SKILL.md)
354
354
  * Verifying the fix is complete before claiming done →
355
- [`verify-before-complete`](../verify-before-complete/SKILL.md)
355
+ [`verify-completion-evidence`](../verify-completion-evidence/SKILL.md)
356
356
 
357
357
  ## Validation checklist
358
358
 
@@ -7,6 +7,9 @@ workspaces:
7
7
  - engineering
8
8
  packs:
9
9
  - engineering-base
10
+ triggers:
11
+ - phrase: "terraform module"
12
+ - phrase: "terraform state"
10
13
  ---
11
14
 
12
15
  # terraform
@@ -329,7 +329,7 @@ wait for their own failing tests.
329
329
  subagent cross-check) → [`test-case-discovery`](../test-case-discovery/SKILL.md)
330
330
  * Project type-checker / linter / formatter (PHPStan, ECS, Rector for PHP — tsc / eslint / prettier for TS — ruff / mypy for Python) → [`quality-tools`](../quality-tools/SKILL.md)
331
331
  * Full Pest conventions and Laravel test helpers → [`pest-testing`](../pest-testing/SKILL.md)
332
- * Running tests inside Docker → [`tests-execute`](../tests-execute/SKILL.md)
332
+ * Running tests inside Docker → [`/tests:execute`](../../domains/engineering-base/tests/execute/command.md)
333
333
  * Investigating why a test is failing for non-obvious reasons →
334
334
  [`systematic-debugging`](../systematic-debugging/SKILL.md)
335
335
 
@@ -54,8 +54,6 @@ Do NOT use when:
54
54
  [`security-audit`](../security-audit/SKILL.md)
55
55
  * The concern is end-to-end authorization enforcement — route to
56
56
  [`authz-review`](../authz-review/SKILL.md)
57
- * The concern is output/log leakage on an existing API — route to
58
- [`data-exposure-review`](../data-exposure-review/SKILL.md)
59
57
  * The concern is implementing the controls once identified — route to
60
58
  [`security`](../security/SKILL.md)
61
59
 
@@ -224,7 +222,6 @@ run tests**.
224
222
  A05 Security Misconfiguration — cross-reference when naming abuse cases.
225
223
  [owasp.org/Top10/](https://owasp.org/Top10/)
226
224
  - [`authz-review`](../authz-review/SKILL.md),
227
- [`data-exposure-review`](../data-exposure-review/SKILL.md),
228
225
  [`security`](../security/SKILL.md),
229
226
  [`security-audit`](../security-audit/SKILL.md) — sibling review / implementation skills.
230
227
  - Prompt-injection / agent-config defense: [`untrusted-input-defense`](../../rules/untrusted-input-defense.md),
@@ -3,6 +3,9 @@ model_tier: medium
3
3
  name: token-optimizer
4
4
  description: "Use BEFORE any verbose CLI run, large file read, doc conversion, or near-context handoff — decision tree keyed by intent citing the canonical token-saving asset."
5
5
  domain: process
6
+ scope:
7
+ write: []
8
+ verification_reason: "an index-and-routing skill — it names other artefacts to load and writes nothing. Absence of a write is not something a command can prove."
6
9
  execution:
7
10
  type: assisted
8
11
  handler: shell
@@ -13,6 +13,9 @@ trust:
13
13
  level: professional
14
14
  install:
15
15
  removable: true
16
+ scope:
17
+ write: []
18
+ verification_reason: "execution declares no handler, so this skill runs nothing of its own — every write is the calling agent's, under the rules that govern it. No command can prove a scope the skill never executes."
16
19
  execution:
17
20
  type: manual
18
21
  ---
@@ -58,7 +58,15 @@ than under-splitting. Meet BOTH conditions before you extract.
58
58
 
59
59
  ### 1. Inspect prior art, state the responsibility in one sentence
60
60
 
61
- Review existing components in the codebase for the same
61
+ **Read `DESIGN.md` § Owned components first** — it is the project's own inventory of what
62
+ it already owns (component, status, story file, registry item), filled from the story files
63
+ rather than from memory by
64
+ [`design-system-capture`](../design-system-capture/SKILL.md). It is the cheapest possible
65
+ prior-art check: one table, and a `deprecated` row tells you not to reach for something that
66
+ still exists in the tree. Absent or empty → fall through to
67
+ [`existing-ui-audit`](../existing-ui-audit/SKILL.md), which reads the codebase itself.
68
+
69
+ Then review existing components in the codebase for the same
62
70
  responsibility — extend rather than rebuild when a match is found.
63
71
  If none exists, write the new component's purpose: *"Renders a
64
72
  labelled input with inline error and hint."* If the sentence has an
@@ -3,6 +3,9 @@ model_tier: inherit
3
3
  name: upstream-contribute
4
4
  description: "Use when a learning, new skill, rule improvement, or bug fix from a consumer project should be contributed back to the shared agent-config package."
5
5
  domain: process
6
+ scope:
7
+ write: []
8
+ verification_reason: "execution.handler is internal, so this skill spawns no subprocess — writes happen through the agent's declared allowed_tools. No command can prove a scope the skill never executes."
6
9
  execution:
7
10
  type: assisted
8
11
  handler: internal
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: medium
3
3
  name: using-git-worktrees
4
- description: "Use when starting parallel work in isolation from the current branch — spawn a git worktree with ignore-safety checks and a clean test baseline — even when the user says 'try this on the side'."
4
+ description: "When starting parallel work in isolation from the current branch — spawn a git worktree with ignore-safety checks and a clean test baseline — even when the user says 'try this on the side'."
5
5
  domain: process
6
6
  workspaces:
7
7
  - engineering
@@ -3,6 +3,9 @@ model_tier: medium
3
3
  name: "validate-feature-fit"
4
4
  description: "Validate whether a feature request fits the existing codebase — check for duplicates, contradictions, scope creep, and architectural misfit"
5
5
  domain: quality
6
+ scope:
7
+ write: []
8
+ verification_reason: "execution.handler is internal, so this skill spawns no subprocess — writes happen through the agent's declared allowed_tools. No command can prove a scope the skill never executes."
6
9
  execution:
7
10
  type: assisted
8
11
  handler: internal
@@ -66,7 +66,7 @@ mapping before running anything:
66
66
  ### 2. Run the command fresh
67
67
 
68
68
  * Run against the current working tree, not a cached summary.
69
- * If the project runs commands inside a container or VM (Docker, Devcontainer, Vagrant), run them there — not on the host. See [`docker`](../docker/SKILL.md) and [`tests-execute`](../tests-execute/SKILL.md).
69
+ * If the project runs commands inside a container or VM (Docker, Devcontainer, Vagrant), run them there — not on the host. See [`docker`](../docker/SKILL.md) and [`/tests:execute`](../../domains/engineering-base/tests/execute/command.md).
70
70
  * Use targeted runs during iteration (`--filter=`, `--testNamePattern`).
71
71
  Run the full suite only in the final verification pass.
72
72
 
@@ -189,7 +189,7 @@ When reporting completion to the user:
189
189
  ## When to hand over to another skill
190
190
 
191
191
  * Exact PHP quality commands (PHPStan / Rector / ECS) → [`quality-tools`](../quality-tools/SKILL.md)
192
- * Running tests inside a container / VM → [`tests-execute`](../tests-execute/SKILL.md)
192
+ * Running tests inside a container / VM → [`/tests:execute`](../../domains/engineering-base/tests/execute/command.md)
193
193
  * Writing the regression test that the gate requires →
194
194
  [`test-driven-development`](../test-driven-development/SKILL.md)
195
195
  * Diagnosing why the gate failed → [`systematic-debugging`](../systematic-debugging/SKILL.md)
@@ -12,6 +12,9 @@ trust:
12
12
  level: professional
13
13
  install:
14
14
  removable: true
15
+ scope:
16
+ write: []
17
+ verification_reason: "execution declares no handler, so this skill runs nothing of its own — every write is the calling agent's, under the rules that govern it. No command can prove a scope the skill never executes."
15
18
  execution:
16
19
  type: manual
17
20
  ---