Army-of-Agents
AGENTS.md9 starsChanged 2 months agoMITView on GitHub
Guidance for human and AI contributors working in this repository. AoA (Army of Agents) is a Hybrid Workforce Operating System for startups — founding teams of any size, from solo founders to multi-person teams, running AI agents alongside humans from a single control room. The current product line is version 1. Before making changes, read in this order: Key doc paths: - docs/architecture/decisions.md — locked decisions (90+) - docs/architecture/ — design system, memory, wire-compat, workspace decisions - docs/api/ — REST…
- Deletes or force-pushes
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,117 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 repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- design-guideSkill
- aoa-create-agentSkill
- aoaSkill
- create-agent-adapterSkill
- para-memory-filesSkill
- release-changelogSkill
- releaseSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Before making changes, read in this order:
- Very specific: line 36
Use the embedded PostgreSQL instance in dev by leaving DATABASE_URL unset.
- Distinctive: line 66
Every domain entity must be scoped to a company.
- Distinctive: line 69
If you change schema or API behavior, update all impacted layers:
- Distinctive: line 93
When changing the data model:
- Very specific: line 96
Ensure new tables are exported from packages/db/src/schema/index.ts
- Distinctive: line 121
Commit the manifest and the regenerated lockfile together, on any branch — no special branch name required.
- Very specific: line 155
If two open PRs both add deps, the second to merge hits a pnpm-lock.yaml conflict when it rebases onto the updated base.
- Distinctive: line 170
Run this full check before claiming done:
- Distinctive: line 178
If anything cannot be run, explicitly report what was not run and why.
- Distinctive: line 196
Write activity log entries for mutations
- Distinctive: line 201
Keep routes and nav aligned with available API surface
- Distinctive: line 202
Use company selection context for company-scoped pages
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
Guidance for human and AI contributors working in this repository.
1. Purpose
AoA (Army of Agents) is a Hybrid Workforce Operating System for startups — founding teams of any size, from solo founders to multi-person teams, running AI agents alongside humans from a single control room. The current product line is version 1.
2. Read This First
Before making changes, read in this order:
CLAUDE.md— architecture baseline, critical rules, naming map, all implemented tablesdocs/architecture/decisions.md— 90+ locked product and architectural decisions. Do not relitigate.docs/roadmap.md— planned features (NOT current behavior);CLAUDE.mdis the source of truth for what shipped
3. Repo Map
server/src/ → Express 5.x REST API, services, adapters, heartbeat
ui/src/ → React + Vite board UI
packages/db/ → Drizzle schema, migrations, DB clients
packages/shared/ → Shared types, constants, validators, API path constants
packages/adapters/ → Adapter utilities
docs/ → All documentationKey doc paths:
docs/architecture/decisions.md— locked decisions (90+)docs/architecture/— design system, memory, wire-compat, workspace decisionsdocs/api/— REST + MCP API contractsdocs/archive/— historical session logs, plans, and audits
4. Dev Setup (Auto DB)
Use the embedded PostgreSQL instance in dev by leaving DATABASE_URL unset. AoA
bundles a real Postgres binary via embedded-postgres
— not WASM-based PGlite.
pnpm install
pnpm devThis starts:
- API + UI:
http://localhost:3100
Quick checks:
curl http://localhost:3100/api/health
curl http://localhost:3100/api/companiesReset local dev DB (default instance):
rm -rf ~/.aoa/instances/default/db
pnpm dev5. Core Engineering Rules
- Keep changes company-scoped. Every domain entity must be scoped to a company. Enforce company boundaries in routes and services.
- Keep contracts synchronized.
If you change schema or API behavior, update all impacted layers:
packages/db— schema and exportspackages/shared— types, constants, validatorsserver— routes and servicesui— API clients and pages
- Preserve control-plane invariants.
- Single-assignee task model
- Atomic issue checkout semantics (
SELECT FOR UPDATE NO WAIT) - Approval gates for governed actions
- Budget hard-stop auto-pause behavior
- Activity logging for all mutating actions
- Naming map — UI says Task/Home/Budget/Team/Discussion, DB/API stay unchanged.
See
CLAUDE.md§Naming Map for the full table. Never rename DB tables or API routes. - MCP inbound follows revised Decision #14. Authenticated MCP, board, and agent callers may create or update structured tasks directly when RBAC allows it. Use
debrief-pushfor unstructured content that should enter the Discussion extraction pipeline. Anonymous MCP traffic is rejected outsidelocal_trusted; loopbacklocal_trustedtraffic is treated as trusted board/agent context, not public anonymous input. - Drizzle ORM only. Schema changes go in
packages/db/src/schema/. Runpnpm db:generate. Never write raw SQL migration files. (Decision #19) Narrow exception: drizzle-kit cannot emit (a) idempotency guards (IF NOT EXISTS/DO $$ … duplicate_object, per C14) or (b) data-only backfills; a few migrations (e.g.0189,0195) hand-APPEND these after generation, always with an inline comment and always idempotent (WHERE … IS NULL/ON CONFLICT DO NOTHING). This covers ONLY idempotency guards and data backfills — schema DDL is never hand-authored. Concretely, 0195 was produced bypnpm db:generate, then the C14 idempotency guards on its constraint swap plus the data backfills (UPDATE/INSERT … ON CONFLICT DO NOTHING) were hand-appended below the generated DDL. - New services follow
server/src/services/goals.ts. New routes followserver/src/routes/goals.ts.
6. Database Change Workflow
When changing the data model:
- Edit
packages/db/src/schema/*.ts - Ensure new tables are exported from
packages/db/src/schema/index.ts - Generate migration:
pnpm db:generate- Validate compile:
pnpm -r typecheckNotes:
packages/db/drizzle.config.tsreads compiled schema fromdist/schema/*.jspnpm db:generatecompilespackages/dbfirst
7. Dependency Change Workflow
Adding, upgrading, or removing a dependency needs care because CI blocks any PR that commits pnpm-lock.yaml on its own. The gate is the Block manual lockfile edits step in the policy job of .github/workflows/pr.yml: it fails a PR that changes pnpm-lock.yaml unless the same PR also changes a package manifest (package.json, pnpm-workspace.yaml, .npmrc, or a pnpmfile). Lockfile-only commits are rejected; lockfile + manifest together is allowed.
Retired 2026-06-24: the old
chore/refresh-lockfilebranch-name escape hatch and therefresh-lockfile.ymlauto-bot were removed. The bot watched the now-deadPorting1.1branch, and the branch-name carve-out was a policy bypass — any PR could use that exact name to slip a lockfile-only change past the gate. Re-introducing an auto-refresh bot pointed atmainis a Phase 2 follow-up. Until then, refresh the lockfile inline (below).
Standard flow: change a dependency
Commit the manifest and the regenerated lockfile together, on any branch — no special branch name required.
# 1. Edit the relevant package.json (root, server/, ui/, packages/*/).
# Add / upgrade / remove deps as needed.
# 2. Regenerate the lockfile.
pnpm install --no-frozen-lockfile
# 3. Verify it's in sync — should be a no-op.
pnpm install --frozen-lockfile
# 4. Commit BOTH the manifest change(s) and pnpm-lock.yaml in the same PR.
git add package.json '**/package.json' pnpm-lock.yaml
git commit -m "chore(deps): <description>"
# 5. Open the PR. The policy gate accepts the lockfile because a manifest
# changed; the "Validate dependency resolution when manifests change"
# step re-runs `pnpm install --lockfile-only --no-frozen-lockfile` to
# confirm the lockfile is internally consistent.The gate's logic lives in the Block manual lockfile edits step of the policy job in .github/workflows/pr.yml. The manifest match is:
(^|/)package\.json$|^pnpm-workspace\.yaml$|^\.npmrc$|^pnpmfile\.(cjs|js|mjs)$.
Lockfile-only refresh (no manifest change)
A pure lockfile refresh (e.g. transitive-dependency drift with no manifest edit) is blocked by the gate and currently has no automated path — the auto-bot was retired (see the note above). Options:
- Pair the refresh with a real manifest change. This is the common case: you are usually refreshing because you changed a dependency.
- Otherwise, fold it into the next dependency-changing PR.
Two dependency PRs racing
If two open PRs both add deps, the second to merge hits a pnpm-lock.yaml conflict when it rebases onto the updated base. Resolve by regenerating, not by hand-merging the lockfile:
git rebase origin/main
# take the base lockfile, then regenerate it against your manifests
git checkout origin/main -- pnpm-lock.yaml
pnpm install --no-frozen-lockfile
git add pnpm-lock.yaml
git rebase --continueThe verify job uses --frozen-lockfile, so the regenerated lockfile must be in sync before you push.
8. Verification Before Hand-off
Run this full check before claiming done:
pnpm -r typecheck
pnpm test:run
pnpm buildIf anything cannot be run, explicitly report what was not run and why.
Docs-only PRs (every changed file under
docs/or a root-level*.mdlike README/CLAUDE/AGENTS) skip the heavy CI suite and pass via theci-requiredaggregator in ~1 min. Any.github/**file, any nested*.md(e.g. runtime prompt assets underserver/src/onboarding-assets/), or other code path runs the full suite.
9. API and Auth Expectations
- Base path:
/api - Board access is treated as full-control operator context
- Agent access uses bearer API keys (
agent_api_keys), hashed at rest - Agent keys must not access other companies
When adding endpoints:
- Apply company access checks
- Enforce actor permissions (board vs agent)
- Write activity log entries for mutations
- Return consistent HTTP errors (
400/401/403/404/409/422/500)
10. UI Expectations
- Keep routes and nav aligned with available API surface
- Use company selection context for company-scoped pages
- Surface failures clearly; do not silently ignore API errors
11. Definition of Done
A change is done when all are true:
- Behavior matches
CLAUDE.mdand relevant current product and architecture docs - Typecheck, tests, and build pass
- Contracts are synced across db/shared/server/ui
- Docs updated when behavior or commands change
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.

