Formal Methods Reconciler logo

Formal Methods Reconciler

Community
mizchi
formal-methods-reconciler

Use when reconciling software specs, docs, tests, configs, code, logs, or incidents with formal methods. Helps Codex extract claims, decide whether docs or implementation are the source of truth, choose an appropriate tool such as Z3, Alloy, TLA+, P, Dafny, MoonBit prove, Lean, Rocq, Why3, Verus, CBMC, Tamarin, or ProVerif, build the smallest useful model, run or plan verifier checks, and translate SAT/UNSAT, traces, proof failures, or proof obligations into domain-language questions and regression guards.

Overview

Publishermizchi
Repositoryskills
Skill nameformal-methods-reconciler
Stars
333
Forks
4
Bundled files
10
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mizchi on GitHub. Read the source before you install it.

Installation

Install the Formal Methods Reconciler AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mizchi/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/formal-methods-reconciler .claude/skills/formal-methods-reconciler
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Formal Methods Reconciler in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Formal Methods Reconciler on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Formal Methods Reconciler is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Formal Methods Reconciler

Use this skill to turn a vague correctness concern into a small formal-methods check and a domain-readable decision record.

The core stance: the LLM proposes and repairs candidate models; the solver, model checker, verifier, or proof assistant decides; the final result is translated back into domain language for a human decision.

This is the first-modeling and reconciliation skill. If a useful formal model, CI verifier, expected result, or locked domain decision already exists and the task is to keep it aligned with later spec/code/log changes, switch to formal-methods-drift-guard.

Workflow

  1. Choose the source of truth.

    • If trusted specs/docs/ADRs/API contracts exist, treat them as the expected contract and compare code against them.
    • If specs are missing or unreliable, treat code/tests/config/logs as de-facto behavior, not as automatically correct.
    • If both disagree, do not decide alone. Produce a domain question.
  2. Extract claims before choosing a tool.

    • Separate declared intent from implicit behavior.
    • Extract claims as: allowed, forbidden, eventually happens, never happens, equivalent, reachable, unreachable, preserves invariant.
    • Note empty/missing/error/timeout/retry/crash behavior explicitly.
  3. Classify the shape of the question.

    • Pure predicate: input -> Bool.
    • Relation: user/role/resource/tenant/ownership/graph.
    • State transition: lifecycle, retry, crash, queue, eventual.
    • Message protocol: actors, typed events, request/response schedules.
    • Sequential code contract: pre/postconditions, loop invariants, representation invariants.
    • Universal theorem: unbounded inductive property or durable mathematical law.
    • Security protocol: adversarial message system, secrecy, authentication.
  4. Select the smallest appropriate tool.

    • Read references/tool-selection.md when tool choice is non-trivial.
    • Prefer the smallest model that can produce a useful counterexample.
    • Do not use Lean/Rocq for fast config bug hunting. Do not use Z3 for temporal interleavings. Do not use TLA+ for simple predicate consistency.
  5. Build the minimum model.

    • Strip I/O, frameworks, databases, and UI unless they define the property.
    • Model only observable values, state variables, actions, relations, and invariants needed for the claim.
    • Include positive sanity cases so a too-strong model is caught.
    • Include a broken variant when possible to prove the check is load-bearing.
  6. Run verifier feedback loops.

    • Use compiler/verifier/model-checker output as the repair oracle.
    • Repair syntax and modeling mistakes first.
    • Never make a property weaker just to get green unless the domain decision changed.
    • Preserve counterexamples as witnesses for domain review.
  7. Translate results to domain language.

    • Do not stop at sat, unsat, trace, or proof failure.
    • Say who can do what, which order is accepted, which config is dead, or which crash sequence loses data.
    • Use references/domain-ledger.md for output templates.
  8. Lock decisions.

    • If the counterexample is intended, update docs/specs and add a regression guard for the clarified behavior.
    • If unintended, file/fix a bug and keep the model/check in CI.
    • If unclear, produce the minimal witness and a domain-owner question.

Reporting Discipline

Keep domain uncertainty separate from execution uncertainty:

  • Domain questions are part of the deliverable: undocumented empty values, missing fail-mode definitions, product-policy choices, or spec/code disagreements that need an owner decision.
  • Self-report unclear points are only for things that prevented you from applying this skill correctly, such as missing repository access, an unavailable referenced file, ambiguous user scope, or a verifier you could not run.
  • Do not mark an intentionally preserved domain question as a self-report unclear point. Put it in the ledger/domain-question section instead.
  • If the user asked for a model/check plan and did not provide a runnable repo or verifier runtime, planning the exact check is sufficient. Label traces or SAT/UNSAT expectations as planned/hand-derived, not machine-confirmed, and do not count the absence of an actual run as an unclear point.
  • If the user explicitly asked you to run the verifier and it is unavailable, then record that as a self-report unclear point or task blocker.

LLM Role Boundary

Use the LLM for:

  • claim extraction
  • tool selection
  • first-pass formalization
  • counterexample explanation
  • repair proposals
  • domain-language wording

Do not use the LLM as:

  • the source of truth for correctness
  • the final judge of a proof
  • a replacement for solver/model-checker/prover output
  • a substitute for domain-owner decisions

Research-Informed Patterns

Read references/research-patterns.md when designing or improving an automated workflow. Prefer:

  • structured planning before formal code generation
  • verifier-guided repair loops
  • retrieval over repo context for repository-level work
  • test/log/trace oracles for generated annotations
  • subgoal decomposition for theorem proving
  • explicit epistemic status for every claim

Output Contract

Always aim to leave one of these artifacts:

  • a formal check in the repo and a passing/failing command
  • a counterexample witness translated into domain terms
  • a regression guard candidate
  • a concise ledger entry: source, implementation observation, model question, machine result, domain question, decision, lock

If no formal model is worth building, say why and propose the cheaper check.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Formal Methods Reconciler AI skill do?

Use when reconciling software specs, docs, tests, configs, code, logs, or incidents with formal methods. Helps Codex extract claims, decide whether docs or implementation are the source of truth, choose an appropriate tool such as Z3, Alloy, TLA+, P, Dafny, MoonBit prove, Lean, Rocq, Why3, Verus, CBMC, Tamarin, or ProVerif, build the smallest useful model, run or plan verifier checks, and translate SAT/UNSAT, traces, proof failures, or proof obligations into domain-language questions and regression guards.

Why use Formal Methods Reconciler on TypingMind?

Because you install it once and use it with any model. Formal Methods Reconciler is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Formal Methods Reconciler in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mizchi/skills/tree/main/formal-methods-reconciler. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Formal Methods Reconciler?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Formal Methods Reconciler?

As many as you like. As long as a model supports skills, you can use Formal Methods Reconciler with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Formal Methods Reconciler AI skill free?

It is published on GitHub by mizchi. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇