foreman
AGENTS.md35 starsChanged 2 months agoMITView on GitHub
Foreman is one plugin for Claude Code, Codex and Antigravity: a roadmap beside the project's code, grounded handoffs and clear task status. Its hooks, scripts and tests are dependency-free Node.js and run with Node.js 22 or later and Git; there is no install or build step. This repository is Foundry's Foreman submodule and ships from main. Codex validators live in the Codex installation, not here. Tests never install the plugin, alter a marketplace or start model sessions.
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.
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Very specific: line 10
Before changing what Foreman promises or refuses, read the product scope.
- Distinctive: line 11
Before touching reviewed increments, read incremental acceptance.
- Very specific: line 12
Before editing a handoff block, read prompt-template.md.
- Distinctive: line 13
Before a release, read the changelog and CONTRIBUTING.md.
≈ “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.
Files
Foreman
Foreman is one plugin for Claude Code, Codex and Antigravity: a roadmap beside the project's
code, grounded handoffs and clear task status. Its hooks, scripts and tests are dependency-free Node.js and run
with Node.js 22 or later and Git; there is no install or build step. This repository is
Foundry's Foreman submodule and ships from main.
Start here
- Before changing what Foreman promises or refuses, read the product scope; the README's never-list must agree with it.
- Before touching reviewed increments, read incremental acceptance; the protocol is Codex-only.
- Before editing a handoff block, read
prompt-template.md;check-prompt.jsandcraft-handoff.jsread its canonical blocks at run time. - Before a release, read the changelog and CONTRIBUTING.md.
Rules that outrank everything
- One package on
mainserves the three hosts: one runtime, oneskills/tree with the five skills, oneprompt-template.md, one README and one changelog. Develop on a topic branch and merge through a pull request. - Register Claude Code events only in
hooks/hooks.json, Codex events only inhooks/codex-hooks.jsonand Antigravity events only in the roothooks.json, which runshooks/antigravity-hook.js. Host-specific code asksscripts/runtime.jswhich host is running; host-specific handoff wording is ahost="claude"orhost="codex"block inprompt-template.md, and an Antigravity handoff takes the Codex form. - The three manifests,
.claude-plugin/plugin.json,.codex-plugin/plugin.jsonandplugin.json, carry the same version, bumped together in the release commit; a test fails when they differ. Foundry's catalogs carry no version for Foreman and only movesource.sha.
Commands
| Command | Purpose | Cost |
node --test tests/*.test.js | The suite, three hosts | Local temporary repositories; exercise changed hooks on Windows as well as Unix |
node scripts/git-hooks/check-readme-nav.js | The root README has its nav, and every heading anchor linked from a tracked Markdown file resolves | Local |
claude plugin validate . | Claude Code package shape | Local |
agy plugin validate . | Antigravity package shape | Local; needs the Antigravity CLI |
node scripts/build-windows-launchers.js | Codex Windows hook commands are current; --write regenerates them | Local |
git config core.hooksPath scripts/git-hooks | One-time: the pre-commit hook runs the suite and the nav check | Local |
Codex validators live in the Codex installation, not here. Tests never install the plugin, alter a marketplace or start model sessions.
Where things live
| Path | Content |
skills/ | The five skills, one text for every host: foreman, roadmap, init, survey, craft-prompt |
hooks/ | Hook scripts and the Claude Code and Codex registrations; antigravity-hook.js translates Antigravity's events and runs the shared hooks as children; lib.js resolves project and host; scripts/build-windows-launchers.js builds the Codex Windows command, and windows-launcher.ps1 is its fnm fallback |
scripts/ | Dependency-free CLIs such as roadmap.js, craft-handoff.js, check-prompt.js, safe-commit.js and ledger.js; health/ holds the metrics tools |
tests/ | The node:test suite for the three hosts |
prompt-template.md | The one handoff template, read at run time |
HOW-IT-WORKS.md, settings.md, roadmap-schema.md, ledger.md, TRIALS.md, CODEX.md, CODEX-PROMPTING.md | Reference pages the skills, scripts and tests load or cite; they stay at the root |
docs/knowledge/ | The product scope, the incremental-acceptance contract and the changelog |
.claude-plugin/, .codex-plugin/, plugin.json, hooks.json | Host manifests with the same version; the Codex manifest names hooks/codex-hooks.json, and the root manifest and hooks.json are what Antigravity reads |
Conventions
The README serves every host. Its shared sections read the same for everyone; host differences
sit in the How to ask table, one Install subsection per host, the Differences between hosts
table and one results table per host under The numbers: Codex results, Claude Code results and
Antigravity results. A feature one host lacks is named as not available there, never described
with the other host's behavior. Keep benchmark questions and columns identical across the host
tables; each table carries its own foundry:evidence declaration, model and date, plus a source
naming a public page when one exists. Never
present a Claude Code result as a Codex result, never treat unit tests as a performance run, and
show Not measured where evidence is absent.
Reviewed increments stay a Codex feature until the owner decides otherwise: the assembler accepts review rows on both hosts, but Claude Code's skills do not offer the protocol.
Preserve roadmap format 2 and records written by either host. Keep scripts dependency-free.
Benchmark runners, datasets and experiments are not part of the package; tests/ holds
functional tests only.
CLAUDE.md imports this file; keep shared contributor facts here.
Pitfalls
- Claude Code substitutes
${CLAUDE_PLUGIN_ROOT}in skill text; Codex does not. Skills carry a relative link beside each such path. - A passing nav check verifies anchors, not measurements. Review the source of every README claim; never run paid benchmarks, install plugins or publish to fill an evidence gap.
- A prompt copied out of one host carries that host's script paths. Craft it again in the other.
- Antigravity's PostToolUse answer is always
{}. What a commit or a file touch has to say waits in a temp queue and reaches the model at its next call, through PreInvocation; nothing arrives at the moment of the command.
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
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.

