baldart 4.82.0 → 4.84.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 +52 -0
- package/README.md +4 -2
- package/VERSION +1 -1
- package/framework/.claude/hooks/agent-discovery-gate.js +4 -2
- package/framework/.claude/skills/ds-handoff/CHANGELOG.md +20 -0
- package/framework/.claude/skills/ds-handoff/SKILL.md +22 -6
- package/framework/.claude/skills/ds-handoff/assets/claude-design-handoff-prompt.template.md +23 -2
- package/framework/.claude/skills/ds-handoff/references/decision-pass.md +94 -0
- package/framework/.claude/skills/ds-handoff/references/field-extraction.md +21 -1
- package/framework/.claude/skills/prd/references/ui-design-phase.md +9 -4
- package/framework/docs/ROOT-PRIMITIVES.md +98 -0
- package/framework/templates/primitives/AGENTS.CHANGELOG.md +18 -0
- package/framework/templates/primitives/AGENTS.md +111 -0
- package/framework/templates/primitives/CLAUDE.CHANGELOG.md +15 -0
- package/framework/templates/primitives/CLAUDE.md +41 -0
- package/package.json +1 -1
- package/src/commands/add.js +15 -0
- package/src/commands/doctor.js +65 -0
- package/src/commands/migrate.js +30 -0
- package/src/commands/update.js +31 -0
- package/src/utils/root-primitives.js +418 -0
- package/src/utils/symlinks.js +24 -10
- package/framework/AGENTS.md +0 -255
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,58 @@ 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.84.0] - 2026-07-01
|
|
9
|
+
|
|
10
|
+
**`/ds-handoff` decision & preference pass — anticipa le domande di Claude Design invece di rimandargliele.** Il prompt field-level di `ds-handoff` copriva un solo asse (correttezza dei *campi* via field-extraction + coverage gate) e lasciava scoperto il **secondo asse — le decisioni di design aperte + le preferenze di consegna** — che è esattamente ciò su cui Claude Design rimanda le domande all'utente (nel caso reale "Hub fornitore", 6 domande su 6 erano su questo asse, zero sui campi). Una era **auto-inflitta** (il PRD diceva *"da proporre"* e la skill l'ha inoltrata testualmente), un'altra su un fatto **già in mano alla skill** (enum categoria con `color`) mai tradotto in istruzione.
|
|
11
|
+
|
|
12
|
+
Il fix è **combinato**: (1) un nuovo **Step 5.5 — Decision & preference pass** (`references/decision-pass.md`) che risolve PRIMA di emettere le scelte aperte / formato consegna / scope stati / canvas / varianti — **triggered, non always-on** (stessa filosofia del BLOCK del coverage gate: parte solo se c'è un irrisolto, UNA `AskUserQuestion` consolidata, no-op quando nulla è aperto; per le decisioni aperte offre "decido io" vs "fai proporre N opzioni a Claude Design"); (2) **arricchimento** che pre-compila i fatti rilevabili — nuova **§ 0 "Direttive di consegna & decisioni"** nel template + regola **enum presentazionale** in `field-extraction.md` (metadata `color`/`icon`/`badge`/`label` → render hint automatico, non una domanda). Attivo standalone **e** delegato da `/prd` (Branch B ora inoltra le preferenze già risolte in Discovery → la skill riconcilia e chiede solo il residuo). **DEGRADE** su Codex/no-TTY: bake dei default DICHIARATI in § 0, mai abort.
|
|
13
|
+
|
|
14
|
+
Resta un *thin orchestrator*, **nessun dual-SSOT** (delivery/placement/varianti non sono in `design-system-protocol.md`). **MINOR** — capability additiva su una skill esistente. **Nessuna nuova chiave `baldart.config.yml`** (rides on `features.has_design_system`) → la schema-change propagation rule NON si applica. Skill versionata `1.0.0 → 1.1.0` (bump `version` + entry nel `CHANGELOG.md` per-skill, stesso edit).
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **`framework/.claude/skills/ds-handoff/references/decision-pass.md`** — il pre-emit Step 5.5: trigger inventory, `AskUserQuestion` consolidata, DEGRADE bake-defaults, riconciliazione in modalità delegata, false-positive guards.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **`framework/.claude/skills/ds-handoff/SKILL.md`** — nuovo Step 5.5 nel workflow, Step 6 popola anche § 0, Invocation + Inline fallbacks aggiornati; `version: 1.0.0 → 1.1.0`.
|
|
23
|
+
- **`framework/.claude/skills/ds-handoff/assets/claude-design-handoff-prompt.template.md`** — nuova § 0 "Direttive di consegna & decisioni"; § 7 rimanda a § 0 per il formato export.
|
|
24
|
+
- **`framework/.claude/skills/ds-handoff/references/field-extraction.md`** — regola enum presentazionale (render hint automatico) nel mapping + sezione dedicata.
|
|
25
|
+
- **`framework/.claude/skills/prd/references/ui-design-phase.md`** — Branch B inoltra a `/ds-handoff` le preferenze di consegna/decisione già emerse in Discovery.
|
|
26
|
+
- **`framework/.claude/skills/ds-handoff/CHANGELOG.md`** — entry `1.1.0`.
|
|
27
|
+
|
|
28
|
+
## [4.83.0] - 2026-07-01
|
|
29
|
+
|
|
30
|
+
**Versioned root-file primitives — BALDART now generates `AGENTS.md` + `CLAUDE.md` from SOTA skeletons.** Previously `AGENTS.md` was a bulk symlink into the framework payload (not customizable without losing auto-update) and `CLAUDE.md` was not shipped at all. Now both are **generated real files**, produced on every install/update from **versioned skeletons** under `framework/templates/primitives/`.
|
|
31
|
+
|
|
32
|
+
Each skeleton mixes three tiers: **STATIC** (universal SOTA prose, shipped verbatim) · **`{{ slot }}`** (project facts filled *deterministically* at write-time from `baldart.config.yml` + `package.json`/README probes — concrete values, so Codex/Cursor/Aider read real commands, never raw `${…}`) · **`[OVERLAY]`** (project opinions authored in `.baldart/overlays/{AGENTS,CLAUDE}.md`, merged via the existing OVERRIDE/APPEND/PREPEND engine). This split follows the 2026 research consensus (short hand-authored skeleton + project depth in the overlay; auto-generating a whole file with an LLM measurably reduces agent task success).
|
|
33
|
+
|
|
34
|
+
**`AGENTS.md` is the cross-tool SSOT** (read natively by Claude Code + Codex + others). **`CLAUDE.md` is a thin Claude-native stub** that deliberately does **not** import `AGENTS.md` (Claude Code loads both automatically → an `@AGENTS.md` would double-load the protocol) — it holds only Claude-only mechanics (Plan Mode / `AskUserQuestion` / Task tool / output-style / hooks). The writer (`src/utils/root-primitives.js`) reuses `overlay-merger.js` and the same `baldart-generated` marker, so the `framework-edit-gate` already blocks direct edits to the generated files (edit the overlay).
|
|
35
|
+
|
|
36
|
+
**Existing hand-written files are adopted zero-loss:** a consumer's hand-authored `AGENTS.md`/`CLAUDE.md` (no marker) is preserved **verbatim** into `.baldart/overlays/<name>.md`, then the root is regenerated as skeleton + overlay. Adoption is **interactive-gated** — in autonomous/CI mode a hand-written file is never mutated (the writer emits a blocker and skips it). Wired into `add` (post-configure), `update` (aligned + post-pull paths, idempotent + byte-stable), `doctor` (`regenerate-root-primitives` / `adopt-root-primitives` actions), and `migrate` (legacy symlink → generated file). Each skeleton carries its own `primitive_version` + a sibling `*.CHANGELOG.md` kept out of the generated file.
|
|
37
|
+
|
|
38
|
+
**MINOR** — additive capability. **No new `baldart.config.yml` key** (slots resolve from existing config + repo probes) → the schema-change propagation rule does NOT apply. Degrades safely: missing commands omit rows, non-multimodal/Codex consumers ignore `CLAUDE.md`, autonomous runs never mutate hand-written files. Authoritative design: [`framework/docs/ROOT-PRIMITIVES.md`](framework/docs/ROOT-PRIMITIVES.md).
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **`framework/templates/primitives/AGENTS.md` + `CLAUDE.md`** — the versioned SOTA skeletons (STATIC + `{{slot}}` + `[OVERLAY]` hook), each with a `primitive_version` banner.
|
|
43
|
+
- **`framework/templates/primitives/AGENTS.CHANGELOG.md` + `CLAUDE.CHANGELOG.md`** — internal per-primitive changelogs (kept out of the generated file).
|
|
44
|
+
- **`src/utils/root-primitives.js`** — the writer: slot resolver + minimal zero-dep template engine (`{{ }}` / `{{#flag}}` / `{{> partial}}`) + overlay merge + `baldart-generated` marker + state machine (generated / symlink / handwritten / absent) + `rootPrimitiveStatus()` for doctor.
|
|
45
|
+
- **`framework/docs/ROOT-PRIMITIVES.md`** — consumer-facing design/lifecycle/adoption doc.
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- **`src/utils/symlinks.js`** — `createBulkSymlinks()` no longer symlinks `AGENTS.md`; `createAllSymlinks()` calls the new `writeRootPrimitives()`; `verifySymlinks()` no longer expects `AGENTS.md` to be a symlink.
|
|
50
|
+
- **`src/commands/add.js`** — writes root primitives after `configure` populates the config (final concrete values).
|
|
51
|
+
- **`src/commands/update.js`** — regenerates root primitives on both the aligned-install and post-pull paths (`reconcileRootPrimitives`); adds `CLAUDE.md` to `BALDART_MANAGED_PATTERNS`.
|
|
52
|
+
- **`src/commands/doctor.js`** — detects stale/adoptable root primitives and offers `regenerate-root-primitives` / `adopt-root-primitives`.
|
|
53
|
+
- **`src/commands/migrate.js`** — converts a legacy `AGENTS.md` symlink into the generated file (Step 2b), idempotent.
|
|
54
|
+
- **`README.md`** — install description + repo-tree updated (AGENTS.md/CLAUDE.md generated, not symlinked).
|
|
55
|
+
|
|
56
|
+
### Removed
|
|
57
|
+
|
|
58
|
+
- **`framework/AGENTS.md`** — the old bulk-symlink source; its STATIC content now lives in `framework/templates/primitives/AGENTS.md` (single SSOT).
|
|
59
|
+
|
|
8
60
|
## [4.82.0] - 2026-07-01
|
|
9
61
|
|
|
10
62
|
**Mockup→code extracted into a dedicated self-verifying skill `/ui-implement` + skills are now versioned.** The mockup→code fidelity knowledge (v4.73→v4.78) was **inlined inside `/new`**: the "Design Reference" briefing (image/HTML/code-src branching), the design-source declaration + Step 7b grounding, and the Phase 2.6 `/e2e-review` invocation. This release **externalizes** it into one specialized, self-verifying skill and, separately, introduces **per-skill versioning + a canonical structure** across all skills.
|
package/README.md
CHANGED
|
@@ -66,7 +66,8 @@ npx baldart status
|
|
|
66
66
|
### What `add` (first install) does
|
|
67
67
|
|
|
68
68
|
- Downloads the framework via Git subtree into `.framework/`
|
|
69
|
-
- Creates
|
|
69
|
+
- Creates a symlink for the cross-tool `agents/` reference dir
|
|
70
|
+
- Generates the root-file primitives `AGENTS.md` (cross-tool SSOT) + `CLAUDE.md` (Claude entry) from versioned skeletons — filling project facts from `baldart.config.yml` and merging `.baldart/overlays/{AGENTS,CLAUDE}.md`
|
|
70
71
|
- Per-item-merges framework agents/commands/skills into `.claude/` (real directories where your own files coexist)
|
|
71
72
|
- Detects Codex on the machine and mirrors skills into `.agents/skills/` if found
|
|
72
73
|
- Copies customizable templates (hooks, UI guidelines, backlog cards)
|
|
@@ -365,7 +366,8 @@ npx baldart routines disable wiki-review # remove the schedule
|
|
|
365
366
|
```
|
|
366
367
|
your-project/
|
|
367
368
|
├── .framework/ # Framework source (via Git subtree)
|
|
368
|
-
├── AGENTS.md #
|
|
369
|
+
├── AGENTS.md # Generated from skeleton + config + overlay (cross-tool SSOT)
|
|
370
|
+
├── CLAUDE.md # Generated Claude Code entry (Claude-native mechanics)
|
|
369
371
|
├── agents/ # Symlink → .framework/agents/
|
|
370
372
|
├── .claude/
|
|
371
373
|
│ ├── agents/ # Symlink → .framework/.claude/agents/
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.84.0
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
* as BROKEN in some scenarios (files ignored at session start)
|
|
16
16
|
*
|
|
17
17
|
* This hook covers the filesystem-detectable subset of the problem
|
|
18
|
-
* (missing/broken symlinks). The model-side defense (the MUST rule in
|
|
19
|
-
* `
|
|
18
|
+
* (missing/broken symlinks). The model-side defense (the MUST rule in the
|
|
19
|
+
* generated root `AGENTS.md`, shipped from
|
|
20
|
+
* `framework/templates/primitives/AGENTS.md`) covers the rest. The two are
|
|
21
|
+
* inseparable:
|
|
20
22
|
* without the MUST rule, a `permissionDecision: deny` from this hook
|
|
21
23
|
* would likely be worked around by the model trying a different
|
|
22
24
|
* `subagent_type` — the very failure mode this hook exists to prevent.
|
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.1.0 — 2026-07-01
|
|
6
|
+
|
|
7
|
+
- **Decision & preference pass (Step 5.5)** — nuovo `references/decision-pass.md`.
|
|
8
|
+
Chiude l'asse *decisioni* (accanto all'asse *campi* del coverage gate): risolve
|
|
9
|
+
PRIMA di emettere le scelte di design aperte + preferenze di consegna che Claude
|
|
10
|
+
Design altrimenti rimanda all'utente come domande (token `da proporre`, formato
|
|
11
|
+
consegna, scope stati, canvas/placement, appetito varianti). Triggered-not-always-on,
|
|
12
|
+
UNA `AskUserQuestion` consolidata, no-op quando nulla è aperto; per le decisioni
|
|
13
|
+
aperte offre "decido io" vs "fai proporre N opzioni a Claude Design".
|
|
14
|
+
- **Template § 0 "Direttive di consegna & decisioni"** — nuova sezione che porta le
|
|
15
|
+
risposte del pass (placement, formato, stati da consegnare, decisioni aperte,
|
|
16
|
+
varianti) come direttive esplicite; § 7 ora rimanda a § 0 per il formato export.
|
|
17
|
+
- **Enum presentazionale** — `references/field-extraction.md` rileva metadata di
|
|
18
|
+
display (`color`/`icon`/`badge`/`label`) sulle opzioni enum ed emette un render
|
|
19
|
+
hint automatico (es. Categoria con colore → pallino colore per opzione), evitando
|
|
20
|
+
la domanda "come lo rendo?". Non è un `da definire` né una domanda.
|
|
21
|
+
- **DEGRADE** (Codex / no-TTY): il pass fa bake dei default e li DICHIARA in § 0,
|
|
22
|
+
mai abort. **Delegated mode**: riconcilia con le preferenze già risolte da `/prd`
|
|
23
|
+
(Branch B in `ui-design-phase.md` ora le inoltra), chiede solo il residuo.
|
|
24
|
+
|
|
5
25
|
## 1.0.0 — 2026-07-01
|
|
6
26
|
|
|
7
27
|
- Baseline: versioning per-skill introdotto al framework v4.82.0.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ds-handoff
|
|
3
3
|
effort: medium
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
description: >
|
|
6
6
|
Produce a FIELD-LEVEL, 1:1, interaction-complete handoff brief for Claude Design
|
|
7
7
|
— every screen's real fields (label, control type, required, validation, default,
|
|
@@ -67,7 +67,9 @@ user input. Level→behavior mapping, parsing contract, and precedence caveats:
|
|
|
67
67
|
`/ds-handoff <screens-or-feature>` (standalone) · `/ds-handoff` (ask). When called
|
|
68
68
|
by `/prd` Step 3.0 Branch B, the caller passes the resolved context (state-file
|
|
69
69
|
path + feature title/objective/user_flow/personas/screens_in_scope/mockup_analysis
|
|
70
|
-
+ brand + DS flag
|
|
70
|
+
+ brand + DS flag + any delivery/decision preferences already resolved in Discovery)
|
|
71
|
+
— skip the standalone screen-resolution prompt (Step 1's ask), and reconcile the
|
|
72
|
+
Step 5.5 decision pass against those preferences (ask only the residual).
|
|
71
73
|
|
|
72
74
|
## Pre-flight
|
|
73
75
|
|
|
@@ -120,10 +122,23 @@ Each step is a delegation. Read the cited SSOT; do not paraphrase it.
|
|
|
120
122
|
user-confirmation (present best-effort, ask the user to fill `da definire`);
|
|
121
123
|
never hard-abort.
|
|
122
124
|
|
|
125
|
+
This gate closes the **field** axis. The **decision** axis is Step 5.5.
|
|
126
|
+
|
|
127
|
+
5.5. **Decision & preference pass.** DELEGATE —
|
|
128
|
+
[references/decision-pass.md](references/decision-pass.md). Resolve the open
|
|
129
|
+
design choices + delivery/placement preferences that Claude Design would
|
|
130
|
+
otherwise bounce back as questions (the `da proporre` tokens, delivery format,
|
|
131
|
+
state scope, canvas, variation appetite). **Triggered, not always-on** — fires
|
|
132
|
+
only when an item is unresolved; ONE consolidated `AskUserQuestion`; a no-op when
|
|
133
|
+
nothing is open. **DEGRADE** (Codex / no-TTY): bake defaults and DECLARE them in
|
|
134
|
+
§ 0, never abort. **Delegated mode:** skip whatever `/prd` already resolved. The
|
|
135
|
+
answers populate the template's § 0.
|
|
136
|
+
|
|
123
137
|
6. **Fill the mandatory template.** Populate
|
|
124
138
|
[assets/claude-design-handoff-prompt.template.md](assets/claude-design-handoff-prompt.template.md)
|
|
125
|
-
with the
|
|
126
|
-
|
|
139
|
+
with the § 0 delivery/decision directives (from Step 5.5), the reconciled
|
|
140
|
+
per-screen specs + the top-level sections (brand / design system / stack / cosa
|
|
141
|
+
restituirmi). § 5's numeric constraints are the
|
|
127
142
|
`{{tokens.*}}` placeholders that **cite** `design-system-protocol.md` § Reference
|
|
128
143
|
Tables — copy values verbatim from the protocol, never invent numbers. Strip
|
|
129
144
|
empty conditionals.
|
|
@@ -152,8 +167,9 @@ Each step is a delegation. Read the cited SSOT; do not paraphrase it.
|
|
|
152
167
|
|
|
153
168
|
- **No `Workflow` tool needed** — this skill is prose-orchestrated.
|
|
154
169
|
- **Codex (no subagents):** Step 3's `codebase-architect` degrades to inline Grep
|
|
155
|
-
(per `references/field-extraction.md`); the gate degrades BLOCK →
|
|
156
|
-
|
|
170
|
+
(per `references/field-extraction.md`); the Step 5 gate degrades BLOCK →
|
|
171
|
+
user-confirmation; the Step 5.5 decision pass degrades to **bake-defaults**
|
|
172
|
+
declared in § 0 (per `references/decision-pass.md`). Runs end-to-end.
|
|
157
173
|
- **No LSP / no code-graph:** silent fallback down the retrieval order. Surface a
|
|
158
174
|
broken layer via `baldart doctor`, never abort here.
|
|
159
175
|
- **No formal schema in the stack:** the DEGRADE branch — best-effort inventory +
|
|
@@ -22,6 +22,23 @@
|
|
|
22
22
|
|
|
23
23
|
# Feature: {{feature_title}}
|
|
24
24
|
|
|
25
|
+
## 0. Direttive di consegna & decisioni
|
|
26
|
+
|
|
27
|
+
> Queste sono decisioni **già prese** (o esplicitamente delegate a te). Non
|
|
28
|
+
> richiedermele: seguile, oppure — dove indicato "proponi N opzioni" — proponi le
|
|
29
|
+
> alternative con i loro trade-off invece di sceglierne una a caso.
|
|
30
|
+
|
|
31
|
+
- **Dove collocarlo**: {{delivery.target_canvas}} <!-- es. "Nuovo canvas «Hub fornitore desktop/tablet», NON dentro il master-detail Fornitori esistente" -->
|
|
32
|
+
- **Formato di consegna**: {{delivery.output_delivery}} <!-- "1 artboard per stato (PNG ≥2x)" | "prototipo interattivo navigabile" | "entrambi" -->
|
|
33
|
+
- **Stati da consegnare**: {{delivery.states_to_deliver}} <!-- lista esplicita — consegna ESATTAMENTE questi, non chiedermi di deselezionare -->
|
|
34
|
+
{{#if delivery.open_decisions}}
|
|
35
|
+
- **Decisioni di design aperte**:
|
|
36
|
+
{{#each delivery.open_decisions}}
|
|
37
|
+
- **{{this.topic}}**: {{this.directive}} <!-- valore deciso, OPPURE "proponi {{this.n}} opzioni con trade-off" -->
|
|
38
|
+
{{/each}}
|
|
39
|
+
{{/if}}
|
|
40
|
+
- **Varianti**: {{delivery.variations}} <!-- "nessuna oltre le decisioni sopra" | assi richiesti (es. layout griglia, densità gruppi, posizione action bar) -->
|
|
41
|
+
|
|
25
42
|
## 1. Obiettivo
|
|
26
43
|
|
|
27
44
|
{{feature_objective_one_sentence}}
|
|
@@ -172,9 +189,13 @@
|
|
|
172
189
|
|
|
173
190
|
## 7. Cosa restituirmi
|
|
174
191
|
|
|
175
|
-
Per ogni schermata elencata in § 3
|
|
192
|
+
Per ogni schermata elencata in § 3, nel **formato di consegna deciso in § 0**
|
|
193
|
+
({{delivery.output_delivery}}):
|
|
176
194
|
|
|
177
|
-
1. **
|
|
195
|
+
1. **Export** ad alta risoluzione (≥ 2x) di OGNI stato in **§ 0 → Stati da
|
|
196
|
+
consegnare** (es. `dettaglio-fornitore__loading.png`,
|
|
197
|
+
`dettaglio-fornitore__populated.png`). Se § 0 chiede un prototipo interattivo,
|
|
198
|
+
consegna gli stati come schermi navigabili invece che come PNG separati.
|
|
178
199
|
2. {{output_format_preference_block}} <!-- "Codice HTML/CSS in un file unico" | "Codice React (.tsx) con import Tailwind" | "Link Figma alla frame" -->
|
|
179
200
|
3. **Mappa di tracciabilità campo→funzione** — per OGNI campo della field inventory,
|
|
180
201
|
conferma che sia presente e col controllo/mode indicati. Se un campo di § 3 manca
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Decision & preference pass — resolve the open choices BEFORE emitting
|
|
2
|
+
|
|
3
|
+
`ds-handoff` Step 5.5. Runs **after** the coverage gate (Step 5, which verifies the
|
|
4
|
+
*fields*) and **before** filling the template (Step 6). Where the coverage gate
|
|
5
|
+
closes the *data-correctness* axis, this pass closes the **decision axis**: the open
|
|
6
|
+
design choices, delivery preferences and workspace directives that — if left
|
|
7
|
+
implicit — Claude Design bounces back to the user as questions.
|
|
8
|
+
|
|
9
|
+
The failure this prevents: a prompt that says *"pattern editing per-sede, da
|
|
10
|
+
proporre"* forces Claude Design to STOP and ask which pattern; a prompt that lists
|
|
11
|
+
states but never says "deliver exactly these" invites a "deselect what you don't
|
|
12
|
+
need" round-trip; an enum with a colour but no render directive gets a "how do I
|
|
13
|
+
show the colour?" question. Every one of those is a decision BALDART can make (or
|
|
14
|
+
frame) up front.
|
|
15
|
+
|
|
16
|
+
**Same discipline as the coverage gate:** decision-**triggered**, not always-on —
|
|
17
|
+
it fires ONLY when there is an unresolved item; ONE consolidated `AskUserQuestion`;
|
|
18
|
+
never assume a default silently. If nothing is unresolved, this step is a **no-op**
|
|
19
|
+
and you proceed straight to Step 6.
|
|
20
|
+
|
|
21
|
+
## Trigger inventory — what makes the pass necessary
|
|
22
|
+
|
|
23
|
+
Scan the reconciled per-screen specs (Step 4 output: regions, actions, states,
|
|
24
|
+
list behaviour) plus the delegated/standalone context. An item is "unresolved" when:
|
|
25
|
+
|
|
26
|
+
| Item | Unresolved when… | Detection |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| **Open design decision** | an affordance/layout/pattern is explicitly left open | literal token `da proporre` / `da decidere` / `(… inline/pannello/rotta, da proporre)` / `TBD` / `?` in a region/action/state cell |
|
|
29
|
+
| **Delivery format** | not stated in context | no `output_delivery` in the delegated context / standalone args |
|
|
30
|
+
| **State scope** | states enumerated but not confirmed as the deliverable set | states present but no explicit "deliver these" directive |
|
|
31
|
+
| **Placement / canvas** | the Claude Design workspace target is unknown | no `target_canvas` in context |
|
|
32
|
+
| **Variation appetite** | the user's want for alternatives beyond the open decisions is unknown | not stated in context |
|
|
33
|
+
|
|
34
|
+
If EVERY row is already resolved (all decided in the source / passed by `/prd`),
|
|
35
|
+
**do not ask** — skip to Step 6.
|
|
36
|
+
|
|
37
|
+
## The consolidated AskUserQuestion (interactive, human present)
|
|
38
|
+
|
|
39
|
+
Raise **exactly ONE** `AskUserQuestion` covering only the unresolved rows. Suggested
|
|
40
|
+
questions (drop any that is already resolved; `multiSelect` where noted):
|
|
41
|
+
|
|
42
|
+
1. **Per each open design decision** — offer two shapes of resolution:
|
|
43
|
+
- *"Decido io"* → the user picks the concrete option (list the plausible ones:
|
|
44
|
+
e.g. inline / side-panel / dedicated route). The chosen value goes into §0 as a
|
|
45
|
+
firm directive.
|
|
46
|
+
- *"Fai proporre a Claude Design"* → frame it in the prompt as *"proponi N opzioni
|
|
47
|
+
per X con trade-off"*. This is legitimate — Claude Design is a design tool and
|
|
48
|
+
proposing is its job; the point is to make the ASK **intentional** in the prompt
|
|
49
|
+
instead of an accidental blocker.
|
|
50
|
+
2. **Formato di consegna** — `artboard-per-stato (PNG ≥2x)` (default) | `prototipo
|
|
51
|
+
interattivo navigabile` | both.
|
|
52
|
+
3. **Stati da consegnare** (`multiSelect`) — pre-checked with the full detected list;
|
|
53
|
+
the user unchecks any out of scope. The confirmed set becomes `states_to_deliver`.
|
|
54
|
+
4. **Placement / canvas** — `nuovo canvas dedicato «<feature>»` (default) | `dentro
|
|
55
|
+
un canvas esistente` (ask which).
|
|
56
|
+
5. **Varianti oltre le decisioni aperte** — `nessuna` (default) | pick axes (grid
|
|
57
|
+
layout, densità gruppi, posizione action bar, …).
|
|
58
|
+
|
|
59
|
+
Only after the user answers do you populate §0 and proceed to Step 6. Consistent with
|
|
60
|
+
always-ask-never-assume and "no silent deferral".
|
|
61
|
+
|
|
62
|
+
## DEGRADE (graceful — Codex / no-TTY / unattended)
|
|
63
|
+
|
|
64
|
+
When no interactive prompt is possible (Codex without subagents, no-TTY, an
|
|
65
|
+
autonomous run), do **not** hard-abort and do **not** ask. Instead **bake the
|
|
66
|
+
defaults** and **declare them explicitly** in §0 so the choice is visible, not
|
|
67
|
+
silent:
|
|
68
|
+
|
|
69
|
+
- Open decisions → framed as *"proponi 2 opzioni per X"* (let CD propose, since we
|
|
70
|
+
can't ask the user).
|
|
71
|
+
- Delivery → `artboard-per-stato (PNG ≥2x)`.
|
|
72
|
+
- States → deliver the full detected list.
|
|
73
|
+
- Placement → `nuovo canvas dedicato`.
|
|
74
|
+
- Variations → `nessuna`.
|
|
75
|
+
|
|
76
|
+
The prompt still ships, with an honest §0 the user can review — never an abort.
|
|
77
|
+
|
|
78
|
+
## Delegated-mode reconciliation (called from /prd)
|
|
79
|
+
|
|
80
|
+
When invoked from `/prd` Step 3.0 Branch B, the caller may already have resolved some
|
|
81
|
+
of these during Discovery (a delivery preference, a placement, an explicit design
|
|
82
|
+
decision). The passed context is authoritative: **skip every already-resolved row**
|
|
83
|
+
and ask only the residual. Never re-ask what `/prd` already knows. If the context
|
|
84
|
+
resolves everything, the pass is a no-op even in delegated mode.
|
|
85
|
+
|
|
86
|
+
## False-positive guards (do NOT treat as an open decision)
|
|
87
|
+
|
|
88
|
+
- **Descriptive prose that isn't a bivio** — a region note like "header con nome e
|
|
89
|
+
stato" is a spec, not a choice. Only a literal open-choice token (see the trigger
|
|
90
|
+
table) counts.
|
|
91
|
+
- **Fields** — those are the coverage gate's job (Step 5), not this pass. A `da
|
|
92
|
+
definire` cell is a *data* gap, not a *decision*; do not surface it here.
|
|
93
|
+
- **Already-decided affordances** — an action with a concrete effect/destination is
|
|
94
|
+
resolved; don't ask about it.
|
|
@@ -44,7 +44,7 @@ Anything you cannot ground in code is the **literal `da definire`** — never a
|
|
|
44
44
|
| **Required** | `sì` unless `.optional()` / `.nullish()` / `?` / `.partial()`. | `da definire` |
|
|
45
45
|
| **Validazione/Vincoli** | `.min()`/`.max()`/`.length()`/`.regex()`/`.email()`/`.url()`/`.int()`/`.positive()`/refinements. | `—` if none |
|
|
46
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` |
|
|
47
|
+
| **Opzioni / sorgente enum** | `z.enum([...])` / `z.nativeEnum` literals verbatim; a `z.string()` whose options come from a runtime query → `"query runtime — da definire"`. When the option source carries **presentational metadata**, add the render hint (see below). | `—` / `da definire` |
|
|
48
48
|
| **Helper text** | JSDoc on the field; the i18n `context` for the key; an existing form description. | `da definire` |
|
|
49
49
|
| **Mode** | `editable` by default; `readonly` for server-set / computed fields (see below). | `editable` |
|
|
50
50
|
| **Card/gruppo** | From `mockup_analysis.screens[].layout` when present, else the reconciliation decision (Step 4). | `da definire` |
|
|
@@ -57,6 +57,7 @@ component binding, a form control already in code) over the heuristic when prese
|
|
|
57
57
|
| Schema / type shape | Control |
|
|
58
58
|
|---|---|
|
|
59
59
|
| `z.enum([...])` / `z.nativeEnum` / union of string literals | `select` (or `radio` for ≤ 3 options / `segmented` per project convention) |
|
|
60
|
+
| enum whose option source carries **presentational metadata** (`color` / `icon` / `badge` / `label`) — a lookup table, a `const` map, a DB category with a colour | `select` **+ a render hint** (see "Presentational enums" below) |
|
|
60
61
|
| `z.boolean()` | `toggle` (or `checkbox`) |
|
|
61
62
|
| `z.string()` short (no/small `.max`) | `text input` |
|
|
62
63
|
| `z.string()` long (`.max` ≥ ~200, or named `notes`/`description`/`body`) | `textarea` |
|
|
@@ -69,6 +70,25 @@ component binding, a form control already in code) over the heuristic when prese
|
|
|
69
70
|
| `z.array(z.string())` from a known set | `multi-select` |
|
|
70
71
|
| `z.object(...)` nested | a sub-group / sub-card |
|
|
71
72
|
|
|
73
|
+
## Presentational enums (pre-empt the "how do I render it?" question)
|
|
74
|
+
|
|
75
|
+
When an enum's options are not bare strings but carry **display metadata** — a
|
|
76
|
+
category with a `color`, a status with an `icon`, an option with a human `label`
|
|
77
|
+
distinct from its value — capturing the values alone leaves Claude Design to guess
|
|
78
|
+
*how* to render them, which becomes a round-trip question. Instead, **detect the
|
|
79
|
+
extra fields and emit a render hint** in the Opzioni cell, so the directive is
|
|
80
|
+
explicit:
|
|
81
|
+
|
|
82
|
+
- Colour per option → `"<EnumName> (name + color) → pallino/badge colore per opzione; colore = .color"`.
|
|
83
|
+
- Icon per option → `"<EnumName> (name + icon) → icona per opzione; icona = .icon"`.
|
|
84
|
+
- Human label ≠ value → give both: `"value → «Label»"` per option.
|
|
85
|
+
|
|
86
|
+
Ground the metadata the same way as the enum itself (the lookup table / `const` map
|
|
87
|
+
/ schema). If the option list is a runtime query, still note the presentational field
|
|
88
|
+
if the row shape exposes it (`"query runtime — ogni riga ha { name, color }"`). This
|
|
89
|
+
is a documented hint the extraction step fills automatically — it is **not** a `da
|
|
90
|
+
definire` and it is **not** a user question.
|
|
91
|
+
|
|
72
92
|
## Readonly detection
|
|
73
93
|
|
|
74
94
|
Mark a field **readonly** (static text, no editable control) when it is not
|
|
@@ -46,10 +46,15 @@ delegate-or-else-inline contract as `/prd` → `/ds-new`.)
|
|
|
46
46
|
per-screen routing table");
|
|
47
47
|
- `mockup_analysis` from `## UI Design` if present (the skill reads its
|
|
48
48
|
`layout / component_props / states / responsive` as input);
|
|
49
|
-
- the `features.has_design_system` flag (the skill omits § 5 when `false`)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
- the `features.has_design_system` flag (the skill omits § 5 when `false`);
|
|
50
|
+
- **any delivery/decision preferences already surfaced in Discovery** (output
|
|
51
|
+
format, target canvas, a design decision the user already made) — `/ds-handoff`
|
|
52
|
+
runs a **decision pass** (its Step 5.5) before emitting, and reconciles against
|
|
53
|
+
what you pass so it asks only the residual, never re-asking the known.
|
|
54
|
+
|
|
55
|
+
`/ds-handoff` runs field extraction + the coverage gate + the decision pass + the
|
|
56
|
+
mandatory template and returns the **rendered prompt** plus the
|
|
57
|
+
**`field-inventory.md` path**.
|
|
53
58
|
|
|
54
59
|
**Graceful fallback** — if `/ds-handoff` is unavailable (Codex without it linked,
|
|
55
60
|
or an older install): render a **coarse** brief inline from `screens_in_scope[]`
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Root-file primitives — `AGENTS.md` + `CLAUDE.md`
|
|
2
|
+
|
|
3
|
+
Since **v4.83.0** BALDART ships **versioned skeletons** for the two most important
|
|
4
|
+
files in any AI-assisted repo and generates concrete, project-specific versions of
|
|
5
|
+
them on every install/update.
|
|
6
|
+
|
|
7
|
+
- **`AGENTS.md`** — the **cross-tool single source of truth** (read natively by Claude
|
|
8
|
+
Code, Codex, Cursor, Aider, …). Holds the coordination protocol: MUST rules, git
|
|
9
|
+
workflow, gates, execution modes, routing.
|
|
10
|
+
- **`CLAUDE.md`** — a **thin Claude-native stub**. Claude Code loads *both* files
|
|
11
|
+
automatically, so `CLAUDE.md` does **not** import `AGENTS.md` (that would double-load
|
|
12
|
+
the protocol into context). It carries only the Claude-only mechanics: Plan Mode
|
|
13
|
+
(`EnterPlanMode`/`ExitPlanMode`), `AskUserQuestion` discipline, the Task-tool subagent
|
|
14
|
+
roster, output-style, hooks.
|
|
15
|
+
|
|
16
|
+
Before v4.83.0, `AGENTS.md` was a bulk symlink into the framework payload (not
|
|
17
|
+
customizable without losing auto-update) and `CLAUDE.md` was not shipped at all.
|
|
18
|
+
|
|
19
|
+
## Three tiers
|
|
20
|
+
|
|
21
|
+
Each skeleton mixes exactly three kinds of content:
|
|
22
|
+
|
|
23
|
+
| Tier | What | Who authors it |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| **STATIC** | universal SOTA prose, identical for every project | the shipped primitive (versioned) |
|
|
26
|
+
| **`{{ slot }}`** | project facts, filled deterministically at write-time | the writer (`src/utils/root-primitives.js`) — pure substitution, never LLM invention |
|
|
27
|
+
| **`[OVERLAY]`** | project opinions / war-stories / KPIs / design rules | the repo owner, in `.baldart/overlays/{AGENTS,CLAUDE}.md` |
|
|
28
|
+
|
|
29
|
+
This split follows the 2026 research consensus: a shipped skeleton stays **short and
|
|
30
|
+
hand-authored**; project depth lives in the overlay (auto-generating a whole
|
|
31
|
+
`AGENTS.md`/`CLAUDE.md` with an LLM measurably *reduces* agent task success).
|
|
32
|
+
|
|
33
|
+
## Slot resolution (deterministic)
|
|
34
|
+
|
|
35
|
+
The writer resolves every slot from `baldart.config.yml` + repo probes — no new config
|
|
36
|
+
key was introduced:
|
|
37
|
+
|
|
38
|
+
| Slot | Source |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `identity.name` | `identity.brand_name` → `package.json` name → dir basename |
|
|
41
|
+
| `identity.description` | README first paragraph → `package.json` description → visible `<!-- TODO -->` |
|
|
42
|
+
| `stack.summary` | composed from `stack.framework` + `database` + `auth_provider` + `testing.e2e` + `toolchain.installed_tools` |
|
|
43
|
+
| `stack.node` | `package.json` `engines.node` → `.nvmrc` |
|
|
44
|
+
| Commands table | `toolchain.commands.*` → `package.json` scripts (rows with no source are omitted) |
|
|
45
|
+
| Repo map | non-empty `paths.*` + a derived source root |
|
|
46
|
+
| `git.trunk_branch` | `git.trunk_branch` |
|
|
47
|
+
| feature gates | `features.has_backlog` / `has_adrs` / `has_i18n` / `has_design_system` |
|
|
48
|
+
|
|
49
|
+
## Overlay
|
|
50
|
+
|
|
51
|
+
`.baldart/overlays/AGENTS.md` (and `…/CLAUDE.md`) use the **same** merge engine as agent
|
|
52
|
+
and command overlays (`overlay-merger.js`):
|
|
53
|
+
|
|
54
|
+
- `## [OVERRIDE] <section>` — replace a section from the skeleton.
|
|
55
|
+
- `## [APPEND] <section>` — append to a section.
|
|
56
|
+
- `## [PREPEND] <section>` — prepend to a section.
|
|
57
|
+
- a plain `## <heading>` — add a new section at the end.
|
|
58
|
+
|
|
59
|
+
Author overlays with `/overlay` or by hand. The generated root file carries a
|
|
60
|
+
`baldart-generated` marker and the `framework-edit-gate` hook blocks direct edits to it —
|
|
61
|
+
edit the overlay, not the file.
|
|
62
|
+
|
|
63
|
+
## Lifecycle
|
|
64
|
+
|
|
65
|
+
- **`baldart add`** — after `configure` populates `baldart.config.yml`, the writer
|
|
66
|
+
generates both files with concrete values.
|
|
67
|
+
- **`baldart update`** — regenerates on both the aligned-install and post-pull paths.
|
|
68
|
+
**Byte-stable**: unchanged inputs produce no diff.
|
|
69
|
+
- **`baldart doctor`** — flags `regenerate-root-primitives` when a file is missing, still
|
|
70
|
+
a legacy symlink, or drifted (skeleton / overlay / config change), and
|
|
71
|
+
`adopt-root-primitives` for a handwritten file.
|
|
72
|
+
- **`baldart migrate`** — converts a legacy `AGENTS.md` symlink into the generated file.
|
|
73
|
+
|
|
74
|
+
## Adoption (existing hand-written files — zero loss)
|
|
75
|
+
|
|
76
|
+
If a consumer already has a hand-authored `AGENTS.md` or `CLAUDE.md` (no
|
|
77
|
+
`baldart-generated` marker), the writer **adopts** it: the entire file is preserved
|
|
78
|
+
verbatim into `.baldart/overlays/<name>.md`, and the root is regenerated as skeleton +
|
|
79
|
+
overlay (so nothing is lost). You are told to review and re-file — much of a rich
|
|
80
|
+
`CLAUDE.md` typically belongs in the **AGENTS.md** overlay (cross-tool), not CLAUDE.md.
|
|
81
|
+
|
|
82
|
+
**Adoption is interactive-gated.** In autonomous/CI mode (`CI` / `BALDART_AUTONOMOUS` /
|
|
83
|
+
no TTY) a hand-written file is **never mutated**: the writer emits a blocker and skips it,
|
|
84
|
+
so a routine unattended update never silently transforms your file.
|
|
85
|
+
|
|
86
|
+
## Versioning
|
|
87
|
+
|
|
88
|
+
Each skeleton carries a `primitive_version` (SemVer, its own line of evolution,
|
|
89
|
+
independent of the framework `VERSION`) in its banner, plus a sibling
|
|
90
|
+
`framework/templates/primitives/<NAME>.CHANGELOG.md` kept **out** of the generated file
|
|
91
|
+
so version history never costs context. Bump `primitive_version` + add a changelog entry
|
|
92
|
+
whenever a skeleton changes.
|
|
93
|
+
|
|
94
|
+
## Files
|
|
95
|
+
|
|
96
|
+
- `framework/templates/primitives/AGENTS.md` · `CLAUDE.md` — the skeletons.
|
|
97
|
+
- `framework/templates/primitives/AGENTS.CHANGELOG.md` · `CLAUDE.CHANGELOG.md` — internal changelogs.
|
|
98
|
+
- `src/utils/root-primitives.js` — the writer (resolve → template → merge → marker → write) + `rootPrimitiveStatus` (doctor).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog — AGENTS.md primitive
|
|
2
|
+
|
|
3
|
+
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
|
+
Questo è il changelog INTERNO dello skeleton spedito (`primitive_version`), separato dal
|
|
5
|
+
file `AGENTS.md` generato nel consumer e indipendente dal `VERSION` del framework.
|
|
6
|
+
|
|
7
|
+
## 1.0.0 — 2026-07-01
|
|
8
|
+
|
|
9
|
+
- Primo skeleton SOTA cross-tool (framework v4.83.0). Sostituisce il bulk symlink di
|
|
10
|
+
`AGENTS.md` con un real-file **generato**: contenuto STATIC universale + slot `{{ }}`
|
|
11
|
+
riempiti a write-time da `baldart.config.yml` (identity/stack/paths/commands/git) +
|
|
12
|
+
hook `[OVERLAY]` per `.baldart/overlays/AGENTS.md`.
|
|
13
|
+
- Struttura: Commands (partial, comandi concreti) · Repo Map (partial) · Non-negotiables
|
|
14
|
+
(universal + feature-gated) · Git Workflow · Workflow Gates · Execution Modes ·
|
|
15
|
+
Priority & Conflict · Routing.
|
|
16
|
+
- Le meccaniche solo-Claude (EnterPlanMode/AskUserQuestion/Task) NON stanno qui: vivono
|
|
17
|
+
nello stub `CLAUDE.md`. La ricchezza project-specific (war-story/KPI/regole design) va
|
|
18
|
+
in overlay, non nello skeleton (best practice 2026: skeleton corto, no auto-generazione).
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<!-- baldart-primitive: name=AGENTS primitive_version=1.0.0
|
|
2
|
+
This is the SHIPPED SKELETON. The writer (src/utils/root-primitives.js) strips
|
|
3
|
+
this banner, resolves every {{ slot }} / {{> partial }} / {{#flag}} from
|
|
4
|
+
baldart.config.yml (+ package.json/README), merges .baldart/overlays/AGENTS.md,
|
|
5
|
+
stamps a baldart-generated marker, and writes the result to the repo root.
|
|
6
|
+
Tiers: STATIC (verbatim) · {{slot}} (config fill) · [OVERLAY] (project opinions).
|
|
7
|
+
Edit the OVERLAY, never the generated root AGENTS.md. -->
|
|
8
|
+
# {{ identity.name }} — Agent Protocol (AGENTS.md)
|
|
9
|
+
|
|
10
|
+
{{ identity.description }}
|
|
11
|
+
Stack: {{ stack.summary }}.{{ stack.node_suffix }}
|
|
12
|
+
|
|
13
|
+
Mandatory coordination rules for all agents (Claude / Codex / humans). Read by every
|
|
14
|
+
AI tool that supports AGENTS.md. If context is limited, follow **MUST** rules and
|
|
15
|
+
**Routing** first. Claude Code additionally loads `CLAUDE.md`, which adds Claude-native
|
|
16
|
+
mechanics — this file remains the single source of truth for the protocol.
|
|
17
|
+
|
|
18
|
+
{{> commands_section }}
|
|
19
|
+
## Repo Map
|
|
20
|
+
|
|
21
|
+
{{> repo_map }}
|
|
22
|
+
|
|
23
|
+
## Non-negotiables (MUST)
|
|
24
|
+
|
|
25
|
+
**Universal (every project):**
|
|
26
|
+
- MUST treat `AGENTS.md` as authoritative for agent rules.
|
|
27
|
+
- MUST understand the codebase before planning/implementing — invoke `codebase-architect`
|
|
28
|
+
(Claude Code: Task tool `subagent_type: codebase-architect`; Codex: the custom agent by
|
|
29
|
+
name at `.codex/agents/codebase-architect.toml`). Only if NEITHER mechanism exists,
|
|
30
|
+
degrade explicitly to inline retrieval (code-graph → LSP → Grep) and SAY SO.
|
|
31
|
+
- MUST NOT silently substitute a different agent when an invocation returns empty / times
|
|
32
|
+
out / is denied — STOP, report verbatim, and wait. Never auto-route to a generic agent.
|
|
33
|
+
- MUST NOT work on files another agent has claimed; parallel work only on independent areas.
|
|
34
|
+
- MUST do a clarity analysis before fixing anything labeled `bug` — no blind guessing.
|
|
35
|
+
- MUST mark missing info UNKNOWN and ask; if blocked, set `BLOCKED` with the blocker.
|
|
36
|
+
- MUST NOT make forbidden assumptions: provider/auth swap, DB-schema change without a
|
|
37
|
+
data-model update, new external dependency without docs, API-contract change without an
|
|
38
|
+
API-reference update.
|
|
39
|
+
- MUST keep docs and code in sync — a code change without the matching doc update is invalid.
|
|
40
|
+
- MUST use commit format `{{ git.commit_format }}`; small, traceable commits.
|
|
41
|
+
- MUST NOT commit with failing lint/type checks. Full build only before opening a PR.
|
|
42
|
+
- MUST pre-sync (`git fetch`, clean status, confirm branch, `--ff-only`) and NEVER push
|
|
43
|
+
directly to `{{ git.trunk_branch }}` — all changes reach it via PR.
|
|
44
|
+
- MUST get owner approval before force-push/reset or deleting an UNMERGED branch (create a
|
|
45
|
+
`backup/<YYYYMMDD>-<reason>` tag first). Deleting an already-merged branch is routine.
|
|
46
|
+
- MUST run the testing gates before DONE (see § Workflow Gates).
|
|
47
|
+
|
|
48
|
+
**Feature-gated (active only when the flag is `true` in `baldart.config.yml`):**
|
|
49
|
+
{{#has_backlog}}
|
|
50
|
+
- Backlog: pick one card (TODO/READY), set `IN_PROGRESS`, assign yourself, branch-per-card
|
|
51
|
+
(`{{ git.feature_prefix }}/<CARD-ID>-slug`), keep status current, document before merge.
|
|
52
|
+
{{/has_backlog}}
|
|
53
|
+
{{#has_adrs}}
|
|
54
|
+
- ADRs: write complete records (Context / Decision / Rationale / Alternatives / Consequences,
|
|
55
|
+
no TODO placeholders) for architectural decisions.
|
|
56
|
+
{{/has_adrs}}
|
|
57
|
+
{{#has_i18n}}
|
|
58
|
+
- i18n: NO hardcoded user-facing strings; every label via `t()` + a key in
|
|
59
|
+
`{{ i18n.registry }}`. Enforced by the anti-hardcoded lint gate.
|
|
60
|
+
{{/has_i18n}}
|
|
61
|
+
{{#has_design_system}}
|
|
62
|
+
- Design system: the BLOCKING read cascade applies before any UI work — read the registry
|
|
63
|
+
`INDEX.md` → the per-component spec → the token SSOT (see § Routing).
|
|
64
|
+
{{/has_design_system}}
|
|
65
|
+
{{#has_project_status}}
|
|
66
|
+
- Status doc: update its Active Code Context before work; keep it < 200 lines; archive
|
|
67
|
+
entries older than 7 days to `work-history.md`.
|
|
68
|
+
{{/has_project_status}}
|
|
69
|
+
|
|
70
|
+
## Git Workflow
|
|
71
|
+
|
|
72
|
+
Branch naming: `{{ git.feature_prefix }}/<CARD-ID>-slug` (local), `codex/…` or `claude/…`
|
|
73
|
+
(cloud agents), `hotfix/<ID>-slug` (production fixes). Branches are created by the
|
|
74
|
+
orchestrator (`/nw`, `/new`) or the user — **never by the `coder` agent** (it implements on
|
|
75
|
+
the branch it was spawned on). Stage explicit filenames only; never bundle unrelated changes.
|
|
76
|
+
|
|
77
|
+
## Workflow Gates
|
|
78
|
+
|
|
79
|
+
**Pre-commit (fast, every commit):** lint · type check{{#has_i18n}} · the i18n anti-hardcoded
|
|
80
|
+
gate{{/has_i18n}} · markdown-lint on changed `.md`. Fix all errors before `git add`. Do NOT
|
|
81
|
+
run a full build every commit.
|
|
82
|
+
|
|
83
|
+
**Pre-PR (once, before opening a PR):** full build (must pass) · unit tests (if they exist) ·
|
|
84
|
+
E2E for critical-flow changes.
|
|
85
|
+
|
|
86
|
+
## Execution Modes
|
|
87
|
+
|
|
88
|
+
| Mode | Branch | Validation |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| `local` | `{{ git.feature_prefix }}/<CARD-ID>-slug` → PR to `{{ git.trunk_branch }}` | manual run mandatory |
|
|
91
|
+
| `cloud` | `codex/…` or `claude/…` → PR to `{{ git.trunk_branch }}` | CI-first; local advisory |
|
|
92
|
+
| `hotfix` | `hotfix/<BUG-ID>-slug` | owner approval |
|
|
93
|
+
|
|
94
|
+
## Priority & Conflict
|
|
95
|
+
|
|
96
|
+
Priority: `AGENTS.md` → `agents/index.md` → domain references → ADRs → `archive/`.
|
|
97
|
+
On conflict: stop → read both → decide which is newer → update the other → record the
|
|
98
|
+
decision in an ADR + the backlog card.
|
|
99
|
+
|
|
100
|
+
## Routing
|
|
101
|
+
|
|
102
|
+
- Docs routing (touch X → read/update Y): `agents/index.md`.
|
|
103
|
+
- Agent invocation routing: `.claude/agents/REGISTRY.md` (SSOT). Update it when adding agents.
|
|
104
|
+
- Domain protocols load on demand from `agents/*.md` (architecture, testing, security,
|
|
105
|
+
design-system-protocol, i18n-protocol, …) — never load them all at once.
|
|
106
|
+
|
|
107
|
+
<!-- OVERLAY: project-specific rules live in `.baldart/overlays/AGENTS.md` and are merged
|
|
108
|
+
below this line. Use `## [APPEND] <section>` to extend a section above, `## [OVERRIDE]
|
|
109
|
+
<section>` to replace one, or a plain `## <heading>` to add a new section. Typical
|
|
110
|
+
content: design-system rules · DB/migration discipline · NFR/KPI targets · security
|
|
111
|
+
specifics · project war-stories & ADR pointers · custom commands. -->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog — CLAUDE.md primitive
|
|
2
|
+
|
|
3
|
+
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
|
+
Changelog INTERNO dello stub spedito (`primitive_version`), separato dal `CLAUDE.md`
|
|
5
|
+
generato nel consumer e indipendente dal `VERSION` del framework.
|
|
6
|
+
|
|
7
|
+
## 1.0.0 — 2026-07-01
|
|
8
|
+
|
|
9
|
+
- Primo stub Claude-native (framework v4.83.0). BALDART inizia a spedire `CLAUDE.md`.
|
|
10
|
+
- Deliberatamente **non** importa `AGENTS.md` (Claude Code carica entrambi i file
|
|
11
|
+
nativamente → un `@AGENTS.md` raddoppierebbe il protocollo in contesto). Contiene solo:
|
|
12
|
+
Plan Mode (EnterPlanMode/plan-auditor/doc-reviewer/ExitPlanMode), User Interaction
|
|
13
|
+
(AskUserQuestion = stop-and-wait), Subagents & tooling (Task tool, output-style, hooks).
|
|
14
|
+
- Hook `[OVERLAY]` per `.baldart/overlays/CLAUDE.md`; le regole cross-tool vanno
|
|
15
|
+
nell'overlay di AGENTS.md, non qui.
|