Adds --explain-slots flag to vera check. After a successful type-check, prints a slot resolution table per function showing which parameter position each @T.n index refers to.
$ vera check examples/math.vera --explain-slots
OK: examples/math.vera
Slot environments (index 0 = last occurrence in signature):
fn divide(@Int, @Int -> @Int)
@Int.0 parameter 2 (last @Int)
@Int.1 parameter 1 (first @Int)
Motivation: The dominant VeraBench failure mode is De Bruijn slot ordering (9pp gap vs Python). This flag lets agents self-correct via the check → read table → fix loop without any language change. Also useful for human reviewers.
Scope:
- New
--explain-slots flag on vera check (and --json mode extends output with slot_environments array)
- New
vera/slots.py utility module
- Prescriptive documentation updates to
SKILL.md, DE_BRUIJN.md, CLAUDE.md, README.md, and spec ch03
Closes #183 (won't fix — inline annotations are contraindicated; see that issue for the design rationale).
Adds
--explain-slotsflag tovera check. After a successful type-check, prints a slot resolution table per function showing which parameter position each@T.nindex refers to.Motivation: The dominant VeraBench failure mode is De Bruijn slot ordering (9pp gap vs Python). This flag lets agents self-correct via the check → read table → fix loop without any language change. Also useful for human reviewers.
Scope:
--explain-slotsflag onvera check(and--jsonmode extends output withslot_environmentsarray)vera/slots.pyutility moduleSKILL.md,DE_BRUIJN.md,CLAUDE.md,README.md, and spec ch03Closes #183 (won't fix — inline annotations are contraindicated; see that issue for the design rationale).