agentleFS
jeanjeromejeanjerome/pi-495/AGENTS.md

pi-495

AGENTS.md1 starsChanged 55 days agoApache-2.0View on GitHub

This file is the project context for every AI agent; Claude Code reads it via the CLAUDE.md symlink. CONVENTIONS.md carries the standards the code meets. cycle/README.md carries how a change is made. Read both before writing code, and cycle/README.md before any git operation. specs/ is the project: what remains to do (specs/plan.yaml), the dossier of each epic added since e38 (specs/epics/, cited as the source: of its plan entry), the stories of the open work (specs/stories/), the defects (specs/bugs/), the…

  • 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,266 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 repository4 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

14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Put an arbitration to the owner in plain French, without identifiers, scores or coded vocabulary: state what each option costs and what it …

    line 13
  2. Distinctive:

    Before asking the owner anything, ask why the question exists.

    line 16
  3. Distinctive:

    Verify before asserting, including against the repository's own record.

    line 24
  4. Very specific:

    Keep dependencies at their latest published version whenever Preflight stays green — a bound left behind is a divergence waiting to happen, …

    line 26
  5. Distinctive:

    Keep dependency direction one-way.

    line 88
  6. Very specific:

    Write commit messages in English, as <type>: <description>, one line, describing the resulting behavior — whatever the language of the …

    line 95
  7. Distinctive:

    Never dismiss a reproducible gate failure as pre-existing or out of scope.

    line 99
  8. Very specific:

    Never proceed on a red Preflight (npm run check) — fix it before forward work.

    line 100
  9. Very specific:

    Never hand-edit dist/ — rebuild it with npm run build.

    line 101
  10. Very specific:

    Never import an @earendil-works Pi package from domain/, contracts/, ports/, application/, or export/, nor any but pi-tui from …

    line 102
  11. Very specific:

    Never claim a CMP-* component id in src/ without a matching row in specs/amont/conception-technique.md §4.1.

    line 103
  12. Very specific:

    Never let an unqualified sandbox backend run unconfined.

    line 104
  13. Distinctive:

    Write the minimum code that solves the stated problem.

    line 130
  14. Distinctive:

    Run tests after every change.

    line 131

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

495 (pi-495) — AI Agents

This file is the project context for every AI agent; Claude Code reads it via the CLAUDE.md symlink.

CONVENTIONS.md carries the standards the code meets. cycle/README.md carries how a change is made. Read both before writing code, and cycle/README.md before any git operation.

Where things are

specs/ is the project: what remains to do (specs/plan.yaml), the dossier of each epic added since e38 (specs/epics/, cited as the source: of its plan entry), the stories of the open work (specs/stories/), the defects (specs/bugs/), the product decisions (specs/adr/), the evidence (specs/verifications/), the normative corpus (specs/amont/, read by two Preflight controls), and the measurements written before the switch (specs/archive/). cycle/ is the process: the six steps, the review rules, the story format and the tool that drives them. specs/README.md indexes the first; cycle/README.md the second. site/ is the static landing page published at https://jeanjerome.github.io/pi-495/: plain HTML, CSS and JavaScript with no build step, deployed as is by .github/workflows/pages.yml on every push to main that changes it; the French and English pages are edited separately, and python3 -m http.server --directory site serves it locally.

Learned User Preferences

  • Put an arbitration to the owner in plain French, without identifiers, scores or coded vocabulary: state what each option costs and what it buys. Keep the coded vocabulary for the written artefact that records the answer, not for the question that asks for it.
  • Before asking the owner anything, ask why the question exists. A question about a mechanism the goal never required is not an arbitration — it is the mechanism asking to be kept. Most questions worth his time should have been settled when the goal was written; one that appears late usually marks a solution that grew past its purpose. Remove the cause rather than route the question.
  • State a conclusion only once the evidence that could overturn it has been read. Reading the binding documents before the scenarios that exercise them produced two opposite verdicts on the same corpus in one sitting. When a pass is partial, say what is still unread and what would change the answer — a provisional finding announced as a finding costs a reversal later.
  • Verify before asserting, including against the repository's own record. A plausible cause stated as fact has to be retracted; the same cause checked first is worth more and costs one command.
  • Keep dependencies at their latest published version whenever Preflight stays green — a bound left behind is a divergence waiting to happen, and a caret on a 0.x version silently locks the minor. The exception is a bound that guards a declared floor: @types/node tracks engines.node, not the newest release (specs/adr/D-50).

Workspace Facts

  • Shell utilities on this machine are the GNU ones, installed by Homebrew and put ahead of the system's on PATH through gnubin shims — so GNU syntax is the syntax that works: sed -i with no backup suffix, grep -P, find -printf, and GNU coreutils for date, stat, readlink, realpath, head, sort. Measured, not assumed: grep is ugrep and find is bfs, and both take the GNU flags anyway. The exception is awk — /usr/bin/awk, the BSD one, not gawk, so gensub and the other gawk extensions fail. Keep awk to POSIX, or call gawk by name.
  • Pi ships its reference on the machine, offline, in the installed package: 40 doc pages under node_modules/@earendil-works/pi-coding-agent/docs/ and 79 working extensions under examples/extensions/. Read them before specifying a capability or deducing a fact from outside Pi (specs/adr/D-55). provider-payload.ts reports in 18 lines what a Preflight control was written to guess from third-party source.

Project

495 drives a software change from Pi through gated, evidence-backed phases. An agent proposes. The kernel decides from executed checks. A human arbitrates through Pi dialogues. 495 exposes no CLI, no service, and no CI job of its own — it is a Pi extension.

GatePhase
G0Scoping
G1Specification
G2Qualification
G3Design
G4Implementation
G5Acceptance
G6Integration

Commands

ActionCommand
RunN/A — Pi loads the built extension; there is no standalone entry point
Testnpm test
Buildnpm run build
Lintnpm run lint:code && npm run lint:layers && npm run lint:architecture && npm run lint:exports && npm run lint:distribution && npm run lint:story-format
Preflightnpm run check
CIN/A — the only workflow publishes site/ to GitHub Pages and runs no check of the product; before every commit, run the checks the changed files call for (CONVENTIONS.md § Always Green)

Test

npm test runs node --test across test/v0-pure .. test/v4-platform and test/cycle. Run one generation at a time with npm run test:v0 .. test:v4 or npm run test:cycle while iterating.

Each generation carries one verification level of specs/amont/conception-verification.md §6: v0-pure pure functions, schemas and rules, v1-adapters port contracts and adapters, v2-kernel kernel integration with storage, execution and Git, v3-pi journeys through the Pi entry points, v4-platform real stacks and platforms.

Build

npm run build (tsc -p tsconfig.build.json). Run npm run contracts after changing anything under src/contracts/.

Architecture

Layers run one way: domain/ (pure) → ports/ → application/ (incl. application/phases/) → adapters/ (git, object-store, execution, sandbox, storage-sqlite, workspace, pi-worker, platform) → presentation/ (structured, tui) and export/. Only extension/ and adapters/pi-worker/ import a Pi package, except presentation/, which may import Pi's display library pi-tui and nothing else (specs/adr/D-81). scripts/check-layers.ts enforces the import direction; scripts/check-architecture.ts cross-checks every CMP-* component id in src/ against the catalogue in specs/amont/conception-technique.md §4.1 and refuses import cycles.

Conventions

  • Keep dependency direction one-way. Never import a layer listed after your own in the chain above.
  • Route the Pi API only through extension/ or adapters/pi-worker/.
  • Reach for Pi's own API before rebuilding a capability or deducing a fact from outside it. 495 is a Pi extension, and a fact Pi reports beats one 495 restates (CONVENTIONS.md § Pi is the host).
  • Give every new component a CMP-* id and add it to specs/amont/conception-technique.md §4.1 in the same change.
  • Rebuild dist/ from src/ before every check. Never hand-edit dist/.
  • Attribute every redistributed dependency in NOTICE. Keep peer dependencies on the permissive licence allowlist.
  • Write commit messages in English, as <type>: <description>, one line, describing the resulting behavior — whatever the language of the session or of the file changed. Carry no ticket, chantier, lot, or phase reference. Carry no AI attribution.

Never

  • Never dismiss a reproducible gate failure as pre-existing or out of scope.
  • Never proceed on a red Preflight (npm run check) — fix it before forward work.
  • Never hand-edit dist/ — rebuild it with npm run build.
  • Never import an @earendil-works Pi package from domain/, contracts/, ports/, application/, or export/, nor any but pi-tui from presentation/.
  • Never claim a CMP-* component id in src/ without a matching row in specs/amont/conception-technique.md §4.1.
  • Never let an unqualified sandbox backend run unconfined. Refuse with capability_missing instead.

Agent Rules

  • The cycle: a change goes through the six steps of cycle/README.md — story, red-green, self-review, review, acceptance run, landing — driven by the tool of cycle/; a step the tool does not cover yet is done by hand, in that order and under those rules. A refactoring that changes no behaviour takes the short path instead (specs/adr/D-80, cycle/README.md § Refactorings): it is listed in specs/reprises.md and run by npm run cycle -- reprises, one commit each.
  • Red before code: a task says what its test asserts in the words of the story and why that fails today; the test is written first and seen failing on that assertion before the code.
  • Review: two reviewers, two rounds at most, on the promises of the story; what the second round leaves goes to specs/bugs/registry.yaml, except a promise the code does not keep, which the owner decides — an unattended run sends it back to the red-green instead.
  • Acceptance run: a real execution in a real Pi, with a negative control; a list backed by tests is not one. The owner accepts it or names the gap; in an unattended run (cycle suite) an independent session decides under cycle/prompts/arbitrage.md, and the record says the automaton decided. A story that touches the stacks, the controls or the executor adds the two reference campaigns (npm run campagne -- npm, -- maven, cycle/campagnes/README.md) to it.
  • Always Green: Preflight (npm run check) is green before forward work and before every commit that touches what it checks. In a session the cycle's tool runs, the tool runs Preflight after the session; the session runs only what its change touches (cycle/README.md § Preflight).
  • Records: a product decision and the order of the plan are written by hand, and the owner marks prete: oui the epics that run without them; the story and the registry entry are written by hand when the owner drives the story, and by a session in an unattended run. Every red, Preflight, review round and acceptance is observed and written once by the tool.
  • Write the minimum code that solves the stated problem.
  • Run tests after every change. Show evidence before declaring done.

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.