Skip to content

[bug] idd-update Step 5 'replace below ---' 會誤刪 /idd-issue body 的 audit blocks (Clarity Surface / Linked-Context Siblings) #178

Description

@kiki830621

Problem

idd-update Step 5 描述 managed-zone 的方式是「將原始 body 的 --- 分隔線(含)以下替換為新的 Current Status」。這個規則錨在 第一個 ---,假設「--- 以下 == Current Status managed zone」。

但 /idd-issue 產出的 body(尤其 parking-lot seed)在第一個 --- 以下放的是 audit blocks,不是 Current Status:

[original record: Problem / Type / ...]
---
### Clarity Surface
| ... | surfaced/resolved |
### Linked-Context Siblings Filed
(...)

照 Step 5 字面「replace below first ---」執行 → 靜默刪掉 Clarity Surface + Linked-Context Siblings audit blocks。這是 silent data loss:clarity 解析、linked-context 紀錄全沒了,且 caller 收到的只有「✓ status updated」,不會發現 audit 被吃掉。

Repro

  1. 任何用 /idd-issue 建的 issue,body 在 --- 下有 ### Clarity Surface(無 ## Current Status)。
  2. 跑 /idd-update #N(或被 idd-diagnose Step 5 自動呼叫)。
  3. 若照 Step 5 字面 replace-below---- → audit blocks 消失。

實證:本 issue 由 /idd-diagnose #164 的 Step 5 自動呼叫 idd-update 時撞到(#164 body 在 --- 下有剛 resolve 的 Clarity Surface)。當下手動改走 append 分支才沒刪到,但 skill text 會誤導較不謹慎的執行者。

Type

bug(spec gap / footgun in published skill)

Root cause(初判)

Step 5 的兩個分支沒涵蓋「有 --- 但 --- 下不是 Current Status」這個 case:

  • branch 1:有 --- + Current Status → replace below ---
  • branch 2:無 --- 且無 Current Status → append
  • 未涵蓋:有 ---、下方是 audit blocks、無 ## Current Status → 字面落入 branch 1 → 誤刪

Suggested fix(方向,待 diagnose 確認)

把 managed zone 錨在 ## Current Status heading 而非第一個 ---:

  • 若 body 含 ## Current Status → 從該 heading(含其上緊鄰的 ---,若有)到 body 結尾替換。
  • 若 body 無 ## Current Status → append 到結尾(保留所有既有內容,不論有幾個 ---)。

--- 在 IDD body 裡語意不唯一(既分隔 original/audit,也可能分隔 audit/status),不能當 managed-zone 的唯一錨。

Impact

  • 影響的 skill:idd-update(被 idd-diagnose / idd-plan / idd-implement / idd-verify / idd-close 的 Step N Auto-Update 自動呼叫 → blast radius 大)。
  • 影響的 issue 類型:所有 /idd-issue 產的、--- 下有 audit blocks 而無 Current Status 的 body(parking-lot seeds、含 Clarity Surface / Linked-Context Siblings 的 issue)。

Source: surfaced during /idd-diagnose #164 Step 5 (idd-update auto-call) — dogfood catch on plugin's own repo


Current Status

Phase: closed
Last updated: 2026-06-01 by idd-close

Key Decisions

  • RCA: idd-update Step 5 anchored managed-zone on first ---, not ## Current Status heading. Fixed all 4 prose spots (Branch A replace-from-heading / Branch B append-preserve-all). Strictly backward-safe. 66ac7b9, v2.77.2.
  • Verify: light (prose-only) PASS — dogfood ×4 on this issue's own body (diagnose B / implement A / verify A / close A).

Scope Changes

  • (none)

Blocking

  • (none)

Related

Commits

Verification

  • PASS (light) — closed with full closing summary; distribution sync (push + marketplace reload 2.77.2) executed.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions