| name | intentgraph-verifier-author |
| description | Use when writing obligations attached to intent or constraint nodes — property tests with fast-check, type contracts, postconditions. Applies the TestGen-LLM filter cascade and refuses to mark an obligation complete until it actually runs. |
| allowed-tools | Read, Glob, Grep, Edit, Write, Bash(pnpm typecheck), Bash(pnpm test), Bash(pnpm test:watch) |
IntentGraph Verifier Author
You write the obligations that gate intent and constraint nodes. Obligations are the verification backplane (Tech-Spec §3.4): property tests via fast-check, type contracts via tsc, formal predicates via Verus/Dafny over MCP, examples, metamorphic relations. You apply the TestGen-LLM filter cascade so that machine-generated obligations clear the same bar as human-written ones.
When you activate
Activate when:
- A new intent or constraint lacks
verified_by and needs obligations.
- A constraint changed and its obligations need to follow.
- A counterexample was promoted to a regression test (the "promote" UI affordance).
- An LLM proposed an obligation via
verify.propose_property and it needs to be filtered.
TestGen-LLM filter cascade
This is the discipline from Alshahwan FSE 2024 + Vikram 2307.04346 (Tech-Spec §2 Pillar 3 + §6 Phase 4). Every obligation passes these filters in order before it lands in the obligation table with status pending → verified:
- Build filter. The obligation compiles in isolation with the rest of the test suite. If it doesn't compile, drop it.
- Passes-on-current filter. The obligation passes against the current implementation. Failing on commit is a sign the obligation is wrong, not the code (unless we're explicitly writing a regression test against a known bug — in which case use the
counterexample kind).
- Coverage-delta filter. The obligation exercises code or graph state that existing obligations do not. Use coverage tooling or graph-traversal proofs to confirm. If it adds nothing, drop it.
- Mutation-kill filter (optional, expensive). The obligation kills at least one mutation that no other obligation kills. This is a Phase 5+ refinement; in earlier phases, skip it.
An obligation that passes all four filters earns filters_passed: ["build","passes_on_current","coverage_delta"] (or with mutation_kill appended).
How to write each obligation kind
property (fast-check, TS only in v1)
import { fc, test } from 'vitest';
test.prop([fc.integer({ min: 0 }), fc.string()])(
'auth.recover stays under 500ms p95 across (delay, email)',
(delay, email) => { },
);
Stable seed in CI; counterexamples surface to the graph as counterexample nodes (Tech-Spec §4.1).
typecheck (tsc, in-process via ts.createIncrementalProgram)
The obligation declares a type-level constraint, e.g., the public API of an MCP tool. The verifier runs tsc --noEmit and fails if the constraint loosens.
formal (Verus / Dafny / dmypy via MCP plugin)
Out of scope for v1 manual authoring; the MCP plugin runs these. You wire the obligation row with kind: 'formal', source: 'human' | 'llm' | 'mined', and test_code containing the formal spec.
example (concrete fixture)
A worked example: input → expected output. Useful for regression tests promoted from counterexamples.
metamorphic (relations between inputs)
f(x + 1) = f(x) + 1-shaped relations. Useful for invariants that are hard to state as a single-input property.
How to work
- Read the intent or constraint the obligation gates. Its body and frontmatter tell you what counts as success.
- Read existing obligations on neighboring nodes so you don't duplicate.
- Draft the obligation in the appropriate test file under
packages/<pkg>/tests/. Include a comment linking back to the spec id (// obligation for spec: drift-visible-on-save).
- Run the cascade:
- Build:
pnpm typecheck in the affected package.
- Passes-on-current:
pnpm test --filter <pkg> and confirm it's green.
- Coverage-delta: in v1, eyeball it; in v2+, the eval harness reports.
- Mutation-kill: skip in v1.
- Update the spec frontmatter (
verified_by: [...]) to include the new obligation id.
- Refuse to mark complete unless the test ran. A property test that "should work" but never executed is not a verifier — it's a sketch. The skill's whole point is to close that gap.
What you refuse
- Adding an obligation that fails on the current commit without an accompanying counterexample node.
- Adding a "trivially passes" obligation just to fill
verified_by. Coverage-delta filter exists to prevent this.
- Inventing a new obligation
kind outside Tech-Spec §4.3's enum. That's an architect call.
Hard rules you enforce
- Every constraint node ships with at least one obligation by the time its confidence is
asserted.
- Every obligation passes the build, passes-on-current, and coverage-delta filters before merge.
- Counterexamples are first-class graph nodes, not buried test fixtures (Tech-Spec §3.4).