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
@@ -114,7 +114,7 @@ cost_estimate:
114
114
  estimated_duration_min: <int>
115
115
  ```
116
116
 
117
- Post-execution actuals + delta land in the Step 8 summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
117
+ Post-execution actuals + delta land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
118
118
 
119
119
  ### Effort Override (Decision 17)
120
120
 
@@ -444,30 +444,18 @@ quick-change runs adaptive ceremony — trivial items execute inline with no che
444
444
 
445
445
  ## Iteration Summary (mandatory output)
446
446
 
447
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output (the Step 8 Summary above is the quick-change-specific rendering both the Step 8 block and the 9-section canonical contract apply). The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
448
-
449
- The 9 sections:
450
-
451
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
452
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
453
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
454
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
455
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
456
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
457
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
458
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
459
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
447
+ 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). (The Step 8 block above is the domain rendering; the recap closes the run.)
460
448
 
461
449
  ### Cost Visibility (Decision 24)
462
450
 
463
- > 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.
451
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
464
452
 
465
453
  ## Cost estimate (Decision 24)
466
454
 
467
455
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
468
456
 
469
457
  - **Pre-execution `cost_estimate`** — emitted in the Pre-Execution Cost Preview above before the first sub-agent dispatch.
470
- - **Post-execution `cost_actuals` + `delta`** — appended to the Step 8 summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
458
+ - **Post-execution `cost_actuals` + `delta`** — appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
471
459
 
472
460
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 13` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 trivial inline ≈ 0 (no sub-agent); Tier 2 ≈ 3 (researcher + implementer + reviewer, plus lint-fixer/fixer/testability/security when triggered); up to 13 when the conditional CQ vector specialists fire per their trigger conditions. 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`.
473
461
 
@@ -91,7 +91,7 @@ cost_estimate:
91
91
  estimated_duration_min: <int>
92
92
  ```
93
93
 
94
- 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`.
94
+ Post-execution actuals + delta land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
95
95
 
96
96
  ### Effort Override (Decision 17)
97
97
 
@@ -487,30 +487,18 @@ refactor-plan is long-running — a Tier 3 refactor brief fans out 5 parallel re
487
487
 
488
488
  ## Iteration Summary (mandatory output)
489
489
 
490
- 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).
491
-
492
- The 9 sections:
493
-
494
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
495
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
496
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
497
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
498
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
499
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
500
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
501
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
502
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
490
+ 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).
503
491
 
504
492
  ### Cost Visibility (Decision 24)
505
493
 
506
- > 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.
494
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
507
495
 
508
496
  ## Cost estimate (Decision 24)
509
497
 
510
498
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
511
499
 
512
500
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first researcher dispatch.
513
- - **Post-execution `cost_actuals` + `delta`** — appended to the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
501
+ - **Post-execution `cost_actuals` + `delta`** — appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
514
502
 
515
503
  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 ≈ 2 (reduced researcher set); Tier 2/3 spawn up to 4 parallel researcher modes (current-state + refactoring-strategy + migration-path + risk). 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`.
516
504
 
@@ -121,7 +121,7 @@ cost_preview:
121
121
  estimated_duration_min: <int>
122
122
  ```
123
123
 
124
- Post-execution actuals + `delta_percent` land in the Step 10 iteration summary's Fan-out + Cost section. Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
124
+ Post-execution actuals + `delta_percent` land in the Iteration Summary recap (cost facet; full blocks 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`.
125
125
 
126
126
  ### Effort Override (Decision 17)
127
127
 
@@ -336,19 +336,7 @@ The npm publish itself runs in CI (`.github/workflows/release.yml`) on the human
336
336
 
337
337
  ## Step 10: Iteration Summary (mandatory output)
338
338
 
339
- 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).
340
-
341
- The 9 sections:
342
-
343
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
344
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_preview` / actuals / `delta_percent` blocks. Per-tier `expected_sa_count` (from frontmatter `sub_agents_spawned.count: 7` × tier heuristic in `rules/hatch3r-cost-visibility.md`): Tier 1 ≈ 3 (bump + changelog implementer, testability, security); Tier 2 ≈ 6 (+ review loop reviewer/fixer + ci-watcher when a gate trips); Tier 3 up to 7 (full pipeline incl. docs-writer). Token telemetry sources from `src/pipeline/observability.ts`.
345
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
346
- 4. **Files Mutated** — list with diff summary (version files, CHANGELOG, SBOM, docs).
347
- 5. **Gates Passed / Failed** — explicit list (test, tsc, lint, validate, lockfile-lint, npm audit, hatch3r verify, review loop, testability, security).
348
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
349
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
350
- 8. **Open Questions / Blockers** — explicit `None` if fully closed; record the Step 9 human-owned next step here.
351
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
339
+ 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).
352
340
 
353
341
  **Status enum:** SUCCESS (release assembled + committed on the branch, all gates green, awaiting human publish) | PARTIAL (a gate ended on a retry-limit miss or SBOM tooling absent) | FAILED (build broken, no release commit produced) | BLOCKED (review loop unresolved after 3 iterations, or a breaking-change decision needs the user). SUCCESS here means "ready for human publish" — never "published".
354
342
 
@@ -375,7 +363,9 @@ release is long-running — a Tier 3 release runs preflight, version bump, chang
375
363
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
376
364
 
377
365
  - **Pre-execution `cost_preview`** — emitted in Step 0.5 before the Step 2 implementer dispatch.
378
- - **Post-execution actuals + `delta_percent`** — appended to the Step 10 iteration summary's Fan-out + Cost section. Deltas >25% absolute value carry `flagged_for_review: true`.
366
+ - **Post-execution actuals + `delta_percent`** — appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`. Deltas >25% absolute value carry `flagged_for_review: true`.
367
+
368
+ Per-tier `expected_sa_count` (from frontmatter `sub_agents_spawned.count: 7` × tier heuristic in `rules/hatch3r-cost-visibility.md`): Tier 1 ≈ 3 (bump + changelog implementer, testability, security); Tier 2 ≈ 6 (+ review loop reviewer/fixer + ci-watcher when a gate trips); Tier 3 up to 7 (full pipeline incl. docs-writer). Token telemetry sources from `src/pipeline/observability.ts`.
379
369
 
380
370
  ---
381
371
 
@@ -113,7 +113,7 @@ cost_estimate:
113
113
  estimated_duration_min: <int>
114
114
  ```
115
115
 
116
- The Step 3 user-feedback interview is user-driven and excluded from the duration estimate. Post-execution actuals + delta land in the Step 9 merge-readiness assessment's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
116
+ The Step 3 user-feedback interview is user-driven and excluded from the duration estimate. Post-execution actuals + delta land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
117
117
 
118
118
  ### Effort Override (Decision 17)
119
119
 
@@ -524,30 +524,18 @@ revision is long-running — a Tier 2/3 run walks 10 sequential steps (context r
524
524
 
525
525
  ## Iteration Summary (mandatory output)
526
526
 
527
- 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).
528
-
529
- The 9 sections:
530
-
531
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
532
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
533
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
534
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
535
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
536
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
537
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
538
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
539
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
527
+ 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).
540
528
 
541
529
  ### Cost Visibility (Decision 24)
542
530
 
543
- > 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.
531
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
544
532
 
545
533
  ## Cost estimate (Decision 24)
546
534
 
547
535
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
548
536
 
549
537
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first sub-agent dispatch (Step 6 fix delegation).
550
- - **Post-execution `cost_actuals` + `delta`** — appended to the Step 9 merge-readiness assessment's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
538
+ - **Post-execution `cost_actuals` + `delta`** — appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
551
539
 
552
540
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 10` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 cleanup-only ≈ 0 (inline fixes, no sub-agent); Tier 2 ≈ 5 (conditional researcher + implementer/lint-fixer/hatch3r-testability fix group + reviewer); Tier 3 up to 10 (conditional researcher + full pipeline including the parallel Stage 2 final-quality specialists bounded by `max_phase4_parallel`). 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`.
553
541
 
@@ -82,7 +82,7 @@ cost_estimate:
82
82
  estimated_duration_min: <int>
83
83
  ```
84
84
 
85
- The Step 1 business-discovery interview is user-driven and excluded from the duration estimate. Post-execution actuals + delta land in the Step 6 summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
85
+ The Step 1 business-discovery interview is user-driven and excluded from the duration estimate. Post-execution actuals + delta land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
86
86
 
87
87
  ### Effort Override (Decision 17)
88
88
 
@@ -616,30 +616,18 @@ roadmap is long-running — a Tier 3 brownfield discovery fans out parallel rese
616
616
 
617
617
  ## Iteration Summary (mandatory output)
618
618
 
619
- 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).
620
-
621
- The 9 sections:
622
-
623
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
624
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
625
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
626
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
627
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
628
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
629
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
630
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
631
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
619
+ 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).
632
620
 
633
621
  ### Cost Visibility (Decision 24)
634
622
 
635
- > 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.
623
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
636
624
 
637
625
  ## Cost estimate (Decision 24)
638
626
 
639
627
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
640
628
 
641
629
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first researcher dispatch (Step 3).
642
- - **Post-execution `cost_actuals` + `delta`** — appended to the Step 6 summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
630
+ - **Post-execution `cost_actuals` + `delta`** — appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
643
631
 
644
632
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 2` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 1 (technical-readiness researcher only, condensed todo.md); Tier 2 ≈ 2-3 (both researchers + todo.md docs-writer); Tier 3 up to 3 (both researchers with deep web research + AGENTS.md docs-writer). This command is web-research-heavy at Tier 3 — `estimated_web_research_queries` typically dominates the cost delta. 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`.
645
633
 
@@ -61,7 +61,7 @@ cost_estimate:
61
61
  estimated_duration_min: <int>
62
62
  ```
63
63
 
64
- Post-execution actuals + delta land in the Step 6 finalization summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
64
+ Post-execution actuals + delta land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
65
65
 
66
66
  ### Effort Override (Decision 17)
67
67
 
@@ -444,30 +444,18 @@ security-audit is long-running — a Tier 2/3 audit fans out across N module sub
444
444
 
445
445
  ## Iteration Summary (mandatory output)
446
446
 
447
- 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).
448
-
449
- The 9 sections:
450
-
451
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
452
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
453
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
454
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
455
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
456
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
457
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
458
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
459
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
447
+ 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).
460
448
 
461
449
  ### Cost Visibility (Decision 24)
462
450
 
463
- > 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.
451
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
464
452
 
465
453
  ## Cost estimate (Decision 24)
466
454
 
467
455
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
468
456
 
469
457
  - **Pre-execution `cost_estimate`** — emitted in the Pre-Execution Cost Preview above before the first module audit-authoring dispatch (Step 4).
470
- - **Post-execution `cost_actuals` + `delta`** — appended to the Step 6 finalization summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
458
+ - **Post-execution `cost_actuals` + `delta`** — appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
471
459
 
472
460
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 2`, which is the static floor; actual fan-out scales with discovered module count per `rules/fan-out-discipline.md` P8 B2): one `hatch3r-implementer` Task per module sub-issue body + `hatch3r-security` for the cross-cutting axis (OWASP ASI01-10 + supply-chain). Tier 2 (module count ≤8) and Tier 3 (module count >8) both bound the parallel module batch by `max_phase4_parallel`. 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`.
473
461
 
@@ -130,7 +130,7 @@ cost_estimate:
130
130
  estimated_duration_min: <int>
131
131
  ```
132
132
 
133
- Post-execution actuals + delta land in the Step 5 Iteration Summary's Fan-out + Cost section. `--effort=light|standard|deep` (Decision 17) forces the tier; record both auto and override.
133
+ Post-execution actuals + delta land in the Step 5 Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`. `--effort=light|standard|deep` (Decision 17) forces the tier; record both auto and override.
134
134
 
135
135
  ---
136
136
 
@@ -185,29 +185,17 @@ Run the available validation commands and record exit codes: `promtool check rul
185
185
 
186
186
  ### Iteration Summary (mandatory output)
187
187
 
188
- Emit the canonical iteration summary per `rules/hatch3r-iteration-summary.md`:
188
+ 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).
189
+
190
+ Worked example for this domain:
189
191
 
190
192
  ```markdown
191
193
  ## Iteration Summary
192
194
 
193
- **Status:** SUCCESS | PARTIAL | FAILED | BLOCKED
194
- **Outcome:** {one sentence e.g., "Scaffolded availability + p95 + p99 SLOs and 3-tier burn-rate alerts for checkout-service; reliability gate PASS."}
195
-
196
- **Done:**
197
- - slo/{service}.slo.yaml → 3 SLOs (availability, p95, p99) via hatch3r-implementer (proof: {id})
198
- - slo/{service}.alerts.yaml → 3-tier multi-burn-rate alerts via hatch3r-implementer (proof: {id})
199
-
200
- **Not Done / Deferred / Unverified:**
201
- - Metric-name placeholders (`# TODO`) — fill with the project's real metric names before deploy
202
- - (or: `None — full scope completed`)
203
-
204
- **Open Questions / Blockers:**
205
- - (or: `None`)
206
-
207
- **Fan-out + Cost:** sub_agents_spawned: { count, rationale } + cost_estimate / cost_actuals / delta
208
- **Pillar Impact Attribution:** progress_toward_pillar: content-quality.CQ4+{delta}
209
- **Confidence:** {high | medium | low} — {basis from implementer output + reliability gate verdict}
210
- **Suggested Next Action:** {one line — e.g., "Replace metric-name TODOs, then wire slo/*.alerts.yaml into the Prometheus rule_files."}
195
+ **SUCCESS** Scaffolded availability + p95/p99 SLOs and 3-tier burn-rate alerts for checkout-service; reliability gate PASS.
196
+ files 2 (+118/−0) · sa 2/2 · gates 2/2 · cost Δ+4% tok / Δ−10% min · tier 1
197
+ Not done: metric-name placeholders (`# TODO`) — deferred: fill with the project's real metric names before deploy
198
+ Next: wire slo/checkout-service.alerts.yaml into the Prometheus rule_files.
211
199
  ```
212
200
 
213
201
  Status decision rules:
@@ -136,7 +136,14 @@ If any deliverable is missing or empty, halt and surface the gap to the user —
136
136
 
137
137
  ## Phase 6 — Iteration Summary
138
138
 
139
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md`. Sections required: Status, Outcome, Done, Not Done / Deferred / Unverified, Open Questions / Blockers, Confidence, Artifacts Touched (the 8 deliverable paths), Verifications Run (deliverable-presence checks), Suggested Next Action (typically `/hatch3r-board-fill` to convert acceptance criteria into a board).
139
+ Close the run with the recap-contract Iteration Summary per `rules/hatch3r-iteration-summary.md` a 1–2 line recap plus every exception line whose firing condition holds. Worked example:
140
+
141
+ ```markdown
142
+ ## Iteration Summary
143
+ **SUCCESS** — Spec tree written to `.hatch3r/spec/<timestamp>/`; all 8 deliverables present, presence checks passed.
144
+ files 8 (+412/−0) · sa 2/2 · gates 8/8 · cost Δ+6% tok / Δ−3% min · tier 2
145
+ Next: /hatch3r-board-fill to convert acceptance criteria into a board.
146
+ ```
140
147
 
141
148
  ## Output paths
142
149
 
@@ -155,23 +162,11 @@ The directory is the unit of versioning — re-running `/hatch3r-spec` produces
155
162
 
156
163
  ## Iteration Summary (mandatory output)
157
164
 
158
- Emit the canonical 9-section iteration summary per `rules/hatch3r-iteration-summary.md` as the final user-facing output (the Phase 6 Iteration Summary above is the spec-specific renderingboth the Phase 6 block and the 9-section canonical contract apply). The validation gate at `.claude/rules/capability-lifecycle.md` blocks SUCCESS declarations without this block (CONSTITUTION §6 Decision 23).
159
-
160
- The 9 sections:
161
-
162
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
163
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
164
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
165
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
166
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
167
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
168
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
169
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
170
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
165
+ 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). (The Phase 6 block above is the domain rendering; the recap closes the run.)
171
166
 
172
167
  ### Cost Visibility (Decision 24)
173
168
 
174
- > 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.
169
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
175
170
 
176
171
  ## Cost estimate (Decision 24)
177
172
 
@@ -201,7 +196,7 @@ delta:
201
196
  duration_delta_percent: <float>
202
197
  ```
203
198
 
204
- Both blocks land in the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2. Deltas beyond 25% absolute value carry `flagged_for_review: true`.
199
+ Both blocks land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`. Deltas beyond 25% absolute value carry `flagged_for_review: true`.
205
200
 
206
201
  ## References
207
202
 
@@ -82,7 +82,7 @@ cost_estimate:
82
82
  estimated_duration_min: <int>
83
83
  ```
84
84
 
85
- 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`.
85
+ Post-execution actuals + delta land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
86
86
 
87
87
  ### Effort Override (Decision 17)
88
88
 
@@ -576,30 +576,18 @@ test-plan is long-running — a Tier 3 plan fans out parallel researcher sub-age
576
576
 
577
577
  ## Iteration Summary (mandatory output)
578
578
 
579
- 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).
580
-
581
- The 9 sections:
582
-
583
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
584
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
585
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
586
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
587
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
588
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
589
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
590
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
591
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
579
+ 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).
592
580
 
593
581
  ### Cost Visibility (Decision 24)
594
582
 
595
- > 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.
583
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
596
584
 
597
585
  ## Cost estimate (Decision 24)
598
586
 
599
587
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
600
588
 
601
589
  - **Pre-execution `cost_estimate`** -- emitted in Step 0.5 before the first researcher dispatch.
602
- - **Post-execution `cost_actuals` + `delta`** -- appended to the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2.
590
+ - **Post-execution `cost_actuals` + `delta`** -- appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
603
591
 
604
592
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 5` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Tier 1 ≈ 2 (coverage-analysis + risk-prioritization); Tier 2/3 spawn up to 5 parallel researcher modes. 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`.
605
593
 
@@ -135,7 +135,7 @@ cost_estimate:
135
135
  estimated_duration_min: <int>
136
136
  ```
137
137
 
138
- Post-execution actuals + delta land in the Phase 4 / Quick Step 3 iteration summary's Fan-out + Cost section per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
138
+ Post-execution actuals + delta land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md` Post-Execution Actuals. Token telemetry sources from `src/pipeline/observability.ts`.
139
139
 
140
140
  ### Step 0.6: Effort Override (Decision 17)
141
141
 
@@ -575,30 +575,18 @@ workflow is long-running — a Tier 2/3 run walks the 4-phase delivery pipeline
575
575
 
576
576
  ## Iteration Summary (mandatory output)
577
577
 
578
- 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).
579
-
580
- The 9 sections:
581
-
582
- 1. **Request** — verbatim restatement of the user's ask in one sentence.
583
- 2. **Fan-out + Cost** — `sub_agents_spawned: { count, rationale }` plus the `cost_estimate` / `cost_actuals` / `delta` blocks (see Cost Visibility below).
584
- 3. **Web Research** — every URL fetched with access date + trust tier per `agents/shared/rigor-contract.md` (0 acceptable when no research was needed).
585
- 4. **Files Mutated** — list with diff summary (lines added / removed / files created).
586
- 5. **Gates Passed / Failed** — explicit list per `.claude/rules/capability-lifecycle.md` Gate Checklist.
587
- 6. **Pillar Impact Attribution** — `progress_toward_pillar: <axis>.<pillar_id>+<delta>` per CONSTITUTION §6 Decision 17.
588
- 7. **Verification Commands** — exact commands run with exit codes plus key output lines (≤200 chars).
589
- 8. **Open Questions / Blockers** — explicit `None` if fully closed.
590
- 9. **Learnings Captured** — IDs of any learnings written to `.hatch3r/learnings/` this run per `rules/hatch3r-learning-system.md`.
578
+ 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).
591
579
 
592
580
  ### Cost Visibility (Decision 24)
593
581
 
594
- > 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.
582
+ > 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 the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
595
583
 
596
584
  ## Cost estimate (Decision 24)
597
585
 
598
586
  This command emits cost transparency per `rules/hatch3r-cost-visibility.md` and CONSTITUTION §6 Decision 24/29:
599
587
 
600
588
  - **Pre-execution `cost_estimate`** — emitted in Step 0.5 before the first sub-agent dispatch (both Full and Quick Mode).
601
- - **Post-execution `cost_actuals` + `delta`** — appended to the Phase 4 / Quick Step 3 iteration summary's Fan-out + Cost section.
589
+ - **Post-execution `cost_actuals` + `delta`** — appended to the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`.
602
590
 
603
591
  Per-tier `expected_sa_count` calibration (from frontmatter `sub_agents_spawned.count: 15` × tier heuristic in `rules/hatch3r-cost-visibility.md` Pre-Execution Estimate): Quick Tier 1 ≈ 2 (researcher + implementer, reviewer/fixer/testability/security when triggered), Quick Tier 2 ≈ 6 (researcher + implementer + reviewer + fixer + testability + security), Full Tier 3 up to 15 (full pipeline including the Phase-4b CQ1-CQ9 specialist batch bounded by `max_phase4_parallel`). Token telemetry sources from `src/pipeline/observability.ts`; estimation primitives from `src/pipeline/costEstimator.ts`.
604
592
 
@@ -88,7 +88,7 @@ cost_estimate:
88
88
 
89
89
  `expected_sa_count` is calibrated from the command's frontmatter `sub_agents_spawned.count` × the tier heuristic in `rules/hatch3r-cost-visibility.md` → Pre-Execution Estimate. Each command supplies its own per-tier numbers (e.g. `<tier1-count>` / `<tier2-count>` / `<tier3-count>`).
90
90
 
91
- **Post-execution `cost_actuals` + `delta`** — call `buildCostBlock` again with actuals; both land in the iteration summary's Fan-out + Cost section per `rules/hatch3r-iteration-summary.md` §2. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Field contract + delta semantics: `rules/hatch3r-cost-visibility.md`.
91
+ **Post-execution `cost_actuals` + `delta`** — call `buildCostBlock` again with actuals; both land in the Iteration Summary recap (cost facet; full blocks on the `Cost:` exception line beyond ±25%) per `rules/hatch3r-cost-visibility.md`. Deltas beyond 25% absolute value carry `flagged_for_review: true`. Field contract + delta semantics: `rules/hatch3r-cost-visibility.md`.
92
92
 
93
93
  ---
94
94
 
@@ -116,4 +116,4 @@ mutating_subagent_invocations: <integer>
116
116
  inline_edits_by_orchestrator: none
117
117
  ```
118
118
 
119
- Unattributable rows are a self-declared P8 B2 violation — halt and queue re-delegation next turn. The block sits beside the Iteration Summary, not inside it, preserving the iteration-summary contract verbatim.
119
+ Unattributable rows are a self-declared P8 B2 violation — halt and queue re-delegation next turn. The block sits beside the Iteration Summary, not inside it, preserving the recap contract verbatim.
@@ -86,7 +86,7 @@ Rules:
86
86
  - Each `files_mutated_this_turn` row MUST cite the spawning sub-agent invocation and quote its `delegation_proof_id` verbatim. Unattributable rows are self-declared P8 B2 violations; the orchestrator MUST queue re-delegation next turn.
87
87
  - `inline_edits_by_orchestrator: none` is the only value accepted outside the `hatch3r-quick-change` Tier-1 carve-out (per the "Inline implementation" definition above).
88
88
  - Tier 1 read-only and chat-only turns are exempt (same scope as the Per-Turn Pipeline-State Header); a missing block on a Tier >= 2 mutating turn is a self-detectable drift signal — halt and re-ground per the missing-header protocol.
89
- - The block is consumed by reviewers and the next orchestrator turn; it sits beside the Iteration Summary, not inside it, preserving the 5-field iteration-summary contract verbatim.
89
+ - The block is consumed by reviewers and the next orchestrator turn; it sits beside the Iteration Summary, not inside it, preserving the recap contract verbatim.
90
90
 
91
91
  ### Mandatory Delegation Directive (No Inline Implementation)
92
92
 
@@ -81,7 +81,7 @@ Rules:
81
81
  - Each `files_mutated_this_turn` row MUST cite the spawning sub-agent invocation and quote its `delegation_proof_id` verbatim. Unattributable rows are self-declared P8 B2 violations; the orchestrator MUST queue re-delegation next turn.
82
82
  - `inline_edits_by_orchestrator: none` is the only value accepted outside the `hatch3r-quick-change` Tier-1 carve-out (per the "Inline implementation" definition above).
83
83
  - Tier 1 read-only and chat-only turns are exempt (same scope as the Per-Turn Pipeline-State Header); a missing block on a Tier >= 2 mutating turn is a self-detectable drift signal — halt and re-ground per the missing-header protocol.
84
- - The block is consumed by reviewers and the next orchestrator turn; it sits beside the Iteration Summary, not inside it, preserving the 5-field iteration-summary contract verbatim.
84
+ - The block is consumed by reviewers and the next orchestrator turn; it sits beside the Iteration Summary, not inside it, preserving the recap contract verbatim.
85
85
 
86
86
  ### Mandatory Delegation Directive (No Inline Implementation)
87
87
 
@@ -25,7 +25,7 @@ If a similar artifact exists with ≥80% scope overlap, do one of:
25
25
  - Refactor into a shared abstraction consumed by both.
26
26
  - Document the distinct scope as an ADR before authoring the new artifact.
27
27
 
28
- Report findings of the discovery scan in the iteration summary §Files Mutated section.
28
+ Surface discovery-scan findings via the Iteration Summary's `Duplication:` exception line (formats in `rules/hatch3r-iteration-summary.md` Exception Lines); a scan that ran clean emits no line — silence asserts it.
29
29
 
30
30
  ## Post-Write Duplication Scan
31
31
 
@@ -52,11 +52,11 @@ Tier set via `hatch3r config maturity=<tier>` per CONSTITUTION §6 Decision #16
52
52
 
53
53
  Per CONSTITUTION §2 P4: Single Source of Truth. Silent duplication (no ADR, no refactor) is a P4 violation surfaced by D16 Compound System audit + D22 Content Architecture audit (after authoring).
54
54
 
55
- Per CONSTITUTION §2 P5 Silent Failure Contract: a duplication scan that finds matches but emits no warning to the caller is itself a contract violation — the scan must surface findings via the iteration summary or a CI gate.
55
+ Per CONSTITUTION §2 P5 Silent Failure Contract: a duplication scan that finds matches but emits no warning to the caller is itself a contract violation — the scan must surface findings via the Iteration Summary's `Duplication:` exception line or a CI gate.
56
56
 
57
57
  ## Discovery Gate Output Schema
58
58
 
59
- Report from the pre-implementation grep step lands in the iteration summary as:
59
+ Report from the pre-implementation grep step lands in the implementer's structured output as:
60
60
 
61
61
  ```
62
62
  discovery_scan:
@@ -69,6 +69,8 @@ discovery_scan:
69
69
 
70
70
  `overlap_assessment: high` without `decision: extend-existing | refactor-shared | adr-distinct` is a P4 violation — author is creating a duplicate.
71
71
 
72
+ At the user surface, the Iteration Summary carries the `Duplication:` exception line only on a non-clean or skipped scan — `Duplication: <n> match(es), closest <path>, overlap <none|partial|high>` when matches were found, or `Duplication: scan skipped (<reason>)` when skipped; a clean scan emits no line.
73
+
72
74
  ## Worked Example
73
75
 
74
76
  Task: add a function that formats an ISO-8601 timestamp for a CLI log line.
@@ -90,7 +92,7 @@ The discovery + scan procedure binds every code-writing turn EXCEPT:
90
92
  - Test-file edits that mirror an existing source-file change (the test mirrors a function the discovery step already ran on).
91
93
  - Cosmetic edits (whitespace, comment wording, import sorting).
92
94
 
93
- When skipped, declare `discovery_scan: skipped (reason: <reason>)` in the iteration summary. Skipping without declaration is itself a P5 silent-failure violation per CONSTITUTION §2 P5 Silent Failure Contract.
95
+ When skipped, declare `Duplication: scan skipped (<reason>)` in the Iteration Summary. Skipping without declaration is itself a P5 silent-failure violation per CONSTITUTION §2 P5 Silent Failure Contract.
94
96
 
95
97
  ## Enforcement
96
98
 
@@ -25,7 +25,7 @@ If a similar artifact exists with ≥80% scope overlap, do one of:
25
25
  - Refactor into a shared abstraction consumed by both.
26
26
  - Document the distinct scope as an ADR before authoring the new artifact.
27
27
 
28
- Report findings of the discovery scan in the iteration summary §Files Mutated section.
28
+ Surface discovery-scan findings via the Iteration Summary's `Duplication:` exception line (formats in `rules/hatch3r-iteration-summary.md` Exception Lines); a scan that ran clean emits no line — silence asserts it.
29
29
 
30
30
  ## Post-Write Duplication Scan
31
31
 
@@ -52,11 +52,11 @@ Tier set via `hatch3r config maturity=<tier>` per CONSTITUTION §6 Decision #16
52
52
 
53
53
  Per CONSTITUTION §2 P4: Single Source of Truth. Silent duplication (no ADR, no refactor) is a P4 violation surfaced by D16 Compound System audit + D22 Content Architecture audit (after authoring).
54
54
 
55
- Per CONSTITUTION §2 P5 Silent Failure Contract: a duplication scan that finds matches but emits no warning to the caller is itself a contract violation — the scan must surface findings via the iteration summary or a CI gate.
55
+ Per CONSTITUTION §2 P5 Silent Failure Contract: a duplication scan that finds matches but emits no warning to the caller is itself a contract violation — the scan must surface findings via the Iteration Summary's `Duplication:` exception line or a CI gate.
56
56
 
57
57
  ## Discovery Gate Output Schema
58
58
 
59
- Report from the pre-implementation grep step lands in the iteration summary as:
59
+ Report from the pre-implementation grep step lands in the implementer's structured output as:
60
60
 
61
61
  ```
62
62
  discovery_scan:
@@ -69,6 +69,8 @@ discovery_scan:
69
69
 
70
70
  `overlap_assessment: high` without `decision: extend-existing | refactor-shared | adr-distinct` is a P4 violation — author is creating a duplicate.
71
71
 
72
+ At the user surface, the Iteration Summary carries the `Duplication:` exception line only on a non-clean or skipped scan — `Duplication: <n> match(es), closest <path>, overlap <none|partial|high>` when matches were found, or `Duplication: scan skipped (<reason>)` when skipped; a clean scan emits no line.
73
+
72
74
  ## Worked Example
73
75
 
74
76
  Task: add a function that formats an ISO-8601 timestamp for a CLI log line.
@@ -90,7 +92,7 @@ The discovery + scan procedure binds every code-writing turn EXCEPT:
90
92
  - Test-file edits that mirror an existing source-file change (the test mirrors a function the discovery step already ran on).
91
93
  - Cosmetic edits (whitespace, comment wording, import sorting).
92
94
 
93
- When skipped, declare `discovery_scan: skipped (reason: <reason>)` in the iteration summary. Skipping without declaration is itself a P5 silent-failure violation per CONSTITUTION §2 P5 Silent Failure Contract.
95
+ When skipped, declare `Duplication: scan skipped (<reason>)` in the Iteration Summary. Skipping without declaration is itself a P5 silent-failure violation per CONSTITUTION §2 P5 Silent Failure Contract.
94
96
 
95
97
  ## Enforcement
96
98