SDD 生命週期鐵律:單一活性+pending-changes 緩衝+硬約束 hook(leo 2026-07-17 拍板) #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
leo 拍板(源自 claude.ai 草案+總管適配):
硬約束:sdd-guard.sh 升級(active>1 擋全部寫檔;寫 code 需恰好 1 active)+新 scripts/sdd-active-check.sh(pre-commit/CI 可掛)。
design.md 掛 YAML frontmatter:status: active|draft|paused|closed + superseded_by。
實作由總管 subagent 進行,本 issue 留底。
[system-dev-template CC] issue #6 完成,commit
7b83465已推 main(版號 1.15.0——1.14.0 被 issue #5 vault 萃取先佔走)。落地內容
template/system-dev/docs/3-specs/SDD-LIFECYCLE.md:規則真相源(frontmatter 狀態標記+五條鐵律,照 leo 2026-07-17 拍板全文)template/system-dev/docs/3-specs/pending-changes.md:規格變更緩衝區骨架(待裁決/已裁決留底)TEMPLATE-sdd/design.md掛 frontmatter(status: draft),舊「> 狀態」blockquote 移除sdd-guard.sh升級:active>1 → 不論寫什麼檔一律 exit 2;寫 code 檔需恰好 1 份 active(=0 擋、指向 SDD-LIFECYCLE.md);向下相容——3-specs 無任何 frontmatter design.md(老 repo)退回舊行為;統計排除 archive/ 與 TEMPLATE(否則 update 一鋪新 TEMPLATE 老 repo 就誤判已遷移而全紅)template/scripts/sdd-active-check.sh(+x):獨立硬約束,pre-commit/CI 可掛,>1 → 列清單 exit 1/sdd-check加「生命週期」段(五鐵律摘要+session 三數字回報格式+兩份 active 當場糾正)template/CLAUDE.md絕對鐵律指向 SDD-LIFECYCLE.md、濃縮五條測試(真跑,pipe-test fixture,已清)
另驗:0 份 active 但有 frontmatter → 寫 code 檔 exit 2;archive/ 內 active 與 TEMPLATE 的 draft frontmatter 不計入統計。