baldart 4.76.1 → 4.78.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 +42 -0
- package/README.md +14 -13
- package/VERSION +1 -1
- package/framework/.claude/agents/REGISTRY.md +2 -1
- package/framework/.claude/agents/markup-fidelity-verifier.md +239 -0
- package/framework/.claude/agents/prd-card-writer.md +6 -1
- package/framework/.claude/agents/visual-fidelity-verifier.md +22 -0
- package/framework/.claude/skills/design-system-init/SKILL.md +16 -6
- package/framework/.claude/skills/design-system-init/scripts/compile-ds-cards.mjs +2 -1
- package/framework/.claude/skills/design-system-init/scripts/extract-manifest.mjs +17 -5
- package/framework/.claude/skills/design-system-init/scripts/extract-ts.mjs +302 -0
- package/framework/.claude/skills/design-system-init/scripts/render-manifest.mjs +26 -9
- package/framework/.claude/skills/design-system-init/scripts/serialize-spec.mjs +4 -2
- package/framework/.claude/skills/ds-edit/SKILL.md +2 -1
- package/framework/.claude/skills/ds-new/SKILL.md +2 -2
- package/framework/.claude/skills/e2e-review/SKILL.md +196 -27
- package/framework/.claude/skills/new/references/codex-gate.md +15 -1
- package/framework/.claude/skills/new/references/completeness.md +2 -0
- package/framework/.claude/skills/new/references/review-cycle.md +14 -1
- package/framework/agents/component-manifest-schema.md +24 -3
- package/framework/agents/design-system-protocol.md +79 -1
- package/framework/docs/COMPONENT-MANIFEST-LAYER.md +6 -3
- package/framework/templates/component-spec.template.md +3 -2
- package/framework/templates/overlays/e2e-review.fidelity-example.md +74 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
base_skill: e2e-review
|
|
3
|
+
base_skill_version: 4.78.0
|
|
4
|
+
mode: extend
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# e2e-review — fidelity-app overlay (example)
|
|
8
|
+
|
|
9
|
+
> Project-specific **reach-state recipes** for `/e2e-review` Phase 3.8. The framework
|
|
10
|
+
> owns the contract and the bounded loop; this overlay tells the orchestrator HOW to put
|
|
11
|
+
> the app into the data state a mockup depicts, so the visual reviewer never compares a
|
|
12
|
+
> degenerate (empty / wrong-tenant / error) render. Drop into
|
|
13
|
+
> `.baldart/overlays/e2e-review.md` and adapt to your stack.
|
|
14
|
+
>
|
|
15
|
+
> Without these recipes `/e2e-review` falls back to generic remediation (real auth from
|
|
16
|
+
> the persona creds, MSW/API-mock, deterministic factory/snapshot, heuristic context
|
|
17
|
+
> auto-seek) and, failing that, **blocks** with `coverage-gap` — it never silently passes
|
|
18
|
+
> an empty render.
|
|
19
|
+
|
|
20
|
+
## [APPEND] Reach-state recipes
|
|
21
|
+
|
|
22
|
+
The orchestrator runs the applicable recipes in order until `render_health.degenerate`
|
|
23
|
+
is false. Each recipe is a named, deterministic sequence of steps the orchestrator can
|
|
24
|
+
execute via Playwright / `webapp-testing` / a project script. Cap: 2 attempts.
|
|
25
|
+
|
|
26
|
+
### `seed_data` — populate the database for the route
|
|
27
|
+
|
|
28
|
+
Run before navigating, when the route shows an empty-state because the demo/CI database
|
|
29
|
+
is empty:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Example: seed a deterministic dataset the mockup depicts (idempotent).
|
|
33
|
+
npm run db:seed:e2e # creates store "demo" + ≥3 products + 1 supplier
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
State guarantee: after this, `/products` renders a populated table matching the mockup's
|
|
37
|
+
DATI PRODOTTO / FORNITORI sections. The seed MUST be deterministic (fixed ids, no
|
|
38
|
+
faker-without-seed) so screenshots are reproducible.
|
|
39
|
+
|
|
40
|
+
### `select_populated_context` — the multi-store / multi-tenant case
|
|
41
|
+
|
|
42
|
+
When the default-selected store/tenant is empty but another has data (the exact failure
|
|
43
|
+
the user flagged): switch context to a populated one before screenshotting.
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
1. Authenticate as the owner persona (test_plan.test_credentials).
|
|
47
|
+
2. Open the store switcher: getByRole("button", { name: /store|negozio/i }).
|
|
48
|
+
3. Pick the first store whose product count > 0 (the seeded "demo" store), NOT the
|
|
49
|
+
default empty one.
|
|
50
|
+
4. Wait for networkidle, then proceed to the route.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Heuristic fallback (no explicit list): enumerate the switcher options, navigate the route
|
|
54
|
+
under each, and pick the first that yields non-empty content (the verifier confirms
|
|
55
|
+
non-emptiness). This is the generic `webapp-testing` auto-seek.
|
|
56
|
+
|
|
57
|
+
### `goto_populated_entity` — detail routes that need a specific id
|
|
58
|
+
|
|
59
|
+
When the mockup depicts a specific entity (e.g. a product detail), navigate to a seeded
|
|
60
|
+
entity id rather than a random/empty one:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Navigate to `/products?selected=<seeded-product-id>&edit=1` (the id created by
|
|
64
|
+
`seed_data`), not the bare `/products`.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## [APPEND] Notes
|
|
68
|
+
|
|
69
|
+
- Recipes are tried in the order above (`seed_data` → `select_populated_context` →
|
|
70
|
+
`goto_populated_entity`); a recipe that does not apply to a route is a no-op.
|
|
71
|
+
- Keep recipes **deterministic and idempotent** — they run inside the bounded reach-state
|
|
72
|
+
loop and may be re-invoked across self-heal iterations.
|
|
73
|
+
- A recipe MUST NOT mutate production data: scope to the e2e/demo database the dev server
|
|
74
|
+
uses. The framework's contract assumes an isolated test database.
|