AmethystLuna/logicprobe ↗★ 5

dsh-logicprobe

Design document & plan claim verification — enumerate claims, verify against codebase facts, then escalate to state-machine verification (S1-S8/A1-A12, including budget/worst-case path-cost checks) and data-model verification (DS/DA/DD) for behavioral claims. Supports before/after regression, idempotency/monotonic/sequence/leads-to/atomicity constraints, and concurrency risk mining. Ships a native DeepSeek Harness (dsh) bundle that injects the claim-verification gate into the first model step. 适合需要对代码重构、迁移计划进行自动化逻辑审计的开发者。

パッケージ
dsh-logicprobe
互換性
未検証
Harness ピア範囲
^0.1.0-rc.6
Cordis ピア範囲
^4.0.2
バージョン
0.6.5
ライセンス
MIT
最終更新
2026/09/11

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AmethystLuna/logicprobe

ドキュメント

README 全文を読む ↗

使用

插件在会话首个模型步骤自动注入能力通知。技能在任务匹配其 Use when 描述时激活:

  • 设计文档 / 计划审查 — "Review this design document" → 声称枚举与代码库核查
  • 行为类问题 — "could this state machine deadlock"、"is this retry limit safe"、"check this timing for bugs" → 主动建议(不自动加载)作为可选验证
  • 重构计划 — 管线对比前后模型,标记计划未声明的行为变化
  • 数据模型/迁移审查 — "is this migration non-breaking"、"does this copy cover all required fields" → 使用 logicprobe-datamodel 技能

技能在 Phase 0 依据计划特征自动分级(LIGHTWEIGHT / STANDARD / ESCALATED),并在计划文件追加 ## Plan Verification 摘要块作为审计痕迹。

Python 可选:已有 LogicModelV1 JSON 时可直接运行独立引擎 skills/logicprobe/references/logicprobe-engine.py(verify 跑 S1-S8/A1-A14/D1-D4,compose 跑 C1/C2 组合,export 生成 UPPAAL/TLA+/PRISM/SPIN 输入——与 dsh 工具逐字节一致,见 tests/python/run.mjs);模型仅为抽取出的状态表时,填充模板 skills/logicprobe/references/verification-harness.py;数据模型验证使用 skills/logicprobe-datamodel/references/data-model-harness.py;不可用(如离线开发机)时,对应 guide 提供手动验证模式。

示例模型见 examples/:订单状态机 before/after、电商数据模型、User 字段迁移。

配置

在 DeepSeek Harness 中,bundle 支持以下配置:

键类型默认值说明
enabledbooleantrue设为 false 可关闭首步 Gate 注入。
gateContentstring内置 gate 文本覆盖注入到首轮模型上下文中的文本。
interactionask | auto | follow-approvalfollow-approval模型确认策略;follow-approval 在会话 approval policy 为 never 时解析为 auto。

在 profile 的 cordis.patch.yml 中按 row id 覆盖:

- insert:
    - id: logicprobe
      name: 'dsh-logicprobe'
      config:
        enabled: true
        interaction: follow-approval
        gateContent: |
          ...