|
| 1 | +--- |
| 2 | +name: setup |
| 3 | +description: Install development tools (claude | playwright) |
| 4 | +disable-model-invocation: true |
| 5 | +allowed-tools: Bash |
| 6 | +--- |
| 7 | + |
| 8 | +# Setup Development Tools |
| 9 | + |
| 10 | +Install Claude Code CLI with Too Many Cooks extension OR Playwright with Chromium. |
| 11 | + |
| 12 | +**Usage**: `/setup <tool>` |
| 13 | +- `claude` — Install Claude Code CLI and Too Many Cooks VSCode extension |
| 14 | +- `playwright` — Install Chromium and Playwright for website E2E testing |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Claude Setup |
| 19 | + |
| 20 | +Sets up Claude Code CLI and the Too Many Cooks VSCode extension for multi-agent coordination. |
| 21 | + |
| 22 | +### Step 1: Install Claude Code CLI |
| 23 | + |
| 24 | +```bash |
| 25 | +npm install -g @anthropic-ai/claude-code |
| 26 | +``` |
| 27 | + |
| 28 | +Verify: |
| 29 | +```bash |
| 30 | +claude --version |
| 31 | +``` |
| 32 | + |
| 33 | +### Step 2: Build the Too Many Cooks VSCode Extension |
| 34 | + |
| 35 | +The extension provides visual agent coordination (locks, messages, plans) via the MCP server. |
| 36 | + |
| 37 | +#### 2a. Build the MCP Server first |
| 38 | + |
| 39 | +```bash |
| 40 | +cd examples/too_many_cooks && dart pub get && npm install |
| 41 | +dart compile js -o examples/too_many_cooks/build/bin/server.js examples/too_many_cooks/bin/server.dart |
| 42 | +dart run tools/build/add_preamble.dart \ |
| 43 | + examples/too_many_cooks/build/bin/server.js \ |
| 44 | + examples/too_many_cooks/build/bin/server_node.js \ |
| 45 | + --shebang |
| 46 | +``` |
| 47 | + |
| 48 | +#### 2b. Build and package the extension |
| 49 | + |
| 50 | +```bash |
| 51 | +cd examples/too_many_cooks_vscode_extension |
| 52 | +npm install |
| 53 | +npm run compile |
| 54 | +npx @vscode/vsce package |
| 55 | +``` |
| 56 | + |
| 57 | +This creates a `.vsix` file in `examples/too_many_cooks_vscode_extension/`. |
| 58 | + |
| 59 | +#### 2c. Install the extension |
| 60 | + |
| 61 | +```bash |
| 62 | +code --install-extension examples/too_many_cooks_vscode_extension/*.vsix |
| 63 | +``` |
| 64 | + |
| 65 | +Or use the full build script that does steps 2a-2b: |
| 66 | +```bash |
| 67 | +bash examples/too_many_cooks_vscode_extension/build.sh |
| 68 | +``` |
| 69 | + |
| 70 | +### Step 3: Configure Claude Code for this project |
| 71 | + |
| 72 | +The project's `.claude/settings.local.json` already has the required permissions: |
| 73 | +- `Bash(dart pub get:*)` — dependency installation |
| 74 | +- `mcp__too-many-cooks__register` — MCP agent registration |
| 75 | +- `Bash(docker ps:*)` — Docker status checks |
| 76 | + |
| 77 | +Custom skills are in `.claude/skills/` — run `/help` to see them. |
| 78 | + |
| 79 | +### Multi-Agent Usage |
| 80 | + |
| 81 | +After setup, agents coordinate via the Too Many Cooks MCP server: |
| 82 | +- **Lock files** before editing, unlock after |
| 83 | +- **Check messages** regularly between agents |
| 84 | +- **Update plans** so other agents can see your intent |
| 85 | +- Keep your agent key — it's critical for authentication |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## Playwright Setup |
| 90 | + |
| 91 | +Sets up Playwright with Chromium for running the website's E2E test suite. |
| 92 | + |
| 93 | +### Steps |
| 94 | + |
| 95 | +1. **Install website npm dependencies** (includes `@playwright/test`): |
| 96 | + ```bash |
| 97 | + cd website && npm ci |
| 98 | + ``` |
| 99 | + |
| 100 | +2. **Install Chromium browser and OS dependencies**: |
| 101 | + ```bash |
| 102 | + cd website && npx playwright install --with-deps chromium |
| 103 | + ``` |
| 104 | + This installs the Chromium binary plus required system libraries (libgbm, libasound, etc.). |
| 105 | + |
| 106 | +3. **Verify installation**: |
| 107 | + ```bash |
| 108 | + cd website && npx playwright --version |
| 109 | + ``` |
| 110 | + |
| 111 | +### Notes |
| 112 | + |
| 113 | +- Only Chromium is needed — this project does not test against Firefox or WebKit. |
| 114 | +- On the Dev Container (Ubuntu 24.04), `--with-deps` installs the OS packages automatically. |
| 115 | +- On macOS, Playwright downloads its own Chromium binary — no Homebrew needed. |
| 116 | +- Browser cache lives at `~/.cache/ms-playwright/`. Delete this to force a clean reinstall. |
| 117 | +- The website tests are at `website/tests/` and configured in `website/playwright.config.js`. |
| 118 | +- Base URL: `http://localhost:8080` (Eleventy dev server). |
| 119 | + |
| 120 | +### After installing |
| 121 | + |
| 122 | +Run the website tests: |
| 123 | +```bash |
| 124 | +cd website && npm test |
| 125 | +``` |
| 126 | + |
| 127 | +Or with UI mode: |
| 128 | +```bash |
| 129 | +cd website && npm run test:ui |
| 130 | +``` |
0 commit comments