baldart 5.1.0 → 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.
- package/CHANGELOG.md +77 -0
- package/README.md +3 -3
- package/VERSION +1 -1
- package/framework/.claude/agents/CHANGELOG.md +45 -0
- package/framework/.claude/agents/REGISTRY.md +2 -2
- package/framework/.claude/agents/coder.md +3 -3
- package/framework/.claude/agents/remotion-animator-orchestrator.md +4 -3
- package/framework/.claude/agents/ui-expert.md +4 -10
- package/framework/.claude/agents/ui-quality-critic.md +27 -11
- package/framework/.claude/skills/design-system-init/CHANGELOG.md +5 -0
- package/framework/.claude/skills/design-system-init/SKILL.md +2 -2
- package/framework/.claude/skills/e2e-review/CHANGELOG.md +5 -0
- package/framework/.claude/skills/e2e-review/SKILL.md +2 -2
- package/framework/.claude/skills/frontend-design/CHANGELOG.md +20 -0
- package/framework/.claude/skills/frontend-design/SKILL.md +39 -216
- package/framework/.claude/skills/gamification-design/CHANGELOG.md +5 -0
- package/framework/.claude/skills/gamification-design/SKILL.md +2 -2
- package/framework/.claude/skills/ui-design/CHANGELOG.md +60 -1
- package/framework/.claude/skills/ui-design/SKILL.md +127 -75
- package/framework/.claude/skills/ui-design/references/anti-slop.md +106 -0
- package/framework/.claude/skills/ui-design/references/craft-standards.md +259 -0
- package/framework/.claude/skills/ui-design/references/design-brief.md +92 -0
- package/framework/.claude/skills/ui-design/references/design-directions.md +188 -0
- package/framework/.claude/skills/ui-design/references/evaluation.md +125 -165
- package/framework/.claude/skills/ui-design/references/generation.md +125 -92
- package/framework/.claude/skills/ui-design/references/inventory.md +9 -2
- package/framework/.claude/skills/ui-design/scripts/craft-check.mjs +248 -0
- package/framework/agents/component-manifest-schema.md +1 -1
- package/framework/agents/design-system-protocol.md +6 -6
- package/framework/agents/index.md +1 -0
- package/framework/agents/skills-mapping.md +25 -23
- package/framework/docs/PROJECT-CONFIGURATION.md +5 -5
- package/package.json +1 -1
- package/src/commands/configure.js +1 -1
- package/src/utils/__tests__/classify-divergence.test.js +42 -0
- package/src/utils/git.js +45 -9
|
@@ -1,171 +1,131 @@
|
|
|
1
|
-
# Evaluation
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
##
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- **Media complessiva >= 3.5** — sotto = FAIL
|
|
115
|
-
- **C1 (Context Fidelity) >= 3** — il mockup DEVE essere in-context
|
|
116
|
-
- **C3 (Design System) >= 3** quando `identity.design_philosophy` è impostato — DEVE rispettare la philosophy del progetto
|
|
117
|
-
|
|
118
|
-
L'overlay del progetto può aggiungere soglie più strette (es. C3 >= 4) — vedi `.baldart/overlays/ui-design.md` § Evaluation.
|
|
119
|
-
|
|
120
|
-
## Contrast Check (MUST — ZERO TOLERANCE)
|
|
121
|
-
|
|
122
|
-
Oltre ai 7 criteri, il valutatore DEVE eseguire un check contrasto:
|
|
123
|
-
|
|
124
|
-
- Per ogni elemento con `bg-*`, verificare che esista un `text-*` esplicito
|
|
125
|
-
- Se `features.multi_tenant_theming: true`: themed primary bg DEVE usare il text-token accoppiato per il tenant secondo la regola di pairing del progetto (vedi `${paths.design_system}/patterns/` o overlay)
|
|
126
|
-
- Ratio minimo: 4.5:1 testo normale, 3:1 testo grande
|
|
127
|
-
|
|
128
|
-
Violazione contrasto = FAIL indipendentemente dai punteggi.
|
|
129
|
-
|
|
130
|
-
## Formato Report di Valutazione
|
|
131
|
-
|
|
132
|
-
Salva in `/tmp/prd-design-<slug>/evaluation-report.md`:
|
|
1
|
+
# Evaluation — Step D: deterministic gate + two independent lenses
|
|
2
|
+
|
|
3
|
+
The generator never grades its own output. Step D runs three independent
|
|
4
|
+
checks per iteration; none of them is performed by the generating agent:
|
|
5
|
+
|
|
6
|
+
| # | Check | Who | What it judges |
|
|
7
|
+
|---|---|---|---|
|
|
8
|
+
| Gate 0 | `scripts/craft-check.mjs` | deterministic script | The mechanical anti-slop/craft subset — binary, zero model cost |
|
|
9
|
+
| Lens A | Design quality | **`ui-quality-critic`** agent (multimodal, per option) | *Is this good design?* — the 10-dimension Design Quality Rubric (SSOT: `framework/agents/design-system-protocol.md` § "Design Quality Rubric") |
|
|
10
|
+
| Lens B | Brief & context conformance | **fresh `ui-expert` instance** (NOT the generator) | *Is this the right design for THIS brief in THIS product?* — rubric below |
|
|
11
|
+
|
|
12
|
+
This split exists because a mockup can be beautiful and wrong (Lens B
|
|
13
|
+
catches it), correct and mediocre (Lens A catches it), or both and still
|
|
14
|
+
mechanically sloppy (Gate 0 catches it). Lens A uses a *different agent
|
|
15
|
+
definition* than the generator — real evaluator diversity, not just a fresh
|
|
16
|
+
context of the same taste (the self-grading antipattern, framework v4.61.0).
|
|
17
|
+
|
|
18
|
+
## Pipeline per iteration
|
|
19
|
+
|
|
20
|
+
1. **Gate 0 — craft-check (fail-fast).** Run
|
|
21
|
+
`node <skill_dir>/scripts/craft-check.mjs option-*.html [--strict-palette]`
|
|
22
|
+
(strict in exploration regime). Any blocker → straight back to the
|
|
23
|
+
generator with the JSON findings; do NOT spend model evaluation on a
|
|
24
|
+
mechanically failing option. Gate 0 output is **not shown to the lenses**
|
|
25
|
+
(they judge clean candidates without anchoring).
|
|
26
|
+
2. **Screenshot capture.** Playwright CLI headless (`webapp-testing` /
|
|
27
|
+
`playwright-skill`): per option, 1440×900 AND 375×812
|
|
28
|
+
(`viewport_role: mobile`). Capture the states strip too when present.
|
|
29
|
+
Read every screenshot you capture — a screenshot you didn't read doesn't
|
|
30
|
+
count.
|
|
31
|
+
3. **Lens A — `ui-quality-critic`, one spawn per option** (parallel where
|
|
32
|
+
the runtime allows; sequentially by name on Codex — spawn mapping per
|
|
33
|
+
`framework/agents/runtime-portability-protocol.md`). Payload (its input
|
|
34
|
+
contract, mockup-flavored):
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"card_id": "mockup:<slug>",
|
|
39
|
+
"route": "mockup:<slug>/option-<x>",
|
|
40
|
+
"viewport": { "width": 1440, "height": 900 },
|
|
41
|
+
"implementation_screenshot_path": "/tmp/prd-design-<slug>/shots/option-<x>-1440.png",
|
|
42
|
+
"states_screenshots": { "mobile": ".../option-<x>-375.png" },
|
|
43
|
+
"tolerance": "<features.e2e_review.fidelity_tolerance || 'balanced'>"
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Plus `design_system_index_path` / `tokens_reference_path` /
|
|
48
|
+
`ui_guidelines_path` when configured. It returns per-dimension scores +
|
|
49
|
+
severity-tagged findings (JSON).
|
|
50
|
+
4. **Lens B — fresh `ui-expert` instance** with the context screenshots, the
|
|
51
|
+
Design Read, the discovery excerpt, the reuse list, and the rubric below.
|
|
52
|
+
It reads the mockup screenshots AND the HTML source (Lens B is the
|
|
53
|
+
conformance reviewer — reading source is allowed here, unlike the critic).
|
|
54
|
+
5. **Merge + verdict** (orchestrator, criteria below). FAIL → one
|
|
55
|
+
consolidated, actionable feedback packet to the generator (findings only,
|
|
56
|
+
each with region anchor via `data-region` and a concrete fix hint).
|
|
57
|
+
Re-generate → re-evaluate. **Max 5 iterations per option**; after 5,
|
|
58
|
+
proceed with the best iteration and record residual findings honestly in
|
|
59
|
+
the report.
|
|
60
|
+
|
|
61
|
+
## Lens B rubric (mockup-specific, 1–5 each)
|
|
62
|
+
|
|
63
|
+
| Criterion | Judges | Hard floor |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| **B1 Context fidelity** *(in-context regime only)* | Shell (sidebar/header/nav) faithful to the real screenshots; new work visually native to the platform | ≥ 4 |
|
|
66
|
+
| **B2 Brief completeness** | Everything the discovery/brief scopes is present; required states rendered; no orphan interactive element (Functional Traceability, `design-system-protocol.md`); every `data-region` maps to scoped content | ≥ 3 |
|
|
67
|
+
| **B3 Integration clarity** | NEW/CHANGED markers present and precise; changed-page runs show the whole page | ≥ 3 |
|
|
68
|
+
| **B4 Direction execution** | The option executes ITS declared direction/hypothesis with conviction — judged against the C.0 Design Read, not against the evaluator's taste. A timid half-direction fails; deliberate restraint in product register does not | ≥ 3 |
|
|
69
|
+
| **B5 Copy & language** | Copy self-audit clean (`anti-slop.md` § Copy tells), correct `identity.language`, register-appropriate voice | ≥ 3 |
|
|
70
|
+
|
|
71
|
+
Scoring discipline (binding):
|
|
72
|
+
|
|
73
|
+
- **Cite evidence for every score** — "B1=3 because the sidebar collapses the
|
|
74
|
+
workspace switcher that exists in context-2.png" beats "feels off".
|
|
75
|
+
Numbers without evidence are rejected by the orchestrator.
|
|
76
|
+
- **The score is the worst sustained band, never the average-up.**
|
|
77
|
+
- **No grade inflation**: 4 means strong, not acceptable.
|
|
78
|
+
- **Don't punish appropriate conservatism** (product register earns
|
|
79
|
+
familiarity; see `design-brief.md` § Register).
|
|
80
|
+
- **Don't invent defects to demonstrate iteration.** A confident "first pass
|
|
81
|
+
clean, shipping" beats a fake fix.
|
|
82
|
+
|
|
83
|
+
## Verdict (per option)
|
|
84
|
+
|
|
85
|
+
**PASS** requires ALL of:
|
|
86
|
+
|
|
87
|
+
1. Gate 0: zero blockers (warnings are allowed but listed in the report).
|
|
88
|
+
2. Lens A: `quality_score ≥ 0.70`, zero `critical` findings, and the
|
|
89
|
+
color/contrast dimension carries no `major`+ finding (contrast is
|
|
90
|
+
zero-tolerance — it also surfaces via Gate 0 and B1).
|
|
91
|
+
3. Lens B: every criterion ≥ its hard floor.
|
|
92
|
+
|
|
93
|
+
Anything else → FAIL with the consolidated feedback packet.
|
|
94
|
+
|
|
95
|
+
## Degraded mode (no multimodal lens available)
|
|
96
|
+
|
|
97
|
+
On a runtime where screenshots cannot be judged visually (e.g. a
|
|
98
|
+
non-multimodal Codex session), do not fake the lenses:
|
|
99
|
+
|
|
100
|
+
- Run Gate 0 (unchanged — it is deterministic).
|
|
101
|
+
- Replace Lens A+B with a **source-level review** by a fresh `ui-expert`
|
|
102
|
+
instance against `craft-standards.md` + `anti-slop.md` + the Design Read
|
|
103
|
+
(token compliance, structure, states presence, copy audit — everything
|
|
104
|
+
legible from HTML).
|
|
105
|
+
- Prefix the report AND the user presentation with the mandatory banner:
|
|
106
|
+
`⚠️ DEGRADED: source-level evaluation only (no visual lens) — review the
|
|
107
|
+
options visually in the browser before choosing.`
|
|
108
|
+
|
|
109
|
+
A silent degraded evaluation is a failed evaluation.
|
|
110
|
+
|
|
111
|
+
## Report format
|
|
112
|
+
|
|
113
|
+
Save to `/tmp/prd-design-<slug>/evaluation-report.md`:
|
|
133
114
|
|
|
134
115
|
```markdown
|
|
135
|
-
# Evaluation Report — <slug>
|
|
116
|
+
# Evaluation Report — <slug> · iteration N · <date>
|
|
136
117
|
|
|
137
|
-
|
|
138
|
-
|
|
118
|
+
## Option A — <direction name>
|
|
119
|
+
- Gate 0: PASS (2 warnings: off-scale-spacing ×1, img-no-dimensions ×1)
|
|
120
|
+
- Lens A (ui-quality-critic): quality_score 0.81 — findings: [1 major: spacing]
|
|
121
|
+
- Lens B: B1 4 · B2 4 · B3 5 · B4 4 · B5 4 (evidence per score)
|
|
122
|
+
- **Verdict: PASS**
|
|
139
123
|
|
|
140
|
-
## Option
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|----------|-------|------|
|
|
144
|
-
| C1 Context Fidelity | X/5 | ... |
|
|
145
|
-
| C2 Layout & Spacing | X/5 | ... |
|
|
146
|
-
| C3 Design System | X/5 | ... |
|
|
147
|
-
| C4 Typography | X/5 | ... |
|
|
148
|
-
| C5 Completeness | X/5 | ... |
|
|
149
|
-
| C6 Integration Clarity | X/5 | ... |
|
|
150
|
-
| C7 Polish | X/5 | ... |
|
|
151
|
-
| **Media** | **X.X/5** | |
|
|
152
|
-
| Contrast Check | PASS/FAIL | ... |
|
|
153
|
-
|
|
154
|
-
**Verdetto: PASS / FAIL**
|
|
155
|
-
Feedback per il generatore: [se FAIL, cosa correggere specificamente]
|
|
156
|
-
|
|
157
|
-
## Option B — ...
|
|
158
|
-
(stessa struttura)
|
|
159
|
-
|
|
160
|
-
## Option C — ...
|
|
161
|
-
(stessa struttura)
|
|
124
|
+
## Option B — …
|
|
125
|
+
- **Verdict: FAIL** → feedback packet: [each finding: region, expected,
|
|
126
|
+
actual, fix hint]
|
|
162
127
|
```
|
|
163
128
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
2. Valutatore li apre in Playwright, screenshot, valuta.
|
|
168
|
-
3. Se FAIL: report con feedback → torna al generatore.
|
|
169
|
-
4. Se PASS: report finale → si procede con presentazione all'utente.
|
|
170
|
-
5. **Max 5 iterazioni per opzione.** Se ancora sotto soglia dopo 5, procedi con
|
|
171
|
-
la versione migliore e annota i problemi residui nel report.
|
|
129
|
+
The report is internal quality control: per the presentation rule (SKILL.md
|
|
130
|
+
Step E) the user sees the options WITHOUT scores, rankings, or
|
|
131
|
+
recommendations — except the DEGRADED banner, which is always surfaced.
|
|
@@ -1,72 +1,52 @@
|
|
|
1
|
-
# Generation
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Regole di Generazione dei 3 Mockup
|
|
52
|
-
|
|
53
|
-
Produce 3 file HTML distinti con approcci di design diversi.
|
|
54
|
-
|
|
55
|
-
### Requisiti obbligatori per ogni file
|
|
56
|
-
|
|
57
|
-
- **In-context**: ogni file DEVE includere lo shell UI esistente (sidebar, header, nav) che circonda l'area della feature. Riprodurre fedelmente il chrome della piattaforma basandosi sugli screenshot catturati.
|
|
58
|
-
- **Contenuto nuovo nell'area principale**: chiaramente distinguibile dal chrome esistente.
|
|
59
|
-
- **Stili reali**: usa gli stili dei componenti visibili negli screenshot (border radius, shadow style, button style, card style, colori, spacing).
|
|
60
|
-
- **Pagina esistente modificata**: se la feature modifica una pagina esistente, mostra la pagina INTERA con le modifiche evidenziate (bordo tratteggiato attorno ai nuovi elementi).
|
|
61
|
-
- **Self-contained**: CSS inline, Tailwind CDN, nessuna dipendenza esterna.
|
|
62
|
-
- **Nomi file**: `option-a.html`, `option-b.html`, `option-c.html`.
|
|
63
|
-
- **Rationale**: commento HTML in cima a ogni file che spiega l'approccio e come si integra con la UI esistente.
|
|
64
|
-
- **Design philosophy**: applica `identity.design_philosophy` (es. "Neo-Brutalism", "Minimalist", "Glassmorphism") come definito in `${paths.ui_guidelines}` e nell'overlay del progetto. Se `design_philosophy` è vuoto, mantieni uno stile neutro coerente con gli screenshot.
|
|
65
|
-
- **Lingua**: usa `identity.language` (BCP-47) per tutti i testi UI. Default `en` se non impostato.
|
|
66
|
-
- **Marker**: segna aree nuove/cambiate con label floating in lingua del progetto, es. `NUOVO`/`MODIFICATO` (it) o `NEW`/`CHANGED` (en).
|
|
67
|
-
- **3 differenze significative**: le opzioni devono differire in layout, gerarchia o pattern di interazione — non solo in colori.
|
|
68
|
-
|
|
69
|
-
### Scheletro HTML minimo
|
|
1
|
+
# Generation — rules for the Generator (Step C.1)
|
|
2
|
+
|
|
3
|
+
How to produce the mockup prototypes. The generator (the `ui-expert` agent,
|
|
4
|
+
spawned per `AGENTS.md` § delegation) creates the options; it NEVER evaluates
|
|
5
|
+
its own output — evaluation belongs to Step D
|
|
6
|
+
([evaluation.md](evaluation.md)).
|
|
7
|
+
|
|
8
|
+
> Paths and stylistic identity resolve from `baldart.config.yml`
|
|
9
|
+
> (`framework/agents/project-context.md` § 4). Project-specific mandates live
|
|
10
|
+
> in `.baldart/overlays/ui-design.md`.
|
|
11
|
+
|
|
12
|
+
## Prerequisites (all BLOCKING)
|
|
13
|
+
|
|
14
|
+
1. Step C.0 completed — the Design Read is locked
|
|
15
|
+
([design-brief.md](design-brief.md)) and each option has its assigned
|
|
16
|
+
direction (exploration) or layout/IA hypothesis (in-context).
|
|
17
|
+
2. [craft-standards.md](craft-standards.md) and [anti-slop.md](anti-slop.md)
|
|
18
|
+
read — they are binding on every line of markup you write.
|
|
19
|
+
3. Component Discovery cascade completed
|
|
20
|
+
([component-discovery.md](component-discovery.md)) — the reuse list is the
|
|
21
|
+
authority on what exists.
|
|
22
|
+
4. Context screenshots captured (Step B) for in-context runs.
|
|
23
|
+
|
|
24
|
+
## Filesystem rule (ABSOLUTE)
|
|
25
|
+
|
|
26
|
+
Every HTML file MUST be written to disk with the `Write` tool at
|
|
27
|
+
`/tmp/prd-design-<slug>/option-<x>.html` BEFORE being opened in a browser or
|
|
28
|
+
screenshotted. Inline code blocks are not a deliverable: not verifiable, not
|
|
29
|
+
openable, not shareable.
|
|
30
|
+
|
|
31
|
+
## Token-first scaffold
|
|
32
|
+
|
|
33
|
+
The mockup must speak the project's token language — this is what makes the
|
|
34
|
+
downstream implement step (`/ui-implement`) near-1:1, exactly like a Claude
|
|
35
|
+
Design mockup authored against the project's tokens.
|
|
36
|
+
|
|
37
|
+
- **`features.has_design_system: true`**: extract the real tokens (colors,
|
|
38
|
+
spacing, radius, shadows, type) from `${paths.design_system}/tokens-reference.md`
|
|
39
|
+
/ `${paths.global_styles}` and embed them as CSS custom properties in a
|
|
40
|
+
`:root` block at the top of each file. Style the mockup THROUGH those
|
|
41
|
+
variables — a value that bypasses an existing token is a defect
|
|
42
|
+
(`DS_TOKENS_DRIFT`).
|
|
43
|
+
- **No design system**: define the option's direction tokens in `:root` with
|
|
44
|
+
**semantic names** (`--accent`, `--surface-2`, `--fg-muted` — never
|
|
45
|
+
`--blue-500`), derived from the chosen direction in
|
|
46
|
+
[design-directions.md](design-directions.md). This makes the option's
|
|
47
|
+
palette auditable and portable.
|
|
48
|
+
|
|
49
|
+
Scaffold skeleton:
|
|
70
50
|
|
|
71
51
|
```html
|
|
72
52
|
<!DOCTYPE html>
|
|
@@ -74,36 +54,89 @@ Produce 3 file HTML distinti con approcci di design diversi.
|
|
|
74
54
|
<head>
|
|
75
55
|
<meta charset="UTF-8">
|
|
76
56
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
77
|
-
<title>UI Design — <Feature
|
|
57
|
+
<title>UI Design — <Feature> — Option <X>: <direction name></title>
|
|
78
58
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
79
59
|
<style>
|
|
80
|
-
|
|
60
|
+
:root { /* project tokens OR direction tokens — see above */ }
|
|
81
61
|
</style>
|
|
82
62
|
</head>
|
|
83
63
|
<body>
|
|
84
|
-
<!--
|
|
85
|
-
|
|
64
|
+
<!--
|
|
65
|
+
OPTION <X> — <direction / layout hypothesis name>
|
|
66
|
+
Design Read: <the locked one-liner from C.0>
|
|
67
|
+
Reuses: <components from discovery> · New: <proposed primitives>
|
|
68
|
+
Deliberate overrides of anti-slop bans (if any): <name them, or "none">
|
|
69
|
+
-->
|
|
70
|
+
...
|
|
86
71
|
</body>
|
|
87
72
|
</html>
|
|
88
73
|
```
|
|
89
74
|
|
|
90
|
-
##
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
75
|
+
## Structural rules (every file)
|
|
76
|
+
|
|
77
|
+
- **`data-region` on every distinct region** (`<section data-region="order-list">`,
|
|
78
|
+
`data-region="filters-bar"`). This is the join key used by iteration
|
|
79
|
+
feedback ("change the filters-bar"), by the Step G inventory, and by
|
|
80
|
+
`/prd` Component Reconciliation → `component_bindings`. Region names are
|
|
81
|
+
stable across options and iterations.
|
|
82
|
+
- **In-context runs**: reproduce the existing UI shell (sidebar, header, nav)
|
|
83
|
+
faithfully from the context screenshots — the platform chrome frames the
|
|
84
|
+
new work. New/changed areas are clearly marked with a floating label in the
|
|
85
|
+
project language (`NUOVO`/`MODIFICATO` for `it`, `NEW`/`CHANGED` for `en`).
|
|
86
|
+
If the feature modifies an existing page, show the WHOLE page with changes
|
|
87
|
+
outlined (dashed border).
|
|
88
|
+
- **Self-contained**: inline CSS (+ Tailwind CDN), no build step. External
|
|
89
|
+
requests limited to fonts, Tailwind CDN, and image sources listed below.
|
|
90
|
+
- **Responsive by construction**: the evaluator screenshots 1440px AND 375px
|
|
91
|
+
(`viewport_role: mobile`, framework v4.71). Use fluid grids
|
|
92
|
+
(`auto-fit/minmax`), container-friendly layouts, `min-h-[100dvh]`. A mockup
|
|
93
|
+
that collapses at 375px FAILS evaluation — design it, don't hope.
|
|
94
|
+
- **Three genuinely different options**: exploration regime → three different
|
|
95
|
+
named directions; in-context regime → three different layout / hierarchy /
|
|
96
|
+
interaction structures. Color-only variations are a FAIL.
|
|
97
|
+
|
|
98
|
+
## Content discipline (real content, no slop)
|
|
99
|
+
|
|
100
|
+
- **Copy is real**: written in `identity.language`, plausible for the domain,
|
|
101
|
+
audience-correct. Run the Copy Self-Audit (`anti-slop.md` § Copy tells)
|
|
102
|
+
before handing off. Realistic data, not `99.9%` (the Jane Doe rule).
|
|
103
|
+
**When `features.has_i18n: true`** the copy is a realistic *placeholder,
|
|
104
|
+
never the final string* — externalization happens at implement time
|
|
105
|
+
(`framework/agents/i18n-protocol.md`); the mockup is throwaway.
|
|
106
|
+
- **Images are real or honestly absent** — in priority order: (1) actual
|
|
107
|
+
project assets; (2) generated assets via the `visual-designer` agent /
|
|
108
|
+
`kie-ai` skill when configured; (3) seeded placeholders
|
|
109
|
+
`https://picsum.photos/seed/<descriptive-seed>/<w>/<h>`; (4) a labelled
|
|
110
|
+
placeholder block + one line telling the user what asset is needed.
|
|
111
|
+
**Verify every remote URL you didn't construct** — a guessed URL that 404s
|
|
112
|
+
ships as a broken image. Even minimalist pages need real imagery: a
|
|
113
|
+
pure-text page is not minimalism, it is incomplete work.
|
|
114
|
+
- **Logos**: real SVG marks (e.g. `https://cdn.simpleicons.org/<slug>`),
|
|
115
|
+
never text wordmarks styled to look like logos.
|
|
116
|
+
- **Icons**: monoline SVG (1.6–1.8px stroke) with `currentColor` — never
|
|
117
|
+
emoji.
|
|
118
|
+
- **States are content**: the primary surface of each option shows the
|
|
119
|
+
populated state; key components additionally show the states that carry
|
|
120
|
+
design decisions (empty / loading / error at minimum — the full 8-state
|
|
121
|
+
taxonomy in `craft-standards.md` § States). Render them inline (a states
|
|
122
|
+
strip below the main canvas is acceptable) so the evaluator and the
|
|
123
|
+
inventory can see them.
|
|
124
|
+
- **Section rhythm**: a section earns its place with a short headline
|
|
125
|
+
(≤ 8 words) + short support (≤ 25 words) + one visual OR one CTA. No data
|
|
126
|
+
dumps, no decoration-only sections.
|
|
127
|
+
|
|
128
|
+
## Generator self-check (before submitting to Step D)
|
|
129
|
+
|
|
130
|
+
Run the deterministic gate yourself and fix every blocker — do not spend the
|
|
131
|
+
evaluator's pass on mechanical failures:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
node <skill_dir>/scripts/craft-check.mjs /tmp/prd-design-<slug>/option-*.html \
|
|
135
|
+
[--strict-palette] # exploration regime only
|
|
136
|
+
```
|
|
104
137
|
|
|
105
|
-
|
|
106
|
-
2
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
138
|
+
Then re-read each file once against the Pre-Flight essentials: hero fits the
|
|
139
|
+
viewport · H1 ≤ 2 lines · one spacing scale · accent ≤ 2 visible uses ·
|
|
140
|
+
every `bg-*` has its `text-*` · states present · copy self-audited · every
|
|
141
|
+
anti-slop override declared in the rationale comment. If a box cannot be
|
|
142
|
+
honestly ticked, the option is not done — fix it before handing off.
|
|
@@ -12,7 +12,10 @@ Dopo che l'utente ha approvato un'opzione di design (Step 3d nel workflow).
|
|
|
12
12
|
## Come produrlo
|
|
13
13
|
|
|
14
14
|
1. Apri il `design.html` approvato.
|
|
15
|
-
2.
|
|
15
|
+
2. Cammina le annotazioni `data-region` (ogni regione distinta del mockup ne
|
|
16
|
+
porta una — regola di generazione, v2.0.0) e dentro ciascuna identifica
|
|
17
|
+
OGNI elemento UI distinto. Le regioni sono la join key verso i
|
|
18
|
+
`component_bindings` della card (`agents/card-schema.md`).
|
|
16
19
|
3. Produci l'inventario strutturato nel formato sotto.
|
|
17
20
|
|
|
18
21
|
## Formato
|
|
@@ -65,5 +68,9 @@ Source: ${paths.prd_dir}/<slug>/design.html (option <X>, approved <date>)
|
|
|
65
68
|
## Artefatti prodotti
|
|
66
69
|
|
|
67
70
|
1. Copia l'HTML approvato in `${paths.prd_dir}/<slug>/design.html`.
|
|
68
|
-
2. Aggiorna il state file del PRD con l'inventario
|
|
71
|
+
2. Aggiorna il state file del PRD con l'inventario + il Design Read
|
|
72
|
+
dell'opzione scelta (direzione, register, dial — alimenta la rotation rule
|
|
73
|
+
della prossima esplorazione). **Run standalone** (nessun state file PRD):
|
|
74
|
+
scrivi inventario + Design Read in `<design-dir>/design-session.md`
|
|
75
|
+
accanto a `design.html`.
|
|
69
76
|
3. Pulisci `/tmp/prd-design-<slug>/`.
|