openmozi
AGENTS.md423 starsChanged 4 months agoMITView on GitHub
This file applies to Codex, Claude Code, Gemini CLI, and any other coding agent working in this repository. The repo-level source of truth is docs/CONSTITUTION.md. Follow it for all architecture, delegation, and release decisions. Before changing product code for any bug, complaint, anomaly, or improvement request: The original request to “fix” something does not itself satisfy step 5; approval must follow the investigation. Read-only inspection, reproduction, and research are allowed before approval.
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 repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- commitSkill
- pipelineSkill
- algorithmic-artSkill
- brand-guidelinesSkill
- canvas-designSkill
- claude-apiSkill
- coding-agentSkill
- creative-writingSkill
- data-analysisSkill
- design-impeccableSkill
- doc-coauthoringSkill
- document-authoringSkill
- docxSkill
- financial-analysisSkill
- frontend-designSkill
- internal-commsSkill
- mcp-builderSkill
- mozi-developmentSkill
- pdfSkill
- pptxSkill
- research-workflowSkill
- self-opsSkill
- skill-authoringSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- 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
24 rules. About 1 is common, 17 are distinctive, and 6 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Never invent worker progress, fake queued/completed states, or hide a deterministic runtime failure behind vague generic apologies.
- Distinctive: line 11
Only claim capabilities that are actually registered and currently ready in this runtime.
- Distinctive: line 12
Treat user-defined workspace skills and workspace agents as first-class extensions.
- Very specific: line 13
Do not ship delegation changes unless a real complex task has been driven end-to-end on the build and the evidence recorded.
- Distinctive: line 14
Do not use generic shell execution as the transport for Claude Code, Codex, Gemini, or other external AI CLIs.
- Distinctive: line 15
Do not treat a feature change as complete until relevant local tests have been run and passed.
- Very specific: line 16
Treat every bug report or feedback item as investigation-only until the user reviews the evidence and explicitly approves an implementation …
- Distinctive: line 22
Before changing product code for any bug, complaint, anomaly, or improvement request:
- Distinctive: line 26
Check existing MOZI abstractions first, then relevant mature open-source solutions, standards, and industry patterns.
- Distinctive: line 28
Wait for explicit user approval of an option.
- Distinctive: line 45
The task spec is a decision, not a suggestion: When an Issue marks a design as decided (schema, API shape, file layout, naming), implement …
- Distinctive: line 49
Build only what the task asks: No new abstraction layers, service classes, event buses, plugin points, interfaces reserved for the future, …
- Distinctive: line 55
Fallbacks are forbidden unless the task specifies them: Do not add try/catch-and-continue, silent default values, retry wrappers, or …
- Distinctive: line 61
Respect the stated size estimate: When a task gives an expected diff size, hitting ~2x that number is a signal you are solving the wrong …
- Distinctive: line 63
Stop, re-read the task, and cut scope — do not push through.
- Distinctive: line 90
Keep shared UI, API contracts, persistence behavior, model/provider behavior, prompts, permissions, artifacts, files, memory, and error …
- Distinctive: line 100
Verify the surfaces sequentially when they share port 9210.
- Distinctive: line 102
Use isolated test data and state which runtime, data home, and artifact are being tested.
- Distinctive: line 108
If one surface cannot be verified, report that surface as unverified and do not call the complete product change done.
- Very specific: line 119
Before runtime work, inspect http://127.0.0.1:9210/api/health and verify that the listener belongs to the installed app.
- Very specific: line 122
Do not start pnpm start, pnpm start:all, pnpm desktop:dev, or a Docker MOZI service alongside the installed app.
- Distinctive: line 125
Use source mode only when the change genuinely needs it.
- Very specific: line 129
After a change intended for the owner, rebuild the arm64 package, replace /Applications/MOZI.app, launch that installed copy, and verify …
- Common: line 135
Never reset, delete, overwrite, or remigrate the real App Support data as a test shortcut.
≈ “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 — Repository Instructions for Coding Agents
This file applies to Codex, Claude Code, Gemini CLI, and any other coding agent working in this repository.
The repo-level source of truth is docs/CONSTITUTION.md. Follow it for all architecture, delegation, and release decisions.
Non-Negotiable Rules
- Prompt text is not the execution engine. Runtime owns worker launch, sandboxing, health, state, fallback, and verification.
- Never invent worker progress, fake
queued/completedstates, or hide a deterministic runtime failure behind vague generic apologies. - Only claim capabilities that are actually registered and currently ready in this runtime.
- Treat user-defined workspace skills and workspace agents as first-class extensions; they must follow the same managed-worker contract as built-in flows.
- Do not ship delegation changes unless a real complex task has been driven end-to-end on the build and the evidence recorded. The automatic gate was removed (see
docs/CONSTITUTION.md§14) — nothing checks this for you. - Do not use generic shell execution as the transport for Claude Code, Codex, Gemini, or other external AI CLIs; those belong to managed-worker skills/adapters.
- Do not treat a feature change as complete until relevant local tests have been run and passed; if new behavior lacks coverage, add or update tests in the same change.
- Treat every bug report or feedback item as investigation-only until the user reviews the evidence and explicitly approves an implementation option. Follow the decision gate in
docs/CONSTITUTION.md§6. - Load
skills/mozi-development/SKILL.mdbefore adding or changing anything in this codebase. It carries the existing seams to reuse and the wiring proof a change needs; a raw code scan misleads you here (dead exports, docs describing intent rather than behaviour, a second implementation winning silently) and unit tests do not catch it. - Never publish to the open-source repository freehand. Load and follow
skills/public-release/SKILL.mdevery time — it carries the review gates the export script cannot enforce. Nothing that only makes sense inside this tree may appear in the public one: not in files, not in a commit message, not in a tag annotation, not in a release note. This has already gone wrong once (the tooling's own commit message published this project's name, version and commit sha on every sync) and cost a rewrite of published history.
Mandatory Bug And Feedback Workflow
Before changing product code for any bug, complaint, anomaly, or improvement request:
- Inspect the real code and live call path; verify that the reported behavior and proposed diagnosis are true.
- Identify the immediate cause and assess architectural causes, especially ownership, identity, lifecycle, state, persistence, contracts, and duplicated implementations.
- Check existing MOZI abstractions first, then relevant mature open-source solutions, standards, and industry patterns. Compare fit, maintenance, license, security, and integration cost.
- Give the user a decision brief: evidence, root cause, architectural assessment, existing solutions, options and tradeoffs, recommendation, scope, and verification plan.
- Wait for explicit user approval of an option. Do not edit product code, dependencies, schemas, migrations, runtime configuration, or release artifacts before approval.
- Implement only the approved option. Return for a new decision if material facts or scope change.
The original request to “fix” something does not itself satisfy step 5; approval must follow the investigation. Read-only inspection, reproduction, and research are allowed before approval.
Practical Implications
- For delegation work, check the real adapter path, preflight, lane, sandbox, and result contract.
- For prompt work, keep prompts thin and grounded in runtime truth.
- For upgrade questions, prefer the startup contract: migrations, bootstrap sync, and workspace reload happen on restart.
Scope, Simplicity, And Test Discipline
Coding agents in this repo have repeatedly over-designed, over-tested, and added unrequested fallbacks. These rules are acceptance criteria: a PR that violates them gets rejected without further discussion.
- The task spec is a decision, not a suggestion. When an Issue marks a design as decided (schema, API shape, file layout, naming), implement it as written. If you believe it is wrong, raise the objection BEFORE writing code and wait; never silently redesign or "improve" it.
- Build only what the task asks. No new abstraction layers, service classes, event buses, plugin points, interfaces reserved for the future, config options, or env vars unless the task explicitly requires them. Code justified by "extensibility" or "in case we later need" must be deleted before commit. Prefer editing existing files over creating modules; prefer deleting code over adding it.
- Fallbacks are forbidden unless the task specifies them. Do not add try/catch-and-continue, silent default values, retry wrappers, or degraded paths that hide failures. Fail loudly with typed errors. If the task does not define degradation semantics, the correct behavior is a visible failure — this repo's constitution already bans silent degradation, and an invented fallback is a bug even when it "works".
- Respect the stated size estimate. When a task gives an expected diff size, hitting ~2x that number is a signal you are solving the wrong problem. Stop, re-read the task, and cut scope — do not push through.
- Test the change, not the world. Cover the new behavior's happy path and
failure paths in targeted vitest files. Run
pnpm build,pnpm typecheck, the tests you touched, and directly affected neighbors — never the full suite (it makes real LLM API calls). Do not create new test infrastructure, helpers, or fixture frameworks unless the task asks for them. Test count is not a quality metric; a change with 6 pointed tests and wiring proof beats one with 40 permutations. - Wiring proof beats test volume. A feature is proven when every new export has a production caller (grep evidence), every read side names the writer that populates its data, and one real end-to-end trigger shows an observable effect. Unit tests that call the new function directly prove nothing about wiring — this repo has shipped dead code with green tests multiple times.
Product Surfaces And Parity
MOZI is one product with two first-class delivery surfaces:
- Web: the Docker-deployed MOZI runtime and Web UI.
- App: the installed macOS app, which supervises the packaged MOZI runtime and presents the same Web UI as a desktop product.
Shared product behavior must stay synchronized. A user-facing change is assumed to affect both surfaces unless its Issue and implementation explicitly identify it as Web-only or App-only.
- Keep shared UI, API contracts, persistence behavior, model/provider behavior, prompts, permissions, artifacts, files, memory, and error states in common code. Do not create separate Web and App implementations without a concrete platform requirement.
- Define both surfaces in the Issue and PR acceptance criteria. For a shared change, record Web/Docker evidence and installed-App evidence separately; passing one surface never proves the other.
- Build both surfaces from the same commit. Rebuild/restart Docker for Web
verification and rebuild/reinstall
/Applications/MOZI.appfor App verification so stale artifacts cannot masquerade as current behavior. - Verify the surfaces sequentially when they share port 9210. Stop one cleanly, verify that its listener and owned processes are gone, then start the other. Use isolated test data and state which runtime, data home, and artifact are being tested.
- Exercise the same core workflow on both surfaces for shared changes. Add platform-specific checks where the environments differ: container mounts, auth, reverse proxy, and service health for Web; Finder launch, packaged resources, macOS permissions, quit/relaunch, and sidecar ownership for App.
- If one surface cannot be verified, report that surface as unverified and do not call the complete product change done. Track an explicit blocker or follow-up Issue rather than silently narrowing the claim.
Owner Mac Runtime Baseline
The installed macOS app is the owner's normal MOZI entry point. Unless a task
explicitly requires source-mode development, treat /Applications/MOZI.app as
the live product runtime and ~/Library/Application Support/MOZI as its real
data home.
- Before runtime work, inspect
http://127.0.0.1:9210/api/healthand verify that the listener belongs to the installed app. Do not infer runtime identity from the port alone. - Do not start
pnpm start,pnpm start:all,pnpm desktop:dev, or a Docker MOZI service alongside the installed app. They compete for port 9210 and can produce false test results. The ONLYOFFICE Docker service may remain running. - Use source mode only when the change genuinely needs it. Quit the installed app gracefully first, isolate development data from the real App Support home, and state which runtime is under test.
- A source build or passing source test does not update the installed app.
After a change intended for the owner, rebuild the arm64 package, replace
/Applications/MOZI.app, launch that installed copy, and verify the real user path before claiming completion. - Launch the product with
open -a /Applications/MOZI.app. Quit it through the normal app lifecycle; use forced process termination only after graceful quit has demonstrably failed. - Never reset, delete, overwrite, or remigrate the real App Support data as a test shortcut. Preserve sessions, memory, secrets, files, workspaces, skills, agents, model configuration, and artifacts; create and record a rollback backup before any required migration.
- For user-facing bugs, App evidence must come from the installed app, including health, the affected UI/API path, clean quit/relaunch, orphan process checks, and SQLite integrity when persistence is involved. Complete the separate Web/Docker evidence required above before claiming shared product completion.
For Claude-specific conventions and deeper repo guidance, also see CLAUDE.md.
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.

