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.
- package/CHANGELOG.md +47 -0
- package/VERSION +1 -1
- package/framework/.claude/agents/REGISTRY.md +72 -24
- package/framework/.claude/agents/api-perf-cost-auditor.md +17 -10
- package/framework/.claude/agents/code-reviewer.md +31 -24
- package/framework/.claude/agents/codebase-architect.md +47 -43
- package/framework/.claude/agents/coder.md +29 -18
- package/framework/.claude/agents/doc-reviewer.md +57 -30
- package/framework/.claude/agents/plan-auditor.md +85 -20
- package/framework/.claude/agents/prd-card-writer.md +44 -14
- package/framework/.claude/agents/prd.md +22 -3
- package/framework/.claude/agents/qa-sentinel.md +33 -15
- package/framework/.claude/agents/security-reviewer.md +65 -10
- package/framework/.claude/agents/senior-researcher.md +8 -1
- package/framework/.claude/agents/ui-expert.md +22 -7
- package/framework/.claude/commands/check.md +31 -11
- package/framework/.claude/commands/codexreview.md +48 -29
- package/framework/.claude/commands/new.md +29 -330
- package/framework/.claude/commands/qa.md +57 -37
- package/framework/.claude/skills/api-design-principles/SKILL.md +2 -2
- package/framework/.claude/skills/bug/SKILL.md +8 -8
- package/framework/.claude/skills/bug/references/logging-patterns.md +8 -2
- package/framework/.claude/skills/context-primer/SKILL.md +29 -8
- package/framework/.claude/skills/doc-writing-for-rag/SKILL.md +36 -36
- package/framework/.claude/skills/frontend-design/SKILL.md +10 -8
- package/framework/.claude/skills/new/SKILL.md +409 -302
- package/framework/.claude/skills/prd/SKILL.md +67 -38
- package/framework/.claude/skills/prd/assets/card-template.yml +22 -26
- package/framework/.claude/skills/prd/assets/epic-template.yml +5 -5
- package/framework/.claude/skills/prd/assets/prd-template.md +1 -1
- package/framework/.claude/skills/prd/assets/state-template.md +25 -3
- package/framework/.claude/skills/prd/references/api-perf-gate.md +143 -33
- package/framework/.claude/skills/prd/references/audit-phase.md +48 -34
- package/framework/.claude/skills/prd/references/backlog-phase.md +38 -11
- package/framework/.claude/skills/prd/references/discovery-phase.md +121 -44
- package/framework/.claude/skills/prd/references/impact-analysis.md +127 -23
- package/framework/.claude/skills/prd/references/prd-add-phase.md +18 -214
- package/framework/.claude/skills/prd/references/prd-writing-phase.md +52 -42
- package/framework/.claude/skills/prd/references/research-phase.md +105 -19
- package/framework/.claude/skills/prd/references/ui-design-phase.md +20 -8
- package/framework/.claude/skills/prd/references/validation-phase.md +97 -72
- package/framework/.claude/skills/prd-add/SKILL.md +70 -20
- package/framework/.claude/skills/simplify/SKILL.md +22 -12
- package/framework/.claude/skills/ui-design/SKILL.md +26 -7
- package/framework/.claude/skills/webapp-testing/SKILL.md +6 -4
- package/framework/.claude/skills/worktree-manager/SKILL.md +206 -143
- package/framework/agents/coding-standards.md +85 -0
- package/framework/agents/skills-mapping.md +85 -82
- package/framework/agents/testing.md +6 -4
- package/framework/templates/baldart.config.template.yml +29 -7
- package/package.json +1 -1
- package/src/commands/configure.js +43 -9
- 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
|
-
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
wiki
|
|
142
|
-
|
|
143
|
-
|
|
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: "
|
|
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
|
-
|
|
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
|
-
|
|
19
|
+
Load this skill when:
|
|
20
20
|
|
|
21
|
-
- **
|
|
22
|
-
- **Major rewrite**
|
|
23
|
-
- **
|
|
24
|
-
- **Extending** `schemas.md`
|
|
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
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
- PRD discovery/ideation (
|
|
30
|
-
- Business/marketing copy (
|
|
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**:
|
|
35
|
-
2. **Tables > prose**
|
|
36
|
-
3. **
|
|
37
|
-
4. **Central support files**: `schemas.md`
|
|
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. **
|
|
39
|
+
6. **Descriptive but dense**: preserve ALL semantic information, compress only verbosity
|
|
40
40
|
|
|
41
|
-
## Workflow —
|
|
41
|
+
## Workflow — New API Endpoint
|
|
42
42
|
|
|
43
|
-
1. **Check schemas.md** (`${paths.api_schemas}`):
|
|
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}`):
|
|
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. **
|
|
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. **
|
|
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. **
|
|
68
|
+
5. **Verify line count**: if the file exceeds 1500 lines → split into sub-files per domain.
|
|
69
69
|
|
|
70
|
-
## Template
|
|
70
|
+
## Template Snippets
|
|
71
71
|
|
|
72
|
-
###
|
|
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
|
-
|
|
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**:
|
|
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 (
|
|
98
|
+
### Cross-reference section (for repeated concepts)
|
|
99
99
|
|
|
100
|
-
|
|
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` |
|
|
110
|
-
| `references/schemas-and-errors.md` |
|
|
111
|
-
| `references/frontmatter-minimal.md` |
|
|
112
|
-
| `references/line-count-targets.md` | File >
|
|
113
|
-
| `references/before-after-examples.md` |
|
|
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
|
|
118
|
-
- `prd`: PRD discovery & ideation (
|
|
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
|
-
##
|
|
199
|
+
## Standalone Prototypes and Demos
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
- App Prototype shell (AppPhone state manager,
|
|
203
|
-
- Tweaks panel
|
|
204
|
-
-
|
|
205
|
-
- 5
|
|
206
|
-
-
|
|
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
|
-
**
|
|
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.
|