SkillsGrove
SkillsGrove/ドキュメント作成/sxd007/investigation-ontology/evidence-management

evidence-management

インストール

$npx skills add https://github.com/sxd007/investigation-ontology --skill evidence-management
$git clone --depth 1 https://github.com/sxd007/investigation-ontology.git /tmp/investigation-ontology && mkdir -p ~/.claude/skills && cp -r /tmp/investigation-ontology/plugins/investigation-ontology/skills/evidence-management ~/.claude/skills/evidence-management
この Agent Skill をインストールしてください:https://github.com/sxd007/investigation-ontology/tree/605fcb0ea0fd7ef29d048e5357305061c354bcc0/plugins/investigation-ontology/skills/evidence-management — まず SKILL.md とスクリプトを読み、安全であることを確認してから、私のスキルフォルダにインストールしてください。

概要

原文の説明 · Apache-2.0证据链管理 — 证据识别与收集、链式保管(Custody Chain)、证据可采性评估、证据链可视化(推理链图/假设验证/治理状态)、电子证据保全。兼覆底稿编制规范与复核标准。
以下の SKILL.md は sxd007/investigation-ontology(コミット 605fcb0)から Apache-2.0 ライセンスに基づいて転載しています。本文は変更しておらず、ファイル先頭のメタデータのみ省略し、画像はリンクとして表示し、非常に長いファイルは途中までの表示としています。Copyright owner or entity authorized by。ライセンス:LICENSE。表示しているのは指示ファイルのみです。スクリプト等は元のリポジトリをご覧ください。

证据链与调查底稿管理

调查工作的"产品线" — 从原始证据到可呈堂的调查底稿。

配置前置检查

在执行本技能的业务操作前,按以下流程检查用户配置:

检查 {配置路径}/team-profile.md
├── 不存在 / 含 [PLACEHOLDER] / 含 PAUSED 标记
│   └── 自动进入 /efio:cold-start 配置向导,完成后继续当前操作
└── 配置就绪 → 继续

检查 {配置路径}/evidence-policy.md
├── 不存在或含标记 → 使用内置默认值(不阻塞)
└── 就绪 → 读取密级体系、保管链要求等配置

详细规则参见 config-templates/config-loader.md。

此技能读取的配置项:

  • team-profile:调查团队、证据存储路径(待后续实现)
  • evidence-policy:密级体系、保管链要求、底稿质量标准

When to Activate

  • 收集和保全任何类型的证据
  • 建立或维护证据链式保管记录
  • 评估证据的可采性和证明力
  • 编制调查工作底稿
  • 复核他人的调查底稿
  • 准备证据移交或归档
  • 查看/生成证据链可视化(推理链图、假设验证图、治理状态图、问题清单图)
  • 运行证据链完整性检查或推理链逻辑检查
  • 证据来源是原始文档(PDF/扫描件/图片)时 → 先调用 document-parsing 技能解析为结构化 parsed JSON,再用 parsed 结果创建 EV 节点(/efio:parse <file> 或 use_skill "document-parsing")

证据管理全生命周期

识别 → 收集 → 保全 → 记录 → 分析 → 保管 → 呈现 → 归档/移交

核心工作流

本技能包含六个核心模块。每个模块的详细规范在对应 reference 文件中,按需加载。

1. 证据收集与链式保管

证据按形式(书证/电子证据/物证/证言/视听/专家)和证明力(直接/间接/佐证)分类。链式保管(Chain of Custody)是证据管理最关键环节——每件证据需有完整的提取人、时间、方式、哈希值和移交记录。

保管五原则:最少经手人、每次交接必签名、封存完好、电子证据加哈希、环境可控。

📖 详细规范:references/evidence-collection-and-custody.md

2. 证据可采性评估

通过四级过滤(相关性 → 合法性 → 可靠性 → 最优性)判断证据可采性。充分性判断使用 SPIRIT 框架(Sufficient / Pertinent / Independent / Reliable / Integrity / Timeliness)。

📖 详细规范:references/admissibility-assessment.md

3. 调查底稿管理

底稿分五类(管理类/证据类/分析类/程序类/结论类),编制遵循 ALCOA 原则(Attributable / Legible / Contemporaneous / Original / Accurate),复核使用标准清单。

📖 详细规范:references/working-paper-standards.md

4. 证据注册表 (evidence_registry.json)

案件证据的结构化核心登记文件,包含 metadata、chain_nodes(节点索引)、entities、evidence_items、findings、hypotheses、event_timeline 七个顶层结构。不包含关系图——关系由 nodes/ 中各节点文件的 frontmatter 声明。

创建时机:INIT 阶段创建基础结构 → FIELDWORK 大量追加 → REVIEWING 冻结。

📖 完整字段规范:references/evidence-registry-spec.md

5. 推理节点 (nodes/ 目录)

nodes/ 目录承载推理分析层,7 种节点类型(EV/LS/ARG/FND/ENT/HYP/EVT)扁平存放,通过 frontmatter 的 relations 字段声明 8 种关系(derived_from / supports / contradicts / involves / corroborated_by / addresses / supported_by / contradicted_by)。

关键规则:类型在 frontmatter(不分子目录)、关系在节点内(不造边文件)、JSON 只做索引、ID 不可变。节点状态机:draft → ready(仅人工)→ superseded。

title 是断言(谁+动作+事实),body 是支持该断言的完整材料,excerpt 是流向下一级的事实。

📖 完整规范(含 title 断言公式、body 写作规范、excerpt 规则):references/node-graph-spec.md

6. 证据链可视化

v3 多视图调查工具,四个互补 tab:Reasoning(推理链 + 边语义分色 + 治理徽章)、Hypotheses(HYP 支持/反驳验证)、Governance(本体对象生命周期状态)、Issues(推理链 + 治理问题清单)。

两种可视化模式:

模式 命令 适用场景 输出
对话内 Mermaid 预览 scan-chain.js <case_dir> --graph 快速预览推理链结构 Mermaid 代码块
交互式 HTML scan-chain.js <case_dir> --html [output.html] 完整交互图、汇报展示 独立 HTML 文件

生成可视化 HTML 的操作步骤(当用户要求查看证据链可视化时执行):

  1. 确认案件目录路径(通常为 cases/CASE-YYYY-NNN/)
  2. 读取 evidence_registry.json 和 nodes/ 目录确认数据就绪
  3. 执行 node skills/evidence-management/scripts/scan-chain.js <case_dir> --html <output_path>.html
    • 如环境中无 Node.js,由 AI 读取节点数据后按 --json-dump 格式直接注入 HTML 模板
  4. 用浏览器打开生成的 HTML 文件

📖 可视化架构 + scan-chain.js 完整选项参考:references/visualization-guide.md

工具速查

命令 用途
scan-chain.js <case_dir> --list 列出所有节点和关系
scan-chain.js <case_dir> --trace FND-001 追溯 FND-001 完整证据链
scan-chain.js <case_dir> --integrity 完整性检查(含 v3 治理 readiness)
scan-chain.js <case_dir> --check-chains 推理链逻辑检查(含 v3 HYP coverage)
scan-chain.js <case_dir> --validate Registry Schema + 节点 frontmatter/关系字段验证(含 ontology_ref 检查)
scan-chain.js <case_dir> --sync 同步 chain_nodes 索引回 registry
scan-chain.js <case_dir> --graph Mermaid 图预览
scan-chain.js <case_dir> --html output.html 交互式 HTML
scan-chain.js <case_dir> --json-dump data.json JSON 数据输出(AI fallback 用)

完整选项说明见 references/visualization-guide.md

写后自动校验

插件的 PostToolUse Hook 会在官方文件工具 Write|Edit|MultiEdit(并兼容部分集成的 write_to_file|replace_in_file|multi_replace_string_in_file)写入 evidence_registry.json 或 nodes/*.md|json 后自动运行 scan-chain.js --validate:

  • evidence_registry.json 按 schemas/evidence-registry.schema.json 校验,非法数组元素(如字符串形式的 findings[])、缺失 ID、非法枚举和 ID 格式会立即报错。
  • 节点文件校验必填 frontmatter、允许字段名、关系类型,以及关系对象的 id / excerpt / form 字段;常见拼写错误会给出候选字段。
  • Hook 只反馈并要求修复,不自动改写案件数据。终端脚本或外部程序写入不一定触发 Hook,因此阶段门禁和正式输出前仍须显式运行 --validate。

分析辅助工具

以下工具类型可辅助加速证据管理操作。这些工具不是必须的——未配置时,由模型按证据管理标准直接完成。

如环境中配置了以下类型的 MCP 服务器,可辅助加速。不可用时由以下替代方式完成:

  • 文件系统操作类 MCP:用于读取/搜索证据文件、整理目录结构。不可用时手动指定文件路径
  • 文档分析类 MCP:用于提取 PDF 文本、搜索文档关键词、对比文件版本。不可用时直接阅读文件
  • 数据库查询类 MCP:用于查询证据登记表、检索底稿索引。不可用时查阅登记表或 CSV

工作流示意(流程固定,工具可选):

  1. 收集案件证据文件列表(由文件系统类 MCP 辅助或手动指定路径)
  2. 提取关键文档摘要(由文档分析类 MCP 辅助或直接阅读文件)
  3. 查验证据登记信息(由数据库类 MCP 辅助或查阅登记表)
  4. 整合数据 → 生成证据清单底稿

Related

References

  • ACFE "Fraud Examiners Manual" — Evidence Chapter
  • SWGDE "Best Practices for Digital Evidence"
  • ISO 27037:2012 — Guidelines for identification, collection, acquisition and preservation of digital evidence
ライセンス全文を見る(Apache-2.0)
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by
      reason of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2026 Alpha Shen

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.