baldart 3.41.0 → 4.0.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/VERSION +1 -1
  3. package/framework/.claude/agents/REGISTRY.md +72 -24
  4. package/framework/.claude/agents/api-perf-cost-auditor.md +17 -10
  5. package/framework/.claude/agents/code-reviewer.md +31 -24
  6. package/framework/.claude/agents/codebase-architect.md +47 -43
  7. package/framework/.claude/agents/coder.md +29 -18
  8. package/framework/.claude/agents/doc-reviewer.md +57 -30
  9. package/framework/.claude/agents/plan-auditor.md +85 -20
  10. package/framework/.claude/agents/prd-card-writer.md +44 -14
  11. package/framework/.claude/agents/prd.md +22 -3
  12. package/framework/.claude/agents/qa-sentinel.md +33 -15
  13. package/framework/.claude/agents/security-reviewer.md +65 -10
  14. package/framework/.claude/agents/senior-researcher.md +8 -1
  15. package/framework/.claude/agents/ui-expert.md +22 -7
  16. package/framework/.claude/commands/check.md +31 -11
  17. package/framework/.claude/commands/codexreview.md +48 -29
  18. package/framework/.claude/commands/new.md +29 -330
  19. package/framework/.claude/commands/qa.md +57 -37
  20. package/framework/.claude/skills/api-design-principles/SKILL.md +2 -2
  21. package/framework/.claude/skills/bug/SKILL.md +8 -8
  22. package/framework/.claude/skills/bug/references/logging-patterns.md +8 -2
  23. package/framework/.claude/skills/context-primer/SKILL.md +29 -8
  24. package/framework/.claude/skills/doc-writing-for-rag/SKILL.md +36 -36
  25. package/framework/.claude/skills/frontend-design/SKILL.md +10 -8
  26. package/framework/.claude/skills/new/SKILL.md +409 -302
  27. package/framework/.claude/skills/prd/SKILL.md +67 -38
  28. package/framework/.claude/skills/prd/assets/card-template.yml +22 -26
  29. package/framework/.claude/skills/prd/assets/epic-template.yml +5 -5
  30. package/framework/.claude/skills/prd/assets/prd-template.md +1 -1
  31. package/framework/.claude/skills/prd/assets/state-template.md +25 -3
  32. package/framework/.claude/skills/prd/references/api-perf-gate.md +143 -33
  33. package/framework/.claude/skills/prd/references/audit-phase.md +48 -34
  34. package/framework/.claude/skills/prd/references/backlog-phase.md +38 -11
  35. package/framework/.claude/skills/prd/references/discovery-phase.md +121 -44
  36. package/framework/.claude/skills/prd/references/impact-analysis.md +127 -23
  37. package/framework/.claude/skills/prd/references/prd-add-phase.md +18 -214
  38. package/framework/.claude/skills/prd/references/prd-writing-phase.md +52 -42
  39. package/framework/.claude/skills/prd/references/research-phase.md +105 -19
  40. package/framework/.claude/skills/prd/references/ui-design-phase.md +20 -8
  41. package/framework/.claude/skills/prd/references/validation-phase.md +97 -72
  42. package/framework/.claude/skills/prd-add/SKILL.md +70 -20
  43. package/framework/.claude/skills/simplify/SKILL.md +22 -12
  44. package/framework/.claude/skills/ui-design/SKILL.md +26 -7
  45. package/framework/.claude/skills/webapp-testing/SKILL.md +6 -4
  46. package/framework/.claude/skills/worktree-manager/SKILL.md +206 -143
  47. package/framework/agents/coding-standards.md +85 -0
  48. package/framework/agents/skills-mapping.md +85 -82
  49. package/framework/agents/testing.md +6 -4
  50. package/framework/templates/baldart.config.template.yml +29 -7
  51. package/package.json +1 -1
  52. package/src/commands/configure.js +43 -9
  53. package/framework/.claude/skills/prd-add/references/impact-analysis.md +0 -233
@@ -15,8 +15,8 @@ Load structured, task-adaptive context about a topic into the conversation befor
15
15
 
16
16
  ## Project Context
17
17
 
18
- **Reads from `baldart.config.yml`:** `paths.backlog_dir`, `paths.references_dir`, `paths.prd_dir`, `paths.wiki_dir`, `paths.adrs_dir`.
19
- **Gated by features:** `features.has_backlog` (skip backlog grep when `false`), `features.has_wiki_overlay` (skip wiki search), `features.has_adrs` (skip ADR includes), `features.has_prd_workflow` (skip PRD reads).
18
+ **Reads from `baldart.config.yml`:** `paths.backlog_dir`, `paths.references_dir`, `paths.prd_dir`, `paths.wiki_dir`, `paths.adrs_dir`, `paths.wiki_log`.
19
+ **Gated by features:** `features.has_backlog` (skip backlog grep when `false`), `features.has_wiki_overlay` (skip wiki search AND the wiki-log instrumentation tap), `features.has_adrs` (skip ADR includes), `features.has_prd_workflow` (skip PRD reads).
20
20
  **Overlay:** loads `.baldart/overlays/context-primer.md` if present — project-specific topic vocabulary, must-include canonical docs.
21
21
  **On missing/empty keys:** ask the user; do not assume defaults. See `framework/agents/project-context.md` § 3.
22
22
 
@@ -59,7 +59,15 @@ SEARCH STRATEGY — RAG-first, verify-only-if-needed:
59
59
  Pass invoker_agent="context-primer" — this OVERRIDES your own default
60
60
  (codebase-architect) for every call you make on behalf of this skill,
61
61
  so telemetry attributes the query to the initiating skill, not the subagent.
62
- Check rag_telemetry.verdict in the response:
62
+
63
+ NOTE: the search_docs MCP tool and its rag_telemetry.verdict field only
64
+ exist when a RAG/Obsidian doc-search layer is connected. If search_docs is
65
+ NOT available (no MCP tool), or it returns no rag_telemetry block, treat the
66
+ verdict as "empty" and go straight to the full manual search (steps 2-3) —
67
+ do NOT fabricate a verdict or stall waiting for a field that will never
68
+ appear. Emit no error; this is the normal no-RAG path.
69
+
70
+ When the field IS present, check rag_telemetry.verdict in the response:
63
71
  - "useful" → RAG is your PRIMARY source. Go to step 4.
64
72
  - "weak"/"fallback_degraded" → supplement with steps 2-3.
65
73
  - "empty" → full manual search (steps 2-3).
@@ -132,15 +140,28 @@ Return output in this EXACT XML format (30-50 lines max):
132
140
  <note acquired="YYYY-MM-DD">Note content</note>
133
141
  <note acquired="YYYY-MM-DD" stale="true">Old note [STALE — verify]</note>
134
142
  </memory_notes>
143
+ <!-- If no RAG layer was available, set verdict="unavailable" count="0" mode="none" -->
135
144
  <rag_quality verdict="{rag_telemetry.verdict}" count="{count}" mode="{mode}"/>
136
145
  </context_primer>
137
146
 
138
147
  WIKI LOG INSTRUMENTATION (FEAT-0805 — tap point of the auto-learning loop):
139
- After every search_docs call, inspect the returned rag_telemetry.verdict.
140
- If verdict {"weak", "empty", "fallback_degraded"}, log one entry to the
141
- wiki log so the nightly wiki-review can detect coverage gaps:
142
-
143
- python3 -c "import sys; sys.path.insert(0, 'tools/doc-rag'); \
148
+ This tap is GATED. Only attempt it when `features.has_wiki_overlay: true` AND
149
+ `paths.wiki_log` is set in `baldart.config.yml` (it points at the project's
150
+ wiki-log tap MODULE FILE, e.g. `tools/doc-rag/wiki_log.py` there is no
151
+ hardcoded `tools/doc-rag` default; that path is one consumer's layout and does
152
+ not resolve elsewhere). If either is absent, SKIP the tap entirely and emit a
153
+ single stderr WARNING
154
+ "wiki_log skipped: features.has_wiki_overlay/paths.wiki_log not configured" —
155
+ never silently no-op, and never assume a default path.
156
+
157
+ When enabled: after every search_docs call, inspect the returned
158
+ rag_telemetry.verdict. If verdict ∈ {"weak", "empty", "fallback_degraded"},
159
+ log one entry to the wiki log so the nightly wiki-review can detect coverage
160
+ gaps. Resolve `<wiki_log_dir>` as the PARENT DIRECTORY of `paths.wiki_log`
161
+ (i.e. `dirname` — the importable package dir; `paths.wiki_log` itself is the
162
+ `wiki_log.py` file):
163
+
164
+ python3 -c "import sys; sys.path.insert(0, '<wiki_log_dir>'); \
144
165
  from wiki_log import append_entry; \
145
166
  append_entry(entry_type='query', title='<query_short>', \
146
167
  agent='context-primer', \
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: doc-writing-for-rag
3
- description: "Scrive documentazione di reference ad alta densità ottimizzata per RAG indexing. Usa template compatti, frontmatter minimal, cross-reference a schemas.md/errors.md (paths da `paths.api_schemas`/`paths.api_errors` in `baldart.config.yml`). Carica questa skill quando crei o riscrivi file in `${paths.references_dir}`, `${paths.prd_dir}`, o quando senti 'template endpoint', 'compattare docs', 'doc per RAG', 'dense documentation', 'signal/noise ratio'."
3
+ description: "Writes high-density reference documentation optimized for RAG indexing. Uses compact templates, minimal frontmatter, cross-references to schemas.md/errors.md (paths from `paths.api_schemas`/`paths.api_errors` in `baldart.config.yml`). Load this skill when creating or rewriting files in `${paths.references_dir}`, `${paths.prd_dir}`, or when you hear 'endpoint template', 'compact docs', 'doc for RAG', 'dense documentation', 'signal/noise ratio'."
4
4
  ---
5
5
 
6
6
  # Doc Writing for RAG
7
7
 
8
- Protocollo di scrittura per reference docs ottimizzate per LightRAG indexing. Validato su 45 file in 3 wave di compressione (-48% linee medio, signal/noise da 45% a 80%+).
8
+ Writing protocol for reference docs optimized for LightRAG indexing. Validated on 45 files across 3 compression waves (48% average lines, signal/noise from 45% to 80%+).
9
9
 
10
10
  ## Project Context
11
11
 
@@ -16,35 +16,35 @@ Protocollo di scrittura per reference docs ottimizzate per LightRAG indexing. Va
16
16
 
17
17
  ## When to Use
18
18
 
19
- Carica questa skill quando:
19
+ Load this skill when:
20
20
 
21
- - **Nuovo reference doc** da scrivere (es. nuovo dominio API, UI page, collection)
22
- - **Major rewrite** di file esistente >1500 linee o con S/N basso
23
- - **Nuovo endpoint API** da documentare in file esistente
24
- - **Extending** `schemas.md` o `errors.md` con nuovi schemi/codes
21
+ - **New reference doc** to write (e.g. new API domain, UI page, collection)
22
+ - **Major rewrite** of an existing file >1500 lines or with low signal/noise ratio
23
+ - **New API endpoint** to document in an existing file
24
+ - **Extending** `schemas.md` or `errors.md` with new schemas/codes
25
25
 
26
- NON caricare per:
27
- - Review incrementale di file esistenti (usa doc-reviewer-support)
28
- - Scrittura di ADR (diversi, già densi, vedi writing-guide)
29
- - PRD discovery/ideation (usa prd skill)
30
- - Business/marketing copy (usa copywriting skill)
26
+ Do NOT load for:
27
+ - Incremental review of existing files (use `doc-reviewer-support` if installed — see Related Skills)
28
+ - Writing ADRs (different format, already dense see writing-guide)
29
+ - PRD discovery/ideation (use the `prd` skill)
30
+ - Business/marketing copy (use the `copywriting` skill)
31
31
 
32
32
  ## Core Principles
33
33
 
34
- 1. **Cross-reference over repetition**: un concetto spiegato UNA VOLTA, linkato altrove
35
- 2. **Tables > prose** per info strutturate (endpoint params, error codes, schemas)
36
- 3. **Frontmatter minimo**: 4 campi (doc_type, domain, canonicality, last_updated). Niente audit_notes, freshness_status, stale_*, owner, status (derivabili da git)
37
- 4. **Central support files**: `schemas.md` per JSON schemas riusabili, `errors.md` per error codes
34
+ 1. **Cross-reference over repetition**: one concept explained ONCE, linked elsewhere
35
+ 2. **Tables > prose** for structured information (endpoint params, error codes, schemas)
36
+ 3. **Minimal frontmatter**: 4 fields (doc_type, domain, canonicality, last_updated). No audit_notes, freshness_status, stale_*, owner, status (derivable from git)
37
+ 4. **Central support files**: `schemas.md` for reusable JSON schemas, `errors.md` for error codes
38
38
  5. **Line count targets**: API ref <1500, PRD <1500, ADR <200, index <500
39
- 6. **Descrittivo ma denso**: preserva TUTTA l'info semantica, comprimi solo verbosità
39
+ 6. **Descriptive but dense**: preserve ALL semantic information, compress only verbosity
40
40
 
41
- ## Workflow — Nuovo endpoint API
41
+ ## Workflow — New API Endpoint
42
42
 
43
- 1. **Check schemas.md** (`${paths.api_schemas}`): lo schema response esiste già? Se sì, riusalo. Se no, definiscilo DOPO aver scritto l'endpoint, in APPEND alla sezione di dominio appropriata. (Skip when `features.has_api_docs: false`.)
43
+ 1. **Check schemas.md** (`${paths.api_schemas}`): does the response schema already exist? If yes, reuse it. If no, define it AFTER writing the endpoint, APPENDed to the appropriate domain section. (Skip when `features.has_api_docs: false`.)
44
44
 
45
- 2. **Check errors.md** (`${paths.api_errors}`): gli error codes esistono già nella domain section? Se sì, riusali. Se no, aggiungili APPEND in domain section. (Skip when `features.has_api_docs: false`.)
45
+ 2. **Check errors.md** (`${paths.api_errors}`): do the error codes already exist in the domain section? If yes, reuse them. If no, APPEND them in the domain section. (Skip when `features.has_api_docs: false`.)
46
46
 
47
- 3. **Scrivi endpoint con template compatto**:
47
+ 3. **Write endpoint using compact template**:
48
48
  ```markdown
49
49
  ### POST /api/v1/domain/resource
50
50
 
@@ -60,16 +60,16 @@ NON caricare per:
60
60
  **Errors**: RESOURCE_NOT_FOUND, INVALID_NAME ([errors.md](../errors.md#domain-domain))
61
61
  ```
62
62
 
63
- 4. **Path relativi corretti** (dipende dalla location del file):
63
+ 4. **Correct relative paths** (depends on file location):
64
64
  - `api/*.md` → `./schemas.md` + `../errors.md`
65
65
  - `api/booking/*.md` → `../schemas.md` + `../../errors.md`
66
66
  - `api/survey/*.md` → `../schemas.md` + `../../errors.md`
67
67
 
68
- 5. **Verifica line count**: se il file supera 1500 linee → split in sub-files per dominio.
68
+ 5. **Verify line count**: if the file exceeds 1500 lines → split into sub-files per domain.
69
69
 
70
- ## Template snippets inline
70
+ ## Template Snippets
71
71
 
72
- ### Frontmatter minimo (mandatory)
72
+ ### Minimal frontmatter (mandatory)
73
73
 
74
74
  ```yaml
75
75
  ---
@@ -80,7 +80,7 @@ last_updated: 2026-04-05
80
80
  ---
81
81
  ```
82
82
 
83
- Altri campi (owner, status, audit_notes, freshness_status, stale_*) sono **derivabili** da git blame / tooling → **non scriverli**.
83
+ Other fields (owner, status, audit_notes, freshness_status, stale_*) are **derivable** from git blame / tooling → **do not write them**.
84
84
 
85
85
  ### Compact endpoint (mandatory)
86
86
 
@@ -89,15 +89,15 @@ Altri campi (owner, status, audit_notes, freshness_status, stale_*) sono **deriv
89
89
 
90
90
  **Auth**: hook | **Access**: roles
91
91
 
92
- **Body** / **Query** / **Params**: tabella 4 colonne
92
+ **Body** / **Query** / **Params**: 4-column table
93
93
 
94
94
  **Returns**: [Schema](schemas#anchor)
95
95
  **Errors**: CODE1, CODE2 ([errors.md](errors#domain))
96
96
  ```
97
97
 
98
- ### Cross-reference section (per concetti ripetuti)
98
+ ### Cross-reference section (for repeated concepts)
99
99
 
100
- Spiegazione completa **una sola volta** nella intro del file, poi:
100
+ Full explanation **once** in the file intro, then:
101
101
  ```markdown
102
102
  See [§Store Access Control](#store-access-control) for gating details.
103
103
  ```
@@ -106,14 +106,14 @@ See [§Store Access Control](#store-access-control) for gating details.
106
106
 
107
107
  | Reference | When to load |
108
108
  |-----------|--------------|
109
- | `references/compact-templates.md` | Scrittura nuovo endpoint/UI/PRD/collection |
110
- | `references/schemas-and-errors.md` | Estensione di schemas.md o errors.md |
111
- | `references/frontmatter-minimal.md` | Definire frontmatter di un nuovo file |
112
- | `references/line-count-targets.md` | File > soglia, decidere se splittare |
113
- | `references/before-after-examples.md` | Vuoi esempi concreti Wave 1+2+3 |
109
+ | `references/compact-templates.md` | Writing new endpoint/UI/PRD/collection |
110
+ | `references/schemas-and-errors.md` | Extending schemas.md or errors.md |
111
+ | `references/frontmatter-minimal.md` | Defining frontmatter for a new file |
112
+ | `references/line-count-targets.md` | File > threshold, deciding whether to split |
113
+ | `references/before-after-examples.md` | Want concrete Wave 1+2+3 examples |
114
114
 
115
115
  ## Related Skills
116
116
 
117
- - `doc-reviewer-support`: review checklists, invariant tables, navigation audit
118
- - `prd`: PRD discovery & ideation (diverso scope)
117
+ - `doc-reviewer-support` (OPTIONAL — not shipped with the framework): review checklists, invariant tables, navigation audit. If present, use its format; if absent, proceed without it and perform review inline.
118
+ - `prd`: PRD discovery & ideation (different scope)
119
119
  - `copywriting`: marketing/UX copy
@@ -196,13 +196,15 @@ These apply to every form, every project — they are not "nice to have":
196
196
 
197
197
  ---
198
198
 
199
- ## Prototipi Standalone e Demo
199
+ ## Standalone Prototypes and Demos
200
200
 
201
- Quando il task richiede un prototipo HTML interattivo, demo animata, slide deck, mockup iOS/app, o design exploration **NON legato alla codebase Next.js** (nessun contesto `src/app/`), invocare la skill `huashu-design` in aggiunta o al posto di questa skill. Essa fornisce:
202
- - App Prototype shell (AppPhone state manager, tappabile, iPhone frame)
203
- - Tweaks panel per varianti in-page
204
- - Export animazioni → MP4/GIF (25fps base, 60fps interpolato)
205
- - 5 flussi × 20 filosofie di design per design exploration
206
- - Validazione Playwright click-test prima della consegna
201
+ When the task calls for an interactive HTML prototype, animated demo, slide deck, iOS/app mockup, or design exploration **not tied to the project codebase**, the `huashu-design` skill can supplement or replace this skill. It provides:
202
+ - App Prototype shell (AppPhone state manager, tappable, iPhone frame)
203
+ - Tweaks panel for in-page variants
204
+ - Animation export → MP4/GIF (25fps base, 60fps interpolated)
205
+ - 5 flows × 20 design philosophies for design exploration
206
+ - Playwright click-test validation before delivery
207
207
 
208
- **Regola del Filesystem (ASSOLUTA):** ogni output HTML/prototipo deve essere scritto su disco con il tool `Write` PRIMA di aprirlo in Safari o condividerlo con l'utente. Non è sufficiente outputtare blocchi di codice inline.
208
+ **`huashu-design` is OPTIONAL** it is a user-installed skill, not shipped with the framework. If it is not present, proceed with this skill alone and notify the user: "huashu-design not found; continuing with frontend-design only. Install huashu-design for advanced prototype tooling."
209
+
210
+ **Filesystem Rule (ABSOLUTE):** every HTML output/prototype must be written to disk with the `Write` tool BEFORE opening it in a browser or sharing it with the user. Outputting inline code blocks is not sufficient.