gastown-gui
CLAUDE.md92 starsChanged 3 months agoMITView on GitHub
Web GUI for steveyegge/gastown multi-agent orchestrator. Update before PR: If you added/deleted/moved files, update CODEBASE_DOCUMENTATION.md. Browser SPA (vanilla JS, no framework) backed by an Express server that wraps gt/bd CLI commands as HTTP endpoints. WebSocket streams real-time events from gt feed. Published to npm as gastown-gui.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
CLI safety: All commands use execFile (no shell) + SafeSegment input validation
- Very specific: line 28
No god files/classes: Do not keep adding logic to large files (especially server.js).
- Distinctive: line 30
Refactor when touching: If a change makes a file larger or more complex, extract helpers into dedicated files in the same PR.
- Very specific: line 57
Port 7667: Default port via GASTOWN_PORT env var.
- Very specific: line 61
Mock server must match real server: When adding/changing endpoints, update both server.js (or routes) AND test/mock-server.js.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md - Gas Town GUI
Web GUI for steveyegge/gastown multi-agent orchestrator.
READ THESE ENTIRE DOCUMENTS BEFORE DOING ANYTHING
- Read
CODEBASE_DOCUMENTATION.mdNOW — Complete file inventory. Do NOT grep blindly for files. Read this first so you know where everything lives. - Read
CLI-COMPATIBILITY.md— Which gt/bd commands work, which are broken/remapped. Critical if touching any CLI calls.
Update before PR: If you added/deleted/moved files, update CODEBASE_DOCUMENTATION.md.
Overview
Browser SPA (vanilla JS, no framework) backed by an Express server that wraps gt/bd CLI commands as HTTP endpoints. WebSocket streams real-time events from gt feed. Published to npm as gastown-gui.
Architecture
- Entry:
server.js— monolith Express server, partially refactored intoserver/modules - Refactored path: Gateway → Service → Route (see
server/gateways/,server/services/,server/routes/) - Legacy endpoints: Mail, agents, nudge, polecat control, service controls still inline in
server.js - CLI safety: All commands use
execFile(no shell) +SafeSegmentinput validation - Frontend: Vanilla JS in
js/, components render via innerHTML, global state injs/state.js - Real-time: WebSocket client in
js/api.js, server pipesgt feed --jsonoutput - CLI entry:
bin/cli.js— supportsstart,doctor,version,help
File Size Discipline
- No god files/classes: Do not keep adding logic to large files (especially
server.js). - Extract by responsibility: New backend logic should be placed in focused modules under
server/(services/gateways/routes/infrastructure) and imported intoserver.js. - Refactor when touching: If a change makes a file larger or more complex, extract helpers into dedicated files in the same PR.
Commands
npm start # Start server (port 7667)
npm run dev # Dev mode with auto-reload
npm test # All tests (unit + integration + e2e)
npm run test:unit # Unit tests only
npm run test:e2e # E2E tests only (needs Puppeteer)
npm run test:watch # Watch mode
npm run test:ui # Vitest UITesting
- Vitest for unit + integration, Puppeteer for E2E
- Unit tests use dependency injection (mock gateways/services)
- Route tests use real Express app with mocked services
- Integration tests hit
test/mock-server.js(mimics gt CLI responses) - E2E tests start real server + Chromium browser
npm testruns everything viaprepublishOnlybefore npm publish
Gotchas
- Witness/refinery need rig: Service start/stop/restart for
witnessandrefineryrequire arigparameter in the request body. Mayor/deacon do not. Server returns 400 if missing. - CLI renames: Several gt/bd commands were renamed upstream. See
CLI-COMPATIBILITY.mdfor the full mapping. Key ones:formula use→formula run --rig,bd done→bd close,bd park→bd defer. - Port 7667: Default port via
GASTOWN_PORTenv var. The CLI (bin/cli.js) also accepts--port. - No build step: Frontend is vanilla JS served as static files. No bundler, no transpiler.
- server.js is partially refactored: Some endpoints moved to
server/routes/, others still inline (~1700 lines). Don't duplicate — check both before adding endpoints. - SafeSegment rejects metacharacters: Any rig/agent name with shell-special chars will be rejected. This is intentional security.
- Mock server must match real server: When adding/changing endpoints, update both
server.js(or routes) ANDtest/mock-server.js.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

