baldart 4.93.0 → 4.94.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 +13 -0
- package/VERSION +1 -1
- package/framework/.claude/agents/REGISTRY.md +2 -2
- package/framework/.claude/agents/api-perf-cost-auditor.md +1 -1
- package/framework/.claude/agents/codebase-architect.md +57 -109
- package/framework/.claude/agents/hybrid-ml-architect.md +1 -1
- package/framework/.claude/agents/legal-counsel-gdpr.md +1 -1
- package/framework/.claude/agents/plan-auditor.md +1 -1
- package/framework/.claude/agents/security-reviewer.md +1 -1
- package/framework/.claude/commands/codexreview.md +1 -1
- package/framework/.claude/skills/bug/CHANGELOG.md +4 -0
- package/framework/.claude/skills/bug/SKILL.md +6 -4
- package/framework/.claude/skills/context-primer/CHANGELOG.md +10 -0
- package/framework/.claude/skills/context-primer/SKILL.md +26 -60
- package/framework/.claude/skills/ds-handoff/CHANGELOG.md +4 -0
- package/framework/.claude/skills/ds-handoff/SKILL.md +3 -2
- package/framework/.claude/skills/e2e-review/CHANGELOG.md +4 -0
- package/framework/.claude/skills/e2e-review/SKILL.md +6 -4
- package/framework/.claude/skills/new/CHANGELOG.md +4 -0
- package/framework/.claude/skills/new/SKILL.md +1 -1
- package/framework/.claude/skills/new/references/final-review.md +2 -1
- package/framework/.claude/skills/new/references/implement.md +1 -1
- package/framework/.claude/skills/new2/CHANGELOG.md +4 -0
- package/framework/.claude/skills/new2/SKILL.md +1 -1
- package/framework/.claude/skills/prd/CHANGELOG.md +4 -0
- package/framework/.claude/skills/prd/SKILL.md +1 -1
- package/framework/.claude/skills/prd/references/discovery-phase.md +7 -3
- package/framework/.claude/skills/prd-add/CHANGELOG.md +4 -0
- package/framework/.claude/skills/prd-add/SKILL.md +3 -2
- package/framework/.claude/skills/ui-design/CHANGELOG.md +4 -0
- package/framework/.claude/skills/ui-design/SKILL.md +2 -2
- package/framework/.claude/workflows/new-card-review.js +1 -1
- package/framework/.claude/workflows/new-final-review.js +1 -1
- package/framework/.claude/workflows/new2.js +6 -2
- package/framework/agents/analysis-profiles.md +286 -0
- package/framework/agents/index.md +2 -1
- package/framework/agents/skills-mapping.md +4 -0
- package/framework/templates/primitives/AGENTS.CHANGELOG.md +10 -0
- package/framework/templates/primitives/AGENTS.md +8 -3
- package/framework/templates/primitives/CLAUDE.CHANGELOG.md +6 -0
- package/framework/templates/primitives/CLAUDE.md +5 -2
- package/package.json +1 -1
|
@@ -211,7 +211,8 @@ that is a **gate violation**: log it as
|
|
|
211
211
|
Log `f.2-arch: reused N per-card baselines (no re-spawn)` in the tracker. This avoids the N+1
|
|
212
212
|
architect invocations the per-card persistence was designed to prevent.
|
|
213
213
|
- **Any missing** (a card was added late, or a baseline was purged) → invoke **codebase-architect**
|
|
214
|
-
ONCE over the batch scope
|
|
214
|
+
ONCE over the batch scope — pass `PROFILE=baseline OUTPUT=terse` (`agents/analysis-profiles.md`) —
|
|
215
|
+
to map existing architecture, critical patterns, and high-risk code
|
|
215
216
|
paths for regression. Persist its output to `/tmp/arch-baseline-batch-<FIRST-CARD-ID>.md` and set
|
|
216
217
|
`${ARCH_BASELINE_PATHS}` to that single path. Log `f.2-arch: re-spawned (missing baselines: <list>)`. Do NOT spawn
|
|
217
218
|
the architect more than once for the batch — it is the single grounding context for all
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- If `DONE` (or the user chose "proceed anyway") → continue.
|
|
11
11
|
2b. **Claim** — only now set the card status to `IN_PROGRESS` (in the backlog YAML / tracker) and assign yourself. This is a state write, not a visibility emission — do not also spend a TaskUpdate / Progress-Bar turn (§ "State surface — the tracker only").
|
|
12
12
|
2c. **Trivial-card classification (BLOCKING gate for steps 3–4)** — evaluate `IS_TRIVIAL(card)` per § "Trivial-card fast-lane". Note: condition 3 (non-source diff) cannot be fully evaluated until the coder has produced the diff, so at this point compute the **provisional** trivial flag from conditions 1+2 only (`review_profile == skip` AND no Step-A trigger sourced from the card YAML text + `files_likely_touched` extensions — if EVERY path in `files_likely_touched` is non-source, condition 3 is provisionally satisfied). If provisionally trivial → **SKIP steps 3, 3a, and 4** (architecture grounding); log `trivial: architecture grounding skipped (review_profile=skip + non-source files_likely_touched + 0 triggers)` and jump to Phase 2. Re-confirm `IS_TRIVIAL` on the ACTUAL committed diff at the review gates (Phase 2.55/3.5/3.7); if the coder unexpectedly touched a source file, the guard flips the card back onto the normal review path there. If NOT provisionally trivial → run steps 3, 3a, 4 as normal.
|
|
13
|
-
3. **(skip when provisionally trivial — see 2c)** Invoke the **codebase-architect** agent (MUST per AGENTS.md) to understand the relevant codebase area, existing patterns, and architecture before any implementation. When `features.has_lsp_layer: true`, the architect uses LSP find-references for identifier-shaped lookups — this needs NO handoff from the orchestrator: the architect reads `features.has_lsp_layer` from `baldart.config.yml` directly (the flag is ambient) per `agents/code-search-protocol.md`. Likewise, when `features.has_code_graph: true`, the architect uses the Graphify code graph for structural/relational lookups (ambient flag) per `agents/code-graph-protocol.md`. The orchestrator does NOT propagate either flag. (Earlier doc versions numbered this step 4; the step that read project-status BEFORE the architect was removed because it persisted pre-analysis context — see step 3a.) **Pass `OUTPUT=terse` in the architect prompt (since v4.49.0)** — this is grounding for the coder/reviewer, not an explanation, so the architect returns its structured contract (reuse table + canonical evidence + `path:line — symbol` rows + `totals:`) without narrative prose. The verbatim baseline persisted at step 5b keeps all the substance a lean `/codexreview` needs (paths, signatures, patterns, high-risk paths) while staying small in the orchestrator's context and on disk. **Baseline content contract (MANDATORY — since v4.56.0):** the architect prompt is grounding INPUT only — pass the card scope, `files_likely_touched`, and the question to map. NEVER put line-level fix directives ("remove lines 90-91", "Fix: use X"), the words "implement/fix/apply", or acceptance-criteria framed as a task into the architect prompt. The architect produces a read-only MAP (file/symbol locations, patterns, type signatures, integration points, high-risk paths); it does NOT implement and has no `Task`/Agent tool to delegate (see `codebase-architect.md` § Role boundary). The coder is a separate spawn the orchestrator owns.
|
|
13
|
+
3. **(skip when provisionally trivial — see 2c)** Invoke the **codebase-architect** agent (MUST per AGENTS.md) to understand the relevant codebase area, existing patterns, and architecture before any implementation. When `features.has_lsp_layer: true`, the architect uses LSP find-references for identifier-shaped lookups — this needs NO handoff from the orchestrator: the architect reads `features.has_lsp_layer` from `baldart.config.yml` directly (the flag is ambient) per `agents/code-search-protocol.md`. Likewise, when `features.has_code_graph: true`, the architect uses the Graphify code graph for structural/relational lookups (ambient flag) per `agents/code-graph-protocol.md`. The orchestrator does NOT propagate either flag. (Earlier doc versions numbered this step 4; the step that read project-status BEFORE the architect was removed because it persisted pre-analysis context — see step 3a.) **Pass `OUTPUT=terse` in the architect prompt (since v4.49.0)** — this is grounding for the coder/reviewer, not an explanation, so the architect returns its structured contract (reuse table + canonical evidence + `path:line — symbol` rows + `totals:`) without narrative prose. **Pass the analysis profile too (since v4.94.0)**: `PROFILE=ui` when the card has a non-empty `links.design` OR `links.design_src` (the same mockup bit that drives step 6a), else `PROFILE=feature` — contract and per-profile scoping in `agents/analysis-profiles.md` (its § 3 caller routing table is normative). The profile is deterministic from the card YAML; never leave the architect to infer it. The verbatim baseline persisted at step 5b keeps all the substance a lean `/codexreview` needs (paths, signatures, patterns, high-risk paths) while staying small in the orchestrator's context and on disk. **Baseline content contract (MANDATORY — since v4.56.0):** the architect prompt is grounding INPUT only — pass the card scope, `files_likely_touched`, and the question to map. NEVER put line-level fix directives ("remove lines 90-91", "Fix: use X"), the words "implement/fix/apply", or acceptance-criteria framed as a task into the architect prompt. The architect produces a read-only MAP (file/symbol locations, patterns, type signatures, integration points, high-risk paths); it does NOT implement and has no `Task`/Agent tool to delegate (see `codebase-architect.md` § Role boundary). The coder is a separate spawn the orchestrator owns.
|
|
14
14
|
3a. Update `${paths.references_dir}/project-status.md` Active Code Context (skip when the file does not exist in the project) — do this AFTER the codebase-architect run (step 3) so the "Active Code Context" reflects the architect's findings (which files are actually in scope), not just the card YAML's `files_likely_touched`. Writing it before the architect run would persist pre-analysis claims that downstream agents (e.g. a parallel card) would then read as truth.
|
|
15
15
|
4. **Plan-auditor grounding check** — but first, a **provenance skip (since v4.7.0 — mirror of Step 3d)**: the `/prd` Step 6.6 holistic audit already ran a per-card grounding pass when the card was authored. Re-grounding here is only worth a plan-auditor spawn if something changed since. **This skip is the NORMAL path for a card implemented right after `/prd`, not an occasional optimization** — `/prd` now guarantees the `metadata.holistic_audit` stamp lands on every audited card (deterministic backstop at `validation-phase.md` Step 7 item 5b, since the v4.88.2 provenance-reliability fix), so P1 below holds whenever the batch is freshly authored. Skip the plan-auditor when **BOTH** hold:
|
|
16
16
|
- **P1 — provenance present**: the card has `metadata.holistic_audit` with non-empty `audited_at`, `audited_commit`, `audited_set`.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.3.0 — 2026-07-02
|
|
6
|
+
|
|
7
|
+
- **Analysis-profile contract (framework v4.94.0)**: the B7 per-card architect spawn in `new2.js` passes `PROFILE=${hasMockup ? 'ui' : 'feature'}` (deterministic from the pre-flight cardGraph bit) mirroring `/new` implement.md step 3; the SSOT is `framework/agents/analysis-profiles.md`. Tripwire rule added to `check-new-parity.mjs`.
|
|
8
|
+
|
|
5
9
|
## 1.2.1 — 2026-07-02
|
|
6
10
|
|
|
7
11
|
Review avversariale post-release (3 lenti indipendenti, finding verificati):
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.3.0 — 2026-07-02
|
|
6
|
+
|
|
7
|
+
- **Analysis-profile contract (framework v4.94.0)**: the discovery-loop targeted architect question now passes `PROFILE=discovery`, and the Step 2 ISA scan passes `PROFILE=impact` (structural tier primary) — per `framework/agents/analysis-profiles.md`. Prompt semantics otherwise unchanged.
|
|
8
|
+
|
|
5
9
|
## 1.2.0 — 2026-07-02
|
|
6
10
|
|
|
7
11
|
**Gate-hygiene wave** — dai driver misurati sul forensics di una sessione /prd reale (61.6M token; 48% del costo in fasi meccaniche a piena finestra; una famiglia di card spedita con zero audit-trail; ~20 righe di progress bar × 30+ messaggi):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prd
|
|
3
3
|
effort: high
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
description: "Structured PRD creation skill. Use when the user says /prd, 'crea un prd', 'nuova funzionalita', 'pianifica feature', or wants to plan a new feature end-to-end. Also handles /prd-add, 'aggiungi requisito', 'serve anche', 'manca un endpoint' for change requests on active PRD sessions — runs ICIAS impact analysis to determine which phases need SKIP/PATCH/REDO. Produces PRD + UI design + backlog cards, all validated and committed. Multi-turn conversation: asks questions, waits for answers, iterates through discovery, design, spec writing, card creation, and validation phases."
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -698,7 +698,9 @@ section of the state file. Mark dimension as covered.
|
|
|
698
698
|
If more specific detail is needed beyond what context-primer provided,
|
|
699
699
|
invoke `codebase-architect` agent (foreground) with a targeted question:
|
|
700
700
|
```
|
|
701
|
-
OUTPUT=terse — machine consumer (discovery dimension resolution),
|
|
701
|
+
PROFILE=discovery OUTPUT=terse — machine consumer (discovery dimension resolution),
|
|
702
|
+
not human Q&A. Resolve your analysis profile per `agents/analysis-profiles.md`
|
|
703
|
+
(Grep "### PROFILE: discovery", read only that section).
|
|
702
704
|
For feature `<slug>`: regarding the dimension `<dimension>`, does the codebase
|
|
703
705
|
already answer this? Specifically check: existing collections, routes, components,
|
|
704
706
|
permissions, and patterns. Report what you find with file references — structured
|
|
@@ -780,8 +782,10 @@ Instead, run the ISA scan and present findings for validation.
|
|
|
780
782
|
1. Invoke `codebase-architect` agent with this specific prompt:
|
|
781
783
|
|
|
782
784
|
```
|
|
783
|
-
OUTPUT=terse — machine consumer (ISA table builder), not human Q&A:
|
|
784
|
-
rows only, no narrative overview.
|
|
785
|
+
PROFILE=impact OUTPUT=terse — machine consumer (ISA table builder), not human Q&A:
|
|
786
|
+
per-touchpoint rows only, no narrative overview. Resolve your analysis profile per
|
|
787
|
+
`agents/analysis-profiles.md` (Grep "### PROFILE: impact", read only that section —
|
|
788
|
+
the structural tier is your primary source when its flag is on).
|
|
785
789
|
For feature `<slug>`: perform an Integration Surface Analysis (ISA).
|
|
786
790
|
Find ALL existing code that should reference, link to, or interact with this
|
|
787
791
|
new feature. Scan these categories systematically:
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.1.0 — 2026-07-02
|
|
6
|
+
|
|
7
|
+
- **Analysis-profile contract (framework v4.94.0)**: PATCH-mode re-discovery passes `PROFILE=impact` to `codebase-architect` (blast-radius scoping per `framework/agents/analysis-profiles.md`).
|
|
8
|
+
|
|
5
9
|
## 1.0.0 — 2026-07-01
|
|
6
10
|
|
|
7
11
|
- Baseline: versioning per-skill introdotto al framework v4.82.0.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prd-add
|
|
3
3
|
effort: medium
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
description: "Change Request skill for active PRD sessions. Use when the user says /prd-add, 'aggiungi requisito', 'serve anche', 'manca un endpoint', or describes a new requirement that impacts an existing PRD. Also auto-triggered by /prd during discovery when the user's answer reveals a new sub-feature not covered by the original scope. Runs ICIAS impact analysis (semantic scan + structural propagation + scoring) to determine which PRD phases need SKIP/PATCH/REDO, then executes only affected phases."
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -241,7 +241,8 @@ Execute ONLY phases with PATCH or REDO verdict, in original phase order.
|
|
|
241
241
|
|
|
242
242
|
### For Discovery dimensions (PATCH/REDO)
|
|
243
243
|
|
|
244
|
-
- **PATCH**: Run `codebase-architect` on affected dimensions only
|
|
244
|
+
- **PATCH**: Run `codebase-architect` on affected dimensions only — pass
|
|
245
|
+
`PROFILE=impact` (blast-radius scoping per `agents/analysis-profiles.md`).
|
|
245
246
|
Update state file checklist entries. No user questions unless ambiguous.
|
|
246
247
|
- **REDO**: Full re-discovery for that dimension (same as /prd Step 2 loop
|
|
247
248
|
but scoped to affected dimensions only). May require user questions.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.1.0 — 2026-07-02
|
|
6
|
+
|
|
7
|
+
- **Analysis-profile contract (framework v4.94.0)**: Step B adjacent-UI analysis passes `PROFILE=ui OUTPUT=terse` to `codebase-architect` (registry-cascade-first per `framework/agents/analysis-profiles.md`).
|
|
8
|
+
|
|
5
9
|
## 1.0.0 — 2026-07-01
|
|
6
10
|
|
|
7
11
|
- Baseline: versioning per-skill introdotto al framework v4.82.0.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ui-design
|
|
3
3
|
effort: medium
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
description: "UI design workflow. Generates context-aware mockups with GAN-inspired generator/evaluator separation, visual verification via Playwright, and structured sprint contracts. Use when: (1) designing new pages or components, (2) the /prd skill reaches its UI design phase (Step 3), (3) redesigning existing pages, (4) creating design options for user review, (5) any task involving 'design UI', 'mockup', 'opzioni di design', 'progetta interfaccia', '3 opzioni', 'design page', 'UI design'. Not for: bug fixes, small tweaks, copy-only changes, or implementing an already-chosen design."
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -120,7 +120,7 @@ Read [references/generation.md](references/generation.md) § Context Capture.
|
|
|
120
120
|
render harness over full-page Playwright — `baldart render build && /ds-render`
|
|
121
121
|
gives per-primitive PNGs of the REAL registry components (Storybook-backed). Use
|
|
122
122
|
full-page Playwright for page-level context. No Storybook → fall back to Playwright.
|
|
123
|
-
3. Invoke `codebase-architect` to analyze adjacent UI components, layout patterns, and design tokens. Report file paths and
|
|
123
|
+
3. Invoke `codebase-architect` with `PROFILE=ui OUTPUT=terse` (profile contract: `agents/analysis-profiles.md` — registry-cascade-first, component reuse table, token findings) to analyze adjacent UI components, layout patterns, and design tokens. Report file paths and structure.
|
|
124
124
|
|
|
125
125
|
### Step C — Generate 3 Options (GENERATOR)
|
|
126
126
|
|
|
@@ -274,7 +274,7 @@ if (baselinePaths.length) {
|
|
|
274
274
|
log(`Baseline: reusing ${baselinePaths.length} per-card baseline file(s).`)
|
|
275
275
|
} else {
|
|
276
276
|
const arch = await agent(
|
|
277
|
-
`You are grounding a post-implementation code review. Map the EXISTING architecture, critical patterns, and high-risk code paths relevant to this wave's changed files, so downstream reviewers can spot regressions.\n\n${waveBrief}\n\nReturn a concise baseline (key modules, their contracts, the regression-prone seams touched by this diff). Do not review the changes yet.`,
|
|
277
|
+
`PROFILE=baseline — resolve your analysis profile per agents/analysis-profiles.md (Grep "### PROFILE: baseline", Read only that section; v4.94.0). You are grounding a post-implementation code review. Map the EXISTING architecture, critical patterns, and high-risk code paths relevant to this wave's changed files, so downstream reviewers can spot regressions.\n\n${waveBrief}\n\nReturn a concise baseline (key modules, their contracts, the regression-prone seams touched by this diff). Do not review the changes yet.`,
|
|
278
278
|
{ label: 'arch-baseline', phase: 'Baseline', agentType: 'codebase-architect',
|
|
279
279
|
schema: { type: 'object', required: ['baseline'], additionalProperties: false, properties: { baseline: { type: 'string' } } } }
|
|
280
280
|
)
|
|
@@ -265,7 +265,7 @@ if (baselinePaths.length) {
|
|
|
265
265
|
log(`Baseline: reusing ${baselinePaths.length} per-card baseline file(s).`)
|
|
266
266
|
} else {
|
|
267
267
|
const arch = await agent(
|
|
268
|
-
`You are grounding a post-implementation code review. Map the EXISTING architecture, critical patterns, and high-risk code paths relevant to this batch's changed files, so downstream reviewers can spot regressions.\n\n${scopeBrief}\n\nReturn a concise baseline (the key modules, their contracts, and the regression-prone seams touched by this diff). Do not review the changes yet.`,
|
|
268
|
+
`PROFILE=baseline — resolve your analysis profile per agents/analysis-profiles.md (Grep "### PROFILE: baseline", Read only that section; v4.94.0). You are grounding a post-implementation code review. Map the EXISTING architecture, critical patterns, and high-risk code paths relevant to this batch's changed files, so downstream reviewers can spot regressions.\n\n${scopeBrief}\n\nReturn a concise baseline (the key modules, their contracts, and the regression-prone seams touched by this diff). Do not review the changes yet.`,
|
|
269
269
|
{ label: 'arch-baseline', phase: 'Baseline', agentType: 'codebase-architect',
|
|
270
270
|
schema: { type: 'object', required: ['baseline'], additionalProperties: false, properties: { baseline: { type: 'string' } } } }
|
|
271
271
|
)
|
|
@@ -552,8 +552,12 @@ async function runCard(cardId, cardPath) {
|
|
|
552
552
|
let arch = null
|
|
553
553
|
try {
|
|
554
554
|
arch = await agentSafe(
|
|
555
|
-
`You are the Phase-1 context retriever for card ${cardId} (per ${REF}/implement.md Phase 1 step 3 / 5b). cd into the worktree ${sharedCtx.worktreePath}.\n\n
|
|
556
|
-
|
|
555
|
+
`You are the Phase-1 context retriever for card ${cardId} (per ${REF}/implement.md Phase 1 step 3 / 5b). cd into the worktree ${sharedCtx.worktreePath}.\n\n` +
|
|
556
|
+
// Analysis profile (v4.94.0 — implement.md step 3 parallel): deterministic from the
|
|
557
|
+
// pre-flight hasMockup bit, mirroring the mockup-first build routing (§6a). SSOT:
|
|
558
|
+
// agents/analysis-profiles.md § 3 caller routing table.
|
|
559
|
+
`PROFILE=${node.hasMockup ? 'ui' : 'feature'} OUTPUT=terse — resolve your analysis profile per agents/analysis-profiles.md (Grep "### PROFILE: ${node.hasMockup ? 'ui' : 'feature'}", Read only that section + its cited shared blocks).\n\n${cardBrief}\n\n` +
|
|
560
|
+
`Explore the codebase exactly as your system prompt + profile mandate for this card's scope (requirements + files_likely_touched: ${JSON.stringify(node.filesLikelyTouched || [])}). Write your COMPLETE untruncated findings (file paths, type signatures, patterns, high-risk paths) to ${baselinePath} — refresh it if a stale copy exists. The owner agent and the per-card reviewers will Read that file; keep your structured return MINIMAL.\n\n` +
|
|
557
561
|
`Also report missingPaths: every path in files_likely_touched that does NOT exist in the worktree (factual ls/test check — no judgement). Return: { ok, missingPaths:[...], note }`,
|
|
558
562
|
{ label: `architect:${cardId}`, phase: 'Implement', agentType: 'codebase-architect',
|
|
559
563
|
schema: { type: 'object', required: ['ok'], additionalProperties: true, properties: { ok: { type: 'boolean' }, missingPaths: { type: 'array', items: { type: 'string' } }, note: { type: 'string' } } } }
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Analysis Profiles — the codebase-architect investigation contract
|
|
2
|
+
|
|
3
|
+
**Purpose**: `codebase-architect` is the single read-only analyst every surface delegates
|
|
4
|
+
to, but "understand the codebase" is not one job — grounding an implementer, tracing a
|
|
5
|
+
bug, measuring blast radius, loading planning context, and inventorying UI primitives
|
|
6
|
+
need different retrieval plans and different output blocks. This module is the **single
|
|
7
|
+
SSOT of those plans**. The agent body carries the shared engine (canonical-router-first,
|
|
8
|
+
tiered code search, read-size discipline, memory); each profile here scopes WHICH parts
|
|
9
|
+
of that engine run, what to read/skip, and which output blocks the caller receives.
|
|
10
|
+
|
|
11
|
+
This is the retrieval-side twin of `effort-protocol.md` (how deeply to reason) and
|
|
12
|
+
`return-contract-protocol.md` (how compactly to report). Same mechanism as `OUTPUT=terse`
|
|
13
|
+
(v4.49.0): a prompt-level token, zero new config keys, zero runtime dependency.
|
|
14
|
+
|
|
15
|
+
**Consumers**: `codebase-architect` (dispatcher — reads its matching profile section at
|
|
16
|
+
spawn), every caller that spawns it (`/new` implement.md, `new2.js` B7, the review
|
|
17
|
+
workflows, `/prd`, `/prd-add`, `/bug`, `/ui-design`, `/ds-handoff`, `/codexreview`,
|
|
18
|
+
`plan-auditor`, `/e2e-review`), and `context-primer` (maps its task types onto profiles
|
|
19
|
+
instead of restating search strategy).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. Contract
|
|
24
|
+
|
|
25
|
+
- **Token**: the invoking prompt contains `PROFILE=<feature|bug|impact|discovery|ui|baseline>`
|
|
26
|
+
(one token, anywhere in the prompt — same parsing style as `OUTPUT=terse` and
|
|
27
|
+
`effort=<level>`). Composable with `OUTPUT=terse` and an explicit token budget.
|
|
28
|
+
- **Dispatch (agent side)**: parse the token FIRST. Then Grep this file for the heading
|
|
29
|
+
`### PROFILE: <name>` and Read ONLY that section (plus any `§ Shared block` it cites) —
|
|
30
|
+
never read this module end-to-end.
|
|
31
|
+
- **No token → deterministic inference**, in this exact priority order (first match wins):
|
|
32
|
+
1. prompt names a mockup / `links.design` / `component_bindings` / design-system
|
|
33
|
+
registry / tokens → `ui`
|
|
34
|
+
2. prompt asks blast-radius / affected surface / "what depends on" / refactor scope →
|
|
35
|
+
`impact`
|
|
36
|
+
3. prompt reports an error / crash / regression / "non funziona" → `bug`
|
|
37
|
+
4. prompt grounds a post-implementation review over a diff/batch → `baseline`
|
|
38
|
+
5. prompt loads context for planning / PRD / a question about docs or product intent →
|
|
39
|
+
`discovery`
|
|
40
|
+
6. otherwise → `full` (legacy monolith behavior: run every protocol, all output blocks).
|
|
41
|
+
- **Caller side**: prefer the explicit token — inference is the fallback, not the design.
|
|
42
|
+
The routing table in § 3 is normative for framework callers.
|
|
43
|
+
- **Invariants that hold for EVERY profile** (they live in the agent body, not here):
|
|
44
|
+
read-only role boundary; Return Contract (COMPACT); canonical-router-first engine;
|
|
45
|
+
anti-flail gate; read-size discipline; `## Canonical Evidence` block in every analysis;
|
|
46
|
+
Hot-File Map on terse output for in-scope files > 800 lines; memory hygiene.
|
|
47
|
+
- **Precedence**: an explicit instruction in the invoking prompt (e.g. a caller-supplied
|
|
48
|
+
token budget or an extra output field) overrides the profile default. A profile never
|
|
49
|
+
overrides the role boundary or the Return Contract.
|
|
50
|
+
|
|
51
|
+
## 2. Profiles
|
|
52
|
+
|
|
53
|
+
### PROFILE: feature
|
|
54
|
+
|
|
55
|
+
- **Question**: what exists in this area, which patterns must a change follow, what can
|
|
56
|
+
be reused, where are the risks?
|
|
57
|
+
- **Callers**: `/new` implement.md Phase 1 step 3 + `new2.js` B7 (cards WITHOUT a
|
|
58
|
+
mockup), ad-hoc pre-implementation grounding, `hybrid-ml-architect` /
|
|
59
|
+
`security-reviewer` / `legal-counsel-gdpr` Phase-0 grounding.
|
|
60
|
+
- **Retrieval**: full engine — canonical router → git log (if thin) → structural tier
|
|
61
|
+
(graph/LSP per `code-search-protocol.md` / `code-graph-protocol.md`) → targeted reads.
|
|
62
|
+
- **Run**: § Shared block: Reuse Analysis · § Shared block: Documentation Reliability
|
|
63
|
+
Scan (when docs are evidence).
|
|
64
|
+
- **Skip**: nothing engine-side; skip the UI cascade unless the scope touches components
|
|
65
|
+
(then the caller should have routed `ui`).
|
|
66
|
+
- **Output blocks**: `## Reuse Analysis` + `## Canonical Evidence` + affected-code rows
|
|
67
|
+
(`path:line — symbol — pattern/role`) + high-risk rows + `## Hot-File Map` + `totals:`.
|
|
68
|
+
- **Budget**: ≤ 20K tokens.
|
|
69
|
+
|
|
70
|
+
### PROFILE: bug
|
|
71
|
+
|
|
72
|
+
- **Question**: what is the code path from entry point to failure, and what changed
|
|
73
|
+
recently on it?
|
|
74
|
+
- **Callers**: `/bug` Phase 0; context-primer `task_type: bug-fix`.
|
|
75
|
+
- **Retrieval**: entry-point location (structural tier first for the failing
|
|
76
|
+
symbol/handler) → trace the path → `git log --oneline -15 -- <suspect paths>` for
|
|
77
|
+
recent-change candidates → targeted range reads of suspects only.
|
|
78
|
+
- **Run**: nothing extra — speed is the point.
|
|
79
|
+
- **Skip**: § Reuse Analysis (no component discovery in a bug hunt) · architecture docs
|
|
80
|
+
and ADRs unless the failure is a contract violation · broad domain reads.
|
|
81
|
+
- **Output blocks**: `## Canonical Evidence` + a **code-path map** (ordered
|
|
82
|
+
`path:line — step` rows from entry to failure) + a **recent-change list**
|
|
83
|
+
(`sha — path — why suspect`) + `## Hot-File Map` for any suspect file > 800 lines +
|
|
84
|
+
`totals:`.
|
|
85
|
+
- **Budget**: ≤ 15K tokens.
|
|
86
|
+
|
|
87
|
+
### PROFILE: impact
|
|
88
|
+
|
|
89
|
+
- **Question**: if X changes, what breaks — which files, contracts, and consumers are in
|
|
90
|
+
the blast radius?
|
|
91
|
+
- **Callers**: `plan-auditor` FULL-mode grounding; `/prd` Step 2 ISA (Impact Surface
|
|
92
|
+
Analysis); `/prd-add` PATCH mode (affected dimensions only); `/e2e-review` route/
|
|
93
|
+
primitive reverse lookup; refactor scoping; context-primer `task_type: refactor`.
|
|
94
|
+
- **Retrieval**: **structural tier is PRIMARY** — `graphify affected`/`path` when
|
|
95
|
+
`features.has_code_graph: true`, LSP `find-references` when `has_lsp_layer: true`,
|
|
96
|
+
else exports/imports reads per the engine's anti-flail rule. Router only to resolve
|
|
97
|
+
the owning contract docs of the affected surface.
|
|
98
|
+
- **Run**: § Shared block: Documentation Reliability Scan only for the contract docs you
|
|
99
|
+
cite.
|
|
100
|
+
- **Skip**: § Reuse Analysis · full-file reads of dependents (list them, read only the
|
|
101
|
+
coupling site) · design rationale.
|
|
102
|
+
- **Output blocks**: `## Canonical Evidence` + an **affected-surface table**
|
|
103
|
+
(`path:line — dependent symbol — direction (uses/used-by) — contract at risk`) +
|
|
104
|
+
transitive one-hop notes + `totals:`.
|
|
105
|
+
- **Budget**: ≤ 15K tokens.
|
|
106
|
+
|
|
107
|
+
### PROFILE: discovery
|
|
108
|
+
|
|
109
|
+
- **Question**: what context does a planner (or a human asking a question) need —
|
|
110
|
+
constraints, canonical sources, current state — before any decision?
|
|
111
|
+
- **Callers**: `context-primer` (`task_type: new-feature | query | doc-update`); `/prd`
|
|
112
|
+
discovery-loop targeted questions.
|
|
113
|
+
- **Retrieval**: docs-first — canonical router → matched reference/ADR sections →
|
|
114
|
+
backlog cards → wiki overlay (when `features.has_wiki_overlay: true`, verify wiki
|
|
115
|
+
claims against canonicals) → agent memory. **Source code only to verify a
|
|
116
|
+
runtime-sensitive claim** (auth pattern, API contract, current schema).
|
|
117
|
+
- **Task-type deltas** (passed through by context-primer): `query`/`doc-update` → docs +
|
|
118
|
+
memory only, skip source entirely; `new-feature` → also map the domain's existing
|
|
119
|
+
patterns (2-3 exemplar `path:line` anchors) and relevant ADRs.
|
|
120
|
+
- **Run**: § Shared block: Documentation Reliability Scan (docs ARE the evidence here —
|
|
121
|
+
mandatory).
|
|
122
|
+
- **Skip**: § Reuse Analysis · code-wide scans · reading any `${paths.prd_dir}` /
|
|
123
|
+
`${paths.references_dir}` file end-to-end (route via the registry, read sections).
|
|
124
|
+
- **Output blocks**: `## Canonical Evidence` + § Reliability Scan block + constraints-
|
|
125
|
+
first summary (the caller may impose its own envelope, e.g. context-primer's XML —
|
|
126
|
+
honor it verbatim).
|
|
127
|
+
- **Budget**: ≤ 15K tokens.
|
|
128
|
+
|
|
129
|
+
### PROFILE: ui
|
|
130
|
+
|
|
131
|
+
- **Question**: which registry primitives/tokens/patterns serve this UI scope, what is
|
|
132
|
+
reused vs variant vs genuinely new, and what does the current implementation state
|
|
133
|
+
look like — **answered from the registry and code, never from pixels**.
|
|
134
|
+
- **Callers**: `/new` implement.md + `new2.js` B7 (cards WITH a mockup —
|
|
135
|
+
`links.design`/`links.design_src` non-empty); `/ui-design` Step 3 adjacent-UI
|
|
136
|
+
analysis; `/ds-handoff` entity/field probe; context-primer UI-keyword branch.
|
|
137
|
+
- **Retrieval**: § Shared block: UI Resolution Path is the PRIMARY route — INDEX.md
|
|
138
|
+
(thin router) → frontmatter **HEAD** of matched `components/<Name>.md` → DTCG tokens →
|
|
139
|
+
patterns. **Never read component source to learn an API its HEAD already carries**;
|
|
140
|
+
read source only for undocumented primitives or to verify a runtime-sensitive claim.
|
|
141
|
+
When `features.has_design_system: false`, degrade to
|
|
142
|
+
`${paths.references_dir}/component-registry.md` + targeted source reads.
|
|
143
|
+
- **Run**: § Shared block: Reuse Analysis (component-flavored — candidates come from the
|
|
144
|
+
registry cascade, classification uses the card's `component_bindings` vocabulary
|
|
145
|
+
`reuse / reuse-variant / new` when present).
|
|
146
|
+
- **Skip**: backend/data-model deep dives (one-line integration notes only) · § UI
|
|
147
|
+
boundary below.
|
|
148
|
+
- **Output blocks**: `## Reuse Analysis` (component table) + `## Canonical Evidence` +
|
|
149
|
+
binding/coverage notes (`region — bound component — status`) + token findings
|
|
150
|
+
(hardcoded-value risks as `path:line — value — owning token`) + `## Hot-File Map` +
|
|
151
|
+
`totals:`.
|
|
152
|
+
- **Budget**: ≤ 15K tokens.
|
|
153
|
+
- **UI boundary (binding)**: this profile is **code/registry-side only**. Rendered
|
|
154
|
+
evidence — mockup images, screenshots, live routes — belongs to the multimodal
|
|
155
|
+
specialists: analysis of mockup pixels → a read-only `ui-expert` spawn (the
|
|
156
|
+
`/prd` Step 1.6.5 precedent), fidelity verdicts → the verifier trio via `/e2e-review`.
|
|
157
|
+
If the invoking prompt asks you to judge pixels, flag it as over-scoped and return the
|
|
158
|
+
code/registry map (same rule as the Role boundary for implementation asks).
|
|
159
|
+
|
|
160
|
+
### PROFILE: baseline
|
|
161
|
+
|
|
162
|
+
- **Question**: what is the EXISTING architecture around this diff/batch, so reviewers
|
|
163
|
+
can spot regressions?
|
|
164
|
+
- **Callers**: `new-final-review.js` / `new-card-review.js` Phase Baseline (fallback
|
|
165
|
+
when no per-card baselines exist); `/codexreview` Step 1; `/new` final-review F.2
|
|
166
|
+
inline fallback.
|
|
167
|
+
- **Retrieval**: diff-scoped — start from the changed-files list, resolve each file's
|
|
168
|
+
module/contract via router + structural tier; NO topic-wide exploration beyond the
|
|
169
|
+
seams the diff touches.
|
|
170
|
+
- **Run**: nothing extra.
|
|
171
|
+
- **Skip**: § Reuse Analysis · § Reliability Scan (cite doc freshness only if a doc
|
|
172
|
+
contradicts the code) · product-intent docs.
|
|
173
|
+
- **Output blocks**: `## Canonical Evidence` + key-module map (`path — contract — why it
|
|
174
|
+
matters to this diff`) + regression-prone seams (`path:line — risk`) +
|
|
175
|
+
`## Hot-File Map` + `totals:`. Persist to the caller-named file when one is given
|
|
176
|
+
(e.g. `/tmp/arch-baseline-<CARD-ID>.md`) — persist-then-summarize per the Return
|
|
177
|
+
Contract.
|
|
178
|
+
- **Budget**: ≤ 20K tokens (batch scope); ≤ 15K per single card.
|
|
179
|
+
|
|
180
|
+
### PROFILE: full (fallback — no token, no inference match)
|
|
181
|
+
|
|
182
|
+
Legacy monolith behavior: run the whole engine, § Reuse Analysis when the task builds or
|
|
183
|
+
changes code, § Reliability Scan when docs are evidence, UI Resolution Path when the
|
|
184
|
+
query concerns UI. All output blocks that apply. Budget ≤ 20K. Callers in the framework
|
|
185
|
+
payload should never rely on `full` — pass a token.
|
|
186
|
+
|
|
187
|
+
## 3. Caller routing table (normative for framework surfaces)
|
|
188
|
+
|
|
189
|
+
| Caller | Profile |
|
|
190
|
+
|---|---|
|
|
191
|
+
| `/new` implement.md Phase 1 step 3 · `new2.js` B7 | `ui` if card has non-empty `links.design` OR `links.design_src` (the `hasMockup` bit), else `feature` |
|
|
192
|
+
| `new-final-review.js` / `new-card-review.js` Phase Baseline · `/codexreview` Step 1 | `baseline` |
|
|
193
|
+
| `plan-auditor` FULL-mode grounding spawn | `impact` |
|
|
194
|
+
| `/prd` discovery-loop targeted question | `discovery` |
|
|
195
|
+
| `/prd` Step 2 ISA touchpoint mapping · `/prd-add` PATCH | `impact` |
|
|
196
|
+
| `/bug` Phase 0 | `bug` |
|
|
197
|
+
| `/ui-design` Step 3 · `/ds-handoff` probe | `ui` |
|
|
198
|
+
| `/e2e-review` route/primitive reverse lookup | `impact` |
|
|
199
|
+
| `context-primer` | by task type: `bug-fix→bug` · `refactor→impact` · `new-feature/query/doc-update→discovery` · UI keywords + `has_design_system:true` → `ui` |
|
|
200
|
+
|
|
201
|
+
## 4. Shared blocks
|
|
202
|
+
|
|
203
|
+
### § Shared block: Reuse Analysis
|
|
204
|
+
|
|
205
|
+
Run **only when a profile lists it** (feature, ui, full-when-building).
|
|
206
|
+
|
|
207
|
+
1. **Identify what the task needs**: UI components, hooks, utilities, API patterns, data
|
|
208
|
+
flows.
|
|
209
|
+
2. **Search for existing matches**:
|
|
210
|
+
- `features.has_design_system: true` → the fastest reuse signal is the **spec HEADs**:
|
|
211
|
+
`${paths.design_system}/INDEX.md` (thin router), then the frontmatter HEAD of
|
|
212
|
+
candidate `components/<Name>.md` (schema: `component-manifest-schema.md`). Prefer
|
|
213
|
+
this over Grep.
|
|
214
|
+
- Else `${paths.references_dir}/component-registry.md` (relevant table section only).
|
|
215
|
+
- Grep only for 2-3 specific component names, never broad semantic sweeps.
|
|
216
|
+
3. **Classify each candidate**: **Direct reuse** (works as-is) · **Refactor & reuse**
|
|
217
|
+
(≥70% fit — generalize via props/config) · **Extract & share** (logic duplicated in
|
|
218
|
+
2+ places) · **No match** (build new — document why).
|
|
219
|
+
4. **Agent memory**: read `.claude/agent-memory/codebase-architect/shared-components.md`
|
|
220
|
+
only when the task involves UI components; update it with new discoveries.
|
|
221
|
+
|
|
222
|
+
Output format (emit in every analysis whose profile runs this block; if nothing is
|
|
223
|
+
reusable, emit the section with "No reusable components found — all new code required"
|
|
224
|
+
and why):
|
|
225
|
+
|
|
226
|
+
```markdown
|
|
227
|
+
## Reuse Analysis
|
|
228
|
+
|
|
229
|
+
### Reusable Components Found
|
|
230
|
+
| Need | Existing Component | Path | Classification | Action |
|
|
231
|
+
|------|-------------------|------|----------------|--------|
|
|
232
|
+
|
|
233
|
+
### No Match (Must Build New)
|
|
234
|
+
- [component/pattern]: [why nothing existing fits]
|
|
235
|
+
|
|
236
|
+
### Refactoring Opportunities
|
|
237
|
+
- [duplication worth consolidating, even if adjacent to this task]
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### § Shared block: UI Resolution Path
|
|
241
|
+
|
|
242
|
+
The design-system resolution cascade (paths are project-specific; this order is the
|
|
243
|
+
convention — the protocol SSOT is `design-system-protocol.md`):
|
|
244
|
+
|
|
245
|
+
1. `${paths.design_system}/INDEX.md` — thin router (name → source → purpose → spec)
|
|
246
|
+
2. `${paths.design_system}/components/<Name>.md` — **frontmatter HEAD first**
|
|
247
|
+
(props/variants/composes/token_bindings/a11y — schema in
|
|
248
|
+
`component-manifest-schema.md`); prose body only for rationale. Never read source to
|
|
249
|
+
learn an API the HEAD carries.
|
|
250
|
+
3. `${paths.design_tokens}` (DTCG `.tokens.json`) — token SSOT; `tokens-reference.md` is
|
|
251
|
+
a generated view
|
|
252
|
+
4. `${paths.design_system}/patterns/*` — theming, overlays, animations, platform quirks
|
|
253
|
+
5. `${paths.references_dir}/ui-guidelines.md` — brand philosophy and aesthetic rules
|
|
254
|
+
6. `${paths.references_dir}/component-registry.md` — shared-component inventory
|
|
255
|
+
|
|
256
|
+
### § Shared block: Documentation Reliability Scan
|
|
257
|
+
|
|
258
|
+
Run when a profile lists it AND documentation is part of the evidence set:
|
|
259
|
+
|
|
260
|
+
1. **Registry coverage** — the feature exists in `${paths.references_dir}/ssot-registry.md`;
|
|
261
|
+
backlog/PRD-only → report `REGISTRY_GAP`
|
|
262
|
+
2. **Freshness markers** — `Last updated`/change-log markers vs `git log -1` on the doc
|
|
263
|
+
3. **Link quality** — markdown links vs raw paths; path-heavy PRDs lower retrieval quality
|
|
264
|
+
4. **Retrieval risk** — doc exceeds repo thresholds (reference >400 lines, API >800,
|
|
265
|
+
PRD/spec >800) → headings + targeted sections, never a full read
|
|
266
|
+
5. **Router fit** — registry maps the feature to a canonical doc → prefer that route
|
|
267
|
+
|
|
268
|
+
Emit in every analysis that materially depends on docs:
|
|
269
|
+
|
|
270
|
+
```markdown
|
|
271
|
+
## Documentation Reliability Scan
|
|
272
|
+
|
|
273
|
+
- Registry coverage: [ok | REGISTRY_GAP: ...]
|
|
274
|
+
- Freshness status: [fresh | stale | unknown] (git evidence)
|
|
275
|
+
- Link quality: [ok | PATH_HEAVY: ...]
|
|
276
|
+
- Retrieval risk: [ok | OVERSIZE_DOC: ...]
|
|
277
|
+
- Router fit: [ok | WEAK_ROUTER_MATCH: ...]
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
**Codex parity: portable.** The token is prompt-level; this module ships in the bulk-
|
|
283
|
+
symlinked `agents/` payload both runtimes read; the agent body (dispatcher) transpiles to
|
|
284
|
+
`.codex/agents/codebase-architect.toml` unchanged. No new config key — profiles gate on
|
|
285
|
+
flags that already exist (`has_design_system`, `has_code_graph`, `has_lsp_layer`,
|
|
286
|
+
`has_wiki_overlay`), so the schema-change propagation rule does not apply.
|
|
@@ -13,7 +13,7 @@ Route agents to the right module with minimal reading.
|
|
|
13
13
|
### Documentation Routing
|
|
14
14
|
|
|
15
15
|
- **MANDATORY pre-read for any skill/agent that touches project-specific paths, identity, stack, or feature toggles** -> read `agents/project-context.md`. Skills consult `baldart.config.yml` + `.baldart/overlays/<skill>.md` instead of hard-coded paths; missing keys MUST be asked, never assumed.
|
|
16
|
-
- If needing to understand codebase structure, existing patterns, or architecture before planning -> MUST invoke `codebase-architect` agent (via Task tool) first; do not proceed without architectural understanding.
|
|
16
|
+
- If needing to understand codebase structure, existing patterns, or architecture before planning -> MUST invoke `codebase-architect` agent (via Task tool) first, passing the matching `PROFILE=<feature|bug|impact|discovery|ui|baseline>` token per `agents/analysis-profiles.md` (§ 3 routing table); do not proceed without architectural understanding.
|
|
17
17
|
- If searching for a function/type/symbol (identifier-shaped query, not free text) and `features.has_lsp_layer: true` -> read `agents/code-search-protocol.md` and prefer LSP `find-references` / `go-to-definition` over Grep. Falls back to Grep when LSP is unavailable or the query is textual.
|
|
18
18
|
- If the question is STRUCTURAL / RELATIONAL (what connects X to Y, blast-radius/impact, clusters) and `features.has_code_graph: true` -> read `agents/code-graph-protocol.md` and prefer the Graphify code graph (`graphify query`/`path`/`explain`/`affected`) over LSP/Grep. Falls back silently to LSP -> Grep -> Git when the graph is unavailable.
|
|
19
19
|
- If touching API endpoints or request/response shape -> read `agents/api-contracts.md` and `${paths.references_dir}/api/index.md` (then specific API module for your domain).
|
|
@@ -71,6 +71,7 @@ When adding or updating agents, update REGISTRY.md — not this file.
|
|
|
71
71
|
- `agents/skills-mapping.md`
|
|
72
72
|
- `agents/llm-wiki-methodology.md` — LLM wiki overlay methodology (manual + scheduled maintenance; since v2.0.0)
|
|
73
73
|
- `agents/project-context.md` — Project context protocol: `baldart.config.yml` + overlays + missing-key handling (since v3.0.0)
|
|
74
|
+
- `agents/analysis-profiles.md` — Analysis-profile contract for `codebase-architect`: the `PROFILE=<feature|bug|impact|discovery|ui|baseline>` prompt token, per-profile retrieval plans + output blocks + budgets, caller routing table, shared blocks (Reuse Analysis · UI Resolution Path · Documentation Reliability Scan). The retrieval-side twin of `effort-protocol.md` + `return-contract-protocol.md` (since v4.94.0)
|
|
74
75
|
- `agents/code-search-protocol.md` — Retrieval hierarchy for code search: LSP → Grep → Git (since v3.10.0, gated on `features.has_lsp_layer`)
|
|
75
76
|
- `agents/code-graph-protocol.md` — Structural/relational retrieval via the Graphify code knowledge graph (since v4.21.0, gated on `features.has_code_graph`)
|
|
76
77
|
- `agents/toolchain-protocol.md` — Mechanical-gate command resolution (lint/format/typecheck/test/build/audit) from `toolchain.commands.*` with silent project-standard fallback (since v4.41.0, gated on `features.has_toolchain`)
|
|
@@ -101,6 +101,10 @@ which enforce the contract above.
|
|
|
101
101
|
- "/cont [keywords]"
|
|
102
102
|
- Auto-invoked by `/prd` at kickoff
|
|
103
103
|
|
|
104
|
+
**Note**: the skill is the interactive *channel* to `codebase-architect`, not a
|
|
105
|
+
competing methodology — it detects the task type and passes the matching
|
|
106
|
+
`PROFILE=<bug|impact|discovery|ui>` token per `agents/analysis-profiles.md` (§ 3).
|
|
107
|
+
|
|
104
108
|
### new
|
|
105
109
|
|
|
106
110
|
**When to use**:
|
|
@@ -4,6 +4,16 @@ Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://sem
|
|
|
4
4
|
Questo è il changelog INTERNO dello skeleton spedito (`primitive_version`), separato dal
|
|
5
5
|
file `AGENTS.md` generato nel consumer e indipendente dal `VERSION` del framework.
|
|
6
6
|
|
|
7
|
+
## 1.4.0 — 2026-07-02
|
|
8
|
+
|
|
9
|
+
- **Analysis-profile vocabulary on the understand-before-implement MUST**: the
|
|
10
|
+
`codebase-architect` invocation now names the six profiles
|
|
11
|
+
(`PROFILE=feature|bug|impact|discovery|ui|baseline`) and cites
|
|
12
|
+
`agents/analysis-profiles.md` as the contract SSOT — "understand the codebase" is
|
|
13
|
+
scoped to the job at hand (grounding / failure tracing / blast radius / planning
|
|
14
|
+
context / design-system inventory / review baseline) instead of one monolithic
|
|
15
|
+
exploration. Cross-tool: the token is prompt-level, identical on Claude and Codex.
|
|
16
|
+
|
|
7
17
|
## 1.3.0 — 2026-07-01
|
|
8
18
|
|
|
9
19
|
- **Plan-review gate promoted to the cross-tool SSOT**: MUST have any non-trivial plan
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- baldart-primitive: name=AGENTS primitive_version=1.
|
|
1
|
+
<!-- baldart-primitive: name=AGENTS primitive_version=1.4.0
|
|
2
2
|
This is the SHIPPED SKELETON. The writer (src/utils/root-primitives.js) strips
|
|
3
3
|
this banner, resolves every {{ slot }} / {{> partial }} / {{#flag}} from
|
|
4
4
|
baldart.config.yml (+ package.json/README), merges .baldart/overlays/AGENTS.md,
|
|
@@ -26,8 +26,13 @@ mechanics — this file remains the single source of truth for the protocol.
|
|
|
26
26
|
- MUST treat `AGENTS.md` as authoritative for agent rules.
|
|
27
27
|
- MUST understand the codebase before planning/implementing — invoke `codebase-architect`
|
|
28
28
|
(Claude Code: Task tool `subagent_type: codebase-architect`; Codex: the custom agent by
|
|
29
|
-
name at `.codex/agents/codebase-architect.toml`)
|
|
30
|
-
|
|
29
|
+
name at `.codex/agents/codebase-architect.toml`), passing the matching **analysis
|
|
30
|
+
profile**: `PROFILE=feature` (pre-implementation grounding) · `bug` (failure-path
|
|
31
|
+
tracing) · `impact` (blast radius / refactor scope) · `discovery` (planning / question
|
|
32
|
+
context) · `ui` (design-system / component scope) · `baseline` (review grounding over a
|
|
33
|
+
diff). Contract + per-profile scoping: `agents/analysis-profiles.md`. Only if NEITHER
|
|
34
|
+
invocation mechanism exists, degrade explicitly to inline retrieval
|
|
35
|
+
(code-graph → LSP → Grep) and SAY SO.
|
|
31
36
|
- MUST have any non-trivial plan reviewed BEFORE presenting it for approval — run
|
|
32
37
|
`plan-auditor` + `doc-reviewer` (in parallel), incorporate their feedback, and note in the
|
|
33
38
|
plan that the review gate was honored. Present the ALREADY-reviewed plan, never a raw one.
|
|
@@ -4,6 +4,12 @@ Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://sem
|
|
|
4
4
|
Changelog INTERNO dello stub spedito (`primitive_version`), separato dal `CLAUDE.md`
|
|
5
5
|
generato nel consumer e indipendente dal `VERSION` del framework.
|
|
6
6
|
|
|
7
|
+
## 1.2.0 — 2026-07-02
|
|
8
|
+
|
|
9
|
+
- Plan Mode: the `codebase-architect` pre-plan invocation now passes the matching
|
|
10
|
+
`PROFILE=<...>` token, citing `AGENTS.md` § Non-negotiables +
|
|
11
|
+
`agents/analysis-profiles.md` (no restatement — the stub stays thin).
|
|
12
|
+
|
|
7
13
|
## 1.1.0 — 2026-07-01
|
|
8
14
|
|
|
9
15
|
- Plan Mode delegation now names **both** domain agents — **code → `coder`**, **UI →
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- baldart-primitive: name=CLAUDE primitive_version=1.
|
|
1
|
+
<!-- baldart-primitive: name=CLAUDE primitive_version=1.2.0
|
|
2
2
|
SHIPPED SKELETON. The writer strips this banner, resolves {{ slot }}/{{#flag}} from
|
|
3
3
|
baldart.config.yml, merges .baldart/overlays/CLAUDE.md, stamps a baldart-generated
|
|
4
4
|
marker, and writes the result to the repo root.
|
|
@@ -16,7 +16,10 @@ SSOT, not restated here. Below are the **Claude-native mechanics only**.
|
|
|
16
16
|
|
|
17
17
|
- Enter plan mode (`EnterPlanMode`) for any non-trivial task before writing code.
|
|
18
18
|
Trivial = single-line fix / typo / obvious bug.
|
|
19
|
-
- Invoke `codebase-architect` before writing the plan — never plan blind.
|
|
19
|
+
- Invoke `codebase-architect` before writing the plan — never plan blind. Pass the
|
|
20
|
+
matching `PROFILE=<feature|bug|impact|discovery|ui|baseline>` token (the profile
|
|
21
|
+
vocabulary and routing live in `AGENTS.md` § Non-negotiables and
|
|
22
|
+
`agents/analysis-profiles.md` — not restated here).
|
|
20
23
|
- Launch `plan-auditor` + `doc-reviewer` in parallel to review the plan, incorporate their
|
|
21
24
|
feedback, and state inside the plan that the review gate was honored, BEFORE `ExitPlanMode`.
|
|
22
25
|
- Wait for explicit user approval, then delegate implementation to the domain agent via the
|