Skip to content

idd-verify: composable verification profiles for non-code deliverables (prose / academic / no-git-repo) #258

Description

@kiki830621

Problem

idd-verify 的預設引擎在技術上被寫死成 code review:4 個 ensemble lens(requirements / logic / security / regression)與輸入來源(git diff / --pr / --commits / --branch)都假設 (a) deliverable 是 code、(b) 工作樹是 git repo。

當 deliverable 是非 code(學術 / 臨床 prose:case-report 摘要、信件、報告、資料分析敘述)或專案不是 git repo(例如 Dropbox 同步的 workspace)時,操作者只能臨場手動重映射 lens:

  • Logic → 事實正確性 vs 來源(有沒有杜撰)
  • Security → PII / 個資洩漏
  • Requirements → 範本 / 格式合規
  • Regression → 引用 / 佐證是否真的支持論點

並且繞過整套 git-diff 機制(改用 file / document 當輸入)。這種 ad-hoc 改寫的問題:

  1. 失去可複現的結構 — 每次跑都即興出不同的軸,不可稽核
  2. 無法乾淨呼叫 — 沒有 --profile,不可發現、不在 skill 契約內
  3. 可能靜默丟掉「獨立交叉驗證 + 不自己給自己打勾」的保證 — 全靠操作者當下自律

Observation:backend 其實已支援 composability

pai-ensemble 的 Workflow backend 已經接受 profile: 'custom' + customLenses: [{key, focus}, …] + daFocus + contextBlock + diffFile。也就是說 composability primitive 已存在於 engine 層,只是沒有在 skill 層暴露。idd-verify skill 把那 4 個 code lens 與 git-diff 輸入源寫死了。

Proposal

把 composable verification profiles 提升到 idd-verify skill 層:

  1. --profile <name> flag(code〔預設〕/ prose / academic / data …)—— 同時切換 (a) lens 組合 與 (b) 輸入源 adapter。
    • code = 今日行為(預設完全不變)
    • prose / academic = factual-accuracy-vs-source、format/requirement 合規、citation 佐證、PII/PHI leak、devil's-advocate / reviewer-defense;輸入源 = file / document path(非 git diff),git-repo optional
  2. 輸入源抽象:--file <path> / --dir <path>(與既有 --pr / --commits / --branch 平行),讓無 git repo 也能驗
  3. (選配)repo-local 自訂 profile:重用 .claude/.idd/local.json 機制,讓某專案一次註冊自己的軸

保留 code 為預設 → 既有行為 100% backward compatible。

Type

feature

Expected

  • idd-verify --profile prose --file <path> 能用 prose 適用的 lens 對一份文件跑 ensemble,不需要 git repo
  • 自訂 profile 可在 repo config 定義
  • code 預設不變

Actual

  • lens + 輸入源對 code + git 寫死;非 code deliverable 只能手動、不可複現地臨場改寫

Impact

  • 讓 IDD 能覆蓋它實際已被應用的 deliverable 全譜(學術寫作、信件、報告),不只 code
  • 把即興 workaround 升格為 first-class、可稽核的路徑
  • 呼應「IDD 應該可自由組合」的通則:verification(乃至 diagnose / implement)的軸應可依 deliverable type 選配,而非固定為 code review

Provenance

此需求浮現於在非 code、非 git 的 deliverable 上使用 idd-verify 時——必須手動把 4 個 code lens 重映射成 prose 適用的軸並跳過 git-diff 機制。它 work,但屬即興,正是 IDD 存在要消除的那類不可複現性。


Current Status

Phase: closed
Last updated: 2026-07-17 by /idd-diagnose (attended batch)

Key Decisions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions