agent-orchestrator
AGENTS.md13k starsChanged 2 months agoApache-2.0View on GitHub
Operational guidance for coding agents working in this repository. Keep changes small, match the current rewrite architecture, and prefer the documented daemon/API boundaries over behavior from the old TypeScript implementation. From the repo root unless noted: Backend-specific checks: Frontend-specific checks: When showing or demoing frontend changes, run ao preview [url] from inside the session so the change renders in the desktop browser panel (the inspector rail's Browser tab); do not just describe it. For visual verification that needs the real…
1 other project uses a version of this.
Trending
More talk lately.thin dataabout the whole repository
Most recently taken up by
- Untrivial-ai/agent-orchestratorword for word, first seen Sep 16, 2026
Who's talking about OrchestratorInc/agent-orchestrator
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
Other versions1 project uses a version of this.
Word for word · 1
- Untrivial-ai/agent-orchestrator★ 13k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
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,773 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 repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ao-desktop-devSkill
- bug-triageSkill
- pr-descriptionSkill
- ao-desktop-devSkill
- bug-triageSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
20 rules. About 1 is common, 9 are distinctive, and 10 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
When showing or demoing frontend changes, run ao preview [url] from inside the session so the change renders in the desktop browser panel …
- Distinctive: line 88
Exactly one publisher: Only the designated release conductor runs a real publish, on any channel.
- Distinctive: line 94
Keep every change surgical and directly tied to the task.
- Distinctive: line 95
Follow existing Go package boundaries.
- Very specific: line 96
Keep Cobra commands in the relevant command file and table-test them in the style of backend/internal/cli/*_test.go.
- Very specific: line 100
Use context.Context as the first argument for functions that do I/O or blocking work.
- Distinctive: line 101
Do not add abstractions for one-off use cases.
- Very specific: line 109
Do not store derived/display session status.
- Distinctive: line 110
Do not treat failed/unknown runtime probes as proof a session is dead.
- Distinctive: line 111
Do not force-delete dirty registered worktrees.
- Distinctive: line 112
Do not modify already-merged SQLite migrations.
- Very specific: line 113
Do not hand-edit backend/internal/storage/sqlite/gen/*.
- Very specific: line 115
Keep generated OpenAPI/API DTO drift in mind: controller response shapes live in backend/internal/httpd/controllers/dto.go and tests may …
- Very specific: line 116
Do not add network calls to tests unless the package already has an integration/e2e pattern for them.
- Common: line 117
Do not commit local run state, daemon data, temporary worktrees, build outputs, or credentials.
- Very specific: line 148
Commit openapi.yaml and frontend/src/api/schema.ts together with the Go changes.
- Very specific: line 152
When creating or updating a PR, follow .agents/skills/pr-description/SKILL.md so the published description starts with verified category …
- Distinctive: line 157
Keep one issue per PR. If asked for separate work, create a separate branch and PR.
- Very specific: line 158
Use conventional commit messages (feat:, fix:, docs:, test:, chore:).
- Distinctive: line 160
Run the narrowest relevant tests first, then the repo/CI commands that match the touched area.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Operational guidance for coding agents working in this repository. Keep changes small, match the current rewrite architecture, and prefer the documented daemon/API boundaries over behavior from the old TypeScript implementation.
Repo layout
backend/: Go rewrite of Agent Orchestrator with the CobraaoCLI, loopback HTTP daemon, services, SQLite storage, lifecycle/reaper, runtime/workspace/agent/tracker adapters, terminal mux, and tests.frontend/: Electron + React supervisor wired to the daemon through the generated typed client. Treat it as a thin supervisor/UI surface; do not move daemon logic into it.docs/: Current architecture and status notes. Start here before changing lifecycle, CLI, agents, storage, or daemon behavior.test/: External smoke/e2e assets, including the CLI fresh-install container check..github/workflows/: CI definitions. Mirror these commands locally when possible.
Commands
From the repo root unless noted:
npm run lint # backend go test ./... + golangci-lint v2.13.2
npm run frontend:typecheck # frontend TypeScript check
npm run sqlc # regenerate backend/internal/storage/sqlite/gen from queries/schema
npm run api # regenerate OpenAPI spec + frontend TS types (see API contract changes below)
npx @redwoodjs/agent-ci run --all # local workflow validation; requires Docker socketBackend-specific checks:
cd backend
go build ./...
go test ./...
go test -race ./...
go vet ./...
go run ./cmd/ao startFrontend-specific checks:
cd frontend
npm run typecheck
npm run buildWhen showing or demoing frontend changes, run ao preview [url] from inside the session so the change renders in the desktop browser panel (the inspector rail's Browser tab); do not just describe it.
Desktop lab (running the real Electron app for UI review)
For visual verification that needs the real app rather than ao preview or dev:web, run the checkout in an isolated worktree against scratch data. Never use the invoking working tree (it may hold unrelated uncommitted work) and never touch the user's real ~/.ao data.
git worktree add /tmp/ao-lab <branch> # the PR branch under review
cd /tmp/ao-lab/frontend
npm ci # never symlink node_modules from another checkout (see below)
npm run build:daemon -- --dev
AO_DATA_DIR=/tmp/ao-lab-data ./node_modules/.bin/electron-forge start- Run a real
npm ci. Symlinking another checkout'snode_modulesmakes React resolve from two physical paths and shares the Vite optimizer cache across checkouts: the symptom is a black window withInvalid hook call/useSyncExternalStoreerrors in the renderer console. It also writes.vite/depsoutput into the other checkout's tree. - Isolate data with
AO_DATA_DIR. The lab starts with an empty board; create throwaway sessions inside it to exercise list/detail flows. The ElectronuserDatadir already defaults to a dev path, not the production one. - Diagnose with
ELECTRON_ENABLE_LOGGING=1. Renderer console errors (the cause of most blank windows) land in the launcher's stdout. - Killing the forge wrapper is not enough. The Electron main process cmdline is just
Electron ., sopkill -f electron-forgeleaves the app running and the next launch exits silently. Kill theElectron.app/.../MacOS/Electronmain process explicitly before relaunching. - A missing-dependency warning for a lazily imported module (for example
mermaid, which is dynamically imported on first use) does not blank the window; treat it as informational.
Where to look first
README.md: Current run/config/test quickstart.docs/README.md: Docs index.docs/documentation-map.md: Which artifacts are the machine-readable contract layer (openapi.yaml,AGENTS.md,skills/, sqlcgen/), what each is source of truth for, and how CI keeps them from drifting.docs/architecture.md: Backend mental model, package layout, lifecycle/session/service boundaries, and load-bearing rules.docs/STATUS.md: What is shipped onmaintoday and what is still in flight.docs/cli/README.md: Intended CLI shape, a thin Cobra client over daemon HTTP with no direct storage/runtime access.CLAUDE.md: Compatibility pointer for Claude Code. It directs agents back toAGENTS.md.
For code entry points:
- CLI commands:
backend/internal/cli/*.go; follow nearby command/test patterns before adding a new style. - HTTP controllers and DTOs:
backend/internal/httpd/controllers/. - Service read/write boundaries:
backend/internal/service/. - Domain vocabulary:
backend/internal/domain/. - Port contracts:
backend/internal/ports/. - SQLite queries/migrations/store:
backend/internal/storage/sqlite/. - Generated sqlc code:
backend/internal/storage/sqlite/gen/.
Distribution
- The desktop app (GitHub Releases) is the canonical, auto-updating install path. Point users there first.
- npm still works but is no longer recommended.
0.10.0is the final version published to npm; the@aoagents/aopackage is frozen and will not receive further updates. It remains a legacy on-ramp for users who already haveaoon their PATH, whereao startfetches and opens the desktop build. Do not add features, docs, or flows that treat npm as the intended way to install AO. - Exactly one publisher. Only the designated release conductor runs a real publish, on any channel. Divergent artifacts from multiple publishers made the 28-29 Jul macOS incident unreadable. Use the fork dev loop for test builds. Full rule and rationale:
frontend/docs/desktop-release.md, "Hard rule: exactly one publisher". - Verify macOS artifacts with
frontend/scripts/verify-mac-artifact.sh, never by hand. It extracts withditto -x -kand runscodesign --verify --deep --strict,spctl -a -vv -t exec,xcrun stapler validate. Plainunzipbreaks the seal and yields a convincing false failure;spctlwithout-vvprints nothing at all on success. - macOS ships both a
.zipand a.dmg. The dmg is first install only. The zip andlatest-mac.ymlmust keep publishing forever: electron-updater cannot install an update from a dmg. macOS differential updates are permanently disabled (full download only); see issues #3151 and #3267.
Coding conventions
- Keep every change surgical and directly tied to the task. Avoid drive-by cleanup, broad renames, formatting churn, speculative abstractions, and architectural refactors unless the task explicitly asks for them.
- Follow existing Go package boundaries. CLI code should call daemon HTTP routes through shared CLI client helpers; it should not open SQLite, spawn runtimes, or call adapters directly.
- Keep Cobra commands in the relevant command file and table-test them in the style of
backend/internal/cli/*_test.go. - Mirror existing response/request DTOs in the CLI instead of importing HTTP controller packages into CLI code, unless the package already establishes that dependency.
- Return usage errors as
usageErrorso CLI misuse exits 2; runtime/daemon failures should exit 1. - Preserve API error envelopes and request IDs when surfacing daemon errors.
- Use
context.Contextas the first argument for functions that do I/O or blocking work. - Do not add abstractions for one-off use cases. Add helpers only when they remove duplication across real call sites.
- Tests should cover the user-visible behavior and boundary being changed: happy path, validation/missing args, daemon error envelopes, and any destructive confirmation path.
Hard rules and boundaries
- The daemon's primary (loopback) listener stays bound to
127.0.0.1and unauthenticated. Do not change its bind host or add auth to it. - The daemon MAY run a second, opt-in LAN listener (the "Connect Mobile" feature) that binds
0.0.0.0only while explicitly enabled, only behind the bearer-passwordauthMiddleware, serving the app API but never the loopback-gated control routes (/shutdown, telemetry, mobile control). Exactly one route is exempt fromauthMiddleware:GET /api/v1/identity, which returns an opaque host id and the mobile contract version so a phone can confirm which machine answered before presenting a credential. Seedocs/adr/0003-unauthenticated-identity-probe.md. The exemption is an exact path,GETonly, and checked ahead of the lockout; any further unauthenticated route needs its own ADR. The direct LAN listener is plaintext for trusted home networks. Seedocs/adr/0001-lan-listener-for-mobile.mdandCONTEXT.mdfor the original decision. Current managed cloudflared and Tailscale TLS endpoints wrap this authenticated mobile path; they do not authorize exposing the primary listener or adding an unauthenticated route. Seefrontend/src/docs/content/configuration/remote-access.mdxfor current pairing behavior. Do not add any other network-facing bind. - The CLI is a thin client. Do not port old in-process TypeScript CLI behavior that bypasses daemon HTTP routes.
- Do not store derived/display session status. Status is derived from durable facts (
activity_state,is_terminated, PR/check/comment facts) at service read time. - Do not treat failed/unknown runtime probes as proof a session is dead.
- Do not force-delete dirty registered worktrees.
- Do not modify already-merged SQLite migrations. Add a new migration instead.
- Do not hand-edit
backend/internal/storage/sqlite/gen/*; changebackend/internal/storage/sqlite/queries/*or migrations and runnpm run sqlc. - SQLite change events come from DB triggers into
change_log; do not add parallel manual CDC emission from store methods unless the architecture changes explicitly. - Keep generated OpenAPI/API DTO drift in mind: controller response shapes live in
backend/internal/httpd/controllers/dto.goand tests may assert CLI/HTTP wire compatibility. - Do not add network calls to tests unless the package already has an integration/e2e pattern for them. Prefer
httptest, fakes, and injected dependencies. - Do not commit local run state, daemon data, temporary worktrees, build outputs, or credentials.
- All AO-owned app state lives under
~/.aoonly. The daemon's data dir,running.json, worktrees, and the Electron supervisor'suserData(Chromium cache, cookies, local/session storage, crash dumps) must resolve under~/.ao(overridable viaAO_DATA_DIR/AO_RUN_FILE). Never write to or otherwise use~/Library/Application Supportor any other OS default app-data location for AO state. The sole read exception is an explicit, user-initiated browser-profile import: it may read only validated, known source-browser profile files, must never write to the source profile, must keep source paths out of the renderer, and must place every snapshot, staging file, and imported result under~/.ao.main.tspins Electron'suserDatato~/.ao/electron; do not remove that override or rely on Electron's default path.
API contract changes
The daemon API is code-first. The OpenAPI spec and frontend TypeScript types are generated artifacts. Edit the source, then regenerate.
Source files to edit:
backend/internal/httpd/controllers/dto.go: request/response shapes.backend/internal/httpd/apispec/specgen/build.go: operation registry. Add aschemaNamesentry for any new named type.
Regenerate after editing:
npm run api # runs api:spec then api:ts in sequenceThis is equivalent to running:
npm run api:spec # cd backend && go generate ./internal/httpd/apispec/...
npm run api:ts # npx openapi-typescript@7.4.4 backend/internal/httpd/apispec/openapi.yaml -o frontend/src/api/schema.tsVerify:
cd backend && go test ./internal/httpd/... # spec drift + route/spec parity tests (does not cover schema.ts; the api-drift CI job checks it)Commit openapi.yaml and frontend/src/api/schema.ts together with the Go changes. CI will regenerate both files and fail if the committed versions are out of date. The CLI hand-mirrored DTOs remain a deliberate manual boundary and are not generated.
PR hygiene
- When creating or updating a PR, follow
.agents/skills/pr-description/SKILL.mdso the published description starts with verified category change counts. - Before creating or handing over a PR, run all CI validation jobs locally using the workflow commands, pinned runtimes, and CI environment (including complete suites, not only focused tests). Fix failures and rerun the affected full suites before sharing the PR. A local pass is not a guarantee: verify the remote checks too. If a job cannot run locally (for example, an unavailable native OS runner, Docker, or required credentials), explicitly report the exact gap and verify that job in CI; never label it locally passed. Do not execute publishing or production deployment as a validation step.
- Branch from
mainunless explicitly continuing an existing PR. - Keep one issue per PR. If asked for separate work, create a separate branch and PR.
- Use conventional commit messages (
feat:,fix:,docs:,test:,chore:). - Explain intentional omissions in the PR body, especially when the TypeScript original had more behavior than the Go rewrite domain currently supports.
- Run the narrowest relevant tests first, then the repo/CI commands that match the touched area.
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.

