You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(none surfaced) — the four further call sites of the same pattern (idd-verify, idd-all-chain, idd-report, idd-reorganize) are in this issue's family-wide scope, not separate issues
Activity
kiki830621 commentedon Oct 29, 2026
Diagnosis
Type
bug
Root Cause / Analysis
我認為 root cause 是各 skill 用
git log --grep="#$NUMBER"找「引用此 issue 的 commit」,而--grep預設是 basic regex 的子字串比對,#N兩側都沒有邊界,因為:#10命中#100–#109、#1000…(issue 回報的bestASR #107就是這種)owner/repo#10這種跨 repo 引用也會命中。references/pr-issue-matching.md已經為 PR body 定了精篩規則(^|[^A-Za-z0-9_/-])#N([^0-9]|$)(「同時排除 owner/repo#N 與 repo#N 的跨 repo 形式,以及 Complexity routing: vagueness 應該是一階信號,但目前 4 層 gate 都沒衡量需求清晰度 #12 誤中 [refactor] Define IDD_ALL_UNATTENDED env var contract across idd-all + plugin-tools (sibling concern from #60) #123」),commit 訊息這邊沒有套用重現(暫存 repo,git 2.43,9 個 commit):
--grep="#10":命中 8 個,包含bestASR #107 unrelated、x#100 glued、cross-repo PsychQuant/other#10 mention-E --grep='(^|[^[:alnum:]_./-])#10([^0-9]|$)':命中 5 個,正好是真的引用#10的那些((#10)、Refs #10、行首#10、#10.、多行訊息中間那行的Refs #10)N=1:現行命中 9 個,改後只剩 1 個$在多行 commit 訊息裡是行尾錨點(多行那一個仍被找到),-E在 git 2.43 可用同一個 pattern 出現在 7 個 SKILL.md 共 13 處(issue 點名的是前三個):
skills/idd-update/SKILL.md:176skills/idd-issue/SKILL.md:1272、:1281skills/idd-close/SKILL.md:361、:508、:510、:520、:521skills/idd-verify/SKILL.md:607HEAD~N..HEADskills/idd-verify/SKILL.md:673grep -q "#$ISSUE"比對 PR 的#N清單#10、PR 只 refs#107時對應檢查照樣通過skills/idd-all-chain/SKILL.md:587skills/idd-report/SKILL.md:136skills/idd-reorganize/SKILL.md:60scripts/底下沒有用--grep的地方;4 個 open PR(#402、#418、#426、#442)都沒有改到上面任何一行。Existing work
(none) —
check-existing-work.shverdict=clearImpact
references/pr-issue-matching.md(commit 訊息比對沒有記在契約裡)、新的測試、CHANGELOG.mdStrategy
git log -E --grep=<ERE>,ERE 與pr-issue-matching.md的 PR body 精篩相同((^|[^A-Za-z0-9_/-])#N([^0-9]|$));idd-verify:673的grep -q改成整行比對references/pr-issue-matching.md加「commit 訊息」一節與呼叫點#107、#100、owner/repo#10、(#10)、Refs #10、多行)驗證 ERE;drift guard:任何 SKILL.md 再出現沒有邊界的--grep#$N就失敗[Unreleased]FixedConflict Class
C_shared_module_coord — 共享資源是 7 個 SKILL.md(idd-update、idd-issue、idd-close、idd-verify、idd-all-chain、idd-report、idd-reorganize),open PR #402/#418/#426/#442 都在改其中幾個檔(不同行),merge 順序要協調
Complexity
Plan — Hard-gate: triggered — 同一個概念(「找引用 issue N 的 commit」)散在 7 個檔(≥ 5):
skills/idd-update、idd-issue、idd-close、idd-verify、idd-all-chain、idd-report、idd-reorganize的 SKILL.md。Layer P 另外命中 decision-heavy:共用 helper(一份 regex,呼叫端各自 source)vs 每處 inline 同一條 ERE 加 drift guard,會影響 13 處的寫法。Layer 1 未命中(是行為修正,不是 prose);Layer 2 未命中(沒有新的對外 API;helper 若採用也只是內部)。Family-wide scope:issue 點名 idd-update/idd-issue/idd-close,並寫「若用同一 pattern,一併修」;上表其餘 4 個檔是同一 family,Plan 會全部列入。
Risks
-E之後--grep的其他字元也變成 ERE 語意;這些呼叫點只放#N,沒有其他 meta 字元idd-issue:1281的--grep "#$UMBRELLA scope"帶了額外的字,改寫時要保留語意Residue
(none)
Vagueness Pre-check
\b或 ERE)與要一起修的位置;只有「同一 pattern 的其他位置」需要自己找#10不再命中#107」,但「哪些呼叫點算在內」要靠 Expected 的「若用同一 pattern,一併修」推斷Hard-gate: triggered — 同一概念散在 7 個 SKILL.md(見上表);sdd_bias 未設定 → Plan
Sister Concerns Filed (mid-diagnose, v2.47.0+ #528)
(none surfaced) — the four further call sites of the same pattern (idd-verify, idd-all-chain, idd-report, idd-reorganize) are in this issue's family-wide scope, not separate issues
Generated by Claude Code
kiki830621 commentedon Oct 29, 2026
📊 For Reviewer / Collaborator
現在:已診斷 ——
git log --grep="#N"是子字串比對(#10命中#107、owner/repo#10),同一寫法在 7 個 skill 共 13 處;判為 Plan tier(同一概念散在 ≥ 5 個檔)Blocking:無
你該做什麼:審 Implementation Plan(/idd-plan 會在 plan mode 請你核准)
last-updated by idd-diagnose at → diagnosed, 2026-10-29
Generated by Claude Code
kiki830621 commentedon Oct 29, 2026
Implementation Plan (Plan tier)
Files & Changes
plugins/issue-driven-dev/scripts/lib/issue-ref.sh(新)—idd_issue_ref_ere <N>:N 不是純數字時 exit 2;印出(^|[^A-Za-z0-9_/-])#N([^0-9]|$),與references/pr-issue-matching.md的 PR body 精篩同一條規則。一份 regex,13 個呼叫點共用skills/idd-update/SKILL.md:176— Step 3 Related Commits 改git log --oneline -E --grep="$(idd_issue_ref_ere "$NUMBER")"(前面 source helper)skills/idd-issue/SKILL.md:1272、:1281— Step 4.8 umbrella pre-flight;:1281的"#$UMBRELLA scope"改成 ERE 後接scope,保留原語意skills/idd-close/SKILL.md:361、:508、:510、:520、:521— commit 掃描與 Step 1.6 semantic gate(表格裡的兩個範例指令也改,避免被照抄)skills/idd-verify/SKILL.md:607— Step 0.5 auto-detect 的命中數;:673的grep -q "#$ISSUE"改成grep -qx "#$ISSUE"($DISCOVERED是grep -oE '#[0-9]+'的逐行結果,整行比對即可)skills/idd-all-chain/SKILL.md:587、skills/idd-report/SKILL.md:136、skills/idd-reorganize/SKILL.md:60— 同上references/pr-issue-matching.md— 加「commit 訊息」一節:同一條邊界、用idd_issue_ref_ere,列出上述呼叫點scripts/tests/issue-ref/test.sh(新)— (a) 暫存 repo 的 commit 組:bestASR #107、x#100、PsychQuant/other#10、repo#10不命中;(#10)、Refs #10、行首#10、#10.、多行訊息中的Refs #10命中;N=1只命中#1;非數字 N exit 2。(b) drift guard:skills/與references/裡任何git log … --grep帶#$或#${卻沒有用idd_issue_ref_ere的行都失敗CHANGELOG.md—[Unreleased]FixedFamily-wide scope (shared-abstraction hard-gate trigger only)
硬閘是「同一概念散在 ≥ 5 檔」觸發(不是 shared abstraction);仍把 family 全列:issue 點名的 idd-update/idd-issue/idd-close,加上同 pattern 的 idd-verify(2 處)、idd-all-chain、idd-report、idd-reorganize。共 7 檔 13 處,全部在 Files & Changes。
Sequencing & Dependencies
scripts/tests/issue-ref/test.sh(RED:helper 不存在;drift guard 列出 13 處)scripts/lib/issue-ref.sh(測試 (a) GREEN)run-all-tests.shDecision Points
scripts/lib/actionability.sh)與 existing-work lookup(scripts/check-existing-work.sh)兩次證明 inline 複本會分歧;drift guard 只能抓「沒有邊界」,抓不到「13 份邊界彼此不同」。代價:每個呼叫點多一行. "$CLAUDE_PLUGIN_ROOT/scripts/lib/issue-ref.sh"idd-verify:673:不用 helper —— 那是對已抽出的#N清單比對,整行比對(grep -qx)就正確,也更簡單Risks & Mitigations
skills/與references/set -u的 bash 區塊 source → helper 本身不留全域變數、不set任何選項-E改變整個--grep的語意 → 只有:1281帶額外文字,已單獨處理Test Plan
issue-ref/test.sh(a):上面的 commit 組,命中集合逐項斷言;RED 是 helper 不存在 → source 失敗idd-verify:673:(a) 另加printf '#107\n' | grep -qx '#10'失敗、printf '#10\n'成功run-all-tests.sh沒有新的失敗(基準:idd-repo-map、idd-tree-lock以 root 執行時本來就失敗)Out-of-scope (will NOT be touched)
idd-listStep 3.5 的私有 regex(idd-list matches PR bodies with a private regex that is not in the pr-issue-matching.md call-site table (sibling concern from #366) #368,PR 端,另一張 issue)pr-issue-matching.md既有 PR body 精篩的 jq 寫法(不同 regex 引擎,維持原狀)idd-issue:1281以外的 umbrella 判斷邏輯Tangential Observations (filed mid-plan, v2.42.0+ #524)
(none surfaced)
Generated by Claude Code