agentleFS
AnonyfoxAnonyfox/lfm/AGENTS.md

lfm

AGENTS.md1 starsChanged 20 days agoMITView on GitHub

lfm is one Go binary that compiles an agent-built landing page (and the deliverables it sells) into a static folder, and refuses to ship a page that is broken, slow, inaccessible, invisible to search or full of generic AI design defaults. Read docs/architecture.md before changing code; it maps every package and the compile lifecycle. This file is for working on lfm itself. internal/scaffold/files/AGENTS.md is a different file: the template lfm init writes into user projects. - General, not niche. A…

  • 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 31,774 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 repository2 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, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Dependencies earn their place: Ask before adding a module.

    line 20
  2. Very specific:

    Agent-first CLI: Every finding has a rule ID, a message and a concrete fix.

    line 21
  3. Very specific:

    A check: follow "Adding a check" in docs/architecture.md.

    line 26
  4. Very specific:

    Config (lfm.json): document every field in docs/config.md.

    line 30
  5. Very specific:

    Use the Go version in go.mod (CI does), for example GOTOOLCHAIN=go1.26.9.

    line 50

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

Working on lfm

lfm is one Go binary that compiles an agent-built landing page (and the deliverables it sells) into a static folder, and refuses to ship a page that is broken, slow, inaccessible, invisible to search or full of generic AI design defaults. Read docs/architecture.md before changing code; it maps every package and the compile lifecycle.

This file is for working on lfm itself. internal/scaffold/files/AGENTS.md is a different file: the template lfm init writes into user projects.

Principles

  • General, not niche. A feature must help every page. Prefer a refactor that removes a special case over adding one; no flags for a single project.
  • Fast. An ordinary compile takes milliseconds. compile has an allocation budget and BenchmarkCompile; keep both green.
  • Report, never rewrite. Checks only report. Automatic repairs (image sizes, favicons, resource hints) belong in the assemble stage, where the compile report shows them.
  • Nothing is written until verify passes. Output stays in memory and is swapped in at publish.
  • Dependencies earn their place. Ask before adding a module.
  • Agent-first CLI. Every finding has a rule ID, a message and a concrete fix; every report ends with the next step; --json mirrors the human output.

Changing things

  • A check: follow "Adding a check" in docs/architecture.md. Register the rule with an ID, summary and help; TestCatalogRulesHaveStandardHelp and TestEveryReportedRuleIsInTheCatalog enforce it. Test the smallest triggering case and the nearest legitimate case that must stay quiet.
  • Config (lfm.json): document every field in docs/config.md; config mistakes point at their JSON key.
  • Output files: golden manifests in testdata/golden pin them byte for byte. Rewrite them with LFM_UPDATE_GOLDEN=1 go test ./... and review the diff.
  • Skill text: edit internal/skills/files/<topic>/SKILL.md; TestSkillsFollowTheSpec checks it. The root SKILL.md is the entry point agents fetch from lfm.cash.
  • Parsers and analyzers of author or LLM input need a native fuzz target; see CONTRIBUTING.md.
  • The website lfm.cash is built and hosted outside this repository. The root SKILL.md and install.sh are served there byte for byte, so changes to them reach it on its next deploy.
  • User-visible changes get a line in CHANGELOG.md.

Verify before you say done

gofmt -l . && go mod tidy -diff && go vet ./...
go run honnef.co/go/tools/cmd/staticcheck@v0.8.2 -checks all ./...
go test -race ./...

Use the Go version in go.mod (CI does), for example GOTOOLCHAIN=go1.26.9. Browser-backed tests skip without Chrome; -short skips them explicitly.

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.