remnic / src
AGENTS.md213 starsChanged 9 months agoMITView on GitHub
This directory contains the TypeScript source for the openclaw-engram plugin. Active sequencing and contributor priority live in the GitHub Project: Use the project for current order/blockers, then read the relevant historical design doc before changing these surfaces: See AGENTS.md (root) for the full list. Key reminders: After any change to this directory:
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use the project for current order/blockers, then read the relevant historical design doc before changing these surfaces:
- Distinctive: line 69
After any change to this directory:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Source Directory — Agent Guide
This directory contains the TypeScript source for the openclaw-engram plugin.
Active Development References
Active sequencing and contributor priority live in the GitHub Project:
Use the project for current order/blockers, then read the relevant historical design doc before changing these surfaces:
orchestrator.ts— seedocs/plans/README.mdand the relevant v8 design docs underdocs/plans/graph.ts— seedocs/plans/2026-02-22-v8.2-pr18-graph.mdtmt.ts— seedocs/plans/2026-02-22-v8.2-tree-graph-design.md
Critical Invariants (enforce in all changes)
See AGENTS.md (root) for the full list. Key reminders:
- Recall pipeline order is a contract — retrieve → filter → rerank → cap → format. Never cap before filter.
- Artifact isolation —
artifacts/paths must never appear in generic QMD recall. no_recallgates everything — when planner returnsno_recall, skip all retrieval paths.- Config
0means0— never coerce zero limits to non-zero values. - OpenAI Responses API only — never use Chat Completions anywhere in this directory.
- Procedural memory (issue #519) — Shipped off until
procedural.enabledistruein plugin config. Seedocs/procedural-memory.mdbefore changing procedure extraction, recall injection, or mining.
File Ownership
| File | Purpose | Stability |
index.ts | Plugin entry point; hook registration | Stable |
config.ts | Config parsing with defaults | Stable |
types.ts | Shared TypeScript interfaces | Stable (add, don't remove) |
logger.ts | Logging wrapper | Stable |
storage.ts | File I/O for memories (markdown + YAML) | Stable |
buffer.ts | Smart turn accumulation | Stable |
extraction.ts | GPT extraction engine | Stable |
retrieval.ts | Recall pipeline implementation | Stable |
qmd.ts | QMD search client | Stable |
intent.ts | Intent heuristics (morphology-aware) | Stable |
signal.ts | Signal-based flush triggers | Stable |
importance.ts | Zero-LLM importance scoring | Stable |
himem.ts | Episode/Note classification (v8.0) | Active development |
boxes.ts | Memory Box builder + Trace Weaver (v8.0) | Active development |
orchestrator.ts | Core coordination | Active development (v8.2) |
tools.ts | Agent-callable tool implementations | Stable |
cli.ts | CLI command implementations | Stable |
extraction-judge.ts | LLM-as-judge fact-worthiness gate (#376) | Stable |
semantic-chunking.ts | Topic-boundary chunking (#368) | Stable |
page-versioning.ts | Snapshot-based version history (#371) | Stable |
source-attribution.ts | Citation/attribution helpers (#379) | Stable |
enrichment/ | External enrichment pipeline (#365) | Stable |
binary-lifecycle/ | Binary file management (#367) | Stable |
taxonomy/ | MECE taxonomy resolver (#366) | Stable |
memory-extension/ | Extension publisher contract (#381, #382) | Stable |
memory-extension-host/ | Extension host discovery (#381) | Stable |
recall-mmr.ts | Maximal marginal relevance reranking | Stable |
recall-qos.ts | Recall quality-of-service | Stable |
recall-audit.ts | Recall audit trail | Stable |
session-integrity.ts | Session integrity checks | Stable |
session-toggles.ts | Per-session feature toggles | Stable |
compat/ | Provider compatibility checks | Stable |
dedup/ | Deduplication engine | Stable |
curation/ | Memory curation pipeline | Stable |
Testing
After any change to this directory:
npm run check-types # TypeScript strict check
npm run check-config-contract # Config schema alignment
npm run preflight:quick # Fast test gate
npm run test:entity-hardening # Required for orchestrator/storage/intent/cache/retrieval/config edits
npm test # Full suiteNew logic in any file above requires corresponding tests in tests/.
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.

