engraphis
CLAUDE.md184 starsChanged 5 months agoApache-2.0View on GitHub
The full operating manual for this repo lives in @AGENTS.md — read it first. It is the canonical, vendor-neutral source (architecture, commands, conventions, algorithms, gotchas); everything there applies to Claude Code. This file adds only Claude-specific guidance, so the two never drift. Two codebases share engraphis/: v2 (core/ + backends/ — the target) and the v1 legacy FastAPI server (app.py, routes/, stores/, engines/, flat namespaces). Build new capability on v2 behind the interfaces in core/interfaces.py. Decide which side a change…
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- engraphis-memorySkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Use the exact primary offline gate in AGENTS.md §1.
- Very specific: line 53
Pre-digest large outputs: Don't read raw diffs/logs/reports over ~200 lines directly.
- Distinctive: line 57
Report-only stops are a bug: Don't end a working turn with "next I will…" while non-blocked work remains — make the first tool call of that …
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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.
Files
CLAUDE.md
The full operating manual for this repo lives in @AGENTS.md — read it first. It is the canonical, vendor-neutral source (architecture, commands, conventions, algorithms, gotchas); everything there applies to Claude Code. This file adds only Claude-specific guidance, so the two never drift.
The one rule that prevents most mistakes
Two codebases share engraphis/: v2 (core/ + backends/ — the target) and the v1
legacy FastAPI server (app.py, routes/, stores/, engines/, flat namespaces). Build new
capability on v2 behind the interfaces in core/interfaces.py. Decide which side a change
belongs to before editing. Full table: AGENTS.md §0.
Before you say "done" — run the canonical gate
Use the exact primary offline gate in AGENTS.md §1; do not maintain a smaller duplicate here.
.github/workflows/ci.yml is authoritative for the current Python matrix and dedicated
typecheck, encryption, and built-artifact jobs. No network or API key is required for the primary
gate. If you changed retrieval, scoring, or ranking, add or update an eval—per AGENTS.md §3.7,
"better" needs a number, not an assertion.
Slash commands available here
/init— regenerate codebase documentation./review— review a GitHub pull request (/code-reviewfor the local working diff)./security-review— review pending changes for vulnerabilities. Run this before finishing any change to the write/ingest path: ingested content is treated as untrusted and memory poisoning is an explicit threat. This now also coversMemoryEngine.index_repo()(reads local files at an agent-supplied path — seeSECURITY.md§5) and the deterministic conflict resolver (core/resolve.py).
Working style in this repo
- Interface-first & dependency-light (AGENTS.md §3): every
core/module, includingcore/engine.py, remains protocol-only and runnable on NumPy. Concrete backend selection lives in the outer composition rootengraphis/factory.py;engraphis/__init__.pyregisters it forMemoryEngine.create(), andengraphis.create_memory_engine()exposes it directly. Gate heavy imports behind backend factories and never import a concrete backend fromcore/. - House style:
ruffline-length 100, Python 3.9-compatible syntax, pure/tested scoring functions, provenance and scope on every memory. - Be concise and direct in chat — explain the why of a change briefly, link the file, and let the diff speak.
- When code and docs disagree, the code wins — then fix the doc in the same change, and
update
AGENTS.md/CLAUDE.mdif a convention or command changed.
Token & turn discipline (added 2026-07-10, trimmed from FTSO)
- Set worker models explicitly. Subagents inherit the parent (premium) model by default.
Mechanical work — search fan-out, digests, test sweeps, triage — goes to
haiku/sonnetworkers; keep the premium model for judgment, architecture, review, and synthesis. - Pre-digest large outputs. Don't read raw diffs/logs/reports over ~200 lines directly; have a cheap lane produce a bounded digest plus flagged hunks, then inspect only what matters.
- Dense turns. While background lanes or long commands run, do useful inline work (review, docs, planning) instead of ending the turn to wait.
- Report-only stops are a bug. Don't end a working turn with "next I will…" while non-blocked work remains — make the first tool call of that next step instead. Valid turn ends: a real blocker with one specific question, a user taste/priority fork, a safety/permission gate, a background task that will wake the thread, or verified completion.
- Safety gates always win (unchanged): the offline gate,
/security-reviewon write/ingest paths, and eval-backed claims are never skipped to "keep moving".
Memory typing for recurring events
Choose the contract before writing a recurring operational outcome (tick, no-op, health check).
For an append-only occurrence ledger, use engraphis_record_event with a stable kind; event rows
have no mtype and are not recalled or consolidated. When the outcome must enter memory recall or
consolidation, use engraphis_remember with mtype="episodic", low importance (≤0.2), and normal
dedupe—never working and never semantic at write time. Full decision test:
skills/engraphis-memory/references/CONVENTIONS.md §Recurring operational outcomes.
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.

