Skip to content

Commit f472cac

Browse files
committed
fix: prefer Claude Code Chrome over agent-browser for browser automation
- Rename agent-browser.md rule to browser-automation.md with Chrome as preferred tool - Add detection logic: check for mcp__claude-in-chrome__* tools in deferred tools list - Show fallback warning when Chrome extension is not available - Update all commands (spec-plan, spec-verify, spec-implement, spec-bugfix-*) with browser tool resolution step supporting both Chrome and agent-browser workflows - Add Chrome Extension section to README, installation docs, and installer post-install - Add Claude Code Chrome to open-source-tools docs as preferred testing tool - Update verification.md, testing.md, settings.json references - Move CodeGraph sync from hooks to launcher wrapper (codegraph.py) - Refactor installer dependencies step with improved structure - Clean up development-practices.md exploration tooling section
1 parent 35edcd9 commit f472cac

28 files changed

Lines changed: 524 additions & 267 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ __marimo__/
222222
.streamlit/secrets.toml
223223

224224
# Claude Code
225+
scheduled_tasks.lock
225226
CLAUDE.md
226227
AGENTS.md
227228
spec-annotate

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ Installs globally on macOS, Linux, and Windows (WSL2). All tools and rules go to
7373

7474
</details>
7575

76+
<details>
77+
<summary><b>Chrome Extension (Recommended)</b></summary>
78+
79+
For the best browser automation and E2E testing experience, install the [Claude Code Chrome extension](https://code.claude.com/docs/en/chrome). Pilot automatically detects it and prefers it over agent-browser. In environments where the extension can't be installed (dev containers, headless CI), Pilot falls back to agent-browser automatically.
80+
81+
</details>
82+
7683
<details>
7784
<summary><b>Installing a specific version or uninstalling</b></summary>
7885

docs/docusaurus/docs/features/rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Rules load automatically at session start — they're enforced standards, not su
2727
### Tools (3 rules)
2828

2929
- `cli-tools.md` — Pilot CLI, Probe code search, RTK token optimization
30-
- `agent-browser.md` — Browser automation for E2E UI testing
30+
- `browser-automation.md` — Browser automation for E2E UI testing (Claude Code Chrome preferred, agent-browser fallback)
3131
- `mcp-servers.md` — MCP server reference and tool selection guidance
3232

3333
## Coding Standards — Activated by File Type

docs/docusaurus/docs/getting-started/installation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ Run from any directory — it installs globally to `~/.pilot/` and `~/.claude/`.
2525
| 1 | Prerequisites | Checks/installs Homebrew, Node.js, Python 3.12+, uv, git, jq |
2626
| 2 | Claude files | Sets up `~/.claude/` plugin — rules, commands, hooks, MCP servers |
2727
| 3 | Config files | Creates `.nvmrc` and project config |
28-
| 4 | Dependencies | Installs Probe, RTK, CodeGraph, agent-browser, language servers |
28+
| 4 | Dependencies | Installs Probe, RTK, CodeGraph, agent-browser (fallback), language servers |
2929
| 5 | Shell integration | Auto-configures bash, fish, and zsh with the `pilot` alias |
3030
| 6 | VS Code extensions | Installs recommended extensions for your language stack |
3131
| 7 | Finalize | Success message with next steps |
3232

33+
## Chrome Extension (Recommended)
34+
35+
For the best browser automation and E2E testing experience, install the [Claude Code Chrome extension](https://code.claude.com/docs/en/chrome). It provides richer visual context and more reliable interactions than the agent-browser fallback.
36+
37+
Pilot automatically detects the Chrome extension and uses it when available. In environments where the extension can't be installed (e.g., dev containers, headless CI), Pilot falls back to agent-browser automatically.
38+
3339
## Dev Container
3440

3541
Pilot Shell works inside Dev Containers. Copy the `.devcontainer` folder from the [Pilot Shell repository](https://github.com/maxritter/pilot-shell/tree/main/.devcontainer) into your project, adapt it to your needs (base image, extensions, dependencies), and run the installer inside the container. The installer auto-detects the container environment and skips system-level dependencies like Homebrew.

docs/docusaurus/docs/workflows/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Investigation-first flow for targeted fixes. Finds the root cause before touchin
6767
- Full test suite + type checking + lint + build verification
6868
- Features: unified review sub-agent (optional, enabled by default)
6969
- Bugfixes: regression test + full suite — no sub-agents needed
70-
- For UI features: executes the plan's **E2E test scenarios** step-by-step via browser automation — tracks pass/fail per scenario, auto-fixes failures (up to 2 attempts), escalates persistent failures to known issues; results written back to the plan file
70+
- For UI features: executes the plan's **E2E test scenarios** step-by-step via browser automation (Claude Code Chrome preferred, agent-browser as fallback) — tracks pass/fail per scenario, auto-fixes failures (up to 2 attempts), escalates persistent failures to known issues; results written back to the plan file
7171
- Auto-fixes findings, loops back until all checks pass
7272
- After automated checks pass, prompts you to **review code changes** in the Console's Changes tab — enable Review mode, add inline annotations on any diff line (they save automatically), and the agent addresses them before marking the spec as verified
7373

0 commit comments

Comments
 (0)