baldart 5.0.0 → 5.1.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 +119 -0
- package/README.md +3 -3
- package/VERSION +1 -1
- package/framework/.claude/agents/CHANGELOG.md +68 -0
- package/framework/.claude/agents/REGISTRY.md +3 -3
- package/framework/.claude/agents/coder.md +4 -5
- package/framework/.claude/agents/doc-reviewer.md +3 -2
- package/framework/.claude/agents/prd-card-writer.md +1 -1
- package/framework/.claude/agents/qa-sentinel.md +4 -4
- package/framework/.claude/agents/senior-researcher.md +166 -151
- package/framework/.claude/commands/codexreview.md +26 -4
- package/framework/.claude/skills/new/CHANGELOG.md +28 -0
- package/framework/.claude/skills/new/SKILL.md +1 -1
- package/framework/.claude/skills/new/references/implement.md +8 -4
- package/framework/.claude/skills/new/references/review-cycle.md +8 -5
- package/framework/.claude/skills/new/scripts/build-review-bundle.mjs +13 -5
- package/framework/.claude/skills/new/scripts/doc-invariants.mjs +6 -3
- package/framework/.claude/skills/new2/CHANGELOG.md +9 -0
- package/framework/.claude/skills/new2/SKILL.md +1 -1
- package/framework/.claude/skills/prd/CHANGELOG.md +16 -0
- package/framework/.claude/skills/prd/SKILL.md +1 -1
- package/framework/.claude/skills/prd/references/discovery-phase.md +5 -1
- package/framework/.claude/skills/prd/references/research-phase.md +32 -12
- package/framework/.claude/skills/research/CHANGELOG.md +9 -0
- package/framework/.claude/skills/research/SKILL.md +94 -0
- package/framework/.claude/skills/research/assets/report-compare.template.md +50 -0
- package/framework/.claude/skills/research/assets/report-decision.template.md +42 -0
- package/framework/.claude/skills/research/assets/report-deep.template.md +61 -0
- package/framework/.claude/skills/research/assets/report-regulatory.template.md +44 -0
- package/framework/.claude/skills/research/references/playbook.md +112 -0
- package/framework/.claude/skills/research/scripts/rebuild-research-index.mjs +77 -0
- package/framework/.claude/workflows/new-card-review.js +16 -2
- package/framework/.claude/workflows/new2-resolve.js +1 -1
- package/framework/.claude/workflows/new2.js +1 -1
- package/framework/agents/coding-standards.md +2 -2
- package/framework/agents/doc-audit-protocol.md +9 -4
- package/framework/agents/index.md +2 -0
- package/framework/agents/research-protocol.md +228 -0
- package/framework/agents/skills-mapping.md +17 -0
- package/framework/docs/PROJECT-CONFIGURATION.md +23 -0
- package/framework/docs/UPGRADE-3.12-UI-COHERENCE.md +1 -1
- package/framework/templates/baldart.config.template.yml +6 -0
- package/framework/templates/research-index.template.md +13 -0
- package/framework/templates/research-sources.CHANGELOG.md +14 -0
- package/framework/templates/research-sources.template.md +31 -0
- package/package.json +1 -1
- package/src/commands/configure.js +26 -0
- package/src/commands/doctor.js +82 -0
- package/src/commands/update.js +48 -1
- package/src/utils/research-library.js +92 -0
- package/src/utils/symlinks.js +3 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* rebuild-research-index.mjs — deterministic INDEX.md reconciliation.
|
|
4
|
+
*
|
|
5
|
+
* Report frontmatter is the source of truth; INDEX.md is a regenerable view
|
|
6
|
+
* (research-protocol.md SECTION=library). Walks the category subdirectories
|
|
7
|
+
* (never _archive/), parses each report's frontmatter, and rewrites the INDEX
|
|
8
|
+
* table — preserving the header block above the table. Zero dependencies.
|
|
9
|
+
*
|
|
10
|
+
* Usage: node rebuild-research-index.mjs <research_dir> [--check]
|
|
11
|
+
* --check exit 1 (printing the diff summary) instead of writing.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import fs from 'node:fs';
|
|
15
|
+
import path from 'node:path';
|
|
16
|
+
|
|
17
|
+
const CATEGORY_DIRS = ['architecture', 'integrations', 'regulatory', 'ux-patterns', 'algorithms', 'tooling'];
|
|
18
|
+
|
|
19
|
+
const dir = process.argv[2];
|
|
20
|
+
const checkOnly = process.argv.includes('--check');
|
|
21
|
+
if (!dir || !fs.existsSync(dir)) {
|
|
22
|
+
console.error('Usage: node rebuild-research-index.mjs <research_dir> [--check]');
|
|
23
|
+
process.exit(2);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function parseFrontmatter(text) {
|
|
27
|
+
const m = text.match(/^---\n([\s\S]*?)\n---/);
|
|
28
|
+
if (!m) return null;
|
|
29
|
+
const out = {};
|
|
30
|
+
for (const line of m[1].split('\n')) {
|
|
31
|
+
const kv = line.match(/^(\w+):\s*(.*)$/);
|
|
32
|
+
if (!kv) continue;
|
|
33
|
+
let v = kv[2].trim().replace(/^["']|["']$/g, '');
|
|
34
|
+
if (v.startsWith('[') && v.endsWith(']')) {
|
|
35
|
+
v = v.slice(1, -1).split(',').map((s) => s.trim().replace(/^["']|["']$/g, '')).filter(Boolean).join(', ');
|
|
36
|
+
}
|
|
37
|
+
out[kv[1]] = v;
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const rows = [];
|
|
43
|
+
const problems = [];
|
|
44
|
+
for (const cat of CATEGORY_DIRS) {
|
|
45
|
+
const catAbs = path.join(dir, cat);
|
|
46
|
+
if (!fs.existsSync(catAbs)) continue;
|
|
47
|
+
for (const f of fs.readdirSync(catAbs).filter((f) => f.endsWith('.md')).sort()) {
|
|
48
|
+
const rel = path.join(cat, f);
|
|
49
|
+
let fm;
|
|
50
|
+
try { fm = parseFrontmatter(fs.readFileSync(path.join(catAbs, f), 'utf8')); }
|
|
51
|
+
catch { problems.push(`${rel}: unreadable`); continue; }
|
|
52
|
+
if (!fm || !fm.id) { problems.push(`${rel}: missing frontmatter/id`); continue; }
|
|
53
|
+
if (fm.status === 'superseded') { problems.push(`${rel}: status superseded but not in _archive/`); continue; }
|
|
54
|
+
rows.push(`| ${fm.id} | ${fm.title || ''} | ${fm.category || cat} | ${fm.profile || ''} | ${fm.tags || ''} | ${fm.date || ''} | ${fm.valid_until || ''} | ${rel} |`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
rows.sort();
|
|
58
|
+
|
|
59
|
+
const indexPath = path.join(dir, 'INDEX.md');
|
|
60
|
+
const existing = fs.existsSync(indexPath) ? fs.readFileSync(indexPath, 'utf8') : '';
|
|
61
|
+
const tableStart = existing.search(/^\| id \|/m);
|
|
62
|
+
const header = tableStart >= 0
|
|
63
|
+
? existing.slice(0, tableStart)
|
|
64
|
+
: '# Research Library — INDEX\n\n';
|
|
65
|
+
const headerRow = '| id | title | category | profile | tags | date | valid_until | path |\n|----|-------|----------|---------|------|------|-------------|------|\n';
|
|
66
|
+
const next = header + headerRow + rows.join('\n') + (rows.length ? '\n' : '');
|
|
67
|
+
|
|
68
|
+
if (next === existing) {
|
|
69
|
+
console.log(`INDEX.md in sync (${rows.length} report(s)).`);
|
|
70
|
+
} else if (checkOnly) {
|
|
71
|
+
console.error(`INDEX.md out of sync: ${rows.length} report(s) on disk.`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
} else {
|
|
74
|
+
fs.writeFileSync(indexPath, next, 'utf8');
|
|
75
|
+
console.log(`INDEX.md rebuilt: ${rows.length} report(s).`);
|
|
76
|
+
}
|
|
77
|
+
for (const p of problems) console.warn(`WARN ${p}`);
|
|
@@ -14,12 +14,14 @@ export const meta = {
|
|
|
14
14
|
// ───────────────────────────────────────────────────────────────────────────
|
|
15
15
|
// args contract — supplied by the /new skill (it owns git + tracker + human gates):
|
|
16
16
|
// cards [{ cardId, cardPath, scopeFiles[], editableFiles[], qaTier,
|
|
17
|
-
// hasSecurityFiles, runSimplify, archBaselinePath }]
|
|
17
|
+
// hasSecurityFiles, runSimplify, archBaselinePath, reviewBundlePath }]
|
|
18
18
|
// sequential → length 1; team-mode → the whole group/wave.
|
|
19
19
|
// scopeFiles files the card's committed diff touched (review surface)
|
|
20
20
|
// editableFiles ownership-map files the coder MAY write (fix scope)
|
|
21
21
|
// qaTier 'light' | 'full' (qa-sentinel runs only at 'full'; else deferred to Final)
|
|
22
22
|
// archBaselinePath /tmp/arch-baseline-<id>.md (or null)
|
|
23
|
+
// reviewBundlePath /tmp/review-bundle-<id>.json (v5.0.1, or null — briefs gain the
|
|
24
|
+
// anti-re-read phrase when present; absent → unchanged, fail-open)
|
|
23
25
|
// worktreePath string the batch worktree (agents cd into it)
|
|
24
26
|
// baseBranch string trunk the diff is taken against
|
|
25
27
|
// config object resolved baldart.config.yml (paths.* … )
|
|
@@ -252,15 +254,27 @@ const FIX_SCHEMA = {
|
|
|
252
254
|
}
|
|
253
255
|
|
|
254
256
|
// ---- Shared brief fragments -------------------------------------------------
|
|
257
|
+
// Review bundles (v5.0.1 — anti-re-read handoff, implement.md step 11c): when the
|
|
258
|
+
// orchestrator passed reviewBundlePath, every brief carries the binding phrase.
|
|
259
|
+
// Absent → briefs unchanged (pre-5.0 orchestrator / standalone), fail-open.
|
|
260
|
+
const bundlePaths = dedupe(cards.map((c) => c.reviewBundlePath).filter(Boolean))
|
|
261
|
+
const waveBundleBrief = bundlePaths.length
|
|
262
|
+
? `Review bundle(s): ${bundlePaths.join(', ')} — Read them FIRST; do NOT re-Read source files to rebuild context you can get from their paths; for hot_files, Read ONLY the listed symbol ranges.`
|
|
263
|
+
: null
|
|
264
|
+
|
|
255
265
|
const waveBrief = [
|
|
256
266
|
`Worktree: ${a.worktreePath || '(cwd)'}`,
|
|
257
267
|
`Base branch for the diff: ${a.baseBranch || '(trunk)'}`,
|
|
258
268
|
`Cards under review (Read each YAML for acceptance_criteria + entrypoints):\n${cards.map((c) => `${c.cardId} — ${c.cardPath || '(no path)'}`).join('\n')}`,
|
|
259
269
|
`ALL changed files in this wave (review every one):\n${unionScope.join('\n')}`,
|
|
270
|
+
...(waveBundleBrief ? [waveBundleBrief] : []),
|
|
260
271
|
].join('\n\n')
|
|
261
272
|
|
|
262
273
|
function cardScopeBrief(c) {
|
|
263
|
-
|
|
274
|
+
const bundle = c.reviewBundlePath
|
|
275
|
+
? `\nReview bundle: ${c.reviewBundlePath} — Read it FIRST; do NOT re-Read source files to rebuild context you can get from its paths; for hot_files, Read ONLY the listed symbol ranges.`
|
|
276
|
+
: ''
|
|
277
|
+
return `Card ${c.cardId} — files changed (review surface):\n${asArr(c.scopeFiles).join('\n') || '(none)'}${bundle}`
|
|
264
278
|
}
|
|
265
279
|
|
|
266
280
|
// ───────────────────────────────────────────────────────────────────────────
|
|
@@ -116,7 +116,7 @@ const fixerOpts = fixerAgent === 'coder' ? { model: fixPassModel } : {}
|
|
|
116
116
|
// finding's domain: doc fixes judged by doc-reviewer (code-reviewer judging prose was
|
|
117
117
|
// cross-domain), test fixes by qa-sentinel (THE test specialist). `ui` and `code` stay with
|
|
118
118
|
// code-reviewer: the judge verifies a CODE change, which is code-reviewer's charter
|
|
119
|
-
// (including DS-
|
|
119
|
+
// (including the DS Post-Intervention Coherence check — code-reviewer DS rule 7 — for UI). Fixer and judge of the same type are still two
|
|
120
120
|
// independent instances — the judge prompt is adversarial and greps the files itself.
|
|
121
121
|
const judgeAgent = (domain === 'security' || domain === 'migration') ? 'security-reviewer'
|
|
122
122
|
: domain === 'perf' ? 'api-perf-cost-auditor'
|
|
@@ -618,7 +618,7 @@ async function runCard(cardId, cardPath) {
|
|
|
618
618
|
impl = await agentSafe(
|
|
619
619
|
`Implement card ${cardId} per ${REF}/implement.md Phase 2 — you ARE the owner_agent '${ownerAgent}' — and ${REF}/completeness.md (Phase 2.5 + 2.5b AC-closure ledger). Run all gates/bash yourself.\n${bindingBit}\n${phase1Brief}\n\n${cardBrief}\n\n` +
|
|
620
620
|
`TOOL-CALL BUDGET (v5.0.0 cap-and-handoff — implement.md step 7 briefing section): soft ~80 tool calls, hard 100. Crossing the soft cap (or re-reading the same files): commit WIP ([${cardId}] WIP checkpoint), write /tmp/checkpoint-${cardId}.json per coder.md § Tool-Call Budget & Checkpoint, and return partial:true + checkpointPath + the [CAP-HANDOFF] marker in note. At the hard cap STOP even mid-task — a fresh continuation finishes cheaper than 100 more calls on a bloated context.\n\n` +
|
|
621
|
-
`POLICIES: G26 Phase-2 lint/tsc/test/build failing after the module's retry cap → buildBlocked:true + blockedGate. Build the AC Closure Ledger (one row per AC: implemented|unmet|policy-deferred). DO NOT silently defer; report unmet rows (excluding policy-deferred). Persist the diff to /tmp/diff-${cardId}.txt AND your completion-report block to /tmp/completion-${cardId}.md. LAST STEP (v5.0.0 review bundle — implement.md step 11c): run \`node "$(ls .claude/skills/new/scripts/build-review-bundle.mjs .framework/framework/.claude/skills/new/scripts/build-review-bundle.mjs 2>/dev/null | head -1)" --card ${cardId} --worktree "$(pwd)" --trunk ${JSON.stringify(TRUNK)} --may-edit "<your mayEditPaths, comma-separated>"\` then \`node "$(ls .claude/skills/new/scripts/doc-invariants.mjs .framework/framework/.claude/skills/new/scripts/doc-invariants.mjs 2>/dev/null | head -1)" --diff /tmp/diff-${cardId}.txt --card <card yaml path> --config baldart.config.yml\` (both scripts missing → skip, note 'bundle-unavailable').\n\n` +
|
|
621
|
+
`POLICIES: G26 Phase-2 lint/tsc/test/build failing after the module's retry cap → buildBlocked:true + blockedGate. Build the AC Closure Ledger (one row per AC: implemented|unmet|policy-deferred). DO NOT silently defer; report unmet rows (excluding policy-deferred). Persist the diff SCOPED to your MAY-EDIT paths (\`git diff ${JSON.stringify(TRUNK)}...HEAD -- <mayEditPaths>\` — the shared worktree accumulates prior cards' commits, an unscoped dump would include them; v5.0.1) to /tmp/diff-${cardId}.txt AND your completion-report block to /tmp/completion-${cardId}.md. LAST STEP (v5.0.0 review bundle — implement.md step 11c): run \`node "$(ls .claude/skills/new/scripts/build-review-bundle.mjs .framework/framework/.claude/skills/new/scripts/build-review-bundle.mjs 2>/dev/null | head -1)" --card ${cardId} --worktree "$(pwd)" --trunk ${JSON.stringify(TRUNK)} --may-edit "<your mayEditPaths, comma-separated>"\` then \`node "$(ls .claude/skills/new/scripts/doc-invariants.mjs .framework/framework/.claude/skills/new/scripts/doc-invariants.mjs 2>/dev/null | head -1)" --diff /tmp/diff-${cardId}.txt --card <card yaml path> --config baldart.config.yml\` (both scripts missing → skip, note 'bundle-unavailable').\n\n` +
|
|
622
622
|
`E4 OWNERSHIP RECONCILE (implement.md §11b — do this BEFORE returning): the card's MAY-EDIT includes files_likely_touched ∪ paths NAMED EXPLICITLY in this card's acceptance_criteria/definition_of_done (e.g. an ADR the DoD says to update, the data-model / ER doc for a schema change). Editing THOSE is in-scope. For any OTHER dirty file outside MAY-EDIT (another card's file, or unrelated): \`git checkout -- <file>\` to revert it (NEVER leave it orphaned), list it in revertedOutOfOwnership. Set fileDiffViolation:true ONLY if such an edit genuinely could not be reverted (then say why in note) — it is no longer a silent label.\n\n` +
|
|
623
623
|
`Return: { epic, buildBlocked, blockedGate, unmetACs:[{n,text}], scopeFiles, mayEditPaths, revertedOutOfOwnership:[paths], fileDiffViolation, note }`,
|
|
624
624
|
{ label: `implement:${cardId}`, phase: 'Implement', agentType: ownerAgent,
|
|
@@ -90,7 +90,7 @@ if (error) {
|
|
|
90
90
|
|
|
91
91
|
> **SSOT.** This section is the canonical policy for reference-aliasing mutation
|
|
92
92
|
> hazards. It is cited as the source of truth by `coder.md`
|
|
93
|
-
> (§
|
|
93
|
+
> (§ Code Standards & Author-Time Simplicity Discipline — 1-line binding since v5.0.0), `code-reviewer.md` (review checklist),
|
|
94
94
|
> and `.claude/skills/new/references/{completeness,codex-gate}.md` (Phase 2.5 step 5c
|
|
95
95
|
> deterministic detector + Phase 3.7 gate). When those files cite "§ Reference-Aliasing Mutation
|
|
96
96
|
> Patterns", they mean this section.
|
|
@@ -163,7 +163,7 @@ the helper's JSDoc so future editors find the contract.
|
|
|
163
163
|
### Enforcement layers
|
|
164
164
|
|
|
165
165
|
- **This section** — full policy + JSDoc contract + remediation menu.
|
|
166
|
-
- `coder.md §
|
|
166
|
+
- `coder.md § Code Standards & Author-Time Simplicity Discipline` (1-line binding) — pre-implementation check.
|
|
167
167
|
- `code-reviewer.md` review checklist — flags un-guarded patterns at review time.
|
|
168
168
|
- `.claude/skills/new/references/completeness.md § Phase 2.5 step 5c` — deterministic
|
|
169
169
|
detector that flags un-guarded patterns as `[ALIAS-MUTATION] BLOCKER` in
|
|
@@ -18,8 +18,13 @@ audits), `wiki-curator` (coverage signals), the `full-sweep` routine.
|
|
|
18
18
|
- **Dispatch**: `agents/doc-audit-protocol.md SECTION=<audit-process|drift-validators|topological-generation|epistemic-metadata|scip-refs|schema-drift|coverage-gauges>`.
|
|
19
19
|
Grep for `### SECTION: <name>` and Read ONLY the sections your run needs.
|
|
20
20
|
- **When**: audit mode = invoked WITHOUT card context (general audit, nightly
|
|
21
|
-
run, cleanup) or explicitly told "full audit". A per-card invocation
|
|
22
|
-
|
|
21
|
+
run, cleanup) or explicitly told "full audit". A per-card invocation does NOT
|
|
22
|
+
read this module wholesale — the ONLY exceptions are the sections the agent
|
|
23
|
+
core CITES explicitly (v5.0.1): `epistemic-metadata` + `scip-refs` (ADR
|
|
24
|
+
quantitative claims), `topological-generation` (a per-card pass writing MORE
|
|
25
|
+
than one doc file), `schema-drift` (a documented payload's field SET changed
|
|
26
|
+
in the diff). Everything else (audit-process, drift-validators,
|
|
27
|
+
coverage-gauges) stays audit-only.
|
|
23
28
|
- **Graceful degradation (MANDATORY)**: every `npm run validate:*` /
|
|
24
29
|
`scripts/*.mjs` referenced here is a project-specific example — check the
|
|
25
30
|
project's `package.json` first, run only what exists, and skip each absent
|
|
@@ -147,7 +152,7 @@ model) · `external-reference` (vendor docs, public benchmark).
|
|
|
147
152
|
4. Is `confidence` calibrated (a vendor cost quote is rarely `high`)?
|
|
148
153
|
|
|
149
154
|
Run `node scripts/validate-frontmatter.mjs --evidence-only` before finalizing
|
|
150
|
-
(advisory, exit 0). See
|
|
155
|
+
(advisory, exit 0). See `${paths.references_dir}/frontmatter-standard.md § Optional
|
|
151
156
|
epistemic metadata`.
|
|
152
157
|
|
|
153
158
|
### SECTION: scip-refs
|
|
@@ -162,7 +167,7 @@ SCIP symbol IDs survive moves/renames as long as the index is rebuilt —
|
|
|
162
167
|
F1=80.4% link survival vs ~66% with path-only refs (arXiv 2506.16440).
|
|
163
168
|
|
|
164
169
|
**Frontmatter contract** (full spec:
|
|
165
|
-
|
|
170
|
+
`${paths.references_dir}/frontmatter-standard.md § Code References`):
|
|
166
171
|
```yaml
|
|
167
172
|
code_refs:
|
|
168
173
|
- symbol: 'src/lib/permissions/middleware.ts#checkPermission()'
|
|
@@ -43,6 +43,7 @@ Route agents to the right module with minimal reading.
|
|
|
43
43
|
- If authoring/auditing a subagent whose return would flood the orchestrator context (free-form analysis/audit/research) -> read `agents/return-contract-protocol.md` and bound its final message: COMPACT headline + `path:line` findings + disk pointer, persist the long form. The input-side twin of the effort protocol.
|
|
44
44
|
- If authoring/editing an agent definition -> the shared operating procedures (injection guard, retrieval, memory, tool budget) live in `agents/agent-operating-protocol.md` and the reviewer verification passes (challenge/simulation/CoVe/risk) in `agents/review-protocol.md` — cite their sections, never re-inline them; keep only the 1-line binding versions in the agent body.
|
|
45
45
|
- If a skill performs runtime-mechanical operations (spawn an agent, gate on the user, track state, accelerate a fan-out, run an adversarial review) and must work on BOTH Claude Code and Codex -> read `agents/runtime-portability-protocol.md`: bind each abstract operation to the runtime (Claude `Task`/`Workflow`/`AskUserQuestion`/task-spine ↔ Codex named-agent spawn / inline / plain prompt / file-backed queue), detect the runtime once at kickoff, never probe Claude-only primitives on Codex. Shared policy (delegation, no-silent-fallback, worktree isolation) stays in `AGENTS.md` — cited, not restated.
|
|
46
|
+
- If conducting research (technology evaluation, best practices, compliance survey), spawning `senior-researcher`, or managing the research library (`${paths.research_dir}/`) -> read `agents/research-protocol.md` (the matching `SECTION=` only): pass a `PROFILE=<decision|deep|compare|regulatory>` token, run the library reuse pre-flight BEFORE searching, and route sources by nature via the source matrix. Interactive channel: the `/research` skill.
|
|
46
47
|
- If building or maintaining a derived LLM wiki overlay (`${paths.wiki_dir}/`) -> read `agents/llm-wiki-methodology.md` and invoke `wiki-curator` / `/capture`.
|
|
47
48
|
- For day-to-day status -> read and update `${paths.references_dir}/project-status.md`.
|
|
48
49
|
- For legacy context -> read `archive/project_full_legacy.md` if it exists.
|
|
@@ -85,6 +86,7 @@ When adding or updating agents, update REGISTRY.md — not this file.
|
|
|
85
86
|
- `agents/agent-operating-protocol.md` — Shared operating procedures for the core agents (injection guard, doc-retrieval consumption, persistent-memory hygiene, tool-budget discipline), `SECTION=` dispatch, read only the matching section; agents keep 1-line binding versions inline (since v5.0.0)
|
|
86
87
|
- `agents/review-protocol.md` — The shared verification engine for reviewers: Challenge + Actionability, Simulation (diff-walk / plan-walk), Chain-of-Verification, quantified risk scoring + absolute severity calibration, specialist-spawn discipline incl. orchestrated-mode `specialist_dispatch` suppression; `SECTION=` dispatch (since v5.0.0)
|
|
87
88
|
- `agents/doc-audit-protocol.md` — doc-reviewer's audit-mode procedures (drift validator suite, topological generation, epistemic metadata, SCIP anchors, schema/registry drift, coverage gauges); read ONLY when invoked without card context; `SECTION=` dispatch (since v5.0.0)
|
|
89
|
+
- `agents/research-protocol.md` — Research discipline: `PROFILE=<decision|deep|compare|regulatory>` output contracts (+ `DEPTH=` iterative loop), the research library (`paths.research_dir` — layout, report frontmatter, INDEX, archive-not-delete), the reuse pre-flight (`FULL_REUSE`/`DELTA`/`NEW` + per-category TTLs), and the versioned source matrix with its growth loop (`SOURCE_MATRIX_CANDIDATE`); `SECTION=` dispatch. The research-side sibling of `analysis-profiles.md` (since v5.1.0)
|
|
88
90
|
|
|
89
91
|
## Where to Document (Decision Tree)
|
|
90
92
|
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Research Protocol — profiles, library, reuse, and the source matrix
|
|
2
|
+
|
|
3
|
+
**Purpose**: the single SSOT for how BALDART conducts research. Consumed by the
|
|
4
|
+
`senior-researcher` agent (worker) and the `/research` skill (interactive
|
|
5
|
+
orchestrator); `/prd` Step 2.5 spawns the worker directly with the tokens
|
|
6
|
+
defined here. One research contract used to fit every request — a
|
|
7
|
+
publication-grade literature review — which conflicted with what orchestrators
|
|
8
|
+
actually need (fast, stack-aware, decision-ready answers) and buried finished
|
|
9
|
+
research where it was never reused. This module fixes both: **profiles** shape
|
|
10
|
+
the output to the purpose, the **library** makes every report a reusable,
|
|
11
|
+
indexed asset, and the **source matrix** routes each research nature to the
|
|
12
|
+
right sources and grows over time.
|
|
13
|
+
|
|
14
|
+
This is the research-side sibling of `analysis-profiles.md` (same mechanism:
|
|
15
|
+
one agent + a `PROFILE=` prompt token + one SSOT module — never a twin agent).
|
|
16
|
+
Prompt-level, zero new config keys beyond `paths.research_dir`, zero runtime
|
|
17
|
+
dependency.
|
|
18
|
+
|
|
19
|
+
## Contract
|
|
20
|
+
|
|
21
|
+
- **Dispatch**: consumers cite a section as
|
|
22
|
+
`agents/research-protocol.md SECTION=<profiles|library|reuse|sources>`.
|
|
23
|
+
When you (an agent or skill) need the full procedure, Grep this file for the
|
|
24
|
+
heading `### SECTION: <name>` and Read ONLY that section — never this module
|
|
25
|
+
end-to-end.
|
|
26
|
+
- **Degrade-safe**: everything here degrades, never aborts. No
|
|
27
|
+
`paths.research_dir` → deliver to the prompt-supplied path (or
|
|
28
|
+
`${paths.docs_dir}/` as last resort) and skip the library steps. No
|
|
29
|
+
`SOURCES.md` → fall back to the framework default matrix. No matrix at all →
|
|
30
|
+
proceed with judgment and say so in the report.
|
|
31
|
+
- The agent body keeps 1-line BINDING versions of these rules inline; if the
|
|
32
|
+
inline line and this module diverge, **this module wins** — fix the agent.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### SECTION: profiles
|
|
37
|
+
|
|
38
|
+
The `PROFILE=<decision|deep|compare|regulatory>` token in the spawn prompt
|
|
39
|
+
selects the research contract. **Token absent → `deep`** (preserves the legacy
|
|
40
|
+
full-report semantics for direct invocation and for existing spawners that
|
|
41
|
+
pass no token).
|
|
42
|
+
|
|
43
|
+
| Profile | Typical consumer | Output contract | Depth |
|
|
44
|
+
|---|---|---|---|
|
|
45
|
+
| `decision` | `/prd` Step 2.5, orchestrators mid-pipeline | Per-topic blocks, **recommendation first**: Recommendation (for THIS stack) → Best practices → Gotchas / anti-patterns → **Contradictions & Unknowns (mandatory section)** → Sources. Matches the `/prd` "Processing Findings" shape byte-for-byte. | Time-boxed; 1–3 questions; no ceremony sections |
|
|
46
|
+
| `deep` | direct user invocation, `/research` | The full §0–§11 report (Retrieval Index, TOC, Executive Summary, Taxonomy, Comparative Analysis, Key Findings, Recommendation, Risks, Evidence Map, Annotated Bibliography, Appendix with Search Log) | Full survey; see the DEPTH token below |
|
|
47
|
+
| `compare` | technology / vendor evaluations | Comparison matrix on fixed axes — performance, cost, complexity, risk, maturity, adoption — then Recommendation + explicit "when NOT to use" per option | Medium; one matrix, no unbounded exploration |
|
|
48
|
+
| `regulatory` | `/prd` S2 signal, compliance questions | Obligation checklist (requirement → source → deadline/threshold → implementation note), jurisdiction-aware; normative sources only for the obligations themselves | High rigor, tightly scoped to the named jurisdiction(s) |
|
|
49
|
+
|
|
50
|
+
Rules that apply to EVERY profile:
|
|
51
|
+
|
|
52
|
+
- **AI-readable minimum**: every report — not just `deep` — is consumed by an
|
|
53
|
+
AI reader with limited context: short paragraphs, dense factual bullets,
|
|
54
|
+
modular self-contained sections, consistent terminology. The full ceremony
|
|
55
|
+
(Retrieval Index, Evidence Map, Search Log) belongs to `deep` only; the
|
|
56
|
+
lighter profiles carry traceability through their per-topic **Sources**
|
|
57
|
+
lists (dated + evidence-labeled).
|
|
58
|
+
- **Recommendation is stack-bound**: evaluate against the stack signature and
|
|
59
|
+
the internal-repo findings supplied in the prompt — "best for THIS project",
|
|
60
|
+
never "best in the abstract".
|
|
61
|
+
- **Recency bias**: for fast-moving topics (frameworks, APIs, tooling) prefer
|
|
62
|
+
sources < 18 months old; date-stamp every source in the bibliography.
|
|
63
|
+
- **Contradictions surface early**: when evidence is split or absent, say so
|
|
64
|
+
near the top (in `decision` it is a mandatory section) — a hidden
|
|
65
|
+
disagreement is the failure mode that sends a project in the wrong
|
|
66
|
+
direction.
|
|
67
|
+
|
|
68
|
+
**`DEPTH=<1..3>` (deep profile only, default 1)** — the iterative
|
|
69
|
+
breadth/depth loop, opt-in so legacy spawns cost what they cost today:
|
|
70
|
+
|
|
71
|
+
- `DEPTH=1` (default): single research pass — today's behavior.
|
|
72
|
+
- `DEPTH=2..3`: before searching, generate 3–5 expert *perspectives* on the
|
|
73
|
+
topic (architect, operator, security, cost-owner, end-user — pick what fits)
|
|
74
|
+
and derive each perspective's questions. Then per round: search → extract
|
|
75
|
+
*learnings* + *follow-up directions* → recurse into the most promising
|
|
76
|
+
directions until DEPTH is exhausted. Each round is bounded by the tool
|
|
77
|
+
budget (`agents/agent-operating-protocol.md SECTION=tool-budget`).
|
|
78
|
+
- At `DEPTH>=2`, before finalizing run a citation spot-check (CoVe-lite):
|
|
79
|
+
WebFetch the sources behind the decision-driving claims and verify they
|
|
80
|
+
actually support them; demote or drop any that don't.
|
|
81
|
+
|
|
82
|
+
### SECTION: library
|
|
83
|
+
|
|
84
|
+
The research library lives at `${paths.research_dir}` (key in
|
|
85
|
+
`baldart.config.yml`; seeded by the BALDART CLI):
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
${paths.research_dir}/
|
|
89
|
+
INDEX.md <- THE map. Agents do lookup HERE first, never by walking dirs.
|
|
90
|
+
SOURCES.md <- live source matrix (consumer-owned; see SECTION: sources)
|
|
91
|
+
architecture/ integrations/ regulatory/ ux-patterns/ algorithms/ tooling/
|
|
92
|
+
_archive/ <- superseded reports: banner added, row removed from INDEX
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- **Category**: pick the closest of the six; a report that genuinely fits none
|
|
96
|
+
goes in the closest match with a distinguishing tag (do NOT invent new
|
|
97
|
+
top-level directories — the closed set keeps lookup deterministic).
|
|
98
|
+
- **Report frontmatter** (every report, mandatory — this is the source of
|
|
99
|
+
truth; INDEX.md is a regenerable view over it):
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
---
|
|
103
|
+
id: RES-<YYYYMMDD>-<slug> # date + slug, NEVER max+1 (see Concurrency)
|
|
104
|
+
title: <one line>
|
|
105
|
+
category: architecture|integrations|regulatory|ux-patterns|algorithms|tooling
|
|
106
|
+
tags: [<free-form, lowercase, for findability — be generous>]
|
|
107
|
+
profile: decision|deep|compare|regulatory
|
|
108
|
+
nature: scientific|dev|regulatory|ux|market
|
|
109
|
+
stack_signature: "<framework + database + auth, from baldart.config.yml>"
|
|
110
|
+
date: <YYYY-MM-DD>
|
|
111
|
+
valid_until: <YYYY-MM-DD> # date + category TTL (see SECTION: reuse)
|
|
112
|
+
status: current # current | superseded
|
|
113
|
+
questions:
|
|
114
|
+
- <the research questions answered>
|
|
115
|
+
sources_count: <n>
|
|
116
|
+
related: [] # ids of related reports
|
|
117
|
+
---
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
- **INDEX.md row format** (append-only; one row per report):
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
| <id> | <title> | <category> | <profile> | <tags csv> | <date> | <valid_until> | <path> |
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- **Archive, never delete**: a superseded report moves to `_archive/`, gets a
|
|
127
|
+
first-line banner `> [!SUPERSEDED] Replaced by <id>. Non-authoritative.`,
|
|
128
|
+
`status: superseded` in frontmatter, and its INDEX row is removed (out of
|
|
129
|
+
the index = invisible to lookup, history preserved in git).
|
|
130
|
+
- **Concurrency**: IDs are `RES-<YYYYMMDD>-<slug>` (add a short unique suffix
|
|
131
|
+
only on a real collision) — never "max existing + 1", which races under
|
|
132
|
+
parallel spawns. When an orchestrator (the `/research` skill, `/prd`) runs
|
|
133
|
+
the show, **the orchestrator pre-allocates id + full path in each spawn
|
|
134
|
+
prompt and serializes the INDEX appends itself** in its filing step; a
|
|
135
|
+
worker spawned solo appends its own row. Reconciliation is deterministic:
|
|
136
|
+
`rebuild-research-index.mjs` (shipped with the `/research` skill)
|
|
137
|
+
regenerates INDEX.md from report frontmatter.
|
|
138
|
+
- **Delivery-path resolution** (total, in order — never undefined, never
|
|
139
|
+
abort): (1) an explicit output path in the spawn prompt is AUTHORITATIVE;
|
|
140
|
+
(2) else `${paths.research_dir}/<category>/<id>-<slug>.md`;
|
|
141
|
+
(3) else (no path, no key) `${paths.docs_dir}/`.
|
|
142
|
+
|
|
143
|
+
### SECTION: reuse
|
|
144
|
+
|
|
145
|
+
Research repeats across features and projects. Before ANY new research, run
|
|
146
|
+
this pre-flight (skip it only when `paths.research_dir` is missing/empty —
|
|
147
|
+
then use the prompt-supplied path and proceed as a plain one-shot run):
|
|
148
|
+
|
|
149
|
+
1. **Lookup**: Read `INDEX.md` (only the index — not the reports). Match the
|
|
150
|
+
topic against `title`, `tags`, `category`.
|
|
151
|
+
2. **On hit, judge fitness**:
|
|
152
|
+
- **Freshness**: compare today against `valid_until`. Category TTLs (used
|
|
153
|
+
to SET `valid_until` at write time): `regulatory` 6 months ·
|
|
154
|
+
`integrations`/`tooling` 6–12 · `ux-patterns` 12 ·
|
|
155
|
+
`architecture`/`algorithms` 24.
|
|
156
|
+
- **Stack match**: compare the report's `stack_signature` with the current
|
|
157
|
+
one.
|
|
158
|
+
3. **Decide and DECLARE the decision in your report/return** (`REUSE:` line):
|
|
159
|
+
- `FULL_REUSE` — fresh + same stack + questions covered → return the
|
|
160
|
+
existing report; do not search again.
|
|
161
|
+
- `DELTA` — partially stale, stack drifted, or questions partially covered
|
|
162
|
+
→ update ONLY what expired, publish as a new report that `related:`-links
|
|
163
|
+
the old one; the old report is archived per SECTION: library.
|
|
164
|
+
- `NEW` — no usable hit.
|
|
165
|
+
- **Anti-false-reuse guard**: doubtful staleness or a different stack →
|
|
166
|
+
`DELTA`, never `FULL_REUSE`. Reuse must never silently serve a stale
|
|
167
|
+
answer to a decision-making consumer.
|
|
168
|
+
4. **Orchestrator polling contract**: when the spawn prompt pre-allocates an
|
|
169
|
+
output path, ALWAYS write a file there — the new report (`NEW`/`DELTA`), or
|
|
170
|
+
a stub for `FULL_REUSE`:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
RESEARCH_OUTPUT_PATH: <this file's own path>
|
|
174
|
+
REUSE: FULL_REUSE -> <path of the existing report>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
so a file-exists poll never times out and never matches a stale artifact.
|
|
178
|
+
|
|
179
|
+
### SECTION: sources
|
|
180
|
+
|
|
181
|
+
The source matrix routes each research **nature** to the right sources. Schema
|
|
182
|
+
(rows = natures; the columns are fixed):
|
|
183
|
+
|
|
184
|
+
| Column | Meaning |
|
|
185
|
+
|---|---|
|
|
186
|
+
| `nature` | scientific · dev · regulatory · ux · market |
|
|
187
|
+
| `primary` | search these first; sufficient alone for [STRONG]/[MODERATE] claims |
|
|
188
|
+
| `secondary` | corroboration and leads; never sole support for a decision-driving claim |
|
|
189
|
+
| `avoid` | known-poor signal for this nature (content farms, marketing, SEO spam) |
|
|
190
|
+
| `notes` | nature-specific heuristics (recency windows, venue quality cues) |
|
|
191
|
+
|
|
192
|
+
**Resolution order** (no dual-SSOT — the default matrix lives in ONE file):
|
|
193
|
+
|
|
194
|
+
1. `${paths.research_dir}/SOURCES.md` — the live, consumer-owned matrix
|
|
195
|
+
(framework defaults + the project's `## Local additions`).
|
|
196
|
+
2. `.framework/framework/templates/research-sources.template.md` — the
|
|
197
|
+
framework default matrix (readable inside every consumer install).
|
|
198
|
+
3. Neither readable → proceed with judgment and state in the report that no
|
|
199
|
+
source matrix was available.
|
|
200
|
+
|
|
201
|
+
**Growth loop** (how the matrix improves project after project): when a run
|
|
202
|
+
hits a matrix gap — an unmapped nature, a newly discovered source that proved
|
|
203
|
+
high-quality in THIS run, or a mapped source that proved poor — append to the
|
|
204
|
+
END of the report:
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
## SOURCE_MATRIX_CANDIDATE
|
|
208
|
+
|
|
209
|
+
- nature: <matrix row>
|
|
210
|
+
change: add-source | demote-source | new-nature
|
|
211
|
+
source: <name + URL>
|
|
212
|
+
tier: primary | secondary | avoid
|
|
213
|
+
evidence: <what happened in this run that proves it, 1-3 lines>
|
|
214
|
+
|
|
215
|
+
### Prompt for BALDART (copy-paste)
|
|
216
|
+
|
|
217
|
+
Aggiorna la matrice fonti in `framework/templates/research-sources.template.md`:
|
|
218
|
+
<change> per nature `<nature>`: `<source>` come `<tier>` — evidenza: <evidence>.
|
|
219
|
+
Bump `matrix_version` (minor per add, patch per demote/note) e aggiungi la voce
|
|
220
|
+
a `framework/templates/research-sources.CHANGELOG.md`.
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
(the research twin of skill-improver's `## Upstream Candidates`). Also mention
|
|
224
|
+
the candidate in your COMPACT return so the orchestrator can act on it. The
|
|
225
|
+
`/research` skill then offers two applications: (a) immediately to the local
|
|
226
|
+
`SOURCES.md` `## Local additions`, and/or (b) the copy-paste prompt upstream to
|
|
227
|
+
the BALDART maintainer session. Emit a candidate ONLY with run-local evidence —
|
|
228
|
+
never from general knowledge.
|
|
@@ -422,6 +422,23 @@ competing methodology — it detects the task type and passes the matching
|
|
|
422
422
|
- "/capture"
|
|
423
423
|
- "Salva sintesi" / "distilla conversazione" / "questa conversazione in wiki"
|
|
424
424
|
|
|
425
|
+
### research
|
|
426
|
+
|
|
427
|
+
**When to use**:
|
|
428
|
+
|
|
429
|
+
- Interactive, routed research over the research library (`paths.research_dir`)
|
|
430
|
+
- Scopes the question, routes profile (`decision`/`deep`/`compare`/`regulatory`) +
|
|
431
|
+
source policy by nature, checks the library for reusable prior research
|
|
432
|
+
BEFORE searching, launches `senior-researcher`, files + indexes the report
|
|
433
|
+
- Closes the source-matrix growth loop (`SOURCE_MATRIX_CANDIDATE`)
|
|
434
|
+
- NOT for `/prd`'s embedded research step (prd spawns the agent directly)
|
|
435
|
+
|
|
436
|
+
**Triggers**:
|
|
437
|
+
|
|
438
|
+
- "/research"
|
|
439
|
+
- "Fai una ricerca" / "ricerca best practice" / "confronta X e Y"
|
|
440
|
+
- "È già stato ricercato?" / "cosa dice la letteratura su"
|
|
441
|
+
|
|
425
442
|
### graph-align
|
|
426
443
|
|
|
427
444
|
**When to use**:
|
|
@@ -105,6 +105,7 @@ Empty string `""` means the concept doesn't exist in your project. Skills gated
|
|
|
105
105
|
| `backlog_dir` | `backlog` | new, prd, context-primer |
|
|
106
106
|
| `adrs_dir` | `docs/decisions` | prd, prd-add |
|
|
107
107
|
| `prd_dir` | `docs/prd` | prd, prd-add, ui-design |
|
|
108
|
+
| `research_dir` | `docs/research` | senior-researcher, research, prd (Step 2.5) — the research library (v5.1.0) |
|
|
108
109
|
| `docs_dir` | `docs` | code-reviewer, senior-researcher, worktree-manager (rg-search fallback root) |
|
|
109
110
|
| `references_dir` | `docs/references` | new, prd, context-primer, doc-writing-for-rag, simplify |
|
|
110
111
|
| `wiki_dir` | `docs/wiki` | capture, context-primer |
|
|
@@ -129,6 +130,28 @@ e2e_review:
|
|
|
129
130
|
| `pixel_diff_threshold` | float `0.0`–`1.0` | `0.02` | When the implementation screenshot vs mockup pixel-diff is below this fraction, the orchestrator skips the Vision call for that route and treats it as a pass. Primary latency / cost saver — most routes pass pixel-diff cleanly. Set higher to skip Vision more aggressively; set to `0.0` to always invoke Vision. |
|
|
130
131
|
| `require_override_reason` | bool | `true` | When self-heal exhausts iterations and the user chooses to override the gate, a written reason is mandatory. The reason is recorded both in the batch tracker's `## Issues & Flags` (as `[E2E-OVERRIDE] <reason>`) and in `.baldart/e2e-review/<CARD-ID>/report.json`. Set `false` to allow silent override (not recommended). |
|
|
131
132
|
|
|
133
|
+
### 4.2.2 `research_dir` — the research library (v5.1.0+)
|
|
134
|
+
|
|
135
|
+
Consumer-owned home of every research report produced by `senior-researcher`
|
|
136
|
+
(directly, via the `/research` skill, or by `/prd` Step 2.5). Layout, report
|
|
137
|
+
frontmatter, reuse pre-flight and the source matrix are defined in
|
|
138
|
+
`framework/agents/research-protocol.md`.
|
|
139
|
+
|
|
140
|
+
Lifecycle:
|
|
141
|
+
|
|
142
|
+
- **Creation** — `baldart configure` (right after writing the key; default
|
|
143
|
+
`docs/research` is proposed on FIRST encounter only) and `baldart doctor`
|
|
144
|
+
(`create-research-dir`, confirmable). Seeds `INDEX.md` (the library map) and
|
|
145
|
+
`SOURCES.md` (the live source matrix) from framework templates.
|
|
146
|
+
- **Update** — `baldart update` only backfills missing seeds into an EXISTING
|
|
147
|
+
directory; it never recreates a deleted library.
|
|
148
|
+
- **Opt-out** — set the key to `""`: respected everywhere, never re-proposed,
|
|
149
|
+
never resurrected.
|
|
150
|
+
- **Source matrix versioning** — `SOURCES.md` carries `matrix_version`
|
|
151
|
+
frontmatter; when the framework template ships a newer matrix, `doctor`
|
|
152
|
+
raises an ADVISORY (never overwrites — your `## Local additions` and manual
|
|
153
|
+
merges are yours).
|
|
154
|
+
|
|
132
155
|
### 4.3 `identity` — brand and audience facts
|
|
133
156
|
|
|
134
157
|
| Key | Type | Notes |
|
|
@@ -258,7 +258,7 @@ After update, these files exist locally and are authoritative:
|
|
|
258
258
|
| Numeric reference tables (type / contrast / spacing / density) | `.framework/framework/agents/design-system-protocol.md` § "Reference Tables (embed)" |
|
|
259
259
|
| Token cascade primitive → semantic → component | `.framework/framework/agents/design-system-protocol.md` § "Token Cascade" |
|
|
260
260
|
| Upgraded `ui-expert` (states taxonomy, red flags, gates) | `.framework/framework/.claude/agents/ui-expert.md` |
|
|
261
|
-
| Code-reviewer
|
|
261
|
+
| Code-reviewer Post-Intervention Coherence (merge gate) | `.framework/framework/.claude/agents/code-reviewer.md` § "Design System Compliance" rule 7 (Post-Intervention Coherence Check) |
|
|
262
262
|
| `ui-design` Step H (design-time gate) | `.framework/framework/.claude/skills/ui-design/SKILL.md` |
|
|
263
263
|
| Performance Gates (CWV 2026, LCP/INP/CLS) | `.framework/framework/.claude/skills/frontend-design/SKILL.md` § "Performance Gates" |
|
|
264
264
|
| Motion + reduced-motion + View Transitions | `.framework/framework/.claude/skills/motion-design/reference/accessibility-and-modern-apis.md` |
|
|
@@ -46,6 +46,12 @@ paths:
|
|
|
46
46
|
backlog_dir: "" # e.g. backlog
|
|
47
47
|
adrs_dir: "" # e.g. docs/decisions
|
|
48
48
|
prd_dir: "" # e.g. docs/prd
|
|
49
|
+
# Research library (since v5.1.0). Consumer-owned home of every research
|
|
50
|
+
# report (senior-researcher / /research skill / /prd Step 2.5), indexed for
|
|
51
|
+
# reuse. Seeded with INDEX.md + SOURCES.md by `configure`/`doctor`; `update`
|
|
52
|
+
# only backfills seeds into an existing dir. Empty = deliberate opt-out
|
|
53
|
+
# (never re-proposed, never resurrected). Protocol: agents/research-protocol.md.
|
|
54
|
+
research_dir: "" # e.g. docs/research
|
|
49
55
|
docs_dir: "" # e.g. docs (umbrella docs root; rg-search fallback used by code-reviewer / senior-researcher / worktree-manager)
|
|
50
56
|
references_dir: "" # e.g. docs/references
|
|
51
57
|
wiki_dir: "" # e.g. docs/wiki (LLM-wiki overlay)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Research Library — INDEX
|
|
2
|
+
|
|
3
|
+
> **This file is THE map of the research library.** Agents resolve reuse
|
|
4
|
+
> lookups against this index only — a report without a row here is invisible.
|
|
5
|
+
> Rows are **append-only**; superseded reports move to `_archive/` and their
|
|
6
|
+
> row is REMOVED (archive, never delete). The frontmatter of each report is
|
|
7
|
+
> the source of truth; this index is a regenerable view
|
|
8
|
+
> (`rebuild-research-index.mjs` in the `/research` skill reconciles it).
|
|
9
|
+
>
|
|
10
|
+
> Protocol: `agents/research-protocol.md SECTION=library`.
|
|
11
|
+
|
|
12
|
+
| id | title | category | profile | tags | date | valid_until | path |
|
|
13
|
+
|----|-------|----------|---------|------|------|-------------|------|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog — research source matrix
|
|
2
|
+
|
|
3
|
+
History of `research-sources.template.md` (`matrix_version` frontmatter).
|
|
4
|
+
Framework-internal (never installed into consumers — consumers hold their own
|
|
5
|
+
seeded `SOURCES.md` copy and merge updates via the doctor advisory). Bump
|
|
6
|
+
`matrix_version` in the same edit: MINOR for added sources/natures, PATCH for
|
|
7
|
+
demotions and note refinements.
|
|
8
|
+
|
|
9
|
+
## 1.0.0 — 2026-07-03 (framework v5.1.0)
|
|
10
|
+
|
|
11
|
+
- Initial default matrix: 5 natures (scientific, dev, regulatory, ux, market)
|
|
12
|
+
× primary/secondary/avoid/notes, distilled from the v5.1.0 research-layer
|
|
13
|
+
design pass (OSS recon: GPT Researcher, dzhng/deep-research, STORM,
|
|
14
|
+
open_deep_research; house evidence-strength labels).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
matrix_version: 1.0.0
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Research Source Matrix
|
|
6
|
+
|
|
7
|
+
> Routes each research **nature** to the right sources. Read by
|
|
8
|
+
> `senior-researcher` on every run (resolution order and growth loop:
|
|
9
|
+
> `agents/research-protocol.md SECTION=sources`). This copy is
|
|
10
|
+
> **consumer-owned**: BALDART seeds it once and never overwrites it. Framework
|
|
11
|
+
> updates to the default matrix arrive as a doctor ADVISORY (compare
|
|
12
|
+
> `matrix_version` against the framework template) — merging is a human
|
|
13
|
+
> decision. Project-specific sources go under `## Local additions`.
|
|
14
|
+
|
|
15
|
+
## Default matrix (framework, v1.0.0)
|
|
16
|
+
|
|
17
|
+
| nature | primary | secondary | avoid | notes |
|
|
18
|
+
|---|---|---|---|---|
|
|
19
|
+
| **scientific** (algorithms, protocols, ML, formal methods) | Peer-reviewed venues (ACM DL, IEEE Xplore, USENIX, NeurIPS/ICML/ICLR), arXiv (flag as preprint), standards bodies (W3C, IETF, NIST) | Survey papers as entry points; Google Scholar citation chains; reputable lab/engineering blogs (paper-backed) | Popular-science rewrites; Medium summaries of papers; vendor "research" without artifacts | Prefer replicated results; extract method + dataset + metrics, not just conclusions |
|
|
20
|
+
| **dev** (frameworks, libraries, integration patterns, tooling) | Official documentation + release notes; the project's own GitHub repo (issues, discussions, RFCs); official engineering blogs | High-signal engineering blogs; conference talks; Stack Overflow accepted answers (check dates); HN threads for failure modes | SEO content farms ("Top 10 X in 2026"); AI-generated tutorial mills; outdated tutorials (> 18 months for fast-moving stacks) | Version-pin every claim (behavior changes across majors); GitHub issues reveal real gotchas docs hide |
|
|
21
|
+
| **regulatory** (compliance, privacy, accessibility, sector rules) | Primary legal texts (EUR-Lex, official gazettes); regulator guidance (EDPB, garanti, agencies); official standards (WCAG/W3C, PCI SSC, ISO abstracts) | Big-firm legal analyses (dated + jurisdiction-tagged); IAPP; specialized compliance blogs | Vendor compliance-marketing pages; forum legal opinions; anything without a jurisdiction + date | ALWAYS name the jurisdiction; obligations cite the primary text, practices may cite secondary |
|
|
22
|
+
| **ux** (interaction patterns, accessibility-in-practice, design systems) | Nielsen Norman Group; established design systems (Material, HIG, Carbon, Polaris) as pattern evidence; WCAG techniques; peer-reviewed HCI (CHI) | Baymard (e-commerce); reputable case studies with data; a11y practitioner blogs (Deque, TPGi) | Dribbble/Behance as evidence of usability (aesthetics ≠ usability); engagement-bait "UX laws" listicles | Pattern adoption across 2+ major design systems = [MODERATE] evidence of validity |
|
|
23
|
+
| **market** (vendor evaluation, pricing, adoption, ecosystem health) | Official pricing pages + changelogs + SLAs + status pages (dated snapshots); public financial/usage disclosures | Independent benchmarks (methodology visible); StackShare-class adoption signals; comparative engineering posts by USERS of the tool | Vendor-vs-competitor comparison pages; sponsored reviews; analyst quadrants without methodology access | Pricing claims MUST carry the retrieval date; ecosystem health = commit cadence + issue response, not stars |
|
|
24
|
+
|
|
25
|
+
## Local additions
|
|
26
|
+
|
|
27
|
+
<!-- Project-specific sources grow here (via the /research skill's matrix loop
|
|
28
|
+
or by hand). Same columns. BALDART never touches this section. -->
|
|
29
|
+
|
|
30
|
+
| nature | primary | secondary | avoid | notes |
|
|
31
|
+
|---|---|---|---|---|
|