baldart 4.0.2 → 4.0.4

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 CHANGED
@@ -5,6 +5,27 @@ 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.0.4] - 2026-06-02
9
+
10
+ **Portability fix (visual identity): genericize the last fidelity-app visual-identity flavor in doc-RAG worked examples.** Confirms the graphic dimension is clean: `Neo-Brutalism` (plus the `Press Start 2P` font and `amber accents`) appeared as bare styling labels in the `doc-writing-for-rag` before/after examples — now generalized to "the project's design system (per `identity.design_philosophy`)". No behaviour change → **PATCH**.
11
+
12
+ > **Why / scope confirmation.** After this, project-specific visual identity exists in the shipped payload ONLY where it should: as a config-driven example value (`identity.design_philosophy` e.g. "Neo-Brutalism" / "Minimalist" / "Glassmorphism"), in the config documentation (`PROJECT-CONFIGURATION.md`, template comments, the contamination scanner's own meta-docs), and in the intentional `templates/overlays/*.fidelity-example.md` starter overlays (named and shipped precisely so a consumer copies/adapts/deletes them). Zero project-specific design-philosophy, chart-wrapper, font, or brand-colour literal remains baked into portable skill/agent logic. (Hard-coded `${paths.*}` literals remain a separate, larger open cleanup — see v4.0.3 note.)
13
+
14
+ ## [4.0.3] - 2026-06-02
15
+
16
+ **Portability fix (round 3 — final): remove fidelity-app DOMAIN example-flavor from shipped framework files.** Closes the T13 portability sweep started in v4.0.1/4.0.2 by genericizing the consumer-domain vocabulary (`merchant`/`booking`/`reservation`/`merchant-theming`, `/merchant/dashboard` routes, `customer-facing vs merchant-facing`, `FEAT-0127-merchant-points-guard`, `area:customer|merchant|admin`) that survived as illustrative example flavor. No behaviour change → **PATCH**.
17
+
18
+ > **Why.** Even in prose examples, a consumer-domain noun teaches the wrong vocabulary and trips the `contamination.js` `requires-decision` rules. The fix distinguishes genuine fidelity-domain flavor (generalized) from legitimate generic English (`customer` in marketing/security "multi-tenant … customers"), the scanner's own meta-references (`framework-edit-gate.js`, `contamination.js`), and `project-context.md`'s explanation that these opinionated tokens belong in the overlay — all of which are correct and untouched.
19
+
20
+ ### Changed — genericized domain example flavor
21
+
22
+ - **Example queries/routes** → placeholders: `wiki-curator.md` / `doc-reviewer.md` search examples (`<feature-X>` / `<entity>`); `visual-fidelity-verifier.md`, `commands/design-review.md`, `e2e-review/SKILL.md` route envelopes (`/dashboard` instead of `/merchant/dashboard`); `impact-analysis.md` worked-CR endpoint.
23
+ - **`prd.md`** — example card filename and `area:` labels reference `identity.audience_segments` instead of literal `merchant`/`customer`/`admin`.
24
+ - **`prd-card-writer.md`** — "split by audience segment (per `identity.audience_segments`)" instead of "customer-facing vs merchant-facing"; generic subsystem example.
25
+ - **`doc-writing-for-rag` reference files** (`before-after-examples.md`, `compact-templates.md`, `schemas-and-errors.md`) — added an "illustrative sample domain" disclaimer (the worked before/after corpus uses a sample API; only the *technique* is normative), rather than rewriting 290+ lines of self-contained illustration.
26
+
27
+ > **Note — out of scope, surfaced for a future pass.** Running `contamination.js` over the whole `framework/` payload also flags ~200 hard-coded **path literals** (`backlog/`, `docs/design-system/`, `src/components/…`) that should be `${paths.*}` config keys. A meaningful fraction are legitimate (config-template defaults, `PROJECT-CONFIGURATION.md` docs, canonical protocol examples), but the rest are a genuine, larger portability cleanup deserving its own dedicated pass — not bundled here.
28
+
8
29
  ## [4.0.2] - 2026-06-02
9
30
 
10
31
  **Portability fix (round 2): remove hard-coded auth/deployment project identifiers from shipped framework files.** Companion to v4.0.1 — extends the de-contamination from the database dimension to the auth and deployment dimensions, where fidelity-app-specific identifiers (`withAuth`, `withAuthNoParams`, `src/lib/auth/middleware.ts`, `src/app/api/v1/...`, `BookingTable`, `ADMIN + MERCHANT`, "Vercel Functions") leaked into self-verification examples, detection-signal lists, and template fills. No behaviour change → **PATCH**.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.2
1
+ 4.0.4
@@ -119,7 +119,7 @@ the flags above.
119
119
  `docs/ops/graph-communities-scheduling.md`:
120
120
  - `search_synthesis(question, level="global")` — community-summary
121
121
  retrieval. Use for relational / cross-cutting questions ("how does
122
- auth interact with booking?", "what touches reservations?").
122
+ auth interact with `<feature-X>`?", "what touches `<entity>`?").
123
123
  - `search_synthesis(question, level="local")` — entity-centric retrieval
124
124
  (specific identifier lookups; equivalent to `mode="local"`).
125
125
  - `search_docs(mode="drift")` — GraphRAG DRIFT (`global` → scoped `local`),
@@ -211,14 +211,14 @@ Cards MUST be as atomic as possible to enable parallel execution:
211
211
 
212
212
  **Splitting heuristics:**
213
213
  - Split by concern: data model vs API vs UI vs docs
214
- - Split by user persona: customer-facing vs merchant-facing
214
+ - Split by audience segment (per `identity.audience_segments`)
215
215
  - Split by module: each independent module = its own card
216
216
  - Keep tightly coupled work together (e.g., a type + its only consumer)
217
217
 
218
218
  **Anti-patterns to avoid:**
219
219
  - Monolithic "Phase 1-7" cards embedding an entire feature
220
220
  - XL cards with 15+ files — always split these
221
- - Cards that mix independent subsystems (e.g., booking API + promo UI)
221
+ - Cards that mix independent subsystems (e.g., a service API + an unrelated feature's UI)
222
222
 
223
223
  ## Card Structure (MANDATORY — zero tolerance)
224
224
 
@@ -502,7 +502,7 @@ Before creating cards, scan `backlog/*.yml` to determine the next available numb
502
502
 
503
503
  | Prefix | When to use | Example |
504
504
  |--------|-------------|---------|
505
- | `FEAT-NNNN-slug.yml` | Feature work | `FEAT-0127-merchant-points-guard.yml` |
505
+ | `FEAT-NNNN-slug.yml` | Feature work | `FEAT-0127-user-rewards-guard.yml` |
506
506
  | `BUG-NNNN-slug.yml` | Bug fixes | `BUG-0071-issue-197-dashboard-bugs.yml` |
507
507
  | `UI-NNNN-slug.yml` | UI-only changes | `UI-0090-remove-install-pwa-cta.yml` |
508
508
  | `DOC-NNNN-slug.yml` | Documentation only | `DOC-0001-privacy-policy-draft.yml` |
@@ -647,7 +647,7 @@ priority: HIGH
647
647
  owner_agent: coder
648
648
 
649
649
  github_issue: NNN # GitHub issue number
650
- labels: [bug, area:customer] # area:customer | area:merchant | area:admin
650
+ labels: [bug, area:<segment>] # area:<segment> values from identity.audience_segments
651
651
 
652
652
  clarity_analysis: # MANDATORY per AGENTS.md for all bug cards
653
653
  expected_behavior: "[What should happen]"
@@ -52,7 +52,7 @@ The orchestrator (`/e2e-review`) invokes you with this JSON payload:
52
52
  ```json
53
53
  {
54
54
  "card_id": "FEAT-XXXX",
55
- "route": "/merchant/dashboard",
55
+ "route": "/dashboard",
56
56
  "viewport": { "width": 1440, "height": 900 },
57
57
  "implementation_screenshot_path": "/abs/path/to/impl.png",
58
58
  "mockup_source": {
@@ -183,7 +183,7 @@ Inflating or suppressing severity to match the mode is a protocol violation.
183
183
  ```json
184
184
  {
185
185
  "status": "completed" | "skipped" | "error",
186
- "route": "/merchant/dashboard",
186
+ "route": "/dashboard",
187
187
  "mockup_source_level": "figma" | "local" | "compliance-only" | "skip",
188
188
  "viewport": { "width": 1440, "height": 900 },
189
189
  "compliance_score": 0.87,
@@ -102,9 +102,9 @@ exposed via dedicated MCP tools alongside `search_docs`:
102
102
  - `search_synthesis(question, level="global")` — community-summary retrieval.
103
103
  Use for **relational / cross-cutting** questions where the answer involves
104
104
  multiple modules at once. Examples:
105
- - "How does auth interact with booking?"
106
- - "What touches the reservations collection?"
107
- - "Which areas share the merchant-theming pattern?"
105
+ - "How does auth interact with `<feature-X>`?"
106
+ - "What touches the `<entity>` collection/table?"
107
+ - "Which areas share the `<shared-pattern>` (e.g. a theming/layout) pattern?"
108
108
  - `search_synthesis(question, level="local")` — entity-centric retrieval
109
109
  (delegates to the existing `local` mode). Use for **specific lookups** —
110
110
  "what is `<authWrapper>`?", "show me the `<DomainType>` type definition".
@@ -11,7 +11,7 @@ This command supports two output modes, detected from the input prompt:
11
11
 
12
12
  ### Mode A — Interactive (default)
13
13
 
14
- When the user invokes `/design-review` directly (input is a natural-language route reference, e.g. `/design-review /merchant/dashboard`), produce the **Markdown report** described in steps 1–5 below. Use the Blockers/High/Medium/Nitpicks template from `agents/design-review.md` § Report Template.
14
+ When the user invokes `/design-review` directly (input is a natural-language route reference, e.g. `/design-review /dashboard`), produce the **Markdown report** described in steps 1–5 below. Use the Blockers/High/Medium/Nitpicks template from `agents/design-review.md` § Report Template.
15
15
 
16
16
  ### Mode B — Programmatic (invoked by `/e2e-review`)
17
17
 
@@ -23,7 +23,7 @@ When the input contains a JSON envelope with `"mode": "programmatic"` at any pos
23
23
  {
24
24
  "mode": "programmatic",
25
25
  "card_id": "FEAT-XXXX",
26
- "route": "/merchant/dashboard",
26
+ "route": "/dashboard",
27
27
  "viewport": { "width": 1440, "height": 900 },
28
28
  "dev_server_port": 3000,
29
29
  "registry_paths": {
@@ -46,7 +46,7 @@ When the input contains a JSON envelope with `"mode": "programmatic"` at any pos
46
46
  {
47
47
  "status": "completed" | "skipped" | "error",
48
48
  "source": "design-review",
49
- "route": "/merchant/dashboard",
49
+ "route": "/dashboard",
50
50
  "viewport": { "width": 1440, "height": 900 },
51
51
  "findings": [
52
52
  {
@@ -110,7 +110,7 @@ When the user invokes `/design-review`, do the following (in both modes — only
110
110
  - Read `${paths.design_system}/tokens-reference.md`.
111
111
  - Read `${paths.design_system}/components/<Name>.md` for every primitive expected on the route.
112
112
  When the flag is `false`, skip the registry reads. In Mode A flag the gap in the final report and recommend `/design-system-init`. In Mode B add the gap to the `gaps[]` array of the JSON output.
113
- 1. Start with the route or component specified (e.g., `/merchant/dashboard`) and open it in the MCP browser. In Mode B, use the `dev_server_port` from the input envelope to construct `http://localhost:<port><route>`.
113
+ 1. Start with the route or component specified (e.g., `/dashboard`) and open it in the MCP browser. In Mode B, use the `dev_server_port` from the input envelope to construct `http://localhost:<port><route>`.
114
114
  2. Follow the Quick Visual Check in `agents/design-review.md` and run Phases 0‑7 (interaction, responsiveness, polish, accessibility, robustness, code health, content/console).
115
115
  3. Capture at least one full-page screenshot at the viewport from the input (default 1440px) and note console errors. In Mode B save the screenshot at `/tmp/design-review/<route-slug>.png` and cite it in `evidence.screenshot_path`.
116
116
  4. **Mode A**: report findings using the Markdown template in `agents/design-review.md` (Blockers/High/Medium/Nitpicks). **Mode B**: assemble the JSON output described above, normalizing severity per the table.
@@ -1,6 +1,12 @@
1
1
  # Before/After Examples — Wave 1+2+3 Compression
2
2
 
3
- Casi concreti validati sul corpus reale. Per ogni esempio: prima, dopo, tecnica applicata.
3
+ > **Illustrative sample domain.** The endpoints, routes, and entity names below
4
+ > (booking/rooms, menu/items, reservations planner, etc.) are a SAMPLE domain used
5
+ > only to demonstrate the doc-compaction techniques — they are not part of any
6
+ > consumer's API. Apply the *technique* (the before→after transformation), not the
7
+ > example's vocabulary, to your own `${paths.references_dir}` docs.
8
+
9
+ Concrete cases validated on a real corpus. For each example: before, after, technique applied.
4
10
 
5
11
  ## Example 1 — API Endpoint (booking.md)
6
12
 
@@ -104,8 +110,8 @@ sidebar navigation, top bar with store switcher, and responsive container.
104
110
  **Store switching**: Supports CT-0067 multi-store. When merchant has
105
111
  multiple stores, user can switch via top bar dropdown. Current store
106
112
  persisted in sessionStorage with Safari ITP fallback.
107
- **Styling**: Neo-Brutalism design system (bold borders, amber accents,
108
- Press Start 2P titles). Follows ui-guidelines.md §3.
113
+ **Styling**: the project's design system (per `identity.design_philosophy`
114
+ see `${paths.ui_guidelines}`).
109
115
  **Disabled modules**: If merchant's license doesn't include this module,
110
116
  the page is completely hidden from navigation.
111
117
 
@@ -120,7 +126,7 @@ the page is completely hidden from navigation.
120
126
  - **Auth**: merchantUserId + MERCHANT role (ADMIN via impersonation)
121
127
  - **Layout**: MerchantResponsiveLayout
122
128
  - **Store switching**: CT-0067 multi-store, sessionStorage persist
123
- - **Styling**: Neo-Brutalism (see ui-guidelines.md §3)
129
+ - **Styling**: the project's design system (per `identity.design_philosophy`; see `${paths.ui_guidelines}`)
124
130
  - **License gating**: disabled modules hidden from navigation
125
131
 
126
132
  ---
@@ -1,6 +1,11 @@
1
1
  # Compact Templates
2
2
 
3
- Template validati su 45 file in 3 wave di compressione. Ogni template include: before/after, line count, note critiche.
3
+ > **Illustrative sample domain.** Endpoint paths, routes, roles, and entity names in
4
+ > the filled examples below are a SAMPLE domain for demonstrating the template shapes —
5
+ > substitute your project's own (auth wrapper, roles from `identity.audience_segments`,
6
+ > routes, entities). Only the template *structure* is normative.
7
+
8
+ Templates validated on 45 files across 3 compression waves. Each template includes: before/after, line count, critical notes.
4
9
 
5
10
  ## API Endpoint Template
6
11
 
@@ -131,7 +136,7 @@ last_updated: 2026-04-05
131
136
  - **Auth**: merchantUserId + MERCHANT role
132
137
  - **Layout**: MerchantResponsiveLayout
133
138
  - **Store switching**: CT-0067 multi-store support
134
- - **Styling**: Neo-Brutalism design system
139
+ - **Styling**: the project's design system (per `identity.design_philosophy`)
135
140
  - **Hidden modules**: disabled via license gating
136
141
 
137
142
  ## License Gating System (FEAT-0128)
@@ -1,6 +1,10 @@
1
1
  # Schemas & Errors — Central Reference Files
2
2
 
3
- Protocollo per usare e estendere `${paths.api_schemas}` e `${paths.api_errors}` (typically `docs/references/api/schemas.md` and `docs/references/errors.md`).
3
+ > **Illustrative sample domain.** Error codes, routes, and entity names in the
4
+ > examples below are a SAMPLE domain — substitute your own. Only the protocol
5
+ > (central schema/error files, anchor cross-referencing) is normative.
6
+
7
+ Protocol for using and extending `${paths.api_schemas}` and `${paths.api_errors}` (typically `docs/references/api/schemas.md` and `docs/references/errors.md`).
4
8
 
5
9
  > **Note**: the schema names and domain sections below come from a real project (a multi-merchant fidelity/loyalty platform) and are kept as a concrete example. Replace them with your own domain entities when applying this skill to a new project — the project-specific domain vocabulary lives in `.baldart/overlays/doc-writing-for-rag.md`.
6
10
 
@@ -154,7 +154,7 @@ system constraints into a machine-readable verification plan.
154
154
  {
155
155
  "card_id": "FEAT-XXXX",
156
156
  "title": "...",
157
- "routes": ["/merchant/dashboard", "/merchant/dashboard/edit"],
157
+ "routes": ["/dashboard", "/dashboard/edit"],
158
158
  "personas": [{"name": "merchant", "auth": "password", "creds": {...}}],
159
159
  "data_prerequisites": ["seed merchant 'demo'", "create one paid booking"],
160
160
  "scenarios": [
@@ -162,11 +162,11 @@ system constraints into a machine-readable verification plan.
162
162
  "id": "AC-1",
163
163
  "name": "Merchant can update store hours",
164
164
  "gherkin": "Feature: ...",
165
- "routes_touched": ["/merchant/settings/hours"]
165
+ "routes_touched": ["/settings/hours"]
166
166
  }
167
167
  ],
168
168
  "non_functional_checks": ["loads in < 2s on slow 3G"],
169
- "mockup_refs": [{"route": "/merchant/dashboard", "level": "local", "path": "mockups/dashboard.png"}]
169
+ "mockup_refs": [{"route": "/dashboard", "level": "local", "path": "mockups/dashboard.png"}]
170
170
  }
171
171
  ```
172
172
 
@@ -336,7 +336,7 @@ For each `route` in `plan.routes[]`:
336
336
  Input payload:
337
337
  {
338
338
  "card_id": "FEAT-XXXX",
339
- "route": "/merchant/dashboard",
339
+ "route": "/dashboard",
340
340
  "viewport": { "width": 1440, "height": 900 },
341
341
  "implementation_screenshot_path": ".baldart/e2e-review/FEAT-XXXX/screenshots/merchant-dashboard.png",
342
342
  "mockup_source": { ... },
@@ -248,7 +248,7 @@ touchpoints into the existing ISA table; assign new ISA-N IDs.
248
248
 
249
249
  ## Worked Example
250
250
 
251
- **CR: "Add POST /api/v1/merchant/reservations/bulk-confirm for batch confirmation"**
251
+ **CR: "Add POST /api/v1/reservations/bulk-confirm for batch confirmation"**
252
252
 
253
253
  Change type: Addition (new endpoint)
254
254
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baldart",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "Claude Agent Framework - Reusable framework for coordinating AI agents and humans in software projects",
5
5
  "bin": {
6
6
  "baldart": "./bin/baldart.js"