agentleFS
Wolfe-JamWolfe-Jam/faf-cli/AGENTS.md

faf-cli

AGENTS.md44 starsChanged 10 months agoMITView on GitHub

CLI for IANA-registered .faf + .fafm — context DNA and portable agent memory, scored by the always-33 engine — TypeScript · type: cli · v8.10.0 Authored by faf — do not edit the managed block; refresh with faf export --agents. Hand-written content outside the managed block is preserved. Done when: bun run lint exits 0 · bun run check:no-hardcode exits 0 · bun run test passes · changes committed with a conventional message. Ask a clarifying question, propose a short…

  • 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,315 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 repository3 other files it gives its agents.

The file

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

6 rules. About 0 are common, 3 are distinctive, and 3 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use bun, not npm — this repo is Bun-native since v6.

    line 57
  2. Distinctive:

    Never write 'Guaranteed' (any form) — it's banned.

    line 61
  3. Very specific:

    Always OK: read the tree · run the tests (bun run test) · build the project · bun run lint.

    line 63
  4. Distinctive:

    Ask a clarifying question, propose a short plan, or open a draft PR with notes — do not push large speculative changes to main.

    line 73
  5. Very specific:

    If build/test scripts or layout change, refresh this file in the same PR (faf export --agents).

    line 79
  6. Very specific:

    When a change touches build output or the publish path, bun run check:no-hardcode is the one that matters — a build-machine path in dist/ …

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 42,283 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
<!-- faf:start --><!-- faf: faf-cli | TypeScript | cli | CLI for IANA-registered .faf + .fafm — context DNA and portable agent memory, scored by the always-33 engine --><!-- faf: claim=project.faf | family=FAF -->

AGENTS.md — faf-cli

CLI for IANA-registered .faf + .fafm — context DNA and portable agent memory, scored by the always-33 engine — TypeScript · type: cli · v8.10.0

Authored by faf — do not edit the managed block; refresh with faf export --agents. Hand-written content outside the managed block is preserved.

Setup & build

bun install    # install
bun run build    # clean, bundle src/cli.ts to dist, then tsc
bun run dev    # run the CLI from source, no build

Run the tests

bun run test    # must pass before a change is done
bun run lint    # eslint over src
bun run check:no-hardcode    # fail if a build-machine path leaked into dist

Where things live

PathRole
src/cli.tsCLI entry (Commander); builds to the faf / faf-cli bin
src/index.tslibrary entry; builds to main, plus the ./pack export
src/commands/one file per faf subcommand (39)
src/commands/memory.tsfaf memory, the .fafm surface
src/core/domain engines (drift, faf-dna, faf-source, cwd-guard)
src/detect/stack and project detection, per language
src/fafm/the .fafm library (soul, from-claude-dir, types)
src/interop/the context authors (agents, claude, gemini, cards, copilot)
src/interrogate/extractors that read a repo's own files for facts (readme, cargo, compose, env)
src/ui/terminal output (colors, display, progress, star-nudge)
src/wasm/bridge to faf-scoring-kernel; scoring lives there, not in TS
package.jsonscripts, and the bin that maps faf to dist/cli.js
project.fafthis file; the DNA every author reads from

Conventions

  • Architecture: Domain-model first; single-source engines composed, never reimplemented.
  • Testing: WJTTC — zero errors always; bun test green before any ship.
  • Runtime: Bun-native since v6, TypeScript strict, Rust→WASM scoring kernel.
  • Releases: Atomic via /pubpro — bump, verify, tag, publish in one motion.
  • TypeScript strict mode (tsconfig.json)
  • ESM modules (type: module)
  • Style enforced by ESLint · Prettier — obey the configs

Guardrails

  • Use bun, not npm — this repo is Bun-native since v6.
  • TypeScript strict; zero type errors, zero test failures — always.
  • Scoring is a Rust→WASM kernel — compose it, never reimplement scoring in TS.
  • FAF authors — never 'generates'. And 'never guessed', not 'not guessed'.
  • Never write 'Guaranteed' (any form) — it's banned; it's free software.
  • Publish only via /pubpro — never hand-run npm publish.
  • Always OK: read the tree · run the tests (bun run test) · build the project · bun run lint.
  • Ask first: dependency installs, deletions, migrations, schema changes, publish/release.
  • Never: force-push · push straight to main (branch and open a PR) · commit secrets.

Definition of Done

Done when: bun run lint exits 0 · bun run check:no-hardcode exits 0 · bun run test passes · changes committed with a conventional message.

When stuck

Ask a clarifying question, propose a short plan, or open a draft PR with notes — do not push large speculative changes to main.

Commit & PR

  • Conventional Commits preferred (feat:, fix:, chore:, …).
  • Branch off main and open a PR — never commit to main directly.
  • If build/test scripts or layout change, refresh this file in the same PR (faf export --agents).

Stack

  • Hosting: npm + Homebrew
  • Build: Bun (bun build) + tsc
  • CI/CD: GitHub Actions
<!-- faf:end -->

Ship-adjacent

When a change touches build output or the publish path, bun run check:no-hardcode is the one that matters — a build-machine path in dist/ ships to every user.

.faf and .fafm are IANA-registered: application/vnd.faf+yaml and application/vnd.fafm+yaml.

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.