You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(agentic): enforce authenticated-Brave QA across agent guidance (#565)
## What
Make the **authenticated Brave QA profile** the single source of truth
for local browser verification across all agent guidance, and add
enforcement so the policy cannot silently drift back to isolated-browser
proof.
## Changes
- **`scripts/check-browser-verification-policy.mjs`** (new): asserts the
5 guidance files (`AGENTS.md`, `CLAUDE.md`,
`packages/{admin,client,shared}/AGENTS.md`) carry the required
authenticated-Brave phrases, bans stale isolated-browser guidance
repo-wide, and verifies the `package.json` wiring.
- **`scripts/require-authenticated-browser-qa.mjs`** (new): fails local
`agentic:browser-proof` unless `CI=true`, so isolated / clean-room proof
can't be reported as authenticated local QA.
- **`package.json`**: runs `check:browser-verification-policy` inside
`agentic:check`, and guards `agentic:browser-proof` with the new script.
- **`AGENTS.md`, `CLAUDE.md`,
`packages/{admin,client,shared}/AGENTS.md`**: replace the prior isolated
/ non-default Brave browser-proof guidance with the authenticated Brave
QA path (Claude Code `/chrome` + Brave profile, Codex browser-extension
path, computer-use fallback; report QA blocked rather than substitute
isolated proof).
## Verification
- `bun run check:browser-verification-policy` -> pass (5 guidance files)
- `bun run agentic:check` -> pass (guidance, policy,
design-md/generated/tokens, stories 176/176, story-quality)
## Notes
- Touches security-sensitive agent-operating surfaces (`AGENTS.md`,
`CLAUDE.md`, `package.json`); flagged for review.
- Not spawned from a Linear issue; link one if this should be tracked.
- Follow-up: the two new scripts are not yet listed in
`scripts/README.md` (repo convention); can add on request.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copy file name to clipboardExpand all lines: .agents/skills/audit-then-ship/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ Hard rules:
88
88
Apply only the approved fixes, in order. For each:
89
89
90
90
1. Make the edit.
91
-
2.**Verify the change in the same turn**: re-read the file, run the targeted test, or read the rendered DOM (Brave-backed browser MCP) for UI changes. No "should work" claims. (See AGENTS.md → *Verify Before Claiming Success*.)
91
+
2.**Verify the change in the same turn**: re-read the file, run the targeted test, or read the rendered DOM through the authenticated Brave QA profile for UI changes. No "should work" claims. (See AGENTS.md → *Verify Before Claiming Success*.)
Copy file name to clipboardExpand all lines: .agents/skills/design/defect-grammar.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ How Claude (and subagents) resolve casual admin-UI defect reports to an exact DO
8
8
9
9
When the user reports anything off on an admin surface, the agent MUST resolve to a canonical `Admin*` wrapper or canvas region before proposing an edit. Never guess. Escalate in this order:
10
10
11
-
### Tier 1 — Live DOM via Brave-Backed Browser MCP (preferred)
11
+
### Tier 1 — Live DOM via Authenticated Brave QA (preferred)
12
12
13
-
If an admin tab is open in Brave through a Brave-backed browser MCP, read the rendered DOM to locate the target:
13
+
If an admin tab is open in the authenticated Brave QA profile and the Codex or Claude browser-extension path can control it, read the rendered DOM to locate the target:
14
14
15
15
```js
16
-
// Via the available Brave-backed browser MCP JavaScript tool
16
+
// Via the authenticated Brave browser-extension JavaScript tool
@@ -104,7 +104,7 @@ The left column is what the user says. The right column is the internal statemen
104
104
105
105
Design-system updates do not automatically propagate to casual issue reports. Before `data-component` / `data-region` / `data-workspace`, a description like "the thing looks off" forced the agent to guess between 5+ candidate components; guesses miss, which is how "updates to the design system don't seem to address identified issues" happens.
106
106
107
-
The data attributes make the DOM self-identifying. This file tells the agent to **read them** (via Brave-backed browser MCP or grep) **before editing**, so casual user input maps to exact canonical targets. The grammar is a tool the agent uses on itself, not a vocabulary imposed on the user.
107
+
The data attributes make the DOM self-identifying. This file tells the agent to **read them** (via authenticated Brave QA or grep) **before editing**, so casual user input maps to exact canonical targets. The grammar is a tool the agent uses on itself, not a vocabulary imposed on the user.
108
108
109
109
## Related
110
110
@@ -113,4 +113,4 @@ The data attributes make the DOM self-identifying. This file tells the agent to
113
113
-[language.md](./language.md) — full Warm Earth token + motion spec
- Tooling: `bun run check:design-tokens`, `bun run lint:vocab`
116
-
- Brave-backed browser MCP tools: use the project `.mcp.json``brave-devtools` server or a Brave-attached Claude browser extension. Never use Google Chrome, Chrome for Testing, Chromium, or Edge for Green Goods browser proof.
116
+
-Authenticated Brave QA: use the Codex browser-extension path or the Claude Code Chrome/Chromium extension path against the already-open authenticated Brave profile/tab. If that access is blocked, report QA as blocked rather than switching to an isolated Browser, Playwright, or DevTools MCP profile.
Copy file name to clipboardExpand all lines: .claude/skills/audit-then-ship/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ Hard rules:
88
88
Apply only the approved fixes, in order. For each:
89
89
90
90
1. Make the edit.
91
-
2.**Verify the change in the same turn**: re-read the file, run the targeted test, or read the rendered DOM (Brave-backed browser MCP) for UI changes. No "should work" claims. (See CLAUDE.md → *Verify Before Claiming Success*.)
91
+
2.**Verify the change in the same turn**: re-read the file, run the targeted test, or read the rendered DOM through the authenticated Brave QA profile for UI changes. No "should work" claims. (See CLAUDE.md → *Verify Before Claiming Success*.)
Copy file name to clipboardExpand all lines: .claude/skills/design/defect-grammar.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ How Claude (and subagents) resolve casual admin-UI defect reports to an exact DO
8
8
9
9
When the user reports anything off on an admin surface, the agent MUST resolve to a canonical `Admin*` wrapper or canvas region before proposing an edit. Never guess. Escalate in this order:
10
10
11
-
### Tier 1 — Live DOM via Brave-Backed Browser MCP (preferred)
11
+
### Tier 1 — Live DOM via Authenticated Brave QA (preferred)
12
12
13
-
If an admin tab is open in Brave through a Brave-backed browser MCP, read the rendered DOM to locate the target:
13
+
If an admin tab is open in the authenticated Brave QA profile and the Codex or Claude browser-extension path can control it, read the rendered DOM to locate the target:
14
14
15
15
```js
16
-
// Via the available Brave-backed browser MCP JavaScript tool
16
+
// Via the authenticated Brave browser-extension JavaScript tool
@@ -104,7 +104,7 @@ The left column is what the user says. The right column is the internal statemen
104
104
105
105
Design-system updates do not automatically propagate to casual issue reports. Before `data-component` / `data-region` / `data-workspace`, a description like "the thing looks off" forced the agent to guess between 5+ candidate components; guesses miss, which is how "updates to the design system don't seem to address identified issues" happens.
106
106
107
-
The data attributes make the DOM self-identifying. This file tells the agent to **read them** (via Brave-backed browser MCP or grep) **before editing**, so casual user input maps to exact canonical targets. The grammar is a tool the agent uses on itself, not a vocabulary imposed on the user.
107
+
The data attributes make the DOM self-identifying. This file tells the agent to **read them** (via authenticated Brave QA or grep) **before editing**, so casual user input maps to exact canonical targets. The grammar is a tool the agent uses on itself, not a vocabulary imposed on the user.
108
108
109
109
## Related
110
110
@@ -113,4 +113,4 @@ The data attributes make the DOM self-identifying. This file tells the agent to
113
113
-[language.md](./language.md) — full Warm Earth token + motion spec
- Tooling: `bun run check:design-tokens`, `bun run lint:vocab`
116
-
- Brave-backed browser MCP tools: use the project `.mcp.json``brave-devtools` server or a Brave-attached Claude browser extension. Never use Google Chrome, Chrome for Testing, Chromium, or Edge for Green Goods browser proof.
116
+
-Authenticated Brave QA: use the Codex browser-extension path or the Claude Code Chrome/Chromium extension path against the already-open authenticated Brave profile/tab. If that access is blocked, report QA as blocked rather than switching to an isolated Browser, Playwright, or DevTools MCP profile.
Copy file name to clipboardExpand all lines: AGENTS.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,11 +148,12 @@ Single design language across frontend packages, with distinct admin, installed
148
148
149
149
## Agentic Modern Web Standard
150
150
151
-
- Baseline target: Baseline Widely Available. Before frontend, UI, CSS, accessibility, browser proof, or web-design changes, use repo-installed Modern Web Guidance through `bun run agentic:guidance` to search and retrieve current Chrome guidance as documentation/source material only; Green Goods browser proof still runs in Brave. Then apply the repo's Warm Earth and package-level design rules.
151
+
- Baseline target: Baseline Widely Available. Before frontend, UI, CSS, accessibility, browser proof, or web-design changes, use repo-installed Modern Web Guidance through `bun run agentic:guidance` to search and retrieve current Chrome guidance as documentation/source material only; Green Goods local QA uses the authenticated Brave QA profile, while CI clean-room browser proof uses Brave only as non-authenticated evidence. Then apply the repo's Warm Earth and package-level design rules.
152
152
- Prefer semantic HTML, native controls, platform CSS, and browser primitives before custom JavaScript. Keep headings, landmarks, form labels, accessible names, focus order, visible focus, touch targets, loading/error/empty states, and reduced-motion behavior legible to humans, assistive tech, and browser agents.
153
-
- Run `bun run agentic:check` as the hard guidance-readiness front door for repo-installed Modern Web Guidance, design docs, token drift, Codex/skill guidance, and shared Storybook story quality. Use `bun run agentic:verify` for Storybook-backed component proof, and `bun run agentic:browser-proof` for built-route proof across client, admin, and docs when layout, interaction, motion, or public routes change. The route proof writes screenshots, accessibility summaries, `/llms.txt` status, reduced-motion state, console/page errors, overflow checks, and WebMCP discovery to `.codex-artifacts/agentic-browser-proof/`; run `bun run lighthouse` when the heavier Lighthouse lane is needed. `dev-surfaces` remains the cross-repo/global doctor for shared Modern Web Guidance cache refresh, Brave, and MCP readiness.
154
-
- For local human/agent browser walkthroughs, WebMCP validation, extension review, visual debugging, and DevTools MCP proof, use Brave with an isolated/non-default profile. Do not silently fall back to any non-Brave browser for Green Goods browser proof.
155
-
- Brave DevTools MCP is project-configured in `.mcp.json` through `scripts/mcp/brave-devtools.mjs`; use it as the Brave-backed DevTools MCP path for live browser debugging, rendered DOM proof, console/network/performance inspection, screenshots, traces, and WebMCP discovery when troubleshooting Green Goods. The wrapper calls the upstream `chrome-devtools-mcp` package because that is the protocol package name, but the browser executable must be Brave. It rejects Google Chrome, Chrome for Testing, Chromium, and Edge paths. The wrapper uses the repo Node 22 toolchain, Brave browser discovery, isolated browser profiles, localhost HTTPS support, WebMCP debug category, and WebMCP testing flags. Native WebMCP discovery requires a Brave build that exposes `navigator.modelContext`. WebMCP v1 is implemented only for public-safe client/browser routes via `packages/client/src/modules/webmcp/public-tools.ts`; do not expose secrets, private data, hidden admin actions, onchain writes, destructive operations, or background-only actions as WebMCP tools.
153
+
- Run `bun run agentic:check` as the hard guidance-readiness front door for repo-installed Modern Web Guidance, design docs, token drift, Codex/skill guidance, and shared Storybook story quality. For local built-route QA across client, admin, and docs, use the authenticated Brave QA profile through the live authenticated-browser path below. Treat `bun run agentic:verify`, `bun run agentic:browser-proof`, and `bun run lighthouse` as CI/clean-room or code-level proof only unless they attach to authenticated Brave; do not report them as local authenticated verification. `dev-surfaces` remains the cross-repo/global doctor for shared Modern Web Guidance cache refresh, Brave, and MCP readiness.
154
+
- Local agentic browser QA must use the authenticated Brave QA profile. Codex: use the Codex browser-extension path and claim the already-open Brave tab/window. Claude Code: use the Claude Code Chrome/Chromium extension path (`claude --chrome` or `/chrome`) and select the authenticated Brave profile/tab when it is installed, connected, and able to control the already-open Brave window. Do not fall back merely because the extension is branded Chrome. If the Brave extension path is unavailable or not connected, use Claude computer-use/visible desktop control of the already-open Brave window; if neither can reach authenticated Brave, report QA as blocked. Use this for admin, PWA, extension, wallet/passkey, staging-session, installed-app, and profile-dependent verification.
155
+
- Do not use isolated Browser, Playwright, or DevTools MCP profiles for local QA. Existing isolated browser-proof commands are CI/clean-room checks only and must not be reported as authenticated verification. If authenticated Brave access is blocked, stop and report QA as blocked.
156
+
- Brave DevTools MCP is project-configured in `.mcp.json` through `scripts/mcp/brave-devtools.mjs`, but do not use it for local QA, live admin/PWA verification, rendered DOM proof, screenshots, traces, or success claims because it can launch a separate non-authenticated profile. The wrapper calls the upstream `chrome-devtools-mcp` package because that is the protocol package name, but the browser executable must be Brave. It rejects Google Chrome, Chrome for Testing, Chromium, and Edge paths. Use this wrapper only for CI/clean-room public-route checks or explicit non-authenticated protocol debugging, and label any result as non-authenticated evidence. Native WebMCP discovery requires a Brave build that exposes `navigator.modelContext`. WebMCP v1 is implemented only for public-safe client/browser routes via `packages/client/src/modules/webmcp/public-tools.ts`; do not expose secrets, private data, hidden admin actions, onchain writes, destructive operations, or background-only actions as WebMCP tools.
0 commit comments