@event4u/agent-config 16.3.0 → 16.5.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 (532) 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 +178 -78
  5. package/README.md +2 -2
  6. package/agents/templates/.ai-council.yml.example +26 -8
  7. package/dist/agent-src/commands/analyze/inbox.md +10 -7
  8. package/dist/agent-src/commands/bug/investigate.md +1 -1
  9. package/dist/agent-src/commands/commit/in-chunks.md +40 -31
  10. package/dist/agent-src/commands/commit.md +72 -33
  11. package/dist/agent-src/commands/condense.md +2 -8
  12. package/dist/agent-src/commands/council/debate.md +11 -7
  13. package/dist/agent-src/commands/council/default.md +10 -9
  14. package/dist/agent-src/commands/council.md +1 -1
  15. package/dist/agent-src/commands/design.md +1 -1
  16. package/dist/agent-src/commands/estimate-ticket.md +1 -1
  17. package/dist/agent-src/commands/feature/explore.md +3 -3
  18. package/dist/agent-src/commands/feature/plan.md +1 -1
  19. package/dist/agent-src/commands/fix/ci.md +17 -3
  20. package/dist/agent-src/commands/fix/commit-messages.md +48 -23
  21. package/dist/agent-src/commands/fix/pr-comments.md +3 -6
  22. package/dist/agent-src/commands/implement-ticket.md +3 -3
  23. package/dist/agent-src/commands/memory/add.md +4 -16
  24. package/dist/agent-src/commands/memory/load.md +5 -6
  25. package/dist/agent-src/commands/memory/promote.md +3 -16
  26. package/dist/agent-src/commands/mission/upgrade.md +3 -2
  27. package/dist/agent-src/commands/optimize/agents-dir.md +2 -2
  28. package/dist/agent-src/commands/optimize/deep.md +4 -2
  29. package/dist/agent-src/commands/optimize/rtk.md +4 -26
  30. package/dist/agent-src/commands/pr/create/description-only.md +18 -15
  31. package/dist/agent-src/commands/pr/create.md +42 -34
  32. package/dist/agent-src/commands/pr/merge.md +136 -9
  33. package/dist/agent-src/commands/prepare-for-review.md +13 -11
  34. package/dist/agent-src/commands/project/analyze.md +7 -35
  35. package/dist/agent-src/commands/refine-ticket.md +1 -1
  36. package/dist/agent-src/commands/review/changes.md +14 -19
  37. package/dist/agent-src/commands/roadmap/next.md +10 -1
  38. package/dist/agent-src/commands/roadmap/process-full.md +52 -38
  39. package/dist/agent-src/commands/roadmap/resolve-blockers.md +64 -14
  40. package/dist/agent-src/commands/worktree/create.md +7 -3
  41. package/dist/agent-src/commands/worktree/verify.md +2 -1
  42. package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +5 -3
  43. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +7 -9
  44. package/dist/agent-src/contexts/contracts/command-suggestion-flow.md +8 -6
  45. package/dist/agent-src/contexts/contracts/frugality-charter.md +8 -5
  46. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +1 -1
  47. package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +0 -1
  48. package/dist/agent-src/contexts/execution/evidence-discipline.md +2 -2
  49. package/dist/agent-src/contexts/execution/non-interactive-contract.md +5 -8
  50. package/dist/agent-src/contexts/execution/rdp-gate.md +4 -4
  51. package/dist/agent-src/contexts/execution/roadmap-execution-contract.md +9 -8
  52. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +67 -52
  53. package/dist/agent-src/contexts/execution/subagent-routing.md +8 -8
  54. package/dist/agent-src/contexts/execution/subagent-steering.md +6 -4
  55. package/dist/agent-src/contexts/execution/terminal-states.md +2 -2
  56. package/dist/agent-src/contexts/execution/toolchain-resolver.md +4 -10
  57. package/dist/agent-src/contexts/subagent-configuration.md +1 -1
  58. package/dist/agent-src/guidelines/agent-infra/active-remediation-mechanics.md +39 -0
  59. package/dist/agent-src/guidelines/agent-infra/context-hygiene-mechanics.md +1 -1
  60. package/dist/agent-src/guidelines/agent-infra/cross-source-consistency-mechanics.md +8 -10
  61. package/dist/agent-src/guidelines/agent-infra/frontier-reasoning-operating-profile.md +3 -2
  62. package/dist/agent-src/guidelines/agent-infra/layered-settings.md +13 -1
  63. package/dist/agent-src/guidelines/agent-infra/roadmap-progress-mechanics.md +1 -1
  64. package/dist/agent-src/guidelines/agent-infra/self-improvement-pipeline.md +10 -3
  65. package/dist/agent-src/guidelines/agent-infra/size-and-scope.md +36 -0
  66. package/dist/agent-src/guidelines/design-antipatterns.md +1 -1
  67. package/dist/agent-src/guidelines/php/git.md +15 -2
  68. package/dist/agent-src/rules/active-remediation.md +0 -1
  69. package/dist/agent-src/rules/analysis-skill-routing.md +0 -1
  70. package/dist/agent-src/rules/architecture.md +0 -1
  71. package/dist/agent-src/rules/artifact-drafting-protocol.md +0 -1
  72. package/dist/agent-src/rules/artifact-engagement-recording.md +0 -1
  73. package/dist/agent-src/rules/augment-edit-discipline.md +0 -1
  74. package/dist/agent-src/rules/autonomous-execution.md +0 -1
  75. package/dist/agent-src/rules/brand-consistency.md +0 -1
  76. package/dist/agent-src/rules/brand-source-of-truth.md +0 -1
  77. package/dist/agent-src/rules/broken-access-control.md +0 -1
  78. package/dist/agent-src/rules/cli-output-handling.md +0 -1
  79. package/dist/agent-src/rules/code-comment-discipline.md +0 -1
  80. package/dist/agent-src/rules/code-provenance.md +0 -1
  81. package/dist/agent-src/rules/command-suggestion-policy.md +0 -1
  82. package/dist/agent-src/rules/commit-conventions.md +1 -2
  83. package/dist/agent-src/rules/communication-through-line.md +1 -2
  84. package/dist/agent-src/rules/content-quoting-floor.md +1 -2
  85. package/dist/agent-src/rules/context-hygiene.md +5 -5
  86. package/dist/agent-src/rules/copilot-routing.md +1 -2
  87. package/dist/agent-src/rules/council-availability.md +4 -4
  88. package/dist/agent-src/rules/cross-source-consistency.md +4 -6
  89. package/dist/agent-src/rules/decision-revisit-gate.md +2 -3
  90. package/dist/agent-src/rules/delegation-policy.md +2 -3
  91. package/dist/agent-src/rules/design-fidelity.md +0 -1
  92. package/dist/agent-src/rules/design-review-after-ui-write.md +3 -3
  93. package/dist/agent-src/rules/devcontainer-routing.md +1 -2
  94. package/dist/agent-src/rules/doc-screenshot-hygiene.md +0 -1
  95. package/dist/agent-src/rules/docker-commands.md +0 -1
  96. package/dist/agent-src/rules/domain-adoption-policy.md +0 -1
  97. package/dist/agent-src/rules/domain-safety-disclaimer.md +0 -1
  98. package/dist/agent-src/rules/domain-safety-pii.md +0 -1
  99. package/dist/agent-src/rules/domain-safety-retention.md +0 -1
  100. package/dist/agent-src/rules/downstream-changes.md +0 -1
  101. package/dist/agent-src/rules/engineering-safety-floor.md +0 -1
  102. package/dist/agent-src/rules/external-code-graph-interop.md +0 -1
  103. package/dist/agent-src/rules/external-reference-deep-dive.md +0 -1
  104. package/dist/agent-src/rules/fast-path-marker-visibility.md +1 -2
  105. package/dist/agent-src/rules/finance-safety-floor.md +0 -1
  106. package/dist/agent-src/rules/fix-what-you-see.md +6 -32
  107. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +0 -1
  108. package/dist/agent-src/rules/git-history-discipline.md +1 -2
  109. package/dist/agent-src/rules/guidelines.md +0 -1
  110. package/dist/agent-src/rules/history-discipline.md +0 -1
  111. package/dist/agent-src/rules/icon-consistency.md +0 -1
  112. package/dist/agent-src/rules/image-likeness-and-rights.md +0 -1
  113. package/dist/agent-src/rules/improve-before-implement.md +0 -1
  114. package/dist/agent-src/rules/invite-challenge.md +0 -1
  115. package/dist/agent-src/rules/laravel-routing.md +1 -2
  116. package/dist/agent-src/rules/laravel-translations.md +0 -1
  117. package/dist/agent-src/rules/legal-safety-floor.md +0 -1
  118. package/dist/agent-src/rules/lethal-trifecta-guard.md +0 -1
  119. package/dist/agent-src/rules/linked-projects-onboarding-gate.md +0 -1
  120. package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +0 -1
  121. package/dist/agent-src/rules/markdown-safe-codeblocks.md +0 -1
  122. package/dist/agent-src/rules/media-governance-routing.md +1 -2
  123. package/dist/agent-src/rules/media-sync-ground-truth.md +0 -1
  124. package/dist/agent-src/rules/minimal-safe-diff.md +0 -1
  125. package/dist/agent-src/rules/missing-skill-recovery.md +0 -1
  126. package/dist/agent-src/rules/missing-tool-handling.md +0 -1
  127. package/dist/agent-src/rules/model-recommendation.md +0 -1
  128. package/dist/agent-src/rules/neighbour-precedence.md +64 -0
  129. package/dist/agent-src/rules/no-attribution-footers.md +0 -1
  130. package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +0 -1
  131. package/dist/agent-src/rules/no-pr-progress-comments.md +0 -1
  132. package/dist/agent-src/rules/no-roadmap-references.md +0 -1
  133. package/dist/agent-src/rules/notes-first-reasoning.md +0 -1
  134. package/dist/agent-src/rules/onboarding-gate.md +0 -1
  135. package/dist/agent-src/rules/output-discipline.md +0 -1
  136. package/dist/agent-src/rules/package-ci-checks.md +0 -1
  137. package/dist/agent-src/rules/persona-governance.md +2 -3
  138. package/dist/agent-src/rules/php-coding.md +0 -1
  139. package/dist/agent-src/rules/prefer-enums-over-literals.md +0 -1
  140. package/dist/agent-src/rules/preservation-guard.md +0 -1
  141. package/dist/agent-src/rules/provider-lifecycle-discipline.md +2 -3
  142. package/dist/agent-src/rules/question-not-instruction.md +0 -1
  143. package/dist/agent-src/rules/reviewer-awareness.md +0 -1
  144. package/dist/agent-src/rules/roadmap-ci-steps-policy.md +0 -1
  145. package/dist/agent-src/rules/roadmap-progress-sync.md +3 -6
  146. package/dist/agent-src/rules/role-mode-adherence.md +0 -1
  147. package/dist/agent-src/rules/rule-type-governance.md +0 -1
  148. package/dist/agent-src/rules/runtime-safety.md +0 -1
  149. package/dist/agent-src/rules/scale-discipline.md +0 -1
  150. package/dist/agent-src/rules/secret-vcs-guard.md +0 -1
  151. package/dist/agent-src/rules/security-sensitive-stop.md +0 -1
  152. package/dist/agent-src/rules/self-repair-loop.md +0 -1
  153. package/dist/agent-src/rules/senior-engineering-discipline.md +0 -1
  154. package/dist/agent-src/rules/session-canary.md +0 -1
  155. package/dist/agent-src/rules/settings-ask-protocol.md +5 -6
  156. package/dist/agent-src/rules/size-enforcement.md +0 -1
  157. package/dist/agent-src/rules/skill-improvement-trigger.md +2 -3
  158. package/dist/agent-src/rules/skill-quality.md +0 -1
  159. package/dist/agent-src/rules/slash-command-routing-policy.md +0 -1
  160. package/dist/agent-src/rules/source-confidentiality.md +0 -1
  161. package/dist/agent-src/rules/source-discovery-gate.md +0 -1
  162. package/dist/agent-src/rules/source-of-truth.md +0 -1
  163. package/dist/agent-src/rules/spreadsheet-source-quality.md +1 -2
  164. package/dist/agent-src/rules/strategy-safety-floor.md +0 -1
  165. package/dist/agent-src/rules/symfony-routing.md +1 -2
  166. package/dist/agent-src/rules/think-before-action.md +0 -1
  167. package/dist/agent-src/rules/token-budget-discipline.md +14 -48
  168. package/dist/agent-src/rules/token-efficiency.md +0 -1
  169. package/dist/agent-src/rules/token-optimizer-maintenance.md +0 -1
  170. package/dist/agent-src/rules/tool-safety.md +0 -1
  171. package/dist/agent-src/rules/ui-audit-gate.md +1 -2
  172. package/dist/agent-src/rules/untrusted-input-defense.md +0 -1
  173. package/dist/agent-src/rules/upstream-proposal.md +0 -1
  174. package/dist/agent-src/rules/user-interaction.md +0 -1
  175. package/dist/agent-src/rules/user-interrupt-priority.md +0 -1
  176. package/dist/agent-src/scripts/gate_budget.ts +47 -23
  177. package/dist/agent-src/scripts/gate_execute.ts +12 -4
  178. package/dist/agent-src/skills/accessibility-auditor/data/aria-patterns.csv +2 -0
  179. package/dist/agent-src/skills/accessibility-auditor/data/manifest.json +3 -3
  180. package/dist/agent-src/skills/ai-council/SKILL.md +7 -4
  181. package/dist/agent-src/skills/ai-council/references/cost-and-redaction.md +21 -11
  182. package/dist/agent-src/skills/ai-council/references/procedure.md +12 -6
  183. package/dist/agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
  184. package/dist/agent-src/skills/bug-analyzer/SKILL.md +1 -1
  185. package/dist/agent-src/skills/canvas-design/SKILL.md +4 -2
  186. package/dist/agent-src/skills/command-routing/SKILL.md +3 -4
  187. package/dist/agent-src/skills/conventional-commits-writing/SKILL.md +127 -139
  188. package/dist/agent-src/skills/corpus-grounding/ATTRIBUTION.md +39 -0
  189. package/dist/agent-src/skills/corpus-grounding/SKILL.md +8 -2
  190. package/dist/agent-src/skills/database/data/manifest.json +2 -2
  191. package/dist/agent-src/skills/database/data/query-tuning.csv +13 -13
  192. package/dist/agent-src/skills/design-intelligence/references/integration-mapping.md +13 -10
  193. package/dist/agent-src/skills/design-system-capture/SKILL.md +0 -3
  194. package/dist/agent-src/skills/estimate-ticket/SKILL.md +1 -1
  195. package/dist/agent-src/skills/fe-design/references/design-patterns.md +49 -2
  196. package/dist/agent-src/skills/feature-planning/SKILL.md +1 -1
  197. package/dist/agent-src/skills/frontend-render-security/SKILL.md +9 -0
  198. package/dist/agent-src/skills/git-workflow/SKILL.md +44 -44
  199. package/dist/agent-src/skills/git-workflow/references/branch-update.md +312 -0
  200. package/dist/agent-src/skills/git-workflow/references/commit-subject.md +205 -0
  201. package/dist/agent-src/skills/iconography/SKILL.md +4 -2
  202. package/dist/agent-src/skills/image-provider-routing/SKILL.md +16 -5
  203. package/dist/agent-src/skills/jira-integration/SKILL.md +3 -3
  204. package/dist/agent-src/skills/logo-generation/SKILL.md +12 -8
  205. package/dist/agent-src/skills/merge-conflicts/SKILL.md +10 -4
  206. package/dist/agent-src/skills/po-discovery/SKILL.md +1 -1
  207. package/dist/agent-src/skills/refine-ticket/SKILL.md +4 -4
  208. package/dist/agent-src/skills/roadmap-writing/SKILL.md +2 -2
  209. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +4 -2
  210. package/dist/agent-src/skills/source-discovery/SKILL.md +1 -1
  211. package/dist/agent-src/skills/svg-authoring/SKILL.md +318 -0
  212. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +3 -1
  213. package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +1 -1
  214. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +1 -1
  215. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +2 -2
  216. package/dist/agent-src/skills/wireframe/SKILL.md +5 -2
  217. package/dist/agent-src/templates/AGENTS.md +1 -1
  218. package/dist/agent-src/templates/agent-settings.md +46 -129
  219. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +3 -3
  220. package/dist/agent-src/templates/command.md +2 -2
  221. package/dist/agent-src/templates/roadmaps.md +6 -1
  222. package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +0 -6
  223. package/dist/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +11 -7
  224. package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/decision_trace.ts +3 -2
  225. package/dist/agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.ts +2 -1
  226. package/dist/agent-src/templates/scripts/work_engine/hooks/settings.ts +0 -6
  227. package/dist/agent-src/templates/scripts/work_engine/scoring/decision_engine.ts +9 -12
  228. package/dist/agent-src/templates/scripts/work_engine/scoring/memory_visibility.ts +2 -1
  229. package/dist/agent-src/templates/skill.md +1 -1
  230. package/dist/cli/commands/uiRender.js +201 -4
  231. package/dist/cli/commands/uiRenderAsset.js +1308 -0
  232. package/dist/cli/commands/uiRenderAssetCompare.js +752 -0
  233. package/dist/cli/commands/uiRenderAssetGrid.js +265 -0
  234. package/dist/cli/commands/uiRenderAssetGrounds.js +323 -0
  235. package/dist/cli/commands/uiRenderAssetIsolation.js +85 -0
  236. package/dist/cli/commands/uiRenderAssetTypes.js +145 -0
  237. package/dist/cli/main.js +47 -1
  238. package/dist/cli/registry.js +2 -1
  239. package/dist/cli-delegate/check_update_banner.js +195 -119
  240. package/dist/cli-delegate/{chunk-S4UMZNES.js → chunk-4DBG5K7M.js} +5 -5
  241. package/dist/cli-delegate/{chunk-TRI6DQZ6.js → chunk-5GPULQBE.js} +60 -42
  242. package/dist/cli-delegate/{chunk-JQVYKIZA.js → chunk-6SRJTYJS.js} +33 -177
  243. package/dist/cli-delegate/chunk-6V5FMA3P.js +186 -0
  244. package/dist/cli-delegate/chunk-6YQC2HLF.js +415 -0
  245. package/dist/cli-delegate/{chunk-E4XIZDIB.js → chunk-7HKRE54K.js} +1 -64
  246. package/dist/cli-delegate/{chunk-7HQ52DHU.js → chunk-AL3RZ22D.js} +1 -1
  247. package/dist/cli-delegate/{chunk-DBH4AHDK.js → chunk-ED7KCMLB.js} +9 -11
  248. package/dist/cli-delegate/{chunk-NXEILF2K.js → chunk-F3QDG2GT.js} +481 -72
  249. package/dist/cli-delegate/{chunk-CQWX336L.js → chunk-G5VVIZRC.js} +3 -3
  250. package/dist/cli-delegate/{chunk-JY2I2DXV.js → chunk-H76PHZBI.js} +137 -60
  251. package/dist/cli-delegate/chunk-IAYTIIQW.js +67 -0
  252. package/dist/cli-delegate/{chunk-LIYTLH6O.js → chunk-KXXWJTDO.js} +5 -10
  253. package/dist/cli-delegate/{chunk-T7L2QK3K.js → chunk-LQOCRFWT.js} +1 -1
  254. package/dist/cli-delegate/{chunk-S4YWNRKO.js → chunk-MDPPKQCQ.js} +34 -1
  255. package/dist/cli-delegate/chunk-OAFSJBHH.js +272 -0
  256. package/dist/cli-delegate/{chunk-GKE7ZVFA.js → chunk-PWX7CKMD.js} +1 -1
  257. package/dist/cli-delegate/{chunk-NDJLNC6Q.js → chunk-T6BP34WI.js} +1 -0
  258. package/dist/cli-delegate/{chunk-RQNNW7IF.js → chunk-T7XSJSUQ.js} +433 -632
  259. package/dist/cli-delegate/{chunk-NQ7WT43P.js → chunk-TMWYUOK4.js} +75 -12
  260. package/dist/cli-delegate/{chunk-EEHDXSYD.js → chunk-WQWXGIWB.js} +12 -273
  261. package/dist/cli-delegate/{chunk-QLDHIPWR.js → chunk-XQTPXKFA.js} +1 -1
  262. package/dist/cli-delegate/cmd_analyze_session.js +223 -43
  263. package/dist/cli-delegate/cmd_brand_status.js +3 -2
  264. package/dist/cli-delegate/cmd_conformance.js +489 -238
  265. package/dist/cli-delegate/cmd_converge.js +3 -3
  266. package/dist/cli-delegate/cmd_doctor.js +15 -12
  267. package/dist/cli-delegate/cmd_doctor_neighbours.js +11 -4
  268. package/dist/cli-delegate/cmd_explain.js +43 -19
  269. package/dist/cli-delegate/cmd_export.js +10 -10
  270. package/dist/cli-delegate/cmd_git_convention.js +1851 -0
  271. package/dist/cli-delegate/cmd_handoff.js +40 -21
  272. package/dist/cli-delegate/cmd_mcp_available.js +3 -2
  273. package/dist/cli-delegate/cmd_migrate.js +3 -3
  274. package/dist/cli-delegate/cmd_packs_active.js +4 -3
  275. package/dist/cli-delegate/cmd_prune.js +10 -10
  276. package/dist/cli-delegate/cmd_route_audit.js +7 -7
  277. package/dist/cli-delegate/cmd_route_explain.js +5 -5
  278. package/dist/cli-delegate/cmd_session_recycle.js +9 -7
  279. package/dist/cli-delegate/cmd_settings_check.js +54 -7
  280. package/dist/cli-delegate/cmd_settings_get.js +18 -8
  281. package/dist/cli-delegate/cmd_settings_migrate.js +10 -10
  282. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  283. package/dist/cli-delegate/cmd_sync.js +10 -10
  284. package/dist/cli-delegate/cmd_uninstall.js +10 -10
  285. package/dist/cli-delegate/cmd_update.js +7 -7
  286. package/dist/cli-delegate/cmd_upgrade.js +7 -7
  287. package/dist/cli-delegate/cmd_validate.js +10 -10
  288. package/dist/cli-delegate/cmd_versions.js +5 -5
  289. package/dist/cli-delegate/gate_budget.js +1 -1
  290. package/dist/cli-delegate/gate_execute.js +2 -2
  291. package/dist/cli-delegate/roadmap_gates.js +2 -2
  292. package/dist/discovery/deprecation-report.md +1 -1
  293. package/dist/discovery/discovery-manifest.json +171 -107
  294. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  295. package/dist/discovery/discovery-manifest.summary.md +7 -7
  296. package/dist/discovery/dormancy-report.md +1 -1
  297. package/dist/discovery/orphan-report.md +1 -1
  298. package/dist/discovery/packs.json +41 -22
  299. package/dist/discovery/trust-report.md +3 -3
  300. package/dist/discovery/workspaces.json +16 -11
  301. package/dist/hooks/dispatch.js +2520 -1924
  302. package/dist/hooks/dispatch.sha256 +1 -1
  303. package/dist/hooks/svg_rules.chunk.cjs +1626 -0
  304. package/dist/hooks/svg_rules.chunk.cjs.sha256 +1 -0
  305. package/dist/install/install.mjs +462 -431
  306. package/dist/install/installThinLayer.js +40 -12
  307. package/dist/install/installedRuleLinks.js +105 -19
  308. package/dist/mcp/awesome-mcp-servers.row.md +1 -1
  309. package/dist/mcp/mcp-cloudflare-catalogue.json +2 -2
  310. package/dist/mcp/registry-manifest.json +5 -5
  311. package/dist/mcp/server.json +2 -2
  312. package/dist/mcp/server.mjs +3063 -2160
  313. package/dist/router.json +1 -1
  314. package/dist/scripts/_lib/agent_settings.js +15 -120
  315. package/dist/scripts/_lib/compile_time_toggles.js +12 -21
  316. package/dist/scripts/_lib/git_convention.js +232 -0
  317. package/dist/scripts/_lib/global_deploy_inventory.js +730 -0
  318. package/dist/scripts/_lib/installed_layer.js +344 -18
  319. package/dist/scripts/_lib/package_root.js +68 -0
  320. package/dist/scripts/_lib/rule_law_section.js +1 -1
  321. package/dist/scripts/_lib/scan_scope.js +105 -0
  322. package/dist/scripts/_lib/settings_removed_keys.js +168 -0
  323. package/dist/scripts/_lib/svg_dom.js +284 -0
  324. package/dist/scripts/_lib/svg_geometry.js +477 -0
  325. package/dist/scripts/_lib/svg_motion.js +179 -0
  326. package/dist/scripts/_lib/svg_rules.js +1337 -0
  327. package/dist/scripts/_lib/svg_urls.js +67 -0
  328. package/dist/scripts/_lib/thin_rules.js +80 -3
  329. package/dist/scripts/lint_svg_asset.js +324 -0
  330. package/dist/server/app.js +2 -1
  331. package/dist/server/gitKeysGate.js +105 -0
  332. package/dist/server/routes/settings.js +67 -8
  333. package/dist/server/routes/wizard.js +4 -0
  334. package/dist/server/schemas/settings.js +23 -81
  335. package/dist/shared/skillRanking.js +30 -4
  336. package/dist/ui/assets/{index-Cwq4d0hX.js → index-C3djEJah.js} +2 -2
  337. package/dist/ui/index.html +1 -1
  338. package/docs/MIGRATION.md +72 -1
  339. package/docs/contracts/settings-classes.md +35 -65
  340. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +39 -0
  341. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +1 -1
  342. package/docs/guidelines/agent-infra/cross-source-consistency-mechanics.md +8 -10
  343. package/docs/guidelines/agent-infra/frontier-reasoning-operating-profile.md +3 -2
  344. package/docs/guidelines/agent-infra/layered-settings.md +13 -1
  345. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +1 -1
  346. package/docs/guidelines/agent-infra/self-improvement-pipeline.md +10 -3
  347. package/docs/guidelines/agent-infra/size-and-scope.md +36 -0
  348. package/docs/guidelines/design-antipatterns.md +1 -1
  349. package/docs/guidelines/php/git.md +15 -2
  350. package/package.json +4 -3
  351. package/src/agent-src/scripts/gate_budget.ts +47 -23
  352. package/src/agent-src/scripts/gate_execute.ts +12 -4
  353. package/src/agent-src/templates/AGENTS.md +1 -1
  354. package/src/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +0 -6
  355. package/src/agent-src/templates/scripts/work_engine/directives/backend/_self_fix.ts +11 -7
  356. package/src/agent-src/templates/scripts/work_engine/hooks/builtin/decision_trace.ts +3 -2
  357. package/src/agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.ts +2 -1
  358. package/src/agent-src/templates/scripts/work_engine/hooks/settings.ts +0 -6
  359. package/src/agent-src/templates/scripts/work_engine/scoring/decision_engine.ts +9 -12
  360. package/src/agent-src/templates/scripts/work_engine/scoring/memory_visibility.ts +2 -1
  361. package/src/config/agent-settings.template.yml +79 -312
  362. package/src/config/agents-paths.yml +16 -0
  363. package/src/config/assurance-capability-registry.json +7 -3
  364. package/src/config/ci-local-parity.yml +3 -0
  365. package/src/config/continuity-surface.json +3 -3
  366. package/src/config/discovery/packs.yml +17 -1
  367. package/src/config/evaluator-budgets.json +19 -6
  368. package/src/config/gate-coverage.yml +65 -23
  369. package/src/config/gate-violation-baselines.json +56 -16
  370. package/src/config/gitignore-block.txt +19 -0
  371. package/src/config/hook-bundle-budget.json +1 -1
  372. package/src/config/release-gate-locality.yml +2 -1
  373. package/src/config/routing-coverage-seed.json +55 -6
  374. package/src/config/rule-law-ceilings.json +12 -6
  375. package/src/config/rule-obligations.json +833 -0
  376. package/src/install/installThinLayer.ts +76 -10
  377. package/src/install/installedRuleLinks.ts +105 -17
  378. package/src/scripts/_cli/cmd_analyze_session.ts +9 -15
  379. package/src/scripts/_cli/cmd_conformance.ts +13 -2
  380. package/src/scripts/_cli/cmd_doctor.ts +10 -10
  381. package/src/scripts/_cli/cmd_doctor_neighbours.ts +133 -0
  382. package/src/scripts/_cli/cmd_explain.ts +72 -14
  383. package/src/scripts/_cli/cmd_git_convention.ts +637 -0
  384. package/src/scripts/_cli/cmd_settings_check.ts +66 -8
  385. package/src/scripts/_cli/cmd_settings_get.ts +18 -3
  386. package/src/scripts/_cli/doctor_execution.ts +72 -1
  387. package/src/scripts/_dispatch.bash +37 -2
  388. package/src/scripts/_lib/agent_settings.ts +15 -124
  389. package/src/scripts/_lib/blocked_by_marker.ts +1 -1
  390. package/src/scripts/_lib/compile_time_toggles.ts +12 -21
  391. package/src/scripts/_lib/dispatch_import_closure.ts +163 -0
  392. package/src/scripts/_lib/git_base_ref.ts +92 -0
  393. package/src/scripts/_lib/git_convention.ts +291 -0
  394. package/src/scripts/_lib/git_convention_carrier.ts +389 -0
  395. package/src/scripts/_lib/git_convention_grammar.ts +246 -0
  396. package/src/scripts/_lib/git_convention_measure.ts +344 -0
  397. package/src/scripts/_lib/global_deploy_inventory.ts +74 -0
  398. package/src/scripts/_lib/graph_feeder_record.ts +236 -13
  399. package/src/scripts/_lib/installed_layer.ts +448 -23
  400. package/src/scripts/_lib/knowledge_global.ts +14 -1
  401. package/src/scripts/_lib/module_reach.ts +456 -0
  402. package/src/scripts/_lib/neighbour_contradictions.ts +236 -0
  403. package/src/scripts/_lib/neighbour_tool_use.ts +8 -10
  404. package/src/scripts/_lib/ratification_artifact.ts +220 -1
  405. package/src/scripts/_lib/ratification_subject.ts +92 -0
  406. package/src/scripts/_lib/release_findings_ingest.ts +15 -7
  407. package/src/scripts/_lib/release_highlights.ts +5 -0
  408. package/src/scripts/_lib/rule_law_section.ts +1 -1
  409. package/src/scripts/_lib/rule_obligations.ts +205 -0
  410. package/src/scripts/_lib/self_repair.ts +1 -1
  411. package/src/scripts/_lib/settings_removed_keys.ts +173 -0
  412. package/src/scripts/_lib/svg_dom.ts +318 -0
  413. package/src/scripts/_lib/svg_geometry.ts +480 -0
  414. package/src/scripts/_lib/svg_motion.ts +208 -0
  415. package/src/scripts/_lib/svg_rules.ts +1453 -0
  416. package/src/scripts/_lib/svg_urls.ts +72 -0
  417. package/src/scripts/_lib/test_red_state.ts +5 -0
  418. package/src/scripts/_lib/thin_rules.ts +83 -3
  419. package/src/scripts/_lib/touched_file_quality.ts +142 -6
  420. package/src/scripts/_lib/verification_command.ts +59 -0
  421. package/src/scripts/_lib/verify_clause.ts +27 -17
  422. package/src/scripts/_lib/worker_budget.ts +1 -1
  423. package/src/scripts/adr/regenerate_index.ts +16 -1
  424. package/src/scripts/ai_council/config.ts +7 -7
  425. package/src/scripts/ai_council/modification_review.ts +100 -0
  426. package/src/scripts/ai_council/modification_review_questions.ts +90 -0
  427. package/src/scripts/ai_council/orchestrator.ts +5 -5
  428. package/src/scripts/ai_council/spend_gate.ts +18 -7
  429. package/src/scripts/ai_team/config.ts +11 -16
  430. package/src/scripts/audit_user_type_axis.ts +20 -8
  431. package/src/scripts/bench_ab_clone.ts +1 -2
  432. package/src/scripts/bench_concern_spawn_path.ts +129 -0
  433. package/src/scripts/bench_graph_feeder_latency.ts +584 -0
  434. package/src/scripts/check_agent_artifact_location.ts +36 -0
  435. package/src/scripts/check_branch_freshness.ts +147 -24
  436. package/src/scripts/check_enforcement_coverage.ts +130 -0
  437. package/src/scripts/check_evaluator_budgets.ts +4 -0
  438. package/src/scripts/check_finding_dispositions.ts +88 -25
  439. package/src/scripts/check_gate_coverage.ts +4 -3
  440. package/src/scripts/check_gate_reachability.ts +48 -1
  441. package/src/scripts/check_generator_sync.ts +48 -0
  442. package/src/scripts/check_hook_bundle_composition.ts +107 -0
  443. package/src/scripts/check_kernel_edit_ratified.ts +86 -6
  444. package/src/scripts/check_pack_size.ts +1 -1
  445. package/src/scripts/check_release_manifest_content.ts +189 -0
  446. package/src/scripts/check_standing_rule_delivery.ts +96 -0
  447. package/src/scripts/check_suppression_hygiene.ts +2 -5
  448. package/src/scripts/ci_settle.ts +42 -5
  449. package/src/scripts/classify_merge_risk.ts +320 -0
  450. package/src/scripts/closure_scan.ts +91 -1
  451. package/src/scripts/command_suggester/settings.ts +8 -108
  452. package/src/scripts/command_suggester/types.ts +4 -5
  453. package/src/scripts/consumer_matrix.ts +102 -0
  454. package/src/scripts/context_hygiene_hook.ts +13 -23
  455. package/src/scripts/cost/preflight.mjs +12 -1
  456. package/src/scripts/council_cli.ts +7 -7
  457. package/src/scripts/dispatch_r2_reviewer.ts +24 -11
  458. package/src/scripts/explain_run.ts +8 -13
  459. package/src/scripts/generate_git_convention_grammar.ts +127 -0
  460. package/src/scripts/generate_host_cost_table.ts +20 -3
  461. package/src/scripts/handoff_context_hook.ts +86 -37
  462. package/src/scripts/hook_manifest.json +1 -1
  463. package/src/scripts/hook_manifest.yaml +25 -6
  464. package/src/scripts/hooks/block_config_weakening.ts +48 -5
  465. package/src/scripts/hooks/block_plumbing_writes.ts +8 -4
  466. package/src/scripts/hooks/block_speaking_inbox_dir.ts +16 -1
  467. package/src/scripts/hooks/concern_registry.ts +2 -0
  468. package/src/scripts/hooks/delegation_nudge_hook.ts +2 -3
  469. package/src/scripts/hooks/design_pass_hook.ts +157 -3
  470. package/src/scripts/hooks/evidence_independence.ts +12 -4
  471. package/src/scripts/hooks/mcp_usage_observation_hook.ts +121 -0
  472. package/src/scripts/hooks/push_settle_hook.ts +4 -3
  473. package/src/scripts/hooks/rule_inject_hook.ts +44 -3
  474. package/src/scripts/hooks/state_io.ts +8 -4
  475. package/src/scripts/hooks/svg_obligation.ts +497 -0
  476. package/src/scripts/hooks/svg_rules_loader.ts +133 -0
  477. package/src/scripts/hooks/telemetry_usage_hook.ts +7 -46
  478. package/src/scripts/hooks/turn_end_gate_hook.ts +6 -3
  479. package/src/scripts/install-hooks.sh +42 -14
  480. package/src/scripts/install.ts +7 -31
  481. package/src/scripts/lint_blocker_citations.ts +198 -0
  482. package/src/scripts/lint_consolidation_lineage.ts +6 -3
  483. package/src/scripts/lint_design_quality.ts +60 -12
  484. package/src/scripts/lint_evidence_artifacts.ts +9 -0
  485. package/src/scripts/lint_hook_concern_budget.ts +10 -21
  486. package/src/scripts/lint_motion_authority_drift.ts +27 -0
  487. package/src/scripts/lint_pack_boundaries.ts +406 -28
  488. package/src/scripts/lint_roadmap_blockers.ts +282 -29
  489. package/src/scripts/lint_roadmap_complexity.ts +4 -2
  490. package/src/scripts/lint_rule_law_section.ts +151 -21
  491. package/src/scripts/lint_rule_skill_pack_reach.ts +17 -0
  492. package/src/scripts/lint_settings_classes.ts +1 -1
  493. package/src/scripts/lint_svg_asset.ts +365 -0
  494. package/src/scripts/lint_ticked_unmet_criteria.ts +165 -0
  495. package/src/scripts/lint_workflow_security.ts +12 -1
  496. package/src/scripts/measure_skill_ranker_baseline.ts +5 -0
  497. package/src/scripts/model_rule_injection.ts +3 -3
  498. package/src/scripts/onboarding_gate_hook.ts +7 -6
  499. package/src/scripts/print_required_checks.ts +15 -3
  500. package/src/scripts/probe_host_compliance.ts +33 -5
  501. package/src/scripts/probe_turnaround.ts +183 -3
  502. package/src/scripts/ratification_header.ts +77 -0
  503. package/src/scripts/refusal_envelope.ts +138 -0
  504. package/src/scripts/release_publication.ts +29 -3
  505. package/src/scripts/report_dispatch_import_closure.ts +76 -0
  506. package/src/scripts/report_installed_rule_links.ts +118 -1
  507. package/src/scripts/report_module_reach.ts +212 -0
  508. package/src/scripts/report_obligation_mechanism.ts +16 -18
  509. package/src/scripts/report_parked_blockers.ts +222 -0
  510. package/src/scripts/report_required_checks_drift.ts +196 -0
  511. package/src/scripts/report_skill_ranker_confusion.ts +103 -2
  512. package/src/scripts/report_standing_payload_by_host.ts +1 -1
  513. package/src/scripts/routing_doctor.ts +2 -2
  514. package/src/scripts/schemas/agent-settings.schema.json +17 -31
  515. package/src/scripts/schemas/command.schema.json +1 -1
  516. package/src/scripts/schemas/skill.schema.json +1 -1
  517. package/src/scripts/self_review_gate.ts +39 -2
  518. package/src/scripts/skill_tools/score_skill_relevance.ts +28 -19
  519. package/src/scripts/sync_pr_branch.ts +403 -132
  520. package/src/scripts/trigger_eval_grandfather.json +0 -16
  521. package/src/server/schemas/settings.ts +33 -177
  522. package/src/shared/skillRanking.ts +53 -4
  523. package/dist/cli-delegate/chunk-NYX3L2PZ.js +0 -99
  524. package/src/scripts/_lib/config_chain.ts +0 -477
  525. package/src/scripts/_lib/conformance_report.ts +0 -403
  526. package/src/scripts/_lib/eval_discrimination.ts +0 -95
  527. package/src/scripts/_lib/evaluator_promotion.ts +0 -225
  528. package/src/scripts/_lib/file_slicer.ts +0 -117
  529. package/src/scripts/_lib/legacy_boundary_map.ts +0 -228
  530. package/src/scripts/_lib/minimality_tiebreak.ts +0 -168
  531. package/src/scripts/_lib/overbuild_lens_contract.ts +0 -196
  532. package/src/scripts/_lib/role_split.ts +0 -338
@@ -99,11 +99,10 @@ Read `github.pr_reply_method` from `.agent-settings.yml`:
99
99
  | `create_review_comment` | `POST /repos/{owner}/{repo}/pulls/{number}/comments` with `{"body": "...", "in_reply_to": comment_id}` |
100
100
  | `auto` | Try `replies_endpoint` first. If it works → update setting. If 404/error → try `create_review_comment`. |
101
101
 
102
- ### 2. Bot icon prefix
102
+ ### 2. No bot icon prefix
103
103
 
104
- Read `personal.pr_comment_bot_icon` from `.agent-settings.yml`:
105
- - `true` → prefix reply body with `🤖 `.
106
- - `false` or not set → no prefix.
104
+ Never prefix the reply body with `🤖 ` — `🤖` is on the universal blacklist of
105
+ [`no-decorative-emojis-in-git-surfaces`](../../rules/no-decorative-emojis-in-git-surfaces.md).
107
106
 
108
107
  ### 3. API call rules
109
108
 
@@ -46,10 +46,16 @@ imposing the shipped default there produces commits that read as foreign in
46
46
  | Tier | Source | Binding? |
47
47
  |---|---|---|
48
48
  | **1 — configured** | `commitlint.config.*` · `.gitmessage` · a `commit-msg` hook (husky / lefthook / `.git/hooks`) · `CONTRIBUTING.md` § Commits · a CI job that validates subjects · release automation that PARSES subjects (semantic-release, changesets, git-cliff, conventional-changelog) | yes — Class A, no approval needed |
49
+ | **1b — declared** | `git.commit_format` in `.git-convention.yml`, the team's committed carrier at the repository root (ADR-283), where either value is a declaration — a team that commits `ticket-scope` chose it. Without the carrier, `git.commit_format: ticket-conventional` in a developer settings file, where only the non-default value declares anything: `ticket-scope` is also what a copied template carries, so it proves no choice. `agent-config git:convention show --key commit_format` names the file and the state; `malformed` or `invalid` declares nothing and is reported, never read as the default | yes — the user's own word, so no measurement and no ask |
49
50
  | **2 — measured + approved** | the consensus pass below, after the user says yes | yes, for this repository |
50
51
  | **3 — measured, unapproved** | the same pass before the user answers | **no — advisory**; report the mismatch, write Conventional |
51
52
  | **4 — default** | Conventional Commits | yes |
52
53
 
54
+ `agent-config git:convention subject` validates against tiers 1b–4 only. A
55
+ tier-1 commitlint config or `commit-msg` hook is named in a `note:` line as also
56
+ running at commit, possibly stricter; the verb never infers what it accepts and
57
+ never changes its exit for it.
58
+
53
59
  Release automation is the trap that makes tier 1 outrank tier 2 even when the
54
60
  history disagrees: a repo whose `git log` is 85 % `[JIRA-123] Fix thing` but
55
61
  whose manifest (`package.json`, `composer.json`, `pyproject.toml`, `Cargo.toml`)
@@ -60,6 +66,7 @@ Check for the parser before you trust the prevalence.
60
66
  ### 1. Look for tier 1 before measuring anything
61
67
 
62
68
  ```bash
69
+ agent-config git:convention show --key commit_format # tier 1b: valid from .git-convention.yml (either value), or ticket-conventional from a settings file
63
70
  ls commitlint.config.* .commitlintrc* .gitmessage .czrc 2>/dev/null
64
71
  git config --get commit.template
65
72
  ls .husky/commit-msg .git/hooks/commit-msg 2>/dev/null
@@ -88,144 +95,125 @@ The tier table above calls a confirmed hit Class A. That is exact for a machine
88
95
  read by a human judgement — treat a prose source as tier 1 in **precedence** and
89
96
  as a quoted sentence in the report, so the next reader can check it.
90
97
 
91
- ### 2. Sample the history — native source per dimension
98
+ ### 2. Measure the history — `agent-config git:convention measure`
92
99
 
93
- Only **commit subjects** are reliably measurable from a clone. Branch names,
94
- PR titles and commit granularity have different native sources, and `unknown`
95
- is a valid, honest result for each:
100
+ The measurement is code. `agent-config git:convention measure [--limit N]
101
+ [--family F] [--json]` samples the history, classifies, caps, aggregates and
102
+ judges it, and writes nothing. The sample size, the exclusions and every
103
+ threshold it applies are the `measure` rows of the generated block in
104
+ [`commit-subject`](../git-workflow/references/commit-subject.md) § The grammar,
105
+ rendered from the module the verb runs — read them there, never from memory.
106
+ What the verb reports, and why each choice is the one it makes:
96
107
 
97
- | Dimension | Native source | Measurable from a clone? |
108
+ | Dimension | Native source | What `measure` does with it |
98
109
  |---|---|---|
99
- | Subject grammar | `git log` | yes |
100
- | Branch naming | forge refs / `git branch -r` | partially — merged branches are often deleted |
101
- | PR title shape | forge API (`gh pr list`) | only with forge access |
102
- | Granularity (atomic vs batched) | per-commit diff stat | **no** where the repo squash-merges — the evidence was destroyed at merge |
110
+ | Subject grammar | `git log` on the trunk | classifies, caps, judges — the only dimension that can be **established** |
111
+ | Branch naming | `git for-each-ref refs/remotes`, without `HEAD` and the default branch | proposes a `branch_pattern` among the shapes the reader accepts, or `no clear pattern` — merged branches are often deleted, so the sample is thin |
112
+ | Update style | merge subjects that bring the default branch into a topic branch | **shown, never adopted** — `update_strategy` is a team decision, not a habit to copy |
113
+ | PR title shape, granularity | forge API · per-commit diff stat | not measured — granularity is destroyed where the repository squash-merges |
103
114
 
104
- Resolve the trunk explicitly. `origin/HEAD` is set by `git clone` and is absent
105
- in a `git init` + `git remote add` checkout, in many CI checkouts and in
106
- worktrees, where the sample command would die rather than return nothing:
107
-
108
- ```bash
109
- TRUNK=$(git symbolic-ref -q --short refs/remotes/origin/HEAD)
110
- [ -n "$TRUNK" ] || TRUNK=$(git rev-parse -q --verify origin/main >/dev/null && echo origin/main)
111
- [ -n "$TRUNK" ] || TRUNK=$(git rev-parse -q --verify origin/master >/dev/null && echo origin/master)
112
- [ -n "$TRUNK" ] || TRUNK=HEAD # no remote at all: this checkout is the trunk
113
- git log "$TRUNK" --no-merges -n 200 --since='24 months ago' \
114
- --pretty=format:'%H%x09%aN%x09%aE%x09%s'
115
- ```
115
+ **The trunk** is `origin/HEAD`, else `origin/main`, else `origin/master`, else
116
+ `HEAD` — `origin/HEAD` is absent in a `git init` + `git remote add` checkout,
117
+ in many CI checkouts and in worktrees, and a chain that silently falls through
118
+ to an empty argument would hide that the resolution failed.
116
119
 
117
120
  **`--first-parent` is deliberately absent.** On a merge-commit workflow the
118
- trunk's first-parent chain is merge commits, which `--no-merges` then drops —
119
- the two together leave only what was committed straight to the trunk, which on
120
- a PR-based repo is nearly nothing. The convention lives in the feature commits,
121
- so walk the whole reachable history and exclude merges alone.
122
-
123
- The terminal `HEAD` matters as much as the first line: a chain that ends with an
124
- unset `TRUNK` hands `git log` an empty argument, which walks `HEAD` anyway —
125
- silently doing the right thing on a local repo while hiding that the resolution
126
- failed on one where it should not have.
127
-
128
- `%H` leads the format because two of the exclusions below need the commit, not
129
- just its subject. Drop, from the sample:
130
-
131
- - **bot authors** — `[bot]`, `dependabot`, `renovate`, `github-actions`,
132
- `semantic-release`, `release-please`;
133
- - **automation subjects** — `^Revert `, `^Merge `, `chore(release)`,
134
- `^Bump `, a bare `v?\d+\.\d+\.\d+`;
135
- - **bulk imports** — resolve with the hash the format carries:
136
- `git show --stat --oneline <sha> | tail -1` and drop anything over 500 files.
137
- Check this only for the handful of subjects that read like an import; running
138
- it per commit costs 200 subprocesses to remove two rows.
139
-
140
- ### 3. Classify each surviving subject
141
-
142
- Match in order, first hit wins. These are POSIX extended regular expressions,
143
- given outside a table because a markdown cell would need the alternation pipes
144
- escaped and `\|` in ERE is a literal pipe, not an alternation:
145
-
146
- ```
147
- conventional ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([^)]+\))?!?:
148
- ticket-prefix ^\[[A-Z][A-Z0-9]+-[0-9]+\][: ]|^[A-Z][A-Z0-9]+-[0-9]+[: ]
149
- gitmoji ^:[a-z0-9_+-]+:[[:space:]]|^[^[:ascii:][:space:]]
150
- imperative-plain ^[A-Z][a-z]+[[:space:]].*[^.]$
151
- other everything else
152
- ```
153
-
121
+ trunk's first-parent chain is merge commits, which `--no-merges` then drops — the
122
+ two together leave only what was committed straight to the trunk, which on a
123
+ PR-based repo is nearly nothing. The convention lives in the feature commits.
124
+
125
+ **Exclusions** — bot authors, automation subjects (reverts, merges, release
126
+ chores, version bumps, bare versions) and bulk imports. The verb reads the file
127
+ count of every sampled commit in the same `git log` call, so the bulk check costs
128
+ no extra subprocess.
129
+
130
+ **Classification** — the `family` rows of the same block, matched in order,
131
+ first hit wins: `conventional`, `ticket-conventional`, `ticket-prefix`,
132
+ `gitmoji`, `imperative-plain`, else `other`. `ticket-conventional` precedes
133
+ `ticket-prefix`, which would otherwise swallow it as "ticket, then free text".
154
134
  `imperative-plain` is deliberately mechanical — capitalised first word, no
155
- trailing period — and does **not** test for the imperative mood. Mood needs a
135
+ trailing period — and does **not** test for the imperative mood: mood needs a
156
136
  verb lexicon this procedure does not ship, and `Update` versus `Updated` is
157
- exactly the pair a lexicon-free test cannot separate. That is a stated limit of
158
- the classifier, not a gap to fill by guessing: a repo whose only distinction
159
- from Conventional is mood will read as `imperative-plain` either way, and the
160
- mood question belongs in the ask at step 6.
161
-
162
- `classifier_version` in step 7 names the revision of THIS section — the five
163
- patterns above plus the exclusions in step 2. It is a provenance stamp so a
164
- later measurement can be compared against a like one; it does not claim an
165
- executable classifier ships anywhere in the tree.
166
-
167
- Record the runner-up family too — a near-tie is itself the finding.
168
-
169
- ### 4. Aggregate, capped per author, per half
170
-
171
- Raw commit counts let one prolific author or an unfiltered bot define the house
172
- style; one-vote-per-author lets a drive-by contributor with two commits veto it.
173
- Cap instead: split the sample into a newer and an older half by position first,
174
- then let **each author contribute at most 20 commits to each half**. Capping the
175
- sample as a whole would let one author's newest 20 fill their entire quota and
176
- empty the older half, which is precisely where step 5's coherence check has to
177
- look.
178
-
179
- Compute the dominant family's share over the **capped** total, and report that
180
- total — a percentage quoted against the raw eligible count describes a statistic
181
- nobody computed.
182
-
183
- With fewer than three authors the cap is **off**: there is no dominance to guard
184
- against, and a cap of 20 would put the single-maintainer bar's own `n ≥ 30`
185
- out of reach of its denominator.
186
-
187
- ### 5. The evidence bar
188
-
189
- A measured convention is eligible to be proposed only when **all** hold:
190
-
191
- - **n ≥ 30** eligible commits after exclusions;
192
- - **≥ 80 %** capped-weighted share for the dominant family, over **≥ 3 human
193
- authors** — or, with **one or two** authors, an uncapped **≥ 90 %** share over
194
- n ≥ 30. Two authors take the stricter branch rather than falling between the
195
- two: a two-person repo is a small-team repo, and leaving it unreachable by
196
- both branches would make the measurement permanently advisory there;
197
- - **temporal coherence** — the same family is dominant in the newer half of
198
- the sample *and* in the older half. If the halves disagree materially the
199
- repository is **migrating**: abstain, name the change point, and use the
200
- newer half's family only if it independently clears the bar.
201
-
202
- > The 80 % figure is the stricter of two council positions (2026-09-04,
203
- > anthropic + openai, 2/2 quorum: 70 % vs 80 % + a two-thirds-of-authors
204
- > clause). The per-author cap is why the separate author-share clause was not
205
- > also adopted — it already answers the dominance concern the clause existed
206
- > for. These are policy heuristics, not statistically derived thresholds.
207
- > **Revisit-if:** a labelled corpus of repositories shows a false-positive or
208
- > false-negative rate that a different bar would fix.
209
-
210
- ### 6. Ask — never adopt silently
211
-
212
- Below the bar, or on a migrating repo: use Conventional Commits and say so
213
- **once**, in one line, when a commit is actually requested. Do not ask.
214
-
215
- At or above the bar, ask once, as numbered options (per `user-interaction`):
216
- name the family, the share **and the capped total it was computed over**, the
217
- author count, and — if a tier-1 parser exists — the tooling that would stop
218
- parsing.
219
-
220
- ### 7. Persist the answer where the next session finds it
221
-
222
- Write the measurement as a Class-B convention card under
223
- `agents/memory/curated/conventions/quarantine/commit-subject.md`; the user's
224
- approval is what moves it to `approved/`. Carry `observed_n`,
225
- `dominant_share`, `author_count`, `sample_window`, `classifier_version`, and
226
- `confirm_against` — aggregates only, never per-author identities. Re-measure
227
- and re-review when the share falls below **70 %**, when a tier-1 source
228
- appears, or when the newer half's family changes.
137
+ exactly the pair a lexicon-free test cannot separate. A repo whose only
138
+ distinction from Conventional is mood reads as `imperative-plain` either way,
139
+ and the mood question belongs in the ask at step 3. `classifier_version` in the
140
+ verb's output and on the card names the revision of the families and exclusions
141
+ (`ticket-conventional` was added 2026-10-06; re-measure an older card).
142
+
143
+ **Aggregation, capped per author, per half.** Raw counts let one prolific author
144
+ or an unfiltered bot define the house style; one vote per author lets a drive-by
145
+ contributor with two commits veto it. The verb splits the sample into a newer and
146
+ an older half by position first, then caps each author within each half —
147
+ capping the sample as a whole would let one author's newest commits fill the
148
+ quota and empty the older half, which is exactly where the coherence check has to
149
+ look. Shares are over the **capped** total, and the verb reports that total; a
150
+ percentage quoted against the raw eligible count describes a statistic nobody
151
+ computed. With fewer than three authors the cap is off and the stricter uncapped
152
+ bar applies: there is no dominance to guard against, and a cap would put the
153
+ minimum sample out of reach of its own denominator. Two authors take the stricter
154
+ branch rather than falling between the two.
155
+
156
+ **Temporal coherence.** The same family must lead the newer **and** the older
157
+ half. Halves that disagree mean the repository is **migrating**: the verb names
158
+ both families and establishes the newer half's family only if the newer half
159
+ clears the bar on its own (`migrating` in the output).
160
+
161
+ **Verdict.** At or above the bar the verb names the established family; below it,
162
+ the reasons and the **two strongest** families with a grammar. Record the
163
+ runner-up either way — a near-tie is itself the finding.
164
+
165
+ > The share bar is the stricter of two council positions (2026-09-04,
166
+ > anthropic + openai, 2/2 quorum); the per-author cap is why a separate
167
+ > author-share clause was not also adopted — it already answers the dominance
168
+ > concern that clause existed for. These are policy heuristics, not statistically
169
+ > derived thresholds. **Revisit-if:** a labelled corpus of repositories shows a
170
+ > false-positive or false-negative rate that a different bar would fix.
171
+
172
+ ### 3. Ask once — never adopt silently
173
+
174
+ Only an **interactive** `/commit` asks, and only while `git:convention show --key commit_format`
175
+ prints `no convention established` — no declaration and no approved card. It
176
+ asks once, as numbered options (per `user-interaction`), naming the family, the
177
+ share **and the capped total it was computed over**, the author count, and — if a
178
+ tier-1 parser exists — the tooling that would stop parsing:
179
+
180
+ - **at or above the bar** — the established family (recommended) vs Conventional
181
+ Commits;
182
+ - **below the bar** — the two strongest families vs Conventional Commits, with
183
+ the reasons the verb gave.
184
+
185
+ `/commit:in-chunks` never asks: it reports the measurement in its summary and
186
+ uses the card, or the default. Until the user answers, a measurement is tier 3 —
187
+ advisory.
188
+
189
+ ### 4. Persist the answer where the next session finds it
190
+
191
+ The answer is the approval, so `/commit` writes the card straight to
192
+ `agents/memory/curated/conventions/approved/commit-subject.md` — **also when the
193
+ answer is Conventional Commits**, so the question is never asked again.
194
+ `git:convention measure --family <answer>` prints the card's content: a Class-B
195
+ convention card carrying `dominant_family`, `observed_n`, `dominant_share`,
196
+ `author_count`, `sample_window`, `classifier_version`, `confirm_against` and
197
+ `ticket_keys` — aggregates only, never per-author identities. A measurement the
198
+ agent records without an answer goes to `quarantine/` instead. `ticket_keys`
199
+ lists the approved project keys (`ticket_keys: [DEV, OPS]`): it is filled from the
200
+ user's answer when `/commit` meets a key not on it, and a commitlint config's
201
+ `issuePrefixes` are offered as the proposal, never written silently. Re-measure
202
+ and re-review when the share falls below **70 %**, when a tier-1 source appears,
203
+ or when the newer half's family changes.
204
+
205
+ ### 5. The team file is a human's commit
206
+
207
+ A card is one developer's memory; `.git-convention.yml` is the team's
208
+ declaration and outranks it (tier 1b). When the chosen family maps to a
209
+ `git.commit_format` value (`conventional` → `ticket-scope`, `ticket-conventional`
210
+ → `ticket-conventional`) or a `branch_pattern` was proposed, `measure` — and
211
+ `/commit` after the answer — prints the file's ready-to-commit content.
212
+ `update_strategy` is never in it. The file is class C: the agent prints it and a
213
+ human creates and commits it. The one exception is creation on the user's
214
+ explicit yes this turn, through `agent-config git:convention init --yes` — once,
215
+ never over an existing carrier, never `update_strategy`, never committed by the
216
+ verb; the agent never writes or edits the file by hand.
229
217
 
230
218
  ## What a measurement may never lower
231
219
 
@@ -274,18 +262,15 @@ If yes:
274
262
  - Suggest splitting into multiple commits
275
263
  - Or choose the dominant net effect for squash merge title
276
264
 
277
- ### 3. Choose scope
265
+ ### 3. Place the ticket, then choose the scope
278
266
 
279
- Add a scope only if it improves clarity:
280
-
281
- - Jira ticket ID: `DEV-1234`
282
- - Module/area: `api`, `auth`, `skills`, `rules`, `ci`
267
+ Read the ticket with `agent-config git:convention ticket` and place it per [`commit-subject`](../git-workflow/references/commit-subject.md) § Placing the ticket — under `ticket-conventional` **never in the scope**.
283
268
 
284
269
  ### 4. Write the description
285
270
 
286
271
  - State the intent clearly
287
272
  - Avoid generic filler (`update stuff`, `fix things`)
288
- - Stay concise — max 72 chars total for first line
273
+ - Stay concise — max 72 chars total for first line (the ticket prefix counts)
289
274
  - Imperative mood: "add", "fix", "remove" — not "added", "fixed", "removed"
290
275
 
291
276
  ### 5. Check for breaking change
@@ -316,16 +301,18 @@ Or add `BREAKING CHANGE:` in the commit body/footer.
316
301
 
317
302
  ## Procedure: Generate squash merge title
318
303
 
304
+ Only for a squash merge — rebase-and-merge keeps every commit (`/pr:merge` § 9 reads the method from the forge).
305
+
319
306
  1. Read all commits in the PR
320
307
  2. Identify the **net effect** — what does the PR accomplish overall?
321
- 3. Write a single Conventional Commit message summarizing the net effect
308
+ 3. Write a single subject in the convention in force (ticket placed per § Place the ticket) summarizing the net effect
322
309
  4. Do not list every internal commit — summarize
323
310
 
324
311
  ## Output format
325
312
 
326
313
  1. The convention in force and the tier that established it — `configured
327
- (commitlint.config.js)`, `approved (ticket-prefix, 84% of 137)`, or
328
- `default (Conventional Commits)`
314
+ (commitlint.config.js)`, `declared (git.commit_format: ticket-conventional)`,
315
+ `approved (family ticket-prefix, 84% of 137)`, or `default (Conventional Commits)`
329
316
  2. Recommended commit message(s)
330
317
  3. Brief rationale for type choice
331
318
  4. Split suggestion if the change should be multiple commits
@@ -372,6 +359,7 @@ to every commit message you author.
372
359
  advisory, and silence is not approval
373
360
  - Do NOT let prevalence lift a `never` or `explicit-only` floor
374
361
  - Do NOT use vague messages: `update stuff`, `fix bug`, `changes`
362
+ - Do NOT put a ticket id in the scope when `git.commit_format` is `ticket-conventional`
375
363
  - Do NOT use `refactor` for bug fixes
376
364
  - Do NOT use `chore` for meaningful behavior changes
377
365
  - Do NOT hide multiple unrelated concerns in one message
@@ -0,0 +1,39 @@
1
+ # Attribution — the ported grounding engine
2
+
3
+ This file exists because of where the code ships, not because the obligation
4
+ is new. `src/skills/design-intelligence/ATTRIBUTION.md` already covered both
5
+ the vendored corpus **and** the ported engine. The corpus travels with the
6
+ `frontend-design` pack; the engine sources below travel with **this** skill, in
7
+ `engineering-base`. An install that takes `engineering-base` without
8
+ `frontend-design` therefore carried MIT-derived code and no notice, which is
9
+ the one thing the MIT obligation forbids. The notice is reproduced here so it
10
+ travels with the files it covers.
11
+
12
+ ## Covered files
13
+
14
+ - `scripts/bm25_search.ts`
15
+ - `scripts/decision_engine.ts`
16
+ - `scripts/ground.ts`
17
+ - `scripts/schema_validator.ts`
18
+
19
+ Ported from `nextlevelbuilder/ui-ux-pro-max-skill` @
20
+ `b7e3af80f6e331f6fb456667b82b12cade7c9d35` (Python sources `core.py`,
21
+ `search.py`, `design_system.py`), de-duplicated and with slide-only paths
22
+ stripped.
23
+
24
+ ## MIT
25
+
26
+ Copyright (c) 2024 **Next Level Builder**.
27
+
28
+ The Python engine sources (`core.py`, `search.py`, `design_system.py`) this
29
+ skill's scripts are ported from are MIT-licensed. Obligation: **retain this
30
+ notice**.
31
+
32
+ ## Not covered here
33
+
34
+ The tabular design-knowledge corpus (`ui-reasoning`, `products`, `colors`,
35
+ `styles`, `typography`, `charts`, `landing`, `icons`, `ux-guidelines`,
36
+ `react-performance`, `app-interface`, `motion`, `stacks/*`), the Apache-2.0
37
+ `ui-styling`-derived material, and the running modifications log stay in
38
+ `design-intelligence/ATTRIBUTION.md` — they ship with that pack, and this file
39
+ does not duplicate them.
@@ -31,8 +31,14 @@ execution:
31
31
  Engine provenance: ported from `nextlevelbuilder/ui-ux-pro-max-skill`
32
32
  @ `b7e3af80f6e331f6fb456667b82b12cade7c9d35` (MIT, last checked
33
33
  2026-06-07) — BM25 de-duplicated, slide-only paths stripped, every
34
- frontend-hardcoded axis moved into the manifest. Full license obligations:
35
- [`design-intelligence/ATTRIBUTION.md`](../design-intelligence/ATTRIBUTION.md).
34
+ frontend-hardcoded axis moved into the manifest. The obligations split by what
35
+ ships where: the MIT notice for the **engine sources under `scripts/`** travels
36
+ with this skill, in [`ATTRIBUTION.md`](ATTRIBUTION.md) beside it, so an install
37
+ that takes `engineering-base` without `frontend-design` still carries the
38
+ notice its code is under. The vendored **corpus** and the Apache-2.0
39
+ `ui-styling` material travel with `frontend-design`, in
40
+ [`design-intelligence/ATTRIBUTION.md`](../design-intelligence/ATTRIBUTION.md),
41
+ which remains the full record.
36
42
 
37
43
  ## When to use
38
44
 
@@ -29,7 +29,7 @@
29
29
  "refresh_cadence": "quarterly",
30
30
  "upstream": {
31
31
  "repo": "derived: PostgreSQL 18 + MySQL 9.7 reference docs (previously PostgreSQL 16 + MySQL 8)",
32
- "sha": "re-derived 2026-09-27 against PostgreSQL 18.x / MySQL 9.7: all 12 rows of query-tuning.csv still apply as written on both engines. Three rows gained a version-scoped annotation for a genuinely new capability rather than a rewrite \u2014 row 1 (Slow WHERE on large table) notes PG18's B-tree skip scan, which relaxes the equality-first composite-index rule on PG18+ only; row 5 (JOIN explosion) notes MySQL 9.7's Hypergraph Optimizer, now GA in Community Edition, improving join-order choices automatically; row 12 (JSON column filtering) notes that PG18 flips the GENERATED-column default from STORED to VIRTUAL, and VIRTUAL columns are not indexable, so STORED must now be explicit. PostgreSQL 16.x and MySQL 8.4 remain supported and the patterns apply there unchanged",
33
- "last_checked": "2026-09-18"
32
+ "sha": "PostgreSQL 18.x / MySQL 9.7 reference documentation (PostgreSQL 16.x and MySQL 8.4 also supported)",
33
+ "last_checked": "2026-10-10"
34
34
  }
35
35
  }
@@ -1,13 +1,13 @@
1
- Symptom,Keywords,Root Cause,Strategy,Code Good,Anti-Pattern,Verification,Severity
2
- Slow WHERE on large table,slow query where filter full scan seq scan,Sequential scan despite selective predicate,B-tree index on the filtered column(s); composite index ordered by equality-first then range (PostgreSQL 18+: skip scan lets the planner use later columns without a leading-column equality predicate — MySQL and pre-18 Postgres still need equality-first ordering),"CREATE INDEX idx_orders_status_created ON orders (status, created_at)",Indexing low-cardinality boolean alone; composite ordered range-first,EXPLAIN (ANALYZE) shows Index Scan (PG 18+: or Index Searches for a skip scan); rows estimate ≈ actual,HIGH
3
- ORDER BY ... LIMIT slow,order by limit sort top n latest,Sort node over the whole table for a top-N query,Index matching the ORDER BY direction (including DESC/NULLS) so LIMIT walks the index,CREATE INDEX idx_events_created_desc ON events (created_at DESC),OFFSET pagination for infinite feeds (use keyset),Plan shows Index Scan Backward / no Sort node,HIGH
4
- N+1 query loop,n+1 loop per row lazy load orm repeated query,Hundreds of identical queries differing only by id,Eager-load relations / batch with IN(...) or JOIN; dataloader pattern at the API layer,SELECT * FROM comments WHERE post_id IN (...),Fixing with a cache instead of the access pattern,Query count per request flat vs item count,HIGH
5
- LIKE '%term%' search,like contains search wildcard fulltext,Leading-wildcard LIKE can't use B-tree,Trigram index (pg_trgm GIN) or full-text search (tsvector + GIN); dedicated engine beyond ~10M rows,CREATE INDEX idx_users_name_trgm ON users USING gin (name gin_trgm_ops),Forcing LOWER() without an expression index,Plan shows Bitmap Index Scan on the GIN index,MEDIUM
6
- JOIN explosion,join many tables slow hash join nested loop,Mis-estimated join order / missing join keys index,Index every FK used in joins; verify row estimates; break monster joins into CTE/temp stages when estimates collapse (MySQL 9.7: the Hypergraph Optimizer is now GA in Community Edition and can materially improve join-order choices on its own — verify estimates before assuming a manual rewrite is still needed),ANALYZE tables; index fk columns,Disabling nested loops globally; hint-chasing before stats are fresh,Estimates within ~10x of actuals at every join node,HIGH
7
- Aggregation over millions of rows,group by count sum report aggregate slow,Repeated full-table aggregation for dashboards,Pre-aggregate: materialized view / rollup table refreshed on schedule or trigger; partial indexes for hot subsets,CREATE MATERIALIZED VIEW daily_rev AS ... REFRESH CONCURRENTLY,Caching in app memory only (cold-start storms),"Dashboard reads hit the rollup, not base tables",MEDIUM
8
- Pagination deep offset,offset page 10000 slow deep pagination,OFFSET N scans+discards N rows,Keyset/cursor pagination on a unique ordered key,"WHERE (created_at,id) < (:c,:i) ORDER BY created_at DESC,id DESC LIMIT 20",Hiding offset behind a 'page' param and capping at 1000 as a fix,p99 latency flat across page depth,HIGH
9
- Write contention / lock waits,deadlock lock wait contention update hot row,"Hot-row updates serialize (counters, balances)",Row-level design: ledger inserts over UPDATE-in-place; batch with SKIP LOCKED queues; keep transactions short,SELECT ... FOR UPDATE SKIP LOCKED for workers,Retrying deadlocks blindly without ordering writes,Lock wait time ~0 under load test; deadlock rate 0,HIGH
10
- Missing/stale statistics,wrong plan estimate stale statistics analyze,Optimizer estimates wildly off → bad plans,Auto-analyze tuned for big tables; manual ANALYZE after bulk loads; extended statistics for correlated columns,"CREATE STATISTICS s_dist (dependencies) ON city,country FROM addr",Hinting every query instead of fixing stats,Plan estimates ≈ actuals after ANALYZE,MEDIUM
11
- Over-indexing writes,insert slow many indexes write amplification,Each extra index taxes every INSERT/UPDATE,Audit with index-usage stats; drop unused; covering index to replace several near-duplicates,pg_stat_user_indexes idx_scan = 0 candidates,Adding an index per slow query without retiring old ones,Write p95 recovers; no unused-index rows,MEDIUM
12
- SELECT * over wide rows,select star wide row toast network payload,Fetching unused columns (TOAST/LOB) dominates IO,Project needed columns; covering index enables index-only scans,"SELECT id,status,total FROM orders ...",Compressing payloads instead of trimming the select list,Plan shows Index Only Scan where applicable,LOW
13
- JSON column filtering,json jsonb attribute filter schemaless,Filtering inside JSON without index = full scan,"GIN index on jsonb path ops, or generated column + B-tree for hot keys",ALTER TABLE t ADD COLUMN status text GENERATED ALWAYS AS (doc->>'status') STORED; CREATE INDEX ...; -- PG18+: STORED must be explicit (default flipped to VIRTUAL — not indexable),Stuffing relational data into one JSON blob; relying on the pre-PG18 STORED default,Plan uses the GIN/generated-column index,MEDIUM
1
+ Symptom,Keywords,Root Cause,Strategy,Code Good,Anti-Pattern,Verification,Severity
2
+ Slow WHERE on large table,slow query where filter full scan seq scan,Sequential scan despite selective predicate,B-tree index on the filtered column(s); composite index ordered by equality-first then range (PostgreSQL 18+: skip scan lets the planner use later columns without a leading-column equality predicate — MySQL and pre-18 Postgres still need equality-first ordering),"CREATE INDEX idx_orders_status_created ON orders (status, created_at)",Indexing low-cardinality boolean alone; composite ordered range-first,EXPLAIN (ANALYZE) shows Index Scan (PG 18+: or Index Searches for a skip scan); rows estimate ≈ actual,HIGH
3
+ ORDER BY ... LIMIT slow,order by limit sort top n latest,Sort node over the whole table for a top-N query,Index matching the ORDER BY direction (including DESC/NULLS) so LIMIT walks the index,CREATE INDEX idx_events_created_desc ON events (created_at DESC),OFFSET pagination for infinite feeds (use keyset),Plan shows Index Scan Backward / no Sort node,HIGH
4
+ N+1 query loop,n+1 loop per row lazy load orm repeated query,Hundreds of identical queries differing only by id,Eager-load relations / batch with IN(...) or JOIN; dataloader pattern at the API layer,SELECT * FROM comments WHERE post_id IN (...),Fixing with a cache instead of the access pattern,Query count per request flat vs item count,HIGH
5
+ LIKE '%term%' search,like contains search wildcard fulltext,Leading-wildcard LIKE can't use B-tree,Trigram index (pg_trgm GIN) or full-text search (tsvector + GIN); dedicated engine beyond ~10M rows,CREATE INDEX idx_users_name_trgm ON users USING gin (name gin_trgm_ops),Forcing LOWER() without an expression index,Plan shows Bitmap Index Scan on the GIN index,MEDIUM
6
+ JOIN explosion,join many tables slow hash join nested loop,Mis-estimated join order / missing join keys index,Index every FK used in joins; verify row estimates; break monster joins into CTE/temp stages when estimates collapse (MySQL 9.7: the Hypergraph Optimizer ships in Community Edition but is OFF by default — optimizer_switch reads hypergraph_optimizer=off; switch it on per session or statement to let it choose join order, then verify estimates before assuming a manual rewrite is still needed),ANALYZE tables; index fk columns,Disabling nested loops globally; hint-chasing before stats are fresh,Estimates within ~10x of actuals at every join node,HIGH
7
+ Aggregation over millions of rows,group by count sum report aggregate slow,Repeated full-table aggregation for dashboards,Pre-aggregate: materialized view / rollup table refreshed on schedule or trigger; partial indexes for hot subsets,CREATE MATERIALIZED VIEW daily_rev AS ... REFRESH CONCURRENTLY,Caching in app memory only (cold-start storms),"Dashboard reads hit the rollup, not base tables",MEDIUM
8
+ Pagination deep offset,offset page 10000 slow deep pagination,OFFSET N scans+discards N rows,Keyset/cursor pagination on a unique ordered key,"WHERE (created_at,id) < (:c,:i) ORDER BY created_at DESC,id DESC LIMIT 20",Hiding offset behind a 'page' param and capping at 1000 as a fix,p99 latency flat across page depth,HIGH
9
+ Write contention / lock waits,deadlock lock wait contention update hot row,"Hot-row updates serialize (counters, balances)",Row-level design: ledger inserts over UPDATE-in-place; batch with SKIP LOCKED queues; keep transactions short,SELECT ... FOR UPDATE SKIP LOCKED for workers,Retrying deadlocks blindly without ordering writes,Lock wait time ~0 under load test; deadlock rate 0,HIGH
10
+ Missing/stale statistics,wrong plan estimate stale statistics analyze,Optimizer estimates wildly off → bad plans,Auto-analyze tuned for big tables; manual ANALYZE after bulk loads; extended statistics for correlated columns,"CREATE STATISTICS s_dist (dependencies) ON city,country FROM addr",Hinting every query instead of fixing stats,Plan estimates ≈ actuals after ANALYZE,MEDIUM
11
+ Over-indexing writes,insert slow many indexes write amplification,Each extra index taxes every INSERT/UPDATE,Audit with index-usage stats; drop unused; covering index to replace several near-duplicates,pg_stat_user_indexes idx_scan = 0 candidates,Adding an index per slow query without retiring old ones,Write p95 recovers; no unused-index rows,MEDIUM
12
+ SELECT * over wide rows,select star wide row toast network payload,Fetching unused columns (TOAST/LOB) dominates IO,Project needed columns; covering index enables index-only scans,"SELECT id,status,total FROM orders ...",Compressing payloads instead of trimming the select list,Plan shows Index Only Scan where applicable,LOW
13
+ JSON column filtering,json jsonb attribute filter schemaless,Filtering inside JSON without index = full scan,"GIN index on jsonb path ops, or generated column + B-tree for hot keys",ALTER TABLE t ADD COLUMN status text GENERATED ALWAYS AS (doc->>'status') STORED; CREATE INDEX ...; -- PG18+: STORED must be explicit (default flipped to VIRTUAL — not indexable),Stuffing relational data into one JSON blob; relying on the pre-PG18 STORED default,Plan uses the GIN/generated-column index,MEDIUM
@@ -62,16 +62,19 @@ shape; 3–7 → one diagram; 8+ → split or summarize, never one dense picture
62
62
  | a **cycle** / loop / lifecycle | — | a **stepper widget**, never a hand-drawn ring |
63
63
  | a **DB schema / ERD** / entity relations | — | **mermaid**, never hand-placed SVG |
64
64
 
65
- ### Geometric pre-checks (run BEFORE finalizing an SVG/diagram)
66
-
67
- Ranked by failure rate — procedures, not constants:
68
-
69
- 1. **viewBox safety** — compute the lowest + rightmost element (plus a buffer)
70
- and set the viewBox from that; never assume the default fits.
71
- 2. **arrow-through-box trace** — trace every arrow's path and confirm it does
72
- not cross through an unrelated box before drawing it.
73
- 3. **box-width-from-longest-label** — size each box from its longest label
74
- before placing it, so text never overflows.
65
+ ### Drawing the diagram itself
66
+
67
+ The verb routing above and the noun-count triage stay here — they decide WHAT to
68
+ draw. **How** to draw it, and the check that the drawing is right, belong to
69
+ [`svg-authoring`](../../svg-authoring/SKILL.md).
70
+
71
+ The three checks this section used to carry — viewBox safety, the
72
+ arrow-through-box trace, and sizing a box from its longest label — were author
73
+ self-checks with no witness, and a published example in this very file violated
74
+ the viewBox rule it stated. They are now readings the asset profile takes in a
75
+ real engine: every painted element against the viewBox, and every `<text>`
76
+ against its declared box. A self-check that nothing measures is the failure
77
+ mode, not the three rules.
75
78
 
76
79
  (Reference-only: any color/easing/frame values come from the consumer's tokens
77
80
  or a maintained upstream — this skill vendors no drawn-asset corpus.)
@@ -30,9 +30,6 @@ execution:
30
30
  > **This skill captures *usage decisions*:** "we use 8px radius for
31
31
  > elevated surfaces", "all destructive actions require typed confirmation".
32
32
  > They are complementary, not redundant.
33
- >
34
- > Gated by `tokens.rich_skills` in `.agent-settings.yml` (default `on`).
35
- > If `off`, skip rich context loading and work from brief alone.
36
33
 
37
34
  ## Why this skill is rich
38
35
 
@@ -80,7 +80,7 @@ If the ticket scores low on estimability (vague AC, no out-of-scope,
80
80
  no mention of dependencies), set `uncertainty = Underspecified` and
81
81
  emit a single-line redirect to `/refine-ticket` at the top of the output.
82
82
 
83
- A **cross-source discrepancy** (per [`cross-source-consistency`](../../rules/cross-source-consistency.md), gated by `consistency.cross_source`) — ticket text contradicting an attached mockup, or a clearly-needed-but-unstated behavior (weekend/holiday shift) — is not estimable as-is: it hides an open scope decision. Raise `uncertainty` and name the discrepancy in the redirect rather than sizing over a contradiction.
83
+ A **cross-source discrepancy** (per [`cross-source-consistency`](../../rules/cross-source-consistency.md)) — ticket text contradicting an attached mockup, or a clearly-needed-but-unstated behavior (weekend/holiday shift) — is not estimable as-is: it hides an open scope decision. Raise `uncertainty` and name the discrepancy in the redirect rather than sizing over a contradiction.
84
84
 
85
85
  ### 3. Apply sizing heuristics
86
86
 
@@ -235,12 +235,59 @@ silently does nothing and a shared-element route change gets hand-rolled.
235
235
  - **`transform-origin`** decides where a `scale()` grows from. A menu or popover
236
236
  scaling in should originate at its trigger, not at its own centre, or it reads
237
237
  as arriving from nowhere. Scale in from ~0.96, never from `scale(0)`: growing
238
- from nothing is an entrance, and steps 1-2 asked for feedback.
238
+ from nothing is an entrance, and steps 1-2 asked for feedback. This line is
239
+ about an HTML box. On an SVG child the same declaration resolves against the
240
+ viewBox instead, which is the first bullet of 6b below.
239
241
  - **`@media (hover: hover)`** gates any hover-carried motion. Without it a touch
240
242
  device fires the hover treatment on tap and leaves it stuck, because there is
241
243
  no pointer to leave.
242
244
 
243
- All six still obey step 3's bands, step 2's single `ease-out` curve, and the
245
+ **6b. Which mechanism carries it inside an SVG?**
246
+
247
+ An SVG child is not an HTML box, and the asset is often delivered somewhere the
248
+ page's own CSS cannot reach. Four mechanisms differ there, and the delivery mode
249
+ decides which of them is even available. Mechanism only: none of these states a
250
+ duration, a band or a curve, and an SVG animation is banded by steps 1-3 like
251
+ any other.
252
+
253
+ - **`transform-box: fill-box`** is required before any CSS `transform` or
254
+ `transform-origin` on an SVG child means what it reads as. The initial
255
+ reference box is the nearest viewport — the `viewBox` — not the element's own
256
+ bounds, so `transform-origin: center` on a shape away from the origin scales
257
+ it about the canvas center and translates it as a side effect. The shape still
258
+ moves, nothing errors, and the value looks correct in the stylesheet, which is
259
+ why this is a silent failure rather than a visible one.
260
+ - **`pathLength="1"`** normalises a path's length for a draw-on, so
261
+ `stroke-dasharray` and `stroke-dashoffset` are written as fractions of the
262
+ stroke instead of as units of a geometry nobody measured. A dash guessed too
263
+ long leaves the stroke invisible for the opening part of its run and then
264
+ snaps; guessed too short, it draws and stops early. Set the attribute and the
265
+ guess disappears.
266
+ - **`keySplines`** takes control-point values inside `[0,1]`. An overshoot is
267
+ not expressible there and an out-of-range value is not clamped — the element
268
+ holds its start value for the whole run instead of easing, while an in-range
269
+ twin finishes normally. Step 2's bounce prohibition already rules the intent
270
+ out; this is the mechanism refusing it as well.
271
+ - **A path morph** interpolates only between two `d` values carrying the same
272
+ number of commands, of the same type, in the same order. Anything else is a
273
+ discrete swap wearing an animation's syntax. Author both paths against one
274
+ command list rather than simplifying each in isolation. (The CSS `d` property
275
+ is deliberately not addressed here — its cross-engine behavior is unmeasured
276
+ in this tree.)
277
+ - **Delivery mode picks the mechanism, and picks the reduced-motion route with
278
+ it.** A self-contained asset animates with internal CSS keyframes inside
279
+ `@media (prefers-reduced-motion: no-preference)`, which satisfies step 3's
280
+ requirement from inside the file. Reach for SMIL (`<animate>`,
281
+ `<animateTransform>`) only for what CSS cannot carry — and then the
282
+ reduced-motion route cannot be a CSS rule, because a page-level
283
+ `svg * { animation: none !important }` leaves an `<animate>` running. Use a
284
+ static twin selected by the media query, or `pauseAnimations()` under
285
+ `matchMedia`. An animated SVG delivered through `<img>` or a CSS background
286
+ cannot be reached by the host's CSS at all, so the host supplies the static
287
+ route — `<picture><source media="(prefers-reduced-motion: reduce)">` — or the
288
+ asset carries its own internal media query.
289
+
290
+ All of them still obey step 3's bands, step 2's single `ease-out` curve, and the
244
291
  `@media (prefers-reduced-motion: reduce)` requirement above — a newer mechanism
245
292
  is not an exemption from the authority, it is another way of spending it.
246
293
 
@@ -28,7 +28,7 @@ Do NOT use when:
28
28
 
29
29
  ## Procedure: Plan a feature
30
30
 
31
- 1. **Gather requirements** — What problem does this solve? Who benefits? What's the expected outcome? Run a **cross-source discrepancy scan** (per [`cross-source-consistency`](../../rules/cross-source-consistency.md), gated by `consistency.cross_source`): where the source ticket carries text + an attachment/mockup, or leaves a clearly-needed behavior unstated (weekend/holiday shift, empty/error state, timezone), surface the conflict/gap as an *Open question* before drafting phases — an inferred behavior is a scope expansion to confirm, not to bake in. See [`cross-source-consistency-mechanics`](../../guidelines/agent-infra/cross-source-consistency-mechanics.md).
31
+ 1. **Gather requirements** — What problem does this solve? Who benefits? What's the expected outcome? Run a **cross-source discrepancy scan** (per [`cross-source-consistency`](../../rules/cross-source-consistency.md)): where the source ticket carries text + an attachment/mockup, or leaves a clearly-needed behavior unstated (weekend/holiday shift, empty/error state, timezone), surface the conflict/gap as an *Open question* before drafting phases — an inferred behavior is a scope expansion to confirm, not to bake in. See [`cross-source-consistency-mechanics`](../../guidelines/agent-infra/cross-source-consistency-mechanics.md).
32
32
  2. **Analyze scope** — Which modules, routes, models, services are affected?
33
33
  3. **Write the plan** — Create a feature plan document (see template below).
34
34
  4. **Verify** — Confirm all affected areas are identified, no missing dependencies.