agentgrid
AGENTS.md9 starsChanged 6 months agoMITView on GitHub
How AI coding agents (and the humans steering them) should work inside this repo. This is the agent-native operating contract for agentgrid itself. Co-evolve it over time. agentgrid is two products in one repo plus a self-improving harness: Use the right one; sub-agents research and review, the parent implements. CLI (the pub
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,691 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository31 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- agentgrid-orchestrateSkill
- agentgrid-sessionsSkill
- agentgridSkill
- agent-runtimeSkill
- frontend-designSkill
- architectSkill
- deep-thinkSkill
- design-systemsSkill
- ecosystem-referenceSkill
- fractal-delegationSkill
- harness-reviewSkill
- heartbeatSkill
- integrate-resourcesSkill
- llm-council-critiqueSkill
- loop-createSkill
- mcp-setupSkill
- memory-compressionSkill
- memorySkill
- model-routingSkill
- oss-project-scaffoldSkill
- playwright-cliSkill
- repo-scoutSkill
- self-improveSkill
- skill-creatorSkill
- skill-routingSkill
- sprintSkill
- test-visualSkill
- troubleshootSkill
- ux-auditSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Use the right one; sub-agents research and review, the parent implements.
- Very specific: line 89
No bespoke focus-stealing: never tmux select-pane in code or scripts — it steals the user's focus.
- Very specific: line 108
Every command has a --help.
- Distinctive: line 110
Test as a user before claiming done — for the app, that means launching it, not just compiling.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.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
AGENTS.md — agentgrid Agent-Orchestration Conventions
How AI coding agents (and the humans steering them) should work inside this repo. This is the agent-native operating contract for agentgrid itself. Co-evolve it over time.
agentgrid is two products in one repo plus a self-improving harness:
- a TypeScript CLI (
src/→dist/index.js) that spawns a grid of AI coding agents, one per tmux pane; - a desktop app (
app/, Electron + electron-vite + React) — a visual mission-control for those grids; - a harness (
.claude/,identity/,memory/,brain/) so a coding agent can improve agentgrid using agentgrid's own conventions.
Directory map (what lives where)
src/ # The CLI — TypeScript, compiled by tsc to dist/
index.ts # commander entry point (the `agentgrid` binary)
commands/ # one file per command group: grid, panes, send, broadcast,
# status, dashboard, monitor, presets, sessions, sound,
# harness, harness-gen, agents, init, misc
lib/ # shared helpers: tmux.ts, config.ts, constants.ts,
# agents.ts (agent detection), sound.ts
mcp-server.ts # exposes agentgrid as an MCP tool for external orchestration
__tests__/ # vitest unit tests (build-gating)
agentgrid # bash launcher / bin shim invoked by `npx agentgrid`
pane-status.sh # the hook callback agents invoke to set @pane_status
install.sh # one-command installer (tmux + hooks + sounds)
app/ # Electron desktop app — SEPARATE pnpm workspace
src/main/ # Electron main process: grid-manager, terminal-manager,
# tmux-helper, signal-watcher, council, task-router, …
src/renderer/ # React UI (xterm.js terminals, GridView, DashboardView, …)
src/preload/ # contextBridge IPC bridge
src/shared/ # types + pricing shared main↔renderer
packages/shared/ # IPCChannels contract (src/types.ts) — IPC source of truth
harnesses/ # app-bundled harness YAMLs
tests/unit/ # vitest unit tests
tests/e2e/ # Playwright end-to-end tests against the packaged app
harnesses/ # CLI-bundled harness definitions (YAML: roles, grid, skills, eval)
presets/ # built-in grid presets (JSON)
examples/ # runnable example scripts (dev-sprint.sh, earning-fleet.sh)
eval/ # smoke.sh — CLI regression eval (the immune system)
docs/ # all reference + architecture + launch docs (see brain MOC)
Formula/, homebrew/ # Homebrew tap formula
identity/ # harness identity: SOUL / MEMORY / BRAND / HEARTBEAT
memory/ # harness long-term memory (MEMORY, LEARNINGS, daily, topics)
brain/ # the company-brain knowledge graph (MOC + ORG_CONTEXT/MEMORY)
.claude/ # inherited harness: rules/, skills/, hooks/, agents/ (subagents)Sub-agents available in this repo (.claude/agents/)
Use the right one; sub-agents research and review, the parent implements.
| Sub-agent | Use it for |
architect | grid/IPC/topology design trade-offs before coding |
code-reviewer | reviewing a diff before commit |
test-writer | generating vitest/Playwright cases for a new command |
security-reviewer | auditing tmux command construction / IPC / hook scripts |
performance-analyzer | terminal-throughput / render perf in the app |
research-agent | scouting prior art (e.g. the collaborator analysis) |
loop-auditor | auditing long-running monitor/dashboard loops |
Build, test, run (must stay green)
CLI (the published package):
pnpm install
pnpm build # tsc → dist/index.js
pnpm test # vitest, scoped to src/
node dist/index.js --version && node dist/index.js --help # smoke
bash eval/smoke.sh # regression evalDesktop app (separate workspace, native node-pty):
pnpm --dir app install # builds node-pty via its own postinstall
pnpm --dir app test # vitest unit tests
pnpm --dir app dev # run the app locally (electron-vite)
# Playwright e2e: cd app && pnpm exec playwright testWorking conventions
- Spotify-queue rule: a follow-up bug discovered while editing a surface goes back to the worker that owns that surface (CLI command files vs app main/renderer modules), not a cold broadcast.
- Test before signal:
pnpm build+pnpm testmust pass before a change is "done". The app has its own gate (pnpm --dir app test). - One source of truth: IPC channels are defined once in
app/packages/shared/src/types.ts(IPCChannels) — never redeclare them. Agent list lives insrc/lib/agents.ts+src/lib/constants.ts. - No bespoke focus-stealing: never
tmux select-panein code or scripts — it steals the user's focus. - Cross-repo hygiene (public repo): no
/Users/...paths, no internal project names, no personal data in committed docs.
Commit grammar
Conventional commits, scoped to the surface touched:
feat(cli): …·fix(cli): …— theagentgridcommand (src/)feat(app): …·fix(app): …— the Electron desktop app (app/)feat(harness): …— a bundled harness YAML (harnesses/orapp/harnesses/)feat(preset): …— a built-in preset (presets/)docs: …— documentation / brain graphtest: …·chore: …·refactor: …
This keeps history snap-back-able at three granularities: a single skill/preset, a feature, or the whole repo.
Quality bar
- Strict TypeScript (no
any, named exports, files < 400 lines). - Every command has a
--help; every command group has at least one test. - Status colors are part of the UX contract: ⚡ WORKING (blue) · ⏳ WAITING (yellow) · ✅ DONE (green).
- Test as a user before claiming done — for the app, that means launching it, not just compiling.
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.

