Formal Methods Reconcilerのロゴ

Formal Methods Reconciler

コミュニティ
mizchi
formal-methods-reconciler

ソフトウェアの仕様、ドキュメント、テスト、設定、コード、ログ、インシデントを形式手法と照合するときに使います。Codexが主張を抽出し、ドキュメントと実装のどちらを正とするか判断し、Z3、Alloy、TLA+、P、Dafny、MoonBit prove、Lean、Rocq、Why3、Verus、CBMC、Tamarin、ProVerifなどの適切なツールを選ぶのに役立ちます。また、実用上最小限のモデルを構築し、検証チェックを実行または計画して、SAT/UNSAT、トレース、証明の失敗、証明義務をドメイン用語の質問や回帰防止策に置き換えます。

Add to TypingMind

概要

公開者mizchi
リポジトリskills
スキル名formal-methods-reconciler
スター
333
フォーク
4
同梱ファイル
10
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 10個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    mizchiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Formal Methods Reconciler」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/mizchi/skills/tree/main/formal-methods-reconciler
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでFormal Methods Reconcilerを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にFormal Methods Reconcilerを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Formal Methods Reconcilerは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Formal Methods Reconciler」では何ができますか?

ソフトウェアの仕様、ドキュメント、テスト、設定、コード、ログ、インシデントを形式手法と照合するときに使います。Codexが主張を抽出し、ドキュメントと実装のどちらを正とするか判断し、Z3、Alloy、TLA+、P、Dafny、MoonBit prove、Lean、Rocq、Why3、Verus、CBMC、Tamarin、ProVerifなどの適切なツールを選ぶのに役立ちます。また、実用上最小限のモデルを構築し、検証チェックを実行または計画して、SAT/UNSAT、トレース、証明の失敗、証明義務をドメイン用語の質問や回帰防止策に置き換えます。

TypingMindでFormal Methods Reconcilerを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Formal Methods Reconcilerはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにFormal Methods Reconcilerをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/mizchi/skills/tree/main/formal-methods-reconcilerを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Formal Methods Reconcilerを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Formal Methods Reconcilerで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもFormal Methods Reconcilerを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Formal Methods Reconciler」は無料ですか?

mizchiがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇