baldart 4.78.2 → 4.79.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 +19 -0
- package/README.md +2 -2
- package/VERSION +1 -1
- package/framework/.claude/skills/ds-handoff/SKILL.md +183 -0
- package/framework/.claude/skills/ds-handoff/assets/claude-design-handoff-prompt.template.md +197 -0
- package/framework/.claude/skills/ds-handoff/references/coverage-gate.md +109 -0
- package/framework/.claude/skills/ds-handoff/references/field-extraction.md +78 -0
- package/framework/.claude/skills/prd/references/ui-design-phase.md +33 -18
- package/framework/agents/skills-mapping.md +409 -7
- package/package.json +1 -1
- package/framework/.claude/skills/prd/assets/claude-design-handoff-prompt.template.md +0 -137
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@ 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.79.0] - 2026-06-29
|
|
9
|
+
|
|
10
|
+
**New skill `/ds-handoff` — the field-level, 1:1 Claude Design handoff brief.** When `/prd` reached the "hand off to Claude Design" branch, the prompt it produced described each screen only coarsely — *purpose / states / actions / data shown* — and never the exact fields. With no field-level contract, Claude Design **imagines** control types, required-ness, validation, defaults and enum values to cover the gap, so the result is never 1:1. The root cause: BALDART had **no mandatory phase** that enumerated a screen's real fields, and **no coverage gate** verifying them before the prompt was emitted (field discovery was manual discovery-questions). `/ds-handoff` fixes this end-to-end: it (1) identifies each screen's backing data entities, (2) **grounds the field inventory in the project's real schemas** (Zod / TS types / form schemas) by composing existing retrieval (code-graph → LSP → `codebase-architect` → Grep — **no new AST/Zod parser**, an over-scoped fragility the design refused), (3) reconciles fields↔screens (which fields show / are editable / group into which card), (4) runs a **coverage gate** that **BLOCKS** emission in interactive mode when a backed screen's `{control, required}` are unverified — degrading gracefully to user-confirmation when no formal schema exists (portable / Codex), (5) renders the **mandatory field-level template** (a 9-column field-inventory table per screen + actions / states / responsive). It becomes the **single SSOT** for the Claude Design prompt: `/prd` Step 3.0 Branch B now **delegates** to it (graceful inline-coarse fallback when the skill is unavailable), and the old inline `/prd` template is **retired**. Usable standalone via `/ds-handoff <screens-or-feature>` (e.g. an ad-hoc orchestrator + `ui-expert` run). A THIN orchestrator — it **cites** `design-system-protocol.md` (Functional Traceability Gate `backed/decorative/orphan` vocabulary + Reference Tables numbers) and **reads** `discovery-phase.md`'s `mockup_analysis` as input, never duplicating their rules (no dual-SSOT).
|
|
11
|
+
|
|
12
|
+
**MINOR** — new skill (40 portable skills). **No new `baldart.config.yml` key** — rides on the already-present `features.has_design_system` (BLOCKING gate; REFUSE + suggest `/design-system-init` when `false`) + `features.has_prd_workflow` when delegated, so the schema-change propagation rule does NOT apply. Claude + Codex portable (the gate degrades, subagent steps fall back to Grep). No agent / template / routine outside the skill changed; `discovery-phase.md` (`mockup_analysis`) and `card-schema.md` (`component_bindings`) are deliberately **untouched** (the field layer is a skill-local artifact, not a card/state schema field).
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`/ds-handoff`** (`framework/.claude/skills/ds-handoff/`) — `SKILL.md` (thin 8-step orchestrator), `assets/claude-design-handoff-prompt.template.md` (the mandatory field-level template — replaces the retired `/prd` coarse template), `references/field-extraction.md` (retrieval order + control-type mapping table + readonly detection), `references/coverage-gate.md` (BLOCK-vs-degrade logic + the worked "Fornitori" example). Gated on `features.has_design_system`.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **`/prd`** (`framework/.claude/skills/prd/references/ui-design-phase.md`) — Step 3.0 Branch B now **delegates** the Claude Design handoff prompt to `/ds-handoff` (passing the resolved context so it skips its own screen-resolution), presents what it returns, and persists `mockups.field_inventory_path`. Graceful **inline-coarse fallback** (stated explicitly) when `/ds-handoff` is unavailable.
|
|
21
|
+
- **`framework/agents/skills-mapping.md`** — expanded from a curated 11-skill subset to the **full 40-skill routing map** (Design System, Internationalization, Retrieval/Toolchain Bootstrap, Framework Maintenance categories added; per-entry `features.*` gating noted; decision tree + chains updated with the design-system + Claude-Design-handoff flows), so the routing doc the agent reads covers every shipped skill including `ds-handoff`.
|
|
22
|
+
|
|
23
|
+
### Removed
|
|
24
|
+
|
|
25
|
+
- **`framework/.claude/skills/prd/assets/claude-design-handoff-prompt.template.md`** — the coarse `/prd` handoff template, superseded by the field-level template in `ds-handoff/assets/` (single SSOT; coarse content survives inline in the Branch B fallback).
|
|
26
|
+
|
|
8
27
|
## [4.78.2] - 2026-06-29
|
|
9
28
|
|
|
10
29
|
**The "visual-verify every `ui-expert` intervention" hard rule was investigated and deliberately NOT built.** The ask sounded obvious — wire an invariant `UI_VISUAL_UNVERIFIED` forcing a visual check after every `ui-expert` implementation. Three adversarial reviewers (distinct lenses) refuted the diagnosis: (1) standalone skills already verify — `/ui-design` has its generator/evaluator Playwright loop, `/ds-new` + `/ds-edit` delegate to `ui-expert`'s own BLOCKING pre-work + `ds-gate` + the coherence report, `/ds-render` feeds `/e2e-review` Phase 4b; (2) the invariant would be redundant with the existing `DS_*` coherence codes + the `coverage-gap` finding, and would fire **constantly** on every Storybook-less project — the gate-with-no-exit structural false-positive the framework explicitly avoids — plus risk the assertion-fitting the verifier trio forbids; (3) the real driver the obvious diagnosis missed: **visual verification is deliberately deferred to where a ground-truth exists** (a composed route / a mockup) — an inert scaffolded primitive has nothing to be judged against, so verifying it *now* judges the void. The single useful residue (a deterministic `PostToolUse` hook would beat prose if one ever wanted to harden `/new`'s own prose-driven Phase 2.6) was logged, not built. So this release ships only the **zero-cost, non-regressive nudge**: a documentation pointer making explicit *where* route-level fidelity lives.
|
package/README.md
CHANGED
|
@@ -212,14 +212,14 @@ Skills always-ask when required keys are missing — never silently default.
|
|
|
212
212
|
never overwrites your file. Full guide:
|
|
213
213
|
[`framework/docs/PROJECT-CONFIGURATION.md`](framework/docs/PROJECT-CONFIGURATION.md).
|
|
214
214
|
|
|
215
|
-
### Skills (
|
|
215
|
+
### Skills (40 portable skills)
|
|
216
216
|
|
|
217
217
|
Skills live under `.claude/skills/` and are auto-discovered by Claude Code.
|
|
218
218
|
Bundled skills:
|
|
219
219
|
|
|
220
220
|
- **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`
|
|
221
221
|
- **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)
|
|
222
|
-
- **Design**: `frontend-design`, `ui-design`, `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)
|
|
222
|
+
- **Design**: `frontend-design`, `ui-design`, `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`)
|
|
223
223
|
- **Product**: `seo-audit`, `copywriting`, `api-design-principles`
|
|
224
224
|
- **Knowledge**: `doc-writing-for-rag`, `capture` (LLM wiki overlay)
|
|
225
225
|
- **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`
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.79.0
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ds-handoff
|
|
3
|
+
effort: medium
|
|
4
|
+
description: >
|
|
5
|
+
Produce a FIELD-LEVEL, 1:1, interaction-complete handoff brief for Claude Design
|
|
6
|
+
— every screen's real fields (label, control type, required, validation, default,
|
|
7
|
+
enum source, helper text, editable-vs-readonly), grounded in the project's actual
|
|
8
|
+
data schemas (Zod / TS types / form schemas) via a coverage gate that BLOCKS prompt
|
|
9
|
+
emission when a backed screen's fields are unverified. The single SSOT for the
|
|
10
|
+
Claude Design handoff prompt: `/prd` Step 3.0 Branch B delegates here; usable
|
|
11
|
+
standalone via `/ds-handoff <screens-or-feature>`. A THIN orchestrator — cites
|
|
12
|
+
`design-system-protocol.md` (Functional Traceability Gate, Reference Tables) and
|
|
13
|
+
reads `mockup_analysis` as input, never duplicating their rules; reuses existing
|
|
14
|
+
retrieval (code-graph / LSP / codebase-architect / Grep) rather than shipping a
|
|
15
|
+
schema-extractor tool. Use when the user says /ds-handoff, "handoff a Claude
|
|
16
|
+
Design", "prompt per Claude Design", "brief field-level", "prepara il prompt
|
|
17
|
+
mockup". Gated on features.has_design_system.
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# DS Handoff — field-level Claude Design brief
|
|
21
|
+
|
|
22
|
+
The fix for the "the prompt describes structure but not the fields, so Claude
|
|
23
|
+
Design imagines" failure. A mockup prompt that lists screens only as
|
|
24
|
+
*purpose / states / actions / data shown* forces the design tool to invent control
|
|
25
|
+
types, required-ness, validation, defaults and enum values. This skill enumerates
|
|
26
|
+
every backing field **from the real code**, reconciles it per screen, **verifies
|
|
27
|
+
coverage before emitting**, and renders the mandatory field-level template.
|
|
28
|
+
|
|
29
|
+
It is a conductor: each step DELEGATES to an existing module and cross-pointers to
|
|
30
|
+
it. No cascade / schema / traceability rule is re-described here (re-describing it
|
|
31
|
+
is how it drifts from the SSOT).
|
|
32
|
+
|
|
33
|
+
## Project Context
|
|
34
|
+
|
|
35
|
+
**Reads from `baldart.config.yml`:** `paths.design_system`,
|
|
36
|
+
`paths.components_primitives`, `paths.design_tokens`, `paths.ui_guidelines`,
|
|
37
|
+
`paths.prd_dir`, `stack.framework`, `stack.charting`, `stack.animation`,
|
|
38
|
+
`identity.*`, `features.has_design_system`, `features.has_lsp_layer`,
|
|
39
|
+
`features.has_code_graph`, `features.has_i18n`.
|
|
40
|
+
|
|
41
|
+
**Writes:** the rendered prompt → `${paths.prd_dir}/<slug>/handoff/claude-design-prompt.md`;
|
|
42
|
+
the optional field inventory → `${paths.prd_dir}/<slug>/mockups/field-inventory.md`.
|
|
43
|
+
Source-read-only otherwise (it never edits app code or the registry).
|
|
44
|
+
|
|
45
|
+
**Gated by features:** `features.has_design_system` (BLOCKING). When `false`,
|
|
46
|
+
REFUSE and recommend `/design-system-init` (§ 5 of the prompt + the per-region
|
|
47
|
+
component binding need a registry). When delegated from `/prd` it also rides on
|
|
48
|
+
`features.has_prd_workflow`. See `design-system-protocol.md` § Gating.
|
|
49
|
+
|
|
50
|
+
**Overlay:** loads `.baldart/overlays/ds-handoff.md` if present (brand voice,
|
|
51
|
+
mandated output format, project control conventions).
|
|
52
|
+
|
|
53
|
+
**On missing/empty keys:** ask the user; do not assume defaults. See
|
|
54
|
+
`framework/agents/project-context.md` § 3.
|
|
55
|
+
|
|
56
|
+
## Effort
|
|
57
|
+
|
|
58
|
+
**Baseline:** `effort: medium` (frontmatter). **Inline override:** pass
|
|
59
|
+
`effort=<low|medium|high|xhigh|max>` anywhere in the invocation to scale reasoning
|
|
60
|
+
depth for this run — detect it once at kickoff and strip the token before consuming
|
|
61
|
+
user input. Level→behavior mapping, parsing contract, and precedence caveats:
|
|
62
|
+
`framework/agents/effort-protocol.md`.
|
|
63
|
+
|
|
64
|
+
## Invocation
|
|
65
|
+
|
|
66
|
+
`/ds-handoff <screens-or-feature>` (standalone) · `/ds-handoff` (ask). When called
|
|
67
|
+
by `/prd` Step 3.0 Branch B, the caller passes the resolved context (state-file
|
|
68
|
+
path + feature title/objective/user_flow/personas/screens_in_scope/mockup_analysis
|
|
69
|
+
+ brand + DS flag) — skip the standalone screen-resolution prompt (Step 1's ask).
|
|
70
|
+
|
|
71
|
+
## Pre-flight
|
|
72
|
+
|
|
73
|
+
- **P0 — gate.** `features.has_design_system: false` → REFUSE + suggest
|
|
74
|
+
`/design-system-init`. (DELEGATE `design-system-protocol.md` § Gating.)
|
|
75
|
+
- **P1 — mode.** *Delegated* (a `/prd` state-file path was passed) vs *standalone*
|
|
76
|
+
(`/ds-handoff <args>`). The mode only changes where screens + top-level context
|
|
77
|
+
come from (Step 1); Steps 2–8 are identical.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Workflow
|
|
82
|
+
|
|
83
|
+
Each step is a delegation. Read the cited SSOT; do not paraphrase it.
|
|
84
|
+
|
|
85
|
+
1. **Resolve screens in scope.** *Delegated* → read `screens_in_scope[]` +
|
|
86
|
+
`mockup_analysis` from the `/prd` state file `## UI Design` (reuse the caller's
|
|
87
|
+
collection — do NOT re-derive). *Standalone* → derive screens from the arg;
|
|
88
|
+
on ambiguity, ONE `AskUserQuestion` listing route/page candidates from a
|
|
89
|
+
`codebase-architect` probe. Never proceed on silence.
|
|
90
|
+
|
|
91
|
+
2. **Identify backing entities per screen.** Name the entity/entities each screen
|
|
92
|
+
reads or writes. A screen may legitimately have **zero** entities (pure
|
|
93
|
+
navigation / dashboard chrome) — that is valid and MUST NOT trip the gate
|
|
94
|
+
(Step 5).
|
|
95
|
+
|
|
96
|
+
3. **Locate & extract the real field definitions.** DELEGATE — see
|
|
97
|
+
[references/field-extraction.md](references/field-extraction.md) for the
|
|
98
|
+
retrieval order (code-graph → LSP → `codebase-architect` → Grep, each with
|
|
99
|
+
silent fallback) and the control-type mapping table. Per field capture: label,
|
|
100
|
+
control, required, validation, default, enum/options source, helper,
|
|
101
|
+
editable-vs-readonly. The skill ships **no** AST/Zod parser — it composes
|
|
102
|
+
existing retrieval and applies the documented mapping; anything it cannot ground
|
|
103
|
+
becomes the literal `da definire`.
|
|
104
|
+
|
|
105
|
+
4. **Reconcile fields ↔ screens.** Not every field appears on every screen. Per
|
|
106
|
+
screen decide the shown subset, editable vs readonly, and card grouping —
|
|
107
|
+
informed by `mockup_analysis.screens[].layout / component_props / states` when
|
|
108
|
+
present (read as input; owned by `discovery-phase.md`), user intent (standalone),
|
|
109
|
+
and the entity field set.
|
|
110
|
+
|
|
111
|
+
5. **Coverage gate (BLOCK vs degrade).** DELEGATE —
|
|
112
|
+
[references/coverage-gate.md](references/coverage-gate.md). It reuses the
|
|
113
|
+
`backed / decorative / orphan` vocabulary from `design-system-protocol.md`
|
|
114
|
+
§ Functional Traceability Gate (CITE, never redefine). Field coverage: every
|
|
115
|
+
screen with ≥1 backing entity must have each shown field present with non-`da
|
|
116
|
+
definire` `{control, required}`. **BLOCK (interactive):** STOP + ONE consolidated
|
|
117
|
+
`AskUserQuestion` over the unverified backed screens + unbacked-orphan fields.
|
|
118
|
+
**DEGRADE:** no formal schema / empty extraction / Codex → downgrade BLOCK to
|
|
119
|
+
user-confirmation (present best-effort, ask the user to fill `da definire`);
|
|
120
|
+
never hard-abort.
|
|
121
|
+
|
|
122
|
+
6. **Fill the mandatory template.** Populate
|
|
123
|
+
[assets/claude-design-handoff-prompt.template.md](assets/claude-design-handoff-prompt.template.md)
|
|
124
|
+
with the reconciled per-screen specs + the top-level sections (brand / design
|
|
125
|
+
system / stack / cosa restituirmi). § 5's numeric constraints are the
|
|
126
|
+
`{{tokens.*}}` placeholders that **cite** `design-system-protocol.md` § Reference
|
|
127
|
+
Tables — copy values verbatim from the protocol, never invent numbers. Strip
|
|
128
|
+
empty conditionals.
|
|
129
|
+
|
|
130
|
+
7. **Persist the inventory artifact.** Write
|
|
131
|
+
`${paths.prd_dir}/<slug>/mockups/field-inventory.md` (the reconciled inventory)
|
|
132
|
+
so it survives restarts and feeds re-entry (`/prd` Step 1.6 Mockup Intake) +
|
|
133
|
+
downstream `component_bindings` reconciliation. Standalone with no prd-dir
|
|
134
|
+
convention → present inline + offer to persist.
|
|
135
|
+
|
|
136
|
+
8. **Emit the prompt.** Present the rendered template inside a fenced markdown
|
|
137
|
+
code-block, prefixed verbatim:
|
|
138
|
+
|
|
139
|
+
> Incolla il prompt qui sotto in Claude Design. Quando hai i mockup pronti,
|
|
140
|
+
> tornami con i **path locali** dei file (PNG, HTML, TSX, o link Figma) e
|
|
141
|
+
> riprendo da qui.
|
|
142
|
+
|
|
143
|
+
*Delegated* → return the rendered prompt + the `field-inventory.md` path to
|
|
144
|
+
`/prd`, which owns the state-file mutation (`mockups.handoff_prompt_path`,
|
|
145
|
+
`mockups.field_inventory_path`, `mockups.status: pending_external`). *Standalone*
|
|
146
|
+
→ save under `${paths.prd_dir}/<slug>/handoff/` and report the paths.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Inline fallbacks (portability + fail-safe)
|
|
151
|
+
|
|
152
|
+
- **No `Workflow` tool needed** — this skill is prose-orchestrated.
|
|
153
|
+
- **Codex (no subagents):** Step 3's `codebase-architect` degrades to inline Grep
|
|
154
|
+
(per `references/field-extraction.md`); the gate degrades BLOCK → user-confirmation
|
|
155
|
+
(Step 5). Runs end-to-end.
|
|
156
|
+
- **No LSP / no code-graph:** silent fallback down the retrieval order. Surface a
|
|
157
|
+
broken layer via `baldart doctor`, never abort here.
|
|
158
|
+
- **No formal schema in the stack:** the DEGRADE branch — best-effort inventory +
|
|
159
|
+
user confirmation of every `da definire`. Always-ask-never-assume
|
|
160
|
+
(`project-context.md` § 3).
|
|
161
|
+
|
|
162
|
+
## /prd integration
|
|
163
|
+
|
|
164
|
+
`/prd` Step 3.0 Branch B (`prd/references/ui-design-phase.md`) OWNS the decision to
|
|
165
|
+
hand off to Claude Design; `/ds-handoff` OWNS the prompt. `/prd` invokes this skill
|
|
166
|
+
with the resolved context and presents what it returns. If the skill is unavailable
|
|
167
|
+
(Codex without it linked / an older install), `/prd` falls back to an inline
|
|
168
|
+
**coarse** brief and says so explicitly — the prose stays SSOT, delegate-or-else-inline
|
|
169
|
+
(the same opt-in contract as `/prd` → `/ds-new`).
|
|
170
|
+
|
|
171
|
+
## See Also
|
|
172
|
+
|
|
173
|
+
- `framework/agents/design-system-protocol.md` — Functional Traceability Gate
|
|
174
|
+
(the `backed/decorative/orphan` vocabulary), Reference Tables (the § 5 numbers),
|
|
175
|
+
the registry cascade this skill's binding column relies on.
|
|
176
|
+
- `framework/.claude/skills/prd/references/discovery-phase.md` — the
|
|
177
|
+
`mockup_analysis` schema this skill reads as input (NEVER redefines).
|
|
178
|
+
- `framework/.claude/skills/prd/references/ui-design-phase.md` — the `/prd`
|
|
179
|
+
delegation site (Step 3.0 Branch B) + the re-entry that consumes the artifact.
|
|
180
|
+
- `framework/.claude/skills/ds-new/SKILL.md` / `ds-edit` — when the brief surfaces
|
|
181
|
+
a genuinely-new component, these create/edit it canonically.
|
|
182
|
+
- `framework/agents/code-search-protocol.md` — the code-graph/LSP/Grep retrieval
|
|
183
|
+
layer Step 3 composes.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Claude Design Handoff Prompt — Field-Level Template
|
|
2
|
+
|
|
3
|
+
> The MANDATORY template for the Claude Design handoff prompt. Populated by the
|
|
4
|
+
> `ds-handoff` skill ([../SKILL.md](../SKILL.md)) — invoked standalone or
|
|
5
|
+
> delegated from `/prd` Step 3.0 Branch B. This is the **single SSOT** for the
|
|
6
|
+
> prompt shape; the old coarse `/prd` template is retired.
|
|
7
|
+
>
|
|
8
|
+
> All `{{placeholders}}` resolve from the `ds-handoff` field inventory (Steps 1–5),
|
|
9
|
+
> the PRD state file when delegated, `baldart.config.yml`, and optional overlays.
|
|
10
|
+
>
|
|
11
|
+
> Render rules:
|
|
12
|
+
> - Conditional sections (`{{#if …}} … {{/if}}`) are emitted only when true. Skip
|
|
13
|
+
> the whole section (heading included) when false.
|
|
14
|
+
> - Lists (`{{#each …}}`) render one row/bullet per item; emit "—" if empty.
|
|
15
|
+
> - The rendered output is presented inside a fenced markdown code-block so the
|
|
16
|
+
> user can copy-paste it verbatim into Claude Design.
|
|
17
|
+
> - **`da definire`** is a real, literal cell value — never a guess. It signals a
|
|
18
|
+
> fact the field-extraction step could not ground in code; Claude Design must
|
|
19
|
+
> ask, not invent (always-ask-never-assume).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Feature: {{feature_title}}
|
|
24
|
+
|
|
25
|
+
## 1. Obiettivo
|
|
26
|
+
|
|
27
|
+
{{feature_objective_one_sentence}}
|
|
28
|
+
|
|
29
|
+
## 2. User flow
|
|
30
|
+
|
|
31
|
+
{{user_flow_summary}}
|
|
32
|
+
|
|
33
|
+
{{#if primary_personas}}
|
|
34
|
+
**Personas target**:
|
|
35
|
+
{{#each primary_personas}}
|
|
36
|
+
- {{this.name}} — {{this.context}}
|
|
37
|
+
{{/each}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
|
|
40
|
+
## 3. Schermate in scope — specifica field-level
|
|
41
|
+
|
|
42
|
+
> **Questo è un contratto 1:1.** Ogni campo, controllo, validazione e opzione
|
|
43
|
+
> qui sotto è **estratto dallo schema dati reale** del progetto. NON inventare,
|
|
44
|
+
> aggiungere o rinominare campi; NON inventare tipi di controllo, validazioni,
|
|
45
|
+
> default o valori di enum. Una cella **`da definire`** = chiedimelo, non
|
|
46
|
+
> indovinarla. Un campo marcato **readonly** è di sola lettura: NON dargli un
|
|
47
|
+
> controllo editabile (input/select/toggle) — rendilo come testo statico.
|
|
48
|
+
>
|
|
49
|
+
> **Vincolo di tracciabilità funzionale.** Inserisci SOLO controlli e affordance
|
|
50
|
+
> (bottoni, icone-azione, voci di menu, tab, toggle) legati a una funzione
|
|
51
|
+
> elencata. Non aggiungere chrome interattivo "per completezza visiva": ogni
|
|
52
|
+
> affordance senza funzione diventa codice morto. Elementi puramente decorativi
|
|
53
|
+
> (icone di sezione, marchi) marcali esplicitamente **decorativi**.
|
|
54
|
+
|
|
55
|
+
{{#each screens_in_scope}}
|
|
56
|
+
### {{this.name}}
|
|
57
|
+
|
|
58
|
+
**Identità** — Route: `{{this.route}}`{{#if this.slot_id}} · Artboard: `{{this.slot_id}}`{{/if}}{{#if this.screen_id}} · Screen id: {{this.screen_id}}{{/if}}
|
|
59
|
+
- **Scopo**: {{this.purpose}}
|
|
60
|
+
- **Entità backing**: {{this.backing_entities}} <!-- es. "Fornitore (supplierSchema)"; "—" se schermata di sola navigazione -->
|
|
61
|
+
|
|
62
|
+
**Layout (regioni & nesting)**:
|
|
63
|
+
{{#each this.regions}}
|
|
64
|
+
- `{{this.region}}` → **{{this.component}}**{{#if this.props}} ({{this.props}}){{/if}}{{#if this.contains}} → contiene: {{this.contains}}{{/if}}
|
|
65
|
+
{{/each}}
|
|
66
|
+
|
|
67
|
+
{{#if this.fields}}
|
|
68
|
+
**Field inventory** — ogni riga è un campo reale dello schema:
|
|
69
|
+
|
|
70
|
+
| Campo (label) | Controllo | Required | Validazione/Vincoli | Default | Opzioni / sorgente enum | Helper text | Mode | Card/gruppo |
|
|
71
|
+
|---|---|---|---|---|---|---|---|---|
|
|
72
|
+
{{#each this.fields}}
|
|
73
|
+
| {{this.label}} | {{this.control}} | {{this.required}} | {{this.validation}} | {{this.default}} | {{this.options}} | {{this.helper}} | {{this.mode}} | {{this.card}} |
|
|
74
|
+
{{/each}}
|
|
75
|
+
{{/if}}
|
|
76
|
+
|
|
77
|
+
{{#if this.cards}}
|
|
78
|
+
**Raggruppamento in card**:
|
|
79
|
+
{{#each this.cards}}
|
|
80
|
+
- **{{this.title}}**: {{this.fields}}
|
|
81
|
+
{{/each}}
|
|
82
|
+
{{/if}}
|
|
83
|
+
|
|
84
|
+
{{#if this.actions}}
|
|
85
|
+
**Azioni & interazioni**:
|
|
86
|
+
|
|
87
|
+
| Azione | Effetto | Destinazione | Abilitata quando | Traccia a |
|
|
88
|
+
|---|---|---|---|---|
|
|
89
|
+
{{#each this.actions}}
|
|
90
|
+
| {{this.action}} | {{this.effect}} | {{this.destination}} | {{this.enabled_when}} | {{this.traces_to}} |
|
|
91
|
+
{{/each}}
|
|
92
|
+
{{/if}}
|
|
93
|
+
|
|
94
|
+
{{#if this.states}}
|
|
95
|
+
**Stati → rappresentazione**:
|
|
96
|
+
{{#each this.states}}
|
|
97
|
+
- `{{this.state}}` → {{this.representation}}{{#if this.traces_to}} (traccia a {{this.traces_to}}){{/if}}
|
|
98
|
+
{{/each}}
|
|
99
|
+
{{/if}}
|
|
100
|
+
|
|
101
|
+
{{#if this.list_item}}
|
|
102
|
+
**Dato per-riga / per-card** (lista):
|
|
103
|
+
{{#each this.list_item.fields}}
|
|
104
|
+
- {{this.label}} — {{this.note}}
|
|
105
|
+
{{/each}}
|
|
106
|
+
- Azioni di riga: {{this.list_item.row_actions}}
|
|
107
|
+
- Empty / sort / paginazione: {{this.list_item.list_behavior}}
|
|
108
|
+
{{/if}}
|
|
109
|
+
|
|
110
|
+
{{#if this.responsive}}
|
|
111
|
+
**Responsive**:
|
|
112
|
+
{{#each this.responsive}}
|
|
113
|
+
- {{this}}
|
|
114
|
+
{{/each}}
|
|
115
|
+
{{/if}}
|
|
116
|
+
|
|
117
|
+
{{/each}}
|
|
118
|
+
> **Nota per l'export.** Dai al canvas di questa feature un titolo che contenga il
|
|
119
|
+
> nome feature («{{feature_title}}»), e numera gli artboard in modo coerente con
|
|
120
|
+
> gli ID schermata qui sopra (es. screen id 3.1 → artboard `s31`). Scaricherò il
|
|
121
|
+
> bundle completo del workspace per ritrovare esattamente le TUE schermate.
|
|
122
|
+
|
|
123
|
+
{{#if brand_voice}}
|
|
124
|
+
## 4. Brand & voice
|
|
125
|
+
|
|
126
|
+
- **Tono**: {{brand_voice.tone}}
|
|
127
|
+
- **Personalità**: {{brand_voice.personality}}
|
|
128
|
+
- **Do**: {{brand_voice.do}}
|
|
129
|
+
- **Don't**: {{brand_voice.dont}}
|
|
130
|
+
{{#if brand_voice.references}}
|
|
131
|
+
- **Riferimenti visivi**: {{brand_voice.references}}
|
|
132
|
+
{{/if}}
|
|
133
|
+
{{/if}}
|
|
134
|
+
|
|
135
|
+
{{#if has_design_system}}
|
|
136
|
+
## 5. Design system constraints
|
|
137
|
+
|
|
138
|
+
> Riusa SOLO i token e le primitive elencate. Se devi proporre qualcosa di nuovo,
|
|
139
|
+
> segnalalo esplicitamente nella consegna così posso aggiornare il registro.
|
|
140
|
+
|
|
141
|
+
### Token chiave
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
{{design_tokens_excerpt}}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Primitive da riusare
|
|
148
|
+
|
|
149
|
+
{{#each registered_primitives}}
|
|
150
|
+
- **{{this.name}}** — {{this.purpose}} ({{this.path}})
|
|
151
|
+
{{/each}}
|
|
152
|
+
|
|
153
|
+
### Vincoli numerici (da `design-system-protocol.md`)
|
|
154
|
+
|
|
155
|
+
- Type scale: {{tokens.type_scale}}
|
|
156
|
+
- Spacing scale: {{tokens.spacing_scale}}
|
|
157
|
+
- Radius: {{tokens.radius_scale}}
|
|
158
|
+
- Contrast minimo: {{tokens.contrast_target}} (WCAG AA + APCA Lc ≥ {{tokens.apca_target}})
|
|
159
|
+
- Motion durations: {{tokens.motion_durations}}
|
|
160
|
+
{{/if}}
|
|
161
|
+
|
|
162
|
+
## 6. Stack target
|
|
163
|
+
|
|
164
|
+
- **Framework**: {{stack.framework}}
|
|
165
|
+
- **Output preferito**: {{output_format_preference}} <!-- "HTML/CSS standalone" | "React component (Tailwind)" | "Figma frame" -->
|
|
166
|
+
{{#if stack.charting}}
|
|
167
|
+
- **Charting library**: {{stack.charting}}
|
|
168
|
+
{{/if}}
|
|
169
|
+
{{#if stack.animation}}
|
|
170
|
+
- **Animation library**: {{stack.animation}}
|
|
171
|
+
{{/if}}
|
|
172
|
+
|
|
173
|
+
## 7. Cosa restituirmi
|
|
174
|
+
|
|
175
|
+
Per ogni schermata elencata in § 3:
|
|
176
|
+
|
|
177
|
+
1. **PNG export** ad alta risoluzione (≥ 2x) di OGNI stato richiesto (es. `dettaglio-fornitore__loading.png`, `dettaglio-fornitore__populated.png`).
|
|
178
|
+
2. {{output_format_preference_block}} <!-- "Codice HTML/CSS in un file unico" | "Codice React (.tsx) con import Tailwind" | "Link Figma alla frame" -->
|
|
179
|
+
3. **Mappa di tracciabilità campo→funzione** — per OGNI campo della field inventory,
|
|
180
|
+
conferma che sia presente e col controllo/mode indicati. Se un campo di § 3 manca
|
|
181
|
+
nel tuo design, **segnalalo, non ometterlo silenziosamente**. Per OGNI elemento
|
|
182
|
+
interattivo o iconografico, una riga `elemento → funzione che lo motiva`, oppure
|
|
183
|
+
marcalo **decorativo**. Qualunque elemento non tracciabile elencalo come
|
|
184
|
+
*orphan da decidere* — così scelgo se dargli funzione, renderlo decorativo o
|
|
185
|
+
rimuoverlo, invece di implementarlo a vuoto.
|
|
186
|
+
4. **Note inline** su:
|
|
187
|
+
- Componenti nuovi (non nel registry sopra) introdotti e perché.
|
|
188
|
+
- Token deviation: qualunque colore/spacing/radius fuori dalla palette sopra, con motivazione.
|
|
189
|
+
- Decisioni di layout non ovvie (priority sort, hierarchy visiva, density).
|
|
190
|
+
|
|
191
|
+
Quando hai pronto, dimmi i **path locali** dei file (PNG/HTML/TSX) — li importerò
|
|
192
|
+
in questa sessione per analisi e validazione contro il design system.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
<!-- baldart-handoff: do-not-edit-manually -->
|
|
197
|
+
<!-- Generated from ds-handoff/assets/claude-design-handoff-prompt.template.md by the ds-handoff skill -->
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Coverage gate — verify the fields BEFORE emitting the prompt
|
|
2
|
+
|
|
3
|
+
`ds-handoff` Step 5. The gate that makes the brief 1:1: it refuses to emit a prompt
|
|
4
|
+
whose backed screens have unverified fields, so Claude Design never has to imagine.
|
|
5
|
+
It reuses the `backed / decorative / orphan` vocabulary from
|
|
6
|
+
`design-system-protocol.md` § Functional Traceability Gate — **CITE it, never
|
|
7
|
+
redefine it**. That gate governs *interactive/iconographic affordances*; this gate
|
|
8
|
+
applies the same discipline one level deeper, to **data fields**.
|
|
9
|
+
|
|
10
|
+
## What is checked
|
|
11
|
+
|
|
12
|
+
### Axis 1 — Field coverage (the BLOCK condition)
|
|
13
|
+
|
|
14
|
+
For every screen with **≥ 1 backing entity** (Step 2): each shown field in its
|
|
15
|
+
inventory must be present with, at minimum, a non-`da definire` **Controllo** and
|
|
16
|
+
**Required**. A backed screen whose inventory is empty, or whose shown fields carry
|
|
17
|
+
`da definire` in `{control, required}`, is **unverified** → a BLOCK condition.
|
|
18
|
+
|
|
19
|
+
Validation / default / helper / enum-source cells MAY remain `da definire` (they
|
|
20
|
+
degrade gracefully — Claude Design will ask), but `{control, required}` are the
|
|
21
|
+
floor: without them the design tool cannot even place the right widget.
|
|
22
|
+
|
|
23
|
+
### Axis 2 — Field traceability (advisory + resolve)
|
|
24
|
+
|
|
25
|
+
Reuse the protocol's classification, applied to fields:
|
|
26
|
+
|
|
27
|
+
| Class | Definition | Outcome |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| **Backed** | Field exists in the entity schema AND is placed on a screen | OK — in the inventory |
|
|
30
|
+
| **Decorative** | Static display (a computed value shown read-only, a label) | `mode: readonly`, never blocks |
|
|
31
|
+
| **Orphan — unbacked** | A field in the inventory that traces to NO schema field | Resolve: "da definire o rimuovere" — escalate (see below) |
|
|
32
|
+
| **Orphan — unplaced** | A schema field placed on NO screen in scope | **Advisory** — surface "confermare se fuori scope"; NOT a BLOCK |
|
|
33
|
+
|
|
34
|
+
## BLOCK vs DEGRADE
|
|
35
|
+
|
|
36
|
+
**BLOCK (interactive mode, a human is present):** STOP. Do not emit the prompt.
|
|
37
|
+
Surface — never silently — every unverified backed screen and every unbacked-orphan
|
|
38
|
+
field, then raise **ONE consolidated `AskUserQuestion`** (consistent with
|
|
39
|
+
always-ask-never-assume and "no silent deferral"). Offer per item: supply the
|
|
40
|
+
missing fact / mark the field decorative-readonly / drop it. Only after the user
|
|
41
|
+
resolves them do you proceed to Step 6.
|
|
42
|
+
|
|
43
|
+
**DEGRADE (graceful, never hard-abort):** downgrade BLOCK → user-confirmation when
|
|
44
|
+
- no formal schema exists in the stack (the entity is plain TS objects / untyped), OR
|
|
45
|
+
- field extraction returned empty across all retrieval tiers, OR
|
|
46
|
+
- running under Codex with no subagents / no-TTY.
|
|
47
|
+
|
|
48
|
+
In DEGRADE: present the best-effort inventory with its `da definire` cells visible,
|
|
49
|
+
and ask the user to fill or confirm them before emission. The prompt still ships —
|
|
50
|
+
with honest `da definire` cells the user has seen — rather than aborting the flow.
|
|
51
|
+
|
|
52
|
+
## False-positive guards (do NOT block on these)
|
|
53
|
+
|
|
54
|
+
By construction the gate excludes:
|
|
55
|
+
- **Zero-entity screens** — pure navigation / dashboard chrome / marketing screens
|
|
56
|
+
have no backing entity and so no field-coverage obligation. Never block them.
|
|
57
|
+
- **Decorative regions** — labels, section icons, computed read-only displays.
|
|
58
|
+
- **Framework noise** — `.framework/`, `.baldart/`, telemetry/generated files are
|
|
59
|
+
never a backing schema.
|
|
60
|
+
- **Unplaced schema fields** — advisory only (a field legitimately out of this
|
|
61
|
+
feature's scope is not a defect).
|
|
62
|
+
|
|
63
|
+
The BLOCK condition is deliberately narrow: *a backed screen whose inventory is
|
|
64
|
+
empty or has unverified `{control, required}`*. Everything else informs, not blocks.
|
|
65
|
+
|
|
66
|
+
## Worked example — "Fornitori" (suppliers)
|
|
67
|
+
|
|
68
|
+
Backing schema discovered in Step 3:
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
const supplierSchema = z.object({
|
|
72
|
+
ragione_sociale: z.string().min(1).max(120),
|
|
73
|
+
partita_iva: z.string().regex(/^IT\d{11}$/),
|
|
74
|
+
email: z.string().email().optional(),
|
|
75
|
+
categoria: z.enum(["materie_prime", "servizi", "logistica"]),
|
|
76
|
+
pagamento_giorni: z.number().int().min(0).max(120).default(30),
|
|
77
|
+
attivo: z.boolean().default(true),
|
|
78
|
+
note: z.string().max(500).optional(),
|
|
79
|
+
created_at: z.date(), // server-set
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Reconciled inventory for **Dettaglio Fornitore** (`/fornitori/:id`, screen 3.2,
|
|
84
|
+
backing: `Fornitore (supplierSchema)`):
|
|
85
|
+
|
|
86
|
+
| Campo (label) | Controllo | Req | Validazione/Vincoli | Default | Opzioni / enum | Helper text | Mode | Card |
|
|
87
|
+
|---|---|---|---|---|---|---|---|---|
|
|
88
|
+
| Ragione sociale | text input | sì | 1–120 caratteri | — | — | da definire | editable | Anagrafica |
|
|
89
|
+
| Partita IVA | text input | sì | pattern `IT` + 11 cifre | — | — | "Formato: IT01234567890" (da confermare) | editable | Anagrafica |
|
|
90
|
+
| Email | email input | no | formato email | — | — | da definire | editable | Contatti |
|
|
91
|
+
| Categoria | select | sì | enum | — | materie_prime · servizi · logistica | da definire | editable | Anagrafica |
|
|
92
|
+
| Giorni pagamento | number input | sì | intero 0–120 | 30 | — | "Termini di pagamento" (da confermare) | editable | Condizioni |
|
|
93
|
+
| Attivo | toggle | no | boolean | true | — | da definire | editable | Stato |
|
|
94
|
+
| Note | textarea | no | max 500 caratteri | — | — | da definire | editable | Note |
|
|
95
|
+
| Creato il | testo statico | — | — | — | — | — | readonly | Metadati |
|
|
96
|
+
|
|
97
|
+
Actions:
|
|
98
|
+
|
|
99
|
+
| Azione | Effetto | Destinazione | Abilitata quando | Traccia a |
|
|
100
|
+
|---|---|---|---|---|
|
|
101
|
+
| Salva | PATCH /suppliers/:id | resta su dettaglio + toast | form valido & dirty | US-fornitori-edit |
|
|
102
|
+
| Annulla | scarta modifiche | torna a /fornitori | sempre | US-fornitori-edit |
|
|
103
|
+
| Elimina | DELETE /suppliers/:id | torna a /fornitori | fornitore non collegato a ordini | da definire (orphan?) |
|
|
104
|
+
|
|
105
|
+
Gate verdict on this screen: **PASS the BLOCK floor** — every shown field has a
|
|
106
|
+
grounded `{control, required}`. The `da definire` helper cells and the `Elimina`
|
|
107
|
+
enable-condition/traceability are surfaced (advisory) so the user can resolve them,
|
|
108
|
+
but they do not block emission. `created_at` is correctly `readonly` (testo statico,
|
|
109
|
+
no input) — the exact hallucination the gate prevents.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Field extraction — locating and reading the real fields
|
|
2
|
+
|
|
3
|
+
How `ds-handoff` Step 3 grounds the field inventory in the project's actual data
|
|
4
|
+
schemas. This is **retrieval composition + a mapping table**, NOT a new parser.
|
|
5
|
+
The skill ships no Zod/AST extractor (that would be over-scoped and fragile across
|
|
6
|
+
stacks; contrast `design-system-init`'s `extract-one.mjs`, justified only because a
|
|
7
|
+
manifest HEAD must be byte-deterministic — a prose handoff tolerates LLM extraction
|
|
8
|
+
behind the Step 5 coverage gate).
|
|
9
|
+
|
|
10
|
+
## Retrieval order (each with silent fallback)
|
|
11
|
+
|
|
12
|
+
Resolve the backing schema/type/form for each entity from Step 2, top to bottom.
|
|
13
|
+
Stop at the first tier that returns the field set; degrade silently down the list.
|
|
14
|
+
|
|
15
|
+
1. **Code-graph** — when `features.has_code_graph: true`. Use it to find the
|
|
16
|
+
schema/type/form definition and (bonus) which screens consume it. DELEGATE
|
|
17
|
+
`framework/agents/code-graph-protocol.md`.
|
|
18
|
+
2. **LSP** — when `features.has_lsp_layer: true`. `go-to-definition` /
|
|
19
|
+
`find-references` on the entity symbol (e.g. `supplierSchema`) to jump straight
|
|
20
|
+
to the definition without grepping a common name. DELEGATE
|
|
21
|
+
`framework/agents/code-search-protocol.md`.
|
|
22
|
+
3. **`codebase-architect`** (Task tool) — the workhorse. Ask it to locate the
|
|
23
|
+
entity's Zod schema / TS interface / form schema (react-hook-form, Formik, a
|
|
24
|
+
server action's input) and **return the field facts as structured data** (one
|
|
25
|
+
row per field with the columns below). Read-only exploration; it does not parse
|
|
26
|
+
ASTs for you — it reads the source and reports. Honor its return contract
|
|
27
|
+
(`framework/agents/return-contract-protocol.md`).
|
|
28
|
+
4. **Grep** — last resort / Codex. Patterns: `z.object(`, `interface .*Props`,
|
|
29
|
+
`type .* = {`, `useForm`, `zodResolver`, `createInsertSchema` (drizzle-zod),
|
|
30
|
+
the entity name. Read the matched file directly.
|
|
31
|
+
|
|
32
|
+
**Exclude framework noise** from every tier: `.framework/`, `.baldart/`,
|
|
33
|
+
generated/telemetry files. These never back a product screen.
|
|
34
|
+
|
|
35
|
+
## Per-field capture (the 9 inventory columns)
|
|
36
|
+
|
|
37
|
+
For each field, capture exactly what the template's field-inventory table needs.
|
|
38
|
+
Anything you cannot ground in code is the **literal `da definire`** — never a guess.
|
|
39
|
+
|
|
40
|
+
| Column | Source in code | If ungrounded |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| **Campo (label)** | Humanize the field name; or the i18n registry source string when `features.has_i18n: true` (`paths.i18n_registry`); or an explicit `label`/JSDoc. | humanized name + note |
|
|
43
|
+
| **Controllo** | The control-type mapping below. | `da definire` |
|
|
44
|
+
| **Required** | `sì` unless `.optional()` / `.nullish()` / `?` / `.partial()`. | `da definire` |
|
|
45
|
+
| **Validazione/Vincoli** | `.min()`/`.max()`/`.length()`/`.regex()`/`.email()`/`.url()`/`.int()`/`.positive()`/refinements. | `—` if none |
|
|
46
|
+
| **Default** | `.default(x)` / a form `defaultValues` entry. | `—` if none |
|
|
47
|
+
| **Opzioni / sorgente enum** | `z.enum([...])` / `z.nativeEnum` literals verbatim; a `z.string()` whose options come from a runtime query → `"query runtime — da definire"`. | `—` / `da definire` |
|
|
48
|
+
| **Helper text** | JSDoc on the field; the i18n `context` for the key; an existing form description. | `da definire` |
|
|
49
|
+
| **Mode** | `editable` by default; `readonly` for server-set / computed fields (see below). | `editable` |
|
|
50
|
+
| **Card/gruppo** | From `mockup_analysis.screens[].layout` when present, else the reconciliation decision (Step 4). | `da definire` |
|
|
51
|
+
|
|
52
|
+
## Control-type mapping (applied by the agent, not a CLI)
|
|
53
|
+
|
|
54
|
+
A documented heuristic — apply it, but prefer an explicit signal (an existing
|
|
55
|
+
component binding, a form control already in code) over the heuristic when present.
|
|
56
|
+
|
|
57
|
+
| Schema / type shape | Control |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `z.enum([...])` / `z.nativeEnum` / union of string literals | `select` (or `radio` for ≤ 3 options / `segmented` per project convention) |
|
|
60
|
+
| `z.boolean()` | `toggle` (or `checkbox`) |
|
|
61
|
+
| `z.string()` short (no/small `.max`) | `text input` |
|
|
62
|
+
| `z.string()` long (`.max` ≥ ~200, or named `notes`/`description`/`body`) | `textarea` |
|
|
63
|
+
| `z.string().email()` | `email input` |
|
|
64
|
+
| `z.string().url()` | `url input` |
|
|
65
|
+
| `z.string()` matching a phone/postal regex | typed input (`phone`/`postal`) |
|
|
66
|
+
| `z.number()` / `z.coerce.number()` | `number input` (or `price`/`percent` per unit) |
|
|
67
|
+
| `z.date()` / `z.string().datetime()` | `date picker` — **readonly** if server-set/computed |
|
|
68
|
+
| `z.array(...)` of a sub-object | repeatable group / multi-row editor |
|
|
69
|
+
| `z.array(z.string())` from a known set | `multi-select` |
|
|
70
|
+
| `z.object(...)` nested | a sub-group / sub-card |
|
|
71
|
+
|
|
72
|
+
## Readonly detection
|
|
73
|
+
|
|
74
|
+
Mark a field **readonly** (static text, no editable control) when it is not
|
|
75
|
+
user-authored: server-set timestamps (`created_at`, `updated_at`), derived/computed
|
|
76
|
+
values, IDs, audit fields, anything the schema marks server-generated or that the
|
|
77
|
+
form's `defaultValues` sets but the UI never edits. A field drawn as an input when
|
|
78
|
+
it is in truth readonly is the classic Claude Design hallucination this prevents.
|
|
@@ -30,35 +30,50 @@ unchanged. No other side-effect of Step 3.0.
|
|
|
30
30
|
|
|
31
31
|
### Branch B — Claude Design handoff
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
[
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
The handoff prompt is owned by the **`ds-handoff` skill** (the single SSOT). `/prd`
|
|
34
|
+
decides to hand off; `/ds-handoff` builds the field-level, 1:1 brief — it grounds
|
|
35
|
+
every screen's fields in the real data schemas and runs a coverage gate **before**
|
|
36
|
+
emitting, so Claude Design does not have to imagine the fields. (This is the same
|
|
37
|
+
delegate-or-else-inline contract as `/prd` → `/ds-new`.)
|
|
38
|
+
|
|
39
|
+
1. **Delegate to `/ds-handoff`.** Invoke it in *delegated* mode, passing the
|
|
40
|
+
resolved context so it skips its own screen-resolution prompt:
|
|
41
|
+
- the state-file path;
|
|
42
|
+
- `feature_title`, `feature_objective_one_sentence` (from `## Feature Description`);
|
|
43
|
+
- `user_flow_summary`, `primary_personas` (from `## Discovery Log` dimensions 1 + 2);
|
|
44
|
+
- `screens_in_scope[]` from `## UI Design` (derive from User Stories + ISA
|
|
45
|
+
touchpoints if not yet populated — same logic as Hybrid mode § "Build the
|
|
46
|
+
per-screen routing table");
|
|
47
|
+
- `mockup_analysis` from `## UI Design` if present (the skill reads its
|
|
48
|
+
`layout / component_props / states / responsive` as input);
|
|
49
|
+
- the `features.has_design_system` flag (the skill omits § 5 when `false`).
|
|
50
|
+
|
|
51
|
+
`/ds-handoff` runs field extraction + the coverage gate + the mandatory template
|
|
52
|
+
and returns the **rendered prompt** plus the **`field-inventory.md` path**.
|
|
53
|
+
|
|
54
|
+
**Graceful fallback** — if `/ds-handoff` is unavailable (Codex without it linked,
|
|
55
|
+
or an older install): render a **coarse** brief inline from `screens_in_scope[]`
|
|
56
|
+
(per-screen: scopo / stati / azioni primarie / dati visualizzati) and the same
|
|
57
|
+
top-level sections (obiettivo, user flow, brand, design system, stack, cosa
|
|
58
|
+
restituirmi). State explicitly to the user: *"field-level brief non disponibile →
|
|
59
|
+
brief coarse"*, so the lost fidelity is visible, not silent.
|
|
60
|
+
|
|
61
|
+
2. **Present the returned prompt** to the user inside a fenced markdown code-block,
|
|
62
|
+
prefixed with this instruction (verbatim):
|
|
49
63
|
|
|
50
64
|
> Incolla il prompt qui sotto in Claude Design. Quando hai i mockup pronti,
|
|
51
65
|
> tornami con i **path locali** dei file (PNG, HTML, TSX, o link Figma) e
|
|
52
66
|
> riprendo da qui — copio i file nella cartella del PRD, li analizzo come
|
|
53
67
|
> al solito (Step 1.6 Mockup Intake), e Step 3 entra in Hybrid mode.
|
|
54
68
|
|
|
55
|
-
|
|
69
|
+
3. **Update state file** before stopping:
|
|
56
70
|
- `mockups.status: pending_external`
|
|
57
71
|
- `mockups.source: claude-design`
|
|
58
72
|
- `mockups.handoff_prompt_path: ${paths.prd_dir}/<slug>/handoff/claude-design-prompt.md` (save the rendered prompt to disk so it survives session restarts).
|
|
73
|
+
- `mockups.field_inventory_path: ${paths.prd_dir}/<slug>/mockups/field-inventory.md` (the path `/ds-handoff` returned; omit on the coarse fallback).
|
|
59
74
|
- `step_3_mode: pending_external_handoff` (transitional — overwritten when user returns).
|
|
60
75
|
|
|
61
|
-
|
|
76
|
+
4. **STOP.** Wait for the user to return with local paths.
|
|
62
77
|
|
|
63
78
|
### Re-entry from handoff (user returns with paths)
|
|
64
79
|
|
|
@@ -24,6 +24,10 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
24
24
|
> This map references **only skills shipped under `framework/.claude/skills/`**.
|
|
25
25
|
> Confirm a skill exists (its directory is present) before routing to it; never
|
|
26
26
|
> route to a skill name that has no directory.
|
|
27
|
+
>
|
|
28
|
+
> **Gating.** Many skills are gated on a `features.*` flag in `baldart.config.yml`
|
|
29
|
+
> (noted per entry). When the flag is `false` the skill REFUSES — do not route to
|
|
30
|
+
> it; resolve the gate first (e.g. `/design-system-init` for `has_design_system`).
|
|
27
31
|
|
|
28
32
|
## Core Development Skills
|
|
29
33
|
|
|
@@ -43,6 +47,19 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
43
47
|
- "Nuova funzionalità"
|
|
44
48
|
- "How should I scope..."
|
|
45
49
|
|
|
50
|
+
### prd-add
|
|
51
|
+
|
|
52
|
+
**When to use**:
|
|
53
|
+
|
|
54
|
+
- A new requirement lands on an ACTIVE `/prd` session (change request)
|
|
55
|
+
- "serve anche…", a missing endpoint/sub-feature surfaces mid-discovery
|
|
56
|
+
- Runs ICIAS impact analysis to decide which PRD phases SKIP / PATCH / REDO
|
|
57
|
+
|
|
58
|
+
**Triggers**:
|
|
59
|
+
|
|
60
|
+
- "/prd-add"
|
|
61
|
+
- "Aggiungi requisito" / "Serve anche" / "Manca un endpoint"
|
|
62
|
+
|
|
46
63
|
### context-primer
|
|
47
64
|
|
|
48
65
|
**When to use**:
|
|
@@ -68,6 +85,20 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
68
85
|
- "Implementa le card"
|
|
69
86
|
- "Esegui le card"
|
|
70
87
|
|
|
88
|
+
### new2
|
|
89
|
+
|
|
90
|
+
**When to use**:
|
|
91
|
+
|
|
92
|
+
- EXPERIMENTAL workflow-hosted variant of `/new` (A/B testing context economy)
|
|
93
|
+
- The whole card batch runs in a background dynamic workflow (subagent output never
|
|
94
|
+
enters the main context); every `/new` gate becomes a deterministic policy
|
|
95
|
+
- **Claude-only** (needs the `Workflow` tool)
|
|
96
|
+
|
|
97
|
+
**Triggers**:
|
|
98
|
+
|
|
99
|
+
- "/new2 CARD-IDS"
|
|
100
|
+
- "Implementa le card con workflow"
|
|
101
|
+
|
|
71
102
|
### bug
|
|
72
103
|
|
|
73
104
|
**When to use**:
|
|
@@ -82,6 +113,30 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
82
113
|
- "Fix [bug]"
|
|
83
114
|
- "Non funziona" / "Why is [X] not working?"
|
|
84
115
|
|
|
116
|
+
### worktree-manager
|
|
117
|
+
|
|
118
|
+
**When to use**:
|
|
119
|
+
|
|
120
|
+
- Parallel coding agents needing fully independent git worktrees
|
|
121
|
+
- Create / merge (→ PR) / list / cleanup isolated workspaces
|
|
122
|
+
- Used programmatically by `/new` for per-card worktree ops
|
|
123
|
+
|
|
124
|
+
**Triggers**:
|
|
125
|
+
|
|
126
|
+
- "/nw" (new) · "/mw" (merge) · "/lw" (list) · "/cw" (cleanup)
|
|
127
|
+
- "New worktree" / "Merge worktree"
|
|
128
|
+
|
|
129
|
+
### issue-review
|
|
130
|
+
|
|
131
|
+
**When to use**:
|
|
132
|
+
|
|
133
|
+
- Triage / planning a GitHub issue (summary + priority + plan + tests)
|
|
134
|
+
|
|
135
|
+
**Triggers**:
|
|
136
|
+
|
|
137
|
+
- "/issue-review"
|
|
138
|
+
- "Triage this issue" / "Review issue [N]"
|
|
139
|
+
|
|
85
140
|
## Code Quality Skills
|
|
86
141
|
|
|
87
142
|
### simplify
|
|
@@ -136,7 +191,129 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
136
191
|
> standalone invocable BALDART skill. Route UI work through `ui-design` /
|
|
137
192
|
> `ui-expert`, not to `ui-ux-pro-max` directly.
|
|
138
193
|
|
|
139
|
-
|
|
194
|
+
### motion-design
|
|
195
|
+
|
|
196
|
+
**When to use**:
|
|
197
|
+
|
|
198
|
+
- Animations, transitions, micro-interactions, loading/page transitions
|
|
199
|
+
- Scroll-triggered effects, choreography, timing/easing decisions
|
|
200
|
+
- Works with CSS / Framer Motion / GSAP / Lottie / Spring
|
|
201
|
+
|
|
202
|
+
**Triggers**:
|
|
203
|
+
|
|
204
|
+
- "/motion-design"
|
|
205
|
+
- "Anima…" / "transition" / "micro-interaction"
|
|
206
|
+
|
|
207
|
+
### gamification-design
|
|
208
|
+
|
|
209
|
+
**When to use**:
|
|
210
|
+
|
|
211
|
+
- Points systems, reward loops, progression mechanics, loyalty/retention
|
|
212
|
+
- B2C customer-facing engagement features
|
|
213
|
+
|
|
214
|
+
**Triggers**:
|
|
215
|
+
|
|
216
|
+
- "/gamification-design"
|
|
217
|
+
- "Punti / reward / progression / battle pass / loyalty"
|
|
218
|
+
|
|
219
|
+
## Design System Skills
|
|
220
|
+
|
|
221
|
+
> All gated on `features.has_design_system: true`. Without a registry, bootstrap
|
|
222
|
+
> first with `/design-system-init`.
|
|
223
|
+
|
|
224
|
+
### design-system-init
|
|
225
|
+
|
|
226
|
+
**When to use**:
|
|
227
|
+
|
|
228
|
+
- GREENFIELD: bootstrap a component registry (INDEX.md + DTCG tokens + per-component specs) and flip `has_design_system`
|
|
229
|
+
- UPGRADE: regenerate machine-readable HEADs / DTCG tokens on an existing prose-only registry
|
|
230
|
+
- SEED: a registry born in Claude Design (design-led)
|
|
231
|
+
|
|
232
|
+
**Triggers**:
|
|
233
|
+
|
|
234
|
+
- "/design-system-init"
|
|
235
|
+
- "Crea design system" / "inizializza registro componenti" / "aggiorna le spec"
|
|
236
|
+
- `baldart doctor` nudges (specs missing / prose-only)
|
|
237
|
+
|
|
238
|
+
### ds-new
|
|
239
|
+
|
|
240
|
+
**When to use**:
|
|
241
|
+
|
|
242
|
+
- Create ONE canonical element (a component OR a token) end-to-end: reuse-first → optional scaffold → document + register + govern + verify
|
|
243
|
+
- The on-the-fly twin of the bulk `design-system-init`; callable by `/prd` when reconciliation confirms a NEW component
|
|
244
|
+
|
|
245
|
+
**Triggers**:
|
|
246
|
+
|
|
247
|
+
- "/ds-new" · "/ds-new token [id]"
|
|
248
|
+
- "Nuovo componente design system" / "registra una primitive" / "aggiungi un token"
|
|
249
|
+
|
|
250
|
+
### ds-edit
|
|
251
|
+
|
|
252
|
+
**When to use**:
|
|
253
|
+
|
|
254
|
+
- Deliberately edit ONE existing element: resync / extend-variant / breaking / re-govern
|
|
255
|
+
- Regenerates the spec preserving agentic fields + prose
|
|
256
|
+
- NOT for the automatic mechanical doc-resync after a code change (that's already automatic via the `DS_COMPONENT_STALE` gate)
|
|
257
|
+
|
|
258
|
+
**Triggers**:
|
|
259
|
+
|
|
260
|
+
- "/ds-edit"
|
|
261
|
+
- "Aggiungi una variante" / "modifica un componente" / "breaking change su un componente"
|
|
262
|
+
|
|
263
|
+
### ds-render
|
|
264
|
+
|
|
265
|
+
**When to use**:
|
|
266
|
+
|
|
267
|
+
- Render design-system primitives in ISOLATION (one component × variant) to a PNG each
|
|
268
|
+
- Feeds isolated QUALITY verification (`/e2e-review` Phase 4b/4c) — never a fidelity diff
|
|
269
|
+
- Rides on a detected Storybook (clean no-op otherwise)
|
|
270
|
+
|
|
271
|
+
**Triggers**:
|
|
272
|
+
|
|
273
|
+
- "/ds-render"
|
|
274
|
+
- "Render i componenti" / "screenshot dei primitivi"
|
|
275
|
+
|
|
276
|
+
### ds-handoff
|
|
277
|
+
|
|
278
|
+
**When to use**:
|
|
279
|
+
|
|
280
|
+
- Produce the FIELD-LEVEL, 1:1 Claude Design handoff prompt — every screen's real fields (label / control / required / validation / default / enum / helper / readonly), grounded in the project's data schemas, coverage-gated before emission
|
|
281
|
+
- The single SSOT for the Claude Design prompt; `/prd` Step 3.0 Branch B delegates here
|
|
282
|
+
- Standalone for an ad-hoc orchestrator + `ui-expert` run
|
|
283
|
+
|
|
284
|
+
**Triggers**:
|
|
285
|
+
|
|
286
|
+
- "/ds-handoff [screens-or-feature]"
|
|
287
|
+
- "Handoff a Claude Design" / "prompt per Claude Design" / "brief field-level"
|
|
288
|
+
|
|
289
|
+
### design-sync
|
|
290
|
+
|
|
291
|
+
**When to use**:
|
|
292
|
+
|
|
293
|
+
- Mirror the in-repo registry (SSOT) UP to its Claude Design satellite (the code→design half of the closed loop)
|
|
294
|
+
- `publish` / `bootstrap` / `drift` modes; delegates every write to the DesignSync MCP; refuse-on-divergence
|
|
295
|
+
- Claude-only; interactive-auth (`/design-login`); no-op without a bound satellite
|
|
296
|
+
|
|
297
|
+
**Triggers**:
|
|
298
|
+
|
|
299
|
+
- "/design-sync"
|
|
300
|
+
- "Pubblica il design system" / "mirror su Claude Design" / "il designer ha cambiato qualcosa"
|
|
301
|
+
|
|
302
|
+
## Testing & Review Skills
|
|
303
|
+
|
|
304
|
+
### e2e-review
|
|
305
|
+
|
|
306
|
+
**When to use**:
|
|
307
|
+
|
|
308
|
+
- Deterministic BLOCKING end-to-end review after a feature is implemented
|
|
309
|
+
- Functional E2E (Playwright) + visual fidelity diff + design-quality critic, under a severity gate + bounded self-heal
|
|
310
|
+
- Auto-called by `/new` Phase 2.6; invocable manually
|
|
311
|
+
- Gated on `features.has_e2e_review`
|
|
312
|
+
|
|
313
|
+
**Triggers**:
|
|
314
|
+
|
|
315
|
+
- "/e2e-review CARD-ID"
|
|
316
|
+
- "Verifica end-to-end" / "review schermate" / "controlla i mockup"
|
|
140
317
|
|
|
141
318
|
### playwright-skill
|
|
142
319
|
|
|
@@ -166,7 +343,7 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
166
343
|
- Integration testing
|
|
167
344
|
- Server management needed
|
|
168
345
|
|
|
169
|
-
## Documentation Skills
|
|
346
|
+
## Documentation & Knowledge Skills
|
|
170
347
|
|
|
171
348
|
### doc-writing-for-rag
|
|
172
349
|
|
|
@@ -180,6 +357,64 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
180
357
|
- "doc per RAG" / "dense documentation"
|
|
181
358
|
- "template endpoint" / "compattare docs"
|
|
182
359
|
|
|
360
|
+
### capture
|
|
361
|
+
|
|
362
|
+
**When to use**:
|
|
363
|
+
|
|
364
|
+
- Distill a cross-document synthesis of the recent conversation into a reusable wiki synthesis page
|
|
365
|
+
- Implements Karpathy's query→wiki file-back loop
|
|
366
|
+
- Gated on `features.has_wiki_overlay`
|
|
367
|
+
|
|
368
|
+
**Triggers**:
|
|
369
|
+
|
|
370
|
+
- "/capture"
|
|
371
|
+
- "Salva sintesi" / "distilla conversazione" / "questa conversazione in wiki"
|
|
372
|
+
|
|
373
|
+
### graph-align
|
|
374
|
+
|
|
375
|
+
**When to use**:
|
|
376
|
+
|
|
377
|
+
- On-demand documentation alignment via the Graphify code knowledge graph
|
|
378
|
+
- Surface core code with no doc coverage, stale docs, drift vs the SSOT registry
|
|
379
|
+
- The interactive twin of the nightly `doc-graph-align` routine
|
|
380
|
+
- Gated on `features.has_code_graph`
|
|
381
|
+
|
|
382
|
+
**Triggers**:
|
|
383
|
+
|
|
384
|
+
- "/graph-align"
|
|
385
|
+
- "Allinea la documentazione" / "check doc coverage"
|
|
386
|
+
|
|
387
|
+
## Internationalization Skills
|
|
388
|
+
|
|
389
|
+
> Gated on `features.has_i18n: true`.
|
|
390
|
+
|
|
391
|
+
### i18n
|
|
392
|
+
|
|
393
|
+
**When to use**:
|
|
394
|
+
|
|
395
|
+
- Audit the i18n context registry against `t()` calls + native locale files (drift codes)
|
|
396
|
+
- Context-aware translation of missing/stale labels via the `i18n-translator` agent
|
|
397
|
+
- The interactive twin of the weekly `i18n-align` routine
|
|
398
|
+
|
|
399
|
+
**Triggers**:
|
|
400
|
+
|
|
401
|
+
- "/i18n"
|
|
402
|
+
- "Traduci le label" / "audit i18n" / "allinea le traduzioni"
|
|
403
|
+
|
|
404
|
+
### i18n-adopt
|
|
405
|
+
|
|
406
|
+
**When to use**:
|
|
407
|
+
|
|
408
|
+
- One-shot migration that externalizes ALL hardcoded user-facing strings on an existing codebase (the i18n analogue of `/design-system-init`)
|
|
409
|
+
- Full-auto on a dedicated branch, idempotent + resumable; never auto-merges
|
|
410
|
+
|
|
411
|
+
**Triggers**:
|
|
412
|
+
|
|
413
|
+
- "/i18n-adopt"
|
|
414
|
+
- "Migra a i18n" / "adotta i18n" / "externalize all strings"
|
|
415
|
+
|
|
416
|
+
## Product & Content Skills
|
|
417
|
+
|
|
183
418
|
### copywriting
|
|
184
419
|
|
|
185
420
|
**When to use**:
|
|
@@ -193,6 +428,152 @@ Map Claude Code skills to project domains and provide guidance on when to use ea
|
|
|
193
428
|
- "Migliora il testo"
|
|
194
429
|
- Landing/marketing content
|
|
195
430
|
|
|
431
|
+
### seo-audit
|
|
432
|
+
|
|
433
|
+
**When to use**:
|
|
434
|
+
|
|
435
|
+
- Audit / diagnose technical + on-page SEO issues on a site
|
|
436
|
+
|
|
437
|
+
**Triggers**:
|
|
438
|
+
|
|
439
|
+
- "/seo-audit"
|
|
440
|
+
- "SEO audit" / "why am I not ranking" / "meta tags review"
|
|
441
|
+
|
|
442
|
+
### api-design-principles
|
|
443
|
+
|
|
444
|
+
**When to use**:
|
|
445
|
+
|
|
446
|
+
- Designing a new API, reviewing an API spec, establishing API design standards (REST / GraphQL)
|
|
447
|
+
|
|
448
|
+
**Triggers**:
|
|
449
|
+
|
|
450
|
+
- "/api-design-principles"
|
|
451
|
+
- "Design this API" / "review API spec"
|
|
452
|
+
|
|
453
|
+
## Integration Skills
|
|
454
|
+
|
|
455
|
+
### kie-ai
|
|
456
|
+
|
|
457
|
+
**When to use**:
|
|
458
|
+
|
|
459
|
+
- Generate images / videos / audio via Kie.ai (80+ models), upscaling, background removal, TTS/SFX
|
|
460
|
+
|
|
461
|
+
**Triggers**:
|
|
462
|
+
|
|
463
|
+
- "/kie" / "/generate-image" / "/generate-video"
|
|
464
|
+
- "Genera immagine / video", model names ("nano banana", "veo", "kling", "suno"…)
|
|
465
|
+
|
|
466
|
+
### remotion-best-practices
|
|
467
|
+
|
|
468
|
+
**When to use**:
|
|
469
|
+
|
|
470
|
+
- Building video in React with Remotion (best practices guidance)
|
|
471
|
+
|
|
472
|
+
**Triggers**:
|
|
473
|
+
|
|
474
|
+
- "Remotion" / "video in React"
|
|
475
|
+
|
|
476
|
+
## Retrieval & Toolchain Bootstrap Skills
|
|
477
|
+
|
|
478
|
+
> Install/verify opt-in layers. Each is gated on its `features.*` flag and is
|
|
479
|
+
> idempotent (re-running re-verifies + reports drift).
|
|
480
|
+
|
|
481
|
+
### lsp-bootstrap
|
|
482
|
+
|
|
483
|
+
**When to use**:
|
|
484
|
+
|
|
485
|
+
- Install + verify the LSP symbol-search layer (language servers, `lsp.installed_servers`)
|
|
486
|
+
- After enabling `features.has_lsp_layer`
|
|
487
|
+
|
|
488
|
+
**Triggers**:
|
|
489
|
+
|
|
490
|
+
- "/lsp-bootstrap"
|
|
491
|
+
- "Install LSP" / "set up symbol search"
|
|
492
|
+
|
|
493
|
+
### graphify-bootstrap
|
|
494
|
+
|
|
495
|
+
**When to use**:
|
|
496
|
+
|
|
497
|
+
- Install + verify + wire the Graphify code-knowledge-graph layer (CLI, offline graph build, auto-rebuild hook, MCP)
|
|
498
|
+
- After enabling `features.has_code_graph`
|
|
499
|
+
|
|
500
|
+
**Triggers**:
|
|
501
|
+
|
|
502
|
+
- "/graphify-bootstrap"
|
|
503
|
+
- "Install graphify" / "set up the code graph"
|
|
504
|
+
|
|
505
|
+
### toolchain-bootstrap
|
|
506
|
+
|
|
507
|
+
**When to use**:
|
|
508
|
+
|
|
509
|
+
- Install + verify + wire the curated dev toolchain (Biome / Vitest / tsc / Lefthook) as devDeps
|
|
510
|
+
- After enabling `features.has_toolchain`
|
|
511
|
+
|
|
512
|
+
**Triggers**:
|
|
513
|
+
|
|
514
|
+
- "/toolchain-bootstrap"
|
|
515
|
+
- "Install the toolchain" / "set up biome"
|
|
516
|
+
|
|
517
|
+
## Framework Maintenance & Meta Skills
|
|
518
|
+
|
|
519
|
+
### baldart-update
|
|
520
|
+
|
|
521
|
+
**When to use**:
|
|
522
|
+
|
|
523
|
+
- Bring the BALDART framework up-to-date in a consumer repo (seamless `npx baldart update --yes`)
|
|
524
|
+
- The skill narrates the CLI; it never re-implements it
|
|
525
|
+
|
|
526
|
+
**Triggers**:
|
|
527
|
+
|
|
528
|
+
- "/baldart-update"
|
|
529
|
+
- "Aggiorna baldart" / "update del framework"
|
|
530
|
+
|
|
531
|
+
### baldart-push
|
|
532
|
+
|
|
533
|
+
**When to use**:
|
|
534
|
+
|
|
535
|
+
- Contribute local framework improvements upstream to the BALDART repo
|
|
536
|
+
- Hands off to `npx baldart push` (interactive); never pushes project-specific customizations
|
|
537
|
+
|
|
538
|
+
**Triggers**:
|
|
539
|
+
|
|
540
|
+
- "/baldart-push"
|
|
541
|
+
- "Contribuisci al framework" / "push del framework"
|
|
542
|
+
|
|
543
|
+
### overlay
|
|
544
|
+
|
|
545
|
+
**When to use**:
|
|
546
|
+
|
|
547
|
+
- Author `.baldart/overlays/` — the per-project customisation layer for skills / agents / commands
|
|
548
|
+
- Scaffolds + validates + surfaces drift via the CLI; often the answer when the `framework-edit-gate` hook blocked a direct edit
|
|
549
|
+
|
|
550
|
+
**Triggers**:
|
|
551
|
+
|
|
552
|
+
- "/overlay"
|
|
553
|
+
- "Customizza skill" / "override agent" / "personalizza comando"
|
|
554
|
+
|
|
555
|
+
### skill-creator
|
|
556
|
+
|
|
557
|
+
**When to use**:
|
|
558
|
+
|
|
559
|
+
- Create a new skill, or modify/optimize/measure an existing one
|
|
560
|
+
|
|
561
|
+
**Triggers**:
|
|
562
|
+
|
|
563
|
+
- "/skill-creator"
|
|
564
|
+
- "Crea una skill" / "improve this skill"
|
|
565
|
+
|
|
566
|
+
### find-skills
|
|
567
|
+
|
|
568
|
+
**When to use**:
|
|
569
|
+
|
|
570
|
+
- Discover/install agent skills when a needed capability might already exist as a skill
|
|
571
|
+
|
|
572
|
+
**Triggers**:
|
|
573
|
+
|
|
574
|
+
- "/find-skills"
|
|
575
|
+
- "Is there a skill that…" / "how do I do X"
|
|
576
|
+
|
|
196
577
|
## Project-Specific Skills
|
|
197
578
|
|
|
198
579
|
Add your project-specific skills here:
|
|
@@ -214,7 +595,8 @@ START: User gives a task
|
|
|
214
595
|
|
|
|
215
596
|
v
|
|
216
597
|
Is it a new feature needing scope/plan?
|
|
217
|
-
|-- YES --> /prd (scopes + plans + writes cards
|
|
598
|
+
|-- YES --> /prd (scopes + plans + writes cards; UI phase delegates the
|
|
599
|
+
| Claude Design prompt to /ds-handoff)
|
|
218
600
|
| Then /new (implements the cards end-to-end)
|
|
219
601
|
|
|
|
220
602
|
v
|
|
@@ -223,11 +605,22 @@ Is it a bug fix?
|
|
|
223
605
|
|
|
|
224
606
|
v
|
|
225
607
|
Is it UI/visual work?
|
|
226
|
-
|-- YES --> /ui-design (mockups/options) or frontend-design
|
|
608
|
+
|-- YES --> /ui-design (mockups/options) or frontend-design;
|
|
609
|
+
| motion → /motion-design
|
|
227
610
|
|
|
|
228
611
|
v
|
|
229
|
-
Is it
|
|
230
|
-
|-- YES -->
|
|
612
|
+
Is it design-system work (a component / token / handoff)?
|
|
613
|
+
|-- YES --> /ds-new (create) · /ds-edit (change) · /ds-render (isolate) ·
|
|
614
|
+
| /ds-handoff (Claude Design prompt) · /design-sync (mirror)
|
|
615
|
+
| (bootstrap the registry first with /design-system-init)
|
|
616
|
+
|
|
|
617
|
+
v
|
|
618
|
+
Is it internationalization?
|
|
619
|
+
|-- YES --> /i18n (audit + translate) or /i18n-adopt (one-shot migration)
|
|
620
|
+
|
|
|
621
|
+
v
|
|
622
|
+
Is it browser/E2E testing or review?
|
|
623
|
+
|-- YES --> playwright-skill / webapp-testing / /e2e-review (blocking)
|
|
231
624
|
|
|
|
232
625
|
v
|
|
233
626
|
Is it cleanup/complexity reduction?
|
|
@@ -250,7 +643,15 @@ Common skill chains (all skills below are shipped under `.claude/skills/`):
|
|
|
250
643
|
3. **UI Feature**:
|
|
251
644
|
- /prd → /ui-design → /new → playwright-skill (or /e2e-review for blocking E2E)
|
|
252
645
|
|
|
253
|
-
4. **
|
|
646
|
+
4. **UI Feature via Claude Design handoff**:
|
|
647
|
+
- /prd (Branch B) → /ds-handoff (field-level prompt) → [design in Claude Design]
|
|
648
|
+
→ /prd re-entry (mockup intake) → /new → /e2e-review
|
|
649
|
+
|
|
650
|
+
5. **Design System**:
|
|
651
|
+
- /design-system-init (bootstrap) → /ds-new / /ds-edit (evolve) → /ds-render
|
|
652
|
+
(verify isolated) → /design-sync (mirror to the satellite)
|
|
653
|
+
|
|
654
|
+
6. **Refactoring**:
|
|
254
655
|
- /simplify (identify + apply cleanups) → /new gates re-run lint/tsc/tests
|
|
255
656
|
|
|
256
657
|
## Anti-Patterns
|
|
@@ -263,6 +664,7 @@ Common skill chains (all skills below are shipped under `.claude/skills/`):
|
|
|
263
664
|
- Claim completion before the `/new` review + gate cycle passes
|
|
264
665
|
- Use wrong skill for the task
|
|
265
666
|
- Route to a skill name that has no directory under `.claude/skills/`
|
|
667
|
+
- Route to a feature-gated skill when its `features.*` flag is `false`
|
|
266
668
|
|
|
267
669
|
**Do**:
|
|
268
670
|
|
package/package.json
CHANGED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Claude Design Handoff Prompt — Template
|
|
2
|
-
|
|
3
|
-
> Template populated at runtime by **Step 3.0 (Mockup Source Decision)** in
|
|
4
|
-
> [../references/ui-design-phase.md](../references/ui-design-phase.md) when the
|
|
5
|
-
> user picks the **handoff** branch. All `{{placeholders}}` are resolved from the
|
|
6
|
-
> PRD state file (`${paths.prd_dir}/sessions/YYYY-MM-DD-<slug>-state.md`),
|
|
7
|
-
> `baldart.config.yml`, and optional overlays.
|
|
8
|
-
>
|
|
9
|
-
> Render rules:
|
|
10
|
-
> - Conditional sections (marked `{{#if …}} … {{/if}}`) are emitted only when the
|
|
11
|
-
> condition is true. Skip the entire section (including its heading) when false.
|
|
12
|
-
> - Lists (marked `{{#each …}}`) render one bullet per item; emit "—" if empty.
|
|
13
|
-
> - The rendered output is presented to the user inside a fenced markdown
|
|
14
|
-
> code-block so they can copy-paste verbatim into Claude Design.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# Feature: {{feature_title}}
|
|
19
|
-
|
|
20
|
-
## 1. Obiettivo
|
|
21
|
-
|
|
22
|
-
{{feature_objective_one_sentence}}
|
|
23
|
-
|
|
24
|
-
## 2. User flow
|
|
25
|
-
|
|
26
|
-
{{user_flow_summary}}
|
|
27
|
-
|
|
28
|
-
{{#if primary_personas}}
|
|
29
|
-
**Personas target**:
|
|
30
|
-
{{#each primary_personas}}
|
|
31
|
-
- {{this.name}} — {{this.context}}
|
|
32
|
-
{{/each}}
|
|
33
|
-
{{/if}}
|
|
34
|
-
|
|
35
|
-
## 3. Schermate in scope
|
|
36
|
-
|
|
37
|
-
> **Vincolo di tracciabilità funzionale.** Inserisci SOLO controlli (bottoni,
|
|
38
|
-
> icone-azione, voci di menu, tab, toggle) legati a una funzione elencata qui
|
|
39
|
-
> sotto. Non aggiungere chrome interattivo "per completezza visiva": ogni
|
|
40
|
-
> affordance senza funzione diventa codice morto in implementazione. Se proponi
|
|
41
|
-
> un elemento interattivo non presente nelle azioni primarie, segnalalo in
|
|
42
|
-
> consegna come *proposta da validare*, non come requisito. Gli elementi
|
|
43
|
-
> puramente decorativi (icone di sezione, marchi) marcali esplicitamente come
|
|
44
|
-
> **decorativi**.
|
|
45
|
-
|
|
46
|
-
{{#each screens_in_scope}}
|
|
47
|
-
### {{this.name}}
|
|
48
|
-
|
|
49
|
-
- **Scopo**: {{this.purpose}}
|
|
50
|
-
- **Stati richiesti**: {{this.states_required}} <!-- empty, loading, populated, error, success, ecc. -->
|
|
51
|
-
- **Azioni primarie**: {{this.primary_actions}}
|
|
52
|
-
- **Dati visualizzati**: {{this.data_shown}}
|
|
53
|
-
{{#if this.notes}}
|
|
54
|
-
- **Note**: {{this.notes}}
|
|
55
|
-
{{/if}}
|
|
56
|
-
|
|
57
|
-
{{/each}}
|
|
58
|
-
> **Nota per l'export.** Dai al canvas di questa feature un titolo che contenga il
|
|
59
|
-
> nome feature («{{feature_title}}»), e numera gli artboard in modo coerente con gli
|
|
60
|
-
> ID schermata qui sopra (es. schermata 3.1 → artboard `s31`). Scaricherò il bundle
|
|
61
|
-
> completo del workspace: questo mi permette di ritrovare esattamente le TUE schermate
|
|
62
|
-
> ed evitare ambiguità con le altre feature.
|
|
63
|
-
|
|
64
|
-
{{#if brand_voice}}
|
|
65
|
-
## 4. Brand & voice
|
|
66
|
-
|
|
67
|
-
- **Tono**: {{brand_voice.tone}}
|
|
68
|
-
- **Personalità**: {{brand_voice.personality}}
|
|
69
|
-
- **Do**: {{brand_voice.do}}
|
|
70
|
-
- **Don't**: {{brand_voice.dont}}
|
|
71
|
-
{{#if brand_voice.references}}
|
|
72
|
-
- **Riferimenti visivi**: {{brand_voice.references}}
|
|
73
|
-
{{/if}}
|
|
74
|
-
{{/if}}
|
|
75
|
-
|
|
76
|
-
{{#if has_design_system}}
|
|
77
|
-
## 5. Design system constraints
|
|
78
|
-
|
|
79
|
-
> Riusa SOLO i token e le primitive elencate. Se devi proporre qualcosa di nuovo,
|
|
80
|
-
> segnalalo esplicitamente nella consegna così posso aggiornare il registro.
|
|
81
|
-
|
|
82
|
-
### Token chiave
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
{{design_tokens_excerpt}}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Primitive da riusare
|
|
89
|
-
|
|
90
|
-
{{#each registered_primitives}}
|
|
91
|
-
- **{{this.name}}** — {{this.purpose}} ({{this.path}})
|
|
92
|
-
{{/each}}
|
|
93
|
-
|
|
94
|
-
### Vincoli numerici (da `design-system-protocol.md`)
|
|
95
|
-
|
|
96
|
-
- Type scale: {{tokens.type_scale}}
|
|
97
|
-
- Spacing scale: {{tokens.spacing_scale}}
|
|
98
|
-
- Radius: {{tokens.radius_scale}}
|
|
99
|
-
- Contrast minimo: {{tokens.contrast_target}} (WCAG AA + APCA Lc ≥ {{tokens.apca_target}})
|
|
100
|
-
- Motion durations: {{tokens.motion_durations}}
|
|
101
|
-
{{/if}}
|
|
102
|
-
|
|
103
|
-
## 6. Stack target
|
|
104
|
-
|
|
105
|
-
- **Framework**: {{stack.framework}}
|
|
106
|
-
- **Output preferito**: {{output_format_preference}} <!-- "HTML/CSS standalone" | "React component (Tailwind)" | "Figma frame" -->
|
|
107
|
-
{{#if stack.charting}}
|
|
108
|
-
- **Charting library**: {{stack.charting}}
|
|
109
|
-
{{/if}}
|
|
110
|
-
{{#if stack.animation}}
|
|
111
|
-
- **Animation library**: {{stack.animation}}
|
|
112
|
-
{{/if}}
|
|
113
|
-
|
|
114
|
-
## 7. Cosa restituirmi
|
|
115
|
-
|
|
116
|
-
Per ogni schermata elencata in § 3:
|
|
117
|
-
|
|
118
|
-
1. **PNG export** ad alta risoluzione (≥ 2x) di OGNI stato richiesto (es. `lista-ordini__empty.png`, `lista-ordini__populated.png`).
|
|
119
|
-
2. {{output_format_preference_block}} <!-- "Codice HTML/CSS in un file unico" | "Codice React (.tsx) con import Tailwind" | "Link Figma alla frame" -->
|
|
120
|
-
3. **Mappa di tracciabilità** — per OGNI elemento interattivo o iconografico
|
|
121
|
-
della schermata, una riga: `elemento → funzione che lo motiva` (l'azione
|
|
122
|
-
primaria / il dato di § 3 che serve), oppure marcalo **decorativo** se non ha
|
|
123
|
-
comportamento. Qualunque elemento che non riesci a tracciare a una funzione,
|
|
124
|
-
elencalo separatamente come *orphan da decidere* — così posso scegliere se
|
|
125
|
-
dargli una funzione, renderlo decorativo o rimuoverlo, invece di
|
|
126
|
-
implementarlo a vuoto.
|
|
127
|
-
4. **Note inline** su:
|
|
128
|
-
- Componenti nuovi (non presenti nel registry sopra) che hai introdotto e perché.
|
|
129
|
-
- Token deviation: qualunque colore/spacing/radius fuori dalla palette sopra, con motivazione.
|
|
130
|
-
- Decisioni di layout non ovvie (es. priority sort, hierarchy visiva, density).
|
|
131
|
-
|
|
132
|
-
Quando hai pronto, dimmi i **path locali** dei file (PNG/HTML/TSX) — li importerò in questa sessione PRD per analisi e validazione contro il design system.
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
<!-- baldart-handoff: do-not-edit-manually -->
|
|
137
|
-
<!-- Generated from claude-design-handoff-prompt.template.md by /prd Step 3.0 -->
|