@event4u/agent-config 14.10.0 → 14.12.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 (667) 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 +161 -208
  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/evidence-discipline.md +26 -0
  16. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +154 -2
  17. package/dist/agent-src/rules/active-remediation.md +3 -3
  18. package/dist/agent-src/rules/code-provenance.md +2 -2
  19. package/dist/agent-src/rules/context-hygiene.md +13 -33
  20. package/dist/agent-src/rules/council-availability.md +2 -2
  21. package/dist/agent-src/rules/decision-revisit-gate.md +3 -1
  22. package/dist/agent-src/rules/design-fidelity.md +18 -0
  23. package/dist/agent-src/rules/design-review-after-ui-write.md +2 -2
  24. package/dist/agent-src/rules/evaluator-independence.md +56 -44
  25. package/dist/agent-src/rules/fix-what-you-see.md +9 -1
  26. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +1 -1
  27. package/dist/agent-src/rules/minimal-safe-diff.md +14 -20
  28. package/dist/agent-src/rules/missing-skill-recovery.md +13 -1
  29. package/dist/agent-src/rules/playbook-precedence.md +105 -0
  30. package/dist/agent-src/rules/recurring-criticism.md +3 -1
  31. package/dist/agent-src/rules/roadmap-progress-sync.md +14 -13
  32. package/dist/agent-src/rules/scale-discipline.md +24 -0
  33. package/dist/agent-src/rules/security-sensitive-stop.md +2 -2
  34. package/dist/agent-src/rules/settings-ask-protocol.md +2 -2
  35. package/dist/agent-src/rules/ui-audit-gate.md +27 -15
  36. package/dist/agent-src/rules/untrusted-input-defense.md +2 -2
  37. package/dist/agent-src/skills/accessibility-auditor/SKILL.md +19 -0
  38. package/dist/agent-src/skills/adr-create/SKILL.md +7 -0
  39. package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +33 -0
  40. package/dist/agent-src/skills/ai-council/references/advanced-modes.md +17 -3
  41. package/dist/agent-src/skills/ai-council/references/output-and-synthesis.md +31 -0
  42. package/dist/agent-src/skills/ai-council/references/procedure.md +19 -0
  43. package/dist/agent-src/skills/alerting-doctrine/SKILL.md +225 -0
  44. package/dist/agent-src/skills/authz-review/SKILL.md +0 -1
  45. package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +32 -0
  46. package/dist/agent-src/skills/brand/SKILL.md +3 -0
  47. package/dist/agent-src/skills/brand-asset-generation/SKILL.md +3 -0
  48. package/dist/agent-src/skills/brand-audit/SKILL.md +3 -0
  49. package/dist/agent-src/skills/brand-identity/SKILL.md +3 -0
  50. package/dist/agent-src/skills/brand-strategy/SKILL.md +3 -0
  51. package/dist/agent-src/skills/brand-to-tokens/SKILL.md +3 -0
  52. package/dist/agent-src/skills/check-refs/SKILL.md +3 -0
  53. package/dist/agent-src/skills/code-refactoring/SKILL.md +45 -1
  54. package/dist/agent-src/skills/code-review/SKILL.md +75 -5
  55. package/dist/agent-src/skills/command-routing/SKILL.md +6 -0
  56. package/dist/agent-src/skills/command-writing/SKILL.md +35 -0
  57. package/dist/agent-src/skills/condense-memory/SKILL.md +3 -0
  58. package/dist/agent-src/skills/context-authoring/SKILL.md +1 -1
  59. package/dist/agent-src/skills/conventional-commits-writing/SKILL.md +3 -0
  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 +79 -1
  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/estimate-ticket/SKILL.md +3 -0
  73. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +28 -4
  74. package/dist/agent-src/skills/fe-design/SKILL.md +74 -41
  75. package/dist/agent-src/skills/fe-design/references/craft-floor.md +52 -0
  76. package/dist/agent-src/skills/fe-design/references/source-led-port.md +36 -0
  77. package/dist/agent-src/skills/file-editor/SKILL.md +5 -0
  78. package/dist/agent-src/skills/finishing-a-development-branch/SKILL.md +2 -2
  79. package/dist/agent-src/skills/git-workflow/SKILL.md +3 -0
  80. package/dist/agent-src/skills/html-deck/SKILL.md +3 -0
  81. package/dist/agent-src/skills/iconography/SKILL.md +3 -0
  82. package/dist/agent-src/skills/image-editing/SKILL.md +3 -0
  83. package/dist/agent-src/skills/image-generation/SKILL.md +3 -0
  84. package/dist/agent-src/skills/image-provider-routing/SKILL.md +3 -0
  85. package/dist/agent-src/skills/incident-commander/SKILL.md +10 -0
  86. package/dist/agent-src/skills/js-library-packaging/SKILL.md +173 -0
  87. package/dist/agent-src/skills/js-library-packaging/scripts/check_package_surface.ts +270 -0
  88. package/dist/agent-src/skills/laravel-migration/SKILL.md +3 -0
  89. package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +3 -0
  90. package/dist/agent-src/skills/lint-skills/SKILL.md +3 -0
  91. package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +3 -0
  92. package/dist/agent-src/skills/logging-monitoring/SKILL.md +234 -51
  93. package/dist/agent-src/skills/logo-generation/SKILL.md +3 -0
  94. package/dist/agent-src/skills/md-language-check/SKILL.md +3 -0
  95. package/dist/agent-src/skills/monorepo-workspace/SKILL.md +149 -0
  96. package/dist/agent-src/skills/motion-choreographer/SKILL.md +6 -0
  97. package/dist/agent-src/skills/multi-tenancy/SKILL.md +4 -0
  98. package/dist/agent-src/skills/operational-readiness/SKILL.md +184 -0
  99. package/dist/agent-src/skills/override-management/SKILL.md +3 -0
  100. package/dist/agent-src/skills/persona-improvement/SKILL.md +3 -0
  101. package/dist/agent-src/skills/pest-testing/SKILL.md +3 -0
  102. package/dist/agent-src/skills/playbook-authoring/SKILL.md +162 -0
  103. package/dist/agent-src/skills/playwright-testing/SKILL.md +3 -0
  104. package/dist/agent-src/skills/privacy-review/SKILL.md +3 -0
  105. package/dist/agent-src/skills/project-analysis-core/SKILL.md +23 -0
  106. package/dist/agent-src/skills/prompt-engineering-image/SKILL.md +3 -0
  107. package/dist/agent-src/skills/quality-tools/SKILL.md +5 -0
  108. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +81 -33
  109. package/dist/agent-src/skills/readme-reviewer/SKILL.md +3 -0
  110. package/dist/agent-src/skills/readme-writing/SKILL.md +3 -0
  111. package/dist/agent-src/skills/readme-writing-package/SKILL.md +3 -0
  112. package/dist/agent-src/skills/receiving-code-review/SKILL.md +2 -2
  113. package/dist/agent-src/skills/refine-prompt/SKILL.md +3 -0
  114. package/dist/agent-src/skills/refine-ticket/SKILL.md +3 -0
  115. package/dist/agent-src/skills/requesting-code-review/SKILL.md +2 -2
  116. package/dist/agent-src/skills/review-routing/SKILL.md +2 -2
  117. package/dist/agent-src/skills/roadmap-writing/SKILL.md +23 -41
  118. package/dist/agent-src/skills/roadmap-writing/references/follow-up-roadmap-shape.md +47 -0
  119. package/dist/agent-src/skills/rtk-output-filtering/SKILL.md +22 -6
  120. package/dist/agent-src/skills/runway-cognition/SKILL.md +3 -0
  121. package/dist/agent-src/skills/scene-expander/scene-blueprint.schema.yaml +26 -0
  122. package/dist/agent-src/skills/secrets-management/SKILL.md +4 -0
  123. package/dist/agent-src/skills/server-hardening/SKILL.md +159 -0
  124. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +3 -0
  125. package/dist/agent-src/skills/skill-management/SKILL.md +3 -0
  126. package/dist/agent-src/skills/skill-reviewer/SKILL.md +3 -0
  127. package/dist/agent-src/skills/skill-writing/SKILL.md +6 -0
  128. package/dist/agent-src/skills/skill-writing/references/procedure.md +24 -2
  129. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +3 -0
  130. package/dist/agent-src/skills/storybook-workshop/SKILL.md +203 -0
  131. package/dist/agent-src/skills/storybook-workshop/scripts/story_contrast_floor.ts +134 -0
  132. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +1 -1
  133. package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +25 -0
  134. package/dist/agent-src/skills/supply-chain-intake/SKILL.md +12 -0
  135. package/dist/agent-src/skills/systematic-debugging/SKILL.md +1 -1
  136. package/dist/agent-src/skills/terraform/SKILL.md +3 -0
  137. package/dist/agent-src/skills/test-driven-development/SKILL.md +1 -1
  138. package/dist/agent-src/skills/threat-modeling/SKILL.md +0 -3
  139. package/dist/agent-src/skills/token-optimizer/SKILL.md +3 -0
  140. package/dist/agent-src/skills/typography-system/SKILL.md +3 -0
  141. package/dist/agent-src/skills/ui-component-architect/SKILL.md +17 -1
  142. package/dist/agent-src/skills/upstream-contribute/SKILL.md +3 -0
  143. package/dist/agent-src/skills/validate-feature-fit/SKILL.md +3 -0
  144. package/dist/agent-src/skills/verify-completion-evidence/SKILL.md +2 -2
  145. package/dist/agent-src/skills/wireframe/SKILL.md +3 -0
  146. package/dist/agent-src/skills/wireframe/references/story-beat-ledger.schema.json +115 -0
  147. package/dist/agent-src/skills/workspace-link/SKILL.md +131 -0
  148. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  149. package/dist/agent-src/templates/playbook.md +75 -0
  150. package/dist/agent-src/templates/roadmaps.md +37 -0
  151. package/dist/agent-src/templates/scripts/check_playbook_invokes.ts +231 -0
  152. package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +24 -0
  153. package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -0
  154. package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +216 -0
  155. package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +159 -0
  156. package/dist/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +73 -4
  157. package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +325 -40
  158. package/dist/cli/commands/uiAudit.js +221 -0
  159. package/dist/cli/commands/uiRender.js +206 -0
  160. package/dist/cli/main.js +22 -1
  161. package/dist/cli/mcp/content.js +64 -1
  162. package/dist/cli/mcp/dispatch.js +175 -10
  163. package/dist/cli/registry.js +3 -0
  164. package/dist/cli-delegate/{chunk-G23AT6GD.js → chunk-DMSZHXZS.js} +57 -1
  165. package/dist/cli-delegate/{chunk-77GR3VD4.js → chunk-FF7WAFMR.js} +58 -3
  166. package/dist/cli-delegate/{chunk-YM4GZDJG.js → chunk-JCW7ZLHK.js} +10 -0
  167. package/dist/cli-delegate/{chunk-H4VIVD4C.js → chunk-JJA2QEWA.js} +413 -391
  168. package/dist/cli-delegate/{chunk-PLSG6UL5.js → chunk-K4FFODTS.js} +341 -204
  169. package/dist/cli-delegate/{chunk-B2ERU2VA.js → chunk-WOKWX5PL.js} +1 -1
  170. package/dist/cli-delegate/cmd_brand_status.js +8 -6
  171. package/dist/cli-delegate/cmd_conformance.js +3 -3
  172. package/dist/cli-delegate/cmd_doctor.js +3 -3
  173. package/dist/cli-delegate/cmd_export.js +4 -4
  174. package/dist/cli-delegate/cmd_handoff.js +1 -1
  175. package/dist/cli-delegate/cmd_preflight.js +2 -2
  176. package/dist/cli-delegate/cmd_prune.js +4 -4
  177. package/dist/cli-delegate/cmd_session_recycle.js +70 -9
  178. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  179. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  180. package/dist/cli-delegate/cmd_sync.js +4 -4
  181. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  182. package/dist/cli-delegate/cmd_validate.js +4 -4
  183. package/dist/discovery/deprecation-report.md +1 -1
  184. package/dist/discovery/discovery-manifest.json +362 -127
  185. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  186. package/dist/discovery/discovery-manifest.summary.md +4 -4
  187. package/dist/discovery/dormancy-report.md +1 -1
  188. package/dist/discovery/orphan-report.md +1 -1
  189. package/dist/discovery/packs.json +18 -8
  190. package/dist/discovery/trust-report.md +3 -3
  191. package/dist/discovery/workspaces.json +16 -6
  192. package/dist/hooks/dispatch.js +2575 -1472
  193. package/dist/install/install.mjs +800 -708
  194. package/dist/mcp/registry-manifest.json +3 -3
  195. package/dist/mcp/server.json +2 -2
  196. package/dist/mcp/server.mjs +1685 -1250
  197. package/dist/router.json +1 -1
  198. package/dist/scripts/_lib/lean_projection_mode.js +40 -0
  199. package/dist/scripts/_lib/scoped_projection.js +84 -0
  200. package/dist/scripts/_lib/ui_surface.js +89 -0
  201. package/dist/scripts/condense.js +6 -10
  202. package/dist/scripts/project_thin_rules.js +40 -2
  203. package/dist/server/schemas/settings.js +6 -0
  204. package/dist/shared/skillRanking.js +159 -0
  205. package/docs/contracts/provider-lifecycle.md +47 -18
  206. package/docs/contracts/settings-classes.md +35 -5
  207. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +49 -0
  208. package/docs/guidelines/agent-infra/downstream-changes-mechanics.md +91 -0
  209. package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +92 -0
  210. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +45 -1
  211. package/docs/guidelines/agent-infra/roadmap-deferred-resolution-provenance.md +54 -0
  212. package/docs/guidelines/code-clarity.md +21 -0
  213. package/docs/guidelines/design-antipatterns.md +4 -2
  214. package/docs/guidelines/design-asset-discipline.md +38 -0
  215. package/docs/guidelines/design-fidelity-mechanics.md +45 -29
  216. package/docs/guidelines/design-handover-extraction.md +35 -5
  217. package/docs/guidelines/design-modes.md +41 -1
  218. package/docs/guidelines/monorepo-antipatterns.md +141 -0
  219. package/docs/guidelines/redundancy-taxonomy.md +180 -0
  220. package/llms.txt +50 -39
  221. package/package.json +6 -2
  222. package/src/agent-src/templates/scripts/check_playbook_invokes.ts +231 -0
  223. package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +24 -0
  224. package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -0
  225. package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +216 -0
  226. package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +159 -0
  227. package/src/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +73 -4
  228. package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +325 -40
  229. package/src/config/agent-settings.template.yml +44 -0
  230. package/src/config/assurance-capability-registry.json +223 -0
  231. package/src/config/assurance-threshold-budget.json +65 -0
  232. package/src/config/budgets.yml +19 -0
  233. package/src/config/ci-local-parity.yml +29 -0
  234. package/src/config/discovery/prompt-patterns.yml +56 -0
  235. package/src/config/discovery/unassigned-artefacts.yml +2 -0
  236. package/src/config/dispatch-economy-metrics.json +4 -2
  237. package/src/config/estate-count-budget.json +8 -3
  238. package/src/config/evaluator-budgets.json +14 -14
  239. package/src/config/gate-coverage.yml +392 -8
  240. package/src/config/gate-violation-baselines.json +76 -72
  241. package/src/config/hook-latency-budget.json +1 -0
  242. package/src/config/hook-token-budget.json +137 -125
  243. package/src/config/pack-size-budget.json +39 -10
  244. package/src/config/preamble-payload-budget.json +97 -71
  245. package/src/config/quorum-attendance-budget.json +12 -4
  246. package/src/config/routing-coverage-seed.json +29 -0
  247. package/src/config/rule-activation-census.json +7 -3
  248. package/src/config/rule-enforcement-baseline.json +0 -1
  249. package/src/config/rule-stub-ceilings.json +112 -91
  250. package/src/config/suggestion-capture.json +28 -0
  251. package/src/config/surface-matrix.yml +21 -2
  252. package/src/config/web-launch-readiness.json +188 -0
  253. package/src/scripts/_cli/cmd_doctor.ts +15 -16
  254. package/src/scripts/_cli/doctor_install_mode.ts +49 -0
  255. package/src/scripts/_cli/doctor_overrides.ts +154 -0
  256. package/src/scripts/_dispatch.bash +17 -0
  257. package/src/scripts/_lib/as_of.ts +412 -0
  258. package/src/scripts/_lib/exec_evidence.ts +7 -0
  259. package/src/scripts/_lib/gate_baseline.ts +150 -1
  260. package/src/scripts/_lib/hook_settings.ts +33 -0
  261. package/src/scripts/_lib/host_listing_model.ts +192 -0
  262. package/src/scripts/_lib/lean_projection_mode.ts +44 -0
  263. package/src/scripts/_lib/mcp_bridge.ts +199 -0
  264. package/src/scripts/_lib/review_independence.ts +62 -10
  265. package/src/scripts/_lib/rule_injection.ts +239 -0
  266. package/src/scripts/_lib/run_checkpoint.ts +54 -1
  267. package/src/scripts/_lib/scoped_projection.ts +96 -0
  268. package/src/scripts/_lib/session_register.ts +44 -2
  269. package/src/scripts/_lib/skill_catalogue.ts +38 -2
  270. package/src/scripts/_lib/skill_estate.ts +115 -0
  271. package/src/scripts/_lib/transcript_reads.ts +207 -0
  272. package/src/scripts/_lib/ui_authority.ts +343 -0
  273. package/src/scripts/ai-video/adapters/fal.sh +8 -3
  274. package/src/scripts/ai-video/adapters/gemini-veo.sh +10 -0
  275. package/src/scripts/ai-video/adapters/higgsfield.sh +10 -2
  276. package/src/scripts/ai-video/adapters/kling.sh +10 -0
  277. package/src/scripts/ai-video/adapters/sora.sh +10 -0
  278. package/src/scripts/ai-video/lib/calibrate-cost.sh +145 -0
  279. package/src/scripts/ai-video/lib/model-capabilities/README.md +53 -7
  280. package/src/scripts/ai-video/lib/model-capabilities/comfyui.json +15 -3
  281. package/src/scripts/ai-video/lib/model-capabilities/fal.json +36 -6
  282. package/src/scripts/ai-video/lib/model-capabilities/gemini-veo.json +23 -0
  283. package/src/scripts/ai-video/lib/model-capabilities/higgsfield.json +23 -0
  284. package/src/scripts/ai-video/lib/model-capabilities/kling.json +23 -0
  285. package/src/scripts/ai-video/lib/model-capabilities/musetalk.json +8 -2
  286. package/src/scripts/ai-video/lib/model-capabilities/replicate.json +36 -6
  287. package/src/scripts/ai-video/lib/model-capabilities/sora.json +45 -0
  288. package/src/scripts/ai-video/lib/model-capabilities/syncso.json +8 -2
  289. package/src/scripts/ai-video/lib/parse-blueprint.sh +52 -5
  290. package/src/scripts/ai-video/lib/resume-scan.sh +92 -3
  291. package/src/scripts/ai-video/lib/seam-plan.sh +212 -0
  292. package/src/scripts/ai-video/smoke-trace.sh +450 -2
  293. package/src/scripts/ai-video/stitch.sh +191 -10
  294. package/src/scripts/ai-video/test-pipeline.sh +84 -6
  295. package/src/scripts/ai_council/argument_exhaustion.ts +130 -0
  296. package/src/scripts/ai_council/cli_agency_bounds.ts +139 -0
  297. package/src/scripts/ai_council/cli_least_agency_canary.ts +347 -0
  298. package/src/scripts/ai_council/clients.ts +3 -2
  299. package/src/scripts/ai_council/consensus.ts +63 -6
  300. package/src/scripts/ai_council/events_log.ts +46 -1
  301. package/src/scripts/ai_council/orchestrator.ts +103 -108
  302. package/src/scripts/ai_council/orchestrator_results.ts +166 -0
  303. package/src/scripts/ai_council/prompts.ts +12 -5
  304. package/src/scripts/ai_council/quorum.ts +82 -1
  305. package/src/scripts/ai_council/quorum_wiring.ts +82 -5
  306. package/src/scripts/ai_council/stance_tally.ts +22 -0
  307. package/src/scripts/bench_hook_latency.ts +62 -0
  308. package/src/scripts/build_proof.ts +12 -1
  309. package/src/scripts/capture_skill_catalogue.ts +21 -0
  310. package/src/scripts/check_always_budget.ts +2 -1
  311. package/src/scripts/check_augmentignore.ts +2 -1
  312. package/src/scripts/check_beta_review_markers.ts +2 -1
  313. package/src/scripts/check_bundle_path_leakage.ts +162 -7
  314. package/src/scripts/check_command_examples.ts +557 -0
  315. package/src/scripts/check_composite_arming.ts +364 -0
  316. package/src/scripts/check_corpus_staleness.ts +2 -1
  317. package/src/scripts/check_council_pin_staleness.ts +3 -1
  318. package/src/scripts/check_enforcement_coverage.ts +116 -3
  319. package/src/scripts/check_enforcement_denominator.ts +365 -0
  320. package/src/scripts/check_estate_count.ts +122 -3
  321. package/src/scripts/check_gate_coverage.ts +2 -1
  322. package/src/scripts/check_hook_bundle_freshness.ts +13 -1
  323. package/src/scripts/check_knowledge_cards.ts +2 -1
  324. package/src/scripts/check_knowledge_pages.ts +3 -2
  325. package/src/scripts/check_memory.ts +2 -1
  326. package/src/scripts/check_no_automerge_key.ts +287 -0
  327. package/src/scripts/check_pack_conformance_fixture.ts +565 -0
  328. package/src/scripts/check_preamble_payload_budget.ts +30 -3
  329. package/src/scripts/check_proposal.ts +2 -1
  330. package/src/scripts/check_reach_staleness.ts +2 -1
  331. package/src/scripts/check_release_adjacent_health.ts +2 -1
  332. package/src/scripts/check_release_pr_shape.ts +5 -0
  333. package/src/scripts/check_review_schema.ts +34 -1
  334. package/src/scripts/check_roadmap_trackable.ts +48 -3
  335. package/src/scripts/check_routing_coverage.ts +352 -0
  336. package/src/scripts/check_score_contract.ts +505 -0
  337. package/src/scripts/check_skill_admissions.ts +514 -0
  338. package/src/scripts/check_source_size_budget.ts +2 -1
  339. package/src/scripts/check_standing_payload_delta.ts +505 -0
  340. package/src/scripts/check_trigger_evals.ts +2 -1
  341. package/src/scripts/check_web_launch_readiness.ts +705 -0
  342. package/src/scripts/classify_change_risk.ts +281 -0
  343. package/src/scripts/compute_skill_tiers.ts +186 -0
  344. package/src/scripts/condense.ts +8 -13
  345. package/src/scripts/council_attendance_metrics.ts +183 -0
  346. package/src/scripts/council_cli.ts +10 -8
  347. package/src/scripts/council_parse_rate.ts +116 -0
  348. package/src/scripts/derive_playbooks.ts +406 -0
  349. package/src/scripts/description_route_check.ts +494 -0
  350. package/src/scripts/design_slop_rules.ts +56 -2
  351. package/src/scripts/dispatch_r2_reviewer.ts +16 -0
  352. package/src/scripts/frontend_corpus_hash.ts +116 -0
  353. package/src/scripts/grade_target_readiness.ts +478 -0
  354. package/src/scripts/hook_manifest.json +1 -1
  355. package/src/scripts/hook_manifest.yaml +124 -16
  356. package/src/scripts/hooks/concern_registry.ts +6 -0
  357. package/src/scripts/hooks/design_pass_hook.ts +356 -0
  358. package/src/scripts/hooks/rtk_wrap_hook.ts +30 -7
  359. package/src/scripts/hooks/rule_inject_hook.ts +318 -0
  360. package/src/scripts/hooks/suggestion_capture_hook.ts +368 -0
  361. package/src/scripts/hot_context_hook.ts +74 -7
  362. package/src/scripts/install.ts +40 -89
  363. package/src/scripts/lint_adapter_tier.ts +663 -0
  364. package/src/scripts/lint_archived_skills.ts +93 -0
  365. package/src/scripts/lint_budget_ownership.ts +56 -5
  366. package/src/scripts/lint_deterministic_time.ts +470 -0
  367. package/src/scripts/lint_framework_leakage.ts +5 -0
  368. package/src/scripts/lint_handoffs.ts +525 -1
  369. package/src/scripts/lint_judge_prompt_expectation.ts +155 -0
  370. package/src/scripts/lint_marketplace.ts +88 -0
  371. package/src/scripts/lint_media_policy_linkage.ts +140 -1
  372. package/src/scripts/lint_one_off_age.ts +6 -1
  373. package/src/scripts/lint_override_kernel_guard.ts +87 -5
  374. package/src/scripts/lint_roadmap_complexity.ts +56 -0
  375. package/src/scripts/lint_rule_enforcement_declaration.ts +24 -7
  376. package/src/scripts/lint_rule_norm_pin.ts +321 -0
  377. package/src/scripts/lint_skill_trigger_corpus.ts +349 -0
  378. package/src/scripts/lint_spawn_payload.ts +42 -5
  379. package/src/scripts/lint_symptom_intake.ts +2 -1
  380. package/src/scripts/mcp_parity_smoke.ts +30 -4
  381. package/src/scripts/mcp_render.ts +66 -1
  382. package/src/scripts/mcp_tool_fingerprint.ts +241 -0
  383. package/src/scripts/measure_risk_class_drift.ts +140 -0
  384. package/src/scripts/measure_skill_ranker_baseline.ts +212 -0
  385. package/src/scripts/media/lib/adapter-common.sh +211 -1
  386. package/src/scripts/media/lib/adapter-contract.md +74 -6
  387. package/src/scripts/model_rule_injection.ts +907 -0
  388. package/src/scripts/pack_install_smoke.ts +363 -0
  389. package/src/scripts/pr_conflict_census.ts +187 -0
  390. package/src/scripts/project_thin_rules.ts +45 -2
  391. package/src/scripts/release.ts +66 -860
  392. package/src/scripts/release_drill.ts +59 -3
  393. package/src/scripts/release_env.ts +298 -0
  394. package/src/scripts/release_publication.ts +720 -0
  395. package/src/scripts/report_pack_delta.ts +204 -0
  396. package/src/scripts/roadmap_context.ts +778 -0
  397. package/src/scripts/schemas/fidelity-measurement-sheet.schema.json +169 -0
  398. package/src/scripts/schemas/rule.schema.json +24 -2
  399. package/src/scripts/schemas/skill.schema.json +39 -0
  400. package/src/scripts/schemas/ui-authority.schema.json +114 -0
  401. package/src/scripts/select_analysis_mode.ts +112 -0
  402. package/src/scripts/session_register_hook.ts +29 -3
  403. package/src/scripts/sessions_cli.ts +67 -3
  404. package/src/scripts/skill_tools/score_skill_relevance.ts +36 -53
  405. package/src/scripts/sync_pr_branch.ts +40 -1
  406. package/src/scripts/token_sink_report.ts +239 -0
  407. package/src/scripts/trigger_coverage.ts +122 -3
  408. package/src/scripts/update_counts.ts +7 -3
  409. package/src/scripts/validate_frontmatter.ts +66 -0
  410. package/src/server/schemas/settings.ts +10 -0
  411. package/src/shared/skillRanking.ts +183 -0
  412. package/dist/agent-src/skills/accessibility-auditor/evals/evals.json +0 -15
  413. package/dist/agent-src/skills/agent-security-review/evals/triggers.json +0 -52
  414. package/dist/agent-src/skills/ai-code-blindspots/evals/triggers.json +0 -52
  415. package/dist/agent-src/skills/analysis-skill-router/evals/evals.json +0 -13
  416. package/dist/agent-src/skills/brand/evals/triggers.json +0 -17
  417. package/dist/agent-src/skills/brand-asset-generation/evals/triggers.json +0 -17
  418. package/dist/agent-src/skills/brand-audit/evals/triggers.json +0 -17
  419. package/dist/agent-src/skills/brand-identity/evals/triggers.json +0 -17
  420. package/dist/agent-src/skills/brand-strategy/evals/triggers.json +0 -17
  421. package/dist/agent-src/skills/brand-to-tokens/evals/triggers.json +0 -17
  422. package/dist/agent-src/skills/bug-analyzer/evals/evals.json +0 -13
  423. package/dist/agent-src/skills/canvas-design/evals/triggers.json +0 -17
  424. package/dist/agent-src/skills/character-consistency/evals/evals.json +0 -16
  425. package/dist/agent-src/skills/code-intelligence/evals/triggers.json +0 -52
  426. package/dist/agent-src/skills/code-review/evals/evals.json +0 -100
  427. package/dist/agent-src/skills/command-routing/evals/evals.json +0 -14
  428. package/dist/agent-src/skills/complexity-first-planning/evals/triggers.json +0 -17
  429. package/dist/agent-src/skills/contract-review/evals/triggers.json +0 -17
  430. package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +0 -15
  431. package/dist/agent-src/skills/corpus-grounding/evals/triggers.json +0 -17
  432. package/dist/agent-src/skills/dashboard-design/evals/evals.json +0 -16
  433. package/dist/agent-src/skills/dcf-modeling/evals/domain-truth.json +0 -29
  434. package/dist/agent-src/skills/dcf-modeling/evals/evals.json +0 -20
  435. package/dist/agent-src/skills/decision-record/evals/evals.json +0 -20
  436. package/dist/agent-src/skills/decision-record/evals/triggers.json +0 -87
  437. package/dist/agent-src/skills/design-intelligence/evals/evals.json +0 -14
  438. package/dist/agent-src/skills/design-intelligence/evals/triggers.json +0 -17
  439. package/dist/agent-src/skills/design-system-capture/evals/evals.json +0 -15
  440. package/dist/agent-src/skills/design-tokens/evals/triggers.json +0 -17
  441. package/dist/agent-src/skills/design-variations/evals/triggers.json +0 -17
  442. package/dist/agent-src/skills/developer-like-execution/evals/evals.json +0 -16
  443. package/dist/agent-src/skills/doc-coauthoring/evals/evals.json +0 -16
  444. package/dist/agent-src/skills/doc-coauthoring/evals/triggers.json +0 -17
  445. package/dist/agent-src/skills/docx-authoring/evals/triggers.json +0 -52
  446. package/dist/agent-src/skills/dpa-review/evals/triggers.json +0 -17
  447. package/dist/agent-src/skills/editorial-calendar/evals/domain-truth.json +0 -16
  448. package/dist/agent-src/skills/editorial-calendar/evals/evals.json +0 -16
  449. package/dist/agent-src/skills/eloquent/evals/triggers.json +0 -17
  450. package/dist/agent-src/skills/estimate-ticket/evals/evals.json +0 -16
  451. package/dist/agent-src/skills/estimate-ticket/evals/output-schema.yml +0 -20
  452. package/dist/agent-src/skills/estimate-ticket/evals/triggers.json +0 -19
  453. package/dist/agent-src/skills/evaluate-llm-feature/evals/triggers.json +0 -52
  454. package/dist/agent-src/skills/existing-ui-audit/evals/triggers.json +0 -47
  455. package/dist/agent-src/skills/experiment-loop/evals/output-schema.yml +0 -27
  456. package/dist/agent-src/skills/experiment-loop/evals/triggers.json +0 -17
  457. package/dist/agent-src/skills/fe-design/evals/triggers.json +0 -55
  458. package/dist/agent-src/skills/forecasting/evals/domain-truth.json +0 -29
  459. package/dist/agent-src/skills/forecasting/evals/evals.json +0 -20
  460. package/dist/agent-src/skills/forensics-report/evals/triggers.json +0 -17
  461. package/dist/agent-src/skills/frontend-render-security/evals/triggers.json +0 -52
  462. package/dist/agent-src/skills/fundraising-narrative/evals/domain-truth.json +0 -16
  463. package/dist/agent-src/skills/fundraising-narrative/evals/evals.json +0 -16
  464. package/dist/agent-src/skills/gated-reach/evals/triggers.json +0 -72
  465. package/dist/agent-src/skills/github-ci/evals/evals.json +0 -25
  466. package/dist/agent-src/skills/history-design/evals/triggers.json +0 -17
  467. package/dist/agent-src/skills/html-deck/evals/triggers.json +0 -17
  468. package/dist/agent-src/skills/humanizer/evals/strip_fixtures.json +0 -57
  469. package/dist/agent-src/skills/humanizer/evals/triggers.json +0 -17
  470. package/dist/agent-src/skills/iconography/evals/triggers.json +0 -17
  471. package/dist/agent-src/skills/image-analyser/evals/triggers.json +0 -17
  472. package/dist/agent-src/skills/image-creator/evals/triggers.json +0 -17
  473. package/dist/agent-src/skills/image-editing/evals/triggers.json +0 -17
  474. package/dist/agent-src/skills/image-generation/evals/triggers.json +0 -17
  475. package/dist/agent-src/skills/image-provider-routing/evals/triggers.json +0 -17
  476. package/dist/agent-src/skills/incident-commander/evals/domain-truth.json +0 -16
  477. package/dist/agent-src/skills/incident-commander/evals/evals.json +0 -20
  478. package/dist/agent-src/skills/judge-artifact-completeness/evals/triggers.json +0 -17
  479. package/dist/agent-src/skills/judge-injection-defense/evals/triggers.json +0 -17
  480. package/dist/agent-src/skills/judge-synthesis/evals/triggers.json +0 -17
  481. package/dist/agent-src/skills/launch-readiness/evals/evals.json +0 -21
  482. package/dist/agent-src/skills/learning-tutor/evals/triggers.json +0 -52
  483. package/dist/agent-src/skills/legal-intake-triage/evals/triggers.json +0 -17
  484. package/dist/agent-src/skills/legal-practice-profile/evals/triggers.json +0 -17
  485. package/dist/agent-src/skills/license-compliance-audit/evals/triggers.json +0 -52
  486. package/dist/agent-src/skills/license-compliance-borrow-check/evals/triggers.json +0 -52
  487. package/dist/agent-src/skills/license-compliance-credits/evals/triggers.json +0 -52
  488. package/dist/agent-src/skills/llm-provider-knowledge/evals/triggers.json +0 -20
  489. package/dist/agent-src/skills/logging-monitoring/evals/evals.json +0 -16
  490. package/dist/agent-src/skills/logo-generation/evals/triggers.json +0 -17
  491. package/dist/agent-src/skills/messaging-architecture/evals/domain-truth.json +0 -16
  492. package/dist/agent-src/skills/messaging-architecture/evals/evals.json +0 -16
  493. package/dist/agent-src/skills/nda-triage/evals/triggers.json +0 -17
  494. package/dist/agent-src/skills/pdf-tools/evals/triggers.json +0 -52
  495. package/dist/agent-src/skills/perf-feedback-craft/evals/evals.json +0 -16
  496. package/dist/agent-src/skills/persona-improvement/evals/triggers.json +0 -52
  497. package/dist/agent-src/skills/php-coder/evals/triggers.json +0 -17
  498. package/dist/agent-src/skills/prediction-pool-optimizer/evals/triggers.json +0 -21
  499. package/dist/agent-src/skills/prompt-engineering-image/evals/triggers.json +0 -17
  500. package/dist/agent-src/skills/prompt-engineering-patterns/evals/evals.json +0 -16
  501. package/dist/agent-src/skills/prompt-validator/evals/triggers.json +0 -17
  502. package/dist/agent-src/skills/quality-tools/evals/evals.json +0 -15
  503. package/dist/agent-src/skills/reasoning-orchestrator/evals/triggers.json +0 -17
  504. package/dist/agent-src/skills/refine-prompt/evals/evals.json +0 -16
  505. package/dist/agent-src/skills/refine-ticket/evals/evals.json +0 -16
  506. package/dist/agent-src/skills/refine-ticket/evals/output-schema.yml +0 -16
  507. package/dist/agent-src/skills/refine-ticket/evals/triggers.json +0 -17
  508. package/dist/agent-src/skills/release-comms/evals/evals.json +0 -16
  509. package/dist/agent-src/skills/rice-prioritization/evals/evals.json +0 -20
  510. package/dist/agent-src/skills/runway-cognition/evals/domain-truth.json +0 -29
  511. package/dist/agent-src/skills/runway-cognition/evals/evals.json +0 -20
  512. package/dist/agent-src/skills/scenario-modeling/evals/domain-truth.json +0 -29
  513. package/dist/agent-src/skills/scenario-modeling/evals/evals.json +0 -20
  514. package/dist/agent-src/skills/schema-review/evals/triggers.json +0 -17
  515. package/dist/agent-src/skills/screenshot-hygiene/evals/triggers.json +0 -52
  516. package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +0 -52
  517. package/dist/agent-src/skills/skill-writing/evals/triggers.json +0 -17
  518. package/dist/agent-src/skills/spreadsheet-authoring/evals/triggers.json +0 -47
  519. package/dist/agent-src/skills/subagent-orchestration/evals/evals.json +0 -60
  520. package/dist/agent-src/skills/supply-chain-intake/evals/triggers.json +0 -52
  521. package/dist/agent-src/skills/systematic-debugging/evals/evals.json +0 -20
  522. package/dist/agent-src/skills/test-case-discovery/evals/triggers.json +0 -52
  523. package/dist/agent-src/skills/test-driven-development/evals/evals.json +0 -16
  524. package/dist/agent-src/skills/threat-modeling/evals/evals.json +0 -21
  525. package/dist/agent-src/skills/typography-system/evals/evals.json +0 -14
  526. package/dist/agent-src/skills/typography-system/evals/triggers.json +0 -17
  527. package/dist/agent-src/skills/unit-economics-modeling/evals/domain-truth.json +0 -40
  528. package/dist/agent-src/skills/unit-economics-modeling/evals/evals.json +0 -24
  529. package/dist/agent-src/skills/verify-completion-evidence/evals/evals.json +0 -16
  530. package/dist/agent-src/skills/verify-repair-loop/evals/output-schema.yml +0 -20
  531. package/dist/agent-src/skills/verify-repair-loop/evals/triggers.json +0 -17
  532. package/dist/agent-src/skills/vision-articulation/evals/evals.json +0 -16
  533. package/dist/agent-src/skills/voice-and-tone-design/evals/evals.json +0 -16
  534. package/dist/agent-src/skills/wireframe/evals/triggers.json +0 -17
  535. package/dist/agent-src/skills/worktree-lifecycle/evals/evals.json +0 -38
  536. package/dist/agent-src/skills/worktree-lifecycle/evals/triggers.json +0 -52
  537. package/dist/cli/agent-config.js.map +0 -1
  538. package/dist/cli/bash/runBash.js.map +0 -1
  539. package/dist/cli/commands/commands.js.map +0 -1
  540. package/dist/cli/commands/config.js.map +0 -1
  541. package/dist/cli/commands/doctorShell.js.map +0 -1
  542. package/dist/cli/commands/mcpServer.js.map +0 -1
  543. package/dist/cli/commands/packs.js.map +0 -1
  544. package/dist/cli/commands/profiles.js.map +0 -1
  545. package/dist/cli/commands/recordTriggerEval.js.map +0 -1
  546. package/dist/cli/commands/rtkDetect.js.map +0 -1
  547. package/dist/cli/commands/settings.js.map +0 -1
  548. package/dist/cli/commands/uiServe.js.map +0 -1
  549. package/dist/cli/commands/versions.js.map +0 -1
  550. package/dist/cli/commands/workspaces.js.map +0 -1
  551. package/dist/cli/configRoot.js.map +0 -1
  552. package/dist/cli/discovery/loadManifest.js.map +0 -1
  553. package/dist/cli/firstRunNotice.js.map +0 -1
  554. package/dist/cli/help.js.map +0 -1
  555. package/dist/cli/initRouting.js.map +0 -1
  556. package/dist/cli/log/logger.js.map +0 -1
  557. package/dist/cli/main.js.map +0 -1
  558. package/dist/cli/mcp/content.js.map +0 -1
  559. package/dist/cli/mcp/dispatch.js.map +0 -1
  560. package/dist/cli/mcp/stdio.js.map +0 -1
  561. package/dist/cli/paths.js.map +0 -1
  562. package/dist/cli/python/knowledge_ingest.js.map +0 -1
  563. package/dist/cli/python/workspace_analytics.js.map +0 -1
  564. package/dist/cli/python/workspace_crypto.js.map +0 -1
  565. package/dist/cli/python/workspace_documents.js.map +0 -1
  566. package/dist/cli/python/workspace_drive.js.map +0 -1
  567. package/dist/cli/python/workspace_drive_health.js.map +0 -1
  568. package/dist/cli/python/workspace_explain.js.map +0 -1
  569. package/dist/cli/python/workspace_hosts.js.map +0 -1
  570. package/dist/cli/python/workspace_inbox.js.map +0 -1
  571. package/dist/cli/python/workspace_render.js.map +0 -1
  572. package/dist/cli/python/workspace_roles.js.map +0 -1
  573. package/dist/cli/python/workspace_secrets.js.map +0 -1
  574. package/dist/cli/python/workspace_sessions.js.map +0 -1
  575. package/dist/cli/python/workspace_skills.js.map +0 -1
  576. package/dist/cli/registry.js.map +0 -1
  577. package/dist/install/agentSwitchDetection.js.map +0 -1
  578. package/dist/install/agentSwitchProfile.js.map +0 -1
  579. package/dist/install/atomic.js.map +0 -1
  580. package/dist/install/claudePathsPlan.js.map +0 -1
  581. package/dist/install/conflict.js.map +0 -1
  582. package/dist/install/detect.js.map +0 -1
  583. package/dist/install/emit_host_rules_cli.js.map +0 -1
  584. package/dist/install/globalRuleLayers.js.map +0 -1
  585. package/dist/install/hostLayerFingerprint.js.map +0 -1
  586. package/dist/install/partitionEligibility.js.map +0 -1
  587. package/dist/install/paths.js.map +0 -1
  588. package/dist/install/plan.js.map +0 -1
  589. package/dist/install/preflight.js.map +0 -1
  590. package/dist/install/rtkDetection.js.map +0 -1
  591. package/dist/install/ruleInScope.js.map +0 -1
  592. package/dist/install/ruleLayerPartition.js.map +0 -1
  593. package/dist/install/rule_scope.js.map +0 -1
  594. package/dist/install/rule_scope_cli.js.map +0 -1
  595. package/dist/install/selectedTools.js.map +0 -1
  596. package/dist/install/toolDetection.js.map +0 -1
  597. package/dist/install/txlog.js.map +0 -1
  598. package/dist/install/types.js.map +0 -1
  599. package/dist/install/wizard-plan.js.map +0 -1
  600. package/dist/install/wizardDismissals.js.map +0 -1
  601. package/dist/scripts/_lib/agent_settings.js.map +0 -1
  602. package/dist/scripts/_lib/agent_src.js.map +0 -1
  603. package/dist/scripts/_lib/claude_builtin_names.js.map +0 -1
  604. package/dist/scripts/_lib/claude_plugin.js.map +0 -1
  605. package/dist/scripts/_lib/claude_settings_hooks.js.map +0 -1
  606. package/dist/scripts/_lib/compile_time_toggles.js.map +0 -1
  607. package/dist/scripts/_lib/environment_detector.js.map +0 -1
  608. package/dist/scripts/_lib/host_launch.js.map +0 -1
  609. package/dist/scripts/_lib/install_layout.js.map +0 -1
  610. package/dist/scripts/_lib/installed_lock.js.map +0 -1
  611. package/dist/scripts/_lib/model_tier.js.map +0 -1
  612. package/dist/scripts/_lib/prune_empty_dirs.js.map +0 -1
  613. package/dist/scripts/_lib/scoped_projection.js.map +0 -1
  614. package/dist/scripts/_lib/script_output.js.map +0 -1
  615. package/dist/scripts/_lib/spawn_env.js.map +0 -1
  616. package/dist/scripts/_lib/surface_tiers.js.map +0 -1
  617. package/dist/scripts/_lib/token_count.js.map +0 -1
  618. package/dist/scripts/_lib/trigger_eval_floors.js.map +0 -1
  619. package/dist/scripts/_lib/user_global_paths.js.map +0 -1
  620. package/dist/scripts/ai_council/modes.js.map +0 -1
  621. package/dist/scripts/ai_council/transport_resolver.js.map +0 -1
  622. package/dist/scripts/condense.js.map +0 -1
  623. package/dist/scripts/project_thin_rules.js.map +0 -1
  624. package/dist/server/app.js.map +0 -1
  625. package/dist/server/io/atomicMultiWrite.js.map +0 -1
  626. package/dist/server/io/atomicWrite.js.map +0 -1
  627. package/dist/server/io/sharedWriteCheck.js.map +0 -1
  628. package/dist/server/io/substituteTemplate.js.map +0 -1
  629. package/dist/server/io/yamlIO.js.map +0 -1
  630. package/dist/server/nicknameResolver.js.map +0 -1
  631. package/dist/server/port.js.map +0 -1
  632. package/dist/server/routes/discovery.js.map +0 -1
  633. package/dist/server/routes/install.js.map +0 -1
  634. package/dist/server/routes/ping.js.map +0 -1
  635. package/dist/server/routes/schema.js.map +0 -1
  636. package/dist/server/routes/settings.js.map +0 -1
  637. package/dist/server/routes/settingsChanges.js.map +0 -1
  638. package/dist/server/routes/userMd.js.map +0 -1
  639. package/dist/server/routes/wizard.js.map +0 -1
  640. package/dist/server/routes/workspace.js.map +0 -1
  641. package/dist/server/schemas/settings.js.map +0 -1
  642. package/dist/server/serverInfo.js.map +0 -1
  643. package/dist/server/token.js.map +0 -1
  644. package/dist/server/writeRoot.js.map +0 -1
  645. package/dist/shared/capabilities.js.map +0 -1
  646. package/dist/shared/interactiveContext.js.map +0 -1
  647. package/dist/shared/nicknamePrefill.js.map +0 -1
  648. package/dist/shared/settingsAsks.js.map +0 -1
  649. package/dist/shared/settingsCarveOut.js.map +0 -1
  650. package/dist/shared/settingsClasses.js.map +0 -1
  651. package/dist/shared/settingsConsent.js.map +0 -1
  652. package/dist/shared/settingsSurface.js.map +0 -1
  653. package/dist/shared/userMd/formAdapter.js.map +0 -1
  654. package/dist/shared/userMd/schema.js.map +0 -1
  655. package/dist/shared/userMd/utils.js.map +0 -1
  656. package/dist/ui/assets/index-Cxgy63kz.js.map +0 -1
  657. package/src/scripts/_lib/adr_frontmatter.test.ts +0 -365
  658. package/src/scripts/_lib/adversarial_council_gate.test.ts +0 -112
  659. package/src/scripts/_lib/adversarial_reconcile.test.ts +0 -197
  660. package/src/scripts/_lib/auto_dispatch.corpus.test.ts +0 -150
  661. package/src/scripts/_lib/secret_detector.test.ts +0 -108
  662. package/src/scripts/_lib/secret_detector_adversarial.test.ts +0 -116
  663. package/src/scripts/_lib/untrusted_content.test.ts +0 -175
  664. package/src/scripts/check_secret_leak.test.ts +0 -90
  665. package/src/scripts/design_slop_rules.test.ts +0 -239
  666. package/src/scripts/self_review_gate.test.ts +0 -296
  667. package/src/shared/capabilities.test.ts +0 -43
@@ -0,0 +1,159 @@
1
+ ---
2
+ model_tier: medium
3
+ name: server-hardening
4
+ description: "Use when hardening a Linux host you operate — SSH posture, a default-deny firewall baseline, and unattended security upgrades, each verified on the box rather than assumed from a config file."
5
+ domain: devops
6
+ workspaces:
7
+ - engineering
8
+ packs:
9
+ - engineering-base
10
+ ---
11
+
12
+ # server-hardening
13
+
14
+ ## When to use
15
+
16
+ Use when a host is yours to operate — a VPS, a bare-metal box, a long-lived VM —
17
+ and its own security posture is the question. Three surfaces: who may log in, what
18
+ may reach the network, and how patches arrive.
19
+
20
+ Do NOT use when:
21
+ - The workload runs on a managed runtime with no host you control — there is no
22
+ host posture to set, and `operational-readiness` records that as `unavailable`
23
+ with that reason
24
+ - Auditing application code for vulnerabilities (use `security-audit`)
25
+ - Application-level auth and authorization (use `security`, `authz-review`)
26
+ - Provisioning cloud infrastructure (use `terraform`, `aws-infrastructure`)
27
+ - Container image hardening (use `docker`)
28
+
29
+ ## The three surfaces
30
+
31
+ ### 1. SSH posture
32
+
33
+ The one remote-entry door. Harden in this order, and **keep an open session while
34
+ you change it** — a mistake here locks you out of the machine you are fixing.
35
+
36
+ | Setting | Target | Why |
37
+ |---|---|---|
38
+ | `PasswordAuthentication` | `no` | Ends credential-stuffing against the host outright |
39
+ | `PubkeyAuthentication` | `yes` | The replacement must work before passwords are removed |
40
+ | `PermitRootLogin` | `no` (or `prohibit-password`) | Forces an audit trail through a named account |
41
+ | `AllowUsers` / `AllowGroups` | Explicit allow-list | Default is every account on the box |
42
+ | Port | Non-default is optional | Cuts log noise, not risk — never the primary control |
43
+
44
+ Verify from a **second** connection before closing the first:
45
+
46
+ ```bash
47
+ sudo sshd -t # config parses; do this before reload
48
+ sudo systemctl reload ssh # or sshd, per distro
49
+ sudo sshd -T | grep -Ei 'passwordauth|permitrootlogin|pubkeyauth'
50
+ ```
51
+
52
+ `sshd -T` prints the **effective** configuration. A file under
53
+ `sshd_config.d/` or a `Match` block can override what you just edited, so the
54
+ file you wrote is not evidence — the effective dump is.
55
+
56
+ ### 2. Firewall baseline
57
+
58
+ Default-deny inbound, allow-list outbound where the workload permits.
59
+
60
+ ```bash
61
+ sudo ufw default deny incoming
62
+ sudo ufw default allow outgoing
63
+ sudo ufw allow OpenSSH # before enabling, or you are locked out
64
+ sudo ufw enable
65
+ sudo ufw status verbose # the verification, not the intent
66
+ ```
67
+
68
+ Two traps worth naming. A container runtime can write its own forwarding rules
69
+ that bypass the host firewall entirely — check the actual rule table
70
+ (`sudo iptables -S` / `sudo nft list ruleset`), not just the friendly front-end.
71
+ And a cloud security group sits *in front* of the host: both must agree, and the
72
+ narrower one is the effective policy.
73
+
74
+ Optionally add an SSH brute-force throttle (`fail2ban` or equivalent). It is
75
+ noise reduction and a small real gain once password auth is already off — never
76
+ a substitute for it.
77
+
78
+ ### 3. Unattended security upgrades
79
+
80
+ Patches that require a human are patches that arrive late.
81
+
82
+ ```bash
83
+ sudo apt install unattended-upgrades # Debian/Ubuntu family
84
+ sudo dpkg-reconfigure -plow unattended-upgrades
85
+ sudo unattended-upgrade --dry-run --debug # proves it would act
86
+ ```
87
+
88
+ Decide and record two things, because the default is silence: whether the host
89
+ **reboots automatically** when a patch needs it, and where the **failure
90
+ notification** goes. An upgrade timer that has been failing for six weeks is
91
+ indistinguishable from one that is working, unless something reports it.
92
+
93
+ Security patches only. Automatic *feature* upgrades change behaviour under you,
94
+ which is a different risk with a different owner.
95
+
96
+ ## Procedure: Harden a host
97
+
98
+ 1. **Confirm the host is yours to harden.** Managed runtime with no shell → stop;
99
+ there is no posture here, and that is a recordable `unavailable`.
100
+ 2. **Open a second session and keep it open** for the whole SSH and firewall
101
+ work. This is the entire rollback mechanism.
102
+ 3. **Set the SSH posture**, then verify with `sshd -T` from the second session —
103
+ effective config, not the file.
104
+ 4. **Set the firewall baseline**, allowing SSH *before* enabling. Verify with
105
+ `ufw status verbose` and against the raw rule table.
106
+ 5. **Enable unattended security upgrades**, then prove with `--dry-run` that it
107
+ would act. Record the reboot policy and the failure destination.
108
+ 6. **Re-verify from a fresh connection.** Close every old session and reconnect.
109
+ A posture that only holds inside an already-authenticated session is
110
+ unverified.
111
+ 7. **Report each surface as met, unmet or uninspected.** Uninspected is not met —
112
+ `operational-readiness` reads an uninspected host posture as a red.
113
+
114
+ ### Validate
115
+
116
+ - Verify `sshd -T` reports `passwordauthentication no`.
117
+ - Verify `sshd -T` reports `permitrootlogin no` or `prohibit-password`.
118
+ - Verify a key-based login succeeds from a **fresh** connection.
119
+ - Verify the firewall default is deny-inbound and SSH is explicitly allowed.
120
+ - Verify the raw rule table agrees with the front-end.
121
+ - Verify `unattended-upgrade --dry-run` reports it would act.
122
+ - Confirm the reboot policy and the failure-notification destination are recorded.
123
+
124
+ ## Output format
125
+
126
+ 1. One row per surface — SSH, firewall, unattended upgrades — with met / unmet /
127
+ uninspected and the verifying command's output.
128
+ 2. The reboot policy and where upgrade failures are reported.
129
+ 3. Anything left unmet, with what would close it.
130
+
131
+ ## Gotcha
132
+
133
+ - Changing SSH without a second open session is how a host becomes unreachable.
134
+ - The config file is not the posture. `sshd -T` is; a drop-in or `Match` block
135
+ silently wins.
136
+ - Enabling a firewall before allowing SSH locks you out immediately.
137
+ - A container runtime's own rules can bypass the host firewall.
138
+ - A cloud security group and the host firewall must both allow a port; the
139
+ narrower wins.
140
+ - A silently failing upgrade timer looks exactly like a working one.
141
+ - A non-default SSH port reduces log volume, not risk.
142
+
143
+ ## Do NOT
144
+
145
+ - Do NOT disable password authentication before a key login is proven to work.
146
+ - Do NOT enable the firewall before allowing SSH.
147
+ - Do NOT enable automatic feature upgrades — security patches only.
148
+ - Do NOT treat an installed package as an enabled control; prove it acts.
149
+ - Do NOT report an uninspected surface as met.
150
+ - Do NOT rely on a non-default port as a control.
151
+
152
+ ## Auto-trigger keywords
153
+
154
+ - server hardening
155
+ - host hardening
156
+ - ssh hardening
157
+ - firewall baseline
158
+ - unattended upgrades
159
+ - fail2ban
@@ -3,6 +3,9 @@ model_tier: inherit
3
3
  name: skill-improvement-pipeline
4
4
  description: "Run the skill-improvement pipeline after a learning was detected — capture, classify, create, validate, apply; explicit request only."
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
@@ -4,6 +4,9 @@ name: skill-management
4
4
  description: "Use when condensing, decondenseing, refactoring, or improving existing skills. Covers the full skill lifecycle from verbose → sharp → maintained."
5
5
  source: project
6
6
  domain: process
7
+ scope:
8
+ write: []
9
+ 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."
7
10
  execution:
8
11
  type: assisted
9
12
  handler: internal
@@ -3,6 +3,9 @@ model_tier: high
3
3
  name: skill-reviewer
4
4
  description: "Use when reviewing, auditing, or optimizing skills — validates against the 7 Skill Killers checklist and produces fix recommendations."
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
@@ -229,6 +229,12 @@ to every skill you author.
229
229
  - Per the post-action summary suppression, the example output ships
230
230
  the artifact, not a wrapping `## Status` / `## Summary` block.
231
231
 
232
+ **Scope-exclusion clause.** A skill can shed assumed-knowledge prose without
233
+ losing correctness by naming what it does NOT cover: "this skill covers only
234
+ `<X>`; standard `<Y>` is assumed". One sentence replaces the paragraph that
235
+ would otherwise re-teach `<Y>`, and it is stronger than silence — a reader who
236
+ does not have `<Y>` learns that from the clause instead of from a wrong result.
237
+
232
238
  **Pre-save self-check:**
233
239
  1. Does any procedure step open with "Let me", "Now I will", "Found
234
240
  it", "OK", or "Alright"?
@@ -22,8 +22,9 @@ rule. Skip only on explicit *"just do it"* bypass or trivial edits
22
22
  ### 0b. Skill-growth gate (new skill only)
23
23
 
24
24
  The skill count keeps climbing; nothing forces *"should this be a new skill at
25
- all?"*. Before creating a **new** skill, answer these in the PR body — a new
26
- skill that cannot answer them is a merge / guideline / no-op in disguise:
25
+ all?"*. Before creating a **new** skill, answer these **in the ledger**,
26
+ `agents/decisions/skill-admissions.jsonl` — a new skill that cannot answer them
27
+ is a merge / guideline / no-op in disguise:
27
28
 
28
29
  1. **Family** — which capability family does it join? (engineering, product, …)
29
30
  2. **Capability** — what does it do that no existing skill does? Name the gap.
@@ -31,6 +32,27 @@ skill that cannot answer them is a merge / guideline / no-op in disguise:
31
32
  4. **Why not a guideline** — is this executable workflow (skill) or reference material (guideline)? Guideline-shaped content does not become a skill.
32
33
  5. **Visibility tier** — `core` or `lab`? Which pack?
33
34
 
35
+ **The answers go in the ledger, not in the PR body.** That used to say PR body,
36
+ and `check_finding_dispositions.ts:11` rejects that exact surface for findings in
37
+ its own words — a comment is *"mutable and unaudited; it is transport, not a
38
+ record"*. The consequence was measurable: **+8 skills landed in one release with
39
+ no visible "no"**, because a refusal kept in a PR body is a refusal nobody can
40
+ grep. One line, appended:
41
+
42
+ ```json
43
+ {"skill":"<name>","decision":"admitted","date":"YYYY-MM-DD","family":"…","capability":"…","why_not_extend":"…","why_not_a_guideline":"…","visibility":"…"}
44
+ ```
45
+
46
+ `check_skill_admissions` is forward-only: it requires a row only for skills added
47
+ since the base ref, so nothing existing needs backfilling. It rejects an answer
48
+ under 12 characters, because a one-word answer is the boilerplate the gate exists
49
+ to catch rather than an answer.
50
+
51
+ **A refusal is a row too**, and that is the half the PR body lost:
52
+ `{"skill":"…","decision":"rejected","date":"…","instead":"…"}`. A rejected row may
53
+ not name a skill that exists — a record saying a capability was refused while it
54
+ ships is worse than no record.
55
+
34
56
  **Surface overlap before deciding** — run `./scripts-run src/scripts/skill_overlap`
35
57
  (or `audit_skill_overlap`) and read the nearest matches; a high-overlap hit is a
36
58
  merge signal, not a green light. This gate is the authoring-time companion to the
@@ -11,6 +11,9 @@ trust:
11
11
  level: professional
12
12
  install:
13
13
  removable: true
14
+ scope:
15
+ write: []
16
+ 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."
14
17
  execution:
15
18
  type: manual
16
19
  ---
@@ -0,0 +1,203 @@
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
+ **"Opt-in" is about the agent connecting, not about installing.** A 2026-08-24
135
+ `npx storybook@latest init --yes` scaffold ships `@storybook/addon-mcp` *and*
136
+ `@storybook/addon-a11y` in `devDependencies` by default — recorded verbatim in
137
+ `tests/fixtures/stack/storybook-current/`, which is also the only source any
138
+ Storybook major stated here may come from (`storybook@^10.5.10`). So the addon
139
+ usually already exists; what stays optional is whether an agent reaches a
140
+ running instance. The same scaffold prints *"installed but is not entirely set
141
+ up yet"*, so its presence is not evidence the channel works.
142
+
143
+ When the project has `@storybook/addon-mcp` **and** a running Storybook,
144
+ [`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
146
+ hand-read inventory. **The live read wins; the file read is the fallback**, and the fallback
147
+ is never removed: an agent that cannot reach a running Storybook must still be able to
148
+ inventory the library.
149
+
150
+ **React-only while in preview.** Storybook's own MCP FAQ (docs 10.5) states the documentation
151
+ toolset supports React only during preview, so Vue, Angular, and Web Components take the
152
+ file-read path. Stated here rather than discovered at runtime.
153
+
154
+ Two operative rules, restated from Storybook's suggested agent instructions rather than
155
+ copied verbatim:
156
+
157
+ - **Never use an undocumented prop.** If the manifest does not carry it, it is not part of
158
+ the component's surface — reading it out of the implementation is how a private prop
159
+ becomes a de-facto API.
160
+ - **Fetch the story instructions before writing a story.** The project's own conventions
161
+ live there; writing first and reconciling later produces a story that matches nothing.
162
+
163
+ ## Output format
164
+
165
+ 1. Name the inventory source used — MCP or file read — and why.
166
+ 2. List the stories authored or changed, one line each, with their concept.
167
+ 3. Report the story-test result, and the a11y findings in the `(rule, selector, severity)`
168
+ shape.
169
+ 4. State explicitly what did not run (no browser tooling, no running Storybook, non-React
170
+ renderer).
171
+
172
+ ## Gotchas
173
+
174
+ - **`SizesAndVariants` looks efficient and destroys both jobs** — a human cannot attribute
175
+ the effect, and an agent cannot learn a single prop from it.
176
+ - **A truncated description reads as a complete one.** The manifest cuts the tail without
177
+ marking it, so a paragraph-long summary arrives as a confident fragment.
178
+ - **A stale story is worse than no story.** It props-drills values the component no longer
179
+ accepts and documents an API that does not exist; keep stories beside the component and
180
+ change them in the same commit.
181
+ - **An unrun a11y check reports zero violations** — the same number a clean run reports.
182
+ Say which one happened.
183
+ - **The MCP channel disappearing is normal**, not an error: no running Storybook is the
184
+ fallback's whole purpose.
185
+
186
+ ## Do NOT
187
+
188
+ - Do NOT combine two axes in one story.
189
+ - Do NOT ship a component export or a story without a `@summary`.
190
+ - Do NOT leave an anti-pattern or deprecated story untagged: it carries
191
+ `tags: ['!manifest']` so it is excluded from the manifest and the agent never learns from
192
+ it (Storybook's own tag mechanism for curating what the manifest exposes).
193
+ - Do NOT hardcode a preview theme in a story.
194
+ - Do NOT make the MCP channel required, and do NOT remove the file-read fallback.
195
+ - Do NOT report zero a11y violations when the a11y tooling did not run.
196
+
197
+ ## See also
198
+
199
+ - [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) — the React stack lane, and the `(rule, selector, severity)` shape § Validate writes into.
200
+ - [`existing-ui-audit`](../existing-ui-audit/SKILL.md) — the inventory the MCP path accelerates.
201
+ - [`js-library-packaging`](../js-library-packaging/SKILL.md) — the package around the workshop.
202
+ - [`accessibility-auditor`](../accessibility-auditor/SKILL.md) — the WCAG depth behind the a11y half.
203
+ - [`fe-design`](../fe-design/SKILL.md) § Component Architecture — the stack-agnostic isolate-and-document principle.
@@ -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