agentic-builder-forge
AGENTS.md4 starsChanged 4 months agoApache-2.0View on GitHub
This repository is the Forge: a deterministic, Claude-Code-first control plane for an agentic software-development lifecycle. It is an external control repo — it operates on separate target repositories and never embeds itself into them. These rules are stated here for humans and agents, but prose is not the boundary — they are enforced mechanically by the enforcement floor: the git hooks in harness/githooks, the fail-closed gates inside the harness/*.sh scripts, and the real-time hooks in .claude/. Real-time enforcement is Claude-Code-first:…
- Deletes or force-pushes
- Commits and pushes
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,700 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 repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- clarifySkill
- decomposeSkill
- spec-authoringSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Never write to or commit anything there.
- Very specific: line 24
The
.beads/ledger is bd-managed: Never hand-edit it — mutate the ledger only through bd. - Very specific: line 49
Test-first: write a failing test, then code, until green.
- Distinctive: line 52
Every file write/edit is auto-formatted and linted.
- Very specific: line 61
Test/lint/format commands come from harness/targets.config — never hardcode them.
- Distinctive: line 66
If something blocks unexpectedly, stop and show the human — never weaken a rule, a gate, or a test to make a check pass.
- Very specific: line 81
Run bash .forge/scripts/init.sh to fill the {{…}} placeholders, create a fresh bead ledger, and wire the git hooks.
≈ “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.
Files
Agent operating rules — agentic-builder-forge
This repository is the Forge: a deterministic, Claude-Code-first control plane for an
agentic software-development lifecycle. It is an external control repo — it operates on separate
target repositories and never embeds itself into them. These rules are stated here for humans and
agents, but prose is not the boundary — they are enforced mechanically by the enforcement floor:
the git hooks in harness/githooks, the fail-closed gates inside the harness/*.sh scripts, and the
real-time hooks in .claude/. Real-time enforcement is Claude-Code-first: the .claude/ hooks are
built around Claude Code and only load under it. This file states the rules platform-neutrally, but an
agent that is not Claude Code (e.g. Codex) runs under a weaker floor — only the git hooks and the
fail-closed scripts, not the real-time hook layer. Claude Code specifics live in CLAUDE.md; Codex
notes live in CODEX.md.
Hard rules (never violate)
- Never push to the default branch (
{{DEFAULT_BRANCH}}). Open a pull request from a task branch; a human reviews and merges. Agents never merge. - Never use
--no-verifyongit commitorgit push. - Never edit the enforcement floor to make a task pass —
.claude/hooks/**,.claude/settings.json,harness/githooks/**, or the gates inharness/**. Disabling your own guardrails is the cardinal failure. Gutting atest:*script to go green counts. - If you keep a sibling knowledge repo (e.g.
../my-vault), it is read-only to the Forge. Never write to or commit anything there. - The
.beads/ledger is bd-managed. Never hand-edit it — mutate the ledger only throughbd. Raw writes and shell redirects into.beads/**are denied;bdcommands and reads of the ledger are allowed. - Stay in the sandbox. During a task run, write only inside the task's worktree (and
sandbox/in this repo). A target-repo build runs inside a networked isolation container by default. The container is workspace isolation, not an airtight sandbox and not egress control — the hard rules above hold whether or not a container is present, and a networked container does not license exfiltration or reaching services you are not authorized to use. - No destructive commands: no
rm -rfoutside the sandbox, no force-push, no writes to.git/. - No secrets in code or shell commands (API keys, tokens, private keys).
How work flows
- Upstream of the build loop, intake (
harness/intake.sh) turns a fuzzy objective into a ratified spec: a clarify loop within the budgets inharness/intake.config, then an explicit human ratify, then decomposition into beads. No beads are minted from an unratified spec. - Work is a bead, and beads are architect-generated from a ratified spec (intake →
convert) — that is the normal create path. Bead IDs carry your ledger prefix ({{BEAD_PREFIX}}; examples in these docs usefx, e.g.fx-123). Claim a ready bead before starting (./harness/run-task.sh start <bead-id>— fails closed if it's missing, not ready, or already claimed).start --new "<desc>"is the only ad-hoc create path in the build loop — a deliberate exception for a quick single task; such a bead carries no acceptance contract, so it is not the normal path. - One task → one git worktree + branch. The shared checkout is never modified directly.
- Test-first: write a failing test, then code, until green. The canonical gate is
tests/run-all.sh— it discovers everytest:*script inpackage.json, reports PASS / SKIP(75) / FAIL, and fails closed. You cannot declare a task done while tests are red. - Every file write/edit is auto-formatted and linted. You cannot skip it.
- A run ends by opening a pull request — never by merging.
finishsets the beadin_reviewand opens the PR. - An advisory, read-only reviewer (
harness/review-task.sh) posts findings as a plain PR comment — never a blocking review, and its findings never gate the merge. The deterministic test gate stays the completion authority. - The human merge closes the bead:
run-task.sh syncreconciles it toclosedfrom the harness-captured PR record. Neverbd closeby hand.kill-switch.shaborts a run and releases the claim back to ready. - Test/lint/format commands come from
harness/targets.config— never hardcode them.
Scope
- This repository is the harness, not the product it builds. One concern per commit.
- If something blocks unexpectedly, stop and show the human — never weaken a rule, a gate, or a test to make a check pass.
Customization checklist
harness/targets.config— build/test/lint/format commands per target type (typescriptis the default;pythonandstaticare examples).harness/reviewers.config— review backends (ollama|claude-fresh|codex). The model names shipped are examples; provision your own.harness/repos.config— copy fromharness/repos.config.example; maps the target repos the Forge builds. Gitignored.- Optional:
harness/board.configfor the read-only oversight board — do NOT copy the.example(its node IDs are placeholders); generate the live file withBOARD_OWNER=<org> ./harness/board-bootstrap.sh ensure.harness/intake.configtunes the clarify/restate budgets. - Run
bash .forge/scripts/init.shto fill the{{…}}placeholders, create a fresh bead ledger, and wire the git hooks. Verify withbash .forge/scripts/doctor.sh --post-init.
Full reference: docs/configuration.md.
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.

