AmethystLuna/logicprobe
用于AI编程助手的声明核查插件——针对设计文档与重构计划执行7项结构性+7项对抗性逻辑原语探针 | 适用于Claude Code、Codex、Cursor、Kimi、OpenCode、ZCode及DeepSeek Harness(dsh)的AI编程助手声明核查插件
Project Overview项目介绍
Logic Probe is an open-source claim verification skill built on the cross-platform Agent Skills standard. Its core function is to check every verifiable claim in design documents, architecture specs, and refactoring plans against the actual codebase, and run structured model validation for behavioral claims when needed. It supports a wide range of popular AI coding agents including Claude Code, Codex CLI, Cursor, Kimi CLI, OpenCode, and ZCode, and it also provides a native Cordis bundle for DeepSeek Harness (DSH) users. To install the native DSH bundle, users can run dsh plugin --profile web add dsh-logicprobe from the command line, or install directly from this GitHub repository.
Logic Probe is designed for AI coding agent users and developers who need to verify the consistency between design documents and actual implementation. It automatically injects the verification capability at the first model step of a new session, then automatically grades the verification intensity based on the characteristics of the current task. After verification completes, it outputs a structured report with exact file and line number evidence, severity ratings, and suggested correction directions, and adds a verification summary block to the plan file as an audit trail. For refactoring plans, it also compares models before and after refactoring to flag unstated behavioral changes.
This project is released under the permissive MIT open source license. Most core features work without any extra dependencies, and only the automatic verification tools require Python 3.6 or higher, with a manual fallback mode available for environments without Python. For DSH users, after installation you need to restart your web profile for changes to take effect, and you can configure the plugin via the cordis.patch.yml file to adjust settings like whether to inject the gate at session start. The plugin only reads its own skill directory and does not access user private data or make unauthorized outbound network requests.
Logic Probe(逻辑探针)是一个基于Agent Skills开放标准开发的AI代理声称核查工具,核心能力是逐条核验设计文档、架构规格、重构计划中的可验证声明,和代码库实际情况对比验证一致性,遇到行为类声明时还会升级为可执行模型验证。它同时支持Claude Code、Codex CLI、Cursor、Kimi CLI、OpenCode、ZCode等多个主流AI编码代理平台,也为DeepSeek Harness(DSH)提供了原生Cordis插件包形式的集成支持。
面向AI编码代理开发者和研发文档审核场景,Logic Probe会在会话的首个模型步骤自动注入核查能力,根据任务特征自动分级验证强度,完成验证后输出包含精确文件行号证据、严重性分级和修正方向的结构化报告,还会在计划文件追加验证摘要作为审计痕迹。针对重构计划,它还能对比前后模型变化,标记出计划未声明的行为变更,帮助开发者提前发现设计和实现的偏差。
该项目采用MIT许可证开源,不需要额外依赖即可使用大部分功能,仅自动验证工具需要Python 3.6+环境,即便没有Python环境也支持手动兜底验证模式。在DSH中安装可通过npm包dsh-logicprobe,也可直接从GitHub源码安装,安装完成后需要重启对应profile才能生效。插件运行时仅读取自身技能目录,不会访问用户额外隐私数据或发起未经授权的外部网络连接。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:logicprobe(AmethystLuna/logicprobe)
仓库:https://github.com/AmethystLuna/logicprobe
本站详情页:https://www.yhbd.top/plugins/amethystluna-logicprobe/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 5 · 最近提交 2026-10-02 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-logicprobe
把 AmethystLuna/logicprobe 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
逻辑探针 (Logic Probe)
English · 中文
文档不是事实——代码才是。一个声称核查技能:逐条核验设计文档、架构规格、重构计划中每一个可验证的声称与代码库实际是否一致;遇到行为类声称时升级为可执行模型验证。
跨平台 — 支持 Claude Code、Codex CLI、Cursor、Kimi CLI、OpenCode、ZCode。基于 Agent Skills 开放标准构建。
功能
| 阶段 | 内容 |
|---|---|
| Phase 1-2 | 枚举每个可验证声称(API 名、文件路径、枚举值、数量、机制可行性)→ 逐条对照代码库给出证据 |
| Phase 2a | 对提取的状态机模型执行 8 项结构检查(S1-S8):S1 可达性、S2 死锁、S3 活性、S4 确定性、S5 事件完备性、S6 守卫完备性、S7 不变量有效性、S8 单调变量 |
| Phase 2b | 14 项对抗探针(A1-A14):意外事件、竞态交错、顺序置换、配对对称(lock/unlock,含 onEntry/onExit 隐式配对)、边界轰炸、资源注入、最小反例、幂等重放、必达、顺序、原子性、预算(A12 最坏路径代价,含正成本环检测)、概率可达(A13,P(击中) 满足下界)、期限(A14,maxTicks + tickEvents) |
| 重构模式 | 前后模型对比——行为保持、不变量连续性、死锁回归、复杂度声称 |
| 数据模型模式 | DataModelV1 数据模型验证——DS/DA/DD 检查,迁移覆盖、copy 一致性、before/after 破坏性变更回归 |
| 并发风险挖掘 | 扫描文档/计划中的并发安全声称(thread-safe、lock-free、race condition、中断安全等),标记需要专用验证 |
| 输出 | 结构化发现:精确 file:line 证据、严重性分级、修正方向——绝不在核查中直接改代码;报告含 coverageNotes(时序/抢占/混合/概率词汇 → UPPAAL/TSan/CBMC/TLA+/SpaceEx/PRISM 等外部工具路由,见 skills/logicprobe/references/gap-routing-guide.md),模型可携带自然语言 narrative(状态/事件/场景注释)并被报告原样回显 |
模型永远先以转换表形式展示并经用户确认后才运行——模型提取错误是验证的头号失败模式。
安装
Claude Code 安装(推荐)
在 Claude Code 的 ~/.claude/settings.json 中添加 marketplace:
{
"extraKnownMarketplaces": {
"logicprobe": {
"source": { "source": "github", "repo": "AmethystLuna/logicprobe" }
}
}
}
然后通过 CLI 安装:
claude plugin install logicprobe@logicprobe
Claude Code 手动安装
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-filesystemprovider 原样发现——零代码。 - bundle 将 claim 验证门禁(1% Rule / Red Flags / 主动建议)注入每个 agent 会话的第一个模型步骤——是 Claude
SessionStarthook 在 dsh 的原生对应物,并注册模型可见目录条目(cordis_inspect)、原生工具logicprobe_verify(ctx.tools)以及策略感知上下文logicprobe:mode(ctx.systemPrompt)。 logicprobe_verify支持beforeModel+stateMapping的 BEFORE/AFTER 对比(D1-D4),可直接验证重构/迁移的行为保持、不变量连续性、回归增量和死锁/活性回归。logicprobe_verify还支持:迁移/处理器代价cost(缺省 1)与budget不变量(A12 最坏路径代价检查,含正成本环检测)、迁移权重weight与probability不变量(A13 概率可达)。- 状态
onEntry/onExit动作(A4 自动纳入配对检查);maxTicks+tickEvents期限(A14);报告coverageNotes(时序/抢占/混合/概率词汇 → UPPAAL/TSan/CBMC/TLA+/SpaceEx/PRISM 等外部工具路由)。 - 引擎共运行 22 项检查(S1-S8 结构 + A1-A14 对抗);模型可带自然语言
narrative(状态/事件/场景注释),报告原样回显。 logicprobe_compose_verify:两台及以上状态机组合验证(握手 rendezvous 语义),报 C1 组合死锁 / C2 握手永不触发。logicprobe_export:把 LogicModelV1 导出为外部工具原生输入——UPPAAL(XML.xta+ queries)、TLA+(TLC 模块)、PRISM(DTMC.pm+.pctl)、SPIN(Promela + ltl)——与coverageNotes/gap-routing 的维度对应;导出严格遵循各工具官方语法,生成文件可直接提交给对应检查器(SPIN 已做真实端到端验证)。logicprobe_datamodel_verify新增数据模型验证:DataModelV1、迁移覆盖、copy 一致性、DD1-DD4 before/after 数据回归。logicprobe_concurrency_scan扫描文档/计划中的并发风险声称(thread-safe、lock-free、race condition、mutex 等),标记需要专用并发验证。- 与 embedded-workbench bundle 的 Plan Verification Gate 配合,在 dsh 中闭环了 claim 验证链路。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
liuqingman/dsh-hawkeye-scan
kenryu42/cc-safety-net
hyhmrright/brooks-lint
toby-bridges/api-relay-audit
zhu1090093659/dsh-trading
lire1131/dsh-undo-savepoint
jigjoy-ai/baro