agentleFS
cboonecboone/fm/AGENTS.md

fm

AGENTS.md1 starsChanged 3 months agoMITView on GitHub

A safe, read-oriented CLI for Fastmail email via JMAP. fm is machine-first by design: JSON output by default, structured errors, and strict guardrails around anything destructive. It is built to be the execution layer an agent drives for inbox analysis and triage, so its output contract matters as much as its behavior. See the "Agent Runbook (Read First)" section of README.md and skills/review-email/references/runbook.md before changing command output. The repo is also a Claude Code plugin: .claude-plugin/plugin.json publishes skills/ so the…

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

The file

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

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run make help for the full target list.

    line 40

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

FM

Overview

A safe, read-oriented CLI for Fastmail email via JMAP.

fm is machine-first by design: JSON output by default, structured errors, and strict guardrails around anything destructive. It is built to be the execution layer an agent drives for inbox analysis and triage, so its output contract matters as much as its behavior. See the "Agent Runbook (Read First)" section of README.md and skills/review-email/references/runbook.md before changing command output.

The repo is also a Claude Code plugin: .claude-plugin/plugin.json publishes skills/ so the runbook ships with the tool.

Structure

main.go                  entry point
cmd/                     cobra commands, one file per command
internal/client/         Fastmail session and transport
internal/jmap/           JMAP protocol types and requests
internal/output/         JSON and human output formatting
internal/types/          shared domain types
internal/unsubscribe/    unsubscribe link handling
skills/review-email/     bundled skill, including the agent runbook
tests/                   scrut CLI tests (arguments, errors, flags, help, live, sieve)
docs/plans/              plan files
docs/reviews/            review documents

Commands in cmd/ cover reading and triage (list, read, search, mailboxes, archive, move, mark-read, flag, draft) plus the full Sieve filter surface (sieve_create, sieve_show, sieve_list, sieve_validate, sieve_activate, sieve_deactivate, sieve_delete). dryrun.go and filters.go carry the guardrails; treat changes there as behavior changes, not refactors.

Development

Run make help for the full target list. The ones that matter:

TargetWhat it does
make buildRun unit tests, then build the binary
make testUnit tests only
make test-cliBuild, then run the scrut CLI tests in tests/
make test-allUnit plus CLI tests
make test-ciWhat CI runs: vet, fmt, lint, test-all
make lintgolangci-lint
make coverUnit tests with coverage

CLI behavior is covered by scrut snapshot tests in tests/*.md. When you change output, flags, or error text, update the matching snapshot in the same change; docs_drift_test.go also guards against docs falling behind the command surface.

make test-cli-live runs the opt-in tests that talk to a real account. It requires FM_CREDENTIAL_COMMAND and FM_LIVE_TESTS=1. Never hardcode a token to run these.

CI is .github/workflows/ci.yml, with gitleaks.yml and release.yml alongside.

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.