agentleFS
Magnifico4625Magnifico4625/locus/AGENTS.md

locus

AGENTS.md15 starsChanged 8 months agoMITView on GitHub

This file defines the working contract for AI agents operating in the locus repository. It is intentionally short, opinionated, and practical. Build and maintain Locus as a persistent memory platform for AI coding tools, with the current primary product focus on: Secondary IDE adapters such as Cursor, Windsurf, Cline, and Zed matter, but they must not degrade the primary Codex path.

  • Deletes or force-pushes
  • 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 repository8 other files it gives its agents.

The file

Show its rules and text

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

24 rules. About 0 are common, 20 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈20

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Avoid unnecessary abstraction and speculative complexity.

    line 26
  2. Distinctive:

    Do not touch unrelated code without a clear reason.

    line 28
  3. Distinctive:

    Use tests and checkable success criteria as a competitive advantage, not as an afterthought.

    line 30
  4. Distinctive:

    Do not silently jump to the next major task if the user asked for approval gates.

    line 37
  5. Distinctive:

    Prefer facts, validation results, and concrete trade-offs over reassurance or filler.

    line 39
  6. Very specific:

    Do not fork Locus into separate products for Codex, Claude Code, or other clients.

    line 48
  7. Distinctive:

    Treat them as secondary adapters, not as the driver of core architecture.

    line 70
  8. Distinctive:

    Default to safe capture behavior unless the user explicitly wants richer recall.

    line 77
  9. Very specific:

    Never describe full as risk-free.

    line 82
  10. Distinctive:

    Do not claim semantic recall quality without validating it against real session data.

    line 83
  11. Distinctive:

    Keep shipped state and future ideas clearly separated.

    line 90
  12. Distinctive:

    Do not leave stale “future work” text in shipped docs after a release.

    line 94
  13. Distinctive:

    Prefer local-first validation before GitHub push.

    line 100
  14. Distinctive:

    Keep stable checkpoints and release markers explicit.

    line 101
  15. Distinctive:

    Do not rewrite shared history without explicit approval.

    line 102
  16. Distinctive:

    Prefer clean release flow:

    line 103
  17. Distinctive:

    Do not claim success without verification.

    line 116
  18. Distinctive:

    Search/recall claims require real recall checks, not only unit tests.

    line 119
  19. Distinctive:

    If a failure is environmental or upstream, say so explicitly and do not mislabel it as solved.

    line 120
  20. Very specific:

    Keep canonical product logic in the main locus repository.

    line 126
  21. Distinctive:

    If “one-command install” is the goal, package the runtime as well as the plugin metadata.

    line 128
  22. Distinctive:

    Keep manual MCP setup documented as a fallback until the packaged install path is fully proven.

    line 129
  23. Very specific:

    Preserve legacy stability: Leave packages/claude-code/ untouched unless a shared contract truly requires it, and keep SQLite migrations …

    line 151
  24. Distinctive:

    Safe git discipline: Never use git reset --hard or rewrite shared history without explicit approval.

    line 152

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

This file defines the working contract for AI agents operating in the locus repository.

It is intentionally short, opinionated, and practical.


Mission

Build and maintain Locus as a persistent memory platform for AI coding tools, with the current primary product focus on:

  1. Codex CLI
  2. Codex desktop / extension surfaces
  3. Claude Code compatibility preservation

Secondary IDE adapters such as Cursor, Windsurf, Cline, and Zed matter, but they must not degrade the primary Codex path.


Core Working Style

  • Think before coding.
  • Surface wrong assumptions, hidden confusion, and missed trade-offs early.
  • Prefer simplicity first.
  • Avoid unnecessary abstraction and speculative complexity.
  • Make surgical changes.
  • Do not touch unrelated code without a clear reason.
  • Keep implementation goal-oriented.
  • Use tests and checkable success criteria as a competitive advantage, not as an afterthought.

Collaboration Contract

  • Work task-by-task when the user is driving an execution sequence.
  • Do not silently jump to the next major task if the user asked for approval gates.
  • Communicate directly and concisely.
  • Prefer facts, validation results, and concrete trade-offs over reassurance or filler.
  • Save important project decisions so they remain discoverable across sessions.

Product Rules

1. Keep one Locus, not separate products

  • Do not fork Locus into separate products for Codex, Claude Code, or other clients.
  • Reuse the shared storage, inbox, search, and ingest pipeline wherever possible.
  • Client-specific behavior should be implemented as thin adapters.

2. Codex is the current primary product line

  • Codex CLI and Codex desktop / extension are the primary validation path after v3.3.0.
  • Codex-first work should improve one or more of:
    • installation UX
    • conversational recall quality
    • diagnostics
    • packaging
    • user trust and privacy clarity

3. Claude Code must not regress casually

  • packages/claude-code/** should stay untouched unless a shared contract change truly requires it.
  • Codex work must not create incidental Claude regressions.

4. Secondary IDE support is real but lower priority

  • Cursor, Windsurf, Cline, Zed, and similar MCP clients are important.
  • Treat them as secondary adapters, not as the driver of core architecture.
  • Reuse the same ingest contracts and storage model instead of special-casing each IDE.

Memory And Capture Rules

  • Default to safe capture behavior unless the user explicitly wants richer recall.
  • Be precise about what each mode means:
    • metadata = ingestion and diagnostics first, minimal content recall
    • redacted = practical richer recall with privacy filtering
    • full = maximum recall, explicit warning territory
  • Never describe full as risk-free.
  • Do not claim semantic recall quality without validating it against real session data.
  • Separate “events imported successfully” from “conversation recall is meaningfully useful”.

Documentation Rules

  • Keep shipped state and future ideas clearly separated.
  • Historical delivered roadmap belongs in docs/roadmap/codex.md.
  • Forward-looking Codex work belongs in docs/roadmap/codex-next.md.
  • README, roadmap, release notes, and install docs must tell the same product story.
  • Do not leave stale “future work” text in shipped docs after a release.

Git And Release Discipline

  • Prefer local-first validation before GitHub push.
  • Keep stable checkpoints and release markers explicit.
  • Do not rewrite shared history without explicit approval.
  • Prefer clean release flow:
    • validate locally
    • prepare docs and version metadata
    • push release branch
    • open PR
    • merge intentionally
    • tag stable release
  • Preserve useful local history by archiving before destructive cleanup.

Verification Rules

  • Do not claim success without verification.
  • Runtime claims require runtime checks.
  • Installation claims require installation checks.
  • Search/recall claims require real recall checks, not only unit tests.
  • If a failure is environmental or upstream, say so explicitly and do not mislabel it as solved.

Packaging Rules

  • Keep canonical product logic in the main locus repository.
  • Marketplace repositories or packaging repositories should be thin distribution layers, not second sources of truth.
  • If “one-command install” is the goal, package the runtime as well as the plugin metadata.
  • Keep manual MCP setup documented as a fallback until the packaged install path is fully proven.

Immediate Strategic Priorities After v3.3.0

See docs/roadmap/codex-next.md, but in short:

  1. One-command install for Codex
  2. Richer Codex conversational recall
  3. Codex desktop / extension polish
  4. HTML dashboard
  5. Secondary IDE adapters only after the Codex-first path is strong

v4 Multi-Platform Plugin Safety Rules

v4.0.0 multi-platform zero-call desktop plugins are shipped on main (docs/roadmap/v4-multi-platform-plugins.md). When modifying or testing these plugins:

  • Sandbox isolation: During development and smoke tests, always use isolated LOCUS_STORAGE_ROOT and LOCUS_HOME directories. Never touch live DBs (~/.codex/memory/, ~/.claude/memory/, ~/.locus/memory/), ~/.locus/bin/, or desktop app configs (~/.codex/config.toml, ~/.gemini/config/*, ~/.config/opencode/*, ~/.dsh/*) without explicit approval and prior backups.
  • Sync after changes: Rebuild (npm run build) and re-sync local installed desktop runtimes (node dist/cli.js sync-runtime / install antigravity --yes / install dsh --yes) deliberately only when validating a release or approved change, since live Desktop surfaces may use ~/.locus/ or dist/server.js.
  • Preserve legacy stability: Leave packages/claude-code/** untouched unless a shared contract truly requires it, and keep SQLite migrations strictly additive.
  • Safe git discipline: Never use git reset --hard or rewrite shared history without explicit approval.

Agent Heuristic

When in doubt:

  1. choose the simpler design
  2. validate before claiming
  3. protect shipped behavior
  4. keep docs honest
  5. favor Codex-first product progress without breaking the shared platform

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.