baldart 5.0.1 → 5.2.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/README.md +6 -6
  3. package/VERSION +1 -1
  4. package/framework/.claude/agents/CHANGELOG.md +90 -0
  5. package/framework/.claude/agents/REGISTRY.md +5 -5
  6. package/framework/.claude/agents/coder.md +3 -3
  7. package/framework/.claude/agents/remotion-animator-orchestrator.md +4 -3
  8. package/framework/.claude/agents/senior-researcher.md +166 -151
  9. package/framework/.claude/agents/ui-expert.md +4 -10
  10. package/framework/.claude/agents/ui-quality-critic.md +27 -11
  11. package/framework/.claude/skills/design-system-init/CHANGELOG.md +5 -0
  12. package/framework/.claude/skills/design-system-init/SKILL.md +2 -2
  13. package/framework/.claude/skills/e2e-review/CHANGELOG.md +5 -0
  14. package/framework/.claude/skills/e2e-review/SKILL.md +2 -2
  15. package/framework/.claude/skills/frontend-design/CHANGELOG.md +20 -0
  16. package/framework/.claude/skills/frontend-design/SKILL.md +39 -216
  17. package/framework/.claude/skills/gamification-design/CHANGELOG.md +5 -0
  18. package/framework/.claude/skills/gamification-design/SKILL.md +2 -2
  19. package/framework/.claude/skills/prd/CHANGELOG.md +16 -0
  20. package/framework/.claude/skills/prd/SKILL.md +1 -1
  21. package/framework/.claude/skills/prd/references/discovery-phase.md +5 -1
  22. package/framework/.claude/skills/prd/references/research-phase.md +32 -12
  23. package/framework/.claude/skills/research/CHANGELOG.md +9 -0
  24. package/framework/.claude/skills/research/SKILL.md +94 -0
  25. package/framework/.claude/skills/research/assets/report-compare.template.md +50 -0
  26. package/framework/.claude/skills/research/assets/report-decision.template.md +42 -0
  27. package/framework/.claude/skills/research/assets/report-deep.template.md +61 -0
  28. package/framework/.claude/skills/research/assets/report-regulatory.template.md +44 -0
  29. package/framework/.claude/skills/research/references/playbook.md +112 -0
  30. package/framework/.claude/skills/research/scripts/rebuild-research-index.mjs +77 -0
  31. package/framework/.claude/skills/ui-design/CHANGELOG.md +60 -1
  32. package/framework/.claude/skills/ui-design/SKILL.md +127 -75
  33. package/framework/.claude/skills/ui-design/references/anti-slop.md +106 -0
  34. package/framework/.claude/skills/ui-design/references/craft-standards.md +259 -0
  35. package/framework/.claude/skills/ui-design/references/design-brief.md +92 -0
  36. package/framework/.claude/skills/ui-design/references/design-directions.md +188 -0
  37. package/framework/.claude/skills/ui-design/references/evaluation.md +125 -165
  38. package/framework/.claude/skills/ui-design/references/generation.md +125 -92
  39. package/framework/.claude/skills/ui-design/references/inventory.md +9 -2
  40. package/framework/.claude/skills/ui-design/scripts/craft-check.mjs +248 -0
  41. package/framework/agents/component-manifest-schema.md +1 -1
  42. package/framework/agents/design-system-protocol.md +6 -6
  43. package/framework/agents/index.md +3 -0
  44. package/framework/agents/research-protocol.md +228 -0
  45. package/framework/agents/skills-mapping.md +42 -23
  46. package/framework/docs/PROJECT-CONFIGURATION.md +28 -5
  47. package/framework/templates/baldart.config.template.yml +6 -0
  48. package/framework/templates/research-index.template.md +13 -0
  49. package/framework/templates/research-sources.CHANGELOG.md +14 -0
  50. package/framework/templates/research-sources.template.md +31 -0
  51. package/package.json +1 -1
  52. package/src/commands/configure.js +27 -1
  53. package/src/commands/doctor.js +82 -0
  54. package/src/commands/update.js +48 -1
  55. package/src/utils/__tests__/classify-divergence.test.js +42 -0
  56. package/src/utils/git.js +45 -9
  57. package/src/utils/research-library.js +92 -0
  58. package/src/utils/symlinks.js +3 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,163 @@ 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
+ ## [5.2.0] - 2026-07-03
9
+
10
+ **The local design studio.** `/ui-design` is refounded from the root as the
11
+ top-of-the-line skill for designing, prototyping and restyling UI locally —
12
+ the internal twin of the Claude Design handoff — absorbing design
13
+ intelligence distilled from three state-of-the-art open repos
14
+ ([impeccable](https://github.com/pbakaus/impeccable) Apache-2.0,
15
+ [taste-skill](https://github.com/Leonxlnx/taste-skill) MIT,
16
+ [open-design](https://github.com/nexu-io/open-design) Apache-2.0, attributed
17
+ in each derived reference). The superseded `frontend-design` /
18
+ `ui-ux-pro-max` / `huashu-design` dependencies are cut, and the skill-routing
19
+ failure ("agents pick frontend-design for UI work") is fixed at every layer.
20
+
21
+ - **`ui-design` v2.0.0** (public step contract A–H and the `/prd` 3a–3e
22
+ mapping UNCHANGED):
23
+ - NEW **Step C.0 — Design Read & Direction Lock** (`references/design-brief.md`):
24
+ register (brand/product), regime (in-context/exploration), dials
25
+ VARIANCE/MOTION/DENSITY, two-altitude slop test, color-commitment axis,
26
+ dark/light scene sentence, anti-references, ONE-question ambiguity rule,
27
+ cross-run rotation check.
28
+ - NEW **`references/design-directions.md`** (12-direction aesthetic menu +
29
+ font/palette reflex-reject lists: LILA rule, premium-consumer beige ban,
30
+ serif discipline), **`references/craft-standards.md`** (always-on craft;
31
+ numeric ranges cite `design-system-protocol.md` § Reference Tables; the
32
+ **canonical new home of Performance Gates/CWV 2026 + Modern CSS + Form
33
+ quality**, migrated from frontend-design), **`references/anti-slop.md`**
34
+ (the Tells catalog — absolute bans, count-bounded rations, copy tells;
35
+ every ban with a declared-override path).
36
+ - NEW **`scripts/craft-check.mjs`** — deterministic anti-slop/craft gate
37
+ (~22 rules, zero-dep, `--json`, `--strict-palette`); generator self-check
38
+ + Step D Gate 0; identical on Claude and Codex.
39
+ - **Step D rewritten as dual-lens**: Gate 0 craft-check (fail-fast, hidden
40
+ from lenses) → Lens A **`ui-quality-critic`** (true evaluator diversity —
41
+ different agent definition than the generator; rubric SSOT unchanged) →
42
+ Lens B fresh `ui-expert` conformance (B1–B5, evidence-cited scoring,
43
+ worst-sustained-band, no grade inflation). Honest **degraded mode** on
44
+ non-multimodal runtimes (mandatory `⚠️ DEGRADED` banner).
45
+ - Generation is **token-first** (project tokens embedded in `:root` so the
46
+ mockup speaks the project token language, mirroring the Claude Design
47
+ channel) and **`data-region`-annotated** (surgical iteration +
48
+ deterministic inventory join into `component_bindings`).
49
+ - **`frontend-design` v2.0.0 — retired to a ROUTER**: the body reroutes
50
+ deterministically (design → `/ui-design`, approved mockup →
51
+ `/ui-implement`, direct in-code UI → `ui-expert`, motion →
52
+ `/motion-design`); the broad legacy triggers are KEPT on purpose as a
53
+ honeypot so reflexive mis-routing gets corrected instead of landing on
54
+ stale guidance. Consumer overlays with aesthetic mandates should port to
55
+ `.baldart/overlays/ui-design.md`.
56
+ - **Routing fix at every layer**: `ui-design` description rewritten to claim
57
+ design/restyle/prototype triggers (IT+EN) with an explicit NOT-list;
58
+ `agents/index.md` gains a DESIGN-DECISION routing rule;
59
+ `agents/skills-mapping.md` UI section + decision tree rewritten
60
+ (`ui-ux-pro-max` marked superseded, never route to it).
61
+ - **Agents**: `ui-quality-critic` v1.1.0 (gating extended: invoked by
62
+ `/e2e-review` Phase 4b OR `/ui-design` Step D — never ad-hoc; mockup
63
+ payload flavor documented); `ui-expert` v2.1.0 (CWV pointer re-targeted to
64
+ `craft-standards.md`; Linked Skills drop `frontend-design`/`ui-ux-pro-max`,
65
+ `ui-design` references become the standalone design-intelligence library);
66
+ `coder` v2.0.2 + `remotion-animator-orchestrator` v1.0.1 (pointer
67
+ re-targets). REGISTRY rows updated.
68
+ - **Docs**: `design-system-protocol.md` consumer lists updated
69
+ (`frontend-design` → `ui-implement` where apt), `PROJECT-CONFIGURATION.md`,
70
+ `configure.js` design-system hint, README + CLAUDE.md conventions;
71
+ `e2e-review` 1.3.1 / `design-system-init` 1.0.1 / `gamification-design`
72
+ 1.0.1 pointer fixes.
73
+ - **Fix (`update`) riding in this release**: `isAbsorbedAgainstUpstream` now
74
+ scopes the absorbed-commit divergence check to the `.framework/framework/`
75
+ payload only (`GitUtils.absorbablePayloadSubset`) — mixed commits and
76
+ subtree bookkeeping no longer mis-flag net-zero divergence as blocking
77
+ `custom-other` (repro: mayo v5.0.1→v5.1.0 update).
78
+ - **No new `baldart.config.yml` key** (rides on `features.has_design_system`
79
+ + existing keys) — the schema-change propagation rule does NOT apply.
80
+ - **Codex parity: portable** — same SKILL.md bundles (two symlinks), zero-dep
81
+ script, spawn/decision-gate bindings cited from
82
+ `runtime-portability-protocol.md`, and the visual lenses degrade honestly
83
+ (banner) instead of silently on non-multimodal runtimes.
84
+
85
+ ## [5.1.0] - 2026-07-03
86
+
87
+ **The research layer.** Research becomes a first-class, reusable asset: the
88
+ `senior-researcher` agent is restructured to the v5.0 authoring contract with
89
+ **research profiles**, every report lands in a consumer-owned, indexed
90
+ **research library**, and the **source matrix** that routes each research
91
+ nature to the right sources is versioned and grows project after project.
92
+ Design refined by an adversarial refutation pass (13 findings integrated —
93
+ ID-race BLOCKER, /prd poll determinism, lifecycle circularity, opt-out
94
+ resurrection, auto-commit scoping).
95
+
96
+ - **NEW protocol module `framework/agents/research-protocol.md`** (`SECTION=`
97
+ dispatch): `profiles` (`PROFILE=<decision|deep|compare|regulatory>` output
98
+ contracts; absent → `deep` = legacy semantics; deep's dzhng-style iterative
99
+ loop + STORM perspectives + CoVe citation spot-check are opt-in via
100
+ `DEPTH=<1..3>`, default 1 = today's cost), `library` (layout, tag-rich report
101
+ frontmatter as source of truth, INDEX.md as regenerable view, `RES-<date>-
102
+ <slug>` ids — no max+1 race, archive-not-delete), `reuse` (pre-flight
103
+ `FULL_REUSE`/`DELTA`/`NEW` + per-category TTLs + anti-false-reuse guard +
104
+ the always-write-a-file polling contract), `sources` (matrix schema,
105
+ SOURCES.md → framework-template resolution — the default matrix lives in ONE
106
+ file, and the `SOURCE_MATRIX_CANDIDATE` growth loop emitting a ready-to-paste
107
+ maintainer prompt).
108
+ - **`senior-researcher` v2.0.0** (agents CHANGELOG + heading map): description
109
+ 4-examples → 2 lines; `version:`/`effort:` frontmatter; `model: sonnet` KEPT
110
+ and the REGISTRY model-tier row corrected (it claimed "always opus",
111
+ contradicting the frontmatter since day one); NEW Profile Dispatch / Research
112
+ Library (total delivery-path chain: prompt → library → `paths.docs_dir`) /
113
+ Source Matrix sections; Operating Protocol cites incl. `SECTION=
114
+ injection-guard` — the agent reads more untrusted web content than any other
115
+ and previously had NO injection guard; FIRST MESSAGE TEMPLATE scoped to
116
+ interactive direct invocation.
117
+ - **NEW skill `/research` (42nd)**: THIN interactive orchestrator — scoping
118
+ (max 3 questions) → profile+nature routing → library reuse check BEFORE
119
+ paying for research → `senior-researcher` launch (parallel fan-out on
120
+ Claude; sequential by-name on Codex per `runtime-portability-protocol.md`)
121
+ → filing + INDEX ownership → matrix growth loop (apply locally to
122
+ `SOURCES.md` `## Local additions` and/or print the upstream BALDART prompt).
123
+ Ships per-profile report templates (`assets/`) + deterministic
124
+ `scripts/rebuild-research-index.mjs` (INDEX regenerated from frontmatter).
125
+ - **NEW config key `paths.research_dir`** (default `docs/research`, proposed on
126
+ FIRST encounter only — an explicitly emptied key is a respected opt-out,
127
+ never re-proposed, never resurrected). Schema-change propagation:
128
+ template + `configure` (detect probe + prompt + post-write library creation)
129
+ + `update` (new-key detector already covers `paths.*`; post-pull seed
130
+ backfill into an EXISTING dir only; auto-commit scoped to UNTRACKED seeds —
131
+ never sweeps a consumer-edited SOURCES.md/INDEX.md) + `doctor`
132
+ (`create-research-dir` / `backfill-research-seeds` autoOk actions — seeds are
133
+ generic, unlike the i18n registry; `research-sources-advisory` when the
134
+ framework matrix version moves ahead, never overwrites) +
135
+ `PROJECT-CONFIGURATION.md` (§ 4.2.2 lifecycle + opt-out) + this CHANGELOG.
136
+ New shared helper `src/utils/research-library.js` (idempotent, silent,
137
+ returns `created[]`).
138
+ - **Versioned source matrix**: `framework/templates/research-sources.template.md`
139
+ (`matrix_version: 1.0.0` + sibling `research-sources.CHANGELOG.md`) seeds the
140
+ consumer-owned `SOURCES.md`; 5-nature default matrix (scientific / dev /
141
+ regulatory / ux / market × primary / secondary / avoid / notes). Growth loop:
142
+ agent emits run-evidence-only candidates + the copy-paste BALDART prompt.
143
+ - **`/prd` 1.4.0**: Step 2.5 spawns with `PROFILE=decision`
144
+ (`PROFILE=regulatory` on signal S2) — resolving the two-conflicting-SSOTs
145
+ bug where the prompt asked for a light per-topic format while the agent's
146
+ contract mandated the full §0–§11 report; /prd now PRE-ALLOCATES the output
147
+ path (library when configured, legacy `prd_dir` fallback otherwise) and the
148
+ agent always writes a file there (`FULL_REUSE` → pointer stub) so the
149
+ 10-minute exit-check poll stays deterministic. Discovery-phase background
150
+ launch updated in the same change (parallel location). `hybrid-ml-architect`
151
+ deliberately NOT touched (vertical, on-request) — protected by the defaults.
152
+ - Inventories: 42 skills / 33 domain modules (README count was already stale
153
+ at 28); REGISTRY Agent Map + decision tree + model-tier rows updated.
154
+ - OSS recon (inspiration only, zero dependencies adopted): GPT Researcher
155
+ (planner/executor, local-first hybrid research), dzhng/deep-research
156
+ (breadth/depth loop), STORM (multi-perspective questioning),
157
+ open_deep_research (scoping phase), Karpathy markdown-first KB (INDEX as the
158
+ single map, archive-not-delete).
159
+ - Codex parity: **portable** — skill = same SKILL.md bundle (two symlinks),
160
+ agent = transpiled `.codex/agents/*.toml` from the same markdown, module +
161
+ templates = plain markdown; the only Claude-only mechanic (parallel
162
+ subagent fan-out in `/research`) has an explicit sequential-by-name Codex
163
+ branch citing `runtime-portability-protocol.md`.
164
+
8
165
  ## [5.0.1] - 2026-07-03
9
166
 
10
167
  **Adversarial-verification fixes on the 5.0.0 wave.** A full release verification
package/README.md CHANGED
@@ -83,7 +83,7 @@ No additional activation steps needed — once installed, Claude Code (and Codex
83
83
  ### Core Protocol
84
84
 
85
85
  - **AGENTS.md**: Mandatory coordination rules (MUST/SHOULD/OPTIONAL)
86
- - **agents/**: 28 domain modules (architecture, workflows, testing, security, card-schema, i18n-protocol, return-contract-protocol, runtime-portability-protocol, component-manifest-schema, etc.)
86
+ - **agents/**: 33 domain modules (architecture, workflows, testing, security, card-schema, i18n-protocol, return-contract-protocol, runtime-portability-protocol, component-manifest-schema, research-protocol, etc.)
87
87
  - **Routing**: If you touch X, read Y - minimize context loading
88
88
 
89
89
  ### AI Agents (32 specialized agents)
@@ -213,7 +213,7 @@ Skills always-ask when required keys are missing — never silently default.
213
213
  never overwrites your file. Full guide:
214
214
  [`framework/docs/PROJECT-CONFIGURATION.md`](framework/docs/PROJECT-CONFIGURATION.md).
215
215
 
216
- ### Skills (41 portable skills)
216
+ ### Skills (42 portable skills)
217
217
 
218
218
  Skills live under `.claude/skills/` and are auto-discovered by Claude Code. Every
219
219
  skill is **versioned** (`version:` in frontmatter) and ships a per-skill
@@ -222,16 +222,16 @@ Bundled skills:
222
222
 
223
223
  - **Workflow**: `new`, `new2` (v4.16.0 — EXPERIMENTAL workflow-hosted `/new`, Claude-only, for A/B testing context economy), `prd`, `prd-add`, `bug`, `simplify`, `worktree-manager`, `issue-review`, `context-primer`
224
224
  - **Code quality**: `skill-creator`, `find-skills`, `webapp-testing`, `playwright-skill`, `lsp-bootstrap` (v3.10.0), `graphify-bootstrap` (v4.21.0 — code knowledge graph), `graph-align` (v4.21.0 — doc↔graph alignment), `toolchain-bootstrap` (v4.41.0 — curated dev toolchain), `e2e-review` (v3.18.0)
225
- - **Design**: `frontend-design`, `ui-design`, `ui-implement` (v4.82.0 — implement an approved mockup end-to-end + self-verify fidelity; the mockup→code playbook SSOT, delegated from `/new`), `motion-design`, `gamification-design`, `design-system-init` (v3.11.0 — bulk registry bootstrap/upgrade), `ds-new` (v4.69.0 — single-element guided creation: one component or token, reuse-first → optional scaffold → document + register + govern + verify; the on-the-fly twin of `design-system-init`), `ds-edit` (v4.70.0 — deliberate edit of one existing element: resync / extend-variant / breaking / re-govern; regenerates the spec preserving agentic fields + prose, same canonical template), `ds-render` (v4.76.0 — render primitives in isolation to PNG via Storybook+Playwright), `design-sync` (v4.76.0 — mirror the registry to its Claude Design satellite), `ds-handoff` (v4.79.0 — field-level 1:1 Claude Design handoff brief: grounds every screen's fields in the real data schemas + coverage-gates before emitting; the SSOT for the Claude Design prompt, delegated from `/prd`)
225
+ - **Design**: `ui-design` (v2.0.0, framework v5.2.0 — the **local design studio**: Design Read & direction lock, 12-direction menu, deterministic anti-slop craft gate `craft-check.mjs`, dual-lens evaluation with `ui-quality-critic`; the internal twin of the Claude Design handoff), `frontend-design` (retired to a router since v5.2.0 — reroutes to `ui-design` / `ui-implement` / `ui-expert`), `ui-implement` (v4.82.0 — implement an approved mockup end-to-end + self-verify fidelity; the mockup→code playbook SSOT, delegated from `/new`), `motion-design`, `gamification-design`, `design-system-init` (v3.11.0 — bulk registry bootstrap/upgrade), `ds-new` (v4.69.0 — single-element guided creation: one component or token, reuse-first → optional scaffold → document + register + govern + verify; the on-the-fly twin of `design-system-init`), `ds-edit` (v4.70.0 — deliberate edit of one existing element: resync / extend-variant / breaking / re-govern; regenerates the spec preserving agentic fields + prose, same canonical template), `ds-render` (v4.76.0 — render primitives in isolation to PNG via Storybook+Playwright), `design-sync` (v4.76.0 — mirror the registry to its Claude Design satellite), `ds-handoff` (v4.79.0 — field-level 1:1 Claude Design handoff brief: grounds every screen's fields in the real data schemas + coverage-gates before emitting; the SSOT for the Claude Design prompt, delegated from `/prd`)
226
226
  - **Product**: `seo-audit`, `copywriting`, `api-design-principles`
227
- - **Knowledge**: `doc-writing-for-rag`, `capture` (LLM wiki overlay)
227
+ - **Knowledge**: `doc-writing-for-rag`, `capture` (LLM wiki overlay), `research` (v5.1.0 — routed research over the reusable research library: profile + source-matrix routing, reuse pre-flight, `senior-researcher` fan-out, matrix growth loop)
228
228
  - **Internationalization**: `i18n` (v4.52.0 — audit the context registry + context-aware translation into native locale files), `i18n-adopt` (v4.52.0 — one-shot migration that externalizes all hardcoded strings on an existing codebase); both gated on `features.has_i18n`
229
229
  - **Integration**: `kie-ai`, `remotion-best-practices`
230
230
  - **Framework**: `baldart-push` (upstream contribution), `baldart-update` (v3.21.0 — agent-driven framework update), `overlay` (v3.19.0 — guided overlay author)
231
231
 
232
232
  ### Registry-First UI Protocol (new in v3.11.0)
233
233
 
234
- When `features.has_design_system: true`, every UI-touching agent/skill/command (`ui-expert`, `ui-design`, `frontend-design`, `code-reviewer`, `/design-review`) follows the same BLOCKING cascade: read `${paths.design_system}/INDEX.md` (Authority Matrix), `tokens-reference.md` (token contract), and `components/<Name>.md` for every primitive in scope — BEFORE producing or reviewing any UI. New components must reuse from the registry or ship their per-component spec in the same change. Hardcoded color/shadow/radius/spacing values are HIGH findings. The textual SSOT for the protocol lives in [`framework/agents/design-system-protocol.md`](framework/agents/design-system-protocol.md). Projects without a registry can bootstrap one with `/design-system-init`, which inventories existing primitives, extracts tokens from global styles + Tailwind config, scaffolds the registry, and flips the flag.
234
+ When `features.has_design_system: true`, every UI-touching agent/skill/command (`ui-expert`, `ui-design`, `ui-implement`, `code-reviewer`, `/design-review`) follows the same BLOCKING cascade: read `${paths.design_system}/INDEX.md` (Authority Matrix), `tokens-reference.md` (token contract), and `components/<Name>.md` for every primitive in scope — BEFORE producing or reviewing any UI. New components must reuse from the registry or ship their per-component spec in the same change. Hardcoded color/shadow/radius/spacing values are HIGH findings. The textual SSOT for the protocol lives in [`framework/agents/design-system-protocol.md`](framework/agents/design-system-protocol.md). Projects without a registry can bootstrap one with `/design-system-init`, which inventories existing primitives, extracts tokens from global styles + Tailwind config, scaffolds the registry, and flips the flag.
235
235
 
236
236
  **Closed-Set Selection Policy (v4.68.0).** The registry has a token layer and a component layer, but until now nothing asserted the *boundary* of a category — so an agent designing from a mockup could write a third "header" when two canonical ones already cover every case, and the duplicate was only caught (reactively) at review. The closed-set policy adds the missing third layer: each component spec declares the presentational **role** it is canonical for (`canonical_for: [page-header@depth-0]`) and whether that role family is **closed** (`selection_closed`), aggregated into a generated `INDEX.md` § "Selection Policy". A closed family means *introducing a new canonical member is a governance decision, not an implementation act*. Three layers enforce it: (1) **`/prd` Component Reconciliation** — a human-in-the-loop *match-before-generate* gate that binds each mockup region to an existing component (or a governed NEW one) and asks *"this becomes the standard?"* only on genuine ambiguity, persisting the decision into the card's `component_bindings`; (2) **`baldart ds-gate`** — a deterministic, zero-false-positive build-time gate that BLOCKS (`DS_CLOSED_SET_VIOLATION`) any change adding a new canonical in a closed family (wired into `qa-sentinel` / `/new` / `code-reviewer`, the design-system analogue of the i18n gate); (3) the existing review + weekly `ds-drift` safety net. Rides on `features.has_design_system` — no new config key; `/design-system-init --upgrade` derives the closed sets from your existing `must_rules`. This closes a gap no 2026 design-to-code vendor hard-gates (Figma Code Connect, Storybook MCP, shadcn are all advisory).
237
237
 
@@ -245,7 +245,7 @@ Tuning lives under `features.e2e_review` in `baldart.config.yml`: `fidelity_tole
245
245
 
246
246
  ### UI Excellence + Post-Intervention Coherence Gate (new in v3.12.0)
247
247
 
248
- The `ui-expert` agent is upgraded from a generic baseline to a world-class UI/UX reviewer/designer — UI States Taxonomy (8 states), Performance Gates (Core Web Vitals 2026 — LCP/INP/CLS), modern CSS surface (container queries, `:has()`, View Transitions, subgrid, logical properties), AI-era patterns (streaming UI, hallucination guardrails), and 60+ categorized red flags. Numeric reference tables (type scale, contrast targets WCAG+APCA, spacing scales, density tiers, motion durations/easings) are SSOT'd in [`framework/agents/design-system-protocol.md`](framework/agents/design-system-protocol.md) so agents cite values verbatim instead of inventing them. Crucially, the registry-first discipline now has a **post-intervention coherence gate**: every UI change introduced by `ui-expert` / `ui-design` / `frontend-design` (and verified by `code-reviewer` at merge) must reconcile `INDEX.md` + `components/<Name>.md` + `tokens-reference.md` **in the same change** — drift can no longer wait for the weekly `ds-drift` routine. Three layers now enforce coherence: per-task → per-merge → weekly safety net. Existing projects align their current graphic organization with the new discipline via [`framework/docs/UPGRADE-3.12-UI-COHERENCE.md`](framework/docs/UPGRADE-3.12-UI-COHERENCE.md) (idempotent walkthrough: baseline scan → prioritized backlog → quick wins → gate verification).
248
+ The `ui-expert` agent is upgraded from a generic baseline to a world-class UI/UX reviewer/designer — UI States Taxonomy (8 states), Performance Gates (Core Web Vitals 2026 — LCP/INP/CLS), modern CSS surface (container queries, `:has()`, View Transitions, subgrid, logical properties), AI-era patterns (streaming UI, hallucination guardrails), and 60+ categorized red flags. Numeric reference tables (type scale, contrast targets WCAG+APCA, spacing scales, density tiers, motion durations/easings) are SSOT'd in [`framework/agents/design-system-protocol.md`](framework/agents/design-system-protocol.md) so agents cite values verbatim instead of inventing them. Crucially, the registry-first discipline now has a **post-intervention coherence gate**: every UI change introduced by `ui-expert` / `ui-design` / `ui-implement` (and verified by `code-reviewer` at merge) must reconcile `INDEX.md` + `components/<Name>.md` + `tokens-reference.md` **in the same change** — drift can no longer wait for the weekly `ds-drift` routine. Three layers now enforce coherence: per-task → per-merge → weekly safety net. Existing projects align their current graphic organization with the new discipline via [`framework/docs/UPGRADE-3.12-UI-COHERENCE.md`](framework/docs/UPGRADE-3.12-UI-COHERENCE.md) (idempotent walkthrough: baseline scan → prioritized backlog → quick wins → gate verification).
249
249
 
250
250
  ### LSP Symbol Search Layer (new in v3.10.0)
251
251
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.1
1
+ 5.2.0
@@ -7,6 +7,96 @@ per-item agent merge, the doctor probes, and the discovery hooks — like
7
7
 
8
8
  Formato: [Keep a Changelog](https://keepachangelog.com/) · per-agent SemVer.
9
9
 
10
+ ## [ui-expert v2.1.0] — 2026-07-03 (framework v5.2.0)
11
+
12
+ The `/ui-design` v2.0.0 studio refactor. No H2 moved; edits are within
13
+ `## Red Flags` (one pointer) and `## Linked Skills`.
14
+
15
+ - CWV full-reference pointer re-targeted: `frontend-design` § Performance
16
+ Gates → `ui-design/references/craft-standards.md` § Performance Gates (the
17
+ new canonical home after the frontend-design router demotion).
18
+ - `## Linked Skills`: `frontend-design` and `ui-ux-pro-max` entries REMOVED
19
+ (both superseded); the `ui-design` entry now also names its references
20
+ (`craft-standards` / `anti-slop` / `design-directions`) as the agent's
21
+ standalone design-intelligence library — Read directly, no skill
22
+ invocation, replacing `ui-ux-pro-max` for palettes/pairings/directions.
23
+
24
+ ## [ui-quality-critic v1.1.0] — 2026-07-03 (framework v5.2.0)
25
+
26
+ Second consumer: `/ui-design` Step D (mockup quality lens). `version:`
27
+ frontmatter added (pre-5.2 body is implicitly 1.0.x). No H2 moved.
28
+
29
+ - Gating reworded from "features.has_e2e_review, exists only for /e2e-review"
30
+ to **gated-by-invocation**: spawned by `/e2e-review` Phase 4b (that lane
31
+ still gated on `features.has_e2e_review`) OR `/ui-design` Step D (no
32
+ feature gate) — never ad-hoc. Rationale: the rubric judges any rendered UI
33
+ screenshot; binding it to the e2e harness was an artifact of its birth
34
+ context, and `/ui-design` needs a *different agent definition* than its
35
+ generator to break same-definition self-review (v4.61.0 discipline).
36
+ - Input Contract: documented the mockup payload flavor
37
+ (`route: "mockup:<slug>/option-<x>"`); no-source prohibition explicitly
38
+ covers the mockup HTML.
39
+ - description updated (2 lines kept).
40
+
41
+ ## [remotion-animator-orchestrator v1.0.1] — 2026-07-03 (framework v5.2.0)
42
+
43
+ - Component-build delegation re-targeted: `frontend-design` (retired to a
44
+ router) → `ui-expert` in the Asset Generation phase, the boundary list, and
45
+ the parallel-invocation example. `version:` frontmatter added.
46
+
47
+ ## [coder v2.0.2] — 2026-07-03 (framework v5.2.0)
48
+
49
+ - `## Linked Skills`: `frontend-design` entry replaced with a
50
+ references-only pointer to `ui-design/references/craft-standards.md`
51
+ (Performance Gates/CWV, form quality, modern CSS) for UI-adjacent markup in
52
+ mixed cards — with the explicit reminder that full UI work routes to
53
+ `ui-expert` per `AGENTS.md` § delegation.
54
+
55
+ ## [senior-researcher v2.0.0] — 2026-07-03 (framework v5.1.0)
56
+
57
+ The research-layer restructuring (profiles + library + source matrix). Pre-5.1
58
+ monolith is implicitly `1.x`. Every normative rule survives — inline as a
59
+ 1-line binding rule, in the new `agents/research-protocol.md` (SECTION=
60
+ profiles|library|reuse|sources), or in `agent-operating-protocol.md`.
61
+
62
+ - `version:`/`effort:` frontmatter added; `description` trimmed to 2 lines
63
+ (the 4 inline examples — ~450 words — were paid by the ORCHESTRATOR's
64
+ context every session).
65
+ - **`model: sonnet` KEPT** (maintainer decision); the REGISTRY model-tier row
66
+ is corrected (it claimed "opus — always opus", contradicting the frontmatter
67
+ since the initial commit) — override to opus stays at the orchestrator's
68
+ discretion for `PROFILE=deep`.
69
+ - NEW `## Profile Dispatch`: `PROFILE=<decision|deep|compare|regulatory>`
70
+ spawn token per `research-protocol.md SECTION=profiles`; absent → `deep`
71
+ (legacy semantics). The deep iterative loop is opt-in via `DEPTH=<1..3>`
72
+ (default 1 = today's cost) so legacy no-token spawns are unaffected.
73
+ - NEW `## Research Library`: reuse pre-flight (`REUSE: FULL_REUSE|DELTA|NEW`,
74
+ anti-false-reuse guard), total delivery-path resolution (prompt path →
75
+ `${paths.research_dir}` → `${paths.docs_dir}`), frontmatter-as-source-of-
76
+ truth filing.
77
+ - NEW `## Source Matrix`: SOURCES.md resolution + `SOURCE_MATRIX_CANDIDATE`
78
+ growth-loop block (run-local evidence only).
79
+ - NEW `## Operating Protocol` cites: `SECTION=injection-guard` (this agent
80
+ reads more untrusted web content than any other — it previously had NO
81
+ injection guard), `SECTION=tool-budget` (saturation stop), `SECTION=memory`.
82
+ - Return Contract updated: + `REUSE:` line; on an orchestrator-preallocated
83
+ path a file is ALWAYS written (FULL_REUSE → pointer stub) so file-exists
84
+ polling never times out.
85
+ - FIRST MESSAGE TEMPLATE scoped to interactive direct invocation only
86
+ (`BACKGROUND_RUN=true` OR any orchestrator `PROFILE=` token skips it).
87
+
88
+ **Heading map (old → new) for consumer overlays**:
89
+
90
+ | Old H2 (pre-5.1) | Now |
91
+ |---|---|
92
+ | `## CRITICAL CONSTRAINT: AI-READABLE + LIMITED CONTEXT` | constraints folded into `## AUDIENCE` + `## OUTPUT — PROFILE=deep` (AI-readable block) |
93
+ | `## OUTPUT (DELIVERABLE)` | `## OUTPUT — PROFILE=deep (§0–§11, VERBATIM contract)` |
94
+ | `## NON-NEGOTIABLE QUALITY BAR` | same name, `(every profile)` suffix; evidence labels + insufficient-evidence rules folded in |
95
+ | `## WORKFLOW (MANDATORY — FOLLOW IN ORDER)` | same name — steps renumbered 1–8 (new step 2 = library pre-flight) |
96
+ | `## SEARCH LOG (REQUIRED IN §11 APPENDIX)` | `## SEARCH LOG (deep profile, §11)` |
97
+ | `## EVIDENCE STRENGTH LABELS` / `## WHAT TO DO WHEN EVIDENCE IS INSUFFICIENT` | folded into `## NON-NEGOTIABLE QUALITY BAR (every profile)` |
98
+ | `## UPDATE AGENT MEMORY` + `# Persistent Agent Memory` boilerplate tail | compressed under `# Persistent Agent Memory` + module `SECTION=memory` |
99
+
10
100
  ## [coder v2.0.1] · [doc-reviewer v2.0.1] · [qa-sentinel v2.0.1] — 2026-07-03 (framework v5.0.1)
11
101
 
12
102
  Adversarial-verification fixes on the 3-layer restructuring (no H2 moved — overlays unaffected):
@@ -28,10 +28,10 @@ Quick-reference for all custom agents. Use this to route tasks to the right spec
28
28
  | **merge-conflict-resolver** | DevOps | Resolve the final-merge **code** conflicts OFF the orchestrator context. Auto-spawned by `/new` Phase 6 (and standalone `/mw`) ONLY when the deterministic `scripts/merge-worktree.sh` pauses with `status:code_conflict` — the script already resolved every additive doc/registry/JSONL conflict; this agent adjudicates the irreducible code/test hunks then lets the script land. Runs in a fresh isolated context so the conflict churn never re-enters the bloated end-of-batch orchestrator. Never spawned ad-hoc. | Additive-vs-semantic hunk judgment (semantic → STOP), `merge-worktree.sh --continue` rebase loop, anti-fabrication disk gate, COMPACT return | Yes — the **ONE bounded exception** to coder's "branches off-limits" rule: worktree-scoped, merge phase only, post-checks-passed; lands via the script, never hand-rolled git | git conflict resolution, `merge-worktree.sh --continue` |
29
29
  | **hybrid-ml-architect** | ML | Design/implement ML systems end-to-end | Recommender, ranking, embeddings | Yes | Model design, evaluation, monitoring |
30
30
  | **i18n-translator** | Localization | Translate user-facing labels into the maintained target languages (invoked by `/i18n` + the `i18n-align` routine). Gated on `features.has_i18n`. | Context-aware translation using the per-key registry context, ICU/placeholder preservation, glossary adherence; bounded "flag-not-guess" self-healing (`needs-attention`) | Yes (writes native locale files ONLY — never app code, never the registry) | Native locale files, optional bulk backends (lingo.dev/languine) |
31
- | **ui-expert** | Design | Design, implement, and review UI/UX | Mobile-first, accessibility, registry-first protocol gate (when `features.has_design_system: true`) — BLOCKING reads on `${paths.design_system}/INDEX.md` + `tokens-reference.md` + `components/<Name>.md` per `framework/agents/design-system-protocol.md`, Component Discovery cascade before any design | Yes (generates UI / HTML mockups in `ui-design` Step C; a separate fresh instance acts as design-quality evaluator in Step D) | ui-ux-pro-max, Playwright |
31
+ | **ui-expert** | Design | Design, implement, and review UI/UX | Mobile-first, accessibility, registry-first protocol gate (when `features.has_design_system: true`) — BLOCKING reads on `${paths.design_system}/INDEX.md` + `tokens-reference.md` + `components/<Name>.md` per `framework/agents/design-system-protocol.md`, Component Discovery cascade before any design | Yes (generates UI / HTML mockups in `ui-design` Step C.1; a separate fresh instance acts as the Step D conformance lens — design quality is judged by `ui-quality-critic`) | ui-design references (design-directions / craft-standards / anti-slop), Playwright |
32
32
  | **visual-fidelity-verifier** | Design | Compare an implemented UI route against its mockup (or design-system spec) and return a severity-tagged JSON report. Auto-invoked by `/e2e-review` skill (Phase 4) — never spawned ad-hoc. Stateless. Strict severity taxonomy (Critical / Major / Minor) — never reads source code (anti assertion-fitting bias), never edits, never declares done. Emits `data-state-mismatch` when the render is in the wrong data state. | Visual diff, severity taxonomy, design-system compliance check via registry cascade | No | Vision (multimodal), Read (screenshots + registry only), Playwright screenshots passed in by orchestrator |
33
33
  | **markup-fidelity-verifier** | Design | **Route-INDEPENDENT structural twin** of `visual-fidelity-verifier`: compare the implementation's code structure against the mockup expressed as code (`links.design` HTML or `links.design_src`/`mockups/_src/`) and return a severity-tagged JSON report — no browser, no auth, no data. Catches the 2-column-mockup → 1-column-build class of divergence (FEAT-0061). Auto-invoked by `/e2e-review` (Phase 2.7) — never spawned ad-hoc. Stateless. READS code (mockup-vs-impl, no assertion-fitting risk), never renders, never edits, never declares done. Same canonical severity taxonomy + JSON output as `visual-fidelity-verifier`. Fixes route to `ui-expert`. | Code-structural diff (DOM tree-edit-distance analogue), layout/grid/order/token-bypass, design-to-code fidelity | No | Read (mockup markup + implementation source) |
34
- | **ui-quality-critic** | Design | Judge the **intrinsic design quality** of an implemented UI screenshot against a scientific 10-dimension rubric (hierarchy, typographic & spacing rhythm, color/contrast, density, composition, states, motion, polish, brand) and return a severity-tagged JSON report + per-dimension scores. The design twin of `code-reviewer`; the fidelity complement of `visual-fidelity-verifier` (quality vs conformance — needs no mockup). Auto-invoked by `/e2e-review` (Phase 4b) — never spawned ad-hoc. Stateless, never reads source (anti assertion-fitting bias), never grades its own design, never edits, never declares done. Fixes route to `ui-expert`. Return Contract: JSON (already COMPACT). | Design-quality critique, rubric scoring, calibration anchors per dimension | No | Vision (multimodal), Read (screenshots + registry/guidelines only) |
34
+ | **ui-quality-critic** | Design | Judge the **intrinsic design quality** of a UI screenshot (implemented route or mockup option) against a scientific 10-dimension rubric (hierarchy, typographic & spacing rhythm, color/contrast, density, composition, states, motion, polish, brand) and return a severity-tagged JSON report + per-dimension scores. The design twin of `code-reviewer`; the fidelity complement of `visual-fidelity-verifier` (quality vs conformance — needs no mockup). Invoked by `/e2e-review` (Phase 4b) and `/ui-design` (Step D quality lens) — never spawned ad-hoc. Stateless, never reads source (anti assertion-fitting bias), never grades its own design, never edits, never declares done. Fixes route to `ui-expert`. Return Contract: JSON (already COMPACT). | Design-quality critique, rubric scoring, calibration anchors per dimension | No | Vision (multimodal), Read (screenshots + registry/guidelines only) |
35
35
  | **visual-designer** | Design | Generate visual assets via Kie.ai | Illustrations, icons, hero images | Yes | Kie.ai API, WebP optimization |
36
36
  | **motion-expert** | Design | Design animations and micro-interactions | Transitions, timing, easing | No | Animation specs, a11y fallbacks |
37
37
  | **hyper-gamification-designer** | Design | Analyze game features and retention mechanics | Progression, reward loops | No | MDA analysis, economy balance |
@@ -40,7 +40,7 @@ Quick-reference for all custom agents. Use this to route tasks to the right spec
40
40
  | **prd-card-writer** | Product | Generate atomic backlog cards from approved PRD; `MODE: apply-findings` = fresh-context applier of audit findings to card YAML (spawned by /prd Step 6.9, sonnet override) | Card YAML, traceability, parallel groups | Yes | Backlog writing, dependency analysis |
41
41
  | **onboarding-architect-lead** | Product | Design/improve user onboarding experiences | Activation flows, experiments | No | Onboarding research, metrics |
42
42
  | **website-orchestrator** | Product | Coordinate multi-agent website development | Project orchestration | No | Phase management, quality gates |
43
- | **senior-researcher** | Research | Comprehensive research on technical topics | Evidence-based analysis | Yes | Web search, citations |
43
+ | **senior-researcher** | Research | Evidence-based research reports; pass `PROFILE=<decision\|deep\|compare\|regulatory>` (agents/research-protocol.md); reports land in the research library (paths.research_dir) with a reuse pre-flight | Evidence-based analysis, research library | Yes | Web search, citations, library reuse |
44
44
  | **marketing-conversion-strategist** | Marketing | Create high-converting copy and messaging | Positioning, CTAs, copy | No | Business interview, copywriting |
45
45
  | **seo-analytics-strategist** | Marketing | Define SEO strategy, metadata, analytics | GA4/GTM, schema markup | No | Keyword research, event planning |
46
46
  | **api-perf-cost-auditor** | DevOps | Analyze APIs for performance/cost bottlenecks | Backend optimization, scaling | No | Bottleneck detection, cost analysis |
@@ -127,7 +127,7 @@ Visual assets needed? --> visual-designer
127
127
  Animation specs? --> motion-expert
128
128
  ML/ranking/recommendation? --> hybrid-ml-architect
129
129
  Gamification/retention? --> hyper-gamification-designer
130
- Research a technical topic? --> senior-researcher
130
+ Research a technical topic? --> senior-researcher (pass PROFILE=; interactive channel: /research skill)
131
131
  Marketing copy/positioning? --> marketing-conversion-strategist
132
132
  SEO/analytics planning? --> seo-analytics-strategist
133
133
  API performance audit? --> api-perf-cost-auditor
@@ -208,7 +208,7 @@ Use this table when spawning agents via the `Task` tool. The `model` field in ea
208
208
  | **prd-card-writer** | opus | — (always opus, effort: high) | Card precision requires deep reasoning for 20+ fields, traceability, parallel groups |
209
209
  | **ui-expert** | opus | — (always opus) | Design quality requires highest capability |
210
210
  | **hybrid-ml-architect** | opus | — (always opus) | ML architecture is complex by nature |
211
- | **senior-researcher** | opus | — (always opus) | Research depth requires strongest model |
211
+ | **senior-researcher** | sonnet | opus at orchestrator's discretion for `PROFILE=deep` surveys | Web-native retrieval + synthesis sonnet is sufficient and fast; depth comes from the profile loop (`DEPTH=`), not the model |
212
212
 
213
213
  **Rules**: Never use haiku for any **named specialist agent** in the matrix above. Opus for code writing and creative/complex work. Sonnet for analysis, review, and documentation. `qa-sentinel` stays on sonnet even though it is a mechanical gate runner — its failure interpretation and SCOPED-vs-FULL tiering benefit from sonnet.
214
214
 
@@ -4,7 +4,7 @@ description: "Write, modify, or refactor production code. For features, bugs, an
4
4
  model: opus
5
5
  effort: high
6
6
  color: red
7
- version: 2.0.1
7
+ version: 2.0.2
8
8
  ---
9
9
 
10
10
  > **YOLO MODE**: All agents spawned via the Task tool MUST use `mode: "bypassPermissions"`. No exceptions.
@@ -221,8 +221,8 @@ You MUST use these skills when applicable:
221
221
 
222
222
  ### `vercel-react-best-practices`
223
223
  React performance patterns (any React stack, Next.js included). When: writing React components, optimizing renders, async data, bundle size. Skill not installed (non-React stack / no plugin) → skip silently.
224
- ### `frontend-design`
225
- Production-grade frontend code with high design quality. When: building new UI components or complex layouts.
224
+ ### `ui-design` (references only — not the skill workflow)
225
+ Craft reference for presentational code you cannot delegate: Read `ui-design/references/craft-standards.md` (Performance Gates/CWV 2026, form quality, modern CSS). When: a mixed card touches UI-adjacent markup. Full UI work still routes to `ui-expert` per `AGENTS.md` § delegation — never build UI yourself. (The `frontend-design` skill is retired to a router since framework v5.2.0.)
226
226
  {{#deploy_vercel}}
227
227
  ### `vercel:deploy`
228
228
  Deploying to Vercel. When: the user requests deployment.
@@ -6,6 +6,7 @@ aliases:
6
6
  description: "Orchestrator for creating stunning Remotion animations with custom visual assets. Use when: creating animated videos, motion graphics, promotional videos, explainers, or any Remotion project requiring custom illustrations."
7
7
  model: sonnet
8
8
  color: magenta
9
+ version: 1.0.1
9
10
  ---
10
11
 
11
12
  You are the Remotion Animator Orchestrator, an expert in creating stunning animated videos by coordinating visual asset creation with programmatic animation implementation. You specialize in orchestrating multiple specialized agents to produce cohesive, visually distinctive video content.
@@ -35,7 +36,7 @@ You control the execution order for animation projects:
35
36
  3. **Asset Generation Phase** → Coordinate visual agents:
36
37
  - `ui-expert` → Design direction, typography, color systems
37
38
  - `visual-designer` → Illustrations, icons, backgrounds via image generation API
38
- - `frontend-design` → Animated React components, SVG illustrations as code
39
+ - `ui-expert` → Animated React components, SVG illustrations as code (craft reference: `ui-design/references/craft-standards.md`)
39
40
  4. **Implementation Phase** → Build Remotion compositions following `remotion-best-practices`
40
41
  5. **Refinement Phase** → Polish timing, transitions, visual coherence
41
42
 
@@ -51,7 +52,7 @@ You control the execution order for animation projects:
51
52
  **You DO NOT:**
52
53
  - Generate illustrations yourself (delegate to `visual-designer`)
53
54
  - Design UI layouts (delegate to `ui-expert` for direction)
54
- - Create complex React components from scratch (delegate to `frontend-design`)
55
+ - Create complex React components from scratch (delegate to `ui-expert`)
55
56
  - Skip the discovery phase - always understand requirements first
56
57
 
57
58
  ## Required Inputs
@@ -99,7 +100,7 @@ Animation intent:
99
100
  Invoke simultaneously:
100
101
  ├── visual-designer: Hero illustration
101
102
  ├── visual-designer: Background set
102
- └── frontend-design: Animated logo component
103
+ └── ui-expert: Animated logo component
103
104
  ```
104
105
 
105
106
  **Sequential** (when there are dependencies):