agentleFS
JCodesMoreJCodesMore/agent-recall/AGENTS.md

agent-recall

AGENTS.md17 starsChanged 49 days agoApache-2.0View on GitHub

AGENTS.md is canonical; CLAUDE.md is exactly @AGENTS.md. Read docs/CHECKPOINT.md first when it exists, then docs/GOAL.md (north star, done criteria, plan) and docs/CONTEXT.md (vocabulary). Provider format notes live in docs/providers.md. A local CLI plus one Agent Skill that lets any coding agent search and read the user's past conversations from Claude Code, Codex, OpenCode and Cursor. The repository root is the skill: SKILL.md is the only skill file, and the Claude plugin, npx skills add and the installer all ship this…

  • 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 31,439 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 repository2 other files it gives its agents.

The file

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

4 rules. About 0 are common, 2 are distinctive, and 2 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.

  • 2

    Very specific

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

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

    Every limit, default and version lives in src/shared/config.mjs.

    line 36
  2. Distinctive:

    Test through the service and the CLI, not SQL.

    line 54
  3. Distinctive:

    Commit at every verified step with a plain message saying what changed and why.

    line 72
  4. Very specific:

    Keep docs/CHECKPOINT.md current: objective, decisions, done, active, next.

    line 76

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

Working agreement: Agent Recall

AGENTS.md is canonical; CLAUDE.md is exactly @AGENTS.md. Read docs/CHECKPOINT.md first when it exists, then docs/GOAL.md (north star, done criteria, plan) and docs/CONTEXT.md (vocabulary). Provider format notes live in docs/providers.md.

What this is

A local CLI plus one Agent Skill that lets any coding agent search and read the user's past conversations from Claude Code, Codex, OpenCode and Cursor. The repository root is the skill: SKILL.md is the only skill file, and the Claude plugin, npx skills add and the installer all ship this folder as it is. Keep the root lean because every file in it gets installed.

Architecture

scripts/recall.mjs   CLI entry (stable path; other tools call it)
src/cli/             argv parsing, commands, text and JSON rendering
src/recall.mjs       the service: the one API the CLI and tests use
src/search/          query parsing, ranking, snippets
src/read/            transcript paging and export
src/index/           SQLite schema, sync writer, lock
src/providers/       one module per provider; all format knowledge lives here
src/peers/           other computers over SSH: peers.json, remote calls, merging
src/install/         installer
src/shared/          config, paths, ids, text helpers
  • Dependency direction: cli -> recall|peers, recall -> search|read|index -> providers -> shared, peers -> shared. Providers never import from index, search or cli.
  • A provider turns its store into normalized sessions, turns and messages. Nothing outside src/providers/ knows a provider's file format.
  • The index is derived state. Deleting it and running sync rebuilds it. Provider stores are opened read-only and never written.
  • Every limit, default and version lives in src/shared/config.mjs. A value that appears in two places is a review failure.

Less is more

  • Build the smallest complete thing that meets the goal line it serves. Add a mechanism only for a need shown by a fixture, a measurement or a real usage failure.
  • Strict core, tolerant providers: a provider skips what it cannot parse, counts it, and keeps going. Search and storage assume normalized input.
  • Validate at the edges (argv, provider records), then trust inward.
  • Agent-facing output is compact text by default and stable JSON with --json. Every result names the next command to run.

Tests

  • Fixtures are synthetic and built in code with test/helpers/ (a fake home per test). Never commit real transcript content, and invent names: real project names and chat titles from local history are private too (the repository is public).
  • Test through the service and the CLI, not SQL. Expected values are literals.
  • npm test runs everything; node --test test/<file>.test.mjs runs one file while editing.
  • npm run eval is the recall benchmark. A ranking change must not lower it.
  • npm run check (tests plus eval plus skill lint) is green before every commit. Report failures with their output.
  • CI runs the check on Linux, macOS and Windows with the oldest and newest supported Node. Build paths with node:path, spawn process.execPath rather than a shell, and treat path case as the platform does (comparablePath).

Code

  • Plain ESM JavaScript on Node >= 22.16 (or 24+; see APP.MIN_NODE), no runtime dependencies, node:sqlite for storage.
  • Files under 400 lines, guard clauses, named constants, comments only for a non-obvious why.
  • Bump INDEX_VERSION in src/shared/config.mjs whenever normalized output changes, so existing indexes rebuild instead of mixing shapes.

Git and process

  • Commit at every verified step with a plain message saying what changed and why. No attribution lines.
  • Brief every subagent with the goal line it serves, the files it owns, the interfaces it must honor and the check to run. Reads parallelize; writes serialize.
  • Keep docs/CHECKPOINT.md current: objective, decisions, done, active, next. Update it at each slice boundary.

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.