baldart 4.88.2 → 4.89.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 +20 -0
- package/VERSION +1 -1
- package/framework/.claude/agents/prd-card-writer.md +10 -0
- package/framework/.claude/skills/new/CHANGELOG.md +4 -0
- package/framework/.claude/skills/new/SKILL.md +11 -2
- package/framework/.claude/skills/new/references/implement.md +37 -17
- package/framework/.claude/skills/prd/CHANGELOG.md +4 -0
- package/framework/.claude/skills/prd/SKILL.md +2 -2
- package/framework/.claude/workflows/new2.js +11 -1
- package/framework/agents/design-system-protocol.md +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ 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
|
+
## [4.89.0] - 2026-07-01
|
|
9
|
+
|
|
10
|
+
**Mockup-first build routing — a card with a mockup ALWAYS builds via `/ui-implement` → `ui-expert`.** A `/new` post-mortem (mayo FEAT-0064) found two UI cards with a `links.design_src` mockup built by `coder` instead of `ui-expert`, causing layout drift (caught by the v4.78.0 fidelity gate) + three avoidable rework passes + a full `balanced` review (~174M tokens). Root cause: the v4.82.0 `/ui-implement` delegation gate was positioned **inside** `implement.md` step 7's briefing, structurally **subordinate** to the `owner_agent` router (step 6b) — so a card whose `owner_agent` is `coder` (which `prd-card-writer` Rule B correctly assigns to a **mixed UI+logic** card, since `ui-expert` has UI-only scope) resolved `spawn=coder` and the delegation note never fired. `new2.js` was worse: it dispatched `owner_agent` with no delegation gate at all.
|
|
11
|
+
|
|
12
|
+
**MINOR** — routing behavior change, backwards-compatible (no-mockup cards unchanged; the coarse `ui-expert` inline fallback is preserved for Codex / older installs). **No new `baldart.config.yml` key** (rides on the existing `/ui-implement` + `features.has_design_system`) → the schema-change propagation rule does NOT apply.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **`implement.md` step 6a (NEW — PRIMARY, precedes the `owner_agent` router)**: a card with `links.design` / `links.design_src` has its BUILD routed **mockup-first** to `/ui-implement` (coarse fallback: force `ui-expert` inline + Phase 2.6), *regardless of `owner_agent`*. The epic guard runs first inside 6a. Step 6b (`owner_agent` router) is now explicitly scoped to cards **without** a mockup; the delegation-gate prose is **retired** from step 7's "### Design Reference" (it lives once, at 6a). `owner_agent` still governs review/ownership semantics.
|
|
17
|
+
- **`new2.js`**: `cardGraph` gains `hasMockup`; the deterministic `OWNER_SPAWN` clamp forces `spawn=ui-expert` (ledger `CLAMPED-TO-UI (mockup-first)`) for a mockup card. new2 keeps its **inline** `ui-expert` build this release (full `/ui-implement` off-context delegation remains the documented follow-up).
|
|
18
|
+
- **`/new` SKILL.md § Agent Routing** + **`prd-card-writer.md` Rule A** + **`design-system-protocol.md`** § "Route-Independent Fidelity" — one aligned note each: the build-agent selection is mockup-first; `owner_agent: coder` on a mixed card means coder owns review/logic semantics, never the UI build. Cited from the single SSOT (implement.md step 6a), not duplicated.
|
|
19
|
+
|
|
20
|
+
## [4.88.3] - 2026-07-01
|
|
21
|
+
|
|
22
|
+
**Context-economy trim of the Codex runtime-portability citations.** The top-level RUNTIME PORTABILITY note in `/new` and the HARD-RULES Runtime-portability note in `/prd` (added in v4.88.2's S4/S5 wave) restated content that already lives in `framework/agents/runtime-portability-protocol.md`. Trimmed both to a one-liner (cite, don't restate) — ~406 chars off `/new` SKILL.md and ~363 off `/prd` SKILL.md, i.e. the core each skill drags in context every turn after activation. **No behavior change**: the module citation, the "don't probe `Workflow`/`AskUserQuestion`/the task spine on Codex" rule, and the ADDITIVE guarantee are preserved; RULE 4/11 Codex branches are untouched; the parity guard (`scripts/check-codex-parity.js`) passes. **PATCH.** Skills `new`/`prd` → 1.1.2. No new config key.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **`framework/.claude/skills/new/SKILL.md`** + **`framework/.claude/skills/prd/SKILL.md`** — runtime-portability citations trimmed to one-liners (skill version 1.1.1 → 1.1.2).
|
|
27
|
+
|
|
8
28
|
## [4.88.2] - 2026-07-01
|
|
9
29
|
|
|
10
30
|
**`/prd` reliably stamps `holistic_audit` provenance → `/new`/`new2` stop spawning the plan-auditor on every freshly-authored card.** The v4.7.0 skip already existed: `/new` (`implement.md` Phase 1 step 4) skips the per-card plan-auditor grounding when **P1** (the card carries `metadata.holistic_audit`) **∧ P2** (no git drift on its claimed paths since the audit). But P1 was frequently false: the stamp was written by a **soft, model-driven per-card step** (`audit-phase.md` Step 6.9.4) framed as an "optional optimization hint" — the single most-omitted step under context pressure. When omitted, every card ships without the stamp and `/new`/`new2` fall back to spawning the plan-auditor on **every** card even when the batch is implemented immediately after `/prd` (nothing changed since the audit) — the reported waste. Diagnosis was confirmed on a real run: the FIRST card of a batch (HEAD at trunk, zero intra-batch commits ⇒ P2 trivially holds) still ran the plan-auditor, which is only possible if P1 failed. Fix strengthens the **existing** provenance (no new "freshness" signal, per the chosen direction):
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.89.0
|
|
@@ -156,6 +156,16 @@ that list — not this one — is the source of truth.
|
|
|
156
156
|
**Epic cards** use `owner_agent: ""` (empty string) because they are
|
|
157
157
|
trackers, not implementation. The dispatcher skips them.
|
|
158
158
|
|
|
159
|
+
> **Mockup-first build (since v4.89.0) — `owner_agent` does NOT gate the build for a
|
|
160
|
+
> card with a mockup.** When a card carries `links.design` / `links.design_src`, `/new`
|
|
161
|
+
> routes its BUILD **mockup-first** to `/ui-implement` → `ui-expert` at `implement.md`
|
|
162
|
+
> step 6a, *regardless of `owner_agent`*. So a **mixed UI+logic card** correctly keeps
|
|
163
|
+
> `owner_agent: coder` (per Rule B — `ui-expert` cannot OWN logic scope) **and still gets
|
|
164
|
+
> its UI built by `ui-expert`**: `owner_agent: coder` here means coder owns the
|
|
165
|
+
> review/logic ownership semantics, it does NOT send the UI build to coder. Keep setting
|
|
166
|
+
> `owner_agent` per Rules A/B as before — just do not expect it to pick the build agent
|
|
167
|
+
> for a mockup card.
|
|
168
|
+
|
|
159
169
|
### Rule A.1 — AC↔ownership consistency (every AC must be satisfiable inside the card)
|
|
160
170
|
|
|
161
171
|
For EVERY acceptance criterion you write, the file(s) that AC requires editing
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.1.2 — 2026-07-01
|
|
6
|
+
|
|
7
|
+
- Context economy: trimmed the top-level **RUNTIME PORTABILITY** citation to a one-liner (cite, don't restate — the detail lives in `runtime-portability-protocol.md`). ~470 chars off the SKILL.md core, which sits in context every turn. No behavior change.
|
|
8
|
+
|
|
5
9
|
## 1.1.1 — 2026-07-01
|
|
6
10
|
|
|
7
11
|
- **Plan-auditor grounding skip is now the NORMAL path for a card implemented right after `/prd`** (doc clarification, no logic change). `implement.md` Phase 1 step 4's provenance skip (v4.7.0, P1 = card carries `metadata.holistic_audit`) used to fire only when `/prd` happened to stamp the card; the stamp was frequently omitted, so `/new`/`new2` spawned the plan-auditor on every freshly-authored card. Paired with the `/prd` v1.1.1 fix (deterministic provenance backstop at `validation-phase.md` Step 7 item 5b), P1 now holds whenever the batch is freshly authored — step 4 documents this coupling. The skip's BOTH-conditions logic + fail-safe (missing provenance / drift / git error → RUN the plan-auditor) are unchanged. Framework v4.88.2.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: new
|
|
3
3
|
effort: medium
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
description: >
|
|
6
6
|
Orchestrate a team of specialized agents to implement one or more backlog cards
|
|
7
7
|
end-to-end inside a dedicated worktree, with code review, doc review, QA, and
|
|
@@ -12,7 +12,7 @@ description: >
|
|
|
12
12
|
|
|
13
13
|
> **YOLO MODE**: Agents run without permission friction. On Claude Code, spawn every agent via the Task tool with `mode: "bypassPermissions"` (no exceptions). On Codex there is no `mode` parameter — spawn the custom agent by name and rely on the session sandbox/approval policy; never emit Claude permission fields. (Binding: `framework/agents/runtime-portability-protocol.md`.)
|
|
14
14
|
|
|
15
|
-
> **RUNTIME PORTABILITY**:
|
|
15
|
+
> **RUNTIME PORTABILITY**: On **Codex**, bind this orchestrator's mechanics (agent spawn by name from `.codex/agents/`, decision gates, tracker state, adversarial review) per `framework/agents/runtime-portability-protocol.md` — never probe `Workflow`/`AskUserQuestion`/the task spine. Codex paths here are ADDITIVE; Claude imperatives unchanged.
|
|
16
16
|
|
|
17
17
|
> **SCOPE CLOSURE DISCIPLINE (BLOCKING)**: This orchestrator NEVER unilaterally defers an acceptance criterion. Silent deferral via `implementation_notes`, commit message, or final recap is a protocol violation per `framework/agents/workflows.md § Scope Closure Discipline`. Under context-window pressure, time pressure, or unforeseen complexity, the correct action is to STOP and route the decision back to the user via `AskUserQuestion` — Auto Mode's "bias toward proceeding" applies to routine decisions, NOT to scope reduction. **Phase 2.5b (AC-Closure Gate)** enforces this at the per-card level before commit and is non-skippable. **When AUTONOMOUS, apply § "AUTONOMOUS RESOLUTION RULE" (category=blocker / AC-Closure → materialize a follow-up card, never approve the deferral).**
|
|
18
18
|
|
|
@@ -427,6 +427,15 @@ orchestrator is hard-killed and never resumed, the `baldart doctor` reaper is th
|
|
|
427
427
|
|
|
428
428
|
## Agent Routing (Phase 2 dispatcher)
|
|
429
429
|
|
|
430
|
+
> **Mockup-first override (since v4.89.0 — precedes this table).** A card with a
|
|
431
|
+
> mockup (`links.design` / `links.design_src`) does NOT reach the `owner_agent`
|
|
432
|
+
> dispatcher below: its BUILD is routed **mockup-first** at `implement.md` **step 6a**
|
|
433
|
+
> to `/ui-implement` → `ui-expert` (coarse fallback: `ui-expert` inline), *regardless of
|
|
434
|
+
> `owner_agent`*. `owner_agent` still governs review/ownership semantics for that card,
|
|
435
|
+
> but never sends a UI build to `coder`. The table below applies only to cards WITHOUT a
|
|
436
|
+
> mockup. This closes the FEAT-0064 failure (a `owner_agent: coder` mixed card with
|
|
437
|
+
> `links.design_src` built by coder).
|
|
438
|
+
|
|
430
439
|
Phase 2 reads the card's `owner_agent` field and dispatches to the matching
|
|
431
440
|
specialist. The enum's single source of truth is the **`owner_agent enum` block in
|
|
432
441
|
`framework/.claude/agents/REGISTRY.md`** (applied by `prd-card-writer.md § Agent
|
|
@@ -49,7 +49,36 @@
|
|
|
49
49
|
|
|
50
50
|
### Phase 2 — Implement (self-healing, up to 3 retries)
|
|
51
51
|
6. **Update tracker**: phase = "2-implement".
|
|
52
|
-
|
|
52
|
+
6a. **Mockup-build delegation gate (PRIMARY — precedes the owner_agent router).** The BUILD agent for a card with a mockup is decided by the **mockup**, NOT by `owner_agent`. This gate is structurally FIRST so a stale/mixed-card `owner_agent: coder` can never send a UI build to `coder` (the FEAT-0064 failure: a card with `links.design_src` built by coder because the delegation note was buried downstream in the step-7 briefing). SSOT: `framework/agents/design-system-protocol.md` § "Route-Independent Fidelity & Coverage Obligation".
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
# 6a is the FIRST dispatch decision. Epic guard FIRST — an epic is a tracker, never built.
|
|
56
|
+
If card is an epic (id ends "-00" OR filename ends "-epic.yml" OR review_profile == "skip"
|
|
57
|
+
with no requirements): SKIP — log "[ROUTER] card <ID> is an epic (tracker) — skipped,
|
|
58
|
+
not implemented" and move to the next card.
|
|
59
|
+
If card has links.design OR links.design_src (a mockup exists):
|
|
60
|
+
IF the /ui-implement skill is available:
|
|
61
|
+
DELEGATE this card's mockup→code implement + fidelity verify to /ui-implement
|
|
62
|
+
in programmatic mode (contract: ui-implement/references/integration.md).
|
|
63
|
+
Consume its COMPACT JSON (status mirrors /e2e-review — review-cycle.md Phase 2.6
|
|
64
|
+
gating table). SKIP step 6b (owner_agent router), the step-7 coarse briefing,
|
|
65
|
+
AND Phase 2.6 (the skill already ran /e2e-review). Then resume the per-card
|
|
66
|
+
review cluster (Phase 2.55 Simplify → Phase 3 doc → 3.5 QA → 3.7 Codex) per the
|
|
67
|
+
card's review_profile — for a MIXED UI+logic card /new KEEPS that cluster
|
|
68
|
+
(integration.md § "What /new KEEPS"); it is fidelity-only that the skill owns.
|
|
69
|
+
ELSE (coarse fallback — Codex without the skill / older install / no skill routing):
|
|
70
|
+
FORCE spawn = "ui-expert", briefing = "ui-expert" (regardless of owner_agent),
|
|
71
|
+
and run Phase 2.6 /e2e-review inline as before. The step-7 "### Design Reference"
|
|
72
|
+
section is the coarse briefing body.
|
|
73
|
+
Log (tracker): "[ROUTER] card <ID> has a mockup (links.design[_src]) → mockup-first
|
|
74
|
+
build via /ui-implement (or ui-expert coarse); owner_agent='<raw>' does NOT gate
|
|
75
|
+
the build".
|
|
76
|
+
→ the build agent for this card is now decided; do NOT fall through to step 6b.
|
|
77
|
+
Else (no mockup) → fall through to step 6b (owner_agent router).
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`owner_agent` is still honored for **review/ownership semantics** (AC-closure ownership, `security-reviewer` relevance, the mixed-card review cluster) — it simply no longer decides the BUILD agent when a mockup is present.
|
|
81
|
+
6b. **Agent dispatch (router — cards WITHOUT a mockup only).** Reached only when step 6a did not fire (the card has no `links.design`/`links.design_src`). Read `owner_agent` from the card YAML and resolve the spawn target per the table in § Agent Routing above:
|
|
53
82
|
|
|
54
83
|
```
|
|
55
84
|
Let raw = card.owner_agent (string, may be missing).
|
|
@@ -113,22 +142,13 @@
|
|
|
113
142
|
Design file: [path from card's links.design field]
|
|
114
143
|
Design source: [path from card's links.design_src field, if present]
|
|
115
144
|
|
|
116
|
-
**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
coarse briefing below AND Phase 2.6 for this card** (the skill already ran the
|
|
124
|
-
fidelity verify), consume its COMPACT JSON, then resume the normal per-card
|
|
125
|
-
cluster on the resulting diff (Phase 2.55 Simplify → **skip Phase 2.6** which
|
|
126
|
-
the skill already ran → Phase 3 doc / 3.5 QA / 3.7 Codex — the skill's scope is
|
|
127
|
-
**fidelity only**, no review hole). The `ui-expert` registry-first cascade +
|
|
128
|
-
Post-Intervention Coherence below STILL apply — the skill enforces the same
|
|
129
|
-
SSOTs. **Coarse inline fallback** (skill unavailable / Codex / older install):
|
|
130
|
-
use the briefing below + Phase 2.6 as before; the prose here stays the SSOT
|
|
131
|
-
fallback (delegate-or-else-inline).
|
|
145
|
+
> **Note:** the mockup→code build decision was made at **step 6a** (Mockup-build
|
|
146
|
+
> delegation gate). If step 6a delegated to `/ui-implement`, this whole
|
|
147
|
+
> "### Design Reference" section is NOT reached (the skill owns the build + Phase
|
|
148
|
+
> 2.6). This section is the **coarse-fallback briefing body** filled by step 6a's
|
|
149
|
+
> ELSE branch (skill unavailable → `ui-expert` builds inline + Phase 2.6 runs). Its
|
|
150
|
+
> SSOT is `ui-implement/references/playbook.md` + `ui-expert.md`; do NOT re-add a
|
|
151
|
+
> delegation gate here — it lives once, at step 6a.
|
|
132
152
|
|
|
133
153
|
**Coarse fallback — build workflow by input type.** The full SSOT is
|
|
134
154
|
`framework/.claude/skills/ui-implement/references/playbook.md` +
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.1.2 — 2026-07-01
|
|
6
|
+
|
|
7
|
+
- Context economy: trimmed the HARD-RULES **Runtime portability** citation to a one-liner (cite, don't restate — the detail lives in `runtime-portability-protocol.md`). ~330 chars off the SKILL.md core, which sits in context every turn. No behavior change; RULE 4/11 Codex branches unchanged.
|
|
8
|
+
|
|
5
9
|
## 1.1.1 — 2026-07-01
|
|
6
10
|
|
|
7
11
|
- **Holistic-audit provenance made reliable (fixes the "plan-auditor spawns on every freshly-authored card" waste).** The `metadata.holistic_audit` stamp — consumed by `/new` (`implement.md` Phase 1 step 4, P1) + `new2` to SKIP the per-card plan-auditor when a card is implemented right after `/prd` — was written by a **soft, model-driven per-card step** (`audit-phase.md` Step 6.9.4) framed as an "optional optimization hint", so it was the first casualty under context pressure. When omitted, P1 fails and `/new`/`new2` fall back to spawning the plan-auditor on **every** card even though nothing changed since the audit. Two in-place moves, no new concept: (1) `audit-phase.md` Step 6.9.4 + the Fail-safe contract reworded from "optional" to **mandatory-when-the-audit-ran** (git-unavailable → write `audited_commit: ""` explicitly, never omit the block); (2) new **deterministic backstop** at `validation-phase.md` Step 7 item 5b — right before the commit staging (Step 6 complete ⇒ the audit genuinely ran), it recomputes the run-level values ONCE and backfills `metadata.holistic_audit` on every non-EPIC Step-5 card that lacks it (idempotent, additive, EPIC-excluded). The stamp stays an OPTIMIZATION hint, never a correctness gate — the backstop blocks only *silently shipping cards without it*, never the PRD. Runtime-neutral (bash + YAML) → identical on Claude and Codex; the stamp SSOT (snippet + block) stays single-sourced in `audit-phase.md`. Framework v4.88.2.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prd
|
|
3
3
|
effort: high
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
description: "Structured PRD creation skill. Use when the user says /prd, 'crea un prd', 'nuova funzionalita', 'pianifica feature', or wants to plan a new feature end-to-end. Also handles /prd-add, 'aggiungi requisito', 'serve anche', 'manca un endpoint' for change requests on active PRD sessions — runs ICIAS impact analysis to determine which phases need SKIP/PATCH/REDO. Produces PRD + UI design + backlog cards, all validated and committed. Multi-turn conversation: asks questions, waits for answers, iterates through discovery, design, spec writing, card creation, and validation phases."
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -59,7 +59,7 @@ message. You ask questions, wait for answers, and iterate.
|
|
|
59
59
|
|
|
60
60
|
## HARD RULES
|
|
61
61
|
|
|
62
|
-
> **Runtime portability.**
|
|
62
|
+
> **Runtime portability.** On **Codex**, bind this skill's mechanics per `framework/agents/runtime-portability-protocol.md` (named-agent spawn, decision gates, file-backed state; never probe `Workflow`/`AskUserQuestion`/the task spine). Rules below are Claude-first with explicit **Codex:** branches (RULES 4, 11) — additive, Claude imperatives unchanged.
|
|
63
63
|
|
|
64
64
|
1. Follow steps in order. NEVER skip a step or jump ahead.
|
|
65
65
|
2. Every step MUST update the state file before proceeding.
|
|
@@ -286,7 +286,7 @@ try {
|
|
|
286
286
|
g3Bullet +
|
|
287
287
|
`• G4 card-field validation (setup.md 1b/1c, card-schema.md consumer contract): card missing acceptance_criteria/files_likely_touched/scope → EXCLUDE (excluded[] + reason). \`requirements\` is CONDITIONAL, not an auto-exclude: if it is missing BUT acceptance_criteria + scope are both present and non-empty, FAITHFULLY DERIVE it (a concrete restatement/decomposition of the existing AC + scope — faithful, never inventing new scope) and WRITE it back to the card YAML on disk in ${MAIN}/${paths.backlog_dir || 'backlog'} (F-040: main repo, not the worktree copy; the card artifact is NOT a source/doc file, so this is allowed despite the role boundary), logging \`[BACKFILL] <id>: requirements=<N items, AC+scope-derived>\`. Only EXCLUDE for missing requirements when acceptance_criteria OR scope is ALSO empty (a genuinely thin card). Never HALT for one bad card.\n` +
|
|
288
288
|
`• G5 depends-on: a card whose depends_on names a non-DONE card NOT in this batch → EXCLUDE it AND every in-batch card that transitively depends on it.\n` +
|
|
289
|
-
`• cardGraph (REQUIRED, F-021): for every runnable card return { id, dependsOn:[IN-BATCH deps only], ownerAgent (the card's owner_agent; G25 unknown→'coder'), reviewProfile (the card's review_profile; default 'balanced'), policyDeferredACs, alreadyCommitted, alreadyCommittedSha, isEpic (implement.md §6b epic guard: id ends '-00' OR filename ends '-epic.yml' OR group.is_epic:true OR review_profile 'skip' with no requirements), filesLikelyTouched (verbatim from the YAML) }.\n` +
|
|
289
|
+
`• cardGraph (REQUIRED, F-021): for every runnable card return { id, dependsOn:[IN-BATCH deps only], ownerAgent (the card's owner_agent; G25 unknown→'coder'), hasMockup (BOOLEAN — true IFF the card has a non-empty links.design OR links.design_src; drives the mockup-first build override — implement.md §6a), reviewProfile (the card's review_profile; default 'balanced'), policyDeferredACs, alreadyCommitted, alreadyCommittedSha, isEpic (implement.md §6b epic guard: id ends '-00' OR filename ends '-epic.yml' OR group.is_epic:true OR review_profile 'skip' with no requirements), filesLikelyTouched (verbatim from the YAML) }.\n` +
|
|
290
290
|
`• B1/F-026 idempotency (per card, AFTER the worktree exists): set alreadyCommitted:true (+ alreadyCommittedSha) IFF ALL hold: (a) a commit referencing the card id exists in ${TRUNK}..HEAD of the worktree; (b) the card's validation_commands re-run GREEN right now; (c) NO open follow-up card for it exists in ${paths.backlog_dir || 'backlog'}. On a FRESH worktree ${TRUNK}..HEAD is empty → all false, zero extra work.\n` +
|
|
291
291
|
`• F-016 AC↔ownership consistency: for each acceptance_criterion, derive the file(s) it requires editing. If those files are NOT a subset of the card's MAY-EDIT/files_likely_touched → add the AC to policyDeferredACs:[{n,text,owningCard|owningFile,reason}] (it will become ONE follow-up, never a resolve). Do the same for any AC whose remedy is an owner-gated infra action (remote db push / deploy / secret / DNS).\n` +
|
|
292
292
|
(migrationApplied
|
|
@@ -370,6 +370,16 @@ for (const n of cardGraph) graphById[n.id] = n
|
|
|
370
370
|
const OWNER_SPAWN = { coder: 'coder', 'ui-expert': 'ui-expert' }
|
|
371
371
|
for (const n of cardGraph) {
|
|
372
372
|
const raw = String(n.ownerAgent || '').trim()
|
|
373
|
+
// Mockup-first override (implement.md §6a, since v4.89.0): a card with a mockup builds
|
|
374
|
+
// via ui-expert regardless of owner_agent — closes the FEAT-0064 coder-builds-UI failure.
|
|
375
|
+
// (new2 keeps the INLINE ui-expert build this release; full /ui-implement off-context
|
|
376
|
+
// delegation is the documented follow-up — ui-implement/references/integration.md § new2 note.)
|
|
377
|
+
if (n.hasMockup) {
|
|
378
|
+
n.ownerAgentRaw = raw
|
|
379
|
+
n.ownerAgent = 'ui-expert'
|
|
380
|
+
ledger(n.id, 'router', 'CLAMPED-TO-UI', `mockup-first: links.design[_src] present → spawn=ui-expert (owner_agent='${raw || '(missing)'}' does not gate the build)`)
|
|
381
|
+
continue
|
|
382
|
+
}
|
|
373
383
|
const spawn = OWNER_SPAWN[raw.toLowerCase()] || 'coder'
|
|
374
384
|
n.ownerAgentRaw = raw
|
|
375
385
|
n.ownerAgent = spawn
|
|
@@ -645,6 +645,15 @@ advisory), plus the mechanical build/lint/tsc gates. The deep `/codexreview` and
|
|
|
645
645
|
layout) is absorbed by the trio. All fidelity fixes (structural, presentational, quality)
|
|
646
646
|
route to `ui-expert`.
|
|
647
647
|
|
|
648
|
+
**BUILD-agent selection is mockup-first (since v4.89.0).** For ANY card with a mockup
|
|
649
|
+
(`links.design` / `links.design_src`) — pure-graphics OR **mixed UI+logic** — the build
|
|
650
|
+
agent is decided by the mockup, NOT `owner_agent`: it is routed to `/ui-implement` →
|
|
651
|
+
`ui-expert` **before and independent of** the `owner_agent` router (`/new` `implement.md`
|
|
652
|
+
step 6a; `new2.js` mockup-first clamp). This closes the FEAT-0064 failure where a mixed
|
|
653
|
+
card's `owner_agent: coder` (correct for its logic/review ownership) sent the UI build to
|
|
654
|
+
`coder`. `owner_agent` still governs the review/ownership semantics; it just does not pick
|
|
655
|
+
the build agent when a mockup is present.
|
|
656
|
+
|
|
648
657
|
### Gating philosophy (calibration)
|
|
649
658
|
|
|
650
659
|
Vision-model reliability research (*MLLM as a UI Judge*, 2025) shows multimodal judges are
|