agent-context-os
AGENTS.md30 starsChanged 37 days agoMITView on GitHub
This repository is the durable source of truth for personal, project, and session context. Keep provider-neutral state here and host-specific behavior in its adapter. Invoke these workflows explicitly with the form documented by the host adapter; this is guidance, not a host-enforced gate. The $context-setup, $context-start, $context-update, and $context-end compatibility names remain supported. - bash scripts/contextos.sh start is the read-only continuity inventory. - Setup, update, and end use propose then exact-digest apply; never edit lifecycle state directly. - Present every…
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 repository14 other files it gives its agents.
- starter/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- context-endSkill
- context-setupSkill
- context-startSkill
- context-updateSkill
- endSkill
- migrate-geminiSkill
- mine-gemini-workflowsSkill
- setupSkill
- startSkill
- updateSkill
- skill-creatorSkill
- contextos-workspaceSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Run bash scripts/contextos.sh doctor when discovery, runtime setup, a lock, or copied skills may be stale.
- Very specific: line 29
Read ROUTING.md before loading task-specific context.
- Very specific: line 30
Treat TODO.md as the backlog and state/current.md as top-of-mind context.
- Distinctive: line 31
Keep each fact in one canonical file and link to it elsewhere.
- Very specific: line 36
Follow docs/safety-contract.md before any external write, publish, destructive action, credential change, or permission expansion.
- Distinctive: line 39
Never commit or push without explicit approval.
- Very specific: line 65
Keep Hermes MEMORY.md and USER.md separate from repository state.
- Distinctive: line 71
Keep private memory outside this repository.
- Very specific: line 84
Keep .cursor/rules non-overlapping with this file because Cursor does not document their conflict order.
- Very specific: line 99
Run bash scripts/validate-all.sh --workspace for workspace changes.
≈ “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
Context OS
This repository is the durable source of truth for personal, project, and session context. Keep provider-neutral state here and host-specific behavior in its adapter.
Session lifecycle
- First-time onboarding: use
$setup. - Begin work: use
$start. - Save a mid-session checkpoint: use
$update. - Close a session: use
$end.
Invoke these workflows explicitly with the form documented by the host adapter;
this is guidance, not a host-enforced gate. The $context-setup, $context-start,
$context-update, and $context-end compatibility names remain supported.
Lifecycle kernel
bash scripts/contextos.sh startis the read-only continuity inventory.- Setup, update, and end use
proposethen exact-digestapply; never edit lifecycle state directly. - Present every proposal diff. Apply only after explicit approval of that exact proposal and report its receipt.
- Run
bash scripts/contextos.sh doctorwhen discovery, runtime setup, a lock, or copied skills may be stale.
Context routing
- Read
ROUTING.mdbefore loading task-specific context. - Treat
TODO.mdas the backlog andstate/current.mdas top-of-mind context. - Keep each fact in one canonical file and link to it elsewhere.
- Load only what the current task needs. Identity and session data may be sensitive.
Safety
- Follow
docs/safety-contract.mdbefore any external write, publish, destructive action, credential change, or permission expansion. - Show proposed context changes before broad or destructive rewrites.
- Never commit or push without explicit approval.
- Optional integrations stay disabled until chosen and configured; see
references/integrations.mdfor data and side-effect boundaries.
Portability boundary
.agents/skills/contains portable workflow cores..claude/contains Claude Code commands, hooks, settings, and memory adapters..codex/hooks.jsonmaps Codex events to the same read-only policy checks..devin/hooks.v1.jsonmaps Devin CLI events to the same advisory checks.adapters/hermes/documents first-class CLI support, optional hooks, and skill installation.adapters/openclaw/andadapters/opencode/document first-class host support.adapters/cursor/documents first-class Cursor CLI and experimental IDE support.adapters/devin/documents first-class Devin CLI and cloud-session support, plus Review.- Runtime manifests under
runtimes/declare support instead of implying parity. - Kernel proposal/apply is the enforcement boundary on every host; hooks are defense in depth and host-local memory is never shared automatically.
Hermes Agent
- Hermes loads
AGENTS.mdas project context. - Expose
.agents/skills/as an external skill directory, or install the four short aliases and all fourcontext-*cores together. Copied skills must be refreshed after source changes. - Invoke
/context-setup,/context-start,/context-update, and/context-end. Hermes v0.21.4hermes skills list --source localreports built-in collisions for/startand/updateand suggests/skill startand/skill update. Alias invocation needs a future live control. - Keep Hermes
MEMORY.mdandUSER.mdseparate from repository state. Seedocs/memory-across-agents.md. .claude/hooks/does not run in Hermes; its hooks are optional defense in depth.
OpenClaw
- Keep private memory outside this repository. After reviewing its source commit, sync all eight skills and install this adapter's local external plugin.
- Bind an alias to this canonical root, then invoke
/contextos <alias> setup,start,update, orendand its owned continuation. - The plugin exposes no apply method. Review the stored proposal, then apply its
exact digest per
adapters/openclaw/README.md; allowlists are not authorization.
Cursor
- Open the repository as the IDE workspace or start the Agent CLI from its root;
both discover
AGENTS.mdand.agents/skills/natively. - Invoke
/context-setup,/context-start,/context-update, and/context-endexplicitly; Cursor CLI reserves/updatefor self-updates. - Keep
.cursor/rulesnon-overlapping with this file because Cursor does not document their conflict order. IDE and CLI permissions remain separate. - Cursor CLI also reads the removable root
CLAUDE.mdwhen present. Treat its short lifecycle commands as Claude adapters, not Cursor invocations. - This adapter ships no hook or memory bridge; see
adapters/cursor/README.md.
Devin
- Devin CLI: keep
.devin/config.json(it blocks foreign config imports) and invoke/context-setupetc. in Normal mode; CLI/updateis a self-update. - Cloud sessions use
@skills:context-*; Review sends code externally and is not a lifecycle host. Apply only a reviewed digest; seeadapters/devin/README.md.
Validation
Run bash scripts/validate-all.sh --workspace for workspace changes. Product
contributors and CI omit --workspace after instructions, hooks, scripts, manifests, or generated references 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.

