OmoiOS
AGENTS.md79 starsChanged 10 months agoApache-2.0View on GitHub
This document helps AI coding agents (Claude Code, Cursor, Copilot Workspace, Windsurf, etc.) understand and contribute to OmoiOS efficiently. OmoiOS is a spec-driven, multi-agent orchestration system. Users describe a feature, OmoiOS plans it (requirements → design → tasks), executes it with autonomous AI agents in isolated sandboxes, and creates a PR. The core promise: "Start a feature before bed. Wake up to a PR." Production: Frontend at https://omoios.dev, API at https://api.omoios.dev These rules prevent common mistakes. Violating them causes build…
- Reads credentials
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 repository31 other files it gives its agents.
- backend/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/oip-proposal/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- frontend/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- .cursor/rules/development.mdcCursor rule
- browser-useSkill
- agent-browserSkill
- billing-automationSkill
- canvas-designSkill
- claude-agent-sdk-pythonSkill
- doc-expanderSkill
- docxSkill
- frontend-designSkill
- internal-commsSkill
- litho-budgeted-analysisSkill
- mcp-builderSkill
- oip-proposalSkill
- paypal-integrationSkill
- pci-complianceSkill
- pdfSkill
- pptxSkill
- skill-creatorSkill
- spec-driven-devSkill
- stripe-integrationSkill
- template-skillSkill
- theme-factorySkill
- webapp-testingSkill
- web-artifacts-builderSkill
- xlsxSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
15 rules. About 0 are common, 0 are distinctive, and 15 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 75
Always use
omoi_os.utils.datetime.utc_now(): instead of datetime.utcnow(). - Very specific: line 92
One hook per domain in
hooks/: Follow the pattern in useProjects.ts or useSpecs.ts. - Very specific: line 94
API calls go through
lib/api/client.ts: Add domain-specific files to lib/api/ (e.g., projects.ts, specs.ts). - Very specific: line 102
Create or edit a route file in backend/omoi_os/api/routes/
- Very specific: line 103
Add the service method in backend/omoi_os/services/
- Very specific: line 105
Add tests in backend/tests/
- Very specific: line 106
Run just test to verify
- Very specific: line 110
Create page.tsx in the correct frontend/app/ route group
- Very specific: line 111
Add a sidebar panel in components/panels/ if needed, register in ContextualPanel.tsx
- Very specific: line 112
Create domain hooks in hooks/ and API functions in lib/api/
- Very specific: line 113
Use existing ShadCN components from components/ui/
- Very specific: line 117
Create the model in backend/omoi_os/models/
- Very specific: line 118
Create an Alembic migration: cd backend && uv run alembic revision -m "description"
- Very specific: line 120
Never use metadata or registry as column names
- Very specific: line 124
Write an OIP (OmoiOS Improvement Proposal) following the template in docs/proposals/TEMPLATE.md.
≈ “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 — AI Coding Agent Guide for OmoiOS
This document helps AI coding agents (Claude Code, Cursor, Copilot Workspace, Windsurf, etc.) understand and contribute to OmoiOS efficiently.
What is OmoiOS?
OmoiOS is a spec-driven, multi-agent orchestration system. Users describe a feature, OmoiOS plans it (requirements → design → tasks), executes it with autonomous AI agents in isolated sandboxes, and creates a PR. The core promise: "Start a feature before bed. Wake up to a PR."
Production: Frontend at https://omoios.dev, API at https://api.omoios.dev
Read These First
| Document | Purpose | When to read |
| ARCHITECTURE.md | System design, service map, data flow | Before any backend work |
| UI.md | Frontend routes, components, state, design system | Before any frontend work |
| backend/CLAUDE.md | Backend conventions, patterns, anti-patterns | Before writing Python |
| CLAUDE.md | Monorepo structure, dev commands, ports | Always |
| CONTRIBUTING.md | Branch conventions, PR process, testing | Before submitting changes |
| docs/rules/ | Per-mistake rules — tripwires we've already hit (SQLAlchemy session handling, reserved column names, feature flag gotchas) | Before editing dependencies, route handlers, or models |
Repository Map
senior_sandbox/
├── backend/omoi_os/
│ ├── api/
│ │ ├── main.py # FastAPI app + lifespan (25+ services initialized)
│ │ └── routes/ # 38 route files by domain
│ ├── services/ # Business logic (~40 service files)
│ │ ├── models/ # SQLAlchemy 2.0 models (~77 model classes)
│ ├── workers/ # Background workers (orchestrator, sandbox)
│ └── config.py # OmoiBaseSettings (YAML + env)
│
├── backend/config/
│ ├── base.yaml # Default application settings
│ └── test.yaml # Test overrides
│
├── backend/tests/
│ ├── unit/ # Fast isolated tests
│ ├── integration/ # Multi-component tests
│ └── e2e/ # Full workflow tests
│
├── frontend/
│ ├── app/ # Next.js 15 App Router
│ │ ├── (app)/ # Authenticated routes (command, projects, sandboxes, etc.)
│ │ ├── (auth)/ # Login, register, OAuth callback
│ │ └── (dashboard)/ # Root redirect to /command
│ ├── components/
│ │ ├── ui/ # ShadCN primitives (40+) — do not modify
│ │ ├── layout/ # App shell (MainLayout, IconRail, ContextualPanel)
│ │ ├── panels/ # Sidebar panels (route-aware)
│ │ └── {domain}/ # Domain components (command, spec, sandbox, etc.)
│ │ ├── hooks/ # 29 React Query + Zustand hooks (one per domain)
│ ├── lib/api/ # HTTP client + domain-specific API functions
│ └── providers/ # Context providers (Query, Auth, Theme, PostHog)
│
├── subsystems/spec-sandbox/ # Spec execution runtime
├── docs/
│ ├── proposals/ # OmoiOS Improvement Proposals (OIPs)
│ │ ├── page_flows/ # 24 page-by-page UI flow docs
│ ├── user_journey/ # End-to-end user journey docs
│ │ └── architecture/ # 14 system deep-dive docs
└── Justfile # Task runner (just --list for all commands)Critical Rules
These rules prevent common mistakes. Violating them causes build failures or runtime crashes.
Backend
- Never use
metadataorregistryas SQLAlchemy column names. They are reserved by SQLAlchemy's declarative API and causeInvalidRequestErroron import. Usechange_metadata,item_metadata, etc. - Always use
omoi_os.utils.datetime.utc_now()instead ofdatetime.utcnow(). The former returns timezone-aware datetimes compatible with the database. - Use
structured_output()for LLM calls that need structured data. Never manually parse JSON from LLM responses.from omoi_os.services.llm_service import get_llm_service llm = get_llm_service() result = await llm.structured_output(prompt="...", output_type=MyPydanticModel) - Settings go in YAML, secrets go in .env. Application settings in
config/base.yaml, secret keys/passwords in.env. Settings classes extendOmoiBaseSettings. - Two separate service initialization points exist.
api/main.py(API server) andworkers/orchestrator_worker.py(background worker) initialize different service sets. They run as separate processes and do not share state. See the Service Availability Matrix in ARCHITECTURE.md.
Frontend
- Check
components/ui/before creating new primitives. 40+ ShadCN components are available. Don't reinvent Button, Card, Dialog, etc. - One hook per domain in
hooks/. Follow the pattern inuseProjects.tsoruseSpecs.ts. Use React Query for server state. - API calls go through
lib/api/client.ts. Add domain-specific files tolib/api/(e.g.,projects.ts,specs.ts). Never callfetchdirectly. - Route groups:
(app)for authenticated pages,(auth)for auth flows, root for public pages.
Common Tasks
Add a new API endpoint
- Create or edit a route file in
backend/omoi_os/api/routes/ - Add the service method in
backend/omoi_os/services/ - Register the route in
backend/omoi_os/api/main.pyif it's a new router - Add tests in
backend/tests/ - Run
just testto verify
Add a new frontend page
- Create
page.tsxin the correctfrontend/app/route group - Add a sidebar panel in
components/panels/if needed, register inContextualPanel.tsx - Create domain hooks in
hooks/and API functions inlib/api/ - Use existing ShadCN components from
components/ui/
Add a new database model
- Create the model in
backend/omoi_os/models/ - Create an Alembic migration:
cd backend && uv run alembic revision -m "description" - Apply it:
uv run alembic upgrade head - Never use
metadataorregistryas column names
Propose a feature
Write an OIP (OmoiOS Improvement Proposal) following the template in docs/proposals/TEMPLATE.md. See docs/proposals/README.md for the process.
Development Commands
just --list # All available commands
just dev-all # Full stack with hot-reload
just test # Affected tests only (via testmon)
just test-all # Full test suite
just format # Auto-format code
just check # Lint + type checksPorts: PostgreSQL 15432, Redis 16379, Backend API 18000, Frontend 3000
Finding Things
| What you need | Where to look |
| API route for a feature | backend/omoi_os/api/routes/ — files named by domain |
| Business logic | backend/omoi_os/services/ — 40+ service files |
| Database schema | backend/omoi_os/models/ — SQLAlchemy models |
| Frontend page | frontend/app/(app)/ — route structure matches URL |
| React component | frontend/components/{domain}/ — grouped by domain |
| Data fetching hook | frontend/hooks/use{Domain}.ts |
| API client function | frontend/lib/api/{domain}.ts |
| Type definitions | frontend/lib/api/types.ts |
| Page flow documentation | docs/page_flows/ — 24 documented flows |
| User journey documentation | docs/user_journey/ — end-to-end journey docs |
| Architecture deep-dives | docs/architecture/01-*.md through 14-*.md |
| Improvement proposals | docs/proposals/ — OIP system |
| Config settings | backend/config/base.yaml |
| Test examples | backend/tests/unit/, backend/tests/integration/ |
Architecture Summary
OmoiOS has four core systems:
- Planning — Spec State Machine converts feature ideas through EXPLORE → PRD → REQUIREMENTS → DESIGN → TASKS → SYNC → COMPLETE. Each phase has an LLM evaluator (quality gate).
- Execution — OrchestratorWorker dispatches tasks to Daytona sandboxes where ClaudeSandboxWorker runs using the Claude Agent SDK. Three modes: exploration, implementation, validation.
- Discovery — DiscoveryService enables adaptive branching when agents find new requirements during execution. A Phase 3 agent can spawn Phase 1 investigation tasks.
- Readjustment — MonitoringLoop runs Guardian (trajectory analysis, 60s), Conductor (coherence + duplicate detection, 5min), and Health Check (30s). Can redirect, refocus, or stop agents.
See ARCHITECTURE.md for the full diagram and deep-dive links.
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.

