hatch3r 1.9.0 → 2.0.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 (288) hide show
  1. package/README.md +52 -143
  2. package/dist/cli/index.js +28453 -15831
  3. package/dist/content/agents/hatch3r-architect.md +39 -9
  4. package/dist/content/agents/hatch3r-brownfield-spec.md +254 -0
  5. package/dist/content/agents/hatch3r-ci-watcher.md +8 -1
  6. package/dist/content/agents/hatch3r-context-rules.md +19 -1
  7. package/dist/content/agents/hatch3r-creator.md +65 -26
  8. package/dist/content/agents/hatch3r-dependency-drafter.md +162 -0
  9. package/dist/content/agents/hatch3r-devops.md +11 -1
  10. package/dist/content/agents/hatch3r-docs-writer.md +11 -1
  11. package/dist/content/agents/hatch3r-edge-case-analyst.md +134 -0
  12. package/dist/content/agents/hatch3r-enhancability.md +192 -0
  13. package/dist/content/agents/hatch3r-fixer.md +59 -8
  14. package/dist/content/agents/hatch3r-greenfield-spec.md +256 -0
  15. package/dist/content/agents/hatch3r-handoff-loader.md +29 -3
  16. package/dist/content/agents/hatch3r-handoff-preparer.md +10 -1
  17. package/dist/content/agents/hatch3r-implementer.md +139 -8
  18. package/dist/content/agents/hatch3r-incident-responder.md +96 -0
  19. package/dist/content/agents/hatch3r-learnings-loader.md +122 -88
  20. package/dist/content/agents/hatch3r-lint-fixer.md +15 -3
  21. package/dist/content/agents/hatch3r-maintainability.md +183 -0
  22. package/dist/content/agents/hatch3r-pack-installer.md +113 -0
  23. package/dist/content/agents/hatch3r-performance.md +179 -0
  24. package/dist/content/agents/hatch3r-reliability.md +193 -0
  25. package/dist/content/agents/hatch3r-researcher.md +27 -4
  26. package/dist/content/agents/hatch3r-reviewer.md +153 -103
  27. package/dist/content/agents/hatch3r-scalability.md +162 -0
  28. package/dist/content/agents/hatch3r-security.md +197 -0
  29. package/dist/content/agents/hatch3r-testability.md +204 -0
  30. package/dist/content/agents/hatch3r-ui.md +175 -0
  31. package/dist/content/agents/hatch3r-ux.md +160 -0
  32. package/dist/content/agents/modes/requirements-elicitation.md +1 -1
  33. package/dist/content/agents/modes/user-flows.md +2 -2
  34. package/dist/content/agents/shared/clarification-default-block.md +44 -0
  35. package/dist/content/agents/shared/confidence-gate.md +42 -0
  36. package/dist/content/agents/shared/cq-specialist-roster.md +26 -0
  37. package/dist/content/agents/shared/efficiency-patterns.md +32 -1
  38. package/dist/content/agents/shared/injection-patterns.md +18 -7
  39. package/dist/content/agents/shared/principles.md +60 -0
  40. package/dist/content/agents/shared/prompt-structure.md +7 -1
  41. package/dist/content/agents/shared/quality-charter.md +48 -12
  42. package/dist/content/agents/shared/quality-specialist-frame.md +141 -0
  43. package/dist/content/agents/shared/rigor-contract.md +151 -0
  44. package/dist/content/agents/shared/severity-mapping.md +92 -0
  45. package/dist/content/agents/shared/triage-vocabulary.md +46 -0
  46. package/dist/content/agents/shared/user-content-templates.md +34 -8
  47. package/dist/content/agents/shared/user-question-protocol.md +45 -3
  48. package/dist/content/checks/README.md +5 -0
  49. package/dist/content/checks/accessibility.md +14 -7
  50. package/dist/content/checks/code-quality.md +1 -1
  51. package/dist/content/checks/performance.md +7 -4
  52. package/dist/content/checks/security.md +6 -6
  53. package/dist/content/checks/testing.md +1 -1
  54. package/dist/content/commands/board/pickup-delegation-multi.md +37 -10
  55. package/dist/content/commands/board/pickup-delegation.md +7 -5
  56. package/dist/content/commands/board/pickup-modes.md +1 -0
  57. package/dist/content/commands/board/pickup-post-impl.md +1 -1
  58. package/dist/content/commands/hatch3r-api-spec.md +79 -2
  59. package/dist/content/commands/hatch3r-auth-scaffold.md +250 -0
  60. package/dist/content/commands/hatch3r-benchmark.md +90 -7
  61. package/dist/content/commands/hatch3r-board-fill.md +97 -11
  62. package/dist/content/commands/hatch3r-board-pickup.md +93 -9
  63. package/dist/content/commands/hatch3r-bug-pipeline.md +240 -0
  64. package/dist/content/commands/hatch3r-bug-plan.md +79 -3
  65. package/dist/content/commands/hatch3r-codebase-map.md +80 -4
  66. package/dist/content/commands/hatch3r-create.md +105 -7
  67. package/dist/content/commands/hatch3r-debug.md +102 -14
  68. package/dist/content/commands/hatch3r-diagnose.md +238 -0
  69. package/dist/content/commands/hatch3r-feature-plan.md +125 -5
  70. package/dist/content/commands/hatch3r-handoff.md +83 -3
  71. package/dist/content/commands/hatch3r-healthcheck.md +105 -5
  72. package/dist/content/commands/hatch3r-incident-response.md +228 -0
  73. package/dist/content/commands/hatch3r-migration-plan.md +79 -3
  74. package/dist/content/commands/hatch3r-onboard.md +94 -3
  75. package/dist/content/commands/hatch3r-pack-install.md +243 -0
  76. package/dist/content/commands/hatch3r-pr-resolve.md +106 -23
  77. package/dist/content/commands/hatch3r-project-spec.md +82 -6
  78. package/dist/content/commands/hatch3r-quick-change.md +108 -13
  79. package/dist/content/commands/hatch3r-refactor-plan.md +78 -2
  80. package/dist/content/commands/hatch3r-release.md +401 -0
  81. package/dist/content/commands/hatch3r-revision.md +98 -12
  82. package/dist/content/commands/hatch3r-roadmap.md +92 -10
  83. package/dist/content/commands/hatch3r-security-audit.md +105 -5
  84. package/dist/content/commands/hatch3r-slo-scaffold.md +246 -0
  85. package/dist/content/commands/hatch3r-spec.md +216 -0
  86. package/dist/content/commands/hatch3r-test-plan.md +85 -9
  87. package/dist/content/commands/hatch3r-workflow.md +165 -41
  88. package/dist/content/commands/revision/revision-delegation.md +6 -5
  89. package/dist/content/commands/revision/revision-modes.md +49 -4
  90. package/dist/content/commands/revision/revision-quality.md +10 -7
  91. package/dist/content/commands/shared/orchestration-frame.md +119 -0
  92. package/dist/content/github-agents/hatch3r-docs-agent.md +21 -1
  93. package/dist/content/github-agents/hatch3r-lint-agent.md +21 -1
  94. package/dist/content/github-agents/hatch3r-security-agent.md +21 -1
  95. package/dist/content/github-agents/hatch3r-test-agent.md +21 -1
  96. package/dist/content/hooks/hatch3r-file-save.md +1 -1
  97. package/dist/content/hooks/hatch3r-pre-push.md +4 -4
  98. package/dist/content/hooks/hatch3r-review-loop-cap.md +52 -0
  99. package/dist/content/mcp/mcp.json +7 -5
  100. package/dist/content/rules/hatch3r-accessibility-standards.md +14 -2
  101. package/dist/content/rules/hatch3r-accessibility-standards.mdc +12 -1
  102. package/dist/content/rules/hatch3r-agent-orchestration-detail.md +58 -19
  103. package/dist/content/rules/hatch3r-agent-orchestration-detail.mdc +58 -19
  104. package/dist/content/rules/hatch3r-agent-orchestration.md +87 -213
  105. package/dist/content/rules/hatch3r-agent-orchestration.mdc +87 -213
  106. package/dist/content/rules/hatch3r-ai-evals.md +5 -4
  107. package/dist/content/rules/hatch3r-ai-evals.mdc +3 -3
  108. package/dist/content/rules/hatch3r-ai-ux-patterns.md +6 -2
  109. package/dist/content/rules/hatch3r-ai-ux-patterns.mdc +4 -1
  110. package/dist/content/rules/hatch3r-android-patterns.md +107 -0
  111. package/dist/content/rules/hatch3r-android-patterns.mdc +102 -0
  112. package/dist/content/rules/hatch3r-anti-duplication.md +115 -0
  113. package/dist/content/rules/hatch3r-anti-duplication.mdc +115 -0
  114. package/dist/content/rules/hatch3r-api-design.md +5 -1
  115. package/dist/content/rules/hatch3r-api-design.mdc +3 -0
  116. package/dist/content/rules/hatch3r-api-versioning.md +2 -1
  117. package/dist/content/rules/hatch3r-auth-patterns.md +3 -1
  118. package/dist/content/rules/hatch3r-auth-patterns.mdc +1 -0
  119. package/dist/content/rules/hatch3r-browser-verification.md +2 -0
  120. package/dist/content/rules/hatch3r-browser-verification.mdc +2 -0
  121. package/dist/content/rules/hatch3r-capability-matrix.md +108 -0
  122. package/dist/content/rules/hatch3r-capability-matrix.mdc +108 -0
  123. package/dist/content/rules/hatch3r-ci-cd.md +8 -1
  124. package/dist/content/rules/hatch3r-ci-cd.mdc +6 -0
  125. package/dist/content/rules/hatch3r-clarification-default.md +73 -0
  126. package/dist/content/rules/hatch3r-clarification-default.mdc +73 -0
  127. package/dist/content/rules/hatch3r-code-standards.md +23 -47
  128. package/dist/content/rules/hatch3r-code-standards.mdc +22 -46
  129. package/dist/content/rules/hatch3r-component-conventions.md +3 -0
  130. package/dist/content/rules/hatch3r-component-conventions.mdc +3 -0
  131. package/dist/content/rules/hatch3r-container-hardening.md +11 -2
  132. package/dist/content/rules/hatch3r-container-hardening.mdc +9 -1
  133. package/dist/content/rules/hatch3r-contract-testing.md +2 -1
  134. package/dist/content/rules/hatch3r-cost-visibility.md +135 -0
  135. package/dist/content/rules/hatch3r-cost-visibility.mdc +135 -0
  136. package/dist/content/rules/hatch3r-cq-rule-frame.md +54 -0
  137. package/dist/content/rules/hatch3r-cq-rule-frame.mdc +49 -0
  138. package/dist/content/rules/hatch3r-data-classification.md +3 -1
  139. package/dist/content/rules/hatch3r-data-classification.mdc +2 -1
  140. package/dist/content/rules/hatch3r-deep-context.md +13 -13
  141. package/dist/content/rules/hatch3r-deep-context.mdc +13 -13
  142. package/dist/content/rules/hatch3r-dependency-management.md +16 -3
  143. package/dist/content/rules/hatch3r-dependency-management.mdc +15 -3
  144. package/dist/content/rules/hatch3r-design-system-detection.md +2 -1
  145. package/dist/content/rules/hatch3r-dotnet-patterns.md +104 -0
  146. package/dist/content/rules/hatch3r-dotnet-patterns.mdc +99 -0
  147. package/dist/content/rules/hatch3r-edge-case-discipline.md +65 -0
  148. package/dist/content/rules/hatch3r-edge-case-discipline.mdc +65 -0
  149. package/dist/content/rules/hatch3r-enhancability.md +147 -0
  150. package/dist/content/rules/hatch3r-enhancability.mdc +142 -0
  151. package/dist/content/rules/hatch3r-event-schema-evolution.md +2 -1
  152. package/dist/content/rules/hatch3r-fan-out-discipline.md +91 -0
  153. package/dist/content/rules/hatch3r-fan-out-discipline.mdc +91 -0
  154. package/dist/content/rules/hatch3r-feature-flags.md +2 -0
  155. package/dist/content/rules/hatch3r-feature-flags.mdc +2 -0
  156. package/dist/content/rules/hatch3r-flutter-patterns.md +88 -0
  157. package/dist/content/rules/hatch3r-flutter-patterns.mdc +83 -0
  158. package/dist/content/rules/hatch3r-git-conventions.md +4 -1
  159. package/dist/content/rules/hatch3r-git-conventions.mdc +2 -0
  160. package/dist/content/rules/hatch3r-go-patterns.md +98 -0
  161. package/dist/content/rules/hatch3r-go-patterns.mdc +93 -0
  162. package/dist/content/rules/hatch3r-handoff-readiness.md +10 -0
  163. package/dist/content/rules/hatch3r-handoff-readiness.mdc +10 -0
  164. package/dist/content/rules/hatch3r-i18n.md +2 -0
  165. package/dist/content/rules/hatch3r-i18n.mdc +2 -0
  166. package/dist/content/rules/hatch3r-iteration-summary.md +75 -57
  167. package/dist/content/rules/hatch3r-iteration-summary.mdc +77 -54
  168. package/dist/content/rules/hatch3r-learning-system.md +202 -0
  169. package/dist/content/rules/hatch3r-learning-system.mdc +202 -0
  170. package/dist/content/rules/hatch3r-maintainability.md +157 -0
  171. package/dist/content/rules/hatch3r-maintainability.mdc +152 -0
  172. package/dist/content/rules/hatch3r-migrations.md +2 -1
  173. package/dist/content/rules/hatch3r-observability-logging.md +1 -1
  174. package/dist/content/rules/hatch3r-observability-metrics.md +1 -1
  175. package/dist/content/rules/hatch3r-observability-tracing.md +45 -36
  176. package/dist/content/rules/hatch3r-observability-tracing.mdc +44 -35
  177. package/dist/content/rules/hatch3r-operability.md +2 -1
  178. package/dist/content/rules/hatch3r-passkey-server.md +2 -1
  179. package/dist/content/rules/hatch3r-performance-budgets.md +2 -0
  180. package/dist/content/rules/hatch3r-performance-budgets.mdc +2 -0
  181. package/dist/content/rules/hatch3r-php-laravel-patterns.md +109 -0
  182. package/dist/content/rules/hatch3r-php-laravel-patterns.mdc +104 -0
  183. package/dist/content/rules/hatch3r-progressive-delivery.md +5 -1
  184. package/dist/content/rules/hatch3r-progressive-delivery.mdc +3 -0
  185. package/dist/content/rules/hatch3r-proof-model.md +131 -0
  186. package/dist/content/rules/hatch3r-proof-model.mdc +131 -0
  187. package/dist/content/rules/hatch3r-python-patterns.md +70 -0
  188. package/dist/content/rules/hatch3r-python-patterns.mdc +65 -0
  189. package/dist/content/rules/hatch3r-react-native-patterns.md +83 -0
  190. package/dist/content/rules/hatch3r-react-native-patterns.mdc +78 -0
  191. package/dist/content/rules/hatch3r-resilience-patterns.md +2 -1
  192. package/dist/content/rules/hatch3r-reviewer-calibration.md +84 -0
  193. package/dist/content/rules/hatch3r-reviewer-calibration.mdc +84 -0
  194. package/dist/content/rules/hatch3r-right-sizing.md +68 -0
  195. package/dist/content/rules/hatch3r-right-sizing.mdc +66 -0
  196. package/dist/content/rules/hatch3r-ruby-rails-patterns.md +111 -0
  197. package/dist/content/rules/hatch3r-ruby-rails-patterns.mdc +106 -0
  198. package/dist/content/rules/hatch3r-rust-patterns.md +107 -0
  199. package/dist/content/rules/hatch3r-rust-patterns.mdc +102 -0
  200. package/dist/content/rules/hatch3r-scalability.md +137 -0
  201. package/dist/content/rules/hatch3r-scalability.mdc +132 -0
  202. package/dist/content/rules/hatch3r-secrets-management.md +10 -1
  203. package/dist/content/rules/hatch3r-secrets-management.mdc +8 -0
  204. package/dist/content/rules/hatch3r-security-patterns.md +36 -34
  205. package/dist/content/rules/hatch3r-security-patterns.mdc +35 -34
  206. package/dist/content/rules/hatch3r-security.md +97 -0
  207. package/dist/content/rules/hatch3r-security.mdc +92 -0
  208. package/dist/content/rules/hatch3r-swiftui-patterns.md +98 -0
  209. package/dist/content/rules/hatch3r-swiftui-patterns.mdc +93 -0
  210. package/dist/content/rules/hatch3r-testability.md +115 -0
  211. package/dist/content/rules/hatch3r-testability.mdc +110 -0
  212. package/dist/content/rules/hatch3r-testing.md +4 -1
  213. package/dist/content/rules/hatch3r-testing.mdc +2 -0
  214. package/dist/content/rules/hatch3r-theming.md +2 -0
  215. package/dist/content/rules/hatch3r-theming.mdc +2 -0
  216. package/dist/content/rules/hatch3r-tool-currency.md +91 -0
  217. package/dist/content/rules/hatch3r-tool-currency.mdc +86 -0
  218. package/dist/content/rules/hatch3r-tooling-hierarchy.md +29 -31
  219. package/dist/content/rules/hatch3r-tooling-hierarchy.mdc +27 -30
  220. package/dist/content/rules/hatch3r-typescript-patterns.md +58 -0
  221. package/dist/content/rules/hatch3r-typescript-patterns.mdc +53 -0
  222. package/dist/content/rules/hatch3r-ux-states-and-flows.md +11 -4
  223. package/dist/content/rules/hatch3r-ux-states-and-flows.mdc +9 -3
  224. package/dist/content/skills/hatch3r-a11y-audit/SKILL.md +10 -8
  225. package/dist/content/skills/hatch3r-a11y-audit/references/manual-audit-checklist.md +7 -5
  226. package/dist/content/skills/hatch3r-adhoc-orchestrate/SKILL.md +131 -0
  227. package/dist/content/skills/hatch3r-ai-feature/SKILL.md +4 -6
  228. package/dist/content/skills/hatch3r-api-spec/SKILL.md +27 -2
  229. package/dist/content/skills/hatch3r-architecture-review/SKILL.md +4 -7
  230. package/dist/content/skills/hatch3r-board-groom/SKILL.md +11 -0
  231. package/dist/content/skills/hatch3r-board-init/SKILL.md +17 -1
  232. package/dist/content/skills/hatch3r-board-refresh/SKILL.md +12 -1
  233. package/dist/content/skills/hatch3r-board-shared/SKILL.md +38 -1
  234. package/dist/content/skills/hatch3r-browser-verify/SKILL.md +307 -0
  235. package/dist/content/skills/hatch3r-bug-fix/SKILL.md +15 -2
  236. package/dist/content/skills/hatch3r-ci-pipeline/SKILL.md +17 -7
  237. package/dist/content/skills/hatch3r-cli-fd/SKILL.md +33 -1
  238. package/dist/content/skills/hatch3r-cli-fzf/SKILL.md +33 -1
  239. package/dist/content/skills/hatch3r-cli-gh/SKILL.md +50 -1
  240. package/dist/content/skills/hatch3r-cli-jq/SKILL.md +40 -6
  241. package/dist/content/skills/hatch3r-cli-ripgrep/SKILL.md +33 -1
  242. package/dist/content/skills/hatch3r-cli-toolbox/SKILL.md +130 -23
  243. package/dist/content/skills/hatch3r-containerize/SKILL.md +157 -0
  244. package/dist/content/skills/hatch3r-context-health/SKILL.md +9 -7
  245. package/dist/content/skills/hatch3r-cost-tracking/SKILL.md +37 -17
  246. package/dist/content/skills/hatch3r-customize/SKILL.md +5 -8
  247. package/dist/content/skills/hatch3r-dep-audit/SKILL.md +23 -7
  248. package/dist/content/skills/hatch3r-design-system-detect/SKILL.md +3 -7
  249. package/dist/content/skills/hatch3r-docs-writing/SKILL.md +159 -0
  250. package/dist/content/skills/hatch3r-enhancability-verify/SKILL.md +152 -0
  251. package/dist/content/skills/hatch3r-feature/SKILL.md +53 -3
  252. package/dist/content/skills/hatch3r-feedback/SKILL.md +103 -0
  253. package/dist/content/skills/hatch3r-gh-agentic-workflows/SKILL.md +10 -8
  254. package/dist/content/skills/hatch3r-handoff-prepare/SKILL.md +4 -7
  255. package/dist/content/skills/hatch3r-handoff-resume/SKILL.md +4 -7
  256. package/dist/content/{commands/hatch3r-hooks.md → skills/hatch3r-hooks/SKILL.md} +48 -137
  257. package/dist/content/skills/hatch3r-incident-response/SKILL.md +66 -7
  258. package/dist/content/skills/hatch3r-issue-workflow/SKILL.md +11 -0
  259. package/dist/content/skills/hatch3r-learn/SKILL.md +317 -0
  260. package/dist/content/skills/hatch3r-logical-refactor/SKILL.md +6 -7
  261. package/dist/content/skills/hatch3r-maintainability-verify/SKILL.md +146 -0
  262. package/dist/content/skills/hatch3r-migration/SKILL.md +8 -7
  263. package/dist/content/skills/hatch3r-observability-verify/SKILL.md +17 -12
  264. package/dist/content/skills/hatch3r-perf-audit/SKILL.md +13 -9
  265. package/dist/content/skills/hatch3r-pr-creation/SKILL.md +4 -7
  266. package/dist/content/skills/hatch3r-qa-validation/SKILL.md +6 -5
  267. package/dist/content/skills/hatch3r-recipe/SKILL.md +63 -60
  268. package/dist/content/skills/hatch3r-refactor/SKILL.md +6 -7
  269. package/dist/content/skills/hatch3r-release/SKILL.md +123 -11
  270. package/dist/content/skills/hatch3r-reliability-verify/SKILL.md +9 -5
  271. package/dist/content/{commands/hatch3r-report.md → skills/hatch3r-report/SKILL.md} +20 -17
  272. package/dist/content/skills/hatch3r-scalability-verify/SKILL.md +145 -0
  273. package/dist/content/skills/hatch3r-security-verify/SKILL.md +144 -0
  274. package/dist/content/skills/hatch3r-team-convention-author/SKILL.md +126 -0
  275. package/dist/content/skills/hatch3r-testability-verify/SKILL.md +147 -0
  276. package/dist/content/skills/hatch3r-ui-ux-verify/SKILL.md +19 -11
  277. package/dist/content/skills/hatch3r-visual-refactor/SKILL.md +11 -7
  278. package/package.json +50 -31
  279. package/dist/cli/index.d.ts +0 -2
  280. package/dist/cli/index.js.map +0 -1
  281. package/dist/content/agents/hatch3r-a11y-auditor.md +0 -159
  282. package/dist/content/agents/hatch3r-dependency-auditor.md +0 -219
  283. package/dist/content/agents/hatch3r-perf-profiler.md +0 -166
  284. package/dist/content/agents/hatch3r-security-auditor.md +0 -180
  285. package/dist/content/agents/hatch3r-test-writer.md +0 -171
  286. package/dist/content/commands/hatch3r-learn.md +0 -312
  287. package/dist/content/rules/hatch3r-learning-consult.md +0 -42
  288. package/dist/content/rules/hatch3r-learning-consult.mdc +0 -38
@@ -0,0 +1,141 @@
1
+ ---
2
+ id: shared-quality-specialist-frame
3
+ type: reference
4
+ description: Shared structural frame (ambiguity, external-knowledge, confidence, delegation, output schema) for the 9 content-quality CQ1–CQ9 specialist agents.
5
+ tags: [reference]
6
+ ---
7
+
8
+ # Quality Specialist Frame
9
+
10
+ > **Pillars:** P2 (Scientific & Practical Quality), P4 (Lean Coverage), P5 (Governance Self-Quality), P8 (Clarification & Fan-out Discipline)
11
+ > Shared framing for the 9 content-quality (CQ1–CQ9) specialist agents — `hatch3r-{ui, ux, security, reliability, testability, scalability, performance, maintainability, enhancability}.md`.
12
+
13
+ Each CQ specialist owns one content-quality vector (CQ1-CQ9; see `agents/shared/principles.md`). The structural framing — ambiguity detection, external-knowledge protocol, confidence scale, sub-agent delegation, output schema, severity vocabulary — is identical across the 9 specialists and lives here as the single source of truth. Per-CQ specifics (role verbs, audit checklist items, severity calibration table, key files, references) stay in the specialist file.
14
+
15
+ Citing this file via `See agents/shared/quality-specialist-frame.md → §<section>` is the canonical incorporation pattern.
16
+
17
+ ---
18
+
19
+ ## Role assertion (opening sentence)
20
+
21
+ Every CQ specialist's body opens with one role-assertion sentence in this exact shape (D5-SA5.8-F5.8-12 — canonical cadence; replaces the four pre-2.0.0 opening dialects: CQ-owner / specialist-for-the-project / specialist-for-end-user-services / long-form §2B citation):
22
+
23
+ ```
24
+ You are the <Name> quality-vector specialist for hatch3r 2.0.0 — the CQ<N> owner. Your remit is <one-sentence measurable scope statement>.
25
+ ```
26
+
27
+ - `<Name>` is the vector name (UI, UX, Security, Reliability, Testability, Scalability, Performance, Maintainability, Enhancability).
28
+ - `<N>` is the CQ pillar number 1-9, matching the content-quality pillar list (see `agents/shared/principles.md`).
29
+ - `Your remit is …` names the measurable surface the specialist owns (the CQ thresholds for that vector), not prose praise.
30
+ - A specialist whose scope includes authoring (e.g. `hatch3r-testability` writes missing test classes; `hatch3r-enhancability` gates without authoring) appends one sentence stating the author-vs-gate boundary after the remit sentence.
31
+
32
+ New specialists added under this frame copy the shape verbatim and fill the three slots — they do not invent a new opening dialect.
33
+
34
+ ---
35
+
36
+ ## §0 Detect Ambiguity (P8 B1)
37
+
38
+ The protocol body is the canonical text in `agents/shared/clarification-default-block.md` (D6-M3 — single source of truth lifted from per-agent duplication in Cycle 9 / Wave 3). Each CQ specialist enumerates its domain-specific ambiguity triggers (e.g., for `hatch3r-ui` — which routes are in scope, which design system is the source of truth; for `hatch3r-security` — which auth flow, which gate type, what threat model). The protocol is the constant; the trigger list is the variable.
39
+
40
+ ---
41
+
42
+ ## External Knowledge
43
+
44
+ Follow the shared protocol in `agents/shared/external-knowledge.md` (tooling hierarchy, platform CLI, Context7 MCP, web research). Each specialist names its **Context7 focus** (library APIs the specialist queries) and its **Web research focus** (publication recency window ≤12 months per `agents/shared/rigor-contract.md`).
45
+
46
+ ---
47
+
48
+ ## Confidence Expression
49
+
50
+ Rate every claim, recommendation, and finding as **high**, **medium**, or **low** per `agents/shared/quality-charter.md` §1:
51
+
52
+ - **High:** Verified by an executable check the specialist ran in this session — tool invocation, command-line gate, live measurement, replay against a test harness — with the verbatim tool output captured in `proof_trace.actual` and the verdict recorded as `matched` or `mismatched`.
53
+ - **Medium:** Confirmed by static inspection of the file on disk (configuration read, code path traced, schema verified) but not exercised end-to-end. The reading is current; the runtime path may differ.
54
+ - **Low:** Heuristic judgment from pattern recognition alone. Recommend re-measuring before acting on the finding. Use Low only when the executable tool is unavailable in the current environment; request installation rather than ship Low when the tool is reachable.
55
+
56
+ Confidence appears on every audit-checklist row, every finding's `proof_trace`, and the overall `status`. Overclaiming confidence is itself a finding per `agents/shared/rigor-contract.md` §Scientific Rigor Contract test 3. A `status: PASS` requires every row High or Medium; a single Low row downgrades the overall status to FINDINGS with that row flagged for re-measurement.
57
+
58
+ ---
59
+
60
+ ## Sub-agent delegation
61
+
62
+ When the review surface decomposes into independent units (routes, flows, services, dependency layers, mandate classes, surfaces), fan out one sub-agent per unit:
63
+
64
+ 1. **Identify the unit of decomposition.** The specialist file names the unit (route for `hatch3r-ui`, flow for `hatch3r-ux`, security domain for `hatch3r-security`, service or layer for `hatch3r-reliability`, mandate class for `hatch3r-testability`, etc.).
65
+ 2. **Spawn one sub-agent per unit via the Task tool.** Provide: unit identifier, the per-unit checklist subset, links to the relevant rules and skills.
66
+ 3. **Verify parallel-safety conditions** per `rules/hatch3r-agent-orchestration.md` §Parallel Safety — read-only or disjoint writes, deterministic aggregation, no shared mutable state.
67
+ 4. **Run unit audits in parallel.** Units are independent under the conditions above.
68
+ 5. **Aggregate results** into a single CQ report with per-unit rows; deduplicate findings that recur across units (one report at the shared-component level, not one per consumer).
69
+ 6. **Serialize only on dependency edges** — aggregation runs after per-unit measurements complete; cross-unit pattern passes run once per-unit outputs are durable.
70
+
71
+ ### Cost-dominance (P8 B2)
72
+
73
+ Sub-agent count tracks the present unit count — never reduce below unit count to save tokens. Token cost of additional sub-agents is dominated by quality gain from isolated specialist contexts. Serialization is only valid on dependency edges or on shared-resource contention (e.g., two specialists hitting the same staging endpoint will skew each other's latency measurements). The `sub_agents_spawned` field in the output schema records the count and per-unit rationale. Cost-dominance is anchored in `rules/hatch3r-fan-out-discipline.md`.
74
+
75
+ ### End-of-Turn Delegation Attestation
76
+
77
+ When the CQ specialist delegates to sub-agents, the orchestrator quotes the `delegation_proof_id` returned by each spawned sub-agent in the End-of-Turn Delegation Attestation block per `rules/hatch3r-agent-orchestration.md`. Skipping the attestation while claiming fan-out is a self-declared P8 B2 violation.
78
+
79
+ ### Wall-clock advisory (`specialist-eval` phase)
80
+
81
+ Each CQ specialist runs under the `specialist-eval` phase budget (`src/pipeline/phaseTimeout.ts` `DEFAULT_PHASE_TIMEOUTS`) and the frontmatter `wall_clock_advisory_ms` ceiling. If you observe yourself approaching the advisory before the checklist completes, return `status: FINDINGS` with audited units marked and unaudited units listed under a `deferred:` note rather than exhausting the budget silently — a partial gate with a visible remainder beats a TIMEOUT with no result.
82
+
83
+ ---
84
+
85
+ ## Output Contract
86
+
87
+ Every CQ specialist returns a structured result conforming to the schema below per `agents/shared/rigor-contract.md` §Proof Trace Contract + Decision 17 (impact-gating). Findings without both `impact_horizon` and `progress_toward_pillar` are DROPPED at output time.
88
+
89
+ ### Canonical id format (D5-M1)
90
+
91
+ All specialist finding ids follow the canonical pattern `cq<N>-<short-slug>-<3-digit-seq>` (e.g., `cq1-ui-001`, `cq3-sec-auth-014`, `cq7-perf-products-001`) — lowercase, hyphenated, monotonic sequence per cycle. `<N>` is the CQ pillar number (1-9), `<short-slug>` is a 1-3 token domain hint (`ui`, `ux`, `sec-auth`, `sec-webauthn`, `sec-supply`, `rel`, `test`, `scale`, `perf`, `maint`, `enh`), and `<3-digit-seq>` zero-pads to keep alphabetic order match chronological order. Per-specialist customizations (e.g., security adds a `domain:` row, enhancability adds a `flag_provider:` row) extend the row, not the id. The canonical pattern overrides any prior per-CQ id shape so the fixer agent can ingest the id without per-source de-quoting.
92
+
93
+ ```yaml
94
+ sub_agents_spawned:
95
+ count: <integer>
96
+ rationale: <one-sentence task-decomposition justification>
97
+ findings:
98
+ - id: cq<N>-<short-slug>-<3-digit-seq> # D5-M1 canonical pattern
99
+ severity: Critical | High | Medium | Low | Info
100
+ claim: <one-sentence assertion of the violation>
101
+ proof_trace:
102
+ claim: <verifiable assertion>
103
+ command: <bash invocation OR Read tool call OR grep pattern>
104
+ expected: <pattern OR threshold>
105
+ actual: <verbatim ≤200 chars from tool output>
106
+ verdict: matched | mismatched
107
+ accessed: <ISO date>
108
+ impact_horizon: short | medium | long
109
+ progress_toward_pillar: content-quality.CQ<N>+<delta>
110
+ status: PASS | FINDINGS | CRITICAL
111
+ ```
112
+
113
+ `status: PASS` requires every checklist item green AND every finding row High or Medium confidence. `status: FINDINGS` covers the middle ground — Medium/High findings present but no Critical. `status: CRITICAL` is produced when any item shows a Critical-severity finding (the specialist file documents the per-CQ critical triggers in its Severity Calibration table).
114
+
115
+ ### sub_agents_spawned emission contract (D5-M8, P8 B2)
116
+
117
+ The `sub_agents_spawned` field is MANDATORY on every specialist output — not optional, not "emit when delegating". A specialist that ran no sub-agents emits `sub_agents_spawned: {count: 0, rationale: "single-unit audit — no decomposition triggered"}`; a specialist that delegated to N per-unit sub-agents emits `sub_agents_spawned: {count: N, rationale: "<one-sentence decomposition>"}`. Omitting the field on a specialist output is a P8 B2 violation per `rules/hatch3r-fan-out-discipline.md` ("Delegating artifacts emit sub-agent count + rationale as a first-class output field"). The orchestrator rejects a specialist response missing `sub_agents_spawned` and re-invokes the specialist with the contract restated.
118
+
119
+ ### Severity vocabulary
120
+
121
+ The `PASS | FINDINGS | CRITICAL` status maps to canonical audit severity via the **Specialist Status** column in `agents/shared/severity-mapping.md` — `CRITICAL → Critical`, `FINDINGS → High + Medium`, `PASS → Low + Info`. Map through that table when escalating to `hatch3r-fixer` or feeding the release decision.
122
+
123
+ ### Verification harness
124
+
125
+ Each CQ specialist names its executable verification harness in `skills/hatch3r-<harness>` (e.g., `hatch3r-ui-ux-verify` for CQ1+CQ2, `hatch3r-reliability-verify` for CQ4). The specialist owns the budget decision (thresholds, calibration); the skill owns the measurement (the inverse-citation appears under that skill's `## Invoked by`).
126
+
127
+ ---
128
+
129
+ ## Boundaries (shared scaffolding)
130
+
131
+ Each specialist file fills in the CQ-specific entries; the scaffolding is constant:
132
+
133
+ - **Always:** Run the executable tool before claiming a High-confidence finding. Capture verbatim tool output in `proof_trace.actual`. Consult `.hatch3r/learnings/INDEX.md` when present per `agents/shared/quality-charter.md` §10. Emit `progress_toward_pillar: content-quality.CQ<N>+<delta>` on every finding.
134
+ - **Ask first:** Before disabling a rule, weakening a threshold, or recommending a scope contraction. Surface a 2–4-option question via `agents/shared/user-question-protocol.md` with the smallest-blast-radius default.
135
+ - **Never:** Skip the proof_trace block on a state-dependent claim per `agents/shared/rigor-contract.md` §Proof Trace Contract. Sign off a specialist gate while any non-deferred row sits at FAIL. Overclaim confidence — Low caps at Low until the executable check runs.
136
+
137
+ ---
138
+
139
+ ## How specialists incorporate this frame
140
+
141
+ The CQ specialist's body cites the relevant section instead of repeating it. Example: `See agents/shared/quality-specialist-frame.md → §0 Detect Ambiguity (P8 B1)`. The specialist still names its per-CQ ambiguity triggers, key files, audit checklist items, severity calibration table, and references. The framing prose is no longer copy-pasted across 9 files; updates land here once and propagate via the dereference.
@@ -0,0 +1,151 @@
1
+ ---
2
+ id: shared-rigor-contract
3
+ type: reference
4
+ description: Scientific rigor contract and web-research mandate for sub-agent prompts and finding-recording workflows.
5
+ tags: [reference]
6
+ ---
7
+
8
+ # Scientific Rigor Contract & Web Research Mandate
9
+
10
+ > Last updated: 2026-05-26
11
+ > Pillars: P2 (primary), P5 (supporting), P3 (supporting).
12
+ > Canonical for: all sub-agent prompts and audit/evolve workflows that record findings.
13
+
14
+ ## Purpose
15
+
16
+ Single source of truth for the rigor every governance prompt and audit sub-agent applies before recording a finding. The audit prompt, the evolve prompt, and all audit domain files reference this file rather than restating it (Anti-Bloat Principle 1: Single Source of Truth, per the governance self-quality pillar P5).
17
+
18
+ ---
19
+
20
+ ## Web Research Mandate
21
+
22
+ Every empirical claim and every "current practice" assertion grounds in live web research, not training-data recall.
23
+
24
+ 1. **Source minimum.** ≥2 independent sources per empirical claim. Independence = different author, organisation, and funder.
25
+ 2. **Citation format.** URL + access date (YYYY-MM-DD) + author/organisation + trust tier. Inline format example: `[source](https://example.com) (accessed 2026-04-19, OWASP, official-docs)`.
26
+ 3. **Trust tiers** (highest → lowest):
27
+ - `official-docs` — vendor or standards-body primary documentation
28
+ - `peer-reviewed` — published research with peer review
29
+ - `vendor-note` — vendor blog, technical note, changelog
30
+ - `independent-analysis` — third-party benchmark or analysis from a credentialed source
31
+ - `blog-post` — individual technical blog or community write-up
32
+ 4. **Recency windows.** Technology and platform-documentation claims ≤12 months old; published research ≤36 months. Stale source → confidence downgrade one band.
33
+ 5. **Paywall handling.** Paywalled sources accepted only if a public summary OR a secondary citation is available; otherwise the dependent claim downgrades to Low confidence.
34
+ 6. **404 / withdrawn sources.** Trigger a re-research pass before the finding is accepted. Do not cite a source that no longer resolves.
35
+
36
+ ---
37
+
38
+ ## Scientific Rigor Contract
39
+
40
+ Every finding satisfies six tests, drawn from established empirical practice. A finding missing any test is rejected before inclusion.
41
+
42
+ 1. **Falsifiability (Popper).** Record one observation that would disprove the finding. A non-falsifiable claim is rejected.
43
+ 2. **Triangulation.** ≥2 independent sources per empirical claim, OR a file path + line number reference for code-behaviour claims. Where the claim depends on external state, triangulate across at least two independent sources per the Web Research Mandate.
44
+ 3. **Confidence with basis.** Express as High / Medium / Low with the basis named — direct measurement, sampled observation, inference from analogue. Overclaiming confidence is itself a finding.
45
+ 4. **Root-cause chain.** Distinguish symptom from systemic driver using a causal chain of at minimum three steps. Symptomatic fixes ship as Info; the systemic driver is the Medium-or-higher finding.
46
+ 5. **Bias check.** Name the specific bias risks that apply (confirmation, availability, anchoring) and flag any finding that depends on prior-report framing. A finding that cannot pass this check is downgraded one severity band.
47
+ 6. **Adversarial peer-review.** Re-read each finding as a sceptic and record one genuine counter-argument; the resolution of the counter-argument appears in the finding body.
48
+ 7. **Clarification gate (P8 B1).** When grading an agent, command, skill, or rule, a missing ambiguity-detection gate — or one not referencing `agents/shared/user-question-protocol.md`, or one that is exception-only rather than default — is a finding at **Medium minimum**. For entry-point agents and always-on rules, the minimum severity is **High**. Per the Clarification-First Verification behavioral charter directive and the clarification & fan-out discipline pillar P8 B1.
49
+
50
+ ---
51
+
52
+ ## Required Finding Output Schema
53
+
54
+ Every **individual sub-agent finding** written to `.audit-workspace/D{N}-SA{M}.findings.md` AND every EVOLVE proposal block carries this YAML-style header before the prose body. **Synthesis files** (`.audit-workspace/D{N}-synthesis.md`) are aggregations and MUST instead open with a domain-level metadata block (see §Synthesis File Header Schema below); per-finding rigor details are referenced by finding ID, not restated per finding in synthesis.
55
+
56
+ ```
57
+ confidence: high | medium | low
58
+ confidence_basis: <one phrase — direct measurement | sampled observation | inference from analogue>
59
+ falsifiability: <observation that would disprove this finding>
60
+ causal_chain: <step1 → step2 → step3 (≥3 links, symptom → driver → root)>
61
+ bias_check: <named bias(es) considered + mitigation>
62
+ counter_argument: <one genuine sceptic position + the resolution>
63
+ sources:
64
+ - url: https://...
65
+ accessed: YYYY-MM-DD
66
+ author: <author or organisation>
67
+ trust_tier: official-docs | peer-reviewed | vendor-note | independent-analysis | blog-post
68
+ impact_horizon: short | medium | long # 2.0.0 (Decision 17) — mandatory pre-triage filter
69
+ progress_toward_pillar: <axis>.<pillar_id>+<delta> # 2.0.0 (Decision 17) — e.g., "governance.P5+0.15" or "content-quality.CQ3+0.20"
70
+ ```
71
+
72
+ The body of the finding may then describe the issue, file references, recommendation, and effort per the host prompt's finding format (the audit prompt's Tier 3 finding format or the evolve prompt's proposal format).
73
+
74
+ ---
75
+
76
+ ## Schema Enforcement
77
+
78
+ - The audit prompt's `Shallow Finding Detector` rejects any finding lacking the schema header or with a single-source empirical claim (unless the source is `official-docs` AND the claim is platform-specific).
79
+ - The evolve prompt's rejection filters reject any finding that cannot answer all six contract tests.
80
+ - The audit-execute `Finding Registry` carries `confidence`, `causal_chain_depth`, and `sources` fields forward through the execution lifecycle. Missing fields block Phase 1 Triage.
81
+ - The audit-execute `Sub-Agent Failure Handling` retries any sub-agent whose findings contain placeholder values (e.g. `confidence_basis: "based on analysis"` without a named basis).
82
+
83
+ ---
84
+
85
+ ## Impact-Gated Registration (Decision 17 — added 2026-05-26)
86
+
87
+ Findings without both `impact_horizon` and `progress_toward_pillar` are DROPPED at sub-agent output time before orchestrator triage. The audit signals framework-level progress, not analytical depth without payoff. The impact-gating behavioral charter directive and Pillar Compliance Test Q5/Q6 encode the enforcement.
88
+
89
+ ---
90
+
91
+ ## Proof Trace Contract (Decision 9 — added 2026-05-26)
92
+
93
+ For every state-dependent claim (file existence, file content, grep match, type-check pass, test output, command exit code), emit a `proof_trace:` block under the finding body containing:
94
+
95
+ ```yaml
96
+ proof_trace:
97
+ claim: <one-sentence assertion>
98
+ command: <bash invocation OR Read tool call OR grep pattern>
99
+ expected: <pattern OR quoted output>
100
+ actual: <verbatim ≤200 chars from command output>
101
+ verdict: matched | mismatched
102
+ accessed: <YYYY-MM-DD>
103
+ ```
104
+
105
+ Sub-agents that omit proof_trace on state-dependent claims trigger Shallow Finding Detector. The reviewer sub-agent's Pass 1.5 reads proof_trace blocks to verify implementation against documented runtime state. Citation alone insufficient — verification commands close the loop.
106
+
107
+ ---
108
+
109
+ ## Per-Domain Source Targets
110
+
111
+ Default research targets per audit domain (overridable in domain-specific source-set blocks):
112
+
113
+ | Domain group | Primary sources | Recency window |
114
+ |--------------|-----------------|----------------|
115
+ | D1 / D3 / D8 (code patterns) | Current best-practice references for the specific pattern | 12 months |
116
+ | D9 (platform adapters) | Official platform documentation + changelog diff vs prior cycle | 12 months |
117
+ | D15 (security) | OWASP ASI current revision + CVE feeds + vendor security advisories | 12 months |
118
+ | D17 (competition) | Competitor product docs ≤6 months + GitHub-stars trajectory + third-party benchmarks | 6 months |
119
+ | D19 (Claude Code) | Current Claude Code documentation (hooks, settings.json schema, skill format, Agent Teams API) | 12 months |
120
+ | All other domains | At minimum, verify any external references (tool docs, standards) are current | 12 months |
121
+
122
+ ---
123
+
124
+ ## Pillar Service
125
+
126
+ This template serves the framework's North Star through:
127
+
128
+ - **P2 Scientific & Practical Quality (primary).** The six-test contract operationalises P2 at the per-finding level for every audit sub-agent and every EVOLVE proposal.
129
+ - **P5 Governance Self-Quality (supporting).** Single source of truth eliminates duplication across the audit prompt, the evolve prompt, and the audit domain files.
130
+ - **P3 Adapter & External Tool Currency (supporting).** Web Research Mandate enforces source-and-date capture for platform docs, CLI tool releases, and CVE feeds (per the adapter & external tool currency pillar P3).
131
+
132
+ Pillar Compliance Test answers: (1) P2 primary, P5 / P3 supporting. (2) Measurable improvement — every finding gains 6 enforcement gates and a 7-field schema; placeholder findings are detectable and retryable. (3) Net governance size impact: +85 lines for this file, offset by reference-instead-of-restate across the audit/evolve prompts and domain files.
133
+
134
+ ---
135
+
136
+ ## Synthesis File Header Schema
137
+
138
+ Domain synthesis files (`.audit-workspace/D{N}-synthesis.md`) open with a single metadata block, not per-finding rigor headers:
139
+
140
+ ```yaml
141
+ domain: D{N}
142
+ cycle: {cycle_number}
143
+ date: YYYY-MM-DD
144
+ framework_version: {version}
145
+ commit: {short_sha}
146
+ rigor_contract: applied | partial | n/a
147
+ sub_agents:
148
+ - SA{N}.{M} Name (count findings)
149
+ ```
150
+
151
+ Per-finding rigor lives in `.audit-workspace/D{N}-SA{M}.findings.md`; synthesis references findings by ID.
@@ -0,0 +1,92 @@
1
+ ---
2
+ id: shared-severity-mapping
3
+ type: reference
4
+ description: Canonical severity-vocabulary mapping across reviewer, fixer, security-auditor, check criteria, and the 9 content-quality specialists.
5
+ tags: [reference]
6
+ ---
7
+
8
+ # Severity Vocabulary Canonical Mapping
9
+
10
+ > Last updated: 2026-06-05
11
+ > Pillars: P2 (primary), P4 (supporting).
12
+ > Canonical for: agents/hatch3r-reviewer.md, agents/hatch3r-fixer.md, the 9 CQ quality-vector specialists (agents/hatch3r-{ui,ux,security,reliability,testability,scalability,performance,maintainability,enhancability}.md), checks/*.md.
13
+
14
+ ## Purpose
15
+
16
+ Single source of truth for severity vocabulary alignment across all hatch3r content artifacts. Audit findings (the canonical audit severity taxonomy) use 5 buckets: Critical, High, Medium, Low, Info. Other artifacts (reviewer agent, security auditor, check criteria) use their own vocabularies. This file maps them so the fixer agent can consume any source's output and map to the canonical bucket.
17
+
18
+ ## 6-Column Canonical Map
19
+
20
+ | Audit Severity (canonical) | Reviewer Verdict | Reviewer Level | Security-Auditor Severity | Check Criteria Tag | Specialist Status |
21
+ |----------------------------|------------------|----------------|---------------------------|--------------------|-------------------|
22
+ | Critical | DESIGN_OBJECTION | Critical | Critical | [CRITICAL] | CRITICAL |
23
+ | High | REQUEST CHANGES | Critical | High | [CRITICAL] | FINDINGS |
24
+ | Medium | REQUEST CHANGES | Warning | Medium | [RECOMMENDED] | FINDINGS |
25
+ | Low | APPROVE | Suggestion | Low | [RECOMMENDED] | PASS |
26
+ | Info | APPROVE | Suggestion | (n/a) | (n/a) | PASS |
27
+
28
+ ## Mapping Rationale
29
+
30
+ - **Critical (canonical)** maps to `DESIGN_OBJECTION` because both express a fundamental, unfixable-by-iteration problem requiring architectural intervention. Reviewer Level `Critical` also maps when paired with `REQUEST CHANGES` and the issue is a security or correctness blocker.
31
+ - **High (canonical)** maps to `REQUEST CHANGES` + Reviewer Level `Critical`. The reviewer's `Critical` level covers both canonical Critical and High; disambiguation uses verdict (`DESIGN_OBJECTION` → Critical, `REQUEST CHANGES` → High) and finding nature (architectural vs. quality gap).
32
+ - **Medium (canonical)** maps to `REQUEST CHANGES` + Reviewer Level `Warning` and Security-Auditor `Medium`. These are quality gaps that block the current cycle but not the release.
33
+ - **Low (canonical)** maps to `APPROVE` + Reviewer Level `Suggestion`. The reviewer approves but flags improvements. Security-Auditor `Low` is the equivalent severity for security-domain findings.
34
+ - **Info (canonical)** has no Security-Auditor or Check-Criteria equivalent because those vocabularies do not enumerate a no-action observation tier.
35
+ - **Specialist Status (PASS | FINDINGS | CRITICAL)** is the 3-value vocabulary emitted by the 9 CQ quality-vector specialists (`agents/hatch3r-{ui,ux,security,reliability,testability,scalability,performance,maintainability,enhancability}.md`). `CRITICAL` maps to canonical Critical (any item shows a Critical-severity finding → DESIGN_OBJECTION-equivalent block). `FINDINGS` covers the canonical High + Medium band (Medium/High findings present, no Critical → REQUEST CHANGES). `PASS` maps to canonical Low + Info (every checklist item green or advisory-only → APPROVE). The collapse of two canonical buckets into one specialist value is intentional: specialists gate merge readiness, not finding-by-finding triage, so they emit a coarser status that the fixer re-expands via this row.
36
+
37
+ ## Consumer Contract
38
+
39
+ - **hatch3r-fixer**: When ingesting findings from any source, MUST map source vocabulary to the canonical Audit Severity column before applying its action policy. Critical → blocking fix; High → blocking fix; Medium → fix in current cycle; Low → fix or defer per scope; Info → log, no action.
40
+ - **hatch3r-reviewer**: Output uses Reviewer Verdict + Reviewer Level columns. Map to canonical via this table when escalating to fixer or audit.
41
+ - **hatch3r-security** (CQ3 specialist): Output uses Security-Auditor Severity column. Map to canonical via this table when emitting findings.
42
+ - **check criteria authors** (checks/*.md): Use Check Criteria Tag column. Map to canonical for severity-rollup reports.
43
+ - **CQ quality-vector specialists** (`agents/hatch3r-{ui,ux,security,reliability,testability,scalability,performance,maintainability,enhancability}.md`): Output uses the Specialist Status column (PASS | FINDINGS | CRITICAL). Map to canonical via this table when escalating to fixer or feeding the release decision.
44
+ - **canonical audit severity taxonomy**: Defines the canonical Audit Severity column. This mapping table is the cross-vocabulary reference.
45
+ - **audit-execute regression gate**: The "Severity Vocab" gate enforces that every modified `.md` content file either uses canonical buckets or references this file.
46
+
47
+ ## Edge Cases
48
+
49
+ - **Reviewer `Critical` overlaps two canonical buckets.** Disambiguation rule: use `DESIGN_OBJECTION` verdict for canonical Critical, `REQUEST CHANGES` + Critical level for canonical High. When unclear, default to Critical (conservative for fixer blocking-action policy).
50
+ - **Check Criteria has only two tags.** `[CRITICAL]` covers canonical Critical + High; `[RECOMMENDED]` covers canonical Medium + Low. Severity-rollup reports must use the worst-case canonical mapping for `[CRITICAL]` tags (treat as canonical Critical until disambiguated by file/line context).
51
+ - **Security-Auditor has no Info tier.** Security findings of observation-only nature must be either omitted from audit output or flagged as Low with a `confidence: low` qualifier per the Confidence Expression section of `agents/hatch3r-security.md`.
52
+ - **A11y-Auditor WCAG vocabulary.** `Critical/Major/Minor` maps to canonical `Critical/Medium/Low` (WCAG A blockers → Critical; AA violations → Medium; advisory AA/AAA → Low). No direct High equivalent — escalate Major to High when the violation blocks a critical user journey.
53
+ - **Dependency-Auditor CVSS vocabulary.** CVSS-derived Critical (≥9.0) / High (7.0–8.9) / Medium (4.0–6.9) / Low (<4.0) aligns 1:1 with canonical audit severity. No mapping translation required.
54
+
55
+ ## 2.0.0 Domain Vocabulary Extensions (Decision 19)
56
+
57
+ D22 / D23 / D24 admission (per the canonical audit domain map) adds three domain-specific severity vocabularies. Each row maps to the canonical Audit Severity column above.
58
+
59
+ | Domain | Source vocabulary | Bucket meaning | Canonical map |
60
+ |--------|-------------------|----------------|---------------|
61
+ | **D22** Content Architecture | `obsolete` | Artifact serves no current pillar AND has zero cross-references | Critical (remove via D16-SA16.3 threshold) |
62
+ | **D22** Content Architecture | `merge_candidate` | ≥80% conceptual overlap with another artifact AND removal threshold not met | High (merge the overlapping artifacts) |
63
+ | **D22** Content Architecture | `drift` | Artifact frontmatter or body diverges from current pillar definitions | Medium |
64
+ | **D22** Content Architecture | `gap` | Pillar is under-represented in the content corpus (per web-comparison findings) | Medium (CL-2 candidate) |
65
+ | **D22** Content Architecture | `coverage_low` | Pillar served by <2 artifacts but pillar surface area expects ≥2 | Low |
66
+ | **D23** Agentic Engineering Trends | `lagging` | hatch3r lacks a pattern adopted by ≥2 reputable comparables in ≤6 months | High |
67
+ | **D23** Agentic Engineering Trends | `trailing` | hatch3r implements a pattern but ≥1 sub-element behind comparable | Medium |
68
+ | **D23** Agentic Engineering Trends | `leading` | hatch3r ahead of all comparables on a pattern | Info (record as Strength) |
69
+ | **D24** Governance Self-Audit | `invariant_violation` | A constitution invariant (e.g., lean threshold, anti-slop, pillar coverage) is broken | Critical |
70
+ | **D24** Governance Self-Audit | `process_drift` | Audit cycle deviated from the audit-execute Phase contract | High |
71
+ | **D24** Governance Self-Audit | `traceability_gap` | A change landed without a finding-registry entry or §8 amendment trail | Medium |
72
+ | **D24** Governance Self-Audit | `cadence_miss` | Required cadence (re-envision ≥14 days, audit cycle, evolve) overdue | Low |
73
+
74
+ The Specialist Status column from the 6-Column Canonical Map applies to D22/D23/D24 SAs (PASS | FINDINGS | CRITICAL coarse status) — the bucket-level mapping above is the per-finding-row resolution within each SA's output. Consumers (fixer, reviewer) map the source bucket to canonical Audit Severity before applying action policy, identical to the Consumer Contract for existing domains.
75
+
76
+ ## Cross-Domain Severity Escalation Rules
77
+
78
+ A finding's source bucket maps to canonical Audit Severity per the table above. Two escalation rules then re-evaluate the row before it ships to the finding registry:
79
+
80
+ 1. **Multi-domain compound rule.** A finding cited by ≥2 domain SAs (cross-domain dependency per the compound-system audit domain) escalates one canonical band (Medium → High, High → Critical). Rationale: cross-domain surface area indicates systemic driver, not symptom. The escalation is recorded in the finding's `cross_domain_citations` registry field; bands cap at Critical.
81
+ 2. **CQ pillar regression rule.** A finding that introduces a measurable regression on a CQ1-CQ9 pillar threshold (per the content-quality (CQ) pillars and their specialist agents) escalates one canonical band regardless of source bucket. The CQ specialist's `Specialist Status` column already collapses to PASS | FINDINGS | CRITICAL — the escalation re-expands to the canonical band the regression actually represents per the regression evidence file path + line cited in the finding body.
82
+
83
+ Escalations chain: a CQ regression cited by ≥2 domain SAs receives two single-band escalations (capped at Critical). De-escalation is not permitted via these rules — a Critical never falls to High through this protocol; only the bias-check downgrade in the rigor contract (`agents/shared/rigor-contract.md` §Scientific Rigor Contract item 5) can reduce a severity band.
84
+
85
+ ## Verification
86
+
87
+ This file lives at `agents/shared/severity-mapping.md`. Enforcement is the inverse of a citation-count floor: `scripts/validate-severity-vocabulary.ts` (run via `npm run validate:severity-vocabulary`, wired into `npm run validate`) scans `.md` files under `agents/`, `checks/`, `commands/`, `rules/`, `skills/`, `hooks/`, and `governance/` for off-canonical severity terms (Moderate, Major, Minor, Blocker, etc.) in a structured severity context (frontmatter `severity:`, severity-labeled table cells, `Severity:`/`Level:` pairs, bracket tags). A file that emits any such term MUST reference this file (basename `severity-mapping.md`) as the documented opt-out, or the scan emits a `SEVERITY-MAPPING-MISS` plus per-occurrence `SEVERITY-OFF-CANONICAL` error (exit 1). The set of referencing files is therefore demand-driven — it grows only when an artifact actually emits an off-canonical term — not a fixed minimum. The mapping doc's own absence at the canonical path makes the scan exit clean on a default-root run (the opt-out can no longer be relied on), so this file's presence is itself the enabling precondition.
88
+
89
+ ## Pillar Service
90
+
91
+ - **P2 Scientific Quality (primary):** Canonical mapping eliminates ambiguity in fixer bucketing — finder output is round-trippable through the fix pipeline without information loss.
92
+ - **P4 Lean Coverage (supporting):** Single source of truth replaces 5 partial vocabularies (reviewer, security-auditor, check-criteria, CVSS/WCAG auditors, CQ-specialist status); consumers reference instead of restating.
@@ -0,0 +1,46 @@
1
+ ---
2
+ id: shared-triage-vocabulary
3
+ type: reference
4
+ description: Canonical Light/Standard/Deep triage-tier vocabulary — maps the three effort tiers to severity, complexity, effort, sub-agent count, and research depth so every triage-first workflow shares one calibration.
5
+ tags: [reference]
6
+ ---
7
+
8
+ # Triage Vocabulary
9
+
10
+ > **Pillars:** P7 (Speed & Token Efficiency), P8 (Clarification & Fan-out Discipline), P2 (Scientific & Practical Quality)
11
+ > Single source of truth for the Light / Standard / Deep triage tiers. Triage-first orchestrators (`orchestrator: true` commands per `agents/shared/efficiency-patterns.md` → P3) classify each task into one tier before delegating; this file is the shared mapping they calibrate against.
12
+
13
+ The tier names (Light / Standard / Deep) and the numeric `triage_tiers: [1, 2, 3]` frontmatter array are two spellings of the same three tiers: `1 = Light`, `2 = Standard`, `3 = Deep`. The user `--effort=light|standard|deep` flag (PRD Decision 17) forces a named tier and bypasses auto-classification. This file binds the named spelling, the numeric spelling, and the `--effort` flag values to one calibration so a tier classified in one workflow means the same depth in another.
14
+
15
+ ---
16
+
17
+ ## Tier mapping
18
+
19
+ | Tier | When to use | Complexity | Effort | Depth | Sub-agent count | Examples |
20
+ |------|-------------|------------|--------|-------|-----------------|----------|
21
+ | **Light** (`1`, `--effort=light`) | Single-module change with a clear, testable acceptance criterion; no architectural decision; reversible. | 1 module touched. | S — minutes to ~1 hour. | Reduced fan-out: 1–2 researchers; skip ADR generation; single standalone todo entry, not an epic. | ~2 (reduced researcher set + writer). | Typo fix, single-function edit, frontmatter-only change, copy tweak. |
22
+ | **Standard** (`2`, `--effort=standard`) | Feature touching 2–5 modules with sub-tasks; ADR generated only if an architectural decision arises mid-flow. | 2–5 modules touched. | M — hours to ~1 day. | Standard pipeline: all parallel researcher modes; ADR-on-demand. | ~6 (researcher modes + writer + on-demand specialist gates). | Add an endpoint to an existing service, extend an existing schema additively, wire a new component into an existing flow. |
23
+ | **Deep** (`3`, `--effort=deep`) | Cross-cutting work: new architecture, multiple integrations, or a breaking change; confirm scope with the user before writing files. | New architecture or breaking change spanning >5 modules / multiple subsystems. | L — multi-day. | Full pipeline: deep research, all researcher modes, full specialist fan-out, mandatory ADR. Confirm scope via `agents/shared/user-question-protocol.md` before writing. | Up to 13 (4–5 parallel researcher modes + writer + the 9 CQ vector specialists advising pre-write). | New subsystem, breaking API/schema migration, cross-service integration, framework-wide refactor. |
24
+
25
+ The sub-agent counts are calibration anchors, not caps. P8 (`rules/hatch3r-fan-out-discipline.md`) governs the actual width: fan out to the true count of independent units even when it exceeds the tier anchor, and never serialize independent work to hit a lower count. The `expected_sa_count` field that orchestrators emit (per `rules/hatch3r-cost-visibility.md`) derives its preview from this column; a post-run delta beyond 25% absolute carries `flagged_for_review: true`.
26
+
27
+ ---
28
+
29
+ ## Auto-tiering inputs
30
+
31
+ A triage-first orchestrator classifies a task by reading these three signals before delegating, then picks the highest tier any signal selects:
32
+
33
+ 1. **Module span** — count of distinct modules the change touches: 1 → Light, 2–5 → Standard, >5 → Deep.
34
+ 2. **Decision class** — additive/reversible → Light or Standard; introduces an architectural decision, a new integration, or a breaking change → Deep.
35
+ 3. **Acceptance-criteria clarity** — a single clear AC keeps a task Light or Standard; missing/ambiguous AC fires the P8 B1 clarification gate (`.claude/rules/clarification-default.md`) before tiering, since an unclassifiable task cannot be tiered.
36
+
37
+ Auto-tiering can misclassify (a single-module task scored Deep, or a cross-cutting task scored Light). The `--effort` flag is the documented recovery path; record the chosen tier in the iteration summary `triage_tier` field (`rules/hatch3r-iteration-summary.md`).
38
+
39
+ ---
40
+
41
+ ## Cross-references
42
+
43
+ - **Severity vs tier are orthogonal.** Tier is task *effort* (how much pipeline to run); severity is finding *blast radius* (how bad a defect is). A Light task can surface a Critical finding, and a Deep task can close only Low findings. Map findings on the Critical / High / Medium / Low / Info taxonomy per `agents/shared/quality-charter.md` §14 (Severity Discipline), which delegates the canonical taxonomy to `agents/shared/severity-mapping.md`. Do not collapse the two axes — a Critical finding does not promote a Light task to Deep; it triggers the severity action policy on its own track.
44
+ - **Triage-first contract** — `agents/shared/efficiency-patterns.md` → P3 (the `orchestrator: true` requirement for a `triage_tiers` array + a Triage/Tier/Scale Assessment heading).
45
+ - **Fan-out width** — `rules/hatch3r-fan-out-discipline.md` (P8 B2): sub-agent count tracks unit count, not tier label.
46
+ - **Decision 17** — the `triage_tiers` frontmatter array + `--effort` override contract (governance PRD §Key Design Decisions, Decision 17).
@@ -10,9 +10,13 @@ cache_friendly: true
10
10
 
11
11
  Canonical reference for the body and frontmatter shapes `hatch3r-creator` produces when a user invokes `/hatch3r-create`. Five sections, one per artifact type. Each provides the minimum frontmatter (YAML), a body skeleton with `<PLACEHOLDER>` substitution slots, and notes on required versus optional fields. Placeholder convention: `<NAME>` is replaced at composition time; `[<TAG-1>, <TAG-2>]` indicates an array.
12
12
 
13
+ The `type` field appears in the Required list and skeleton of all five sections, but the author never sets it by hand: `composeArtifactFile` (`src/content/userContent.ts`) re-pins `derived.type = artifact.type` from the type branch the user already selected at Step 1.1, so a user-supplied value is authoritatively overridden. It is listed as Required because every on-disk artifact carries it, not because the user types it (D20-SA20.1-F20.1.C1).
14
+
13
15
  ### 1. Agent Skeleton
14
16
 
15
- **Path:** `.hatch3r/overrides/agents/<NAME>.md`. **Required:** `id`, `description`, `model`, `tags`. **Optional:** `protected` (always `false` for user agents), `quality_charter` (auto-injected), `adapters` (restricts adapter propagation when present).
17
+ **Path:** `.hatch3r/overrides/agents/<NAME>.md`. **Required:** `id`, `type`, `description`, `model`, `tags`. **Optional:** `protected` (always `false` for user agents), `quality_charter` (auto-injected), `adapters` (restricts adapter propagation when present), `tools` (per-agent allow/deny allowlist — when `tools.allow` cardinality exceeds 3, a **Security baseline:** body reference is required, see below).
18
+
19
+ **Security baseline (tool-grant inheritance).** A user agent that grants more than 3 tools in `tools.allow` MUST cite `rules/hatch3r-security-patterns.md` in a `**Security baseline:**` body line and inherit its deny-by-default posture (no unscoped `Bash`, no destructive subcommands, secrets via `${env:VAR}` only). `hatch3r-creator` surfaces a gentle warning when a wide `tools.allow` ships without this citation; at maturity tier `team`/`scaleup`/`enterprise` the warning is promoted to a strict gate per F20.2.A1's tier-aware floor (gate path: `src/content/userContent.ts`). Without this slot a broad tool grant is an unbounded-grant risk (audit Cycle 10 F20.2.A3).
16
20
 
17
21
  ```yaml
18
22
  ---
@@ -21,15 +25,21 @@ type: agent
21
25
  description: <DESCRIPTION>
22
26
  model: <MODEL>
23
27
  tags: [<TAG-1>, <TAG-2>]
28
+ pillars: [<P1-OR-CQ1-PILLAR-ID>]
24
29
  quality_charter: agents/shared/quality-charter.md
25
30
  ---
26
31
  ```
27
32
 
33
+ The `pillars:` array carries the governance-axis (P1–P8) or content-quality-axis (CQ1–CQ9) ids the artifact serves. Required by the strict pillar-declaration gate in `runUserContentGates` (`src/content/userContent.ts`); omit the field only if the body carries a `**Pillars:**` line instead. Values outside the P1–P8 ∪ CQ1–CQ9 union are rejected at save time (`validateStructuredPillars`).
34
+
28
35
  ```markdown
29
36
  You are <ROLE-STATEMENT> for the project. You receive <INPUT-SUMMARY> and produce <OUTPUT-SUMMARY>.
30
37
 
31
38
  Prompt structure follows `agents/shared/prompt-structure.md` — `<task>`, `<context>`, `<rules>` tags wrap role, runtime state, and constraints.
32
39
 
40
+ ## §0 Detect Ambiguity (P8 B1)
41
+ Before any action, scan the request for unresolved scope, target, irreversibility, or constraint conflicts. If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` before proceeding — default path, not exception. Proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable.
42
+
33
43
  <task>
34
44
  ## Your Role
35
45
  - <BULLET-1>
@@ -54,10 +64,11 @@ Prompt structure follows `agents/shared/prompt-structure.md` — `<task>`, `<con
54
64
  ## Boundaries
55
65
  - **Always:** <ALWAYS-1>
56
66
  - **Never:** <NEVER-1>
67
+ - **Security baseline:** inherits `rules/hatch3r-security-patterns.md` (deny-by-default tools, no destructive subcommands, secrets via `${env:VAR}`). Required line when `tools.allow` grants more than 3 tools.
57
68
  </rules>
58
69
 
59
70
  ## Confidence Expression
60
- Per `agents/shared/quality-charter.md` §1 and `governance/audit/templates/rigor-contract.md`, rate every recommendation and decision as **high**, **medium**, or **low** confidence and name the basis (direct measurement, sampled observation, inference from analogue).
71
+ Per `agents/shared/quality-charter.md` §1 and `agents/shared/rigor-contract.md`, rate every recommendation and decision as **high**, **medium**, or **low** confidence and name the basis (direct measurement, sampled observation, inference from analogue).
61
72
 
62
73
  - **High:** Verified against the specific code/document path read this turn (<FILE-OR-FIXTURE-VERIFIED>).
63
74
  - **Medium:** Pattern-based on convention or analogue (<NAMED-PATTERN-OR-ANALOGUE>); not fully traced.
@@ -82,9 +93,11 @@ This agent inherits `agents/shared/quality-charter.md` via the frontmatter `qual
82
93
 
83
94
  The three sections above (Confidence Expression, Failure Modes, Quality Charter) are required on every user-authored agent. `hatch3r-creator` injects placeholders during composition and reports `gentleWarnings` when any section is missing or left unsubstituted at save time.
84
95
 
96
+ **§0 ambiguity gate (D13-10).** The `## §0 Detect Ambiguity` block above (or any `user-question-protocol.md` reference) is required so a user agent opens with a clarification-first gate, matching CONSTITUTION §2 P5 ambiguity-gate coverage (agents/skills/commands) at 100%. `hatch3r-creator` surfaces a gentle warning when a user agent ships without it; at maturity tier `team`/`scaleup`/`enterprise` the warning is promoted to a strict gate per F20.2.A1's tier-aware floor (gate path: `src/content/userContent.ts`, the agent/skill branch of `runUserContentGates`).
97
+
85
98
  ### 2. Skill Skeleton
86
99
 
87
- **Path:** `.hatch3r/overrides/skills/<NAME>/SKILL.md` inside a new directory created via `mkdir -p`. The layout matches the canonical pattern at `skills/hatch3r-<name>/SKILL.md`. **Required:** `id`, `description`, `tags`. **Optional:** `quality_charter` (auto-injected).
100
+ **Path:** `.hatch3r/overrides/skills/<NAME>/SKILL.md` inside a new directory created via `mkdir -p`. The layout matches the canonical pattern at `skills/hatch3r-<name>/SKILL.md`. **Required:** `id`, `type`, `description`, `tags`. **Optional:** `quality_charter` (auto-injected).
88
101
 
89
102
  ```yaml
90
103
  ---
@@ -92,6 +105,7 @@ id: <NAME>
92
105
  type: skill
93
106
  description: <DESCRIPTION>
94
107
  tags: [<TAG-1>, <TAG-2>]
108
+ pillars: [<P1-OR-CQ1-PILLAR-ID>]
95
109
  quality_charter: agents/shared/quality-charter.md
96
110
  ---
97
111
  ```
@@ -101,11 +115,15 @@ quality_charter: agents/shared/quality-charter.md
101
115
 
102
116
  ## Quick Start
103
117
  Task Progress:
118
+ - [ ] Step 0: Detect ambiguity (P8 B1)
104
119
  - [ ] Step 1: <STEP-1-TITLE>
105
120
  - [ ] Step 2: <STEP-2-TITLE>
106
121
  - [ ] Step 3: <STEP-3-TITLE>
107
122
  - [ ] Step 4: Verification
108
123
 
124
+ ## §0 Detect Ambiguity (P8 B1)
125
+ Before any action, scan the request for unresolved scope, target, irreversibility, or constraint conflicts. If any are found, ask the user via the platform-native question tool per `agents/shared/user-question-protocol.md` before proceeding — default path, not exception. Proceed without asking ONLY when scope is single-target, single-concern, and the brief alone is testable.
126
+
109
127
  ## Step 1: <STEP-1-TITLE>
110
128
  <STEP-1-BODY>
111
129
 
@@ -121,11 +139,13 @@ Run `<VERIFICATION-COMMAND>`. The skill is complete when:
121
139
  2. <ACCEPTANCE-CRITERION-2>
122
140
  ```
123
141
 
124
- Recommended step count: 3-7. Skills with more than 7 steps trigger a gentle warning suggesting decomposition.
142
+ Recommended step count: 3-7 (the §0 ambiguity gate does not count toward the limit). Skills with more than 7 steps trigger a gentle warning suggesting decomposition.
143
+
144
+ **§0 ambiguity gate (D13-10).** The `## §0 Detect Ambiguity` block above (or any `user-question-protocol.md` reference) is required so a user skill that drives an agentic workflow opens with a clarification-first gate, matching CONSTITUTION §2 P5 ambiguity-gate coverage (agents/skills/commands) at 100%. `hatch3r-creator` surfaces a gentle warning when a user skill ships without it; at maturity tier `team`/`scaleup`/`enterprise` the warning is promoted to a strict gate per F20.2.A1's tier-aware floor (gate path: `src/content/userContent.ts`, the agent/skill branch of `runUserContentGates`).
125
145
 
126
146
  ### 3. Rule Skeleton
127
147
 
128
- **Path:** `.hatch3r/overrides/rules/<NAME>.md` plus the auto-generated companion `.hatch3r/overrides/rules/<NAME>.mdc`. The `.md` is canonical; `.mdc` is generated by `saveUserContent` using the `.md → .mdc` scope transform from `rules/hatch3r-content-authoring.md`. **Required:** `id`, `type`, `description`, `scope`, `tags`. **Required when scope=conditional:** `globs`. **Optional:** `precedence` (default `normal`), `quality_charter` (auto-injected).
148
+ **Path:** `.hatch3r/overrides/rules/<NAME>.md` plus the auto-generated companion `.hatch3r/overrides/rules/<NAME>.mdc`. The `.md` is canonical; `.mdc` is generated by `saveUserContent` using the `.md → .mdc` scope transform implemented in `src/content/userContent.ts`. **Required:** `id`, `type`, `description`, `scope`, `tags`. **Required when scope=conditional:** `globs`. **Optional:** `precedence` (default `normal`), `quality_charter` (auto-injected).
129
149
 
130
150
  Three scope shapes (pick one):
131
151
 
@@ -144,6 +164,7 @@ scope: <SHAPE-A-VALUE-OR-SHAPE-B-CSV-OR-conditional>
144
164
  globs: "<GLOB-CSV>" # required for Shape C; omit for A/B
145
165
  precedence: <PRECEDENCE> # Shape C only; default normal
146
166
  tags: [<TAG-1>]
167
+ pillars: [<P1-OR-CQ1-PILLAR-ID>]
147
168
  quality_charter: agents/shared/quality-charter.md
148
169
  ---
149
170
  ```
@@ -164,7 +185,7 @@ quality_charter: agents/shared/quality-charter.md
164
185
  <POSITIVE-AND-NEGATIVE-EXAMPLES>
165
186
  ```
166
187
 
167
- The body bytes of `.md` and `.mdc` must match exactly (paired-file parity is a strict gate). The `.mdc` companion has different frontmatter — `saveUserContent` derives it from the `.md` scope shape per the table in `rules/hatch3r-content-authoring.md`.
188
+ The body bytes of `.md` and `.mdc` must match exactly (paired-file parity is a strict gate). The `.mdc` companion has different frontmatter — `saveUserContent` derives it from the `.md` scope shape per the transform implemented in `src/content/userContent.ts`.
168
189
 
169
190
  ### 4. Command Skeleton
170
191
 
@@ -178,6 +199,7 @@ type: command
178
199
  orchestrator: false
179
200
  description: <DESCRIPTION>
180
201
  tags: [<TAG-1>]
202
+ pillars: [<P1-OR-CQ1-PILLAR-ID>]
181
203
  quality_charter: agents/shared/quality-charter.md
182
204
  ---
183
205
  ```
@@ -191,6 +213,7 @@ orchestrator: true
191
213
  agentPipeline: [<AGENT-ID-1>, <AGENT-ID-2>]
192
214
  description: <DESCRIPTION>
193
215
  tags: [<TAG-1>]
216
+ pillars: [<P1-OR-CQ1-PILLAR-ID>]
194
217
  quality_charter: agents/shared/quality-charter.md
195
218
  ---
196
219
  ```
@@ -239,13 +262,13 @@ Use the Task tool to invoke <AGENT-ID-1>. Pass collected slots as structured inp
239
262
  - <GUARDRAIL-1>
240
263
  ```
241
264
 
242
- The §0 block is required on every user-authored orchestrator command per CONSTITUTION §2 P8 B1 (Clarification-First, Default-Path). It must reference `agents/shared/user-question-protocol.md` verbatim `hatch3r-creator` rejects orchestrator commands whose §0 block is missing the reference (strict gate, see D20 SA20.1 audit checklist).
265
+ Every user-authored orchestrator command MUST contain the §0 block above per CONSTITUTION §2 P8 B1 (Clarification-First, Default-Path), and the block should reference `agents/shared/user-question-protocol.md` verbatim. This is a live runtime strict gate: `runUserContentGates` (`src/content/userContent.ts`) rejects any `orchestrator: true` command whose body lacks a `## §0` / `## Step 0` heading or a `user-question-protocol` reference, at every maturity tier (D20-F20.1.B1, shipped). `hatch3r-creator` also emits the skeleton above at composition time, so authoring discipline and the runtime gate reinforce each other. The same §0 gate extends to user agents and skills (gentle at `solo`, strict at `team`+) per D13-10 — see the agent and skill skeleton notes above and the agent/skill branch of `runUserContentGates`.
243
266
 
244
267
  The strict gate `validateCommandOrchestratorFrontmatter` (`src/cli/commands/validate.ts:171`) rejects `orchestrator: true` without a non-empty `agentPipeline` array.
245
268
 
246
269
  ### 5. Hook Skeleton
247
270
 
248
- **Path:** `.hatch3r/overrides/hooks/<NAME>.md`. **Required:** `id`, `type`, `event`, `agent`, `description`, `tags`. **Optional:** `globs` (file-save filtering), `condition`, `quality_charter` (auto-injected). **Event enum:** `pre-commit | post-merge | ci-failure | file-save | session-start | pre-push`, enforced by `isValidHookEvent` (`src/hooks/types.ts:30`).
271
+ **Path:** `.hatch3r/overrides/hooks/<NAME>.md`. **Required:** `id`, `type`, `event`, `agent`, `description`, `tags`. **Optional:** `globs` (file-save filtering), `condition`, `quality_charter` (auto-injected). **Event enum:** `pre-commit | post-merge | ci-failure | file-save | session-start | pre-push | worktree-create | worktree-remove` (8 values), enforced by `isValidHookEvent` (`src/hooks/types.ts:30`).
249
272
 
250
273
  ```yaml
251
274
  ---
@@ -256,6 +279,7 @@ agent: <AGENT-ID>
256
279
  description: <DESCRIPTION>
257
280
  globs: "<GLOB-CSV>"
258
281
  tags: [<TAG-1>]
282
+ pillars: [<P1-OR-CQ1-PILLAR-ID>]
259
283
  quality_charter: agents/shared/quality-charter.md
260
284
  ---
261
285
  ```
@@ -276,6 +300,8 @@ When this hook fires, the assigned agent should:
276
300
 
277
301
  The `agent` field must reference an existing agent — canonical (e.g., `lint-fixer` resolves to `agents/hatch3r-lint-fixer.md`) or under `.hatch3r/overrides/agents/`. Missing references are rejected at strict-gate time.
278
302
 
303
+ **Transitive trust warning (D20-M6).** A hook fires its referenced agent with that agent's declared tool grants. When `agent: <AGENT-ID>` resolves to a user-authored agent under `.hatch3r/overrides/agents/`, the hook inherits whatever `tools.allowed` set that user agent declared — a broad allowlist on the referenced agent silently widens the hook's blast radius. `hatch3r-creator` surfaces a gentle warning when a hook references a user-authored agent (rather than a canonical `agents/hatch3r-*.md` agent) so authors verify the downstream tool grants are intentional. Mitigation: prefer canonical agents for hooks, or pin the referenced user agent to a narrow `tools.allowed` list with a cited `**Security baseline:**` per §1.
304
+
279
305
  ## Reference Implementations
280
306
 
281
307
  For each user type, mirror the canonical shape below — minus the `hatch3r-` filename prefix; the user-tier path is always under `.hatch3r/overrides/{type}/`: