baldart 4.89.2 → 4.92.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.
- package/CHANGELOG.md +87 -0
- package/VERSION +1 -1
- package/framework/.claude/agents/api-perf-cost-auditor.md +9 -0
- package/framework/.claude/agents/code-reviewer.md +9 -0
- package/framework/.claude/agents/codebase-architect.md +6 -0
- package/framework/.claude/agents/coder.md +1 -1
- package/framework/.claude/agents/markup-fidelity-verifier.md +24 -1
- package/framework/.claude/agents/qa-sentinel.md +9 -0
- package/framework/.claude/agents/security-reviewer.md +9 -0
- package/framework/.claude/agents/ui-expert.md +49 -0
- package/framework/.claude/agents/visual-fidelity-verifier.md +16 -12
- package/framework/.claude/skills/e2e-review/CHANGELOG.md +59 -0
- package/framework/.claude/skills/e2e-review/SKILL.md +187 -26
- package/framework/.claude/skills/new/CHANGELOG.md +29 -0
- package/framework/.claude/skills/new/SKILL.md +44 -2
- package/framework/.claude/skills/new/references/completeness.md +1 -0
- package/framework/.claude/skills/new/references/implement.md +19 -3
- package/framework/.claude/skills/new/references/review-cycle.md +23 -1
- package/framework/.claude/skills/new/references/team-mode.md +4 -0
- package/framework/.claude/skills/new/scripts/verify-item.sh +54 -0
- package/framework/.claude/skills/new2/CHANGELOG.md +46 -0
- package/framework/.claude/skills/new2/SKILL.md +58 -10
- package/framework/.claude/skills/ui-implement/CHANGELOG.md +20 -0
- package/framework/.claude/skills/ui-implement/SKILL.md +37 -7
- package/framework/.claude/skills/ui-implement/references/integration.md +12 -3
- package/framework/.claude/skills/ui-implement/scripts/check-bindings.mjs +103 -0
- package/framework/.claude/workflows/new-card-review.js +19 -5
- package/framework/.claude/workflows/new-final-review.js +24 -9
- package/framework/.claude/workflows/new2.js +84 -5
- package/framework/agents/code-search-protocol.md +24 -0
- package/framework/agents/design-system-protocol.md +27 -0
- package/framework/docs/WORKFLOWS.md +9 -4
- package/framework/scripts/structural-compare.mjs +183 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,93 @@ 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.92.1] - 2026-07-02
|
|
9
|
+
|
|
10
|
+
**Review avversariale post-release del motore new2 (coerenza interna).** Tre reviewer indipendenti a contesto fresco (dataflow / edge-case / contratti) sull'onda v4.90–4.92; ogni finding ri-verificato contro il codice prima di agire: **11 confermati e fixati, 9 refutati con evidenza empirica** (tra i refutati: la "race" del worker-pool adattivo — simulata: 0 buchi; `verify-item.sh` su bash 3.2 reale — funziona; `parseInt` con CRLF; un CAP attribuito a `new2.js` che non esiste).
|
|
11
|
+
|
|
12
|
+
**PATCH** — hardening senza cambi di superficie. **Nessuna nuova chiave config**. **Codex parity: portable/N/A** (prosa + workflow JS Claude-only).
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **`new2.js`**: verifier strutturale che si auto-dichiara `status:"skipped"` = UNDERRUN (mai PASS — era l'ultimo canale di under-run mascherato); **re-verify deterministica** una-tantum dopo un fix strutturale risolto (il self-report del fixer non è la conferma del verifier); **`bindingCheck` consumato** (violazioni sopravvissute al pass dell'agent → resolve ui; report assente → ledger fail-open, mai silente); `${MAIN}` quotato dentro `$(git -C …)` (path con spazi).
|
|
17
|
+
- **`/e2e-review` 1.2.1**: stringa lane canonica `skipped:render_unavailable_structural_covered` scritta esplicitamente da Phase 3.8 (l'assertion di Phase 5 valida l'enum chiuso); chiave di convergenza del self-heal estesa con `viewport_role`.
|
|
18
|
+
- **`new2` 1.2.1**: Step 3.5 ramo AUTONOMOUS (CI/`BALDART_AUTONOMOUS`/origine delegata → mai una domanda, mai un apply command autonomo); **origine delegata = autonoma ovunque** (escape hatch 3b SKIPPED anche con TTY — chiuso il rischio di ciclo `/new`→`new2`→`/new` a costo pieno); contatore resume **durabile nel batch tracker** (una compaction non resetta il bound) + teardown broker Codex su ogni uscita per stallo.
|
|
19
|
+
- **`structural-compare.mjs`**: arbitrary value Tailwind con funzioni (`grid-cols-[repeat(2,_minmax(0,1fr))]`) contati con la `countTracks` parens-aware (era `split('_')` → 3 invece di 2, falso segnale di divergenza).
|
|
20
|
+
- **`ui-implement` 1.1.1**: Return Contract documenta i campi `bindings`/`lane_coverage`/`lanes` (schema SSOT in integration.md).
|
|
21
|
+
|
|
22
|
+
## [4.92.0] - 2026-07-02
|
|
23
|
+
|
|
24
|
+
**Tier 3 del programma "deep analysis /new+/ui-implement": parity tripwire, bound dei loop, verifica payload new2.** Chiude il programma a 3 tier (4.90.0 → 4.92.0).
|
|
25
|
+
|
|
26
|
+
**MINOR** — nuovo guard CI + bound espliciti. **Nessuna nuova chiave `baldart.config.yml`**.
|
|
27
|
+
|
|
28
|
+
**Codex parity: N/A / portable** (script maintainer + prose skill; nessuna superficie runtime nuova).
|
|
29
|
+
|
|
30
|
+
### Added — T3.A Parity tripwire /new ↔ new2
|
|
31
|
+
|
|
32
|
+
- **`scripts/check-new-parity.mjs`** (maintainer, CI-hard in `check-reference-integrity.yml`): 9 policy a location parallela codificate come obbligazioni (file, token) che devono valere su TUTTI i lati — mockup-first, router clamp, binding gate, lane strutturale, Verification-Lane Ledger, path tracker durabile (con FORBIDDEN sul path /tmp), verify-item runner, cap adattivo, delegation gate. La classe di difetto "fix propagato a metà" (v4.89.0, B4, singleCard…) ora fallisce la build invece di emergere in un post-mortem.
|
|
33
|
+
|
|
34
|
+
### Added — T3.C Loop bounds
|
|
35
|
+
|
|
36
|
+
- **`new2` 1.2.0**: resume loop HARD-bounded (`resumeMaxAttempts = 3` + stall detection sullo stesso set di card incomplete).
|
|
37
|
+
- **`/e2e-review` 1.2.0**: convergence detection nel self-heal (fix che genera finding gating NUOVI → stop immediato + override path, `convergence: "diverging"`); spawn del solo fixer-bucket non vuoto. Deliberatamente NIENTE re-verify selettiva delle lane (sarebbe un under-run auto-inflitto contro la Lane-Ledger assertion).
|
|
38
|
+
|
|
39
|
+
### Verified — T3.B new2 prompt payload (measure-first, esito documentato)
|
|
40
|
+
|
|
41
|
+
- La claim "i prompt di new2 embeddano 40–80KB di moduli per agente" è **REFUTATA alla verifica**: i prompt passano i moduli **per path** (`per ${REF}/implement.md Phase 2` — l'agent li legge da disco) e l'audit dei run reali mostra i moduli letti 1× ciascuno. Nessun cambio necessario; il "briefing-extract" resta non implementato di proposito (sarebbe un secondo SSOT distillato).
|
|
42
|
+
|
|
43
|
+
## [4.91.0] - 2026-07-02
|
|
44
|
+
|
|
45
|
+
**Tier 2 del programma "deep analysis /new+/ui-implement": hot-file economy, right-sizing del review fan-out, robustezza (B4/NUL/verify-item).** Interventi mirati dai numeri delle stesse 3 run reali del Tier 1.
|
|
46
|
+
|
|
47
|
+
**MINOR** — nuove capacità (script, sezioni protocollo), zero breaking. **Nessuna nuova chiave `baldart.config.yml`**.
|
|
48
|
+
|
|
49
|
+
**Codex parity: portable** (prosa protocollo/agent transpilata + script bash/zero-dep; i due workflow JS toccati sono Claude-only by design, path inline invariato).
|
|
50
|
+
|
|
51
|
+
### Added — T2.A Hot-file economy
|
|
52
|
+
|
|
53
|
+
- **`code-search-protocol.md` § "Large-file read discipline"** (SSOT): file > 800 righe = hot file; misurato un client da 2110 righe (~29k tok) riletto INTERO **28×** in un run (i moduli framework si leggono 1× — il repeated-read vero è questo). Regole: Hot-File Map → range-read; brief per path, mai body.
|
|
54
|
+
- **`codebase-architect`**: il contratto terse emette `## Hot-File Map` MANDATORY (`path (N lines): symbol — Lstart–Lend`) per ogni file in scope > 800 righe; `coder`/`ui-expert` citano la disciplina; `implement.md` Step 7 passa il baseline per PATH (guardia `[BASELINE-READ-FAIL]`).
|
|
55
|
+
|
|
56
|
+
### Added — T2.B Review fan-out right-sizing
|
|
57
|
+
|
|
58
|
+
- **Empty-scope pre-invocation guard** (Phase 2.5x + team-mode D.1.6): card/wave a diff vuoto non schedulano un cluster `new-card-review` no-op (misurati 2 cluster `agents=0, dur=0` in un batch reale).
|
|
59
|
+
- **Cap adattivo** in `new-card-review.js` + `new-final-review.js`: fisso 3 → parte 5, **scende a 2 al primo transient rate-limit** per il resto del run (rispetta il guardrail v4.53.6/v4.66.0 eliminando la queue-wait tax sui run senza pressione). Deliberatamente NON toccata la policy di profondità review (refutazioni slimCodex / review-gate additions).
|
|
60
|
+
|
|
61
|
+
### Fixed — T2.C Robustezza
|
|
62
|
+
|
|
63
|
+
- **B4 tracker LOST — propagazione completata**: il fix del path durabile (`$(git rev-parse --git-common-dir)/baldart/run/…`) era atterrato solo in `new/SKILL.md`+`metrics.md`; **`new2.js` creava ancora il tracker in `/tmp`** (la causa dei FAIL B4 nei run di audit) e i prompt fixer di `/e2e-review` citavano il path volatile. Entrambe le location parallele allineate.
|
|
64
|
+
- **Sweep anti-NUL**: sezione "Search discipline (MUST)" (prefer `rg`; 0-match ≠ assente) aggiunta ai 5 reviewer che ne erano privi — `qa-sentinel`, `code-reviewer`, `security-reviewer`, `markup-fidelity-verifier`, `api-perf-cost-auditor` (84–149 sintomi binary-grep per run nonostante il fix B3 su coder/architect).
|
|
65
|
+
- **`scripts/verify-item.sh` (skill /new)**: la Grep-verification discipline del completeness è ora CODE — pattern come singolo argv `-F` (metacaratteri innocui), exit 2 = `UNVERIFIED` mai `Missing`, rg NUL-safe con fallback `grep -a`. Testato incluso il file-con-NUL (la trappola FEAT-0041 B3). Hand-rolled shell per quei check = protocol violation.
|
|
66
|
+
- Versioni skill: `new` 1.3.0 · `new2` 1.1.1 · `e2e-review` 1.1.1.
|
|
67
|
+
|
|
68
|
+
## [4.90.0] - 2026-07-02
|
|
69
|
+
|
|
70
|
+
**Tier 1 del programma "deep analysis /new+/ui-implement" (lug-2026): fidelity chain a prova di under-run, build-with-eyes, e la delega off-context del batch `-auto`.** Fondato sui dati di 3 run reali (mayo `a73a52d0`/`a946415b`/`6882a2b7`): (a) il 53–59% dei token fatturati è la turn-tax dell'orchestrator inline; (b) nel run FEAT-0064 la catena di fedeltà è stata SOTTO-eseguita in silenzio (zero `visual-fidelity-verifier`/`ui-quality-critic` spawnati) e l'escape è diventata BUG-0017 lavorata a mano; (c) i moduli reference vengono letti 1× (economy OK) — il costo ricorrente è altrove.
|
|
71
|
+
|
|
72
|
+
**MINOR** — nuove capacità (gate, script, delega), zero breaking. **Nessuna nuova chiave `baldart.config.yml`** → la schema-change propagation rule NON si applica.
|
|
73
|
+
|
|
74
|
+
**Codex parity: portable / inline-fallback** — script zero-dep + prosa skill/agent (trasp. TOML) portabili; il delegation gate e la lane new2 sono Claude-only by design con il path classico inline come fallback documentato (ogni run Codex è invariata).
|
|
75
|
+
|
|
76
|
+
### Added — T1.A Fidelity chain (verification-lane ledger)
|
|
77
|
+
|
|
78
|
+
- **`design-system-protocol.md` § 6 "Verification-Lane Ledger"** (nuovo check SSOT): riconciliazione planned-vs-executed delle lane di verifica; una lane pianificata mai eseguita = **`verification-coverage-gap`** (Critical, unfixable, bypassa il self-heal, → `blocked`). Nessun verdetto self-served "accepted (harness limit)".
|
|
79
|
+
- **`/e2e-review` 1.1.0**: Lane Matrix (chiusura Phase 2) + assertion Phase 5 step 0; bundle HTML Claude Design SEMPRE sondato con `extract-mockup-design.mjs` e threaded come `structural_source` (decode fallito ≠ lane persa); viewport **tablet @768px** scope-driven (`plan.tablet_in_scope` → cattura + pass 2c `viewport_role: tablet`); report JSON additivo `lanes`/`lane_coverage`.
|
|
80
|
+
- **`/ui-implement` 1.1.0 — binding gate**: nuovo script deterministico `skills/ui-implement/scripts/check-bindings.mjs` (Step 5b) — binding `reuse`/`reuse-variant` non usato nel codice = `binding-not-honored` (Critical, 1 retry, poi blocked). Fail-open.
|
|
81
|
+
- **`new2.js` (location parallela)**: lane strutturale route-free (`markup-fidelity-verifier`) per card con mockup + obbligo Lane-Ledger (verifier assente → residual `verification-coverage-gap`, card mai auto-DONE); binding gate nel brief; cardGraph `designSrcDir`/`designHtml`/`hasBindings`.
|
|
82
|
+
- `visual-fidelity-verifier`: `viewport_role: "tablet"` (responsive-integrity + wrong-band collapse con cite dell'AC).
|
|
83
|
+
|
|
84
|
+
### Added — T1.B Build-with-eyes (costruisci-bene a monte)
|
|
85
|
+
|
|
86
|
+
- **`framework/scripts/structural-compare.mjs`**: pre-gate strutturale deterministico (grid cols per breakpoint / responsive machinery / landmark, confidence graduata). Semantica onesta: SEGNALI, mai verdetti (le primitive composte sono invisibili al regex) — hint `deterministic_signals` che il `markup-fidelity-verifier` conferma o dismette esplicitamente; un `match` non autorizza mai lo skip del verifier.
|
|
87
|
+
- **`ui-expert.md` § "Build-with-eyes"**: self-check in-build bounded (max 2 iter) — strutturale via script + visivo con `npx playwright screenshot` e Read multimodale del mockup; degrado onesto e SEMPRE riportato. Il trio verifier resta il giudice indipendente.
|
|
88
|
+
- **`/e2e-review`**: validazione dimensioni viewport prima del pixel-diff (chiude il falso-negativo cross-width); **quality pre-filter skip** (design system + structural pulita + pixel-diff sotto threshold → `ui-quality-critic` saltato come skip autorizzato `quality_prefilter_skip`; mai su `harness-render`/no-mockup).
|
|
89
|
+
|
|
90
|
+
### Added — T1.C Turn-tax (delega off-context)
|
|
91
|
+
|
|
92
|
+
- **`/new` 1.2.0 — AUTONOMOUS OFF-CONTEXT DELEGATION GATE** (kickoff, pre-Phase-0): un batch `-auto` è delegato di default al motore `new2` (Workflow tool + `new2.js` + skill presenti, batch migration-free, non `-auto-ship`). Delega MANDATORY a condizioni verdi; escape hatch **`-inline`**; il classico resta SSOT (interattivo / Codex / `-auto-ship` / migrazioni).
|
|
93
|
+
- **`new2` 1.1.0**: promossa a motore di default di `/new -auto` (Step 1.5 = contratto della delega + handback su migrazione dichiarata); `docs/WORKFLOWS.md` riframato ("new2 is the engine, /new is the SSOT").
|
|
94
|
+
|
|
8
95
|
## [4.89.2] - 2026-07-01
|
|
9
96
|
|
|
10
97
|
**`baldart update` auto-commit now covers the FULL payload — Codex artifacts included.** A consumer reported that `baldart update` "never commits anything" even when authorized, and that other clones keep seeing the same files untracked. Root cause: `postUpdateAutoCommit` (`src/commands/update.js`) auto-commits only paths matching `BALDART_MANAGED_PATTERNS`; everything else is classified `userOwned` and left in the tree forever. The allowlist had drifted behind the payloads BALDART actually writes — it was missing every Codex-native artifact (`.codex/agents/*.toml` transpiled agents v4.80.0, `.codex/hooks.json` v4.88.0, `.agents/skills/*` skill symlinks v3.7.0), `.claude/output-styles/` (v4.50.0), and the i18n gate files (`eslint.i18n.config.mjs` / `.eslintrc.i18n.json` / the `paths.i18n_registry` directory, v4.52.0). On a Codex-enabled consumer the 32 `.toml` files are regenerated as real files on every update, classified `userOwned`, never committed → churn in every other clone.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.92.1
|
|
@@ -38,6 +38,15 @@ To prevent context bloat:
|
|
|
38
38
|
- Max **25 Bash/grep calls**.
|
|
39
39
|
- Never read files outside `git diff --name-only` (or scope passed by orchestrator) unless tracing a callgraph that proves a regression.
|
|
40
40
|
|
|
41
|
+
## Search discipline (MUST)
|
|
42
|
+
|
|
43
|
+
Prefer `rg` over GNU `grep` on source files: GNU `grep` silently flips to binary
|
|
44
|
+
mode on the first NUL/non-UTF-8 byte (common in large generated/bundled files) and
|
|
45
|
+
prints nothing + exit 1 — indistinguishable from "no match". An empty result on a
|
|
46
|
+
file you EXPECT to match is a binary-mode trap, not evidence: re-run with `rg` (or
|
|
47
|
+
`grep -a`) before concluding anything. SSOT:
|
|
48
|
+
`framework/agents/code-search-protocol.md` § Budget.
|
|
49
|
+
|
|
41
50
|
## Project Context (read from `baldart.config.yml`)
|
|
42
51
|
|
|
43
52
|
Read `stack.framework`, `stack.database`, `stack.deployment` at the start of
|
|
@@ -40,6 +40,15 @@ Before applying the review checklist, consult MEMORY for similar prior reviews:
|
|
|
40
40
|
4. In the verdict line context, declare: `Memory matches: <N> known pitfalls applied`.
|
|
41
41
|
5. If you find a NEW recurring pattern during review, append it to MEMORY.md at end.
|
|
42
42
|
|
|
43
|
+
## Search discipline (MUST)
|
|
44
|
+
|
|
45
|
+
Prefer `rg` over GNU `grep` on source files: GNU `grep` silently flips to binary
|
|
46
|
+
mode on the first NUL/non-UTF-8 byte (common in large generated/bundled files) and
|
|
47
|
+
prints nothing + exit 1 — indistinguishable from "no match". An empty result on a
|
|
48
|
+
file you EXPECT to match is a binary-mode trap, not evidence: re-run with `rg` (or
|
|
49
|
+
`grep -a`) before concluding anything. SSOT:
|
|
50
|
+
`framework/agents/code-search-protocol.md` § Budget.
|
|
51
|
+
|
|
43
52
|
## Design System Compliance (MANDATORY for UI work)
|
|
44
53
|
|
|
45
54
|
When reviewing files that touch UI components, styling, or visual output,
|
|
@@ -326,6 +326,12 @@ prose costs them context budget on every subsequent turn.
|
|
|
326
326
|
the `## Canonical Evidence` block.
|
|
327
327
|
- **Affected code as rows, not paragraphs:** `path:line — symbol — pattern/role`.
|
|
328
328
|
- **High-risk paths / integration points, one line each:** `path:line — risk`.
|
|
329
|
+
- **Hot-File Map (MANDATORY for every in-scope file > 800 lines):** a
|
|
330
|
+
`## Hot-File Map` block, one row per exported/major symbol —
|
|
331
|
+
`path (N lines): symbol — L<start>–L<end>` — so every downstream agent Reads the
|
|
332
|
+
target RANGE instead of the whole file (`code-search-protocol.md` § "Large-file
|
|
333
|
+
read discipline"; a 2110-line hot file was measured re-read whole 28× in one
|
|
334
|
+
run). Cheap to produce: `rg -n "^export|^function|^class|^const"` on the file.
|
|
329
335
|
- **Close with** a `totals:` line (files, reuse candidates, high-risk paths).
|
|
330
336
|
- **Drop:** the high-level-overview paragraph, the "why" essays, restating the
|
|
331
337
|
request, any prose a row already carries.
|
|
@@ -71,7 +71,7 @@ Any requirement of the form "verify X; if found → do A; if missing → do B/le
|
|
|
71
71
|
is a **binary-outcome item**. BOTH branches have a mandatory artifact — silence is never valid.
|
|
72
72
|
|
|
73
73
|
Rules:
|
|
74
|
-
1. **Verify actively**: read the relevant code (don't assume). Use Grep/Read. **Prefer `rg` over GNU `grep` on source** — GNU `grep` silently flips to binary mode on the first NUL byte (common in large generated/bundled `data.ts`-style files) and then prints nothing + exits 1, *indistinguishable from "no match"*. An empty result + exit 1 on a file you expect to match is a binary-mode trap, NOT proof the symbol is gone: re-run with `rg` (or `grep -a`) before acting. See `framework/agents/code-search-protocol.md` § Budget.
|
|
74
|
+
1. **Verify actively**: read the relevant code (don't assume). Use Grep/Read. **Prefer `rg` over GNU `grep` on source** — GNU `grep` silently flips to binary mode on the first NUL byte (common in large generated/bundled `data.ts`-style files) and then prints nothing + exits 1, *indistinguishable from "no match"*. An empty result + exit 1 on a file you expect to match is a binary-mode trap, NOT proof the symbol is gone: re-run with `rg` (or `grep -a`) before acting. See `framework/agents/code-search-protocol.md` § Budget. **Hot files (> 800 lines): Read the target RANGE, never the whole file** — use the baseline's `## Hot-File Map` line ranges when present, else `rg -n` the symbol first (`code-search-protocol.md` § "Large-file read discipline"). A whole-file Read of a hot file is justified only for a genuinely dispersed edit — say so in one line.
|
|
75
75
|
2. **Branch A (condition satisfied)**: implement A as specified.
|
|
76
76
|
3. **Branch B (condition not met)**: produce B — either:
|
|
77
77
|
- A code change (add the missing piece), OR
|
|
@@ -45,6 +45,15 @@ which needs a render) and you do NOT judge whether the design is *good*
|
|
|
45
45
|
gracefully (skip the check you lack inputs for). Do not assume defaults. See
|
|
46
46
|
`framework/agents/project-context.md` § 3.
|
|
47
47
|
|
|
48
|
+
## Search discipline (MUST)
|
|
49
|
+
|
|
50
|
+
Prefer `rg` over GNU `grep` on source files: GNU `grep` silently flips to binary
|
|
51
|
+
mode on the first NUL/non-UTF-8 byte (common in large generated/bundled files) and
|
|
52
|
+
prints nothing + exit 1 — indistinguishable from "no match". An empty result on a
|
|
53
|
+
file you EXPECT to match is a binary-mode trap, not evidence: re-run with `rg` (or
|
|
54
|
+
`grep -a`) before concluding anything. SSOT:
|
|
55
|
+
`framework/agents/code-search-protocol.md` § Budget.
|
|
56
|
+
|
|
48
57
|
## Hard Prohibitions (non-negotiable)
|
|
49
58
|
|
|
50
59
|
- **NEVER edit any file.** You produce a JSON report only. The orchestrator delegates
|
|
@@ -83,7 +92,11 @@ The orchestrator (`/e2e-review`) invokes you with this JSON payload:
|
|
|
83
92
|
"tolerance": "strict" | "balanced" | "lenient",
|
|
84
93
|
"resolved_orphans": [ // optional — Functional Traceability Gate
|
|
85
94
|
"Export CSV button", "bell icon" // mockup affordances deliberately dropped
|
|
86
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"deterministic_signals": { // optional — structural-compare.mjs output
|
|
97
|
+
"status": "match" | "divergence" | "skipped",
|
|
98
|
+
"findings": [ { "category": "...", "severity": "...", "confidence": "..." } ]
|
|
99
|
+
}
|
|
87
100
|
}
|
|
88
101
|
```
|
|
89
102
|
|
|
@@ -106,6 +119,16 @@ that is absent in the implementation is **EXPECTED — never a `component-missin
|
|
|
106
119
|
finding**. See `framework/agents/design-system-protocol.md` § "Functional Traceability
|
|
107
120
|
Gate".
|
|
108
121
|
|
|
122
|
+
**`deterministic_signals` (focus hints, when present).** The regex-level pre-gate
|
|
123
|
+
(`framework/scripts/structural-compare.mjs`) already scanned the same inputs. Its
|
|
124
|
+
signals are hints, not verdicts — it cannot see a grid or landmark owned by a
|
|
125
|
+
COMPOSED primitive (it only reads the card-touched files; you CAN read the composed
|
|
126
|
+
primitives). For each signal: **confirm it** (emit the corresponding finding, your
|
|
127
|
+
severity call) or **dismiss it explicitly** (state which composed primitive explains
|
|
128
|
+
it — e.g. "the reused `SplitView` owns the 2-column grid"). Do not silently ignore a
|
|
129
|
+
signal, and do not let a `match` lower your own scrutiny — the signature is necessary,
|
|
130
|
+
not sufficient.
|
|
131
|
+
|
|
109
132
|
## Severity Taxonomy (cite — do NOT redefine)
|
|
110
133
|
|
|
111
134
|
The canonical severity taxonomy is SSOT in
|
|
@@ -70,6 +70,15 @@ Default pre-commit gates (MUST pass before any commit verdict) — used when no
|
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
|
+
## Search discipline (MUST)
|
|
74
|
+
|
|
75
|
+
Prefer `rg` over GNU `grep` on source files: GNU `grep` silently flips to binary
|
|
76
|
+
mode on the first NUL/non-UTF-8 byte (common in large generated/bundled files) and
|
|
77
|
+
prints nothing + exit 1 — indistinguishable from "no match". An empty result on a
|
|
78
|
+
file you EXPECT to match is a binary-mode trap, not evidence: re-run with `rg` (or
|
|
79
|
+
`grep -a`) before concluding anything. SSOT:
|
|
80
|
+
`framework/agents/code-search-protocol.md` § Budget.
|
|
81
|
+
|
|
73
82
|
## Step 0: Always Start Here
|
|
74
83
|
|
|
75
84
|
Before running any checks:
|
|
@@ -35,6 +35,15 @@ Before reviewing:
|
|
|
35
35
|
1. Locate security-related ADRs and NFRs via `${paths.references_dir}/ssot-registry.md` and `rg` over security-related ADRs, reference docs, and agent instructions. Verify runtime/security truth against repo docs/code before making recommendations.
|
|
36
36
|
2. Check the traceability matrix (`${paths.traceability_matrix}`, typically `docs/references/traceability-matrix.md`) for which docs govern the code under review; if absent, skip this step.
|
|
37
37
|
|
|
38
|
+
## Search discipline (MUST)
|
|
39
|
+
|
|
40
|
+
Prefer `rg` over GNU `grep` on source files: GNU `grep` silently flips to binary
|
|
41
|
+
mode on the first NUL/non-UTF-8 byte (common in large generated/bundled files) and
|
|
42
|
+
prints nothing + exit 1 — indistinguishable from "no match". An empty result on a
|
|
43
|
+
file you EXPECT to match is a binary-mode trap, not evidence: re-run with `rg` (or
|
|
44
|
+
`grep -a`) before concluding anything. SSOT:
|
|
45
|
+
`framework/agents/code-search-protocol.md` § Budget.
|
|
46
|
+
|
|
38
47
|
## Core Responsibilities
|
|
39
48
|
|
|
40
49
|
1. **Detect vulnerabilities** in source code, configurations, and architecture.
|
|
@@ -32,6 +32,12 @@ When `false`, that section is a no-op).
|
|
|
32
32
|
**On missing/empty keys:** ask the user; do not assume defaults. See
|
|
33
33
|
`framework/agents/project-context.md` § 3.
|
|
34
34
|
|
|
35
|
+
**Read discipline (hot files):** for any source file > 800 lines, Read the target
|
|
36
|
+
RANGE (the baseline's `## Hot-File Map` line ranges when present, else `rg -n` the
|
|
37
|
+
symbol first) — never the whole file unless the edit is genuinely dispersed (say
|
|
38
|
+
so in one line). SSOT: `framework/agents/code-search-protocol.md` § "Large-file
|
|
39
|
+
read discipline".
|
|
40
|
+
|
|
35
41
|
## Authoritative Style Reference — Registry-First Protocol
|
|
36
42
|
|
|
37
43
|
This agent follows the registry-first discipline defined in
|
|
@@ -104,6 +110,49 @@ screenshot throws away exact values you already have and reintroduces drift.
|
|
|
104
110
|
Reuse-first keeps your design system the authority while inheriting the design's
|
|
105
111
|
exact composition — faithful AND token-clean.
|
|
106
112
|
|
|
113
|
+
## Build-with-eyes — bounded in-build self-check (MANDATORY when building from a mockup)
|
|
114
|
+
|
|
115
|
+
Catch-and-repair downstream is more expensive than build-right upstream: every
|
|
116
|
+
fidelity miss you ship costs a full verify→heal→re-verify cycle. So when you
|
|
117
|
+
build from a mockup, you check your own first pass BEFORE returning. This is
|
|
118
|
+
NOT self-grading — the independent verifier trio (`markup-fidelity-verifier`,
|
|
119
|
+
`visual-fidelity-verifier`, `ui-quality-critic`) remains the judge; your
|
|
120
|
+
self-check exists to raise first-pass fidelity so their loop converges in 0–1
|
|
121
|
+
iterations. **Bounded: max 2 self-check iterations**, then return with an honest
|
|
122
|
+
report.
|
|
123
|
+
|
|
124
|
+
1. **Structural self-check (code-form mockup — deterministic).** After your
|
|
125
|
+
first complete build (the code compiles), run:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
node "$(ls .framework/framework/scripts/structural-compare.mjs scripts/structural-compare.mjs 2>/dev/null | head -1)" \
|
|
129
|
+
--mockup <design_src dir | mockup .html> --impl <the files you wrote>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Judge each signal with your knowledge of what you composed: a `layout-break`
|
|
133
|
+
signal explained by a reused primitive that owns the grid (e.g. a `SplitView`)
|
|
134
|
+
is dismissible with that reason; one you cannot explain is a real miss — fix
|
|
135
|
+
it NOW, not in the heal loop.
|
|
136
|
+
2. **Visual self-check (any mockup — when a render is cheaply capturable AND you
|
|
137
|
+
are multimodal).** If the worktree's dev server is already running (check the
|
|
138
|
+
port registry) or boots within ~60s — or the surface is an isolated registry
|
|
139
|
+
primitive renderable via the `/ds-render` harness — capture it headless:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npx playwright screenshot --viewport-size=1440,900 --full-page <url> /tmp/bwe-<CARD-ID>.png
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`Read` the capture AND the mockup image, compare them yourself, and fix the
|
|
146
|
+
clear divergences you see (region placement, column structure, spacing
|
|
147
|
+
rhythm, obvious color blocks). Re-capture once after fixing. Never install
|
|
148
|
+
browsers or debug a server that fails to boot twice mid-build — that is a
|
|
149
|
+
skip, not a setup task.
|
|
150
|
+
3. **Degrade honestly, report always.** No server / no Playwright /
|
|
151
|
+
non-multimodal runtime → skip the visual pass (the structural one still runs
|
|
152
|
+
when a code-form mockup exists) and say so. Your completion report ALWAYS
|
|
153
|
+
carries one line:
|
|
154
|
+
`build-with-eyes: structural=<match|divergence-fixed|divergence-dismissed(<why>)|skipped> visual=<checked|checked-fixed|skipped(<reason>)>`.
|
|
155
|
+
|
|
107
156
|
## i18n — No Hardcoded Strings (BLOCKING when `features.has_i18n: true`)
|
|
108
157
|
|
|
109
158
|
When you WRITE UI code (the implementer role above) and `features.has_i18n: true`,
|
|
@@ -63,7 +63,7 @@ The orchestrator (`/e2e-review`) invokes you with this JSON payload:
|
|
|
63
63
|
"card_id": "FEAT-XXXX",
|
|
64
64
|
"route": "/dashboard",
|
|
65
65
|
"viewport": { "width": 1440, "height": 900 },
|
|
66
|
-
"viewport_role": "desktop" | "mobile",
|
|
66
|
+
"viewport_role": "desktop" | "mobile" | "tablet", // optional, default "desktop"
|
|
67
67
|
"implementation_screenshot_path": "/abs/path/to/impl.png",
|
|
68
68
|
"mockup_source": {
|
|
69
69
|
"level": "figma" | "local" | "compliance-only" | "skip",
|
|
@@ -83,21 +83,25 @@ The orchestrator (`/e2e-review`) invokes you with this JSON payload:
|
|
|
83
83
|
|
|
84
84
|
If `mockup_source.level == "skip"`, return immediately with
|
|
85
85
|
`{ "status": "skipped", "reason": "no_mockup_available", "findings": [] }` —
|
|
86
|
-
**unless** `viewport_role
|
|
87
|
-
pass below (it needs no mockup).
|
|
88
|
-
|
|
89
|
-
**`viewport_role: "mobile"` — responsive-integrity pass.** When set,
|
|
90
|
-
looking at
|
|
91
|
-
mockups are rarely provided, and the
|
|
92
|
-
any desktop mockup — so in this mode you **do NOT diff against a mockup** and
|
|
93
|
-
do **NOT** emit fidelity findings (`element-order`, `spacing-off-scale`,
|
|
94
|
-
`typography-*`, `color-*` relative to a desktop design). Evaluate the
|
|
86
|
+
**unless** `viewport_role` is `"mobile"` or `"tablet"`, in which case run the
|
|
87
|
+
responsive-integrity pass below (it needs no mockup).
|
|
88
|
+
|
|
89
|
+
**`viewport_role: "mobile" | "tablet"` — responsive-integrity pass.** When set,
|
|
90
|
+
you are looking at a **responsive render** (mobile ≈ 375px; tablet ≈ 768px).
|
|
91
|
+
Per-viewport mockups are rarely provided, and the layout *correctly* reflows away
|
|
92
|
+
from any desktop mockup — so in this mode you **do NOT diff against a mockup** and
|
|
93
|
+
you do **NOT** emit fidelity findings (`element-order`, `spacing-off-scale`,
|
|
94
|
+
`typography-*`, `color-*` relative to a desktop design). Evaluate the
|
|
95
95
|
screenshot on its own and flag **only genuine viewport breakage**:
|
|
96
96
|
`responsiveness-break` (horizontal scroll past the viewport, content cut off,
|
|
97
97
|
elements overlapping/unreadable), `unreachable-action` (primary CTA off-screen or
|
|
98
98
|
behind a fixed overlay), and `layout-break` (a container that genuinely collapsed,
|
|
99
|
-
not an intended stack).
|
|
100
|
-
|
|
99
|
+
not an intended stack). At tablet width also flag a **wrong-band collapse** — a
|
|
100
|
+
layout the card's ACs promise as multi-column at ≥768px that has already collapsed
|
|
101
|
+
to the mobile stack — as `responsiveness-break` (cite the AC in `expected`). Be
|
|
102
|
+
conservative: a dense-but-legible layout is **not** a break — flag only hard
|
|
103
|
+
failures a user would hit. Return the same output schema, tagging findings with
|
|
104
|
+
the `viewport_role` you were given.
|
|
101
105
|
|
|
102
106
|
**`resolved_orphans` carve-out (Functional Traceability Gate).** The mockup is a
|
|
103
107
|
fidelity target, not a requirements oracle: it may contain interactive chrome that
|
|
@@ -2,6 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.2.1 — 2026-07-02
|
|
6
|
+
|
|
7
|
+
- Phase 3.8: la lane visual del route non renderizzabile con mockup code-form viene
|
|
8
|
+
marcata esplicitamente `skipped:render_unavailable_structural_covered` nel Lane
|
|
9
|
+
Matrix (l'enum canonico che l'assertion di Phase 5 step 0 valida); `gaps[]` tiene
|
|
10
|
+
il diagnostico `render_unavailable` — due stringhe deliberatamente distinte.
|
|
11
|
+
- Phase 5b step 3: chiave di convergenza estesa con `viewport_role`
|
|
12
|
+
(`route, source, category, viewport_role, region`) — una regressione
|
|
13
|
+
viewport-scoped non può più matchare falsamente il finding pre-fix.
|
|
14
|
+
|
|
15
|
+
## 1.2.0 — 2026-07-02
|
|
16
|
+
|
|
17
|
+
- **Self-heal convergence detection (Phase 5b step 3)**: se il fix produce finding
|
|
18
|
+
gating NUOVI assenti prima (fixer che regredisce mentre ripara), stop immediato →
|
|
19
|
+
override path con entrambi i set (`convergence: "diverging"`) — non si brucia
|
|
20
|
+
l'iterazione 2. Set che si restringono/uguali iterano normalmente.
|
|
21
|
+
- Phase 5b step 1: spawn del SOLO bucket non vuoto (niente coder su finding
|
|
22
|
+
tutti-UI e viceversa). Deliberatamente NON introdotta la re-verify selettiva
|
|
23
|
+
delle lane (sarebbe l'under-run che la Lane-Ledger assertion blocca; i due
|
|
24
|
+
pre-filter rendono già economico il re-run pulito).
|
|
25
|
+
|
|
26
|
+
## 1.1.1 — 2026-07-02
|
|
27
|
+
|
|
28
|
+
- Fix B4 (location parallela): i prompt fixer di Phase 5b citavano il tracker in
|
|
29
|
+
`/tmp/batch-tracker-…` (path volatile pre-fix) — ora la location DURABILE
|
|
30
|
+
`$(git rev-parse --git-common-dir)/baldart/run/…` (new/SKILL.md § Context
|
|
31
|
+
Tracking).
|
|
32
|
+
|
|
33
|
+
## 1.1.0 — 2026-07-02
|
|
34
|
+
|
|
35
|
+
- **Lane Matrix + lane-coverage assertion**: Phase 2 chiude con un ledger delle lane
|
|
36
|
+
pianificate per route (structural / visual desktop·mobile·tablet / quality /
|
|
37
|
+
functional); Phase 5 step 0 riconcilia planned-vs-ran e sintetizza
|
|
38
|
+
`verification-coverage-gap` (Critical, `source: "coverage"`, bypassa il self-heal)
|
|
39
|
+
per ogni lane pianificata mai eseguita. Chiude l'under-run FEAT-0064 (run con solo
|
|
40
|
+
verifier strutturale, zero visual/quality, verdetto muto). SSOT:
|
|
41
|
+
`design-system-protocol.md` § Verification-Lane Ledger (nuovo check #6).
|
|
42
|
+
- **Threading del bundle HTML decodificato**: un mockup `.html` viene SEMPRE sondato
|
|
43
|
+
con `extract-mockup-design.mjs`; `status: ok` → `structural_source` di livello
|
|
44
|
+
`design_src` (JSX/CSS decodificati), altrimenti resta `html`. Un mockup HTML non può
|
|
45
|
+
più perdere la lane strutturale per un decode mancato.
|
|
46
|
+
- **Viewport tablet @768px scope-driven**: `plan.tablet_in_scope` (deterministico da
|
|
47
|
+
title/AC/scope) → terza cattura Playwright + pass responsive-integrity 2c con
|
|
48
|
+
`viewport_role: "tablet"`. Chiude il buco della "fascia di mezzo" 768–1024px.
|
|
49
|
+
- Report JSON: nuovi campi `lane_coverage` + `lanes` (additivi, consumer /new e
|
|
50
|
+
/ui-implement invariati sul contratto esistente).
|
|
51
|
+
- **Pre-gate deterministico Phase 2.7** (`framework/scripts/structural-compare.mjs`):
|
|
52
|
+
signature strutturale mockup↔implementazione (griglia/breakpoint/landmark, con
|
|
53
|
+
confidence graduata) passata al `markup-fidelity-verifier` come
|
|
54
|
+
`deterministic_signals` (hint da confermare/dismettere esplicitamente — mai un
|
|
55
|
+
verdetto autonomo: le primitive composte sono fuori dalla vista del regex).
|
|
56
|
+
- **Validazione dimensioni viewport (Phase 4 step 1a-pre)**: pixel-diff mai eseguito
|
|
57
|
+
su larghezze diverse (falso-negativo sotto threshold); mismatch → log +
|
|
58
|
+
comparazione Vision diretta, mai resize forzato.
|
|
59
|
+
- **Quality pre-filter skip (Phase 4b)**: con design system + lane strutturale pulita
|
|
60
|
+
+ pixel-diff sotto threshold, lo spawn di `ui-quality-critic` è saltato come
|
|
61
|
+
`skipped:quality_prefilter_skip` (skip autorizzato nel Lane Matrix); mai su
|
|
62
|
+
`harness-render` o route senza mockup.
|
|
63
|
+
|
|
5
64
|
## 1.0.0 — 2026-07-01
|
|
6
65
|
|
|
7
66
|
- Baseline: versioning per-skill introdotto al framework v4.82.0.
|