ouroboros
AGENTS.md3 starsChanged 6 months agoMITView on GitHub
Ouroboros is a recursive self-improving AI agent. It is a Bun/TypeScript monorepo with a CLI agent, an Electron desktop app, and shared types. Runtime skills use the Agent Skills SKILL.md format. - packages/cli: main agent, tools, memory, JSON-RPC server, Bun tests. - packages/desktop: Electron 33 + React 19 UI, main/preload/renderer code, Playwright E2E tests, DESIGN.md visual system. - packages/shared: shared protocol/types/utilities. - skills, memory: runtime data at repo root. - docs, tickets: project docs and implementation tickets. - CLI core…
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 31,542 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 repository18 other files it gives its agents.
- agent-browserSkill
- ai-sdkSkill
- electron-scaffoldSkill
- electronSkill
- grill-meSkill
- ou-features-auditSkill
- ou-full-code-reviewSkill
- ouroboros-intent-e2eSkill
- ouroboros-test-plan-authorSkill
- prd-to-ticketsSkill
- team-implement-ticketsSkill
- ai-sdkSkill
- grill-meSkill
- meta-thinkingSkill
- ou-full-code-reviewSkill
- prd-to-ticketsSkill
- refactor-agents-mdSkill
- team-implement-ticketsSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Use Bun and TypeScript. Each package has its own tsconfig.json extending the root config.
- Distinctive: line 43
Use Zod for runtime validation and composition over inheritance.
- Very specific: line 46
Keep the OS sandbox enabled by default and never remove skills/, memory/, or .ouroboros from the built-in denyWrite policy.
- Distinctive: line 68
Every new feature or behavioral enhancement must ship with both unit tests for its logic and integration regression tests for the affected …
- Very specific: line 85
After implementation, run bun run verify from the repo root before reporting completion.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
OUROBOROS - Development Instructions
Ouroboros is a recursive self-improving AI agent. It is a Bun/TypeScript
monorepo with a CLI agent, an Electron desktop app, and shared types. Runtime
skills use the Agent Skills SKILL.md format.
Structure
packages/cli: main agent, tools, memory, JSON-RPC server, Bun tests.packages/desktop: Electron 33 + React 19 UI, main/preload/renderer code, Playwright E2E tests,DESIGN.mdvisual system.packages/shared: shared protocol/types/utilities.skills,memory: runtime data at repo root.docs,tickets: project docs and implementation tickets.
Architecture
- CLI core loop follows ReAct: plan, act with tools, observe, iterate.
- CLI tools live in
packages/cli/src/tools/; each exportsname,description, Zodschema, and asyncexecute. Tool execution returnsResult<T, Error>and should not throw. - Memory has durable, checkpoint, working, transcript, and evolution-log state.
- Tier-0/1
bashandcode-execchildren run under an OS sandbox by default (Seatbelt on macOS, bubblewrap on Linux via@anthropic-ai/sandbox-runtime). The facade and policy live inpackages/cli/src/safety/;denyWriteonskills/,memory/, and.ouroboroskernel-enforces the tier-3 self-modification gate. Sandbox violations immediately request tier-4 human approval for an unsandboxed re-run (sandbox.escalateOnViolation, default true); the model can also escalate explicitly viabypassSandbox: true, which resolves to tier 4. - JSON-RPC mode (
--json-rpc) is a long-running NDJSON server over stdio. - Desktop is a presentation layer. It spawns the CLI with
--json-rpc; renderer calls typed preload APIs and must not access Node directly. - Protocol types in
packages/desktop/src/shared/protocol.tsare the desktop IPC source of truth; update contract tests when changing RPC shapes. AGENTS.mdis loaded from cwd ancestors, root first..ouroborosis runtime configuration only, not behavioral prose.
Conventions
- Use Bun and TypeScript. Each package has its own
tsconfig.jsonextending the root config. - Use Zod for runtime validation and composition over inheritance.
- CLI self-modification requires human approval. Keep the 5-tier permission model intact.
- Keep the OS sandbox enabled by default and never remove
skills/,memory/, or.ouroborosfrom the built-indenyWritepolicy; sandbox wrapping happens inside toolexecute()after registry tier enforcement so it adds no new approval prompts. - Desktop renderer: context isolation enabled, Node integration disabled, all IPC through typed preload APIs.
- Desktop styling: use CSS variables from
packages/desktop/DESIGN.md; avoid hardcoded colors. Components use inline styles or CSS files, not CSS-in-JS runtimes. - Shared types are imported as
@ouroboros/shared.
Commands
- Root:
bun install,bun run verify,bun run lint,bun run ts-check. - CLI:
cd packages/cli && bun test,bun run build,bun run ts-check. - Desktop:
cd packages/desktop && bun run dev,bun run build:vite,bun run ts-check,bun run test:e2e. - Workspace examples:
bun run --filter @ouroboros/cli test,bun run --filter @ouroboros/desktop dev.
Testing Policy
Every new feature or behavioral enhancement must ship with both unit tests
for its logic and integration regression tests for the affected public path
(for example, agent/tool wiring, JSON-RPC, CLI subprocess, or Electron UI). The
integration test must exercise real components across that boundary; mock only
external services or nondeterministic dependencies. Both layers must run in
bun run verify, except for the benchmark-only verification path below. A
change without either layer is incomplete.
Bug fixes need a regression test that fails before the fix and passes after it; add both layers when the bug spans component boundaries. Before implementation, identify the unit and integration tests to add. Read and update the relevant coverage row in docs/test-plan.md for test locations, protocol obligations, and examples. Keep detailed test guidance there rather than expanding this root file.
Verification
After implementation, run bun run verify from the repo root before reporting
completion. It runs lint, type checks, CLI tests, and desktop E2E. If any step
fails, fix the issue and rerun. Live LLM tests are manual only:
bun run test:cli:live.
For changes confined to benchmarks/, skip the desktop E2E suite. Run the
benchmark's own applicable tests, then run bun run lint, bun run ts-check,
and bun run test:cli from the repo root instead of bun run verify. This
exception does not apply when the change also touches packages/desktop or a
shared contract used by the desktop app.
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.

