lain
AGENTS.md9 starsChanged 4 days agoMITView on GitHub
Standard instructions Check skills before working a task and look for a useful one memory cleanliness is important. review we didnt fill the ram or the ssd with garbage data we can regenerate testing is critical. we alwaya assume someone didnt do the job thats why we test Add always at the start of each message this "Answer:" Two-branch model: - dev — integration. Default branch. PRs target dev. CI: fast lane (Ubuntu tests, lint, npm-shim, schema-drift, health-badge, capability suite,…
- Commits and 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 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 repository6 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- lain-architectureSkill
- lain-comprehensionSkill
- lain-coordinationSkill
- lain-federationSkill
- lain-verifySkill
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, 11 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
3
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 9
Check skills before working a task and look for a useful one
- Distinctive: line 15
Add always at the start of each message this "Answer:"
- Distinctive: line 34
Before cutting the branch: nothing half-done may remain.
- Distinctive: line 36
every item in the acceptance findings register is closed or explicitly scoped out of the release *in writing* (with why).
- Distinctive: line 38
no open issues from the acceptance program.
- Distinctive: line 39
no known test flakes left unfixed.
- Distinctive: line 40
no uncommitted WIP in any worktree.
- Distinctive: line 43
If anything is open, either land it in this release or write the deferral down first.
- Very specific: line 50
Leave the health-badge action's lain-version default on the latest PUBLISHED release — bumping it pre-tag deadlocks the release gate (the …
- Very specific: line 55
After merge: git push origin v0.x.y triggers release.yml.
- Distinctive: line 74
Don't push tags without a release PR.
- Distinctive: line 108
Don't bump versions in feature PRs — that's the release PR's job.
- Very specific: line 109
Don't commit secrets, even test fixtures.
- Distinctive: line 124
Do not silently migrate. The federated graph is regenerable from per-repo graphs, and silent migration risks hiding real corruption.
≈ “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.
Files
AGENTS.md — for AI agents working in this Lain checkout
Standard instructions
Check skills before working a task and look for a useful one
memory cleanliness is important. review we didnt fill the ram or the ssd with garbage data we can regenerate
testing is critical. we alwaya assume someone didnt do the job thats why we test
Add always at the start of each message this "Answer:"
Branch policy
Two-branch model:
dev— integration. Default branch. PRs targetdev. CI: fast lane (Ubuntu tests, lint, npm-shim, schema-drift, health-badge, capability suite, mutation gate). ~5 min.main— release line. Receives changes only via reviewed PRs fromdev, and only when cutting a new release. CI: full hardened battery (all OSes, capability suite, coverage, release contracts). ~20 min.
Feature branches are cut from dev and merged back into dev. Never target main directly.
dev → main is release-only, not a routine merge:
- Zero-pending audit — publishing is the LAST step, not the first.
Before cutting the branch: nothing half-done may remain. Check, and
record the evidence:
- every item in the acceptance findings register is closed or explicitly scoped out of the release in writing (with why);
- no open issues from the acceptance program;
- no known test flakes left unfixed;
- no uncommitted WIP in any worktree;
- the acceptance suites,
demo.sh, and the full test battery are green on the exact tree to be released. If anything is open, either land it in this release or write the deferral down first. A release that ships with a list of "pendientes" is half-done work.
- Branch
release/v0.x.yoffdev. - Bump every release-metadata file (
Cargo.toml,Cargo.lock,server.json,npm-shim/package.json,Formula/lain.rb).scripts/check-release-version.py --tag v0.x.yvalidates. Leave the health-badge action'slain-versiondefault on the latest PUBLISHED release — bumping it pre-tag deadlocks the release gate (the badge 404s on the unpublished version andrelease.ymlrefuses to build a commit whose CI is red). - PR against
main(1 review + green agent-contract). - After merge:
git push origin v0.x.ytriggersrelease.yml. - Fast-forward dev:
git switch dev && git merge --ff-only main. - After the release assets are published: fill
Formula/lain.rb'ssha256values from the publishedSHA256SUMSfile, and bump the health-badge action'slain-versiondefault to the new version. The artifacts are not bit-reproducible, so pre-filling the formula produces one that fails verification (this is how v0.8.0 shipped broken); pre-bumping the badge default deadlocks the release gate.
Full branching rules + protection settings: docs/BRANCHING.md.
PR flow: CONTRIBUTING.md.
Releases and tags
- Tags are git tags (
v0.x.y). The release workflow handles cross-platform builds, provenance + SBOM + SHA256SUMS, server.json sync, and npm publish. - Pre-release tags (
v0.x.y-rcN) publish under npm'snextdist-tag, notlatest. - Don't push tags without a release PR.
npm publishing — Trusted Publishing (OIDC) only
- No NPM_TOKEN secret. The release workflow authenticates via GitHub Actions OIDC.
- Configured at
https://www.npmjs.com/package/@spuentesp/lain-mcp/access:- Provider: GitHub Actions
- Repository:
spuentesp/lain - Workflow filename:
release.yml(basename only) - Environment: (blank)
- Permissions:
npm publish(notnpm stage publish)
- The
id-token: writepermission on the publish job is what makes OIDC available; do not remove it.
CI expectations
ci.yml is tiered: dev/PR-to-dev get the fast lane, main/PR-to-main
get the full battery. Plus a workflow-level concurrency: block
cancels superseded runs for the same ref.
| Job | dev / PR-to-dev | main / PR-to-main |
test (Ubuntu) | ✓ | ✓ |
test-cross (macOS + Windows) | — | ✓ |
lint, npm-shim, schema-drift, health-badge | ✓ | ✓ |
capability (demo.sh) | ✓ | ✓ |
mutation (two-phase, incremental, PRs to dev only) | ✓ | — |
coverage, version-drift, action-contracts | — | ✓ |
Conventions for AI agents
- Feature branches: cut from
dev, merge back intodev. Never targetmaindirectly. - Don't bump versions in feature PRs — that's the release PR's job.
- Don't commit secrets, even test fixtures. Use
hooks/<agent>/to claim files before editing. - Don't push tags without a release PR.
- The OpenSSF Scorecard is the public supply-chain signal; current
goal is 9+ composite. Rolling state indocs/SCORECARD.md.
Federation schema bumps (2026-09-07 onwards)
The federation graph on disk has an explicit version header (FEDERATION_GRAPH_VERSION in src/server/federation/graph_backend.rs). When the on-disk format changes in a non-backward-compatible way:
- Bump
FEDERATION_GRAPH_VERSIONin the same commit that introduces the change. - The loader refuses to read graphs with a different header, returning
LainError::FederationSchemaMismatch. - The operator's recovery path is
lain reindex, which backs up the old graph and rebuilds. - CHANGELOG entry must name the schema bump and the recovery command.
Do not silently migrate. The federated graph is regenerable from per-repo graphs, and silent migration risks hiding real corruption.
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.

