agentleFS
tuzlu07xtuzlu07x/foreman/AGENTS.md

foreman

AGENTS.md9 starsChanged 2 months agoMITView on GitHub

Foreman is a local-first security gateway for developer agents. It mediates tool calls before they run, applies policy and risk scoring, asks for approval when needed, and retains a local audit trail. This file is for any coding agent or automated contributor working in this repository. Read it before proposing a change. 1. Read README.md for the product and CONTRIBUTING.md for the contribution contract. 2. Read FOREMAN.md before changing core behavior. Read FOREMAN-TUI.md before changing src/tui/. 3. Find a scoped…

  • Reads credentials
  • 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 repositoryOne other file it gives its agents.

The file

Show its rules and text

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

13 rules. About 1 is common, 7 are distinctive, and 5 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    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:

    Read README.md for the product and CONTRIBUTING.md for the contribution contract.

    line 12
  2. Very specific:

    Read FOREMAN.md before changing core behavior.

    line 14
  3. Distinctive:

    Use Node 22.12 or later and run the checks relevant to the change:

    line 36
  4. Distinctive:

    Run the TUI against an isolated state directory.

    line 51
  5. Common:

    Do not weaken approval, identity, policy, audit, or secret-handling behavior to make a test or demo pass.

    line 61
  6. Very specific:

    Do not add real credentials, tokens, private keys, .env contents, or machine-specific paths to the repository, issues, PRs, fixtures, or …

    line 63
  7. Distinctive:

    Do not change GitHub Actions, release code, install scripts, or dependency versions unless the issue explicitly requires it.

    line 65
  8. Very specific:

    Do not use pull_request_target with a checkout of untrusted PR code.

    line 68
  9. Distinctive:

    Do not introduce a dependency without explaining why an existing dependency cannot do the job.

    line 69
  10. Distinctive:

    Keep one logical issue per PR.

    line 75
  11. Very specific:

    Use strict TypeScript and ESM.

    line 77
  12. Distinctive:

    Follow neighboring code instead of inventing a new local pattern.

    line 78
  13. Distinctive:

    Update documentation when an installation command, public CLI behavior, configuration shape, or supported integration changes.

    line 79

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

Foreman agent guide

Foreman is a local-first security gateway for developer agents. It mediates tool calls before they run, applies policy and risk scoring, asks for approval when needed, and retains a local audit trail.

This file is for any coding agent or automated contributor working in this repository. Read it before proposing a change.

Start here

  1. Read README.md for the product and CONTRIBUTING.md for the contribution contract.
  2. Read FOREMAN.md before changing core behavior. Read FOREMAN-TUI.md before changing src/tui/.
  3. Find a scoped issue. Prefer issues labelled agent-ready, good first issue, or help wanted. If the change is not a tiny bug fix, discuss its plan in an issue before editing code.
  4. Work from a fork and open a pull request. Never assume direct push or merge permission.

Repository map

AreaLocationNotes
CLI commandssrc/cli/Keep commands small and composable.
Core policy, mediation, identity and auditsrc/core/Security-sensitive: preserve fail-closed behavior.
MCP transportsrc/mcp/Treat untrusted input as hostile.
Terminal UIsrc/tui/Follow FOREMAN-TUI.md; report manual smoke testing in the PR.
Bundled integration catalogregistry/Keep schema, entry and snippet changes together.
Teststests/Add a focused regression test for behavior changes.
User documentationdocs/, examples/Commands and examples must be runnable.

Required checks

Use Node 22.12 or later and run the checks relevant to the change:

npm ci
npm run lint
npm test
npm run build

For registry changes, also run:

node dist/cli/index.js registry validate

Run the TUI against an isolated state directory; never point exploratory work at a real user state directory:

FOREMAN_HOME=./.foreman-dev node dist/cli/index.js init
FOREMAN_HOME=./.foreman-dev node dist/cli/index.js start

Non-negotiable security boundaries

  • Do not weaken approval, identity, policy, audit, or secret-handling behavior to make a test or demo pass.
  • Do not add real credentials, tokens, private keys, .env contents, or machine-specific paths to the repository, issues, PRs, fixtures, or logs.
  • Do not change GitHub Actions, release code, install scripts, or dependency versions unless the issue explicitly requires it. Explain the security and supply-chain impact in the PR.
  • Do not use pull_request_target with a checkout of untrusted PR code.
  • Do not introduce a dependency without explaining why an existing dependency cannot do the job.

Change discipline

  • Make the smallest change that satisfies the issue's acceptance criteria.
  • Keep one logical issue per PR. Do not mix refactors, formatting sweeps, and product behavior in one change.
  • Use strict TypeScript and ESM. Do not use any outside test files.
  • Follow neighboring code instead of inventing a new local pattern.
  • Update documentation when an installation command, public CLI behavior, configuration shape, or supported integration changes.

Pull request handoff

The PR body must state: linked issue, what changed, tests run, security impact (none is acceptable), and any manual TUI verification. Mark uncertain work as a draft rather than presenting it as ready to merge.

Maintainers review and merge every contribution. Passing CI is necessary, not sufficient, for changes that affect security boundaries.

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.