DeepSeek Harness 插件

logicprobe

Design document & plan claim verification — enumerate claims, verify against codebase facts, then escalate to logic-primitive verification (7 structural checks + 7 adversarial probes) for behavioral(英文原文)

跳到安装方式

来源信息

GitHub 仓库
AmethystLuna/logicprobe
最近更新
2026年8月21日
分类
工具与能力
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/AmethystLuna/logicprobe
插件名:logicprobe
作者:AmethystLuna

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

逻辑探针 (Logic Probe)

<p align="center"><a href="README.en-US.md">English</a> · <strong>中文</strong></p>

文档不是事实——代码才是。一个声称核查技能:逐条核验设计文档、架构规格、重构计划中每一个可验证的声称与代码库实际是否一致;遇到行为类声称时升级为可执行模型验证。

跨平台 — 支持 Claude Code、Codex CLI、Cursor、Kimi CLI、OpenCode、ZCode。基于 Agent Skills 开放标准构建。

功能

阶段内容
Phase 1-2枚举每个可验证声称(API 名、文件路径、枚举值、数量、机制可行性)→ 逐条对照代码库给出证据
Phase 2a对提取的状态机模型执行 7 项结构检查:可达性、死锁、活性、确定性、事件/守卫完备性、不变量有效性
Phase 2b7 种对抗探针:意外事件、竞态交错、顺序置换、配对对称(lock/unlock)、边界轰炸、资源注入、最小反例
重构模式前后模型对比——行为保持、不变量连续性、死锁回归、复杂度声称
输出结构化发现:精确 file:line 证据、严重性分级、修正方向——绝不在核查中直接改代码

模型永远先以转换表形式展示并经用户确认后才运行——模型提取错误是验证的头号失败模式。

安装

Marketplace 安装(推荐)

~/.claude/settings.json 中添加 marketplace:

{
  "extraKnownMarketplaces": {
    "logicprobe": {
      "source": { "source": "github", "repo": "AmethystLuna/logicprobe" }
    }
  }
}

然后通过 CLI 安装:

claude plugin install logicprobe@logicprobe

手动安装

git clone https://github.com/AmethystLuna/logicprobe.git ~/.claude/plugins/dev/logicprobe

然后在 ~/.claude/settings.json 中启用:

{
  "enabledPlugins": {
    "logicprobe@dev": true
  }
}

DeepSeek Harness (dsh)

原生 dsh 支持以 cordis 插件 bundle 的形式提供,位于仓库根(根 package.json 声明了 dsh.bundle):

  • 技能遵循 Agent Skills 开放标准,被 dsh 的 skill-filesystem provider 原样发现——零代码。
  • bundle 将 claim 验证门禁(1% Rule / Red Flags / 主动建议)注入每个 agent 会话的第一个模型步骤——是 Claude SessionStart hook 在 dsh 的原生对应物,并注册模型可见目录条目(cordis_inspect)、原生工具 logicprobe_verifyctx.tools)以及策略感知上下文 logicprobe:modectx.systemPrompt)。
  • 与 embedded-workbench bundle 的 Plan Verification Gate 配合,在 dsh 中闭环了 claim 验证链路。

安装:参见 [.dsh/INSTALL.md](.dsh/INSTALL.md)(四种方式,从纯技能拷贝到 dsh plugin add)。

> DSH 安装注意:包名已使用 scoped 形式 @amethystluna/logicprobe。在 web profile 的 package.json 中,依赖键与 dsh.profile.bundles 必须写 @amethystluna/logicprobe;否则 dsh 加载器会因找不到 node_modules/@amethystluna/logicprobe 而启动失败。

使用

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

  • 设计文档 / 计划审查 — "Review this design document" → 声称枚举与代码库核查
  • 行为类问题 — "could this state machine deadlock"、"is this retry limit safe"、"check this timing for bugs" → 主动建议(不自动加载)作为可选验证
  • 重构计划 — 管线对比前后模型,标记计划未声明的行为变化

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

Python 可选:可用时使用 references/verification-harness.py 自动执行检查;不可用(如离线开发机)时,references/logic-verification-guide.md 提供手动验证模式。

Codex CLI

本插件同样支持 OpenAI Codex CLI。技能遵循 Agent Skills 标准,两个平台行为一致。

Codex 安装

# 添加 marketplace
codex plugin marketplace add AmethystLuna/logicprobe

# 安装
codex plugin install logicprobe

或手动:

git clone https://github.com/AmethystLuna/logicprobe.git ~/.codex/plugins/logicprobe

技能通过 $logicprobe 调用,或由 Codex 根据任务上下文自动选择。

Cursor

Cursor 2.5+ 内置插件支持。

Cursor 安装

# 克隆到 Cursor 插件目录
git clone https://github.com/AmethystLuna/logicprobe.git ~/.cursor/plugins/logicprobe

或通过 Cursor 插件市场 UI 安装:/add-plugin AmethystLuna/logicprobe

Kimi CLI

Kimi CLI 自动从 .claude/skills/ 路径发现技能。.kimi-plugin/plugin.json 清单向 Kimi 插件管理器注册本插件。

Kimi 安装

# 通过 Kimi 插件管理器
/plugins install https://github.com/AmethystLuna/logicprobe.git

# 或手动克隆
git clone https://github.com/AmethystLuna/logicprobe.git ~/.kimi/plugins/logicprobe

技能通过 /skill:logicprobe 调用。

OpenCode

技能自动从 .claude/skills/.codex/skills/ 路径发现。在 opencode.json 中添加:

{
  "plugin": ["logicprobe@git+https://github.com/AmethystLuna/logicprobe.git"]
}

或通过 skop 安装(消费 Claude marketplace 清单)。详见 .opencode/INSTALL.md

ZCode (Z.AI)

ZCode 3.0+ 遵循 Agent Skills 标准。无插件市场——手动复制技能到 .zcode/skills/

git clone https://github.com/AmethystLuna/logicprobe.git
cp -r logicprobe/skills/* .zcode/skills/

技能通过 $logicprobe 调用。详见 .zcode/INSTALL.md

环境要求

  • Claude Code v2.1+ / Codex CLI 最新 / Cursor 2.5+ / Kimi CLI 最新 / OpenCode 最新 / ZCode 3.0+
  • DeepSeek Harness (dsh): dev preview — 已实测 mainline 2026-08-14(gate bundle 加载并注入会话成功)
  • Python 3.6+ 可选(仅自动验证工具需要;手动兜底模式无需任何依赖)

配置

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

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

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

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

卸载

  • 如果通过 DSH 插件管理器安装,请使用同一管理器从目标 profile 中移除 logicprobe
  • 如果手动复制过 skills/*,请删除复制到 ~/.agents/skills/ 或项目 .dsh/skills/ 下的对应目录。
  • 如果通过 cordis.patch.yml 添加,请删除 profile patch 中 id: logicprobe 对应的行,并重启 DSH。

权限与数据

  • 插件运行时只读取包内自带的 skills/ 目录,用于通过 DSH 标准 filesystem skill provider 注册技能。
  • 它会在会话首轮向模型上下文注入配置好的 gate 文本。
  • 它不读取凭据、不发起网络连接,也不会访问 DSH 会话上下文之外的用户数据。
  • 实际使用技能时,模型会像使用其他编码技能一样,按用户指示读取项目文件。

故障排查

  • 技能在 DSH 中不可见:确认 DSH 版本支持 ctx.skills / Agent Skills 发现,并在安装后重启 profile。
  • Gate 未注入:检查 enabled 是否为 false,以及 profile patch 中是否存在 id: logicprobe 的行。
  • 插件管理器拒绝安装:确认 @deepseek-ai/* 包声明在 peerDependencies 中,而不是 dependencies
  • 手动复制后 DSH 仍看不到技能:改用原生 bundle 安装(dsh plugin add "github:AmethystLuna/logicprobe")。

开发

npm install
npm run typecheck
npm run build

触发测试位于 tests/skill-triggering/

bash tests/skill-triggering/run-all.sh

许可证与安全

本项目使用 MIT 许可证,见 [LICENSE](LICENSE)。

如发现安全漏洞,请不要公开创建 issue,应使用 GitHub Security Advisory 或 [SECURITY.md](SECURITY.md) 中的联系方式私下报告。

关联插件

插件说明
embedded-workbench嵌入式 C/C++ 工具箱,其 Plan Verification Gate 依赖本技能。本插件已从 embedded-workbench 拆分而来。

致谢

声称核查方法论(逻辑原语、对抗探测、重构前后对比)与触发测试框架(tests/skill-triggering/)遵循 Superpowers(Jesse Vincent,MIT License)的约定,经 embedded-workbench 插件改编而来。