agentleFS
DINAKAR-SDINAKAR-S/company-ai-os/CLAUDE.md

company-ai-os

CLAUDE.md2 starsChanged 3 months agoMITView on GitHub

This vault is the company's second brain and AI Operating System. It is a hub that maps every department, project, and tool the company runs on, and can route a task into the right real folder or system and act there. Any agent (you) that opens this folder MUST read this file first, then follow it exactly. Built on Karpathy's LLM-wiki idea (raw → wiki → schema; ingest/query/lint) plus a dispatch layer that turns the wiki into an OS. Reference:…

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

21 rules. About 0 are common, 9 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use aliases: in frontmatter for every other name the same thing goes by.

    line 47
  2. Very specific:

    Every note in entities/ uses this frontmatter + body:

    line 53
  3. Distinctive:

    Every interaction is one of these.

    line 85
  4. Very specific:

    Read the source (a raw/ file, a URL, or a real folder/system export).

    line 88
  5. Very specific:

    Write/update the relevant entities/ note(s) with the extracted facts.

    line 90
  6. Very specific:

    Add or update the entry in index.md.

    line 91
  7. Distinctive:

    Read them, synthesize an answer, cite the note(s) you used.

    line 97
  8. Distinctive:

    If the answer is valuable and reusable, file it back as a new/updated note (mini-ingest) and log it.

    line 98
  9. Distinctive:

    If ambiguous or unmapped, ask which entity — do not guess a folder.

    line 110
  10. Very specific:

    Locate: Read that note's path:. That is the working directory for the task.

    line 112
  11. Very specific:

    Act: Read freely inside it. Before creating/editing/deleting any file there, confirm with the user (see §5).

    line 113
  12. Very specific:

    Record: After acting, update the entity note's current-state + updated:, and log: ## [date] dispatch | <task> in [[Entity]] → <what …

    line 115
  13. Distinctive:

    Never guess a path: If no entity resolves, ask.

    line 126
  14. Distinctive:

    Never assume a price: When quoting any tool, subscription, plan, or vendor in a proposal or budget, fetch the current price (web) first and …

    line 127
  15. Distinctive:

    No stale or guessed figures.

    line 129
  16. Very specific:

    Log every operation: If it's not in log.md, it didn't happen.

    line 133
  17. Very specific:

    Sources are immutable: Never edit files in raw/ after ingest.

    line 134
  18. Distinctive:

    When a new session opens this vault:

    line 141
  19. Distinctive:

    Read this file (CLAUDE.md).

    line 142
  20. Very specific:

    Read mistakes.md — standing rules from past failures.

    line 143
  21. Very specific:

    If .claude/sessions/LATEST.md exists, read it — that is the handoff from the previous session (or run /session-start).

    line 145

≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Company AI OS — Operating Manual (Schema)

This vault is the company's second brain and AI Operating System. It is a hub that maps every department, project, and tool the company runs on, and can route a task into the right real folder or system and act there. Any agent (you) that opens this folder MUST read this file first, then follow it exactly.

Built on Karpathy's LLM-wiki idea (raw → wiki → schema; ingest/query/lint) plus a dispatch layer that turns the wiki into an OS. Reference: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f


1. The three layers

  1. Raw sources — immutable inputs. Live in raw/ (and raw/assets/ for attachments), OR they are the real working folders/systems outside this vault (shared drives, department folders, SaaS tools).
  2. The wiki — LLM-maintained markdown. index.md, log.md, and one note per entity in entities/. The wiki is the map. The [[wikilinks]] between notes ARE the graph.
  3. The schema — this file. Rules for how the wiki is built, queried, linted, and dispatched.

2. Folder conventions

company-ai-os/                 ← this vault (the hub)
├── CLAUDE.md                  ← this schema (read first, always)
├── index.md                   ← catalog of every wiki page, by category
├── log.md                     ← append-only history of every operation
├── entities/                  ← one note per entity = the graph nodes
│   ├── Company.md             ← the company itself ("who are we")
│   ├── HR.md · Engineering.md · Operations.md · Marketing.md · Finance.md · Sales.md
│   ├── Routing.md             ← name → folder/system routing table
│   └── <Team/Project/Tool>.md ← grows over time
├── raw/                       ← dropzone: paste docs, notes, exports to ingest
│   └── assets/                ← images, PDFs, binaries referenced by raw notes
├── _templates/                ← note skeletons (entity, ingest)
└── .claude/                   ← skills (slash commands) + department sub-agents

The real work may live OUTSIDE this vault — department folders, shared drives, repos, SaaS tools. Entity notes carry the exact path: (or system link) to that real location.

Naming: entity note filename = the entity's common name (spaces OK). Use aliases: in frontmatter for every other name the same thing goes by.


3. Entity note format

Every note in entities/ uses this frontmatter + body:

---
type: company | department | team | project | tool | person | reference
path: "../Engineering"        # real folder, forward slashes; "" if pure concept or SaaS
aliases: [every, other, name, this, goes, by]
tags: [department, active]
status: active | paused | archived
updated: 2026-01-01
---

# <Name>

**What it is** — one line.

**Where** — `path` above, or links to the systems it lives in. Key subfolders that matter.

## Details
...facts, decisions, current state...

## Links
[[Company]] · [[related entity]]     ← these build the graph

Rule: link liberally. A [[Name]] that has no note yet is fine — it marks a node worth creating later.


4. The four operations

Every interaction is one of these. Name the operation you're doing in your reply.

INGEST — add a source to the brain

  1. Read the source (a raw/ file, a URL, or a real folder/system export).
  2. Discuss the key takeaways with the user (1–3 lines) — don't silently absorb.
  3. Write/update the relevant entities/ note(s) with the extracted facts.
  4. Add or update the entry in index.md.
  5. Append one line to log.md: ## [YYYY-MM-DD] ingest | <source> → <notes touched>.
  6. Cross-link with [[wikilinks]].

QUERY — answer from the brain

  1. Find relevant entities/ notes (start at index.md).
  2. Read them, synthesize an answer, cite the note(s) you used.
  3. If the answer is valuable and reusable, file it back as a new/updated note (mini-ingest) and log it.

LINT — health-check the brain

Scan for: contradictions between notes · stale claims (updated: old + source changed) · orphan notes (no [[links]] in or out) · dead path: (folder moved/gone) · gaps (entity mentioned but no note). Report findings; fix with confirmation; log as ## [date] lint | N issues → M fixed.

DISPATCH — the OS layer: do the thing in the right place

  1. Resolve. Map the request to an entity: match name/alias against entities/Routing.md (the name→folder table), then entities/ and index.md. If ambiguous or unmapped, ask which entity — do not guess a folder. (Orchestrating an agent team? See AGENTS.md.)
  2. Locate. Read that note's path:. That is the working directory for the task.
  3. Act. Read freely inside it. Before creating/editing/deleting any file there, confirm with the user (see §5).
  4. Record. After acting, update the entity note's current-state + updated:, and log: ## [date] dispatch | <task> in [[Entity]] → <what changed>.

5. Guardrails (non-negotiable)

  • Read freely, confirm writes inside real folders outside this vault. Reading/mapping any real folder = always allowed. Creating/editing/deleting a file inside a department or project folder = state the exact path + change, then wait for OK. Writes inside the vault itself do not need confirmation.
  • Never guess a path. If no entity resolves, ask. A wrong folder is worse than a question.
  • Never assume a price. When quoting any tool, subscription, plan, or vendor in a proposal or budget, fetch the current price (web) first and note the date checked. No stale or guessed figures.
  • Never expose sensitive data. Payroll figures, personal employee data, credentials, and customer PII stay in their source systems — reference them in notes, never copy the values into the vault.
  • Log every operation. If it's not in log.md, it didn't happen.
  • Sources are immutable. Never edit files in raw/ after ingest; supersede with a new note instead.

6. Session start behavior

When a new session opens this vault:

  1. Read this file (CLAUDE.md).
  2. Read mistakes.md — standing rules from past failures. They bind you.
  3. Skim index.md for the current map and log.md (last few entries) for recent state.
  4. If .claude/sessions/LATEST.md exists, read it — that is the handoff from the previous session (or run /session-start).
  5. First session ever (vault still contains Acme sample data)? Offer /onboard.
  6. Then act on the request as one of the four operations above.

7. The learning loop

Two append-only files at the vault root keep the OS from repeating itself:

  • learnings.md — what worked; reusable wins with a "rule going forward".
  • mistakes.md — what failed; root cause + a rule so it never happens twice.

Rules:

  • mistakes.md is read at EVERY session start (§6). Its rules are binding until the user retires them.
  • Whenever something breaks or the user corrects you, append to mistakes.md in the same session — don't wait for /eod.
  • /eod and /session-handoff both ask: "anything learned today?" and file it.
  • A mistake that keeps recurring graduates into this schema (§5) — propose the edit.

8. Writing on the company's behalf

Any outward-facing text (email, WhatsApp, LinkedIn, proposals) follows entities/Style Guide.md — per-channel voice rules with worked samples. Load it before drafting; the creative-director agent reviews against it. Sending anything externally always requires explicit user confirmation.


Schema v1 · Company AI OS template · grow this file as your OS matures.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.