Design a claim set for a function following the Claim-Driven Development spec: state checkable properties before generating or reviewing code, in the spec's authoring YAML shape, then verify every one against the real implementation instead of asserting it holds. Staged to match the CDD loop in cdd.md (state, implement, verify, diagnose, retain, accept). Use when the user asks to "add claims", "write a claim set", "design claims for this function", or wants code reviewed the CDD way instead o...
2 stars
0 votes
0 copies
1 view
Added October 9, 2026
ai-agentspythonrustgobashsqlnodedjangoawsgit
Works with
cli
mcp
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
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 Design Claims?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tetrionlabs-design-claims)
---
name: design-claims
license: Apache-2.0
description: >-
Design a claim set for a function following the Claim-Driven Development
spec: state checkable properties before generating or reviewing code, in
the spec's authoring YAML shape, then verify every one against the real
implementation instead of asserting it holds. Staged to match the CDD
loop in cdd.md (state, implement, verify, diagnose, retain, accept). Use
when the user asks to "add claims", "write a claim set", "design claims
for this function", or wants code reviewed the CDD way instead of by
reading the diff.
---
# Design claims
A method for authoring claims on a function or codebase that prevent
regressions, check assumptions, and tie down expected behavior, in the
shape defined by the Claim-Driven Development spec
(<https://github.com/aaronbyrnephd/claim-driven-development>, version
`v0.2.0/`), and run through the CDD loop
that spec defines. The deliverable is a claim set plus its actual verified
verdicts, never a claim set alone.
**The rule that matters most: you never adjudicate your own claims, and
you never close your own diagnosis.** Proposing a law and believing it
holds are different acts, and so are establishing that a claim and an
implementation disagree and deciding which of them is at fault. Every claim you
write here gets run through the real checker against the real function
before you report anything about it. If you cannot run the checker (no
implementation available, no test harness), say that plainly instead of
asserting a verdict.
**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.
## Before you start
Read `claim-anatomy.md` and `record-schema.md` in the spec's `v0.2.0/`
(<https://github.com/aaronbyrnephd/claim-driven-development/tree/main/v0.2.0>)
if you have not already. This
skill assumes you know the claim tuple (quantifiers, law, domain,
tolerance, evidence route) and the authoring YAML shape.
## Four things every claim routes through
Before writing any claim, know which of these four things you're actually
looking at; conflating them is where most bad claim sets come from.
- **Intent**: why the function exists, what it's for. Declared (someone's
stated purpose, written before checking) or documented (read from the
function's own docstring); see `record-schema.md`, "Where `intent`
comes from," for how those two differ and which wins when they disagree.
- **Concept**: the claim itself, the specific behavior being asserted
("f is odd," "this sum is conserved"). This is the core of the four; the
other three all exist in relation to it. The claim families in
`claim-anatomy.md` (symmetry, order, conservation, ...) aren't the
concept, they're a checklist for *finding* one: walking them
systematically is how you discover candidate concepts worth turning into
claims. There's no `family` field in the v0.2 schema, and there doesn't
need to be; the concept lives as the claim's own `law`, not as a
separate tag.
- **Evidence**: what checking actually produces, the test outcomes and
claim-check results, a verdict and its basis (`holds (n=...)`,
`falsified` with a counterexample, `skipped` with a reason). See
`evidence-ladder.md` for what each is worth. This is the one thing on
this list you cannot supply yourself; only the real checker, run against
the real codebase, produces it.
- **Implementation**: the actual codebase, not your model of it. Every
claim ultimately has to be checked against this, and against nothing
else.
A good claim-design pass keeps these straight: state the intent you're
working from, find a concept worth claiming by walking the families as a
checklist, then get real evidence by checking that concept against the
actual implementation. Skip the last step and you've produced a
plausible-sounding claim with no epistemic weight behind it, which is
exactly the failure mode this whole method exists to prevent.
## Stages
Staged to match `cdd.md`'s loop exactly, one section per step, so it's
always clear which part of the cycle you're in.
### Stage 1: State claims
This is the stage this skill mainly does. Three parts:
1. **Read the function, not just its name.** Get its intent (its
docstring if it has one, or ask), its parameters and their kinds
(scalar, sequence, int, string, record), and whether it's pure. Impure functions still
get claims about determinism and effects, but algebraic laws over their
output are not meaningful; say so rather than proposing them. A claim
runs its function on values drawn from its domain, so a function that
writes, deletes or sends should not carry claims that are probed
(`CHANGELOG.md`, 0.6.6.2, "Known limits"); claim the pure core it
calls instead.
2. **Walk the concepts and ask, for each, "does this plausibly apply?"**
Do not propose one just because it exists in `claim-anatomy.md`;
propose it because you have a specific reason to think the function has
that property.
- **Symmetry / intertwining**: is there an operation `T` on the input
that induces a predictable operation `S` on the output? Even/odd,
permutation-invariance, scale- or translation-equivariance are common
instances. A moving average over time is *not* permutation-invariant;
saying so is itself a claim worth stating and falsifying on purpose.
- **Order**: is the output monotone in some input? Bounded by the
input's own range? A contraction?
- **Compositional**: is `f` idempotent (`f(f(x)) == f(x)`)? Involutive?
A homomorphism over some operation?
- **Aggregate / conservation**: does some total, sum, or norm get
preserved or predictably transformed?
- **Asymptotic**: does behavior over a growing family of inputs matter
more than any single call? (Not evaluable by the reference
implementation's conjecture pipeline in v0.2; state it anyway if it's
true, and expect `skipped`.)
- **Structural**: purity, determinism, complexity. Cheap to state,
often skipped because they seem too obvious to write down; write them
down anyway, they're real coverage.
3. **Write each candidate as a law and assemble the authoring-shape
YAML**, over `f` and the function's own parameter names, plus any
auxiliary variable you need (an extra lowercase name not among the
parameters; the reference checker samples it independently as a real
number). Calls are restricted, by design, because claim sets are meant
to accept untrusted proposals: a safe set of maths functions is
admitted and anything else is rejected before it runs. Don't fight it;
restate the law inside the allowed grammar.
**Read the checker's own grammar reference rather than trusting this
paragraph.** The accepted language is materially richer than any
summary suggests, and an author working from a paraphrase leaves
evidence on the table. Two constructs earn their keep often enough to
name here:
- `assuming <precondition>, <law>` states the condition a law holds
under. `assuming is_defined(f), |f(x, y)| <= 1` is what lets a claim
about a two-sequence function survive inputs the function
legitimately refuses; without it the same law falsifies on
synthesised mismatched-length arguments and reads like a bug in the
code. On one real run that single spelling was what made fourteen
claims adjudicable at all.
- `let g = pkg.module.function` binds a named function, so a law can
relate two implementations: how you claim that a vectorised routine
agrees with the scalar core you extracted from it.
- **A dimension premise states a size precondition directly**, which is
what most numeric code actually needs.
`assuming len(x) == len(y), f(x, y) == f(y, x)` says the two sequences
must agree, rather than leaning on `assuming is_defined(f)` to imply
it. A minimum works on the length or on a named dimension:
`assuming len(X) > 6, ...` and
`for X in R^(n*m), assuming n > 6, ...` both adjudicate. Constrain a
dimension as a premise, not as a quantifier.
Where the checker publishes its lexicon (mathema serves it as a
resource, and `claim_grammar` returns the same content), fetch it once
at the start and write against that.
```yaml
module.qualname:
intent: one line, what the function is for
signature: "(types) -> type"
claims:
- name: odd
law: "f(-x) == -f(x)"
```
**Omit `route:` unless you mean to constrain it.** A checker with more
than one route picks the strongest it can serve for each claim, and
pinning a route can only take evidence away. This is worth stating
flatly, because getting it wrong is expensive and entirely silent. On
one real run a claim set written with `route: probe` throughout
adjudicated **0 proven, 70 holds, 22 skipped**; the identical file with
the route line removed gave **39 proven** and adjudicated 20 of the 22.
Nothing anywhere indicated that the pin was the cause.
Pin a route only to *say something*: `derive` to say that only a proof
counts, or `probe` to say a symbolic proof is not what you want here.
Since 0.6.3 `route: derive` means derive: a claim it cannot settle ends
`unknown` with derive's reason, never `holds` from sampling, and the
probe on that route only looks for a falsifying point. If you have no such
intent, leave the field out. Omit `grammar`; mathema's claim language is
the default. Set it only to mark a claim written for another checker.
#### Write what must be true, not what it happens to do
A claim set describes the function the caller needs, not a trace of the
one in front of you. Work through these in order.
1. **Purpose.** Say in one sentence what the function is for, as its
intent. Each claim serves that sentence.
2. **Domain.** The inputs it accepts are the claim's `for` domain, and the
conditions it needs are `assuming` premises
(`for a in R^n, assuming dim(a) >= 2, ...`; `docs/grammar.md`).
3. **Result.** What it returns there. Where a known form exists, state it:
- a closed form, `for x in D, f(x) == expr`, with `f` not in `expr`;
- a property only one function has: a round trip with its inverse, or
a recurrence with its base case
(`for n in [2, 30] subset Z, f(n) == f(n-1) + f(n-2)` beside
`f(0) == 0` and `f(1) == 1`; `docs/grammar.md`, "Recurrences");
- or every case of a finite domain (`for mode in {"a", "b"}, ...`),
which is swept member by member.
4. **Failure.** Which inputs raise what: `for v in {...}, raises(f(v), E)`,
or the same over an interval or a language. `raises(...)` is proven
only for an explicit `raise` behind a guard on a parameter whose
domain is declared (`docs/grammar.md`, "Partiality").
5. **A point (`f(2, 3) == 5`) only on a finite domain, or as an anchor**
beside a claim over a domain; never on its own. `f(3) == 9` says
nothing about `f(4)`.
6. **No tautology.** No claim whose two sides are the same
(`f(x) == f(x)`), and none true of every function of this signature.
7. **Of the claims you could write, prefer the one that rules out the most
wrong functions**: a wrong formula, an off-by-one, swapped arguments, a
dropped guard should each falsify some claim.
8. **Where an input is text, JSON, a record, a path, a format or a tree,
draw it from its language**, never from a number range or a few
strings you picked: `L[unicode]`, `L[json, depth <= 6]`,
`L[pkg.mod.Model]` (pydantic, dataclass, TypedDict, a JSON Schema
dict), `L[path]`, `L[toml]`, `L[yaml]`, `L[pkg.mod.Node, depth <= 20]`.
Narrow only as the callers do (`L[unicode] \ {""}`, `len <= 255`). Over
a language, state what the result admits
(`for s in L[unicode], f(s) in L[slug]`), that every member answers
(`is_language_defined(s)`) and every non-member is refused
(`excluded_outside_domain(s)`), round trips
(`let loads = json.loads, for s in L[json], loads(f(s)) == loads(s)`),
and inclusion of one record language in another where the grammar can
say it (at mathema-language 0.4.2 it cannot yet; see
`use-mathema-language`). Sources: mathema-language's
`tutorial-choosing-inputs.md`, `json.md`, `catalogue.md`, `text.md`,
`formats.md`.
**These rules are provisional.** They have been measured once each on
two real modules, with two models, and on a small numeric suite, against
the same work done without them. What held on both real modules: no
claim true of any function (6.5% and 11% of claims before, none after),
and no more refuted claims (3 and 3 on one, 19 and 5 on the other). What
held on one only:
on a module that reads JSON, base64 text and short identifiers, the share
of claims drawn over a language rose from 2% to 60% and the share that
were single points fell from 0.91 to 0.38; on the other module, whose
inputs are records of its own types, neither moved (single points 0.82
before, 0.92 after; language claims 11% before, 8% after, all refuted
because the drawn records did not fit the function's types). So rules 5
and 8 are not yet shown to change what gets written in general. On the
numeric suite every seeded defect was still caught. A block of numeric
examples beside the rules, and a step naming each property before
writing it, added nothing measurable there, so neither is part of them.
Whether the rules make claims stronger (reject more wrong versions of a
function) is not yet measured. One pass per module: expect them to
change.
Worked examples of rules 3 to 8 over languages, each parsed by mathema
0.6.6.2 with mathema-language 0.4.2 and adjudicated against a small
implementation (the examples illustrate the rules; they were not part
of what was measured):
```yaml
app.text.canonical_json: # (s: str) -> str, sorted keys, no spaces
intent: rewrite a JSON document in one canonical spelling
claims:
- name: round_trip
statement: "let loads = json.loads, for s in L[json, depth <= 6], loads(f(s)) == loads(s)"
- name: idempotent
statement: "for s in L[json, depth <= 6], f(f(s)) == f(s)"
- name: emits_json
statement: "for s in L[json, depth <= 6], f(s) in L[json]"
- name: refuses_non_json
statement: "for s in L[json], excluded_outside_domain(s)"
app.text.normalise_name: # (s: str) -> str, NFKC, one space, casefold
claims:
- name: idempotent
statement: "for s in L[unicode], f(f(s)) == f(s)"
- name: one_answer_per_spelling
statement: "let nfkc = mathema_language.text.nfkc, for s in L[unicode], f(nfkc(s)) == f(s)"
app.text.is_slug: # (s: str) -> bool
claims:
- name: accepts_every_slug
statement: "for s in L[slug], f(s) == True"
- name: anchor_rejects
statement: "f(\"Not a slug\") == False"
app.auth.verify: # (keys: dict, signature: str) -> bool
claims:
- name: no_keys_refuses_every_signature
statement: "for signature in L[unicode], raises(f({}, signature), SignatureError)"
app.text.fingerprint: # (s: str) -> str, "fp-" and 16 hex digits of a SHA-256
claims:
- name: lands_in_slug
statement: "for s in L[unicode], f(s) in L[slug]"
- name: fixed_length
statement: "for s in L[unicode], len(f(s)) == 19"
- name: answers_every_string
statement: "for s in L[unicode], is_language_defined(s)"
```
What they came back with is part of the example. The round trip is
falsified at `s = 'NaN'`: `json.loads` reads a bare `NaN`, and a NaN
equals nothing, so whether the serialiser should refuse it is a question
for a person, not a reason to narrow the language. `answers_every_string`
is falsified at `'\ud800'` with `UnicodeEncodeError` when the fingerprint
encodes with plain `utf-8`; a lone surrogate is a member of `L[unicode]`,
and no hand-picked list of strings would have tried it.
`is_language_defined` over `L[json, depth <= 6]` is falsified when the
function accepts a deeper document, because a narrowed language expects
its non-members refused: narrow only where the code enforces the bound.
For the same reason `excluded_outside_domain` suits a function that
refuses, never a predicate such as `is_slug`, which answers `False`. The
anchor sits beside `accepts_every_slug`, never in place of it. The rest
hold over their languages, the fingerprint's once it encodes with
`surrogatepass`.
#### Shapes: a container is never its element
`f(x) == 0` over a returned list, array or Series compares a container
with a number and is falsified, 0 included; write the element
(`f(x)[0] == 0`), the whole (`f(x) == [0, 0, 0]`) or a norm. An ordering
over an empty value does not hold, so `f(n) >= 0` is falsified where
`f(n)` is `[]` or `""`. One dimension fixed to two sizes is
`skipped:misspecified`, and a premise pinning a whole vector to a value
(`assuming x == 0`) is not read yet and comes back `unknown`. A claim
that fails on a shape gives corrections in its note, each already
adjudicated. See `docs/verdicts.md`, "Shapes".
#### Strings and records take a language
A string or record parameter is quantified over a language, `L[...]`,
served by the `mathema-language` package (`pip install "mathema[language]"`,
also in `mathema[all]`; at mathema 0.6.6.2 the extra takes 0.2 to 0.4, and
this skill describes 0.4.2); without it the claim is `unknown`, "needs
mathema-language". The language decides what the verdict covers, so pick
what the caller really passes. The `use-mathema-language` skill has the
longer form: the adaptors and what each refuses, narrowing, and reading
a result that names a shape. In short:
- **Text.** `L[unicode]` for anything a user, file or service sends, and
narrow only to what the calling code enforces: `L[ascii, len <= 32]`,
`L[unicode] \ {""}`, or a format (`L[uuid]`, `L[iso_date]`, `L[ipv4]`,
`L[json]`). A config file is `L[yaml]` (read as YAML 1.2; its first
hazards are the documents PyYAML's 1.1 rules read differently, such as
`country: no`) or `L[toml]` (dates come back as `datetime` objects).
A `Literal`, a `str` `Enum` or a guard to a set is a finite set, swept
member by member.
- **Records.** Name the schema the application already has, by dotted
path: `L[app.forms.SignupForm]` (pydantic), `L[app.db.Order]`
(SQLAlchemy), a Django model, a dataclass, a TypedDict, or a JSON Schema
dict. It stays at the top level of its module; never copy it into the
claim. A parameter annotated with the class infers it.
- **Paths** narrow a record: `o.lines[*].qty in [1, 10]`,
`o.address.zip in L[digit]`. A bound means the value is there; add
`| {absent}` to keep records where the path is `None`, a key left out
or an index past the end. A `None` list element or a NaN is a hole,
`missing`, not absent.
- **Command lines.** `L[app.cli.build_parser]` names an argparse parser,
or a function of no arguments annotated to return `ArgumentParser`
(how most command lines are built): its members are the namespaces
`parse_args` returns, one shape per subcommand, so a handler taking
`args` is claimed over every namespace a user can produce. A bound on a
function that reads only numeric options is `proven`; one that branches
on the subcommand or a `choices` option is decided by running the
code, so expect `holds`. The raw `argv` a `main` receives is
`mathema_language.argv.argv_language(build_parser)`, registered under a
name with `mathema.languages.register_language` (so from Python, not a
claims file, for now): over it `excluded_outside_domain(argv)` checks
the program refuses what argparse refuses, with exit code 2, and
`is_language_defined(argv)` that every accepted command line gets a
return or exit code 0 or 1. Reading a parser warns about the defects
argparse accepts silently (`type=bool`, a default outside its choices
or that its type refuses, two options storing into one name); fix
those before claiming.
- **Trees.** Bound the shape, `L[app.Comment, depth <= 20]`; an unbounded
recursive language offers a member one past the recursion limit.
Three judgement calls the checker cannot make for you. The language is
the one the function is really fed: never narrower than the caller
enforces, and never wider to farm falsifications. A length is code points
(Python's `len`), not bytes and not the characters a reader sees. And a
crash on a hazard is the built-in claim's finding; don't narrow a value
claim's language to dodge it unless the caller truly never sends that
input. Each hazard costs a call, so batch language claims into one
`adjudicate_targets`. Tables (dataframes) are out of scope.
Expect text claims to come back `holds` (the probe tries the language's
hazards first, then shrinks), and `proven` only over a finite set of a
function mathema can show is pure, or for a function read as a pattern
validator, which the solver route decides. Such a proof rests on the
language's stated definition, compared with its `contains()` on the values
tried, and lists that as `assumed`; an outline entry such as `(assumed, 3
of 14 values skipped)` says how far the comparison went, so quote it with
the verdict (`CHANGELOG.md`, 0.6.6.2). A record claim over numeric fields,
and text fields read only through `len`, is proven from the schema's
bounds; a tree claim under a depth bound is proven by structural
induction.
The built-in claims for text are `is_language_defined(s)` (no unguarded
crash on members or on the near non-members it also tries, so a narrower
language does not excuse a crash just outside it; refuse with
`ValueError`), `excluded_outside_domain(s)` (needs a language with an
outside: `L[unicode]` has none and is `unknown`, a refinement such as
`len >= 1` or a format has one), `is_encoding_safe(s)` and
`is_length_safe(s)`. Outputs take `f(s) in L[slug]` and
`"<" not in f(s)`. For a function that refuses some inputs on purpose,
`narrow_language(L, fn)` from `mathema_language.narrowing`, assigned at
module level, is the language of what it accepts, for the next function's
claims.
#### Say what happens to missing, absent and empty input
`absent` (`None`, the object is not there) and `missing` (`nan`, `NA`,
`null`, `NaT`, a slot with no value) are different values. mathema writes
a policy claim for every parameter that admits one (`missing(f, x)
propagates`, `absent(f, x) raises(TypeError)`, `missing(f, xs, null)
drops`); `mathema claims KEY` lists them and `--write` saves them to
`claims/policies.claims.yaml`. Read them as intent, since a raise at a
missing input that no claim accounts for is falsified. The empty input is
judged strictly too: `nan` or `None` for `[]` falsifies unless a claim
states it (`f([]) in {missing}`, `raises(f([]), ValueError)`,
`f([]) == 0`).
### Stage 2: Implement, or generate
Not usually this skill's job; the function you're designing claims for
typically already exists. When it doesn't yet, the claim set from Stage 1
is exactly the contract that generation (human or agent) should work
from, the same way a test suite already informs implementation in TDD.
Nothing else to do here beyond handing that claim set over.
### Stage 3: Verify
The stage the non-negotiable rule is about, and where **evidence** actually
gets produced; nothing in Stage 1 was evidence yet. Run the claims against
the real function, immediately, before reporting anything:
Write the claims into `claims/*.claims.yaml`, keyed by dotted function
name, and adjudicate the file rather than a hand-assembled list. Against a
reference implementation that reads the declared layer, that is one command
for a whole project:
```bash
mathema verify --root .
```
or, over MCP, `adjudicate_targets` for a pass and `verify_project` for the
sweep. Adjudicating the file rather than a Python list matters for a reason
the spec cares about: the claims a human reviews in the diff are exactly the
claims that were run.
The built-in checks (the structural battery, the shape and type probes,
the rows for a value that is not there) run only for a function with a
written claim or a mathema type marker, so a function you have not
claimed yet gets no rows of its own. `MATHEMA_BUILTIN_CHECKS=on` runs them
for every function and `off` for none (`CHANGELOG.md`, 0.6.6.1).
Whatever the surface, the spec-defined part is the same: report the real
verdicts, `proven` where a symbolic derivation closed, `holds (n=...)` under
seeded probing, `falsified` with its counterexample, or `skipped` with the
reason. Report the strongest evidence honestly rather than flattening the
tiers; a summary that calls a proof a `holds` has thrown away the thing the
ladder exists to record.
### Stage 4: Diagnose
For every falsified claim, determine which of the two causes it is,
mirroring `cdd.md`'s loop exactly: either the **implementation** is
wrong, in which case the counterexample belongs in a regeneration prompt
(back to Stage 2), or the claim was wrong, a genuine discovery about the
function rather than a defect in it. A falsified claim is not a failure
to explain away; it's exactly the information this method exists to
produce.
**The two causes are not equally likely, and which one to suspect first
depends on the code you're pointed at.** A falsification tells you a claim
and an implementation disagree, and it is silent on which of them is wrong,
so the prior you bring to that question does most of the work. Read the
prior off the code rather than guessing at it:
- **Fresh, generated, or thinly tested code.** The claim is doing the job a
specification does, namely saying what the function is supposed to be, so
a disagreement is a defect until shown otherwise. This is the greenfield
case the loop was written for, and the counterexample goes straight into
a regeneration prompt.
- **Mature, released, well-tested code.** The implementation is the artifact
with years of evidence behind it and your claim is a few minutes old, so a
novel claim that falsifies is more likely to have misread the design than
to have found a bug nobody hit. Treat it as a misunderstanding until a
human says otherwise.
The signals are all readable, so look them up instead of forming an
impression: `mathema audit`'s `tested` column says whether an existing
coverage report reaches this specific function, the git history says how
long the code has been still, release tags and downstream dependents say
whether anyone would have noticed, and the presence of a property-style
test suite says whether the behaviour you're claiming was already someone
else's concern. Most codebases are mixed, and the level that matters is the
function's, not the repository's.
**Before reporting any falsification as a defect, write the claim that
would hold if the code were right, and check it.** If the code is correct,
some other statement of the same behaviour must be true, and a held claim
that cleanly explains the falsification is strong evidence that the claim,
not the code, was wrong. This costs one more round through Stage 3 and it
is the single highest-value habit in this stage.
**Report a falsification as a disagreement, never as a verdict on the
code.** "Claim X and the implementation disagree, here is the witness"
carries exactly the same information as "the code is wrong" while leaving
the diagnosis open, and it invites the correction rather than foreclosing
it. Where the diagnosis turns on design intent that is not present in the
source, namely the reasons a thing was built the way it was, route it to a
human as a question; no amount of further reading will recover intent that
was never written down, and a confident guess at it is how working code
gets "fixed".
**You propose claims and you do not close your own diagnosis.** The rule at
the top of this skill has a second half here. The checker adjudicates, and
it will be right that the claim and the code disagree, but deciding which
of them is at fault is a judgement about intent rather than about evidence,
which is why `mathema accept --as discovery` is a human step and is
deliberately absent from every agent-facing surface. An agent that closes
its own diagnosis files bugs against working code.
### Stage 5: Retain as new knowledge
A claim diagnosed as a genuine discovery gets kept, not deleted and not
quietly rewritten into something true. Report it as falsified, with its
counterexample, as part of the record. This is knowledge about the
function now, the same standing as any held claim.
mathema enforces this rather than trusting it. An adjudicated claim joins
the store's append-only membership, so deleting it from a claims file does
not remove it: membership is repopulated from the verified row. The only
exits are supersession and human acceptance. Treat that as a reason to
**author deliberately**, exploring each spelling with `check()` (which
writes nothing) and moving only the ones you mean into a claims file.
### Stage 6: Accept
Report claim coverage, not a pass/fail summary: how many claims were
proposed, how many hold, how many were falsified (with their
counterexamples, carried over from Stage 5), and how many could not be
evaluated and why. Unclaimed behavior is not neutral: it's a degree of
freedom nobody checked, and it's fine to say so explicitly.
Reporting is where your part ends. A falsified or unknown claim, or one
whose verdict moved since its earlier run (a transition), leaves a
decision owed to a person, which they record with `mathema accept`, and
**you never run that command**. Preparing those decisions well, with the
witness, the legal verbs and a pre-adjudicated correction, is the
`clear-the-gate` skill.
## What "done" looks like
A finished claim-design pass produces: the YAML claim set in the authoring
shape, and a real verdict for every claim in it, obtained by actually
running the checker in Stage 3, not by reasoning about what you expect it
to say. Anything you could not run gets an honest `skipped`, not a
confident guess dressed up as a verdict.
## Common mistakes to avoid
- **Asserting a verdict without running the checker.** This is the one
failure mode that defeats the entire point of CDD; the whole method
exists because trusting an agent's unverified claim about its own code
is exactly the problem it's solving.
- **Treating the claim families as a field to fill in rather than a
checklist for finding concepts.** There's no `family` field in the v0.2
schema; walking symmetry, order, conservation, and so on is how you
discover which concepts are worth claiming in Stage 1, not something to
invent schema for once you've found one.
- **Proposing a claim in a grammar the checker will reject**, then
reporting it as `falsified` when it was actually `skipped` for being
unparseable. Read the note field; a skip and a falsification mean
different things.
- **Reporting a falsification as a bug in the code.** The checker
establishes that a claim and an implementation disagree and says nothing
about which is wrong, so the wording that matches the evidence is "these
disagree, here is the witness". The pull toward blaming the code is
strong and worth naming: you wrote the claim so you already believe it,
the counterexample is concrete and arrives with machine authority while
"I misread the design" comes with no artifact at all, and finding a
falsification feels like the method working. On mature, well-tested code
that instinct is usually wrong. See Stage 4.
- **Deleting or rewriting a falsified claim to make it pass.** If the code
is right and the claim was wrong, the falsified claim stays in the
record as a discovery (Stage 5). If the code is wrong, fix the code and
re-run from Stage 3; don't weaken the claim until it happens to hold.
- **Padding coverage with trivial claims** (`f(x) == f(x)`) or with
single points (`f(3) == 9`) to inflate the count in Stage 6. Determinism
has its own built-in claim, `is_deterministic`; a point belongs beside a
claim over the domain, as an anchor. Neither is a substitute for a real
property (Stage 1, "Write what must be true").