agentleFS
policanipolicani/portable-cross-agent-second-brain/CLAUDE.md

portable-cross-agent-second-brain

CLAUDE.md2 starsChanged 5 months agoMITView on GitHub

This is your living memory: the owner's second brain. Read from it to do their work in their voice and context, and help keep it current. The owner reads and edits it too. The same rules apply whether you are running in Claude (Cowork or Code), Codex, or Cursor. Claude reads this CLAUDE.md; Codex and Cursor both read AGENTS.md. The two files are kept in parity — same rules, phrased for each client. If you change an operating rule in…

The file

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

8 rules. About 0 are common, 3 are distinctive, and 5 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.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the notes are not here, they may be in a connected project or a linked Notion/Drive — ask where the vault lives rather than guessing.

    line 28
  2. Distinctive:

    Do not load the whole vault by default: Read only the note(s) the task needs.

    line 33
  3. Very specific:

    When the task depends on how two notes, folders, or ideas connect, run python brain.py --related "<question>".

    line 51
  4. Very specific:

    Scoped local instructions: Before working in a nested project or answering a folder-specific operational question, run python brain.py …

    line 56
  5. Very specific:

    Before answering or drafting, route to and read the relevant note(s).

    line 77
  6. Very specific:

    Keep restricted material (credentials, personal/legal/medical) out unless the owner explicitly approves it.

    line 91
  7. Very specific:

    Never hand back TODO, // implement here, truncated text, filler, or "this section should cover…" outlines as if they were the answer.

    line 113
  8. Distinctive:

    Neutral re-check under challenge: When the owner questions an answer, re-verify calmly and show the trace — which note said what, and how …

    line 116

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

Memventory — Team operating guide for Claude

This is your living memory: the owner's second brain. Read from it to do their work in their voice and context, and help keep it current. The owner reads and edits it too.

Parity note (this is the whole point)

The same rules apply whether you are running in Claude (Cowork or Code), Codex, or Cursor. Claude reads this CLAUDE.md; Codex and Cursor both read AGENTS.md. The two files are kept in parity — same rules, phrased for each client. If you change an operating rule in one, mirror it in the other. There is no third file to maintain: Cursor reads AGENTS.md natively.

The notes

The memory lives in knowledge-base/:

  • snapshot — who they are, one-paragraph orientation
  • key-people — stakeholders, roles, who decides what
  • preferences-and-rules — how they like things done, and the red lines
  • project-history — what's happened, in order
  • decisions-and-rationale — what was decided and why
  • open-loops — commitments and follow-ups still in the air
  • source-links — where each fact came from

Each note has frontmatter (title, source, date, status, sensitivity). If the notes are not here, they may be in a connected project or a linked Notion/Drive — ask where the vault lives rather than guessing.

Find the right note — selective routing (save tokens)

Do not load the whole vault by default. Read only the note(s) the task needs. This is how a plain-markdown brain stays cheap and fast without a vector database: route to the relevant note instead of dumping everything into context.

Deterministic retrieval first. For any lookup ("what did we decide about X", "who owns Y"), run the bundled engine before searching or opening files:

python brain.py --show "<question>"

It scores every section of the vault against the query keywords — no model tokens spent — prints the top matches as path:line targets, and prints the best section's text. Often that printed section IS the answer and no file needs opening. It follows pointer sections one hop, and its index self-rebuilds when notes change (python brain.py --index forces it). If it prints no match, fall back to the routing map below, then Grep.

When the task depends on how two notes, folders, or ideas connect, run python brain.py --related "<question>". It keeps direct source references marked EXTRACTED and similar-content candidates marked INFERRED with a score and shared terms; treat inferred links as leads to inspect, not facts.

Scoped local instructions. Before working in a nested project or answering a folder-specific operational question, run python brain.py --instructions "<active-folder-or-file>". Follow the reported root-to-nearest chain for this client; source instructions remain authoritative and a local rule never becomes vault-wide policy merely because it is indexed.

Routing map:

  • Who someone is, their role, who decides → key-people
  • Voice, preferences, red lines → preferences-and-rules
  • What was decided and why → decisions-and-rationale
  • Commitments / follow-ups in flight → open-loops
  • What happened, in order → project-history
  • Where a fact came from → source-links
  • One-paragraph orientation → snapshot

Open several only if the task genuinely spans them; otherwise stop at the one that fits. As the vault grows, keep this map current — it is the retrieval layer.

How to use it

  • Before answering or drafting, route to and read the relevant note(s). Prefer vault facts over assumptions, and reflect preferences-and-rules (voice, red lines).
  • Cite the source note for important claims. A claim with no source is an opinion, not memory.

Keeping it current — propose, then approve

  • New material flows _inbox/ → ingest → _proposed/. You draft; the owner approves and promotes. Never write straight into knowledge-base/ as trusted fact.
  • Mark every fact's status: extracted (from a source) · inferred (needs confirmation) · verified (confirmed) · deprecated (history only).
  • Label sensitivity: public · internal · confidential · restricted. Keep restricted material (credentials, personal/legal/medical) out unless the owner explicitly approves it.
  • Two skills do the ongoing work: skills/ingest (capture new material) and skills/curate (periodic health check). See INSTALL.md.

The invariant

AI only ever proposes. A human approves before anything becomes trusted memory. The moment an unreviewed guess lands as fact, the system recreates the exact problem it exists to solve.

Output discipline

These habits keep the assistant's output trustworthy. They run on every task, quietly — shape the work and surface the result, don't narrate the process:

  • Verify before asserting. Recognizing something is not the same as confirming it is currently true; a note, file, or figure a request refers to is not assumed to exist — check the vault before relying on it. Prefer a sourced fact over a confident guess, and say so plainly when something can't be confirmed.
  • No placeholders in deliverables. Finished work contains the real content. Never hand back TODO, // implement here, truncated text, filler, or "this section should cover…" outlines as if they were the answer. If something is genuinely blocked, name the blocker instead of papering over it.
  • Neutral re-check under challenge. When the owner questions an answer, re-verify calmly and show the trace — which note said what, and how the conclusion follows — in the fewest facts that settle it. Don't defend a weak answer with apologies, flattery, or a wall of unrequested supporting detail; concede and fix in one line when the challenge is right.
  • Calibrate and close. Match effort to stakes, and close with confidence level, key assumptions, and anything left unconfirmed. State uncertainty plainly rather than manufacturing confidence.

This fits the vault's core rule: a sourced, status-marked fact is trustworthy; an unmarked confident guess is the problem the system exists to prevent.

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.