agentleFS
GigleAIGigleAI/cavil-loop/docs/AGENTS.md

cavil-loop

AGENTS.md20 starsChanged 2 days agoMITView on GitHub

Rules for the external user documents — the pages people outside this repo read to install, configure and use cavil-loop. Read this before editing any of them. It is written for agents and exists in English only (like the root AGENTS.md); the rest of the root AGENTS.md still applies. The list is computed in one place, external_docs in tests/lib/doc_links.py; the checks below use it. A new page directly under docs/ is covered automatically — give it both language copies. -…

  • 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 33,398 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

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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. Distinctive:

    Say how it works now: No history of how it got there: no "at first … later changed to …", no "since GitHub#N", no "before the rename it was …

    line 22
  2. Very specific:

    Leave the blank line after <summary>…</summary> — without it GitHub does not render the markdown inside.

    line 40
  3. Very specific:

    All of them are # kind: guard tests: they run in bash tests/run.sh --quick, on every PR and in the pre-commit hook.

    line 85

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

docs/AGENTS.md

Rules for the external user documents — the pages people outside this repo read to install, configure and use cavil-loop. Read this before editing any of them. It is written for agents and exists in English only (like the root AGENTS.md); the rest of the root AGENTS.md still applies.

Which files these rules cover

Covered (external user documents)Not covered (internal, keep their history)
README.md / README.zh.mddocs/retrospectives/ — reports written by the post-merge retrospective
CONTRIBUTING.md / CONTRIBUTING.zh.mddocs/design/ — mock-ups that old issue comments link to by URL
every *.md directly under docs/ (one English + one .zh.md copy each), except this fileevery AGENTS.md, including this one
their pictures: docs/images/, docs/client-screens/, docs/logo/, docs/github_project.png (the README's first picture)prompts/ and .agents/ (templates, lessons.md, review.extra.md)

The list is computed in one place, external_docs in tests/lib/doc_links.py; the checks below use it. A new page directly under docs/ is covered automatically — give it both language copies.

How to write them

  • Say how it works now. No history of how it got there: no "at first … later changed to …", no "since GitHub#N", no "before the rename it was …". A compatibility fact that still holds is stated as a present fact ("installs from before the rename keep the path X working"), without the story behind it.
  • No issue or PR numbers (GitHub#N, PR #N, #N pointing at this repo's work). A link to an issue a reader should follow today (for example a feature still in progress) is fine.
  • Core outside, details folded. Under each heading, one to three sentences a reader can stop at: what it is, whether it is on by default, how to turn it on or off. Rules, edge cases, long commands and long tables each go into their own folded block:

    <details><summary>Details: what happens when the read fails</summary>
    
    …markdown…
    
    </details>

    Leave the blank line after <summary>…</summary> — without it GitHub does not render the markdown inside.

  • Headings never go inside a folded block. ## / ### headings are link targets (other docs, templates and AGENTS.md link to them); a heading inside <details> is hidden until someone opens the block.
  • Both languages say the same thing. Change x.md and x.zh.md in the same commit.
  • In the orchestration guide, upper case is for settings and the tool's variables only. This applies to docs/orchestration.md / docs/orchestration.zh.md alone — the only documents whose upper-case names are checked. In an example script there (a hook, a command block), the script's own variables are written in lower case (port=5555, dir="$WORKTREE"); an upper-case name always means a setting from the config example or a variable the tool passes in. tests/orchestration-docs.test.sh relies on this: it does not try to work out from the text when a shell assignment takes effect (indentation, subshells, command-prefix assignments and commented-out lines made every such guess wrong in both directions), it checks every upper-case name it sees. Other documents' command blocks are not bound by it (the operations guide's verbatim blocks keep names like KEY=… / CONF=…, and tests run them as written).

Where the reasons go

Design reasons, rejected alternatives and the history of a behaviour belong in the root AGENTS.md or in a comment next to the code — not in these documents. Agents reading AGENTS.md need that trail; a user reading the docs does not.

When a document must change

  • A change to anything a user can see — behaviour, a default, a setting, a command, a label — updates the matching external document, both languages, in the same PR.
  • Renaming or removing a heading means updating every link to it in the whole repository (other docs, prompts/, every AGENTS.md) in the same PR. The link check below finds them.
  • A command block that a test runs verbatim (wrapped in <!-- …:begin --> / <!-- …:end --> markers) is moved as a whole and changed in both languages together; the tests compare the two copies.
  • The explainer diagrams in docs/images/ are generated: change scripts/doc-diagrams/gen.py, run python3 scripts/doc-diagrams/gen.py, commit the output.

Checks

WhatWhereRun
Every relative link and #anchor in the external documents resolves; so do the links in prompts/, .agents/ and every AGENTS.md that point at them; every external document has its other-language copytests/doc-links.test.sh (parser: tests/lib/doc_links.py, shared with tests/client-docs.test.sh)bash tests/doc-links.test.sh
The client guide's screenshots, structure and network-boundary wordingtests/client-docs.test.shbash tests/client-docs.test.sh
The diagrams equal the generator's output, animate correctly, and each page references its own language's picturestests/doc-diagrams.test.shbash tests/doc-diagrams.test.sh
The orchestration guide names only real settings, and its example commands run as writtentests/orchestration-docs.test.shbash tests/orchestration-docs.test.sh
No issue / PR number in any external document (GitHub#N, PR #N, owner/repo#N, a parenthesised (#N)), command blocks included; internal files keep theirstests/doc-numbers.test.sh (--numbers, the NUMBER pattern in tests/lib/doc_links.py)bash tests/doc-numbers.test.sh

All of them are # kind: guard tests: they run in bash tests/run.sh --quick, on every PR and in the pre-commit hook.

The number check deliberately lets two forms through, because telling them from a history reference needs a reader: a bare #42 (the README's worked example, a search example, "sort key #1") and a link whose text is the number ([#628](https://github.com/…/issues/628), a feature still in progress). The reviewer checks those by reading.

The "no history narrative" rule is not checked by a text test: phrases like "at first" or "后来" appear in plenty of legitimate sentences, and every pattern tried raised more false alarms than real hits. The reviewer checks it by reading.

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.