hatch3r 2.0.0 → 2.1.1

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 (66) hide show
  1. package/README.md +1 -0
  2. package/dist/cli/index.js +783 -422
  3. package/dist/content/agents/hatch3r-brownfield-spec.md +1 -1
  4. package/dist/content/agents/hatch3r-fixer.md +1 -1
  5. package/dist/content/agents/hatch3r-handoff-preparer.md +4 -16
  6. package/dist/content/agents/hatch3r-implementer.md +1 -1
  7. package/dist/content/agents/hatch3r-reviewer.md +1 -1
  8. package/dist/content/agents/shared/efficiency-patterns.md +1 -1
  9. package/dist/content/agents/shared/quality-charter.md +3 -3
  10. package/dist/content/agents/shared/severity-mapping.md +1 -1
  11. package/dist/content/agents/shared/triage-vocabulary.md +1 -1
  12. package/dist/content/agents/shared/user-content-templates.md +1 -1
  13. package/dist/content/agents/shared/user-question-protocol.md +3 -3
  14. package/dist/content/commands/hatch3r-api-spec.md +4 -16
  15. package/dist/content/commands/hatch3r-auth-scaffold.md +7 -20
  16. package/dist/content/commands/hatch3r-benchmark.md +4 -16
  17. package/dist/content/commands/hatch3r-board-fill.md +4 -16
  18. package/dist/content/commands/hatch3r-board-pickup.md +4 -16
  19. package/dist/content/commands/hatch3r-bug-pipeline.md +3 -15
  20. package/dist/content/commands/hatch3r-bug-plan.md +4 -16
  21. package/dist/content/commands/hatch3r-codebase-map.md +4 -16
  22. package/dist/content/commands/hatch3r-create.md +4 -16
  23. package/dist/content/commands/hatch3r-debug.md +4 -16
  24. package/dist/content/commands/hatch3r-diagnose.md +10 -18
  25. package/dist/content/commands/hatch3r-feature-plan.md +4 -16
  26. package/dist/content/commands/hatch3r-handoff.md +4 -16
  27. package/dist/content/commands/hatch3r-healthcheck.md +4 -16
  28. package/dist/content/commands/hatch3r-incident-response.md +3 -15
  29. package/dist/content/commands/hatch3r-migration-plan.md +4 -16
  30. package/dist/content/commands/hatch3r-onboard.md +5 -17
  31. package/dist/content/commands/hatch3r-pack-install.md +6 -29
  32. package/dist/content/commands/hatch3r-pr-resolve.md +11 -53
  33. package/dist/content/commands/hatch3r-project-spec.md +4 -16
  34. package/dist/content/commands/hatch3r-quick-change.md +4 -16
  35. package/dist/content/commands/hatch3r-refactor-plan.md +4 -16
  36. package/dist/content/commands/hatch3r-release.md +5 -15
  37. package/dist/content/commands/hatch3r-revision.md +4 -16
  38. package/dist/content/commands/hatch3r-roadmap.md +4 -16
  39. package/dist/content/commands/hatch3r-security-audit.md +4 -16
  40. package/dist/content/commands/hatch3r-slo-scaffold.md +8 -20
  41. package/dist/content/commands/hatch3r-spec.md +11 -16
  42. package/dist/content/commands/hatch3r-test-plan.md +4 -16
  43. package/dist/content/commands/hatch3r-workflow.md +4 -16
  44. package/dist/content/commands/shared/orchestration-frame.md +2 -2
  45. package/dist/content/rules/hatch3r-agent-orchestration.md +1 -1
  46. package/dist/content/rules/hatch3r-agent-orchestration.mdc +1 -1
  47. package/dist/content/rules/hatch3r-anti-duplication.md +6 -4
  48. package/dist/content/rules/hatch3r-anti-duplication.mdc +6 -4
  49. package/dist/content/rules/hatch3r-clarification-default.md +2 -2
  50. package/dist/content/rules/hatch3r-clarification-default.mdc +2 -2
  51. package/dist/content/rules/hatch3r-cost-visibility.md +11 -4
  52. package/dist/content/rules/hatch3r-cost-visibility.mdc +11 -4
  53. package/dist/content/rules/hatch3r-handoff-readiness.md +1 -1
  54. package/dist/content/rules/hatch3r-handoff-readiness.mdc +1 -1
  55. package/dist/content/rules/hatch3r-iteration-summary.md +45 -49
  56. package/dist/content/rules/hatch3r-iteration-summary.mdc +45 -49
  57. package/dist/content/rules/hatch3r-learning-system.md +6 -6
  58. package/dist/content/rules/hatch3r-learning-system.mdc +6 -6
  59. package/dist/content/rules/hatch3r-reviewer-calibration.md +2 -2
  60. package/dist/content/rules/hatch3r-reviewer-calibration.mdc +2 -2
  61. package/dist/content/rules/hatch3r-tool-currency.md +1 -1
  62. package/dist/content/rules/hatch3r-tool-currency.mdc +1 -1
  63. package/dist/content/skills/hatch3r-adhoc-orchestrate/SKILL.md +1 -1
  64. package/dist/content/skills/hatch3r-handoff-prepare/SKILL.md +4 -4
  65. package/dist/content/skills/hatch3r-report/SKILL.md +1 -1
  66. package/package.json +5 -3
@@ -210,7 +210,7 @@ Return structured result with:
210
210
 
211
211
  **Breaking changes detected:** NONE | {count with table rows from deliverable 3}
212
212
 
213
- **Iteration Summary:** {per `rules/hatch3r-iteration-summary.md` — 9 sections}
213
+ **Iteration Summary:** {per `rules/hatch3r-iteration-summary.md` — recap + exception lines}
214
214
  ```
215
215
 
216
216
  Proof trace per `agents/shared/rigor-contract.md` §Proof Trace Contract is mandatory on every state-dependent claim (file existence, grep match, type-check result). Citation alone insufficient.
@@ -94,7 +94,7 @@ Apply this format whenever the fix involves choosing between approaches, when th
94
94
  3. Read the full content of every matched learning file.
95
95
  4. Cite each consulted learning ID in the structured result's `Consulted Learnings:` line. Citing zero entries when `applies-to` matched is a gate failure visible at audit time.
96
96
 
97
- Beyond this once-per-run gate, surface relevant learnings *mid-edit* per `rules/hatch3r-learning-system.md` → Mid-Edit Learning Surfacing: when a file or pattern you are editing matches a captured learning (path overlap, `applies-to` match, or `topic` semantic overlap), cite it on a `Surfaced Learnings:` line in the iteration summary before completing the edit.
97
+ Beyond this once-per-run gate, surface relevant learnings *mid-edit* per `rules/hatch3r-learning-system.md` → Mid-Edit Learning Surfacing: when a file or pattern you are editing matches a captured learning (path overlap, `applies-to` match, or `topic` semantic overlap), cite it on the surfaced facet of the `Learnings:` exception line in the iteration summary before completing the edit.
98
98
 
99
99
  ### 1. Parse Reviewer Findings
100
100
 
@@ -72,28 +72,16 @@ Summary: {summary}
72
72
  Warnings: {list or "none"}
73
73
  ```
74
74
 
75
- Then emit the canonical Iteration Summary block per `rules/hatch3r-iteration-summary.md`:
75
+ Then close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Worked example:
76
76
 
77
77
  ```
78
78
  ## Iteration Summary
79
79
 
80
- **Status:** SUCCESS | PARTIAL | FAILED | BLOCKED
81
- **Outcome:** Handoff written for {work_item or branch} {one-line state}.
82
- **Done:**
83
- - Composed handoff body with 8 required sections
84
- - Validated against readiness rule (errors: 0, warnings: {n})
85
- - Computed SHA-256 integrity hash
86
- - Wrote atomically to .hatch3r/handoffs/active/{id}.md
87
- **Not Done / Deferred / Unverified:**
88
- - {None — full scope completed | list of warnings}
89
- **Open Questions / Blockers:**
90
- - None
91
- **Confidence:** high | medium | low — {basis sentence}
92
- **impact_horizon:** short | medium | long
93
- **progress_toward_pillar:** governance.P7+<delta>
80
+ **SUCCESS** Handoff written for gh:owner/repo#42 at .hatch3r/handoffs/active/2026-07-06_T0910_a3f2c_issue-42.md.
81
+ files 1 (+64/−0) · sa 0/0 · gates 6/6 · cost Δ0% tok / Δ0% min · tier 1
94
82
  ```
95
83
 
96
- Per the impact-horizon and pillar-progress emission convention, `impact_horizon` defaults to `medium` (a handoff persists across context windows and can be resumed days later); use `long` for handoffs that capture multi-week initiatives. `progress_toward_pillar` records the pillar-delta on the governance axis handoff-preparer output advances P7 (Speed & Token Efficiency) because the externalized session-state lets a fresh context window resume without re-deriving prior work.
84
+ Handoff body composition consumes the session's most recent recap via the rule's Handoff Mapping: Work Done recap outcome + files facet; Work Remaining `Not done:` line, absent `Nonefull scope completed`; Blockers `Blockers:` line, absent `None`.
97
85
 
98
86
  ## Outputs
99
87
 
@@ -20,7 +20,7 @@ Before any other work, consult `.hatch3r/learnings/INDEX.md` (if present) for pr
20
20
 
21
21
  This step precedes §0 Detect Ambiguity and supplements the more detailed Step 0b in the Implementation Protocol — the inline Step 0 is the always-on minimum; Step 0b is the structured deep-read against `applies-to` globs.
22
22
 
23
- Beyond this once-per-run gate, surface relevant learnings *mid-edit* per `rules/hatch3r-learning-system.md` → Mid-Edit Learning Surfacing: when a file or pattern you are editing matches a captured learning (path overlap, `applies-to` match, or `topic` semantic overlap), cite it on a `Surfaced Learnings:` line in the iteration summary before completing the edit.
23
+ Beyond this once-per-run gate, surface relevant learnings *mid-edit* per `rules/hatch3r-learning-system.md` → Mid-Edit Learning Surfacing: when a file or pattern you are editing matches a captured learning (path overlap, `applies-to` match, or `topic` semantic overlap), cite it on the surfaced facet of the `Learnings:` exception line in the iteration summary before completing the edit.
24
24
 
25
25
  ## §0 Detect Ambiguity (P8 B1)
26
26
 
@@ -220,7 +220,7 @@ Your confidence rating is self-assigned by the same model that produced the verd
220
220
  - **Divergence handling:** if the second pass surfaces any Critical or Warning the first pass did not, do NOT exit clean — return to `REQUEST CHANGES` and record both verdicts. If the verdicts agree, exit clean and record alignment.
221
221
  - **Logging:** append one record per second-pass to `.hatch3r/calibration-log.jsonl` (project-local) with first-pass verdict, second-pass verdict, divergence flag, the `second_pass_model_class` (`different` | `re-roll`), and timestamp.
222
222
 
223
- Directive and N-default source: `rules/hatch3r-reviewer-calibration.md` (the canonical runtime calibration contract; this section is its consumer). The project-local over-claim rate from this log feeds the iteration-summary `Confidence` field per `rules/hatch3r-iteration-summary.md`. Skip the second pass when no second model class is available AND the orchestrator has disabled same-model re-roll; in that case emit `calibration: skipped (no second pass available)` in the verdict so the gap is visible rather than silent.
223
+ Directive and N-default source: `rules/hatch3r-reviewer-calibration.md` (the canonical runtime calibration contract; this section is its consumer). The project-local over-claim rate from this log feeds the `Confidence:` exception line of the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`. Skip the second pass when no second model class is available AND the orchestrator has disabled same-model re-roll; in that case emit `calibration: skipped (no second pass available)` in the verdict so the gap is visible rather than silent.
224
224
 
225
225
  ## Structured Reasoning
226
226
 
@@ -40,7 +40,7 @@ This file lists the eight P7 efficiency patterns referenced by agents, orchestra
40
40
  1. Compute the planned-scope vector: count of distinct files to be written/edited, AND total LOC delta across all planned changes (sum of inserts + deletes).
41
41
  2. If `files > 1` OR `loc_delta > 50`, the agent MUST emit a `## Plan` block (file list + change shape per file) and pause for the orchestrator's confirmation BEFORE issuing any Edit/Write/MultiEdit tool call.
42
42
  3. Single-file changes ≤ 50 LOC may skip the Plan block and act directly (the Tier-1 carve-out for `hatch3r-quick-change`).
43
- 4. The Iteration Summary records the chosen path (`plan_act_split: triggered | skipped`) so reviewer / audit can verify.
43
+ 4. `plan_act_split: triggered` is recorded via the Pattern Rationale block of the recap-contract Iteration Summary (`rules/hatch3r-iteration-summary.md`); a skipped split stays silent — silence asserts the skip — so reviewer / audit can verify the taken path.
44
44
 
45
45
  Verification: this trigger is enforced by the agent body's "Scope Trigger" section — audited under D06 sub-agent 6.5; the audit checks the four code-mutating agents (`implementer`, `fixer`, `architect`, `creator`) for the trigger declaration.
46
46
 
@@ -109,11 +109,11 @@ Before answering project-specific questions about prior work, decisions, or reso
109
109
 
110
110
  ### 11. Standardized Iteration Summary
111
111
 
112
- Every user-facing iteration ends with the canonical Iteration Summary block defined in `rules/hatch3r-iteration-summary.md`.
112
+ Every user-facing iteration ends with the recap-contract Iteration Summary defined in `rules/hatch3r-iteration-summary.md`: a 1–2 line recap — Status (closed enum: SUCCESS | PARTIAL | FAILED | BLOCKED) plus a one-sentence Outcome on line 1, telemetry facets (files · sub-agents · gates · cost delta · tier) on line 2 — followed by exception lines that fire only on non-default outcomes, per the exception-line registry in that rule.
113
113
 
114
- 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.
114
+ An absent exception line is a positive claim of its default (no `Not done:` line claims `None full scope completed`; no `Blockers:` line claims `None`). Emitting silence when a non-default state exists is a gate failure the same violation class as silently skipping Not Done under the prior template. Never inflate confidence if you did not verify, emit the `Confidence:` line with medium/low and name the unknown.
115
115
 
116
- 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.
116
+ Never substitute a prose paragraph for the recap.
117
117
 
118
118
  ### 12. Anti-Duplication Procedure
119
119
 
@@ -69,7 +69,7 @@ D22 / D23 / D24 admission (per the canonical audit domain map) adds three domain
69
69
  | **D24** Governance Self-Audit | `invariant_violation` | A constitution invariant (e.g., lean threshold, anti-slop, pillar coverage) is broken | Critical |
70
70
  | **D24** Governance Self-Audit | `process_drift` | Audit cycle deviated from the audit-execute Phase contract | High |
71
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 |
72
+ | **D24** Governance Self-Audit | `cadence_miss` | Required cadence (evolve session ≥14 days full-rewrite, audit cycle) overdue | Low |
73
73
 
74
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
75
 
@@ -34,7 +34,7 @@ A triage-first orchestrator classifies a task by reading these three signals bef
34
34
  2. **Decision class** — additive/reversible → Light or Standard; introduces an architectural decision, a new integration, or a breaking change → Deep.
35
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
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`).
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 recap's tier facet (`rules/hatch3r-iteration-summary.md`).
38
38
 
39
39
  ---
40
40
 
@@ -86,7 +86,7 @@ Emit confidence in the structured result block above. Dropping the field is a ch
86
86
  | Underlying tool error (filesystem, network, sub-agent timeout) | BLOCKED | Surface the error verbatim; do not silent-retry. |
87
87
 
88
88
  ## Quality Charter
89
- This agent inherits `agents/shared/quality-charter.md` via the frontmatter `quality_charter:` field. The charter binds: §1 confidence levels, §4 root-cause reporting, §6 fail-gracefully, §7 measurable criteria, §8 escalate-ambiguity-early, §10 standardized iteration summary. List below any agent-specific section overrides — if none, write `None — full charter applies`:
89
+ This agent inherits `agents/shared/quality-charter.md` via the frontmatter `quality_charter:` field. The charter binds: §1 confidence levels, §4 root-cause reporting, §6 fail-gracefully, §7 measurable criteria, §8 escalate-ambiguity-early, §10 consult-prior-learnings, §11 standardized iteration summary. List below any agent-specific section overrides — if none, write `None — full charter applies`:
90
90
 
91
91
  - <CHARTER-OVERRIDE-OR-NONE>
92
92
  ```
@@ -110,12 +110,12 @@ The "Default if no response" line is mandatory in every plain-text fallback ques
110
110
 
111
111
  1. **Detect non-response.** If a question goes unanswered within the host runtime's question window (Claude Code: idle session timeout; Cursor: AskUserQuestion timeout; Copilot Workspace: prompt-cycle gap), or if the user replies "you decide" / "default" / empty, treat as non-response.
112
112
  2. **Apply the safe default.** Pick the option declared on the `Default if no response: <option number>` line — the lowest-blast-radius reversible choice the question's author named.
113
- 3. **Log the default-taken decision.** Emit in the Iteration Summary §8 (Open Questions / Blockers) a single line: `Default applied: <question summary> → option <N> (<one-line reason>)`. This is the operational counterpart to the prose mandate — every agent / command ASK output that exercises the default MUST log the decision. The §8 line is a required field of the canonical Iteration Summary template (`rules/hatch3r-iteration-summary.md` → The 9 Sections, item 8), and the catching-gate ownership is named in `rules/hatch3r-clarification-default.md` → How to ask — those two files are the enforcing surface for this step.
113
+ 3. **Log the default-taken decision.** Emit in the Iteration Summary the `Default applied:` exception line (a registered line of the recap contract), one per default: `Default applied: <question summary> → option <N> (<one-line reason>)`. This is the operational counterpart to the prose mandate — every agent / command ASK output that exercises the default MUST log the decision. The `Default applied:` line is a registered exception line of the recap-contract Iteration Summary (`rules/hatch3r-iteration-summary.md` → Exception Lines), and the catching-gate ownership is named in `rules/hatch3r-clarification-default.md` → How to ask — those two files are the enforcing surface for this step.
114
114
  4. **Never silent-pick.** If no `Default if no response: <option>` line was emitted with the question (an authoring bug per the rules in this file), return `BLOCKED_AMBIGUITY` in the structured result rather than guessing.
115
115
 
116
- The §8 log is the audit-visible evidence that the default-if-no-response contract was honored; absence of the log when a default was applied is a P8 B1 gate failure. Runtime emission of the §8 line is orchestrator-produced interpreted markdown, so no static gate can verify it fired — D05 (prompt-engineering) and D13 (human-AI collaboration) audit-cycle spot checks plus the per-run Iteration Summary validation gate are the enforcement, not a compiled check.
116
+ The `Default applied:` line is the audit-visible evidence that the default-if-no-response contract was honored; absence of the line when a default was applied is a P8 B1 gate failure. Runtime emission of the `Default applied:` line is orchestrator-produced interpreted markdown, so no static gate can verify it fired — D05 (prompt-engineering) and D13 (human-AI collaboration) audit-cycle spot checks plus the per-run Iteration Summary validation gate are the enforcement, not a compiled check.
117
117
 
118
- The contract has a single named owner so it is not re-declared per command: the always-on, `precedence: high` rule `rules/hatch3r-clarification-default.md` (`scope: always`) binds every `commands/hatch3r-*.md` orchestrator and mutating skill corpus-wide, and that rule's "How to ask" section is the catching gate. An individual command body therefore need not repeat the default-handling vocabulary to be bound by it — the rule + this protocol + the Iteration Summary §8 template are the three-anchor owner set, and a command inherits the contract by being in scope. Treat a command that *does* restate it as a convenience, not the source of truth.
118
+ The contract has a single named owner so it is not re-declared per command: the always-on, `precedence: high` rule `rules/hatch3r-clarification-default.md` (`scope: always`) binds every `commands/hatch3r-*.md` orchestrator and mutating skill corpus-wide, and that rule's "How to ask" section is the catching gate. An individual command body therefore need not repeat the default-handling vocabulary to be bound by it — the rule + this protocol + the `Default applied:` exception line of the recap-contract Iteration Summary are the three-anchor owner set, and a command inherits the contract by being in scope. Treat a command that *does* restate it as a convenience, not the source of truth.
119
119
 
120
120
  ## Cross-Phase Aggregation
121
121
 
@@ -88,7 +88,7 @@ cost_estimate:
88
88
  estimated_duration_min: <int>
89
89
  ```
90
90
 
91
- Post-execution actuals + delta land in the Step 8 output summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
91
+ Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`.
92
92
 
93
93
  ### Effort Override (Decision 17)
94
94
 
@@ -350,30 +350,18 @@ api-spec is long-running — a Tier 3 full-codebase scan runs the hatch3r-resear
350
350
 
351
351
  ## Iteration Summary (mandatory output)
352
352
 
353
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
354
-
355
- The 9 sections:
356
-
357
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
358
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
359
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
360
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
361
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
362
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
363
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
364
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
365
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
353
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
366
354
 
367
355
  ### Cost Visibility (Decision 24)
368
356
 
369
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
357
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
370
358
 
371
359
  ## Cost estimate (Decision 24)
372
360
 
373
361
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
374
362
 
375
363
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first researcher dispatch (Step 3 endpoint discovery).
376
- - **Post-execution `cost_actuals` + `delta`** — appended to the Step 8 output summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
364
+ - **Post-execution `cost_actuals` + `delta`** — the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
377
365
 
378
366
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 3` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 0 (inline single-endpoint edit); Tier 2 ≈ 2 (researcher scans routes + docs-writer assembles); Tier 3 up to 3 (researcher + docs-writer + reviewer validation in validate/drift mode). Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
379
367
 
@@ -186,30 +186,17 @@ Run the project verification gates and record exit codes: `npm test` (or the pro
186
186
 
187
187
  ### Iteration Summary (mandatory output)
188
188
 
189
- Emit the canonical iteration summary per `rules/hatch3r-iteration-summary.md`:
189
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
190
+
191
+ Worked example for this domain:
190
192
 
191
193
  ```markdown
192
194
  ## Iteration Summary
193
195
 
194
- **Status:** SUCCESS | PARTIAL | FAILED | BLOCKED
195
- **Outcome:** {one sentence e.g., "Scaffolded OAuth 2.1 + OIDC + hashed-PAT auth for orders-api; security gate PASS."}
196
-
197
- **Done:**
198
- - src/auth/oauth/* → authorization-code + PKCE flow via hatch3r-implementer (proof: {id})
199
- - src/auth/oidc/* → ID-token validation (iss/aud/nonce/JWKS) via hatch3r-implementer (proof: {id})
200
- - src/auth/pat/* → Argon2id-hashed PAT issue/verify via hatch3r-implementer (proof: {id})
201
-
202
- **Not Done / Deferred / Unverified:**
203
- - `.env.example` placeholders — populate real issuer + client_secret before first run
204
- - (or: `None — full scope completed`)
205
-
206
- **Open Questions / Blockers:**
207
- - (or: `None`)
208
-
209
- **Fan-out + Cost:** sub_agents_spawned: { count, rationale } + cost_estimate / cost_actuals / delta
210
- **Pillar Impact Attribution:** progress_toward_pillar: content-quality.CQ3+{delta}
211
- **Confidence:** {high | medium | low} — {basis from implementer output + security gate verdict}
212
- **Suggested Next Action:** {one line — e.g., "Populate .env, then wire the OIDC callback route into the service router."}
196
+ **SUCCESS** Scaffolded OAuth 2.1 + OIDC + hashed-PAT auth for orders-api; security gate PASS on both modes.
197
+ files 9 (+412/−0) · sa 4/4 · gates 3/3 · cost Δ+6% tok / Δ+2% min · tier 2
198
+ Not done: `.env.example` placeholders — deferred: populate real issuer + client_secret before first run
199
+ Next: wire the OIDC callback route into the service router.
213
200
  ```
214
201
 
215
202
  Status decision rules:
@@ -86,7 +86,7 @@ cost_estimate:
86
86
  estimated_duration_min: <int>
87
87
  ```
88
88
 
89
- The benchmark suite execution time (Step 5) is wall-clock measurement, not LLM cost — report it separately in `estimated_duration_min` so the cost delta is not skewed by iteration count. Post-execution actuals + delta land in the Step 9 report's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
89
+ The benchmark suite execution time (Step 5) is wall-clock measurement, not LLM cost — report it separately in `estimated_duration_min` so the cost delta is not skewed by iteration count. Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`.
90
90
 
91
91
  ### Effort Override (Decision 17)
92
92
 
@@ -453,30 +453,18 @@ benchmark is long-running — a Tier 3 full-suite run executes a multi-iteration
453
453
 
454
454
  ## Iteration Summary (mandatory output)
455
455
 
456
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
457
-
458
- The 9 sections:
459
-
460
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
461
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
462
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
463
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
464
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
465
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
466
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
467
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
468
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
456
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
469
457
 
470
458
  ### Cost Visibility (Decision 24)
471
459
 
472
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
460
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
473
461
 
474
462
  ## Cost estimate (Decision 24)
475
463
 
476
464
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
477
465
 
478
466
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first researcher dispatch (Step 2 discovery).
479
- - **Post-execution `cost_actuals` + `delta`** — appended to the Step 9 report's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
467
+ - **Post-execution `cost_actuals` + `delta`** — the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
480
468
 
481
469
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 3` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 0 (inline discovery + execution, no fan-out); Tier 2 ≈ 2 (performance for analysis + docs-writer when regressions found); Tier 3 up to 3 (researcher + performance + docs-writer). Benchmark wall-clock execution is reported separately and not counted as LLM token cost. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
482
470
 
@@ -99,7 +99,7 @@ cost_estimate:
99
99
  estimated_duration_min: <int>
100
100
  ```
101
101
 
102
- The Step 2.5 triage interview and the per-step ASK checkpoints are user-driven and excluded from the duration estimate. Post-execution actuals + delta land in the end-of-run iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
102
+ The Step 2.5 triage interview and the per-step ASK checkpoints are user-driven and excluded from the duration estimate. Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`.
103
103
 
104
104
  ### Effort Override (Decision 17)
105
105
 
@@ -831,30 +831,18 @@ board-fill is long-running — a Tier 3 batch can span 15+ items with per-issue
831
831
 
832
832
  ## Iteration Summary (mandatory output)
833
833
 
834
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
835
-
836
- The 9 sections:
837
-
838
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
839
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
840
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
841
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
842
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
843
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
844
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
845
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
846
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
834
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
847
835
 
848
836
  ### Cost Visibility (Decision 24)
849
837
 
850
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
838
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
851
839
 
852
840
  ## Cost estimate (Decision 24)
853
841
 
854
842
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
855
843
 
856
844
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first sub-agent dispatch (Step 7.9 reviewer/fixer loops or Step 1 explore sub-agents).
857
- - **Post-execution `cost_actuals` + `delta`** — appended to the end-of-run iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
845
+ - **Post-execution `cost_actuals` + `delta`** — the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
858
846
 
859
847
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 11` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 0 (Step 7.9 production-readiness review skipped); Tier 2 ≈ 2 per issue (reviewer + fixer); Tier 3 up to 11 per issue (reviewer/fixer plus the 9 CQ vector specialists consulted on readiness), scaling with issue count. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
860
848
 
@@ -110,7 +110,7 @@ cost_estimate:
110
110
  estimated_duration_min: <int>
111
111
  ```
112
112
 
113
- Post-execution actuals + delta land in the Step 7 / post-impl iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
113
+ Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`.
114
114
 
115
115
  ### Effort Override (Decision 17)
116
116
 
@@ -375,30 +375,18 @@ board-pickup is long-running — a Tier 3 batch picks up multiple epics/sub-issu
375
375
 
376
376
  ## Iteration Summary (mandatory output)
377
377
 
378
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
379
-
380
- The 9 sections:
381
-
382
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
383
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
384
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
385
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
386
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
387
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
388
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
389
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
390
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
378
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
391
379
 
392
380
  ### Cost Visibility (Decision 24)
393
381
 
394
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
382
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
395
383
 
396
384
  ## Cost estimate (Decision 24)
397
385
 
398
386
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
399
387
 
400
388
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first sub-agent dispatch (Step 6 delegation).
401
- - **Post-execution `cost_actuals` + `delta`** — appended to the Step 7 / post-impl iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
389
+ - **Post-execution `cost_actuals` + `delta`** — the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
402
390
 
403
391
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 11` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 2 (researcher + implementer, reviewer/fixer/testability/security when triggered); Tier 2 ≈ 6 (researcher + implementer + review loop + mandatory final-quality); Tier 3 up to 11 per issue (full pipeline including the Phase-4b CQ specialist batch bounded by `max_phase4_parallel`), scaling with batch-issue count. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
404
392
 
@@ -88,7 +88,7 @@ cost_estimate:
88
88
  estimated_duration_min: <int>
89
89
  ```
90
90
 
91
- Post-execution actuals + delta land in the iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
91
+ Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
92
92
 
93
93
  ### Effort Override (Decision 17)
94
94
 
@@ -190,23 +190,11 @@ bug-pipeline is multi-phase — a Tier 2/3 run dispatches a researcher (Step 1),
190
190
 
191
191
  ## Iteration Summary (mandatory output)
192
192
 
193
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
194
-
195
- The 9 sections:
196
-
197
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
198
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
199
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
200
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
201
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
202
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
203
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
204
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
205
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
193
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
206
194
 
207
195
  ### Cost Visibility (Decision 24)
208
196
 
209
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
197
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
210
198
 
211
199
  ---
212
200
 
@@ -87,7 +87,7 @@ cost_estimate:
87
87
  estimated_duration_min: <int>
88
88
  ```
89
89
 
90
- Post-execution actuals + delta land in the iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
90
+ Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`.
91
91
 
92
92
  ### Effort Override (Decision 17)
93
93
 
@@ -470,30 +470,18 @@ bug-plan is long-running — a Tier 2/3 investigation fans out four parallel hat
470
470
 
471
471
  ## Iteration Summary (mandatory output)
472
472
 
473
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
474
-
475
- The 9 sections:
476
-
477
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
478
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
479
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
480
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
481
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
482
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
483
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
484
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
485
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
473
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
486
474
 
487
475
  ### Cost Visibility (Decision 24)
488
476
 
489
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
477
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
490
478
 
491
479
  ## Cost estimate (Decision 24)
492
480
 
493
481
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
494
482
 
495
483
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first researcher dispatch.
496
- - **Post-execution `cost_actuals` + `delta`** — appended to the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
484
+ - **Post-execution `cost_actuals` + `delta`** — the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
497
485
 
498
486
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 4` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 routes to the `hatch3r-bug-fix` skill (no fanout); Tier 2/3 spawn up to 4 parallel researcher modes plus the docs-writer. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
499
487
 
@@ -83,7 +83,7 @@ cost_estimate:
83
83
  estimated_duration_min: <int>
84
84
  ```
85
85
 
86
- Post-execution actuals + delta land in the iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
86
+ Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`.
87
87
 
88
88
  ### Effort Override (Decision 17)
89
89
 
@@ -1261,30 +1261,18 @@ codebase-map is long-running — a Tier 3 brownfield analysis fans out eight par
1261
1261
 
1262
1262
  ## Iteration Summary (mandatory output)
1263
1263
 
1264
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
1265
-
1266
- The 9 sections:
1267
-
1268
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
1269
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
1270
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
1271
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
1272
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
1273
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
1274
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
1275
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
1276
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
1264
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
1277
1265
 
1278
1266
  ### Cost Visibility (Decision 24)
1279
1267
 
1280
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
1268
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
1281
1269
 
1282
1270
  ## Cost estimate (Decision 24)
1283
1271
 
1284
1272
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
1285
1273
 
1286
1274
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first analyzer dispatch.
1287
- - **Post-execution `cost_actuals` + `delta`** — appended to the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
1275
+ - **Post-execution `cost_actuals` + `delta`** — the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
1288
1276
 
1289
1277
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 8` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 2 (reduced analyzer set); Tier 2 ≈ 6; Tier 3 up to 8 parallel analyzers. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
1290
1278
 
@@ -64,7 +64,7 @@ cost_estimate:
64
64
  estimated_duration_min: <int>
65
65
  ```
66
66
 
67
- The Phase 1 input-collection ASKs are user-driven and excluded from the duration estimate. Post-execution actuals + delta land in the Phase 3 housekeeping summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
67
+ The Phase 1 input-collection ASKs are user-driven and excluded from the duration estimate. Post-execution, the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`. Token telemetry sources from `src/pipeline/observability.ts`.
68
68
 
69
69
  ### Effort Override (Decision 17)
70
70
 
@@ -296,30 +296,18 @@ create is long-running in multi-artifact mode — Phase 1 collects every artifac
296
296
 
297
297
  ## Iteration Summary (mandatory output)
298
298
 
299
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output. The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
300
-
301
- The 9 sections:
302
-
303
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
304
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
305
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
306
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
307
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
308
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
309
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
310
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
311
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
299
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md`: a 1–2 line recap (status, outcome, files · sub-agents · gates · cost delta) plus every exception line whose firing condition holds — silence asserts the default. Omitting the recap fails that rule's Validation Gate (CONSTITUTION §6 Decision 23, superseded in place 2026-07-06).
312
300
 
313
301
  ### Cost Visibility (Decision 24)
314
302
 
315
- > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; both land in Section 2 above.
303
+ > Orchestration boilerplate: see `commands/shared/orchestration-frame.md` → Cost Estimate for the 5-field `cost_estimate` schema and the post-execution `cost_actuals` + `delta` contract; the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
316
304
 
317
305
  ## Cost estimate (Decision 24)
318
306
 
319
307
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
320
308
 
321
309
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the Phase 2 `hatch3r-creator` delegation.
322
- - **Post-execution `cost_actuals` + `delta`** — appended to the Phase 3 housekeeping summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
310
+ - **Post-execution `cost_actuals` + `delta`** — the delta figure lands in the Iteration Summary recap (cost facet); full blocks surface on the `Cost:` exception line beyond ±25%, per `rules/hatch3r-cost-visibility.md`.
323
311
 
324
312
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 1` × artifact count): one `hatch3r-creator` per artifact authored. `estimated_web_research_queries` reflects the Decision 14 reputable-source reconnaissance for new agent/skill/rule bodies (≥2 sources), and is 0 for trivial frontmatter-only or single-line edits. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
325
313