Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Strongly-typed multiagent ant-robot colony exemplar — ADTs, session-typed protocols, affine-discipline resource handles, storage-as-functor framing, Active-Inference-flavored decision loop, mypy-as-oracle negative controls.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 4% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -11% | 0% |
Project-scoped skill for the in-repo exemplar at projects/templates/template_formal/. Load this when working inside the project.
template_formal exemplar — running scripts, editingsrc/template_formal/, or adding a new typed invariant.
subject is illegal-state-unrepresentable design or a decentralized multiagent simulation.
every ADT/session-type/affine-handle claim needs both a tests/mypy_fixtures/ negative-control fixture (mypy rejects the bad program) and a runtime unit test (the discipline actually raises).
testing, no compile-time linear/dependent-type claims) still hold after changes.
bash# From the repository root uv run pytest projects/templates/template_formal/tests --cov=projects/templates/template_formal/src --cov-fail-under=90 MYPYPATH=projects/templates/template_formal/src \ uv run mypy --strict --explicit-package-bases --namespace-packages \ projects/templates/template_formal/src uv run python projects/templates/template_formal/scripts/02_run_analysis.py uv run python scripts/pipeline/stage_03_render.py --project templates/template_formal uv run python scripts/pipeline/stage_04_validate.py --project templates/template_formal uv run python scripts/pipeline/stage_05_copy.py --project templates/template_formal # Optional formal side-specs (non-default; require lake/elan + a Java runtime) projects/templates/template_formal/scripts/check_formal_specs.sh
has neither. Affine handles (TransactionHandle, protocol-phase objects) are a runtime-guarded discipline — they raise on reuse, they are not type-checked against reuse. Grep for "dependent type" and "linear type" outside the manuscript's explicit limitations/scoping section must return zero matches.
negative-control fixture under tests/mypy_fixtures/ proves what mypy --strict rejects; a runtime unit test proves what actually raises. One without the other is an unfalsifiable claim.
src/template_formal/,not in scripts/.
tmp_path), a realin-process fault-injectable bus, and real mypy --strict subprocess invocations — never MagicMock/unittest.mock/mocker.patch.
Agent owns exactly one on-disk databaseand one protocol endpoint; the colony coordinator only ever holds the public Agent/PheromoneField interfaces.
formal/lean/or formal/tla/ ship, they must be reachable from scripts/check_formal_specs.sh — never a vestigial, unwired file.
AGENTS.mdREADME.mdTODO.mdprojects/AGENTS.mdOther measured skills in the registry, with their headline benchmark lift.