agentleFS
spuentespspuentesp/lain/AGENTS.md

lain

AGENTS.md9 starsChanged 2 months agoMITView on GitHub

Two-branch model: - dev — integration. Default branch. PRs target dev. CI: fast lane (Ubuntu tests, lint, npm-shim, schema-drift, health-badge, capability suite). ~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. Always open PRs against dev. Never target main directly. dev → main is release-only, not a routine merge: 1. Branch release/v0.x.y off dev.…

  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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

We split this AGENTS.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  • could be automatic: a setting could enforce it
  1. Very specific:

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

    line 24
  2. Distinctive:

    Don't push tags without a release PR.

    line 37
  3. Distinctive:

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

    line 70
  4. Very specific:

    Don't commit secrets, even test fixtures.

    line 71
  5. Distinctive:

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

    line 94

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

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). ~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.

Always open PRs against dev. Never target main directly.

dev → main is release-only, not a routine merge:

  1. Branch release/v0.x.y off dev.
  2. 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.
  3. PR against main (1 review + green agent-contract).
  4. After merge: git push origin v0.x.y triggers release.yml.
  5. Fast-forward dev: git switch dev && git merge --ff-only main.

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)✓✓
coverage, version-drift, action-contracts—✓

Conventions for AI agents

  • Open PRs against 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.

Background

The pre-2026-09-15 AGENTS.md was a release-tracking note about a v0.7.0 incident where the upstream tarball shipped a binary whose --version reported 0.6.1 (a missed Cargo.toml bump). That incident was resolved by PR #43. This file now supersedes that note with the current branching, CI, and release policy.

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.