baldart 3.36.0 → 3.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,27 @@ All notable changes to BALDART will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.37.0] - 2026-05-30
9
+
10
+ **Two-tier review for `/new`: fast `light` per-card during the loop, one guaranteed FULL pass over the whole batch before merge.** This activates the dormant v3.35.0 Review Profile Selector AND re-introduces an unconditional final full review — together they cut tokens/wall-clock on low-risk cards *without* weakening the merge gate. **No new `baldart.config.yml` keys** — both are changes inside the skill, so the schema-propagation rule does not apply.
11
+
12
+ > **The design.** `light` (per-card Phase 3.7) is now an **early-feedback optimization**, not the safety gate. The safety gate is the **Final review**, which since this release ALWAYS runs a single FULL `/codexreview` (full agent set) over the **entire batch diff** before merge — no N=1 skip, no cross-card scope reduction. So every line of every card, including any reviewed at `light`, gets a full-depth Codex review at least once before merge. This is what makes activating `light` safe: it shifts the breadth passes (qa-sentinel, api-perf-cost-auditor, doc-reviewer) + CoVe from the per-card loop to the single final pass, rather than dropping them from the merge gate. (The v3.35.0 data gate — which had kept the selector hard-coded to `full` pending consumer telemetry — is lifted by explicit maintainer decision; an adversarial review showed that gate's intended post-hoc telemetry could never have validated it anyway, since the Fix Application Log is blind by construction to blockers `light` *misses*. The final full gate makes that validation question moot.)
13
+
14
+ ### Changed — Review Profile Selector live (per-card early feedback)
15
+
16
+ - **[framework/.claude/skills/new/SKILL.md](framework/.claude/skills/new/SKILL.md)**: Phase 3.7 Step C (sequential) and Team Mode D.4b no longer hard-code `profile = full`. The selector runs as designed — `light` ⟺ Step A matched **0** high-risk triggers **AND** the card's QA profile ∈ {`skip`, `light`}; `full` otherwise. **BUG-0530 invariant preserved**: `light` ≠ skip — Codex adversarial + `code-reviewer` + false-positive gate ALWAYS run per-card; `light` drops only the breadth passes + CoVe.
17
+
18
+ ### Changed — Final review is now an unconditional FULL batch-diff gate (supersedes v3.35.0 scope-reduction)
19
+
20
+ - **[framework/.claude/skills/new/SKILL.md](framework/.claude/skills/new/SKILL.md)** (Final review / Step F.1): the v3.35.0 final-review scope gate (N=1 → skip F.1–F.4; N>1 → reduce to the cross-card surface) is **removed**. The final review now runs Steps F.1–F.5 for **every batch including N=1**, with `review_scope_files` = the **full union** of all touched files, never reduced. F.3 reviews the entire batch diff at full depth (Codex + doc-reviewer + api-perf-cost-auditor + qa-sentinel); F.5 runs the final build. Team mode reaches the same gate via "Post-batch — same as sequential mode" (its prior "cross-card-only scope" note is updated accordingly).
21
+ - **Rationale**: v3.35.0 de-duplicated the final full pass on the assumption that Phase 3.7 had already full-reviewed every card. Selecting `light` breaks that assumption, so the post-batch full pass is re-introduced as the guaranteed merge gate.
22
+
23
+ ### Cost & trade-offs (documented)
24
+
25
+ - **Net cost**: one full `/codexreview` per batch is re-introduced (the deliberate price of the per-card `light` speed-up). The saving comes from cheaper per-card reviews during the loop; the final pass is paid once per batch, not per card.
26
+ - **Later feedback on `light` cards**: a defect on a `light`-reviewed card may now surface at the final pass rather than at the per-card step — possibly a later fix-cycle. Acceptable: it is still caught before merge.
27
+ - **Revert**: to make Phase 3.7 always-full again, restore `profile = full` (no config kill-switch by design). The final full gate is independent and stays regardless.
28
+
8
29
  ## [3.36.0] - 2026-05-30
9
30
 
10
31
  Adds **opt-in session telemetry** to `/new` and `/prd`: append `-stats` (or `--stats`) to a run and, at the end, the skill writes a per-**agent-role** breakdown of REAL token consumption and wall-clock time. This finally answers "what took the most time and tokens in a `/new` run" — and feeds the v3.35.0 Review Profile Selector **data gate** (still pending precisely because `docs/metrics/` carried no per-role cost data). **No new `baldart.config.yml` keys** — the opt-in is a flag, not a config feature, so the schema-propagation rule does not apply.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.36.0
1
+ 3.37.0
@@ -1113,7 +1113,7 @@ skill's Phase 1 falls back to deriving Gherkin scenarios from
1113
1113
 
1114
1114
  ### Phase 3 — Doc Review & Sync (code review handled by mandatory Phase 3.7 gate)
1115
1115
 
1116
- > **Note**: Code review is NOT performed in this phase — it is handled by the **mandatory unconditional `/codexreview` gate in Phase 3.7**, which runs per-card BEFORE the Phase 4 commit. The post-batch `/codexreview` in Phase 7 remains as a final cross-card sweep. This Phase 3 focuses exclusively on documentation sync, which must happen per-card (tied to the specific commit).
1116
+ > **Note**: Code review is NOT performed in this phase — it is handled by the **mandatory unconditional `/codexreview` gate in Phase 3.7**, which runs per-card BEFORE the Phase 4 commit. The post-batch `/codexreview` in the Final review remains as a final FULL-diff sweep over the entire batch (since v3.37.0 — the guaranteed full-depth merge gate). This Phase 3 focuses exclusively on documentation sync, which must happen per-card (tied to the specific commit).
1117
1117
 
1118
1118
  12. **Update tracker**: phase = "3-doc-review".
1119
1119
  13. Build a **Doc Sync Context** block:
@@ -1287,10 +1287,15 @@ For EVERY card (no conditional skip — the gate ALWAYS runs; only its DEPTH var
1287
1287
  doc-reviewer) and Step 3.5 CoVe — exactly the passes that yield ~nothing on a 0-trigger, QA-light
1288
1288
  diff. The BUG-0530 invariant ("never miss a blocker on a low-risk path") holds because the Codex
1289
1289
  adversarial pass — the one that catches those — always runs.
1290
- **DATA GATE (BLOCKING for `light`)**: until the consumer's telemetry (`docs/metrics/` Fix
1291
- Application Log) confirms that `light`-eligible cards have NOT historically produced verified
1292
- BLOCKER/HIGH at FULL depth, hard-code `profile = full` here. Flip to the selector only after the
1293
- data passes (no config keychange the line).
1290
+ **ACTIVE since v3.37.0**: the selector above runs as written. Here `light` is an **early-feedback
1291
+ optimization** for the per-card loop NOT the merge-gate. Safety is guaranteed downstream: since
1292
+ v3.37.0 the **Final review ALWAYS runs a single FULL `/codexreview` over the entire batch diff before
1293
+ merge** (no N=1 skip, no scope reduction see "Final review → Final-review FULL gate"). So every card
1294
+ reviewed at `light` here still receives a full-depth review before merge; `light` shifts the breadth
1295
+ passes (qa-sentinel, api-perf-cost-auditor, doc-reviewer) + CoVe from the per-card loop to that single
1296
+ final full pass, it does not drop them from the merge gate. The BUG-0530 invariant still holds per-card
1297
+ (Codex adversarial + `code-reviewer` + FP-gate always run in `light`). To make Phase 3.7 always-full
1298
+ again: restore `profile = full` here (the final full gate is independent and stays regardless).
1294
1299
 
1295
1300
  Then dump the card diff (reviewer grounding) and write the lean contract `/codexreview` consumes:
1296
1301
  ```bash
@@ -1402,20 +1407,24 @@ Never block the pipeline indefinitely — recover and continue per the rules abo
1402
1407
 
1403
1408
  Once ALL cards are committed in the worktree:
1404
1409
 
1405
- > **Final-review scope gate (deterministic, since v3.35.0)** — the per-card Phase 3.7 `/codexreview`
1406
- > gate has ALREADY reviewed every card individually before its commit. The final review exists to
1407
- > catch what a per-card pass structurally cannot: **cross-card interactions**. Branch on batch size:
1410
+ > **Final-review FULL gate (since v3.37.0 — supersedes the v3.35.0 scope-reduction)** because
1411
+ > Phase 3.7 may now run a card at `light` depth, the per-card pass can NO LONGER be assumed to have
1412
+ > full-reviewed every card. The final review is therefore the **unconditional safety gate that makes
1413
+ > the Phase 3.7 `light` profile safe**: it ALWAYS runs a single FULL `/codexreview` (full agent set)
1414
+ > over the **ENTIRE batch diff** before merge — **no N=1 skip, no cross-card scope reduction**. Every
1415
+ > line of every card — including any reviewed at `light` in Phase 3.7 — receives a full-depth Codex
1416
+ > review at least once before merge.
1408
1417
  >
1409
- > - **Single card (N=1)**: SKIP Steps F.1–F.4 (the lone card is byte-identical to what Phase 3.7
1410
- > already passed re-review adds nothing). Log:
1411
- > `"Final review (F.1–F.4) skipped — single card already passed /codexreview at Phase 3.7 (PASS), code unchanged since commit"`.
1412
- > Then jump to **Step F.5 and RUN the final build** (`npm run lint && npx tsc --noEmit && npm run build`)
1413
- > that gate is NOT skipped.
1414
- > - **Multiple cards (N>1)**: run F.1–F.5 but **scope the review to the cross-card surface only**
1415
- > (computed, not discretionary) see F.1 step 4. If that surface is empty, log
1416
- > `"cross-card review: no shared surface (intersection=∅, depends_on=∅)F.3 limited to integration sanity"`
1417
- > and run a minimal integration pass (build + type-check across the union) instead of a full
1418
- > per-line re-review. This is a computed scope reduction, NEVER a model-decided skip.
1418
+ > - Run Steps F.1–F.5 for **EVERY batch, including N=1**. Nothing here is skipped.
1419
+ > - `review_scope_files` = the **FULL union** of all touched files across all cards (F.1 step 4 —
1420
+ > NEVER reduced to the cross-card subset).
1421
+ > - F.3 invokes the full reviewer set (Codex + doc-reviewer + api-perf-cost-auditor + qa-sentinel)
1422
+ > over that union; F.5 runs the final build.
1423
+ >
1424
+ > Rationale: this re-introduces the post-batch full pass that v3.35.0 de-duplicated away. That
1425
+ > de-dup assumed Phase 3.7 had already full-reviewed every card an assumption broken the moment
1426
+ > `light` became selectable. The cost of one full batch-diff review is the deliberate price of the
1427
+ > per-card `light` speed-up (explicit maintainer decision, v3.37.0).
1419
1428
 
1420
1429
  ### Step F.1 — Resolve scope
1421
1430
 
@@ -1426,11 +1435,11 @@ Once ALL cards are committed in the worktree:
1426
1435
  git diff --name-only <base-branch>...HEAD
1427
1436
  ```
1428
1437
  3. Read each card's backlog YAML to collect `acceptance_criteria`, `files_likely_touched`.
1429
- 4. Build `review_scope_files` as union of card-indicated files + git-touched files. **For N>1 (per
1430
- the Final-review scope gate above), then REDUCE `review_scope_files` to the cross-card subset**:
1431
- files appearing in ≥2 cards' File Ownership Map entries files of any `depends_on`-linked card
1432
- pair. Record both the full union and the reduced set in the tracker; downstream F.3 reviews the
1433
- reduced set.
1438
+ 4. Build `review_scope_files` as the **FULL union** of card-indicated files + git-touched files
1439
+ across ALL cards in the batch. **Since v3.37.0 this union is NEVER reduced** (the v3.35.0
1440
+ cross-card scope-reduction is removed) the final review is a full-depth pass over the entire
1441
+ batch diff, so cards reviewed at `light` in Phase 3.7 still get a guaranteed full review before
1442
+ merge. Record the union in the tracker; downstream F.3 reviews it in full.
1434
1443
 
1435
1444
  ### Step F.2 — Architecture baseline
1436
1445
 
@@ -2193,7 +2202,7 @@ After ALL agents in the group complete successfully:
2193
2202
 
2194
2203
  4a. **D.4a — Per-card doc gate (consumes D.2, since v3.35.0)** — Do NOT re-spawn `doc-reviewer`. For EACH card in the group, take that card's doc findings from D.2's per-card-attributed output; if any exist, spawn a targeted fix-coder for that card only. (Previously D.4a re-ran doc-reviewer per card — a duplicate of D.2; collapsed to a single attributed D.2 pass. D.4b's per-card `/codexreview` also skips its doc-reviewer via the lean contract, so doc-review now runs once per group instead of ~3× per card.)
2195
2204
 
2196
- 4b. **D.4b — Pre-Merge Codex Review Gate (per-card, MANDATORY — UNCONDITIONAL)** — Invoke `/codexreview` for EACH card in the group, one at a time, BEFORE any commit. This mirrors Phase 3.7 of the sequential path and is non-skippable regardless of file paths or perceived risk. Apply the same fix sub-loop: if the consolidated report shows verified BLOCKER/HIGH findings, spawn a fix-coder and re-run `/codexreview <CARD-ID>` (max 2 retries per card). If still BLOCKER/HIGH after retries, ask the user before proceeding to D.5. The D.5 commits MUST NOT happen until every card in the group has a PASS verdict (or explicit user override via `AskUserQuestion`). Log results in the tracker under `## Pre-Merge Codex Review` per card. **Lean + profile (since v3.35.0)**: before each card's `/codexreview`, apply the same Review Profile Selector and write the same `/tmp/codexreview-lean-<CARD-ID>.json` contract as sequential Phase 3.7 Step C — `arch_baseline_path` pointing at `/tmp/arch-baseline-group-<FIRST-CARD-ID>.md`, `skip_doc_reviewer: true`, and `profile: light|full` from (0 triggers + QA ∈ {skip,light}). LIGHT still runs Codex adversarial + code-reviewer + FP-gate (subject to the same DATA GATE: keep `full` until telemetry confirms).
2205
+ 4b. **D.4b — Pre-Merge Codex Review Gate (per-card, MANDATORY — UNCONDITIONAL)** — Invoke `/codexreview` for EACH card in the group, one at a time, BEFORE any commit. This mirrors Phase 3.7 of the sequential path and is non-skippable regardless of file paths or perceived risk. Apply the same fix sub-loop: if the consolidated report shows verified BLOCKER/HIGH findings, spawn a fix-coder and re-run `/codexreview <CARD-ID>` (max 2 retries per card). If still BLOCKER/HIGH after retries, ask the user before proceeding to D.5. The D.5 commits MUST NOT happen until every card in the group has a PASS verdict (or explicit user override via `AskUserQuestion`). Log results in the tracker under `## Pre-Merge Codex Review` per card. **Lean + profile (since v3.35.0)**: before each card's `/codexreview`, apply the same Review Profile Selector and write the same `/tmp/codexreview-lean-<CARD-ID>.json` contract as sequential Phase 3.7 Step C — `arch_baseline_path` pointing at `/tmp/arch-baseline-group-<FIRST-CARD-ID>.md`, `skip_doc_reviewer: true`, and `profile: light|full` from (0 triggers + QA ∈ {skip,light}). LIGHT still runs Codex adversarial + code-reviewer + FP-gate. The Review Profile Selector is **ACTIVE since v3.37.0** — same status as sequential Phase 3.7 Step C above: `light` is per-card early feedback, and the merge-gate safety is the post-batch **Final-review FULL gate** (a single FULL `/codexreview` over the entire batch diff, which team mode reaches via "Post-batch — same as sequential mode"). To make per-card always-full again, restore `profile = full`; the final full gate stays regardless.
2197
2206
 
2198
2207
  5. **D.5 — Commit** — One commit per card using explicit staging from the ownership map. **NO stash in worktrees** (stashes are globally shared via `refs/stash` — see Phase 4 WORKTREE COMMIT RULE):
2199
2208
  ```bash
@@ -2245,7 +2254,7 @@ Before starting group N, verify ALL cards in groups 0..N-1 are status: done. If
2245
2254
 
2246
2255
  ### Post-batch (same as sequential mode)
2247
2256
 
2248
- After all groups are complete, run the same Final Review, Phase 6 (merge), and Phase 7 (production readiness) as documented above. Team mode is always N>1, so the Final Review applies its deterministic **cross-card-only scope** (per the Final-review scope gate) — not a full per-line re-review.
2257
+ After all groups are complete, run the same Final Review, Phase 6 (merge), and Phase 7 (production readiness) as documented above. Since v3.37.0 the Final Review runs a **single FULL `/codexreview` over the entire batch diff** (per the Final-review FULL gate) — no scope reduction — so every team-mode card, including any reviewed at `light` in D.4b, receives a guaranteed full review before merge.
2249
2258
 
2250
2259
  ---
2251
2260
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baldart",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "description": "Claude Agent Framework - Reusable framework for coordinating AI agents and humans in software projects",
5
5
  "bin": {
6
6
  "baldart": "./bin/baldart.js"