agentleFS
keggan-stdkeggan-std/Engram/CLAUDE.md

Engram

CLAUDE.md0 starsChanged 4 months agoMITView on GitHub

Bound by tests/process/claude-md.test.ts. If you edit this file and that suite goes red, the edit is the thing that is wrong. Keep it under 200 lines. Charter §10.4a defines recall as any path by which stored Engram content re-enters an agent's context, including generated re-exports and content returned by write calls. It enumerates three channels. This file is a fourth. It restates one Engram convention (the write-order rule below) because that rule has to be known before the first write…

  • Commits and pushes

The file

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

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Do not read docs/archive/ unless you are chasing history.

    line 23
  2. Very specific:

    Call engram_memory(action:"get_file_notes") first.

    line 27
  3. Very specific:

    When a doc's subject ships, is superseded, or is resolved: add a banner saying so with the version and commit, git mv it to docs/archive/, …

    line 74

≈ “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

Engram — working instructions

Bound by tests/process/claude-md.test.ts. If you edit this file and that suite goes red, the edit is the thing that is wrong. Keep it under 200 lines.

This file is a recall channel — declare it if you are suppressing

Charter §10.4a defines recall as any path by which stored Engram content re-enters an agent's context, including generated re-exports and content returned by write calls. It enumerates three channels. This file is a fourth. It restates one Engram convention (the write-order rule below) because that rule has to be known before the first write of a session, and every other route to it is a write. If you are running a suppressed arm of the charter §10 experiment, you have been contaminated by reading this — record it, as docs/STATE.md already instructs for channel 1.

Nothing else here is copied from the store. Everything else is a pointer.

Read order

  1. docs/STATE.md — generated from Engram; where the project actually is.
  2. docs/README.md — the documentation router. It names the active set.
  3. docs/foundations/00-CHARTER.md — the spec this work executes from.

Do not read docs/archive/ unless you are chasing history.

Before you open a source file

Call engram_memory(action:"get_file_notes") first. Every file under src/ is already noted. Open the file only if the note is absent or you have reason to think it is stale. Re-reading the codebase to rediscover what is already recorded is the single most expensive habit here.

Engram write syntax — pass non-text parameters first

Free text last, every time. On any engram_* call that takes both, pass every non-text parameter (action, id, status, priority, tags, task_id, …) before any long free-text field (decision, rationale, notes, content, summary, description).

This is convention #7, and both halves of what it used to say here were wrong. Corrected 2026-08-07.

It is not your syntax error. It is an open upstream decoder bug — anthropics/claude-code#49747 — that folds a trailing parameter into the tail of the preceding string on long arguments. Re-reading the schema will not help, and the issue states plainly that prompt-layer rules cannot prevent it. Ordering works for a mechanical reason only: a long field placed last has no following parameter left to swallow.

The server now refuses such a write rather than storing a row with a missing field. On a MALFORMED TOOL CALL error, nothing was written — reorder and retry, or split the text. A corrupted observation can now be repaired with update_observation; other row types still cannot.

Evidence grading — do not promote silently

GradeMeans
PROVENYou ran an executable check and quoted its output
VERIFIEDYou personally read the source and cited file:line
REPORTEDA sub-agent said so, and you have not re-checked it

Anything CRITICAL needs an executable check, not an argument. "This is consistent with X" is REPORTED, never VERIFIED. Never let a REPORTED claim reach a deliverable ungraded.

Status lives in the task board, not in documents

Documents describe; Engram holds state. Two consequences that have each cost a session:

  • Check the tree before sizing work from a task row. Rows have repeatedly read backlog for work that had already shipped — the artifact gets fixed and the row does not, so the board reads as the pessimistic view of a project further along than it says. Verify with git log/git show before you plan against a row.
  • When a plan summarises a domain doc, the domain doc wins. A master-plan definition of done has already described a fix its own domain rejected.

Never leave a status-bearing doc claiming a state that is no longer true

When a doc's subject ships, is superseded, or is resolved: add a banner saying so with the version and commit, git mv it to docs/archive/, and add a line to docs/archive/README.md saying why. This is convention #2, and docs/archive/cross-instance-sharing-bugs.md is the preserved evidence of what happens otherwise — it asserted "not yet fixed" for eight versions after the fix shipped.

What is enforced, and what is only written down

.claude/hooks/guard-branches.mjs is a PreToolUse hook and it will stop you:

  • Writing history on main or develop is denied. Work on v2-foundations or a branch off it.
  • Any git push asks first. Pushing is disclosure — the published line still carries the hazards, and a push fires the tripwire that commits to a release that week. It is a human decision.

Everything else in this file is context, not enforcement. Claude Code delivers CLAUDE.md as a user message after the system prompt; compliance is not guaranteed. If something must happen at a fixed point in the lifecycle, it belongs in a hook, and the hook above is the worked example.

Never apply prism markers to this file

PROVEN 2026-08-06. Claude Code strips block-level HTML comments from CLAUDE.md before it reaches context. A canary file was probed headlessly: the plain-prose marker and the prose inside a [H] zone both arrived; the [A:gist] line inside an HTML comment did not.

So applying prism here inverts prism exactly — the agent loses every compressed directive and receives every word of the prose the convention meant it to skip. Prism is correct for specs, plans and reference docs. It is actively harmful in CLAUDE.md, CLAUDE.local.md, .claude/rules/*.md and auto-memory files. The bound test asserts no zone markers appear here.

Session start is expensive — ask for what you need

engram_session(action:"start") at verbosity:"full" has been measured returning ~277,000 characters, and get_tasks at compact:true ~190,000. Both overflow a tool result. Use verbosity:"summary", and filter reads rather than pulling the board whole.

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.