agentleFS
kitfunsokitfunso/hippo-memory/AGENTS.md

hippo-memory

AGENTS.md796 starsChanged 2 months agoMITView on GitHub

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,337 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.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

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

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

  • ≈3

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Read README.md, PLAN.md, ROADMAP.md, and relevant docs before broad product or architecture changes.

    line 5
  2. Distinctive:

    Document public APIs with JSDoc.

    line 21
  3. Very specific:

    Prefer focused tests in tests/ or nearby integration/eval harnesses before changing memory behavior.

    line 22
  4. Very specific:

    No production export for a test.

    line 27
  5. Very specific:

    Do not commit generated dist/ or UI build output unless the repo expects it for a release.

    line 28
  6. Common:

    Use Hippo memory commands when useful, but do not store secrets.

    line 35
  7. Common:

    Never store secrets, API keys, tokens, raw private emails, or sensitive personal data in Hippo memories.

    line 39
  8. Very specific:

    Never break the public hippo CLI command names without a migration path.

    line 40
  9. Distinctive:

    Never auto-graduate long-term lessons without evidence and rationale.

    line 41
  10. Distinctive:

    Never delete memory history when archiving or weakening would preserve recoverability.

    line 42
  11. Very specific:

    Never ship release changes without npm run build:all.

    line 43
  12. Distinctive:

    When Hippo's prompt hook is installed, it injects pinned rules and the memories that match each prompt, so never load them yourself.

    line 48
  13. Common:

    When you learn something that should outlive this session (a decision and its reason, a user preference, a lesson), record it right then, …

    line 62
  14. Distinctive:

    When Hippo's Codex wrapper is installed, session-end capture runs automatically.

    line 69
  15. Distinctive:

    If the wrapper is not installed, capture a brief summary manually:

    line 70

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

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

AGENTS.md - Hippo

Project

  • hippo-memory, a TypeScript memory system and CLI with UI, integrations, benchmarks, and evaluation harnesses.
  • Read README.md, PLAN.md, ROADMAP.md, and relevant docs before broad product or architecture changes.
  • Work plane boundary: docs/plans/2026-09-12-work-plane-boundary.md (ROADMAP Part VII, Track W, W0).

Commands

npm run build
npm test
npm run test:eval   # the eight slow token-eval harness tests, which npm test skips; --project codex runs the four Codex ones
npm run build:ui
npm run build:all
npm run smoke:pack
npm run smoke:openclaw-install

Rules

  • Preserve public CLI and package APIs unless the user asks for a breaking change.
  • Document public APIs with JSDoc.
  • Prefer focused tests in tests/ or nearby integration/eval harnesses before changing memory behavior.
  • Name a new test file after the behaviour it pins, not the ticket (store-stats-concurrency.test.ts, not a7-t3.test.ts). Seed test stores through makeRoot or makeStore, createMemory and writeEntry; write raw SQL only when the test is about SQL. makeRoot copies a store migrated once per run, so call initStore only to test a migration or a first open.
  • A test that starts a child process ends in .process.test.ts; one that starts only the HTTP server or a worker thread ends in .server.test.ts. Both get 30 s and the rest 5 s; scripts/checks/check-test-env.mjs fails a name that does not match.
  • A new test file needs a contract with no owner file: find the owner and add a row first.
  • One owner per contract at the strongest boundary, with one wire-up row per other transport; a test written to carry a refactor is deleted by the PR that lands it.
  • No production export for a test; seed helpers live in tests/_helpers.
  • Do not commit generated dist/ or UI build output unless the repo expects it for a release.
  • A PR's changelog entry goes in its own changelog.d/<branch-with-dashes>.md, never in CHANGELOG.md; the release commit folds them in (changelog.d/README.md).
  • The site in website/ has its own rules, in website/AGENTS.md: read them before a change there.
  • CI fails when any oxlint rule's hit count rises above .oxlint-baseline.json. Fix new hits in the files you touch; after clearing old ones, node scripts/checks/check-lint-ratchet.mjs --update and commit the lower baseline.
  • Comments say why, in one line. Ticket codes, versions, reviewer notes and dates go to docs or the git log; CI fails when a file's count of them rises above .comment-history-baseline.json. After rewriting old ones, node scripts/checks/check-comment-history.mjs --update and commit the lower baseline.
  • No src/ or test file over 800 lines, no src/ function over 50 lines (80 in scripts/) and no function over 5 positional parameters: oxlint's max-lines, max-lines-per-function and max-params hold them through the lint ratchet. No new src/ line over 120 characters: node scripts/checks/check-long-lines.mjs, with --update after removing old ones.
  • An eval that reads host transcripts (~/.claude/projects/*.jsonl) copies its corpus outside the repo at registration and names the copy in the prereg: Claude Code deletes sessions after 30 days by default, so a live-path corpus cannot be re-run.
  • Use Hippo memory commands when useful, but do not store secrets.
  • The compactions table is one record per Claude Code compaction, not a memory row: recall, FTS, context and sleep's memory passes never read it. Memories saved from a compaction carry the compaction-memory tag and a compaction: source and fade like any other memory; a restated item is skipped, and another session's restatement strengthens the row it repeats. The keep rule (KEEP_PAIRS in src/base/memory/memory.ts) covers imported agent memories only and needs tag and source both; canAutoDelete and AUTO_DELETABLE_SQL (src/store/rule-sql.ts) must change together. No automatic pass (sleep, dedupe, audit) deletes a memory that backs an object: AUTOMATIC_DELETE_SQL in src/store/delete-and-batch.ts checks every table in MEMORY_BACKED_TABLES.

Never Do

  • Never store secrets, API keys, tokens, raw private emails, or sensitive personal data in Hippo memories.
  • Never break the public hippo CLI command names without a migration path.
  • Never auto-graduate long-term lessons without evidence and rationale.
  • Never delete memory history when archiving or weakening would preserve recoverability.
  • Never ship release changes without npm run build:all.
<!-- hippo:start -->

Project Memory (Hippo)

When Hippo's prompt hook is installed, it injects pinned rules and the memories that match each prompt, so never load them yourself. If no hippo memory block has appeared in this session, run this at the start of a task and read the output before writing any code:

hippo context --auto --budget 1500

On errors or unexpected behaviour, record it right then, while you work, never as a closing step:

hippo remember "<description of what went wrong>" --error

When you learn something that should outlive this session (a decision and its reason, a user preference, a lesson), record it right then, while you work, never as a closing step. Leave out secrets and personal details:

hippo remember "<what you learned and why>"

When Hippo's Codex wrapper is installed, session-end capture runs automatically. If the wrapper is not installed, capture a brief summary manually:

hippo capture --stdin <<< '<decisions, errors, lessons: 2-5 bullets>'
<!-- hippo:end -->

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.