agentleFS
spuentespspuentesp/lain/AGENTS.md

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.

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

    Check skills before working a task and look for a useful one

    line 9
  2. Distinctive:

    Add always at the start of each message this "Answer:"

    line 15
  3. Distinctive:

    Before cutting the branch: nothing half-done may remain.

    line 34
  4. Distinctive:

    every item in the acceptance findings register is closed or explicitly scoped out of the release *in writing* (with why).

    line 36
  5. Distinctive:

    no open issues from the acceptance program.

    line 38
  6. Distinctive:

    no known test flakes left unfixed.

    line 39
  7. Distinctive:

    no uncommitted WIP in any worktree.

    line 40
  8. Distinctive:

    If anything is open, either land it in this release or write the deferral down first.

    line 43
  9. Very specific:

    Leave the health-badge action's lain-version default on the latest PUBLISHED release — bumping it pre-tag deadlocks the release gate (the …

    line 50
  10. Very specific:

    After merge: git push origin v0.x.y triggers release.yml.

    line 55
  11. Distinctive:

    Don't push tags without a release PR.

    line 74
  12. Distinctive:

    Don't bump versions in feature PRs — that's the release PR's job.

    line 108
  13. Very specific:

    Don't commit secrets, even test fixtures.

    line 109
  14. Distinctive:

    Do not silently migrate. The federated graph is regenerable from per-repo graphs, and silent migration risks hiding real corruption.

    line 124

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

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 target dev. 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 from dev, 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:

  1. 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.
  2. Branch release/v0.x.y off dev.
  3. 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.y validates. Leave the health-badge action's lain-version default on the latest PUBLISHED release — bumping it pre-tag deadlocks the release gate (the badge 404s on the unpublished version and release.yml refuses to build a commit whose CI is red).
  4. PR against main (1 review + green agent-contract).
  5. After merge: git push origin v0.x.y triggers release.yml.
  6. Fast-forward dev: git switch dev && git merge --ff-only main.
  7. After the release assets are published: fill Formula/lain.rb's sha256 values from the published SHA256SUMS file, and bump the health-badge action's lain-version default 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's next dist-tag, not latest.
  • 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 (not npm stage publish)
  • The id-token: write permission 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.

Jobdev / PR-to-devmain / 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 into dev. Never target main directly.
  • 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 in docs/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:

  1. Bump FEDERATION_GRAPH_VERSION in the same commit that introduces the change.
  2. The loader refuses to read graphs with a different header, returning LainError::FederationSchemaMismatch.
  3. The operator's recovery path is lain reindex, which backs up the old graph and rebuilds.
  4. 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.

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.