agentleFS
pedropacheco95pedropacheco95/cortex/AGENTS.md

cortex

AGENTS.md2 starsChanged 25 days agoMITView on GitHub

This project keeps its knowledge in cortex/: plain markdown, one subject per file. This map is the only part loaded every session; read the rest when you need it. Tie-breaker: The subject is what the fact constrains. If it constrains two, file it under the one the reader would be working in when it bites, and add an alias in the other. Terms: archive, cerebrum, compass, cortex-extract-insight, cross-scope unification pass, cross-scope-unification, domain.archive, domain.compass, domain.cortex-extract-insight, domain.cross-scope-unification, domain.extraction-level, domain.extraction-scope, domain.insight, domain.provenance, domain.scope-registry,…

The file

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

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    Search first: rg -i '<word>' cortex/, and rg '^about:' cortex/ as the index.

    line 23
  2. Distinctive:

    If a file for the subject exists, append the fact to it.

    line 24
  3. Very specific:

    If core.hooksPath is .githooks, a git hook checks every commit.

    line 63
  4. Distinctive:

    If the request contradicts a rule, a 'Not this spec' line or a recorded decision the owner made, do not build it: write the spec with the …

    line 77
  5. Distinctive:

    If the request creates a behaviour no criterion covers, or touches more than one spec, do not write code: run specflow-spec first and stop …

    line 79
  6. Distinctive:

    If you were told the user can't answer during this run, don't wait: decide, write the decision and its reason under Open questions in the …

    line 81

≈ “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
<!-- cortex:start v4.0 -->

Cortex

Cortex map

This project keeps its knowledge in cortex/: plain markdown, one subject per file. This map is the only part loaded every session; read the rest when you need it.

  • code/<area>/: how to work in one code area (pitfalls, commands, conventions, why the code is this way). Goes stale with the code.
  • world/: people, orgs, terms, systems, agreements, decisions and rules. Goes stale with people and the outside world.
  • history/: dated and append-only: sources, changes, incidents, measurements. Never stale.
  • now/: true only for now; every item carries until: and expires on that date.

Where to look

  • An unknown term → world/terms/
  • A person or a role → world/people/, world/orgs/
  • An error message → grep its literal text in cortex/
  • "Why is it like this?" → world/decisions/ and history/
  • "What is happening now?" → now/
  • "How do we work?" → world/rules/

Filing a new fact

  1. Search first: rg -i '<word>' cortex/, and rg '^about:' cortex/ as the index.
  2. If a file for the subject exists, append the fact to it.
  3. Otherwise create one, in the folder the table below gives.
  4. Apply the tie-breaker below when the fact fits two subjects.
  5. One fact lives in exactly one file. Link to it; never restate it.
  6. Set verified: <YYYY-MM-DD> (observed|told|inferred) and origin (where the fact came from).
  7. End with the readback line Filing: <fact> → <path> (origin: <origin>).
The fact is…Folder
how to work in a code area: pitfall, command, convention, why the code is this waycode/<area>/
who someone is, or an organisationworld/people/, world/orgs/
what a word means hereworld/terms/
an external system, environment, service or account pointerworld/systems/
an agreement with a client, partner or the userworld/agreements/
the current answer to a question, and whyworld/decisions/
how we work (a rule the user set)world/rules/
something that happened: a change, incident, measurement or ingested documenthistory/<kind>/
true only for now: sprint, leave, status, risk, open question, ideanow/

Tie-breaker: The subject is what the fact constrains. If it constrains two, file it under the one the reader would be working in when it bites, and add an alias in the other.

Cast

  • external-wave-coordinator: External project coordinator (unnamed)

Terms: archive, cerebrum, compass, cortex-extract-insight, cross-scope unification pass, cross-scope-unification, domain.archive, domain.compass, domain.cortex-extract-insight, domain.cross-scope-unification, domain.extraction-level, domain.extraction-scope, domain.insight, domain.provenance, domain.scope-registry, domain.ungated-layer, extraction-level, extraction-scope, insight, insight layer, provenance, scope, scope-registry, ungated, ungated-layer

Specs

specflow/ holds the specs. specflow/promises/<area>/ has short promises (P-… ids) on what the product guarantees. specflow/impl/<area>/ has implementation specs: their rules are numbered under a Rules heading, and their acceptance criteria carry stable ids (PAY-REFUND-3). Spec text that points at .specflow/specs/<a>/<b>.spec.md or .specflow/specs-business/… means the same file under specflow/impl/ or specflow/promises/. A value more than one spec uses is a constant in a constants.md; a spec sees its own folder's and its ancestors' constants, no others. A test cites a criterion by its id: vitest it('[PAY-REFUND-3] …'), pytest @pytest.mark.criterion("PAY-REFUND-3"). specflow/INDEX.md (criteria, their tests, unverified marks, constants) is generated; never edit it.

A finished change updates or adds the criterion for every behaviour it changes or adds, and a test that cites it.

If core.hooksPath is .githooks, a git hook checks every commit. It runs no tests. It refuses:

  • a commit that changes code or config (anything outside specflow/, cortex/, tests, .githooks/ and .md files) without changing a test;
  • a commit that changes a spec's rules or criteria together with code or config. Commit the spec change on its own, before or after the code;
  • a commit that changes the text of an existing rule or criterion without a trailer Specflow-Amends: <spec-id>#<rule-7 or criterion id> — <reason>, one per item. A new rule or criterion needs none.

Merge commits are checked the same way on what the merge itself changes.

Specs say what should hold; code says what does. Before changing code, find what produces the behaviour today and what depends on it. If a criterion describes what you change, change the criterion in the same change.

An unverified criterion is a claim about the code, not a fact; check the code.

If the request contradicts a rule, a 'Not this spec' line or a recorded decision the owner made, do not build it: write the spec with the conflict as an open question and stop.

If the request creates a behaviour no criterion covers, or touches more than one spec, do not write code: run specflow-spec first and stop for review.

If you were told the user can't answer during this run, don't wait: decide, write the decision and its reason under Open questions in the spec, and continue. This never applies to a conflict with a recorded owner decision; that always stops.

<!-- cortex: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.