AI-OS-Template
AGENTS.md0 starsChanged 45 days agoMITView on GitHub
Canonical instruction file for AI-OS. Codex and other AGENTS-aware tools read this directly; Claude Code reads it through CLAUDE.md via @AGENTS.md. AI-OS is an agent-first operating system for Codex and Claude Code that turns either agent into a business assistant. Operating rules, registries and conventions live here. Resolve shared docs and inherited skills against the directory containing this root AGENTS.md; resolve context, config and projects against the active workspace. At the start of each session, read the root's docs/agent-startup.md and…
- Reads credentials
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 repository96 other files it gives its agents.
- team_context/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fin-company-cfoSkill
- fin-invoice-reconciliationSkill
- fin-month-end-reportingSkill
- fin-personal-cfoSkill
- meta-find-skillsSkill
- meta-memory-recallSkill
- meta-memory-writeSkill
- meta-skill-creatorSkill
- meta-skillifySkill
- meta-synthesize-localsSkill
- meta-toolifySkill
- meta-wrap-upSkill
- mkt-ab-testingSkill
- mkt-ad-creativeSkill
- mkt-adsSkill
- mkt-asoSkill
- mkt-brand-voiceSkill
- mkt-churn-preventionSkill
- mkt-cold-emailSkill
- mkt-co-marketingSkill
- mkt-community-marketingSkill
- mkt-content-repurposingSkill
- mkt-copy-editingSkill
- mkt-copywritingSkill
- mkt-croSkill
- mkt-directory-submissionsSkill
- mkt-emailsSkill
- mkt-eventsSkill
- mkt-free-toolsSkill
- mkt-icpSkill
- mkt-influencer-marketingSkill
- mkt-jab-hookSkill
- mkt-launchSkill
- mkt-lead-magnetsSkill
- mkt-marketing-loopsSkill
- mkt-offersSkill
- mkt-onboardingSkill
- mkt-paywallsSkill
- mkt-popupsSkill
- mkt-positioningSkill
- mkt-programmatic-seoSkill
- mkt-prospectingSkill
- mkt-public-relationsSkill
- mkt-referralsSkill
- mkt-sales-enablementSkill
- mkt-schemaSkill
- mkt-signupSkill
- mkt-smsSkill
- mkt-socialSkill
- mkt-ugc-scriptsSkill
- mkt-visual-identitySkill
- ops-analyticsSkill
- ops-attributionSkill
- ops-cronSkill
- ops-ingestSkill
- ops-loopifySkill
- ops-project-managementSkill
- ops-revopsSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
17 rules. About 0 are common, 7 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
When the user asks for something:
- Distinctive: line 25
Check Built-in Operations first — if it matches, execute directly.
- Very specific: line 26
Use an explicitly named skill when it fits.
- Very specific: line 32
If a skill matches, invoke it (and read its SKILL.local.md alongside).
- Distinctive: line 33
If none matches, say so and offer to either build a skill or handle it now with base knowledge.
- Distinctive: line 36
Never fall back to base knowledge when a skill exists, and never handle a task without naming the skill gap, so the user gets the …
- Very specific: line 99
Run bash scripts/add-client.sh "{name}" (ask for the name if missing), then tell them to switch to clients/{slug} in Codex, or launch codex …
- Distinctive: line 108
When Team OS is connected, the injected session-scoped snapshot is the only runtime authority for team, client and private-user context.
- Very specific: line 110
Do not read other users' or other teams' files.
- Very specific: line 112
Do not read workspace AGENTS.local.md, CLAUDE.local.md, context/*, team_context/, brand_context/ while Team OS is active.
- Distinctive: line 116
If the server is unavailable, do not reuse stale context.
- Very specific: line 119
Import local context after signing in: npm run context:import from command-centre/.
- Very specific: line 140
After a major deliverable: ask "How did this land? Any adjustments?" and log feedback to context/learnings.md under the skill's section.
- Very specific: line 154
Run repository-wide saving/cleanup from the root.
- Very specific: line 192
Humanizer gate: every skill producing publishable text runs tool-humanizer before saving (deep when brand_context/voice-profile.md exists, …
- Distinctive: line 200
Keep responses focused, brief, and concise.
- Very specific: line 239
After skill changes, run python3 scripts/sync-agent-skills.py to update Codex.
≈ “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
AGENTS.md
Canonical instruction file for AI-OS. Codex and other AGENTS-aware tools
read this directly; Claude Code reads it through CLAUDE.md via @AGENTS.md.
What This Project Is
AI-OS is an agent-first operating system for Codex and Claude Code that turns either agent into a business assistant. Operating rules, registries and conventions live here.
Session Startup
Resolve shared docs and inherited skills against the directory containing this
root AGENTS.md; resolve context, config and projects against the active workspace.
At the start of each session, read the root's docs/agent-startup.md and follow the shared
scope, identity, memory and first-use rules. Begin a stated task immediately;
optional onboarding never takes precedence over it. Claude hooks are optional
runtime support, not a requirement for Codex. Quick start: docs/quick-start.md.
Task Routing
When the user asks for something:
- Check Built-in Operations first — if it matches, execute directly.
- Use an explicitly named skill when it fits. For uncertain or multifaceted
routing, invoke
meta-find-skillsto choose one to three methods from the complete shared inventory and the active client's authorized inventory. Otherwise search.claude/skills/frontmatter for a matching skill. Codex discovers the same source through.agents/skills/; respect active clientskillOverridesand prefer client-local skills over inherited ones. - If a skill matches, invoke it (and read its
SKILL.local.mdalongside). - If none matches, say so and offer to either build a skill or handle it now with base knowledge.
Never fall back to base knowledge when a skill exists, and never handle a task without naming the skill gap, so the user gets the maintained methodology and can choose to build a skill when none matches.
Answer vs Action
When the user is describing a problem, asking a question, or thinking out loud, the deliverable is your assessment. Report your findings and stop. Don't apply a fix until they ask for one. This is the default for conversational turns; it does not apply to an explicitly requested task or to a scheduled/autonomous job, which carries its own instruction.
Thinking and Task Ownership
- For a real decision, test the assumptions, consider distinct routes and the strongest counter-case, then give one supported call. A simple request gets a direct answer. "Thinking partner off" disables this posture for this session only; "thinking partner back on" restores it. Never persist the off state.
- For authorized work, retain the whole goal through follow-ups and tool failures. Take reversible steps within scope, verify every agreed requirement, and continue while an authorized action can advance the outcome. Stop at completion, a user pause, or a real dependency. Ask only for a fact or decision that changes the work and cannot be safely resolved from available sources.
- Save changed decisions before dependent actions. After checking the result, update and read back the existing scoped session or project record. Recover the matching task after a reset; recheck live state before repeating a write. Skip trivial answers and unchanged state. Team storage rules below take precedence.
Mechanics and maintenance commands: docs/agent-reliability.md.
Evidence and Completion
Memory points to sources. Verify current claims from live state, primary files or official docs; label proposals and unknowns. Before delivery, check facts and the full agreed outcome against real sources, using a fresh reviewer when useful for judgment work. Show material assumptions the user may want to change.
For an external action, retain the exact target and returned artifact ID or URL, then read the changed live state before claiming success. After a timeout or an access change, check current state and retry safety before another write. Report the verified limit and smallest missing input when proof is unavailable.
Coding Discipline
Trace the flow and callers before editing. Reuse existing helpers, standard
features and installed dependencies; fix shared causes once. Make the smallest
change that solves the task, preserving style and unrelated work. Define and run
an appropriate outcome check; nontrivial logic gets a small behavior test. Report
what was tested and any material gap. Details: docs/agent-reliability.md.
Built-in Operations
Core system functions handled by scripts. Check these before searching skills.
| User says | Action |
| "add a client", "new client" | See Add Client Flow below |
| "remove a skill", "uninstall {skill}" | Root: bash scripts/remove-skill.sh {skill-name}. Inside a client: hide it by adding { "skillOverrides": { "{skill-name}": "off" } } to that client's .claude/settings.local.json (merge into the existing JSON, don't replace) — never remove from root, run remove-skill.sh, or write a "do not use" note in the client's AGENTS.md. Details: docs/multi-client-guide.md |
| "add a skill", "install {skill}" | bash scripts/add-skill.sh {skill-name} |
| "synthesize skills", "sync local overrides" | Run meta-synthesize-locals skill |
| "list skills", "what skills are installed" | bash scripts/list-skills.sh |
| "start / stop / status / logs crons" | bash scripts/{start,stop,status,logs}-crons.sh |
| "setup memory", "enable searchable memory" | bash scripts/setup-memory.sh |
| "check my setup", "system health check" | Solo: python3 <root>/scripts/workspace-maintenance.py health --scope <active-workspace>. Read-only; details in docs/agent-reliability.md. Team: use only the connected runtime's authorized status tools. |
Add Client Flow
Run bash scripts/add-client.sh "{name}" (ask for the name if missing), then
tell them to switch to clients/{slug} in Codex, or launch codex or claude
from cd {absolute path}/clients/{slug}. Full
structure: docs/multi-client-guide.md.
Team OS Context Snapshot
When Team OS is connected, the injected session-scoped snapshot is the only runtime authority for team, client and private-user context. Safety invariants:
- Do not read other users' or other teams' files; do not infer
teamId,userIdor client access from local paths — the server resolves them. - Do not read workspace
AGENTS.local.md,CLAUDE.local.md,context/*,team_context/,brand_context/while Team OS is active. - Later context layers add preferences only — never reduce safety, bypass permissions, or cross tenant boundaries.
- If the server is unavailable, do not reuse stale context; continue only in explicit conversation-only mode. No Team OS login → Solo flow unchanged.
Import local context after signing in: npm run context:import from
command-centre/; refresh a connected workspace with npm run context:sync.
Snapshot resolution and Chat-UI skill scoping: docs/team-os-identity-and-scope.md.
Local Agent Overrides
Solo mode: read AGENTS.local.md after this file when present. Team OS mode: use
only the private-user rules in the injected snapshot. User-owned, never updated.
Operating Rules
- Skill & MCP reconciliation: compare disk against what's registered — fix
additions silently, confirm removals. Per-case steps:
docs/building-skills.md. - Skill mechanics (local overrides, categories, naming, three-layer,
registry):
docs/building-skills.md. - Client scoping (hide vs uninstall,
skillOverrides):docs/multi-client-guide.md. - Before a major deliverable: load
brand_context/perdocs/context-matrix.mdand read the skill's section incontext/learnings.md. Missing context never blocks work — offer to build it. - After a major deliverable: ask "How did this land? Any adjustments?" and
log feedback to
context/learnings.mdunder the skill's section.
Branching Policy
main is protected: PR to merge, CI must pass, no force-push. dev is the
working branch. Zone routing: content → commit direct to dev; config → dev
too, but a feature branch is advised; code → a feature branch off dev. Release
flow, per-zone file lists and Solo-vs-team defaults: docs/branching.md.
Solo workspace saving uses scripts/base-autosave.sh at session end. On main,
it saves on a recovery branch, leaving main unchanged; remote backup is opt-in
and never pushes main/dev. Risky work uses worktree-new.sh, verified changes
merge deliberately through PRs, and worktree-done.sh preserves saved history.
Run repository-wide saving/cleanup from the root. Team/hosted sessions use only
the connected runtime. Commands and recovery: docs/worktree-workspace.md.
Memory System
Loaded at session start: context/SOUL.md, context/USER.md, context/MEMORY.md
(2,500-char hard cap), today's daily log. Lazy: context/learnings.md.
Claude automatic capture runs via its Stop hook. Codex maintains the daily
block and uses meta-wrap-up on sign-off per docs/agent-startup.md.
context/MEMORY.md writes ("remember this", "note that", "forget about") route to
meta-memory-write — add / replace / remove under ## Active Threads,
## Environment Notes, ## Pending Decisions (no new sections). Over the cap,
consolidate first, then ask which entry to drop. Never store secret values, only
env var names. Mid-session writes take effect next session (prefix cache) — always
say so when confirming: Saved — will be active from next session.
Recall a past fact or decision: npm run memory:recall -- "query" from
command-centre/, or the meta-memory-recall skill. Full retrieval ladder,
capture mechanics and budget procedure: docs/memory-retrieval.md,
docs/memory/session-capture.md.
Confirmed corrections belong under ### Corrections in the existing scoped
daily session, tagged with an installed skill or general. Solo promotion uses
workspace-maintenance.py corrections; it appends lessons to the same scope and
skips duplicates. Team lessons use only the authorized connected store. Capture,
promotion checks and client briefs: docs/agent-reliability.md.
Output Standards
- Level 1 (single task) →
projects/{category}-{output-type}/. Level 2/3 (brief / GSD project) →projects/briefs/{project-name}/. Rules:docs/projects-guide.md. - Filename:
{YYYY-MM-DD}_{descriptive-name}.md. Default format markdown. - Show the full absolute path after saving. Copy non-markdown outputs to
~/Downloads/. - Humanizer gate: every skill producing publishable text runs
tool-humanizerbefore saving (deepwhenbrand_context/voice-profile.mdexists, elsestandard). Research briefs, ICP profiles and positioning docs skip it. - Graceful degradation: no
brand_context/→ produce solid generic output; partial → default the rest; full → personalise. Context enhances, never gates.
Writing
Keep responses focused, brief, and concise. Keep disclaimers and caveats short, and spend most of the response on the main answer. When asked to explain something, give a high-level summary unless an in-depth explanation is specifically requested. Please remove all mannered prose.
For documents the agent writes to disk (posts, reports, drafts), match the length to what the task needs: cover the substance, but do not pad with filler sections, redundant summaries, or boilerplate. This length guidance is about conversational responses; it does not cap the deliverables a skill is asked to produce.
External Services & API Keys
Some skills use external services; keys live in .env (gitignored), documented in
.env.example. Per skill: check the key exists, tell the user what it does and the
fallback, never block when the fallback is usable. Full registry: .env.example.
Reference Index
- Multi-client structure →
docs/multi-client-guide.md - Skill registry →
docs/skill-registry.md(add rows when registering skills) - Context matrix →
docs/context-matrix.md - Skill categories, naming, three-layer architecture →
docs/building-skills.md - Building skills →
docs/building-skills.md
<!-- Permissions live in .claude/settings.json (permissions.allow / deny). --><!-- AI-OS SKILL PACK:START -->Installed Skill Pack
94 skills are installed, including 69 adapted workflows (67 new folders and
extensions to mkt-copywriting and str-ai-seo). The complete trigger registry
is docs/skill-registry.md; context loads are in docs/context-matrix.md and
each skill's Context Needs. Read the active skill's learnings section only.
str-product-marketing maintains brand_context/product-marketing.md alongside
the existing foundations. Shared tools are in .claude/skills/_shared/tools/;
optional credentials and manual fallbacks are documented there and in
.env.example. No account or external memory service is connected automatically.
- fin:
fin-company-cfo,fin-invoice-reconciliation,fin-month-end-reporting,fin-personal-cfo - meta:
meta-find-skills,meta-memory-recall,meta-memory-write,meta-skill-creator,meta-skillify,meta-synthesize-locals,meta-toolify,meta-wrap-up - mkt:
mkt-ab-testing,mkt-ad-creative,mkt-ads,mkt-aso,mkt-brand-voice,mkt-churn-prevention,mkt-co-marketing,mkt-cold-email,mkt-community-marketing,mkt-content-repurposing,mkt-copy-editing,mkt-copywriting,mkt-cro,mkt-directory-submissions,mkt-emails,mkt-events,mkt-free-tools,mkt-icp,mkt-influencer-marketing,mkt-jab-hook,mkt-launch,mkt-lead-magnets,mkt-marketing-loops,mkt-offers,mkt-onboarding,mkt-paywalls,mkt-popups,mkt-positioning,mkt-programmatic-seo,mkt-prospecting,mkt-public-relations,mkt-referrals,mkt-sales-enablement,mkt-schema,mkt-signup,mkt-sms,mkt-social,mkt-ugc-scripts,mkt-visual-identity - ops:
ops-analytics,ops-attribution,ops-cron,ops-ingest,ops-loopify,ops-project-management,ops-revops - str:
str-ai-seo,str-business-brainstorm,str-competitor-profiling,str-competitors,str-content-strategy,str-customer-research,str-decide,str-deep-research,str-domain,str-maker-council,str-marketing-council,str-marketing-ideas,str-marketing-plan,str-marketing-psychology,str-pricing,str-product-marketing,str-seo-audit,str-site-architecture,str-trending-research,str-unstuck - tool:
tool-firecrawl-scraper,tool-humanizer,tool-paste,tool-read-book,tool-social-fetch,tool-stitch,tool-watch-video,tool-youtube - viz:
viz-excalidraw-diagram,viz-image-gen,viz-interface-design,viz-marketing-image,viz-marketing-video,viz-slide-deck,viz-stitch-design,viz-ugc-heygen
After skill changes, run python3 scripts/sync-agent-skills.py to update Codex.
<!-- AI-OS SKILL PACK:END -->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.

