Take a repository from a red `mathema verify` to a green one by preparing every pending human decision so a person can make it in seconds: gather the witness and the source, derive which acceptance verbs are legal, pre-adjudicate any corrected claim, and print the exact command. You never run `mathema accept`. Use when the user asks to "clear the gate", "get verify green", "go through the pending decisions", or "what am I accepting".
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Clear The Gate?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tetrionlabs-clear-the-gate)
---
name: clear-the-gate
license: Apache-2.0
description: >-
Take a repository from a red `mathema verify` to a green one by preparing
every pending human decision so a person can make it in seconds: gather
the witness and the source, derive which acceptance verbs are legal,
pre-adjudicate any corrected claim, and print the exact command. You
never run `mathema accept`. Use when the user asks to "clear the gate",
"get verify green", "go through the pending decisions", or "what am I
accepting".
---
# Clear the gate
A red `mathema verify` is a queue of decisions, not a list of bugs. A
falsified claim means the code and a claim disagree, and deciding which of
them is wrong is a human act.
**The rule that matters most: you never run `mathema accept`.** Not with
`--yes`, not inside a script, not to save a step. There is deliberately no
accept tool on the MCP surface and a schema test pins that absence. You
prepare the decision and print the command; a person runs it.
That wall is about who decides, not who types. Everything around the
decision is yours: the witness, the source, which verbs are legal, drafting
a correction, running it to see whether it holds, and what comes after.
**Written against mathema 0.6.6.2** (`>=0.6.6.2,<0.7`). Tool names, the verdict and
acceptance vocabularies, the claim grammar and the badge artifacts all move
between minor versions. If `mathema --version` reports a different line,
say so and check the surface rather than trusting this document.
## What the gate fails on
`verify` defaults to **strict**: a falsified claim, an unaccepted unknown,
and an unverifiable (skipped) one nobody accepted all fail. `--lenient`
still fails the first two and tolerates the third.
Accepted risk passes in both modes and is named in its row
(`1 accepted-risk claim(s)`). A falsified claim is never accepted as risk.
Every risk acceptance is still held to the project's acceptance policy at
each verify.
A claim keeps the verdict its latest run found. A move from the verdict
before it is a **transition**, kept in the record with its kind and cause.
An open transition acts on the gate by kind: `regressed` fails in both
modes; `weakened` from `proven` to `holds` fails strict and warns under
`--lenient`; a supported claim fallen to `unknown` or `skipped` fails in
both modes until a person accepts the risk at the level it fell from;
`strengthened` and `fixed` pass. `.mathema/meta/policy.yaml` can set the
action per kind under `transitions:`. `invalidated` is not a claim verdict:
it names a function that changed since its record, and the action on it is
to reverify.
Most repositories have surface the routes cannot reach, and those arrive as
`skipped`. They are not decisions anyone owes. Say which mode you are
advising and why, rather than letting a default decide it silently.
Exit codes: `0` clean, `1` gate failure, `2` broken invocation or store.
## Which verb is legal
Derive the legal set from the verdict. Never suggest one the vocabulary
refuses.
| verdict | legal |
|---|---|
| falsified | fix the code, `discovery`, `superseded` |
| unknown, skipped | `risk`, `superseded`, `historical` |
| a claim with an open transition | `--transition`, with no `--as`; on a fall to `unknown` or `skipped` it is a risk sign-off |
| proven | nothing, a proof is its own acceptance |
| a whole record after a merge | `reconciled`, no claim name |
| a record whose function moved | `reconciled --from OLD_KEY`, keyed by the new name |
| a project's or third-party library row gating `verify` | `trusted`, a person's word that the row is right |
**There is no accepting a bug.** If the code is wrong, the code changes,
and the counterexample replays until the claim proves. `--as risk` on a
falsification is refused for exactly this reason.
## A transition is a decision too
When a claim has an open transition, the brief carries what the record
keeps in `mathema.transitions`: the kind, the cause (`this function
changed`, `a callee changed` or `nothing changed`), the date and commit,
and for a move after a code change the triggers that fired and the roots
of the moved chain. A regression or a fall to `unknown` with nothing
changed means two runs disagree; say that, since there is no code change
to point at.
A person acknowledges it with `mathema accept KEY CLAIM --transition`,
which records who and when. On a fall to `unknown` or `skipped` that
command is a risk acceptance at the level the claim fell from, so the
brief says what is no longer supported, and what the person is taking on
by owning it. A `regressed` transition is a falsification: the options
are the ones for a falsified claim, and acknowledging it does not make the
gate pass while the claim is still falsified.
## Accepted risk can expire
If `.mathema/meta/policy.yaml` sets `accepted_risk_lifetime_days: N` under
`acceptance:`, every risk acceptance written from then on records an
`expires` date N days later. From that date an unknown claim fails again
in both modes, and a skipped one fails strict and warns under `--lenient`,
its line naming the date and the command that accepts it again. Without
the key nothing expires, and evidence acceptances never expire. Accepting
a risk again keeps the one it replaces in the claim's `acceptance_history`.
Say in the brief whether a lifetime is set. A lifetime that is not a
positive whole number stops `verify` and `accept` with exit 2.
## `discovery` or `superseded`
Both retire a falsified row; the difference is what you are saying.
**`discovery`**: the falsification was right about the code and wrong about
the claim. The row moves to `discoveries:` **keeping its counterexample as
the witness**, so what was learned survives. Use it when the falsification
taught you something about the code.
**`superseded`**: you are changing what is claimed without disputing the
adjudication. The row moves to an append-only `superseded:` section with
the commit its truth held at. Use it when the claim was mis-stated and
there is nothing to learn.
The test: did this teach you about the code, or only about the claim?
A falsified policy row (a missing or absent input the code handles
differently than its row says) retires the same way, by the row's
name: `mathema accept KEY missing[x] --as discovery --corrected "..."`.
## Pre-adjudicate any correction
`accept --as discovery --corrected "<law>"` runs the replacement against
the live function **before anything is written**, refusing the acceptance
with a counterexample if it falsifies. That only helps if you use it.
Never propose a correction you have not run. Check the grammar with
`parse_claim` (executes nothing), then adjudicate with in-process
`check()`, which writes nothing. Put the result in the brief.
A correction is a claim like any other, so it follows the rules in
`design-claims` ("Write what must be true"): it keeps the domain over a
language where the input is text, JSON, a record, a path, a format or a
tree, and it is never a single point or a tautology standing in for the
law it retires. A falsified claim over `L[unicode]` corrected to
`f("abc") == "abc"` holds and says nothing. Narrow the language only
where the calling code enforces the narrowing, and say which caller does.
Those rules are provisional, measured once each on two real modules (see
the note in `design-claims`).
A claim that fails on a shape (a container against a number, an ordering
over an empty value) already carries corrections in its note: the
element, the whole, or a narrowed domain, each adjudicated before it is
given. Offer those first, and say which reading each one takes
(`docs/verdicts.md`, "Shapes"). A claim read back from a record gives
none, since its domain is stored apart from its law.
Without `--corrected`, mathema offers a mechanical inverse only when one is
sound and holds, and refuses to invent one from a chained comparison, an
`assuming` premise, a `let` section, an outcome clause or a negated form.
A refusal there means the true law is yours to state.
## Acceptance rewrites the claims files, so leave them alone
When a discovery retires a law, `accept` rewrites every claims file that
declares it, matched canonically. The stanza is replaced by the corrected
claim or removed when there is none, and the plan announces each rewrite
before anything happens. Read those lines into the brief: the user is
consenting to a source edit, not only a record change.
Do not delete the declared claim first, and do not re-author it in advance.
Both fight the acceptance.
A docstring or decorator surface cannot be rewritten this way, so `verify`
is the backstop: a declared claim matching a retired discovery is skipped
with a non-fatal note naming the remedy. **That note is not a gate
failure.** A different law under a retired name is new authorship and
adjudicates normally.
## The unit of interaction is a decision brief
Hand the user what they need in order to choose, with the command at the
end of it, rather than a command with an explanation attached.
```
DECISION n of N <dotted.key>
────────────────────────────────────────────────────────
claim <name>
verdict falsified route <route>
witness <inputs> -> <output> (claim asserts <law>)
source <file>:<line>
docstring "<the line it contradicts>"
WHAT HAPPENED
<why, in two or three lines, with any threshold measured
rather than estimated>
YOUR OPTIONS
[1] the CODE is wrong <the fix, and its cost>
[2] the CLAIM was wrong accept --as discovery
correction: <law>
pre-adjudicated: HOLDS over <n> trials
[3] re-author instead accept --as superseded
-> retires without keeping the witness
IF YOU CHOOSE [2], ACCEPT WILL ALSO
- rewrite <claims file>: <what it does to the stanza>
```
Three things that does which a bare command does not: it puts the
**witness beside the source and the docstring** so the contradiction is
visible rather than inferred; it **pre-adjudicates the options** so the
user cannot pick one that turns out wrong; and it **declares the side
effects before the choice**.
Measure thresholds rather than estimating them. A bisection costs seconds
and "18.714973875118524" is worth far more to the person deciding than
"around 18".
## An adjudication is not undoable, so author deliberately
A claim that falsifies on its first adjudication joins the store's
append-only membership. Deleting it from the claims file does not remove
it: membership is repopulated from the verified row so an adjudication set
never silently shrinks. The exits are supersession and human acceptance.
This is the method, not an obstacle. A verdict that could be erased would
be worth nothing. What follows is that **authoring a claim is a
commitment**, so do the exploring first: try each spelling with in-process
`check()`, which writes nothing, and move only the ones you mean into a
claims file. mathema prints a line naming this the first time a claim
falsifies.
If a bad claim does land, dispose of it through the vocabulary like any
other, usually `superseded`. Never hand-edit or revert the verified layer
to make a falsification disappear: that is the "quietly rewritten into
something true" failure the whole method exists to prevent, and it breaks
the record's integrity stamp besides.
## After upgrading mathema
Upgrading to 0.6.3 re-records every claim once: claim hashes now carry the
frontend's namespace (`py:`), and each record states its old and new form.
That is neither a code change nor a moved function, so never answer it
with `accept --as reconciled`. Re-verify, then read what moved: 0.6.3
moves some verdicts once, each by a rule its changelog states (an exact
mathematics line over a finite domain, `route: derive` no longer settling
by sampling, `None` under an undeclared return type read as no value,
`is_language_defined` falsified by a value returned for a non-member).
Brief the person on every verdict that moved, with the rule beside it,
before anything is accepted.
A record written before 0.6.5 is re-stamped once by the first `verify`
after upgrading: its functions are re-adjudicated under the trigger
`record-format`, and a move found that way is a transition with the cause
`recorded before 0.6.5, reverification needed`, never `this function
changed`. The verdicts are the current engine's, so a regression found
this way fails the gate like any other. Every acceptance in such a record
(a risk, a discovery, a supersession) reads as stale afterwards and is
given again with `mathema accept`: list them as decisions owed, and never
answer them with `--as reconciled`.
0.6.4 moved some verdicts once, each by a rule in `docs/verdicts.md`,
"Shapes": a container compared with a number by `==` or `~=` is
falsified, 0 included; an ordering over an empty value does not hold; one
dimension fixed to two sizes is `skipped:misspecified`; and a premise
pinning a whole vector to a value (`assuming x == 0`) reads `unknown`
until it is read. Brief each such move with its rule, and with the
correction the note offers.
0.6.6.2 checks every record again once: a record stores the rules it was
written under, and one written earlier is re-adjudicated by the next
`verify`, then fresh. A claim whose stored text this release writes
differently (a string literal, a negated relation) is re-recorded with a
note, never a supersession. Where an earlier release wrote one stored
text for two different claims, `verify` reports it as ambiguous, names
both readings, and checks the claim as written; if the claim was edited,
`--as superseded` is the person's command, so brief it like any other
decision. A risk accepted on a claim a later check proves or finds
holding stays in the record as history and is no longer counted as
accepted risk (`CHANGELOG.md`, 0.6.6.2).
## Order of operations
Gather once (`pending_decisions`, its `intent-acceptance-new` rows
included, `verify_project`, source spans from `project_index`), classify, prepare, brief, let the human accept,
re-verify, then refresh coverage, then regenerate badges, then commit.
The two ordering mistakes that actually happen: generating badges **before**
the acceptances, which describes a store that no longer exists, and running
`badges` without refreshing coverage, which silently understates the
implementation score (it unions test, probe and proof reach) or, with no
coverage at all, re-derives reach and runs for many minutes.
`mathema badges` and the MCP `badges` tool print a notice, write nothing
and exit 0 unless `MATHEMA_BADGES=on` is set. The badge files come from
`mathema-ci measure --out`; `MATHEMA_BADGES=on mathema badges --out` is the
built-in writer, which a later release removes. A script that reads their
output needs one or the other.
From 0.6.6.1 implementation counts only the lines reached by the probes of
claims included for a function, so code with neither tests nor claims
reads lower than it did under 0.6.6. A drop across that upgrade is the
measure changing, not the code; say so in the report (`CHANGELOG.md`,
0.6.6.1).
## Integrity, and the verb never to reach for
A record whose contents drift from its stamp emits a checksum warning. Fix
it by re-adjudicating the named key, which re-stamps from evidence:
```
mathema verify <key>
```
`accept <key> --as reconciled` vouches for contents **as they stand,
without checking them**. It is for the state after a merge or rebase, where
the cause is known. Never use it to silence a checksum complaint you have
not explained, and never offer it as a peer of re-adjudication.
## A function that moved
A record is keyed by the function's dotted name, so moving or renaming a
function leaves its record under a key that no longer resolves. When that
orphan's form hash matches a function with no record, `verify` fails both
keys and prints the exact command:
```
mathema accept <new.key> --as reconciled --from <old.key>
```
It renames the record, carrying every claim row, acceptance and its
history, the lineage, the PIN stamp and any lock, and removes the old
file. Until someone runs it, the new key gets no record, because a fresh
one would start the history over. Over MCP the same pairing arrives as a
`moved` row from `pending_decisions`, with the command in its detail.
Whether the two are the same function is the human's call, so it goes in
a brief like any other decision. Put both sources side by side: a matching
form hash is strong evidence, not proof, since two small functions can
share one. When the forms differ, mathema asks a second question before
renaming, and `--yes` does not answer it (only `--accept-form-change`
does, and that is the person's flag to pass, never yours); the record then re-adjudicates
against the new code on the next sweep. Never run the rename yourself, and
never delete the orphan record to make the failure go away: that discards
the history the rename exists to keep.
## Report honestly when it is done
**Say what the badges deleted, not only what they wrote.** `badges --out`
owns its directory and prunes any badge-shaped file it did not write,
returning both lists. A deletion usually means a rename upstream, and a
README pointing at the old name would otherwise serve a frozen number.
**Start a README from `readme-snippet.md`**, written beside the badges.
Hand-authoring that block is how a stale badge name survives.
**Quote the clarity ceiling with the clarity score.** Clarity reads 100
only when every source of uncertainty is settled by proof; anything left,
however small, reads 99 at most. A call into a library the compendium does
not model leaves some that no claim here can settle, so the ceiling sits
below 100 until the compendium covers it. A bare percentage invites someone to chase a number that does
not exist, when the ceiling rises with compendium coverage, not with more
claims here.
**Do not claim a falsification feeds clarity.** A row retired into
`discoveries:` leaves the calculation, so accepting a discovery can lower
the score. Say that plainly rather than presenting it as a regression.
## What "done" looks like
`verify` exits 0 in the mode you named, every decision was made by a
person, and you can say for each one what they chose and why. Badges were
regenerated after the acceptances and provably match the store, which
`git diff --exit-code .mathema/badges/` shows. Nothing was pushed unasked.
Then report what stayed open: the claims still skipped, the clarity
ceiling, the risks a human chose to carry, any proof that rests on an
`assumed` language definition with values skipped, and any risk whose
acceptance has an `expires` date.
Two known limits of 0.6.6.2 belong in that report where they apply
(`CHANGELOG.md`, 0.6.6.2, "Known limits"): in a few narrow cases a result
is reported at a higher level than its evidence supports, each described
in the issue tracker (#120 to #132); and a claim still runs its function
on values drawn from its domain, so a function that writes, deletes or
sends should not carry claims that are probed. A green gate with unstated gaps
is worth less than a green gate whose gaps are written down.