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.
- nodeSkill
- typescript-magicianSkill
- architecture-mapSkill
- architecture-recommendationSkill
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
- Distinctive: line 13
Put an arbitration to the owner in plain French, without identifiers, scores or coded vocabulary: state what each option costs and what it …
- Distinctive: line 16
Before asking the owner anything, ask why the question exists.
- Distinctive: line 24
Verify before asserting, including against the repository's own record.
- Very specific: line 26
Keep dependencies at their latest published version whenever Preflight stays green — a bound left behind is a divergence waiting to happen, …
- Distinctive: line 88
Keep dependency direction one-way.
- Very specific: line 95
Write commit messages in English, as <type>: <description>, one line, describing the resulting behavior — whatever the language of the …
- Distinctive: line 99
Never dismiss a reproducible gate failure as pre-existing or out of scope.
- Very specific: line 100
Never proceed on a red Preflight (npm run check) — fix it before forward work.
- Very specific: line 101
Never hand-edit dist/ — rebuild it with npm run build.
- Very specific: line 102
Never import an @earendil-works Pi package from domain/, contracts/, ports/, application/, or export/, nor any but pi-tui from …
- Very specific: line 103
Never claim a CMP-* component id in src/ without a matching row in specs/amont/conception-technique.md §4.1.
- Very specific: line 104
Never let an unqualified sandbox backend run unconfined.
- Distinctive: line 130
Write the minimum code that solves the stated problem.
- Distinctive: line 131
Run tests after every change.
≈ “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.
Files
495 (pi-495) — AI Agents
This file is the project context for every AI agent; Claude Code reads it via the
CLAUDE.mdsymlink.
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.xversion silently locks the minor. The exception is a bound that guards a declared floor:@types/nodetracksengines.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
gnubinshims — so GNU syntax is the syntax that works:sed -iwith no backup suffix,grep -P,find -printf, and GNU coreutils fordate,stat,readlink,realpath,head,sort. Measured, not assumed:grepis ugrep andfindis bfs, and both take the GNU flags anyway. The exception isawk—/usr/bin/awk, the BSD one, not gawk, sogensuband the other gawk extensions fail. Keep awk to POSIX, or callgawkby 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 underexamples/extensions/. Read them before specifying a capability or deducing a fact from outside Pi (specs/adr/D-55).provider-payload.tsreports 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.
| Gate | Phase |
| G0 | Scoping |
| G1 | Specification |
| G2 | Qualification |
| G3 | Design |
| G4 | Implementation |
| G5 | Acceptance |
| G6 | Integration |
Commands
| Action | Command |
| Run | N/A — Pi loads the built extension; there is no standalone entry point |
| Test | npm test |
| Build | npm run build |
| Lint | npm run lint:code && npm run lint:layers && npm run lint:architecture && npm run lint:exports && npm run lint:distribution && npm run lint:story-format |
| Preflight | npm run check |
| CI | N/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/oradapters/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 tospecs/amont/conception-technique.md§4.1 in the same change. - Rebuild
dist/fromsrc/before every check. Never hand-editdist/. - 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 withnpm run build. - Never import an
@earendil-worksPi package fromdomain/,contracts/,ports/,application/, orexport/, nor any butpi-tuifrompresentation/. - Never claim a
CMP-*component id insrc/without a matching row inspecs/amont/conception-technique.md§4.1. - Never let an unqualified sandbox backend run unconfined. Refuse with
capability_missinginstead.
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 ofcycle/; 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 inspecs/reprises.mdand run bynpm 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 undercycle/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: ouithe 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.
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
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.

