using-anvil
Skill0 starsChanged 7 months agoMITView on GitHub
Bootstrap loader for the DG-Anvil plugin. Enumerates the five primitives, seven skills, five commands, and the core loop. Loaded at session-start.
In this repository7 other files it gives its agents.
- authoring-skillsSkill
- contractingSkill
- executingSkill
- judgingSkill
- planningSkill
- resettingSkill
- verifyingSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Very specific: line 38
Read the active contract at ./anvil/contract.yml.
- Very specific: line 39
Read the active plan at ./anvil/plan.yml.
- Very specific: line 42
If any level fails, dispatch judging.
- Very specific: line 44
When all tasks pass, run /ship.
- Distinctive: line 56
If any of these conditions obtain, stop and route back to the loop:
- Very specific: line 64
Check the current loop state with node "$CLAUDE_PLUGIN_ROOT/cli/anvil.js" contract --validate anvil/contract.yml and node …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Overview
DG-Anvil enforces the Anvil loop as structural gates, not advisory prompts.
Five primitives: Contract, Plan, Loop, Ledger, Court.
Seven skills that compose the loop:
contracting- turn an intent into a machine-readable contract with four verification levels per criterion.planning- decompose the contract into an atomic task DAG with wave ordering; every task cites contract criterion ids.executing- dispatch a task to a fresh subagent in an isolated worktree.verifying- run the four verification probes (Exists, Substantive, Wired, Functional) against the task output.judging- dispatch the Court on evidence-only inputs to adjudicate the verification result.resetting- on fail, append a non-null lesson to the ledger and re-queue the task.authoring-skills- meta-skill governing how skills themselves are written, reviewed, and retired.
Five commands surfaced by the plugin:
/start- begin a run: draft and confirm the contract, then produce the plan./continue- resume the loop at the next task./ship- finalize and integrate passing work./abort- stop the run, capture a lesson if appropriate./ledger- query the global lesson ledger.
Invoking the Anvil CLI: the CLI binary is cli/anvil.js inside the plugin directory and is NOT on PATH. Always invoke it as node "$CLAUDE_PLUGIN_ROOT/cli/anvil.js" <subcommand> .... Every command example in every skill should be read this way.
When to Use
Loaded by hooks/session-start on every fresh Claude Code session and after any /clear or /compact. Re-load it at the start of any sub-session where the contract must be rehydrated into context.
Process
- Read the active contract at
./anvil/contract.yml. If absent, route tocontracting. - Read the active plan at
./anvil/plan.yml. If absent, route toplanning. - For the next queued task, dispatch
executingin a fresh worktree. - On task completion, run
verifyingagainst all four levels named on the criterion. - If any level fails, dispatch
judging; otherwise mark the task verified. - On Court verdict fail, run
resetting: append a non-null lesson, re-queue the task. - When all tasks pass, run
/ship.
Rationalizations
Reject the following shortcuts (failure-taxonomy row citations in parentheses):
- "The contract is obvious; skip to plan." (row 7: skipping the contract step.)
- "This task is small; verify informally." (row 24: verification by agent claim.)
- "One fail is fine; proceed to next task." (row 28: ignoring a fail by minimising it.)
Red Flags
If any of these conditions obtain, stop and route back to the loop:
- Contract missing the four verification levels on any criterion (row 8: contract without levels).
- Plan with a task that cites no criterion id (row 14: plan drift from contract).
- Agent attempting to mark a task verified without running all named levels (row 25: claim-over-check).
Verification
Check the current loop state with node "$CLAUDE_PLUGIN_ROOT/cli/anvil.js" contract --validate anvil/contract.yml and node "$CLAUDE_PLUGIN_ROOT/cli/anvil.js" plan --validate anvil/plan.yml --contract anvil/contract.yml. Both must exit 0 for the loop to proceed. If either exits non-zero, the structured error names the failing invariant and the skill to route to.
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.

