hatch3r 1.6.0 → 1.7.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 (170) hide show
  1. package/README.md +5 -5
  2. package/agents/hatch3r-a11y-auditor.md +5 -0
  3. package/agents/hatch3r-architect.md +5 -0
  4. package/agents/hatch3r-ci-watcher.md +5 -0
  5. package/agents/hatch3r-context-rules.md +5 -0
  6. package/agents/hatch3r-creator.md +304 -0
  7. package/agents/hatch3r-dependency-auditor.md +5 -0
  8. package/agents/hatch3r-devops.md +5 -0
  9. package/agents/hatch3r-docs-writer.md +5 -0
  10. package/agents/hatch3r-fixer.md +5 -0
  11. package/agents/hatch3r-implementer.md +5 -0
  12. package/agents/hatch3r-learnings-loader.md +5 -0
  13. package/agents/hatch3r-lint-fixer.md +5 -0
  14. package/agents/hatch3r-perf-profiler.md +5 -0
  15. package/agents/hatch3r-researcher.md +5 -0
  16. package/agents/hatch3r-reviewer.md +5 -0
  17. package/agents/hatch3r-security-auditor.md +5 -0
  18. package/agents/hatch3r-test-writer.md +5 -0
  19. package/agents/modes/architecture.md +3 -0
  20. package/agents/modes/boundary-analysis.md +3 -0
  21. package/agents/modes/codebase-impact.md +3 -0
  22. package/agents/modes/complexity-risk.md +3 -0
  23. package/agents/modes/coverage-analysis.md +3 -0
  24. package/agents/modes/current-state.md +3 -0
  25. package/agents/modes/feature-design.md +3 -0
  26. package/agents/modes/impact-analysis.md +3 -0
  27. package/agents/modes/library-docs.md +3 -0
  28. package/agents/modes/migration-path.md +3 -0
  29. package/agents/modes/prior-art.md +3 -0
  30. package/agents/modes/refactoring-strategy.md +3 -0
  31. package/agents/modes/regression.md +3 -0
  32. package/agents/modes/requirements-elicitation.md +3 -0
  33. package/agents/modes/risk-assessment.md +3 -0
  34. package/agents/modes/risk-prioritization.md +3 -0
  35. package/agents/modes/root-cause.md +3 -0
  36. package/agents/modes/similar-implementation.md +3 -0
  37. package/agents/modes/symptom-trace.md +3 -0
  38. package/agents/modes/test-pattern.md +3 -0
  39. package/agents/shared/efficiency-patterns.md +71 -0
  40. package/agents/shared/external-knowledge.md +2 -0
  41. package/agents/shared/injection-patterns.md +2 -0
  42. package/agents/shared/prompt-structure.md +2 -0
  43. package/agents/shared/quality-charter.md +10 -0
  44. package/agents/shared/user-content-templates.md +257 -0
  45. package/checks/accessibility.md +1 -0
  46. package/checks/code-quality.md +1 -0
  47. package/checks/performance.md +1 -0
  48. package/checks/security.md +1 -0
  49. package/checks/testing.md +1 -0
  50. package/commands/board/pickup-azure-devops.md +1 -0
  51. package/commands/board/pickup-delegation-multi.md +1 -0
  52. package/commands/board/pickup-delegation.md +1 -0
  53. package/commands/board/pickup-github.md +1 -0
  54. package/commands/board/pickup-gitlab.md +1 -0
  55. package/commands/board/pickup-modes.md +1 -0
  56. package/commands/board/pickup-post-impl.md +1 -0
  57. package/commands/board/shared-azure-devops.md +1 -0
  58. package/commands/board/shared-board-overview.md +1 -0
  59. package/commands/board/shared-github.md +1 -0
  60. package/commands/board/shared-gitlab.md +1 -0
  61. package/commands/hatch3r-agent-customize.md +9 -2
  62. package/commands/hatch3r-api-spec.md +16 -0
  63. package/commands/hatch3r-benchmark.md +16 -0
  64. package/commands/hatch3r-board-fill.md +16 -0
  65. package/commands/hatch3r-board-groom.md +3 -0
  66. package/commands/hatch3r-board-init.md +3 -0
  67. package/commands/hatch3r-board-pickup.md +16 -0
  68. package/commands/hatch3r-board-refresh.md +3 -0
  69. package/commands/hatch3r-board-shared.md +3 -0
  70. package/commands/hatch3r-bug-plan.md +16 -0
  71. package/commands/hatch3r-codebase-map.md +16 -0
  72. package/commands/hatch3r-command-customize.md +3 -0
  73. package/commands/hatch3r-context-health.md +3 -0
  74. package/commands/hatch3r-cost-tracking.md +3 -0
  75. package/commands/hatch3r-create.md +197 -0
  76. package/commands/hatch3r-debug.md +16 -0
  77. package/commands/hatch3r-dep-audit.md +3 -0
  78. package/commands/hatch3r-feature-plan.md +16 -0
  79. package/commands/hatch3r-healthcheck.md +3 -0
  80. package/commands/hatch3r-hooks.md +3 -0
  81. package/commands/hatch3r-learn.md +3 -0
  82. package/commands/hatch3r-migration-plan.md +16 -0
  83. package/commands/hatch3r-onboard.md +16 -0
  84. package/commands/hatch3r-project-spec.md +16 -0
  85. package/commands/hatch3r-quick-change.md +17 -1
  86. package/commands/hatch3r-recipe.md +3 -0
  87. package/commands/hatch3r-refactor-plan.md +16 -0
  88. package/commands/hatch3r-release.md +3 -0
  89. package/commands/hatch3r-revision.md +16 -0
  90. package/commands/hatch3r-roadmap.md +16 -0
  91. package/commands/hatch3r-rule-customize.md +3 -0
  92. package/commands/hatch3r-security-audit.md +3 -0
  93. package/commands/hatch3r-skill-customize.md +3 -0
  94. package/commands/hatch3r-test-plan.md +16 -0
  95. package/commands/hatch3r-workflow.md +17 -1
  96. package/commands/revision/revision-board-integration.md +1 -0
  97. package/commands/revision/revision-delegation.md +1 -0
  98. package/commands/revision/revision-modes.md +1 -0
  99. package/commands/revision/revision-quality.md +1 -0
  100. package/dist/cli/index.js +2448 -932
  101. package/dist/cli/index.js.map +1 -1
  102. package/github-agents/hatch3r-docs-agent.md +3 -0
  103. package/github-agents/hatch3r-lint-agent.md +3 -0
  104. package/github-agents/hatch3r-security-agent.md +3 -0
  105. package/github-agents/hatch3r-test-agent.md +3 -0
  106. package/hooks/hatch3r-ci-failure.md +1 -0
  107. package/hooks/hatch3r-file-save.md +1 -0
  108. package/hooks/hatch3r-post-merge.md +1 -0
  109. package/hooks/hatch3r-pre-commit.md +1 -0
  110. package/hooks/hatch3r-pre-push.md +1 -0
  111. package/hooks/hatch3r-session-start.md +1 -0
  112. package/package.json +10 -1
  113. package/prompts/hatch3r-bug-triage.md +2 -0
  114. package/prompts/hatch3r-code-review.md +2 -0
  115. package/prompts/hatch3r-pr-description.md +2 -0
  116. package/rules/hatch3r-accessibility-standards.md +1 -0
  117. package/rules/hatch3r-agent-orchestration-detail.md +1 -0
  118. package/rules/hatch3r-agent-orchestration.md +1 -0
  119. package/rules/hatch3r-api-design.md +1 -0
  120. package/rules/hatch3r-browser-verification.md +1 -0
  121. package/rules/hatch3r-ci-cd.md +1 -0
  122. package/rules/hatch3r-code-standards.md +1 -0
  123. package/rules/hatch3r-component-conventions.md +1 -0
  124. package/rules/hatch3r-data-classification.md +1 -0
  125. package/rules/hatch3r-deep-context.md +1 -0
  126. package/rules/hatch3r-dependency-management.md +1 -0
  127. package/rules/hatch3r-feature-flags.md +1 -0
  128. package/rules/hatch3r-git-conventions.md +1 -0
  129. package/rules/hatch3r-i18n.md +1 -0
  130. package/rules/hatch3r-iteration-summary.md +86 -0
  131. package/rules/hatch3r-iteration-summary.mdc +81 -0
  132. package/rules/hatch3r-learning-consult.md +1 -0
  133. package/rules/hatch3r-migrations.md +1 -0
  134. package/rules/hatch3r-observability-logging.md +1 -0
  135. package/rules/hatch3r-observability-metrics.md +1 -0
  136. package/rules/hatch3r-observability-tracing-detail.md +1 -0
  137. package/rules/hatch3r-observability-tracing.md +1 -0
  138. package/rules/hatch3r-observability.md +1 -0
  139. package/rules/hatch3r-performance-budgets.md +1 -0
  140. package/rules/hatch3r-secrets-management.md +1 -0
  141. package/rules/hatch3r-security-patterns.md +1 -0
  142. package/rules/hatch3r-testing.md +1 -0
  143. package/rules/hatch3r-theming.md +1 -0
  144. package/rules/hatch3r-tooling-hierarchy.md +1 -0
  145. package/skills/hatch3r-a11y-audit/SKILL.md +2 -0
  146. package/skills/hatch3r-agent-customize/SKILL.md +2 -0
  147. package/skills/hatch3r-api-spec/SKILL.md +2 -0
  148. package/skills/hatch3r-architecture-review/SKILL.md +2 -0
  149. package/skills/hatch3r-bug-fix/SKILL.md +2 -0
  150. package/skills/hatch3r-ci-pipeline/SKILL.md +2 -0
  151. package/skills/hatch3r-command-customize/SKILL.md +2 -0
  152. package/skills/hatch3r-context-health/SKILL.md +2 -0
  153. package/skills/hatch3r-cost-tracking/SKILL.md +2 -0
  154. package/skills/hatch3r-customize/SKILL.md +2 -0
  155. package/skills/hatch3r-dep-audit/SKILL.md +2 -0
  156. package/skills/hatch3r-feature/SKILL.md +2 -0
  157. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +2 -0
  158. package/skills/hatch3r-incident-response/SKILL.md +2 -0
  159. package/skills/hatch3r-issue-workflow/SKILL.md +2 -0
  160. package/skills/hatch3r-logical-refactor/SKILL.md +2 -0
  161. package/skills/hatch3r-migration/SKILL.md +2 -0
  162. package/skills/hatch3r-perf-audit/SKILL.md +2 -0
  163. package/skills/hatch3r-pr-creation/SKILL.md +2 -0
  164. package/skills/hatch3r-qa-validation/SKILL.md +2 -0
  165. package/skills/hatch3r-recipe/SKILL.md +2 -0
  166. package/skills/hatch3r-refactor/SKILL.md +2 -0
  167. package/skills/hatch3r-release/SKILL.md +2 -0
  168. package/skills/hatch3r-rule-customize/SKILL.md +2 -0
  169. package/skills/hatch3r-skill-customize/SKILL.md +2 -0
  170. package/skills/hatch3r-visual-refactor/SKILL.md +2 -0
@@ -5,6 +5,9 @@ description: Map existing test coverage, identify gaps, and surface critical unt
5
5
  tags: [core, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `coverage-analysis`
10
13
 
@@ -4,6 +4,9 @@ type: mode
4
4
  description: Map the current state of code being analyzed — complexity, coupling, cohesion, coverage.
5
5
  parent: hatch3r-researcher
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ efficiency_patterns: agents/shared/efficiency-patterns.md
8
+ efficiency_tier: standard
9
+ cache_friendly: true
7
10
  ---
8
11
  ### Mode: `current-state`
9
12
 
@@ -5,6 +5,9 @@ description: Break the subject down into implementable sub-tasks with user stori
5
5
  tags: [core, planning]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `feature-design`
10
13
 
@@ -5,6 +5,9 @@ description: Map the blast radius of an issue across flows, modules, data, and u
5
5
  tags: [core, planning, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `impact-analysis`
10
13
 
@@ -4,6 +4,9 @@ type: mode
4
4
  description: Look up current API documentation for specific libraries via Context7 MCP.
5
5
  parent: hatch3r-researcher
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ efficiency_patterns: agents/shared/efficiency-patterns.md
8
+ efficiency_tier: standard
9
+ cache_friendly: true
7
10
  ---
8
11
  ### Mode: `library-docs`
9
12
 
@@ -5,6 +5,9 @@ description: Design a phased execution plan with safe ordering and rollback poin
5
5
  tags: [core, planning, implementation]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `migration-path`
10
13
 
@@ -4,6 +4,9 @@ type: mode
4
4
  description: Research best practices, known issues, and ecosystem trends via web search.
5
5
  parent: hatch3r-researcher
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ efficiency_patterns: agents/shared/efficiency-patterns.md
8
+ efficiency_tier: standard
9
+ cache_friendly: true
7
10
  ---
8
11
  ### Mode: `prior-art`
9
12
 
@@ -5,6 +5,9 @@ description: Design the refactoring approach with transformations, invariants, a
5
5
  tags: [core, planning, implementation]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `refactoring-strategy`
10
13
 
@@ -5,6 +5,9 @@ description: Investigate when an issue was introduced by analyzing git history a
5
5
  tags: [core, planning, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `regression`
10
13
 
@@ -5,6 +5,9 @@ description: Detect ambiguities and missing requirements, generate structured qu
5
5
  tags: [core, planning]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `requirements-elicitation`
10
13
 
@@ -5,6 +5,9 @@ description: Identify risks, security implications, performance concerns, and br
5
5
  tags: [core, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `risk-assessment`
10
13
 
@@ -5,6 +5,9 @@ description: Risk-ranked prioritization of testing effort by business impact and
5
5
  tags: [core, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `risk-prioritization`
10
13
 
@@ -5,6 +5,9 @@ description: Analyze the codebase for candidate root causes using static analysi
5
5
  tags: [core, planning, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `root-cause`
10
13
 
@@ -4,6 +4,9 @@ type: mode
4
4
  description: Search the codebase for analogous features and extract implementation conventions.
5
5
  parent: hatch3r-researcher
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ efficiency_patterns: agents/shared/efficiency-patterns.md
8
+ efficiency_tier: standard
9
+ cache_friendly: true
7
10
  ---
8
11
  ### Mode: `similar-implementation`
9
12
 
@@ -5,6 +5,9 @@ description: Trace reported symptoms through the codebase to find divergence poi
5
5
  tags: [core, planning, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `symptom-trace`
10
13
 
@@ -5,6 +5,9 @@ description: Extract existing test conventions, framework usage, mock patterns,
5
5
  tags: [core, review]
6
6
  parent: hatch3r-researcher
7
7
  quality_charter: agents/shared/quality-charter.md
8
+ efficiency_patterns: agents/shared/efficiency-patterns.md
9
+ efficiency_tier: standard
10
+ cache_friendly: true
8
11
  ---
9
12
  ### Mode: `test-pattern`
10
13
 
@@ -0,0 +1,71 @@
1
+ ---
2
+ id: shared-efficiency-patterns
3
+ type: reference
4
+ description: Portable, model-agnostic patterns for token efficiency and runtime speed in end-user agentic flows. Referenced by agents and orchestrators via `efficiency_patterns:` frontmatter.
5
+ tags: [shared, efficiency, p7]
6
+ cache_friendly: true
7
+ ---
8
+
9
+ ## Efficiency Patterns
10
+
11
+ > Last updated: 2026-04-27
12
+
13
+ ### Purpose
14
+
15
+ This file lists the eight P7 efficiency patterns referenced by agents, orchestrator commands, and skills. The [quality charter](./quality-charter.md) dominates on conflict — efficiency must not weaken confidence calibration, root-cause reporting, or contract preservation.
16
+
17
+ ### The 8 Patterns
18
+
19
+ | # | Pattern | Statement | Primary applies-to |
20
+ |---|---------|-----------|--------------------|
21
+ | P1 | Static-first prompt structure | Stable framing first, variable inputs last | agents, orchestrator commands, prompts |
22
+ | P2 | Parallel-tool-by-default | When >=2 tool calls are independent, dispatch in one turn | agents, orchestrator commands |
23
+ | P3 | Triage-first orchestration | Tier 1/2/3 classification before delegation | orchestrator: true commands |
24
+ | P4 | Plan/Act split | Plan output then act-confirm for non-trivial work | implementer/fixer/architect/creator agents |
25
+ | P5 | Structured outputs over prose | Tables for multi-attribute lists, JSON for handoff | all artifacts where applicable |
26
+ | P6 | Lazy loading / reference-by-pointer | Reference shared content; do not embed | all artifacts |
27
+ | P7 | Conditional skill/rule loading | Load only what the task requires | agents that delegate, orchestrator commands |
28
+ | P8 | Diff-only outputs | Unified diff for code edits, full content only for new files | code-producing agents and skills |
29
+
30
+ ### Pattern detail
31
+
32
+ **P1. Static-first prompt structure.** Do this: place tool definitions, role, contracts, and examples at the top of every artifact; place variable inputs (issue body, diff, user message) at the bottom. Verification: `scripts/validate-efficiency-invariants.ts --static-first` scans the first 60 lines for volatile-token regex hits.
33
+
34
+ **P2. Parallel-tool-by-default.** Do this: when two or more tool calls have no data dependency, emit them in a single assistant turn rather than serial turns. Verification: `scripts/validate-efficiency-invariants.ts --parallel-tool` warns when an artifact has >=2 tool/sub-agent mentions without a parallel-dispatch directive nearby.
35
+
36
+ **P3. Triage-first orchestration.** Do this: every command with `orchestrator: true` classifies inputs into Tier 1 (trivial, single-agent), Tier 2 (standard pipeline), or Tier 3 (research-first) before delegating. Verification: `scripts/validate-efficiency-invariants.ts --triage-first` requires a `triage_tiers` array in frontmatter and a Triage/Tier/Scale Assessment heading in body.
37
+
38
+ **P4. Plan/Act split.** Do this: implementer, fixer, architect, and creator agents produce a plan artifact and pause for confirmation before mutating files when scope exceeds one file or 50 lines. Verification: convention-only — audited under D06 sub-agent 6.5 (no automated check).
39
+
40
+ **P5. Structured outputs over prose.** Do this: use markdown tables for any list with >=2 attributes per item; use JSON code blocks for inter-agent handoff payloads. Verification: convention-only — audited under D06 sub-agent 6.5 (no automated check).
41
+
42
+ **P6. Lazy loading / reference-by-pointer.** Do this: link to `agents/shared/*`, `rules/*`, `skills/*` rather than copying their content; embed only when the artifact is invoked without filesystem access. Verification: convention-only — audited under D06 sub-agent 6.5 (no automated check).
43
+
44
+ **P7. Conditional skill/rule loading.** Do this: agents and orchestrator commands load only the skills and rules required by the current invocation; `scope: always` rules apply globally, tagged rules load only when their tag matches the task. Verification: convention-only — audited under D06 sub-agent 6.5 (no automated check).
45
+
46
+ **P8. Diff-only outputs.** Do this: code-producing agents emit unified diffs for edits to existing files and full content only for new files. Verification: convention-only — audited under D06 sub-agent 6.5 (no automated check).
47
+
48
+ ### Conservative bias clause
49
+
50
+ > Patterns must never override the quality charter. If applying a pattern would weaken confidence calibration, root-cause analysis, contract preservation, or any other charter directive, do not apply it. The quality charter is the dominant contract. When in doubt, do not optimize.
51
+
52
+ Error toward keeping content over removing it. Apply patterns through structural compliance only — section ordering, table form, frontmatter declarations.
53
+ Auto-rewrite of prose to fit a pattern is forbidden; structural moves are reversible, semantic edits are not. Sub-agents that detect a conflict between a pattern and the quality charter skip the pattern, log the skip in their structured output under `efficiency_skips`, and report the conflict rather than risk semantic loss.
54
+ A pattern skip is never a finding by itself — only a pattern conflict that the sub-agent fails to surface counts as a regression.
55
+
56
+ ### Cross-platform notes
57
+
58
+ | Pattern | Auto-benefit on these adapters | Required everywhere? |
59
+ |---------|--------------------------------|----------------------|
60
+ | P1 Static-first | Anthropic prompt caching, OpenAI Responses caching, Google Gemini implicit caching | yes |
61
+ | P2 Parallel tools | All adapters where the host LLM supports parallel tool use | yes |
62
+ | P3-P7 | All adapters | yes |
63
+ | P8 Diff-only | All adapters except line-by-line autocomplete (e.g. github-agents/copilot) | conditional |
64
+
65
+ ### References
66
+
67
+ - Anthropic Prompt Caching documentation (2025)
68
+ - OpenAI Prompt Caching guide (2025)
69
+ - Google Gemini Caching overview (2025)
70
+ - arXiv: SWE-Bench compression studies (2026) and Plan-and-Act (2025)
71
+ - Anthropic effective context engineering (2025)
@@ -2,6 +2,8 @@
2
2
  id: shared-external-knowledge
3
3
  type: reference
4
4
  description: Shared external knowledge reference for all agents — tooling hierarchy, platform CLI, Context7 MCP, and web research guidance.
5
+ efficiency_patterns: agents/shared/efficiency-patterns.md
6
+ cache_friendly: true
5
7
  ---
6
8
  ## External Knowledge
7
9
 
@@ -2,6 +2,8 @@
2
2
  id: shared-injection-patterns
3
3
  type: reference
4
4
  description: Canonical prompt-injection screening patterns — single source of truth for pipeline input sanitization, learnings validation, and user-facing injection screening guidance.
5
+ efficiency_patterns: agents/shared/efficiency-patterns.md
6
+ cache_friendly: true
5
7
  ---
6
8
 
7
9
  ## Injection Patterns Catalog
@@ -2,6 +2,8 @@
2
2
  id: shared-prompt-structure
3
3
  type: reference
4
4
  description: XML-tag structuring pattern for agent prompts — reduces misinterpretation of instructions vs context vs rules per Anthropic Claude 4.x 2026 guidance.
5
+ efficiency_patterns: agents/shared/efficiency-patterns.md
6
+ cache_friendly: true
5
7
  ---
6
8
 
7
9
  ## Prompt Structure Pattern
@@ -2,6 +2,8 @@
2
2
  id: shared-quality-charter
3
3
  type: reference
4
4
  description: Shared quality charter for all agents — behavioral standards for senior-engineer-quality output.
5
+ efficiency_patterns: agents/shared/efficiency-patterns.md
6
+ cache_friendly: true
5
7
  ---
6
8
 
7
9
  ## Agent Quality Charter
@@ -94,3 +96,11 @@ When modifying code that is consumed by other modules, agents, or external syste
94
96
  - Verify existing consumers before changing function signatures, type shapes, event schemas, or API responses.
95
97
  - If a contract change is necessary, document it explicitly in the structured output and flag for reviewer attention.
96
98
  - Prefer additive changes (new optional fields, overloaded signatures) over breaking changes.
99
+
100
+ ### 10. Standardized Iteration Summary
101
+
102
+ Every user-facing iteration ends with the canonical Iteration Summary block defined in `rules/hatch3r-iteration-summary.md`.
103
+
104
+ Required fields: Status (closed enum: SUCCESS | PARTIAL | FAILED | BLOCKED), Outcome (one sentence), Done, Not Done / Deferred / Unverified, Open Questions / Blockers, Confidence + basis. Optional sections (Artifacts Touched, Verifications Run, Earliest Failure Point, Suggested Next Action) are appended only when they carry information.
105
+
106
+ Never substitute a prose paragraph for the block. Never silently skip Not Done — if scope was fully completed, write `None — full scope completed`. Never inflate confidence — if you did not verify, say medium and name the unknown.
@@ -0,0 +1,257 @@
1
+ ---
2
+ id: shared-user-content-templates
3
+ type: shared-context
4
+ description: Body and frontmatter skeletons for the 5 user-authored content types. Referenced by hatch3r-creator at authoring time.
5
+ efficiency_patterns: agents/shared/efficiency-patterns.md
6
+ cache_friendly: true
7
+ ---
8
+
9
+ ## User-Content Skeletons
10
+
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
+
13
+ ### 1. Agent Skeleton
14
+
15
+ **Path:** `.agents/user/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).
16
+
17
+ ```yaml
18
+ ---
19
+ id: <NAME>
20
+ type: agent
21
+ description: <DESCRIPTION>
22
+ model: <MODEL>
23
+ tags: [<TAG-1>, <TAG-2>]
24
+ quality_charter: agents/shared/quality-charter.md
25
+ ---
26
+ ```
27
+
28
+ ```markdown
29
+ You are <ROLE-STATEMENT> for the project. You receive <INPUT-SUMMARY> and produce <OUTPUT-SUMMARY>.
30
+
31
+ Prompt structure follows `agents/shared/prompt-structure.md` — `<task>`, `<context>`, `<rules>` tags wrap role, runtime state, and constraints.
32
+
33
+ <task>
34
+ ## Your Role
35
+ - <BULLET-1>
36
+ - <BULLET-2>
37
+ </task>
38
+
39
+ <context>
40
+ ## Inputs
41
+ - <INPUT-SLOT-1>
42
+ - <INPUT-SLOT-2>
43
+ </context>
44
+
45
+ ## Implementation Protocol
46
+ ### 1. <STEP-1-TITLE>
47
+ <STEP-1-BODY>
48
+ ### 2. <STEP-2-TITLE>
49
+ <STEP-2-BODY>
50
+ ### 3. Return Structured Result
51
+ { status: "SUCCESS" | "BLOCKED", output: <FIELDS>, notes: <FREE-TEXT> }
52
+
53
+ <rules>
54
+ ## Boundaries
55
+ - **Always:** <ALWAYS-1>
56
+ - **Never:** <NEVER-1>
57
+ </rules>
58
+ ```
59
+
60
+ ### 2. Skill Skeleton
61
+
62
+ **Path:** `.agents/user/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).
63
+
64
+ ```yaml
65
+ ---
66
+ id: <NAME>
67
+ type: skill
68
+ description: <DESCRIPTION>
69
+ tags: [<TAG-1>, <TAG-2>]
70
+ quality_charter: agents/shared/quality-charter.md
71
+ ---
72
+ ```
73
+
74
+ ```markdown
75
+ # <TITLE>
76
+
77
+ ## Quick Start
78
+ Task Progress:
79
+ - [ ] Step 1: <STEP-1-TITLE>
80
+ - [ ] Step 2: <STEP-2-TITLE>
81
+ - [ ] Step 3: <STEP-3-TITLE>
82
+ - [ ] Step 4: Verification
83
+
84
+ ## Step 1: <STEP-1-TITLE>
85
+ <STEP-1-BODY>
86
+
87
+ ## Step 2: <STEP-2-TITLE>
88
+ <STEP-2-BODY>
89
+
90
+ ## Step 3: <STEP-3-TITLE>
91
+ <STEP-3-BODY>
92
+
93
+ ## Step 4: Verification
94
+ Run `<VERIFICATION-COMMAND>`. The skill is complete when:
95
+ 1. <ACCEPTANCE-CRITERION-1>
96
+ 2. <ACCEPTANCE-CRITERION-2>
97
+ ```
98
+
99
+ Recommended step count: 3-7. Skills with more than 7 steps trigger a gentle warning suggesting decomposition.
100
+
101
+ ### 3. Rule Skeleton
102
+
103
+ **Path:** `.agents/user/rules/<NAME>.md` plus the auto-generated companion `.agents/user/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).
104
+
105
+ Three scope shapes (pick one):
106
+
107
+ | Shape | `scope:` line | `globs:` line | When to use |
108
+ |---|---|---|---|
109
+ | A | `scope: always` | (omit) | Applies every session, regardless of file context. |
110
+ | B | `scope: "<GLOB-CSV>"` | (omit) | Legacy compact form — tooling treats it as conditional. |
111
+ | C | `scope: conditional` | `globs: "<GLOB-CSV>"` | Explicit globs plus optional `precedence:`. |
112
+
113
+ ```yaml
114
+ ---
115
+ id: <NAME>
116
+ type: rule
117
+ description: <DESCRIPTION>
118
+ scope: <SHAPE-A-VALUE-OR-SHAPE-B-CSV-OR-conditional>
119
+ globs: "<GLOB-CSV>" # required for Shape C; omit for A/B
120
+ precedence: <PRECEDENCE> # Shape C only; default normal
121
+ tags: [<TAG-1>]
122
+ quality_charter: agents/shared/quality-charter.md
123
+ ---
124
+ ```
125
+
126
+ ```markdown
127
+ # <TITLE>
128
+
129
+ <SHORT-PARAGRAPH-DESCRIBING-THE-RULE>
130
+
131
+ ## Directives
132
+ - <DIRECTIVE-1>
133
+ - <DIRECTIVE-2>
134
+
135
+ ## When This Rule Applies
136
+ <TRIGGER-CONDITIONS>
137
+
138
+ ## Examples
139
+ <POSITIVE-AND-NEGATIVE-EXAMPLES>
140
+ ```
141
+
142
+ 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`.
143
+
144
+ ### 4. Command Skeleton
145
+
146
+ **Path:** `.agents/user/commands/<NAME>.md`. **Required:** `id`, `type`, `description`, `orchestrator`, `tags`. **Required when orchestrator=true:** `agentPipeline` (non-empty array). **Optional:** `quality_charter` (auto-injected). Two variants follow; pick by the `orchestrator` value.
147
+
148
+ ```yaml
149
+ # 4a. Inline command — orchestrator: false. Modeled after commands/hatch3r-recipe.md.
150
+ ---
151
+ id: <NAME>
152
+ type: command
153
+ orchestrator: false
154
+ description: <DESCRIPTION>
155
+ tags: [<TAG-1>]
156
+ quality_charter: agents/shared/quality-charter.md
157
+ ---
158
+ ```
159
+
160
+ ```yaml
161
+ # 4b. Orchestrator command — orchestrator: true. Modeled after commands/hatch3r-board-init.md.
162
+ ---
163
+ id: <NAME>
164
+ type: command
165
+ orchestrator: true
166
+ agentPipeline: [<AGENT-ID-1>, <AGENT-ID-2>]
167
+ description: <DESCRIPTION>
168
+ tags: [<TAG-1>]
169
+ quality_charter: agents/shared/quality-charter.md
170
+ ---
171
+ ```
172
+
173
+ Body skeleton — 4a inline (single-section workflow with inline validation):
174
+
175
+ ```markdown
176
+ ## Agent Pipeline
177
+ This command runs as a single orchestrator without sub-agent delegation.
178
+ # <TITLE> — <ONE-LINE-PURPOSE>
179
+ <INTRO-PARAGRAPH>
180
+ ## Workflow
181
+ ### Step 1: <STEP-1-TITLE>
182
+ **ASK:** "<QUESTION-1>"
183
+ ### Step 2: <STEP-2-TITLE>
184
+ <STEP-2-BODY>
185
+ ### Step 3: Validation Gates
186
+ <INLINE-VALIDATION-CHECKS>
187
+ ### Step 4: Summary
188
+ <TITLE> Result: <FIELD-1>: <VALUE>
189
+ ## Guardrails
190
+ - <GUARDRAIL-1>
191
+ ```
192
+
193
+ Body skeleton — 4b orchestrator (Phase 1 collect, Phase 2 delegate, Phase 3 housekeeping):
194
+
195
+ ```markdown
196
+ ## Agent Pipeline
197
+ This command runs as an orchestrator. After collecting inputs in Phase 1, it delegates to <AGENT-ID-1> via the Task tool.
198
+ # <TITLE>
199
+ <INTRO-PARAGRAPH>
200
+ ## Workflow
201
+ ### Phase 1 — Collect & Plan
202
+ #### 1.1: <SLOT-1>
203
+ **ASK:** "<QUESTION-1>"
204
+ #### 1.N: Plan Summary & Confirmation
205
+ **ASK:** "Confirm to proceed, or specify changes."
206
+ ### Phase 2 — Delegate
207
+ Use the Task tool to invoke <AGENT-ID-1>. Pass collected slots as structured input. Wait for the structured return.
208
+ ### Phase 3 — Housekeeping
209
+ <POST-DELEGATION-STEPS>
210
+ ## Guardrails
211
+ - <GUARDRAIL-1>
212
+ ```
213
+
214
+ The strict gate `validateCommandOrchestratorFrontmatter` (`src/cli/commands/validate.ts:171`) rejects `orchestrator: true` without a non-empty `agentPipeline` array.
215
+
216
+ ### 5. Hook Skeleton
217
+
218
+ **Path:** `.agents/user/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`).
219
+
220
+ ```yaml
221
+ ---
222
+ id: <NAME>
223
+ type: hook
224
+ event: <EVENT>
225
+ agent: <AGENT-ID>
226
+ description: <DESCRIPTION>
227
+ globs: "<GLOB-CSV>"
228
+ tags: [<TAG-1>]
229
+ quality_charter: agents/shared/quality-charter.md
230
+ ---
231
+ ```
232
+
233
+ ```markdown
234
+ # Hook: <EVENT> → <AGENT-ID>
235
+ <SHORT-PARAGRAPH-DESCRIBING-WHAT-THE-HOOK-DOES-AND-WHEN-IT-FIRES>
236
+ ## Agent Behavior
237
+ When this hook fires, the assigned agent should:
238
+ 1. <STEP-1>
239
+ 2. <STEP-2>
240
+ ## Trigger Conditions
241
+ - **Event:** <EVENT>
242
+ - **Glob filter:** <GLOB-CSV-OR-NONE>
243
+ ## Output
244
+ <DESCRIBES-WHAT-THE-AGENT-RETURNS-OR-WRITES>
245
+ ```
246
+
247
+ The `agent` field must reference an existing agent — canonical (e.g., `lint-fixer` resolves to `agents/hatch3r-lint-fixer.md`) or under `.agents/user/agents/`. Missing references are rejected at strict-gate time.
248
+
249
+ ## Reference Implementations
250
+
251
+ For each user type, mirror the canonical shape below — minus the `hatch3r-` filename prefix; the user-tier path is always under `.agents/user/{type}/`:
252
+
253
+ - **Agent:** `agents/hatch3r-implementer.md` (full body) or `agents/hatch3r-fixer.md` (compact body).
254
+ - **Skill:** `skills/hatch3r-bug-fix/SKILL.md` or `skills/hatch3r-feature/SKILL.md`.
255
+ - **Rule:** `rules/hatch3r-deep-context.md` (`scope: always`) or `rules/hatch3r-component-conventions.md` (`scope: conditional`).
256
+ - **Command:** `commands/hatch3r-recipe.md` (inline) or `commands/hatch3r-board-init.md` (orchestrator).
257
+ - **Hook:** `hooks/hatch3r-pre-commit.md` (with globs) or `hooks/hatch3r-session-start.md` (always-fire).
@@ -2,6 +2,7 @@
2
2
  id: accessibility
3
3
  type: check
4
4
  description: Accessibility review criteria covering WCAG compliance, semantic HTML, keyboard navigation, screen reader support, and inclusive design patterns
5
+ cache_friendly: true
5
6
  ---
6
7
  # Accessibility Check
7
8
 
@@ -2,6 +2,7 @@
2
2
  id: code-quality
3
3
  type: check
4
4
  description: Code quality review criteria covering standards compliance, complexity, maintainability, and architectural patterns
5
+ cache_friendly: true
5
6
  ---
6
7
  # Code Quality Check
7
8
 
@@ -2,6 +2,7 @@
2
2
  id: performance
3
3
  type: check
4
4
  description: Performance review criteria covering bundle size, render performance, memory usage, network optimization, database queries, and runtime efficiency
5
+ cache_friendly: true
5
6
  ---
6
7
  # Performance Check
7
8
 
@@ -2,6 +2,7 @@
2
2
  id: security
3
3
  type: check
4
4
  description: Security review criteria covering vulnerability patterns, input validation, authentication, secrets handling, and dependency safety
5
+ cache_friendly: true
5
6
  ---
6
7
  # Security Check
7
8
 
package/checks/testing.md CHANGED
@@ -2,6 +2,7 @@
2
2
  id: testing
3
3
  type: check
4
4
  description: Test coverage review criteria covering test quality, regression testing, test isolation, and coverage requirements
5
+ cache_friendly: true
5
6
  ---
6
7
  # Testing Check
7
8
 
@@ -4,6 +4,7 @@ type: command
4
4
  description: Azure DevOps-specific platform procedures for board-pickup. Covers az CLI commands for work item listing, status updates, collision detection, PR creation, and state transitions.
5
5
  tags: [board, team, azure-devops]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Pickup — Azure DevOps Platform Details
9
10
 
@@ -4,6 +4,7 @@ type: command
4
4
  description: Multi-issue sub-agent delegation protocols for board-pickup Steps 6b (epics) and 6c (batch). Covers level-by-level parallel execution, shared context, and quality pipelines.
5
5
  tags: [board, team]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Pickup — Multi-Issue Delegation (Steps 6b, 6c)
9
10
 
@@ -4,6 +4,7 @@ type: command
4
4
  description: Single-issue sub-agent delegation protocol for board-pickup Step 6a. Covers research, implementation, and quality pipeline for standalone issues.
5
5
  tags: [board, team]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Pickup — Single-Issue Delegation (Step 6a)
9
10
 
@@ -4,6 +4,7 @@ type: command
4
4
  description: GitHub-specific platform procedures for board-pickup. Covers gh CLI commands for issue listing, status updates, collision detection, PR creation, and label transitions.
5
5
  tags: [board, team, github]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Pickup — GitHub Platform Details
9
10
 
@@ -4,6 +4,7 @@ type: command
4
4
  description: GitLab-specific platform procedures for board-pickup. Covers glab CLI commands for issue listing, status updates, collision detection, MR creation, and label transitions.
5
5
  tags: [board, team, gitlab]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Pickup — GitLab Platform Details
9
10
 
@@ -4,6 +4,7 @@ type: command
4
4
  description: Auto-advance mode, error handling, and guardrails for board-pickup. Covers --auto/--unattended operation, safety guardrails, and specification generation.
5
5
  tags: [board, team]
6
6
  quality_charter: agents/shared/quality-charter.md
7
+ cache_friendly: true
7
8
  ---
8
9
  # Board Pickup — Modes, Guardrails, and Error Handling
9
10