Skip to content

feat(idd-comment): --type=reply human-facing point-by-point reply (v2.100.0, #269)#271

Merged
kiki830621 merged 3 commits into
mainfrom
idd/269-comment-reply-type
Jul 18, 2026
Merged

feat(idd-comment): --type=reply human-facing point-by-point reply (v2.100.0, #269)#271
kiki830621 merged 3 commits into
mainfrom
idd/269-comment-reply-type

Conversation

@kiki830621

@kiki830621 kiki830621 commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

idd-comment 新增第 7 型 --type=reply(v2.100.0)—— 寫給人類 collaborator(review 提出者、指導教授)看的逐點回覆,是六個 audit-facing 型別以外唯一 recipient-facing 的型。處理 #269(after merge 走 /idd-close,見下)(Spectra change add-idd-comment-reply-type;validate + analyze clean)。

Spec delta(idd-comment-reply,6 requirements)

  • Reply comment type with per-point structure — 必填 --points-from;每點 verbatim blockquote → 改了哪/怎麼改 → commit/PR/SHA 錨定 → per-point 狀態;結尾整體狀態行 + metadata marker。
  • Points-source resolution — 三層鏈:顯式 comment URL → 預設 issue body Original text blockquote → user-pasted fallback;verbatim,禁止 paraphrase 對方原文。
  • Verify-before-claim gate — 每點宣稱已解決前以 git log --grep "#N" / merged-PR 驗證;無證據寫 open/pending。同族於 idd-close Step 1.6 semantic gate。
  • Perspective-writer soft integration with graceful degrade — presence-check 命中 → perspective-writer:perspective-writer calibration(轉交 mention login + target repo correspondence rules 路徑);缺席 → 印兩行安裝指令照 post。不新增 install-time dependency(刻意與 superpowers hard-dependency 相反:calibration 是 enhancement 非 canonical-process 替代)。
  • Anchoring precedes calibration — R1–R3 錨定完成後才 calibration;calibration 不得改動 SHA / 引用 / verbatim 引文。
  • Additive audit posture and egress discipline — reply 是 closing summary 加項不取代;egress 走 gh-egress choke-point(scrub + mention attestation)。

Changes

  • skills/idd-comment/SKILL.md — 型別表 6→7、Step 2 validation 列、#### Template: reply、Reply drafting pipeline(R1–R5)、bootstrap stage tasks、鐵律、範例
  • 新 drift-guard suite scripts/tests/idd-comment-reply/test.sh(19 assertions)→ run-all-tests: 40 suites, 0 fail
  • docs/commands.md、docs/workflows.md、README、CHANGELOG、兩個 manifest → 2.100.0
  • Spectra artifacts(proposal / design / specs / tasks)

設計背景

D1–D5 於 #269 spectra-discuss 收斂(decision comment)。觸發案例:#141 的六點 review 逐點回覆,當時分兩輪口頭指揮才排出格式——本 PR 把該格式收斂成 first-class 型別。

依賴

Test plan

  • bash plugins/issue-driven-dev/scripts/tests/idd-comment-reply/test.sh — 19/19 pass(RED→GREEN 已驗證:先寫測試對空 SKILL 全紅,實作後全綠)
  • bash plugins/issue-driven-dev/scripts/run-all-tests.sh — 40 suites 0 fail
  • spectra validate / spectra analyze — valid / 0 critical-warning
  • Dogfood dry-run:presence-check 兩分支各觸發一次(calibration / degrade)+ 模板四元素自檢

…c) static check

The 23 idd-edit fixtures all invoke the helper directly, so 'SKILL references
a variable the helper never emits' bugs shipped with green tests three times
(R1 B1 APPEND_BODY, R1 B2 GITHUB_REPO, independently flagged by 3 reviewers).
New suite idd-edit-contract embeds a python3 checker: EMITTED derives
mechanically from the helper source (emit_assignment calls + TARGETS array —
single source, no third variable list), CONSUMED/DEFINED parse the SKILL's
fenced bash blocks, and the invariant CONSUMED - DEFINED - EMITTED -
ALLOWLIST = empty catches the unsourced-reference class. Allowlist is env
only (CLAUDE_PLUGIN_ROOT, IDD_CALLER per the #161 cross-skill contract, ...;
GITHUB_REPO deliberately excluded — that WAS bug B2). Checker efficacy is
self-tested against a seeded three-violation fixture (detection failing =
suite fails), and the 11-name emit surface is frozen (deleting an emit goes
red here before it breaks consumers). First live run caught IDD_CALLER and
forced its provenance classification — working as intended. SKILL gains a
Contract section documenting mechanism + scan boundary (H7 structural class
stays with fixture 14). Shape (a) escalation stays trigger-based per the
approved plan. GREEN 17/0; sweep 39 suites 0 fail.

Refs #163
… (v2.100.0)

Seventh comment type for correspondence to a human collaborator (review
author, advisor), the recipient-facing counterpart to the six audit-facing
types. Per-point structure: verbatim blockquote of the counterpart's point ->
what changed and where -> commit/PR/merge-SHA anchor -> honest per-point
status. Required --points-from resolves through a three-layer chain
(comment URL -> issue-body Original-text blockquote -> user-pasted); verbatim,
no paraphrase. verify-before-claim gate (same family as idd-close Step 1.6)
keeps unevidenced points open/pending.

perspective-writer soft integration with graceful degrade: presence-check
present -> calibrate voice/recipient; absent -> print the two install commands
and post the anchored draft anyway. No install-time dependency (deliberate
opposite of superpowers hard-dependency — calibration is an enhancement, not
a canonical-process substitute). Anchoring precedes calibration; calibration
must not alter anchored facts.

New drift-guard suite idd-comment-reply (19 assertions). run-all-tests: 40
suites, 0 fail. Docs (commands/workflows/README) + CHANGELOG + both manifests
bumped to 2.100.0. Spectra change add-idd-comment-reply-type (validate + analyze
clean).

Refs #269
Related PsychQuant/psychquant-claude-plugins#116, PsychQuant/perspective-writer#1
Verify round 1 (4 lens + Codex + Devil's Advocate) findings, all folded:

- DA-1 (HIGH): verify-before-claim was issue-level (git log --grep "#N") but
  the obligation is per-point. Rewrote R2: the grep is an entry point; the
  found commit/PR must actually contain the change addressing THAT point, and
  finding any #N commit must not mark all points resolved. Locked by 2 new
  drift-guard assertions.
- Codex + Regression F1: --points-from "required" vs spec "when unspecified
  default to issue-body" was a genuine contradiction. Reworded spec so the
  three layers describe how the REQUIRED value resolves (issue-body is an
  explicit sentinel), not a default for an absent flag. Dropped --body from
  reply's 必填 column (Step 2 + spec make it optional).
- DA-2 (MEDIUM): bootstrap TaskCreate order (build_comment_body before
  resolve/verify) contradicted the pipeline "順序是契約". Reordered so
  resolve_points_source + verify_before_claim precede build_comment_body
  (= R3 anchoring) and annotated the dependency.
- Security F4 + DA-3 (MEDIUM): reply is the only type reproducing third-party
  verbatim. Added scrub-wins-over-verbatim clause + noted SCRUB_LEVEL is
  repo-visibility-keyed (own-repo → warn/light, never enforce) so layer-3
  pasted external content needs heightened self-review, not tier default.
- Test strengthening (Logic LOW-1 / Requirements F3 / Codex gaps): anchored
  the weak "reply" docs needle, added assertions for layer-1 URL / layer-3
  paste / per-point template elements / degrade post-anyway / scrub-wins.
  Suite 19 -> 27 assertions.
- Doc drift: design/proposal run.sh -> test.sh, suite count 39->40.

run-all-tests: 40 suites 0 fail. reply suite 27/27. spectra valid.

Refs #269
@kiki830621

Copy link
Copy Markdown
Member Author

Verify Report — PR #271 (Refs #269)

Engine

manual fan-out (4 lens Agents + sequenced Devil's Advocate, model: opus, file-based output) + Codex (gpt-5.6-sol, xhigh, via codex-call)

Aggregate

PASS (after round-1 fix ef61572) — 0 blocking, all round-1 findings reconciled in-PR, 1 follow-up filed (#272).

6 個獨立來源(requirements / logic / security / regression lens + Codex 跨模型盲驗 + Devil's Advocate)全數判 mergeable。無任一 BLOCKING。Round-1 找到 4 個實質不一致(其中 DA-1 是 HIGH、feature 核心價值),已全部在本 PR 修掉並補測試鎖住。

Requirements coverage

6/6 spec requirements FULLY addressed(reply per-point 結構 / points-source 三層 / verify-before-claim / perspective-writer soft integration + graceful degrade / anchoring-precedes-calibration / additive + egress)。drift-guard suite 19 → 27 assertions,RED-verified 非 tautological(多個 reviewer 各自剝 needle 驗證會紅)。

Findings(合併去重)

# Severity Finding Source Action
1 HIGH verify-before-claim 用 git log --grep "#N"(issue 級)但義務是 per-point — 見任一 #N commit 即可 over-claim 全部點,正是 gate 要防的 agents:devils-advocate Fixed ef61572(R2 改 per-point + 2 assertions)
2 MEDIUM --points-from spec「required」vs「when unspecified default to issue-body」矛盾(後者不可達) codex+agents:regression Fixed(spec 改「三層是 required value 的解析、非 absent 的 default」)
3 MEDIUM type 表把 --body 列 reply 必填,Step 2 + spec 為選填 agents:regression+devils-advocate Fixed(drop --body
4 MEDIUM bootstrap TaskCreate 序(build_comment_body 先於 resolve/verify)違反 pipeline「順序是契約」,兩 authoritative 序不一致 agents:devils-advocate Fixed(reorder + 依賴註記)
5 MEDIUM reply 唯一逐字重製第三方原文,契約未言明 scrub 優先於 verbatim;且 SCRUB_LEVEL 是 repo-visibility-keyed,own-repo 情境永不 enforce agents:security+devils-advocate Partial fix(R1 加 scrub-wins + layer-3 heightened 自審 clause);tier-forcing 屬跨切面 → follow-up #272
6 LOW assertion 19 needle reply 太弱(任一出現即 match);drift-guard 未鎖 layer-1/3、post-anyway、per-point 元素 agents:logic+requirements+codex Fixed(needle 錨定 + 6 新 assertions)
7 LOW design/proposal 稱 suite run.sh(實為 test.sh)、suite 數 38→39(實 40) agents:requirements+regression+security Fixed
8 INFO verify-before-claim 可要求「證據與該點實質改動相符」 codex 併入 #1 修法

Scope Check

git log origin/main..HEAD = 只有本 PR 的 2 commit(feat + fix round)。idd-edit-contract + idd-edit/SKILL.md #163gh pr diff 出現但已在 origin/main8be146c,獨立 #163 PR),是 diff-base artifact,非 scope creep(3 個來源獨立確認)。

Follow-up Findings Filed (v2.72.0+ #148)

Process notes

@kiki830621
kiki830621 merged commit 14516f9 into main Jul 18, 2026
1 check passed
@kiki830621
kiki830621 deleted the idd/269-comment-reply-type branch July 18, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant