The Forge
The engine that refuses a confident wrong answer. Per ignem, probatur — proven through fire.
The Forge is the model side of a SAFE-native app-building system: not a model that emits answers, but the harness that refuses to let a confident wrong one stand. It is the engine every builder in the fleet pins, and it needs no live model to run — it works on decisions, plans and build directories the way a linter works on source.
It asks one question of everything that passes through it: has a human already answered this? When the answer is on file, the maker is confirmed, not re-asked. When it is not, the maker is asked once, properly, and the answer is sealed in their own memory. Waved-through answers come back sooner; argued ones go away longer. And every time the engine states a confidence, it finds out afterwards whether that confidence was earned.
What it refuses, and where
| Layer | What it refuses | |
|---|---|---|
| 🚪 | The entry (forge/entry.py) |
a build that never asked. Nestor is the first tool, not an available one: the entry asks the project's memory before anything else and refuses outright without it. Then the box, then remote — and it says which tier answered. |
| ⚖ | The checkpoint loop (forge/checkpoint.py) |
a confident wrong decision — a three-band interaction (auto / recognize / socratic) over a memory of the maker's sealed decisions, with an engagement gate that scores rubber-stamping and a governance layer that records the maker's non-forgeable sign-off. Authorship is not authority. |
| 🔍 | The measuring panel (forge/measure_panel.py) |
a confident wrong artifact — measuring instruments run across a build; convergence (two or more instruments naming one artifact) is the alarm, and the panel reports its own coverage honestly, so a class nothing measured is named unseen, never sound. |
| 📊 | The calibration wire (forge/build_loop.py) |
a confidence nobody checked — a prediction is recorded before the maker answers and resolved after, against what they actually chose. Ground truth that arrives on its own. |
From a sentence to a seal
The loop, end to end, with no model in it:
pip install forge-play nestor-meaning # or, in a checkout: pip install -e '.[test]'
# 1. the entry — Nestor first, then the keyword → major table, then the first
# decision through the router. Run it twice: asked once, confirmed the second time.
python -m forge.entry "I got sum kol sites for app to spin" --project rally --builder rosalind --choose web
# 2. a plan with a fork in it — extraction, the checkpoint, the calibration wire
python -m forge.decision_extract demo/fixtures/fork_plan.json
python -m forge.build_loop demo/fixtures/fork_plan.json --builder rosalind --choose "where-the-dates-live=exif in place"
# 3. the whole day, as a person would have it — the friction log is the real output
python demo/the_first_bite.py
forge/keywords.toml— the keyword → major table. A flat file to read and argue with.forge/majors.py— the scan over it: a span of text in, hits out. Deterministic, model-free, two callers (the Forge's entry and the corpus's prose lane) through one interface.forge/plan_shape.py— the decision-bearing plan:file_writeentries plus oneforkkind that carries a decision (options, tradeoffs, a recommendation, a confidence). A model-written plan carries forks; nothing else it writes reaches the router.forge/decision_extract.py— noticing that a decision is being made, by rule: a fork the proposer declared, a major the sentence left open, two writes to one path.forge/build_loop.py— each decision through the checkpoint, the answer substituted back, no fork left; and the prediction recorded before, resolved after.forge/calibration_ledger.py— the scorecard: brier, hit rate, overconfidence — and onereviewitem routed to a human when the model promises more than it delivers.
The home
All Forge state hangs off a single root: ~/.forge (override FORGE_HOME),
resolved in one place, forge/paths.py. Under it: the per-builder checkpoint
memory and calibration ledger (checkpoints/), and the per-project Nestor
store (projects/<project>/nestor/) — a store whose whole content is one
build's world, disposable, portable, and the first thing the entry asks.
Reading the home back
The checkpoint ledger under ~/.forge/checkpoints/ledger.jsonl is also a
process corpus, and corpus-lens
reads it as one (corpuslens run ~/.forge --adapter forge): how long a maker
takes to answer a checkpoint, how decision types resume over days, whether
the answers read as one human — and, refused by name rather than reported,
the three rates a corpus of checkpoints cannot mean. It keys on the ledger
lines the engine already writes (entity_resolve asked/confirmed,
entity_seal answered, ts, domain, surface, canonical,
surface_sha); tests/test_entry.py pins that shape as a contract, so a
rename here is a corpus-lens change too. The Forge does not import
corpus-lens and corpus-lens does not import the Forge: the file is the seam.
Dependencies
Zero at runtime, on purpose — the same promise kartikeya and jeles make,
and the reason willow-mcp can take this package cheaply. Every heavy piece
is soft, and the engine degrades around its absence honestly:
| Absent | The engine still runs, but… |
|---|---|
Nestor (nestor-meaning, the decision seal) |
the entry refuses — a build that never asked cannot start. Everywhere else: full-Socratic every time, decisions made but not sealed, no recognition, no reseal. |
| fsrs (spaced resurfacing) | fixed-interval fallback |
| kartikeya (the sandbox) | the execution instrument declares an honest coverage gap instead of parsing unsandboxed |
| codebase-memory-mcp (the call graph) | call-graph is named uncovered; a payload it cannot read is COULD NOT RUN, never clean |
willow-gate (forge[trust]) |
the promotion-trust seam is off; verified_by stays a string the host checks |
The Forge never imports willow-mcp. Willow depends on the Forge; the reverse
would be a cycle, and tests/test_no_reach_back.py keeps it that way. Three
modules that willow-mcp once owned — human_loop, friction_floor, and the
detection half of model_egress — are canonical here, and willow-mcp imports
them from forge-play; its friction_floor drift guard hashes this repo's
copy against the willow-gate original.
Development
pip install -e '.[test]'
pytest
The suite is green with the soft dependencies present; individual tests skip
or fall back when theirs is absent. With the fleet's per-verifier Nestor
keyring in your environment the seal tests are correctly refused (a synthetic
verifier has no key) — run with NESTOR_KEYRING unset.
Releases are cut by release-please from conventional commits and published to
PyPI as forge-play through Trusted Publishing; the version is the git tag,
never a literal. tests/test_release_wiring.py holds the fifteen rules that
keep the three release files agreeing. Only commits that change what
pip install forge-play gives someone cut a release.
Design
docs/design/ holds the founding design — the decisions the engine was built
from, and the record of what is built and what is next. Decisions made since
live as drafts in the engine's own per-project Nestor, waiting for a human
seal. Documents are cited, never sealed.
License
Apache-2.0. See LICENSE and NOTICE.
Metadata
Release files for forge-play 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| forge_play-0.7.2.tar.gz | 373.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forge_play-0.7.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 537.2 kB
Release files / forge_play-0.7.2.tar.gz
| Download URL | forge_play-0.7.2.tar.gz |
|---|---|
| Size | 373.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0c93560843a9a660625fea120e22715bc97455bf5a8c28fe2b563aea845470a
|
|
BLAKE2b-256 checksum How to use checksums |
f314026c37edcf8028afab13f8563ac3b9cdb204c5a38b5dee35d5dd6f2851cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency logRelease files / forge_play-0.7.2-py3-none-any.whl
| Download URL | forge_play-0.7.2-py3-none-any.whl |
|---|---|
| Size | 164.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b10dc9af30532dbf52519ebf7565a0308339bb67d1addb30c866b360653ee22
|
|
BLAKE2b-256 checksum How to use checksums |
caaebe389d1f9b7a23b846581f6c848eff359aa68e893d23028a074e2da42ee6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency log