Skip to content

[META] Codify append-vs-modify discipline as plugin-level principle #150

Description

@kiki830621

Problem

Original text (from /spectra-discuss session 2026-05-25,user 切到 append-vs-modify 議題後 explicit pivot):
「我最近開始思考的是,不斷 append 會不會不比直接修改內容好」
— Source: spectra-discuss session conversation (本對話即時 capture)

IDD 內部其實已經是 hybrid append + modify(不是純 append),但 hybrid 規則 implicit、case-by-case 演化、從未被 codify。每次遇到「AI 想表達新狀態但不能直接編老 AI-authored 內容」就加 supersession workaround,workaround 數量正在增加。本 issue 是強迫 explicit 決定該不該把 implicit 規則升上 first-class principle。

Type

refactor — META / plugin design principle codification(類比 #144 IC_R011 「AI design over-abstract」 的 plugin-level principle file pattern)

Expected

  • Explicit Append vs Modify discipline 文檔化為 plugin-level rule(可能落地形式:plugins/issue-driven-dev/rules/append-vs-modify.md 或併入既有 manifesto)
  • 提供 mapping table:artifact type → modify / append / hybrid 行為對照
  • 解決痛點:Strategy/Plan checkbox supersession 改走 gate-logic「only-look-at-latest」(Path C)還是允許 AI 直接 PATCH 老 AI output(Path B);決定 IC_R007 與 「AI self-edit」 的 boundary

Actual

現狀證據(7+ sites,本 session 親自觀察)

Artifact 行為 證據
Comments 純 append + 內部 PATCH diagnose 後續 PATCH audit blocks(Layer V + Sister + Distribution Sync)
Issue body 上半(Problem/Type/Expected/Actual) Immutable(IC_R007 verbatim preserve) /idd-issue Step 3 contract
Issue body 下半(Current Status) Modify(REPLACE below ---) /idd-update Step 5
CHANGELOG.md 純 append [2.72.0] 加在 [2.70.0] 上方
Canonical ref .md Modify(in-place rewrite) ic-r011-checkpoint.md 301→397 是 Write-replace(本 session 親手做)
SKILL.md Modify(refactor in-place) 6 SKILL.md 從 inline ~50 行 → cite ~15 行(本 session 親手做)
tasks.md Modify(checkbox flip) [ ][x] via spectra task done
Strategy/Plan checkboxes in 老 comments Append-only with supersession hack #515 fix:post 新 ## Implementation Complete override 老 Strategy/Plan
Closing summary 內 cross-link Modify(Step 3.5 inline replace BEFORE publish) /idd-close Step 3.5
Spec archive Hybrid(delta promote to main + snapshot keep) spectra archive 預設 sync delta → main

隱性原則(從上表反推)

human-authored content    → never modify (IC_R007 verbatim preserve)
AI-authored decision      → append (decision history matters)
machine-readable state    → modify (only current state matters)
AI-authored stale state   → supersession hack (post newer to override older) ← 痛點所在

痛點具體 evidence(本 session)

  1. #515 fix:idd-close Step 0 gate 一直誤判 Strategy/Plan 老 checkboxes 為「未完成」→ 加 supersession bridge(Implementation Complete > Checklist[x] 視為 canonical state of truth,跳過 Strategy/Plan scan)。
  2. [design] IC_R011 follow-up checkpoints should default to filing, not asking — past suggestions are disappearing into conversation #148 closing remediation:本 session 必須手動 post 一個 synthetic ## Implementation Complete comment 才能觸發 #515 supersession → gate 通過 → close。
  3. [docs] idd-verify Step 5b lacks canonical "Rule (SHALL/SHOULD)" framing — IC_R011 spec consistency gap #149 retroactive closing summary:被 commit-body trap auto-close,事後 post 「(retroactive — auto-closed via commit-body trap)」標記的 Closing Summary。Audit trail 同時有早期 auto-close 跟事後 summary,讀者要自己分辨哪個是 final state。
  4. IC_R011 audit trail accumulation:### Sister Concerns Filed / ### Closing Follow-ups Filed / ### Distribution Sync / ### Residue Acknowledgement 都 append 到同一 comment,而非 REPLACE 一個 "Final Audit" structured section。Comment 不斷膨脹;3 個月後讀者要分辨「這 4 個 block 是真的 final 還是還會繼續長」。
  5. Canonical ref 文件 growth:ic-r011-checkpoint.md 在本次 spectra change 從 301 → 397 行 append 上去(Section 7、8 新增)。這個是 modify-friendly artifact,所以沒 friction,但證明 IDD 在 docs / SKILL.md 已經是 free-modify;痛點集中在 GitHub-side comments / issue body。

3 個 candidate path(spectra-discuss 結論)

Path 機制 代價
A: Status quo(append + supersession) 老 comment 留著 + 新 comment override 讀者 archaeology;3 個月後翻舊 issue 像考古;history 完整但「current state 在哪」不明確
B: AI may modify AI's prior output idd-implement 結束時直接 PATCH 老 ## Implementation Plan checkbox 為 [x],或 PATCH 老 Strategy 加 ~~strikethrough~~ + 「(superseded by #NEW comment)」 失去「decision-at-time」history;但 single source of truth;需要明確的 IC_R007 vs AI-self-edit boundary
C: Refactor gate semantic 把 Strategy/Plan checkbox 設計成「初始 snapshot,not gate source」;gate 永遠從新 Implementation Complete 讀(#515 已部分實作) 不改文件 mutability,改 gate logic 預設 only-look-at-latest;最小破壞;但仍留 archaeology cost

spectra-discuss tentative inclination:C 加部分 B(C 解 90% 痛點 + B 用於明確「AI retract self」case)— 留給本 issue 的 diagnose / propose 階段正式 decide。

Sister Concerns

Open Questions(deferred — 留給 diagnose/discuss 決定)

  1. AI 可不可以 modify AI 自己的舊 output?(Path B)若可,要什麼 boundary?(只 PATCH checkbox? 還是可以加 ~~strikethrough~~ + supersession note?)
  2. 跟 IC_R007 「human content verbatim preserve」的 boundary 怎麼界定? AI 引用 human content 後 AI render 的詮釋是 AI-authored,可被 AI 自己 modify 嗎?
  3. 保留 append-only,改 gate logic「only look at latest」?(Path C)idd-close gate 預設只看最新 ## Implementation Complete > ### Checklist(#515 部分實作)— generalize 到所有 gate(idd-verify / idd-update)?
  4. IC_R011 audit trail blocks 是否該收斂成 single Final Audit section + REPLACE,而非各自 append?
  5. idd-edit 已經 modifies content — 它跟 append-vs-modify discipline 的關係?是 escape hatch 還是該被 discipline 約束?
  6. 直接 file 為 plugin principle(類比 IC_R010 / IC_R011)還是 codify 為 manifesto 一節?

為什麼 file 這個 issue(meta-justification)

第 4 條 supersession workaround 數量已經 ≥ 5(從本 session 親身證據)。每個新 IDD feature 都在加 workaround,而沒人在問「這條 implicit rule 該不該升上 explicit principle」。本 issue 的目的是強迫做這個決定,而不是繼續在每個新 friction 加 ad-hoc bridge。

Residue

NSQL §4.6 residue(由 idd-issue 自我聲明,後續 diagnose 階段補充):
本 issue 涵蓋「IDD 內部 append vs modify discipline」這個 decision space,但涵蓋:

  • IDD 與其他 plugin 的 cross-plugin append/modify policy(本 issue scope 限 IDD 自己)
  • 過去已 ship 的 supersession workaround(#515 等)是否該 retrofit(留給 implement 階段 decision,本 issue 只 codify principle)
  • 跨 session 的 comment 累積最佳實踐(屬於 GitHub UX 議題,不是 IDD 設計議題)
  • 本對話即時討論的 Path A/B/C trade-off 細節(diagnose 階段重新評估)

(本 issue 是 META/principle 議題,不是 single behavior change — 屬 Spectra-tier candidate per IC routing,但最終 routing 由 /idd-diagnose 決定。預期 verdict: Spectra(Layer 2 published principle + Layer 3 修改既有 spec normative behavior 多處)。)

Clarity Surface (dismissed)

Type Source Suggested canonical Status
(dismissed) Step 4.6 was deferred initially (META-recursion: issue body uses IDD plugin's own canonical terms supersession / IC_R011 / append / modify / audit trail / IC_R007 that user explicitly defined in immediately-prior /spectra-discuss session 2026-05-25). Step 0.5 gate at /idd-diagnose triggered hard-refuse on deferred row; dismissed with canonical §1.4(a) unactionable-observation reason: META-issue about IDD's own discipline, no domain-vocab mismatch exists to clarify. Reviewed body: 0 mismatches found. n/a dismissed

Audit dance: deferred at /idd-issue Step 4.6 → REFUSE at /idd-diagnose Step 0.5 → dismissed with §1.4(a) reason → gate passes. This is the canonical "deferred-with-reason → gate-refusal → explicit-dismiss" loop the spec designed for.

Linked-Context Siblings Filed (v2.48.0+ #529, per IC_R011 v2.72.0+ default-flip)

Filed Title Source Disposition
#151 [Bug] Step 0.8 commit-body auto-close trap protection gap /idd-close cluster #148 #149 session 2026-05-25 (#149closes #149 body trap auto-close) filed per canonical §1.1 file-by-default — user explicit confirm in Step 4.7 picker

Sweep scope: body draft + recent session conversation (~hours of /spectra-discuss + batch diagnose). #151 is structurally orthogonal to this META principle issue but informationally adjacent (Path B remediation choice depends on #150's principle decision).


Current Status

Phase: closed
Last updated: 2026-05-25 by /idd-update (via /idd-close)

Key Decisions

Scope Changes

Blocking

Commits

Closing

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