baldart 4.80.0 → 4.81.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 +31 -0
- package/VERSION +1 -1
- package/framework/.claude/commands/design-review.md +4 -4
- package/framework/.claude/commands/qa.md +1 -1
- package/framework/.claude/skills/bug/SKILL.md +23 -18
- package/framework/.claude/skills/bug/references/logging-patterns.md +10 -5
- package/framework/.claude/skills/playwright-skill/SKILL.md +1 -1
- package/framework/AGENTS.md +1 -1
- package/framework/docs/MCP-INTEGRATION.md +2 -2
- package/package.json +1 -1
- package/src/commands/update.js +23 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ All notable changes to BALDART will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [4.81.0] - 2026-06-29
|
|
9
|
+
|
|
10
|
+
**Playwright capture is CLI-only — no Playwright MCP anywhere in the framework.** BALDART already used the **Playwright Test CLI** for its main capture pipeline (`/e2e-review` Phase 3→4, `playwright-skill`, `webapp-testing`'s headless Python scripts), but three surfaces still drove the **Playwright MCP** interactively: the `bug` skill (Phase 1 UI reproduction via `browser_navigate`/`browser_take_screenshot`/`browser_console_messages`/`browser_network_requests`/`browser_evaluate`), the `/design-review` command (`allowed-tools` declared the four `mcp__playwright__*` tools + relied on `localhost:9221`), and the `/qa` DEEP tier ("Use MCP Playwright if available"). For **deterministic capture** the MCP is pure token overhead — every action round-trips a result (often a full a11y-tree snapshot) into context, accumulating per-step; a headless CLI script enters context once and writes screenshots/console/network to disk, read back only when needed. This release converts those three surfaces to the CLI so **no Playwright MCP is ever loaded into the agent context**.
|
|
11
|
+
|
|
12
|
+
The `bug` skill's interactive `browser_evaluate` instrumentation (fetch interceptor, SWR mutation tracker) is preserved with **zero loss of capability** by moving it into `page.addInitScript(() => { … })` inside the headless capture script — same injection, headless and reproducible, with the forwarded `console.*` collected via `page.on('console', …)` and read from disk.
|
|
13
|
+
|
|
14
|
+
**MINOR** — behaviour change across `bug`, `/design-review`, `/qa` (the Playwright MCP dependency is removed; capture is now CLI). No new config key, no install-layout change. The Codex broker's leaked Playwright-MCP orphans (spawned from the user's `~/.codex/config.toml`, independent of BALDART) remain handled by the `baldart doctor` orphan reaper — untouched.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **`framework/.claude/skills/bug/SKILL.md`** — frontmatter, "MCP dependencies" (Playwright MCP required → "None required for browser capture"; CLI via webapp-testing), Phase 0 triage tool, Phase 1 UI reproduction (browser_* steps → headless capture script writing screenshot/console/network to disk), Phase 2 client-side logging (`browser_evaluate` → `page.addInitScript`), Phase 3 evidence collection, Phase 5 verify, Tools Quick Reference.
|
|
19
|
+
- **`framework/.claude/skills/bug/references/logging-patterns.md`** — "Playwright MCP Debug Patterns" → "Playwright CLI Debug Patterns"; `// browser_evaluate:` → `page.addInitScript()` in the capture script.
|
|
20
|
+
- **`framework/.claude/commands/design-review.md`** — removed the four `mcp__playwright__*` tools from `allowed-tools`; the route capture is now a headless Playwright CLI screenshot (Bash) read back as a PNG, instead of opening the MCP browser on `localhost:9221`.
|
|
21
|
+
- **`framework/.claude/commands/qa.md`** — DEEP-tier UI quality checks use a headless Playwright CLI screenshot script (when `@playwright/test` is installed) instead of MCP Playwright.
|
|
22
|
+
- **`framework/.claude/skills/playwright-skill/SKILL.md`** — the cross-reference to `bug` no longer says it "requires `mcp__playwright__browser_*`"; both use the CLI.
|
|
23
|
+
- **`framework/docs/MCP-INTEGRATION.md`** — "Browser automation" catalog entry: Playwright MCP → **Playwright CLI**, with the token-economy rationale and the note that the Codex-broker orphan reaper is independent; the section-authoring example tool prefix swapped off `mcp__playwright__browser_navigate` (now a Firebase example) so the doc no longer implies BALDART uses the Playwright MCP.
|
|
24
|
+
|
|
25
|
+
## [4.80.1] - 2026-06-29
|
|
26
|
+
|
|
27
|
+
**Self-heal payload drift on an already-current install + a Codex-correct "agent not found" message.** Shipping v4.80.0 surfaced two gaps in the field, both from the same incident: a consumer's Codex session emitted the AGENTS.md STOP message for `codebase-architect`, yet the framework was already at v4.80.0. Two root causes:
|
|
28
|
+
|
|
29
|
+
1. **CLI↔framework skew left the consumer stuck even after the framework reached 4.80.0.** The consumer's subtree was pulled to v4.80.0, but the `update` that pulled it ran with an **older global CLI** (4.76.x) whose `codex.agentsDir()` was still `null` — so the new Codex-agent payload was silently skipped, and `.codex/agents/` was never created. Worse, *re-running* `update` after aligning the CLI hit the **`Already up to date!` early-exit** (line ~893), which returned BEFORE the symlink/merge reconciliation block — so the version-aligned install never self-healed the missing payload (recoverable only via `baldart doctor`). Fix: the `isAligned` branch now runs the idempotent, additive per-item merges (skills/agents/commands/workflows/output-styles) **before** declaring "up to date". They stay silent when nothing is missing and emit a one-line "Reconciled N newly-shipped item(s)" when they heal real drift — so a CLI-skew victim self-heals on the next `update`, not only via `doctor`. This generalises: ANY future payload-kind addition (a new `MERGE_KINDS` entry) is now reconciled on version-aligned installs too.
|
|
30
|
+
2. **The "agent not found" STOP message told a Codex user to "riavvia Claude Code".** The v4.80.0 AGENTS.md edit gave the Codex branch the Claude verbatim message. Fix: a **Codex-specific** message — *"Agent `<name>` non trovato tra i custom agent di Codex (`.codex/agents/<name>.toml`) — allinea la CLI (`npm i -g baldart@latest`), esegui `npx baldart update` (o `npx baldart doctor`), assicurati che il progetto sia trusted in Codex, poi riavvia la sessione Codex"* — encoding the exact remediation (CLI align → update → trust → restart; Codex loads `.codex/agents/` only in **trusted** projects, and discovers agents at session start).
|
|
31
|
+
|
|
32
|
+
**PATCH** — script bugfix (update self-heals payload drift) + AGENTS.md message correction; no behaviour change on the happy path, no new config key. Existing v4.80.0 consumers should `npm i -g baldart@latest` (kill the skew at the source) then `npx baldart update`; the Codex session must be restarted to discover the newly-installed agents.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **`src/commands/update.js`** — the `Already up to date!` (`status.isAligned`) branch now runs the per-item merges before the early exit (self-heal of payload drift from a prior CLI-skew update), reports the healed count, and adds `reconciled_items` to the `already-current` JSON event.
|
|
37
|
+
- **`framework/AGENTS.md`** — the no-silent-substitution rule's Codex branch now carries its own verbatim "agent not found" remediation message (was reusing the Claude "riavvia Claude Code" text).
|
|
38
|
+
|
|
8
39
|
## [4.80.0] - 2026-06-29
|
|
9
40
|
|
|
10
41
|
**Codex-native subagents — the 32 BALDART agents are now installed for Codex, not just Claude.** A portability bug surfaced in the field: a skill running on Codex delegated to `codebase-architect` (*"invoke the codebase-architect agent"*), but the agent did not exist in the Codex tree and there was no obvious mechanism to spawn it, so the model **improvised** a generic explorer sub-agent. Root cause (confirmed against the OpenAI Codex docs, June 2026): the framework treated subagents as Claude-only — the Codex tool adapter declared `supportsSubagents() === false` / `agentsDir() === null`, so the agent definitions under `framework/.claude/agents/` were **never installed into a Codex tree**. But **Codex now has custom agents** (subagents) — they were simply in a different shape than Claude's, and BALDART had not yet mapped them. This release closes that gap.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.81.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Trigger the design-review subagent with
|
|
3
|
-
allowed-tools: Bash, Grep, LS, Read, WebFetch, TodoWrite, WebSearch, BashOutput, KillBash
|
|
2
|
+
description: Trigger the design-review subagent with the Playwright CLI for the specified route.
|
|
3
|
+
allowed-tools: Bash, Grep, LS, Read, WebFetch, TodoWrite, WebSearch, BashOutput, KillBash
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are the design-review subagent. Ensure
|
|
6
|
+
You are the design-review subagent. Ensure the dev server is running, then capture each route with a **headless Playwright CLI screenshot** (a short script run via Bash, e.g. `npx playwright screenshot` or an inline `.mjs` using `@playwright/test`'s `chromium`) — no Playwright MCP. Read the saved PNG back to reason over it.
|
|
7
7
|
|
|
8
8
|
## Invocation Modes (since v3.18.1)
|
|
9
9
|
|
|
@@ -110,7 +110,7 @@ When the user invokes `/design-review`, do the following (in both modes — only
|
|
|
110
110
|
- Read `${paths.design_system}/tokens-reference.md`.
|
|
111
111
|
- Read `${paths.design_system}/components/<Name>.md` for every primitive expected on the route.
|
|
112
112
|
When the flag is `false`, skip the registry reads. In Mode A flag the gap in the final report and recommend `/design-system-init`. In Mode B add the gap to the `gaps[]` array of the JSON output.
|
|
113
|
-
1. Start with the route or component specified (e.g., `/dashboard`) and
|
|
113
|
+
1. Start with the route or component specified (e.g., `/dashboard`) and capture it with a headless Playwright CLI screenshot script (run via Bash), then Read the PNG back. In Mode B, use the `dev_server_port` from the input envelope to construct `http://localhost:<port><route>`.
|
|
114
114
|
2. Follow the Quick Visual Check in `agents/design-review.md` and run Phases 0‑7 (interaction, responsiveness, polish, accessibility, robustness, code health, content/console).
|
|
115
115
|
3. Capture at least one full-page screenshot at the viewport from the input (default 1440px) and note console errors. In Mode B save the screenshot at `/tmp/design-review/<route-slug>.png` and cite it in `evidence.screenshot_path`.
|
|
116
116
|
4. **Mode A**: report findings using the Markdown template in `agents/design-review.md` (Blockers/High/Medium/Nitpicks). **Mode B**: assemble the JSON output described above, normalizing severity per the table.
|
|
@@ -169,7 +169,7 @@ Run everything in BALANCED, plus:
|
|
|
169
169
|
- If NO: log in findings file: "E2E framework not configured — recommend setting up e2e smoke suite. No e2e tests run."
|
|
170
170
|
|
|
171
171
|
**UI quality checks:**
|
|
172
|
-
- Use
|
|
172
|
+
- Use a headless Playwright CLI screenshot script (when `@playwright/test` is installed) to open key flows related to the diff and take screenshots, checking for console errors and visual regressions — no Playwright MCP.
|
|
173
173
|
- Validate: login/auth flow, critical navigation, any flow directly touched by the diff.
|
|
174
174
|
|
|
175
175
|
Run the e2e pass in parallel with the `qa-sentinel` FULL-tier gate run (launch both as sub-agents simultaneously). This inline two-agent launch is the DEEP default; escalate to the team-based strategy (Step 4) ONLY when 3+ clearly independent risk tracks exist [DESIGN-CHOICE: below this threshold, TeamCreate overhead exceeds benefit; two inline Task spawns are sufficient]. A DEEP run with fewer than 3 tracks stays on this inline path and does NOT create a team.
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
'investigate', or reports unexpected behavior. Accepts optional bug description as argument.
|
|
8
8
|
Enforces a disciplined 5-phase debugging protocol that prevents blind guessing:
|
|
9
9
|
(1) Reproduce & observe, (2) Enhanced logging if stuck, (3) Data-driven analysis,
|
|
10
|
-
(4) Hypothesis & minimal fix, (5) Verify. Leverages Playwright
|
|
10
|
+
(4) Hypothesis & minimal fix, (5) Verify. Leverages the Playwright CLI (headless capture scripts via webapp-testing) for browser capture,
|
|
11
11
|
codebase-architect for code path tracing, `rg` over docs for known patterns, git bisect for regressions.
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -35,8 +35,7 @@ precedence caveats: `framework/agents/effort-protocol.md`.
|
|
|
35
35
|
|
|
36
36
|
See [framework/docs/MCP-INTEGRATION.md](../../../docs/MCP-INTEGRATION.md) for the BALDART MCP integration contract and the rationale behind this section.
|
|
37
37
|
|
|
38
|
-
**
|
|
39
|
-
- `mcp__playwright__browser_*` (`browser_navigate`, `browser_take_screenshot`, `browser_console_messages`, `browser_network_requests`, `browser_evaluate`) — Phase 1 reproduction for **UI/Client** bugs. Without it the skill cannot capture deterministic state and Phase 1 degrades to "ask the user to reproduce manually and paste console logs". Phase 2's client-side `window.fetch` interception is impossible without `browser_evaluate`.
|
|
38
|
+
**None required for browser capture.** UI/Client reproduction uses the **Playwright CLI**, NOT an MCP: write a short headless capture script (via the [webapp-testing](../webapp-testing/SKILL.md) toolkit) that navigates, screenshots, and dumps console + network to disk, then read the artifacts back. Nothing is driven interactively, so **no Playwright MCP is ever loaded into the agent context** (deliberate token-economy choice — see `framework/docs/MCP-INTEGRATION.md`). The `addInitScript` instrumentation in Phase 2 replaces the old live `browser_evaluate` injection with zero loss of capability.
|
|
40
39
|
|
|
41
40
|
**Optional** (the skill benefits if present, has a documented fallback):
|
|
42
41
|
- `mcp__plugin_firebase_firebase__firestore_*` (or the project's DB MCP, when `stack.database.primary` is set) — Phase 1 inspection of runtime data state for **Data** bugs. Fallback: ask the user for a document export, or read the relevant code path and infer.
|
|
@@ -54,7 +53,7 @@ See [framework/docs/MCP-INTEGRATION.md](../../../docs/MCP-INTEGRATION.md) for th
|
|
|
54
53
|
|
|
55
54
|
1. Parse the bug description from args (or ask user if missing)
|
|
56
55
|
2. Classify the bug domain:
|
|
57
|
-
- **UI/Client** → Playwright
|
|
56
|
+
- **UI/Client** → Playwright CLI capture script (via webapp-testing) is primary tool
|
|
58
57
|
- **API/Server** → dev server logs + route handler analysis
|
|
59
58
|
- **Data/Datastore** → the project's datastore inspection tooling per `stack.database` (e.g. the Firebase MCP for `firestore`, a SQL client for `postgres`/`supabase`, the Mongo shell for `mongodb`) + transaction tracing
|
|
60
59
|
- **Auth** → the project's auth middleware/guard + auth error codes (per `stack.auth_provider`)
|
|
@@ -82,13 +81,16 @@ See [framework/docs/MCP-INTEGRATION.md](../../../docs/MCP-INTEGRATION.md) for th
|
|
|
82
81
|
|
|
83
82
|
Goal: get a reliable reproduction that you can re-run after fixing.
|
|
84
83
|
|
|
85
|
-
**For UI bugs:**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
**For UI bugs (Playwright CLI capture — no MCP):**
|
|
85
|
+
Write a short **headless capture script** to scratch (e.g. `scratch/bug-repro.mjs`, or a Python helper via the [webapp-testing](../webapp-testing/SKILL.md) toolkit) and run it with Bash — never drive the browser interactively. The script:
|
|
86
|
+
1. Navigates to the affected page (build the URL from the project baseURL / dev-server port)
|
|
87
|
+
2. Captures a baseline screenshot to disk: `await page.screenshot({ path: 'scratch/repro.png', fullPage: true })`
|
|
88
|
+
3. Dumps console to a file: `page.on('console', m => fs.appendFileSync('scratch/console.log', m.text()+'\n'))`
|
|
89
|
+
4. Dumps network to a file: `page.on('response', r => fs.appendFileSync('scratch/network.log', `${r.status()} ${r.url()}\n`))` (or record a HAR via `browser.newContext({ recordHar: { path: 'scratch/repro.har' } })`)
|
|
90
|
+
5. Performs the repro steps (`click`/`fill`), screenshotting after each action
|
|
91
|
+
6. Then **Read the artifact files back** and record the exact sequence that triggers the bug
|
|
92
|
+
|
|
93
|
+
Delete the scratch script + artifacts in Phase 5.
|
|
92
94
|
|
|
93
95
|
**For API bugs:**
|
|
94
96
|
1. Identify the route handler file from the URL pattern
|
|
@@ -141,10 +143,12 @@ await firestore.runTransaction(async (tx) => {
|
|
|
141
143
|
console.log(`[DEBUG:tx] done in ${attempt} attempts`); // DEBUG:
|
|
142
144
|
```
|
|
143
145
|
|
|
144
|
-
### Client-side logging (via Playwright
|
|
146
|
+
### Client-side logging (via the Playwright CLI capture script — zero app code changes)
|
|
145
147
|
|
|
146
|
-
|
|
148
|
+
Inject runtime instrumentation with `page.addInitScript(() => { ... })` (runs before the page's own scripts) inside the capture script — same effect as a live `evaluate`, but headless and reproducible. The forwarded `console.*` is collected by the script's `page.on('console', …)` handler and written to disk; read the file back after the run:
|
|
147
149
|
```javascript
|
|
150
|
+
// inside the capture script, before page.goto():
|
|
151
|
+
await page.addInitScript(() => {
|
|
148
152
|
// Intercept all fetch calls
|
|
149
153
|
const origFetch = window.fetch;
|
|
150
154
|
window.fetch = async (...args) => {
|
|
@@ -163,8 +167,9 @@ window.fetch = async (...args) => {
|
|
|
163
167
|
throw e;
|
|
164
168
|
}
|
|
165
169
|
};
|
|
170
|
+
}); // end addInitScript
|
|
166
171
|
```
|
|
167
|
-
Then
|
|
172
|
+
Then run the script and read the console artifact file back after reproducing.
|
|
168
173
|
|
|
169
174
|
### Cache/data-fetch debug mode
|
|
170
175
|
|
|
@@ -179,8 +184,8 @@ If the project exposes an env-summary helper (listed in `.baldart/overlays/bug.m
|
|
|
179
184
|
1. Reproduce the bug AGAIN with enhanced logging active
|
|
180
185
|
2. Collect ALL output:
|
|
181
186
|
- Server terminal (grep for `[DEBUG:`)
|
|
182
|
-
-
|
|
183
|
-
-
|
|
187
|
+
- the console artifact file written by the capture script
|
|
188
|
+
- the network artifact file (or HAR) written by the capture script
|
|
184
189
|
- Screenshots before/after
|
|
185
190
|
3. Analyze:
|
|
186
191
|
- **Timeline**: what happened in what order?
|
|
@@ -216,7 +221,7 @@ If the project exposes an env-summary helper (listed in `.baldart/overlays/bug.m
|
|
|
216
221
|
```
|
|
217
222
|
Remove every line found. Run grep again to confirm zero results.
|
|
218
223
|
5. Revert any temporary cache/data-fetch debug switches enabled in Phase 2
|
|
219
|
-
6.
|
|
224
|
+
6. Re-run the Playwright CLI capture script for a final screenshot to confirm visually, then delete the scratch script + artifacts
|
|
220
225
|
|
|
221
226
|
## TOOLS QUICK REFERENCE
|
|
222
227
|
|
|
@@ -224,7 +229,7 @@ If the project exposes an env-summary helper (listed in `.baldart/overlays/bug.m
|
|
|
224
229
|
|------|------|---------|
|
|
225
230
|
| `codebase-architect` agent | Phase 0 | Map affected code paths |
|
|
226
231
|
| `rg` over docs / error-code module | Phase 0 | Search known patterns/errors |
|
|
227
|
-
|
|
|
232
|
+
| Playwright CLI capture script (webapp-testing) | Phase 1-5 | Navigate, screenshot, console, network — headless, artifacts to disk (no MCP) |
|
|
228
233
|
| Project DB MCP (if available) | Phase 1 | Inspect storage state (e.g. firestore/postgres tools) |
|
|
229
234
|
| `git log/blame/bisect` | Phase 0, 3 | Find regression commits |
|
|
230
235
|
| Project-specific entry points | various | Listed in `.baldart/overlays/bug.md` — error-code module, env-summary helper, cache debug switch |
|
|
@@ -115,11 +115,16 @@ const analysis = await query.explain({ analyze: true });
|
|
|
115
115
|
`debug()` in Firestore rules works ONLY in the emulator, no-op in production.
|
|
116
116
|
Use `@firebase/rules-unit-testing` (already in devDeps) for rule testing.
|
|
117
117
|
|
|
118
|
-
## Playwright
|
|
118
|
+
## Playwright CLI Debug Patterns
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
> Headless capture scripts only — no Playwright MCP. Inject the instrumentation
|
|
121
|
+
> with `page.addInitScript(() => { ... })` (runs before the page's own scripts),
|
|
122
|
+
> collect the forwarded `console.*` with `page.on('console', …)`, and write it to
|
|
123
|
+
> disk; read the artifact back after the run.
|
|
124
|
+
|
|
125
|
+
### Inject fetch interceptor (zero app code changes)
|
|
121
126
|
```javascript
|
|
122
|
-
//
|
|
127
|
+
// inside the capture script: await page.addInitScript(() => {
|
|
123
128
|
const origFetch = window.fetch;
|
|
124
129
|
window.fetch = async (...args) => {
|
|
125
130
|
const url = typeof args[0] === 'string' ? args[0] : args[0]?.url;
|
|
@@ -143,7 +148,7 @@ window.fetch = async (...args) => {
|
|
|
143
148
|
|
|
144
149
|
### Inject SWR mutation tracker
|
|
145
150
|
```javascript
|
|
146
|
-
//
|
|
151
|
+
// inside the capture script: await page.addInitScript(() => {
|
|
147
152
|
const origMutate = window.__SWR_MUTATE__;
|
|
148
153
|
if (origMutate) {
|
|
149
154
|
window.__SWR_MUTATE__ = (...args) => {
|
|
@@ -161,7 +166,7 @@ const context = await browser.newContext({ recordHar: { path: 'debug.har', mode:
|
|
|
161
166
|
|
|
162
167
|
## CDP (Chrome DevTools Protocol) via Playwright
|
|
163
168
|
|
|
164
|
-
For deep debugging beyond
|
|
169
|
+
For deep debugging beyond the basic capture script:
|
|
165
170
|
```typescript
|
|
166
171
|
const session = await context.newCDPSession(page);
|
|
167
172
|
await session.send('Runtime.enable');
|
|
@@ -31,7 +31,7 @@ precedence caveats: `framework/agents/effort-protocol.md`.
|
|
|
31
31
|
|
|
32
32
|
See [framework/docs/MCP-INTEGRATION.md](../../../docs/MCP-INTEGRATION.md) for the BALDART MCP integration contract and the rationale behind this section.
|
|
33
33
|
|
|
34
|
-
**None.** This skill uses the **Playwright Test CLI** (`@playwright/test`) directly via `npm run test:e2e` — `.spec.ts` files under `${paths.e2e_tests_dir}`. It does NOT use Playwright MCP. Consumers don't need any MCP configured to use this skill. For ad-hoc
|
|
34
|
+
**None.** This skill uses the **Playwright Test CLI** (`@playwright/test`) directly via `npm run test:e2e` — `.spec.ts` files under `${paths.e2e_tests_dir}`. It does NOT use Playwright MCP. Consumers don't need any MCP configured to use this skill. For ad-hoc browser capture during bug investigation (not E2E test authoring) see [bug/SKILL.md](../bug/SKILL.md), which **also uses the Playwright CLI** (headless capture scripts via [webapp-testing](../webapp-testing/SKILL.md)) — no Playwright MCP anywhere in BALDART.
|
|
35
35
|
|
|
36
36
|
## E2E Review Integration (since v3.18.0)
|
|
37
37
|
|
package/framework/AGENTS.md
CHANGED
|
@@ -104,7 +104,7 @@ Conflict steps (must follow in order):
|
|
|
104
104
|
|
|
105
105
|
- MUST treat `AGENTS.md` as authoritative for agent rules.
|
|
106
106
|
- MUST invoke the `codebase-architect` agent whenever you need to understand codebase structure, existing patterns, or code architecture before planning or implementing changes; do not proceed with planning or implementation without first understanding the existing system through codebase-architect. **The agent exists on both tools** — Claude Code spawns it via the Task/Agent tool with `subagent_type: "codebase-architect"`; Codex spawns the `codebase-architect` custom agent **by name** (BALDART installs it at `.codex/agents/codebase-architect.toml`, transpiled from the same `.md` source). Only if your environment genuinely exposes NEITHER subagent mechanism (a stripped tool host) do you degrade — explicitly — to inline structural retrieval (code-graph → LSP → Grep → direct file reads per `agents/code-search-protocol.md`), and SAY SO; never silently skip the understanding step.
|
|
107
|
-
- MUST NOT silently substitute a *different* agent when an agent invocation returns empty (`0 tool uses · Done`), times out, or fails with `permissionDecision: deny`. On **Claude Code** this pattern indicates a sub-agent failure (see anthropics/claude-code#56869) or a discovery miss / blocked agent (see #20931 and BALDART's own `agent-discovery-gate` PreToolUse hook): STOP, report to the user verbatim: "Agent `<name>` non discoverato o fallito in questa sessione — riavvia Claude Code e verifica con `npx baldart doctor`", and wait for direction. Never auto-route to `feature-dev:*`, `general-purpose`, or any other marketplace/built-in agent as a replacement. **This rule is the ONLY defense against bug #56869 (which BALDART cannot patch from outside Claude Code); deviating from it reintroduces the exact failure mode the rule exists to prevent.** On **Codex** the
|
|
107
|
+
- MUST NOT silently substitute a *different* agent when an agent invocation returns empty (`0 tool uses · Done`), times out, or fails with `permissionDecision: deny`. On **Claude Code** this pattern indicates a sub-agent failure (see anthropics/claude-code#56869) or a discovery miss / blocked agent (see #20931 and BALDART's own `agent-discovery-gate` PreToolUse hook): STOP, report to the user verbatim: "Agent `<name>` non discoverato o fallito in questa sessione — riavvia Claude Code e verifica con `npx baldart doctor`", and wait for direction. Never auto-route to `feature-dev:*`, `general-purpose`, or any other marketplace/built-in agent as a replacement. **This rule is the ONLY defense against bug #56869 (which BALDART cannot patch from outside Claude Code); deviating from it reintroduces the exact failure mode the rule exists to prevent.** On **Codex** the equivalent is spawning the custom agent by name; the same no-silent-substitution rule holds — but the remediation differs, so STOP and report the **Codex-specific** message verbatim: "Agent `<name>` non trovato tra i custom agent di Codex (`.codex/agents/<name>.toml`) — allinea la CLI (`npm i -g baldart@latest`), esegui `npx baldart update` (o `npx baldart doctor`), assicurati che il progetto sia *trusted* in Codex, poi riavvia la sessione Codex", and wait for direction. (The #56869 specifics are Claude-only; the no-silent-substitution principle is universal.)
|
|
108
108
|
- MUST NOT work on files/components already claimed by another agent; multiple agents allowed if working on independent areas.
|
|
109
109
|
- MUST perform a mandatory clarity analysis before fixing any issue labeled `bug`; confirm that the issue description, proposed correct behavior, and edge cases are unambiguous, document any resolved doubts, and only start fix work once every zone of uncertainty is covered.
|
|
110
110
|
- MUST mark missing info as UNKNOWN and ask the user; if blocked, set `BLOCKED` with a blocker.
|
|
@@ -25,7 +25,7 @@ Tre opzioni per integrare un sistema esterno in un agent BALDART. Scegli il più
|
|
|
25
25
|
Non è un'imposizione: BALDART non installa MCP, non li valida, non li richiede. È una lista curata di MCP che hanno senso nei deployment dove BALDART è già in uso.
|
|
26
26
|
|
|
27
27
|
### Browser automation
|
|
28
|
-
- **Playwright
|
|
28
|
+
- **Playwright CLI** (`@playwright/test` / `playwright`) — BALDART usa la **CLI**, non un MCP, per ogni cattura browser (screenshot, console, network). Le skill [playwright-skill](../.claude/skills/playwright-skill/SKILL.md), [webapp-testing](../.claude/skills/webapp-testing/SKILL.md) e [bug](../.claude/skills/bug/SKILL.md) scrivono script headless che salvano gli artefatti su disco e li rileggono, così **nessun MCP Playwright resta fisso nel contesto dell'agente**. Scelta deliberata per l'economia di token: la cattura deterministica non ha bisogno del modello-nel-loop, quindi la CLI evita gli accumuli di snapshot/a11y-tree per-azione tipici dell'MCP. (Il Playwright MCP che il broker Codex può spawnare dal `~/.codex/config.toml` dell'utente resta gestito dal reaper orfani in `baldart doctor` — è indipendente da BALDART.)
|
|
29
29
|
|
|
30
30
|
### Code knowledge graph (Graphify)
|
|
31
31
|
- **Graphify** (`pipx install graphifyy` → CLI `graphify` + MCP server `graphify-mcp`) — code knowledge graph (tree-sitter, locale/offline, Leiden nativo). Gatato da `features.has_code_graph`. Usato da [codebase-architect](../.claude/agents/codebase-architect.md) e dalle skill di esplorazione per query **strutturali/relazionali** (`graphify query`/`path`/`explain`/`affected`), e dal layer wiki (`wiki-curator`, `/capture`, routine `doc-graph-align`) che si alimenta del `GRAPH_REPORT.md` nativo. **CLI-first** (sempre disponibile post-install); l'MCP `graphify-mcp` è opt-in (`graph.register_mcp`, best-effort `claude mcp add`). Fallback: degrada a LSP→Grep→Git. Vedi [code-graph-protocol.md](../agents/code-graph-protocol.md) e [CODE-GRAPH-LAYER.md](CODE-GRAPH-LAYER.md).
|
|
@@ -77,7 +77,7 @@ Subito dopo la sezione `## Project Context` (o, in mancanza, subito dopo il fron
|
|
|
77
77
|
|
|
78
78
|
### Regole
|
|
79
79
|
|
|
80
|
-
1. **Sii specifico**: cita il prefisso del tool (`
|
|
80
|
+
1. **Sii specifico**: cita il prefisso del tool (es. `mcp__plugin_firebase_firebase__firestore_get_document`), non il "concetto" (`Firebase MCP`). Aiuta il consumer a fare grep.
|
|
81
81
|
2. **Required vs Optional**: required = la skill non può completare il proprio task senza il MCP (o degrada gravemente). Optional = la skill ha un fallback funzionante.
|
|
82
82
|
3. **Fallback espliciti**: per ogni `Optional`, descrivi il fallback in una frase ("se MCP unavailable, usa `rg` su `docs/` per trovare pattern noti").
|
|
83
83
|
4. **Niente nuovo schema in `baldart.config.yml`**: non aggiungere `mcp.required` o `mcp.optional` nel config — è solo convenzione testuale finché non c'è una skill che ha bisogno di gatearne il comportamento a runtime.
|
package/package.json
CHANGED
package/src/commands/update.js
CHANGED
|
@@ -891,11 +891,33 @@ async function update(options = {}, unknownArgs = []) {
|
|
|
891
891
|
// VERSION-compare authority. Subtree-merge commit count is noise; never
|
|
892
892
|
// use behind > 0 as the up-to-date signal (root cause of v3.24.x bug).
|
|
893
893
|
if (status.isAligned) {
|
|
894
|
+
// Even when the VERSION is aligned, the per-item PAYLOAD may be stale.
|
|
895
|
+
// The failure class: a consumer updates with an OLDER CLI (CLI↔framework
|
|
896
|
+
// skew) → gets the new framework content but the old reconciliation logic,
|
|
897
|
+
// so a newly-added payload kind (e.g. Codex agents in v4.80.0, where
|
|
898
|
+
// `codex.agentsDir()` flipped from null to `.codex/agents`) is silently
|
|
899
|
+
// skipped. Later aligning the CLI and re-running `update` hit this early
|
|
900
|
+
// "already current" exit and NEVER reconciled — leaving the consumer
|
|
901
|
+
// stuck (recoverable only via `doctor`). The per-item merges are
|
|
902
|
+
// idempotent + additive and stay SILENT when nothing is missing, so run
|
|
903
|
+
// them here: an up-to-date install now self-heals payload drift too.
|
|
904
|
+
const alignedTools = readEnabledTools();
|
|
905
|
+
const reconciled = [
|
|
906
|
+
symlinks.mergeSkills({ tools: alignedTools }),
|
|
907
|
+
symlinks.mergeAgents({ tools: alignedTools }),
|
|
908
|
+
symlinks.mergeCommands({ tools: alignedTools }),
|
|
909
|
+
symlinks.mergeWorkflows({ tools: alignedTools }),
|
|
910
|
+
symlinks.mergeOutputStyles({ tools: alignedTools })
|
|
911
|
+
].reduce((n, r) => n + ((r.linked && r.linked.length) || 0) + ((r.generated && r.generated.length) || 0), 0);
|
|
912
|
+
if (reconciled > 0) {
|
|
913
|
+
UI.info(`Reconciled ${reconciled} newly-shipped item(s) into per-tool dir(s) — payload drift from a prior CLI-skew update, now healed.`);
|
|
914
|
+
}
|
|
894
915
|
UI.success(`Already up to date! (v${status.installedVersion})`);
|
|
895
916
|
emitUpdateJson({ ok: true, action: 'already-current',
|
|
896
917
|
installed_before: status.installedVersion,
|
|
897
918
|
installed_after: status.installedVersion,
|
|
898
|
-
remote_version: status.remoteVersion
|
|
919
|
+
remote_version: status.remoteVersion,
|
|
920
|
+
reconciled_items: reconciled }, 0);
|
|
899
921
|
}
|
|
900
922
|
|
|
901
923
|
UI.warning(`Update available: v${status.installedVersion} → v${status.remoteVersion}`);
|