Problem
Source: surfaced during /idd-diagnose #154 sister concern surfacing (Step 3.6)
/idd-edit runtime enforcement (#154) 是第 1 個 SKILL.md 嘗試在 bash 落地 strict flag parsing + multi-line body handling 的 case。 3 iterations(R1/R2/R3 on PR #153)都 introduce new bugs:
- R1 awk range collapse + BSD
head -n -1 不存在
- R2 Codex 捕捉 4 個 parser bugs (
--scope value literal,--body empty silent overwrite)
- R3 全 6-AI ensemble 捕捉 3 NEW CRITICAL (infinite loop on
shift 2,flag-value-eat,BSD awk -v 多行 break)
Pattern:bash-incremental 修一個 parser bug 暴露另一個。 暗示「bash 不是 right layer for strict enforcement」。
#154 diagnosis Open Q1 + Risk R1 mention 此問題,但本 issue scope 限「bash impl 兌現 #150 declared discipline」。 此 issue 紀錄替代 layer 評估的 long-term 議題,等 rule-of-three trigger。
Type
enhancement / long-term architectural decision
Trigger conditions (parking-lot)
明確 trigger 任一:
Candidate alternatives(未來 design 時評估,本 issue 暫不選)
| Layer |
Pros |
Cons |
Bash + sourced helper (source $CLAUDE_PLUGIN_ROOT/scripts/parse-flags.sh) |
無新 runtime 依賴;cross-skill reusable |
仍 bash semantics fragile(test fixtures 仍需) |
Python helper (python3 $CLAUDE_PLUGIN_ROOT/scripts/idd-skill-helper.py) |
argparse + 良好 stdlib;cross-platform |
加 python 依賴(macOS 內建,Linux 一般有);啟動慢於 bash |
Rust CLI plugin(同 agent-browser model) |
強型別 + 一次寫 cross-skill 用;啟動快 |
新 build artifact + version sync 複雜度;rule-of-three 才合理 |
| Plugin framework primitive(Claude Code 自身提供 flag parsing?) |
0 maintenance |
取決於 Claude Code roadmap |
Type
enhancement / long-term architectural decision
Priority
P3 — parking lot until trigger fires (rule-of-three 或 catastrophic failure)
Refs #154 #150 #136
Problem
Source: surfaced during /idd-diagnose #154 sister concern surfacing (Step 3.6)
/idd-editruntime enforcement (#154) 是第 1 個 SKILL.md 嘗試在 bash 落地 strict flag parsing + multi-line body handling 的 case。 3 iterations(R1/R2/R3 on PR #153)都 introduce new bugs:head -n -1不存在--scope valueliteral,--bodyempty silent overwrite)shift 2,flag-value-eat,BSD awk -v 多行 break)Pattern:bash-incremental 修一個 parser bug 暴露另一個。 暗示「bash 不是 right layer for strict enforcement」。
#154 diagnosis Open Q1 + Risk R1 mention 此問題,但本 issue scope 限「bash impl 兌現 #150 declared discipline」。 此 issue 紀錄替代 layer 評估的 long-term 議題,等 rule-of-three trigger。
Type
enhancement / long-term architectural decision
Trigger conditions (parking-lot)
明確 trigger 任一:
/idd-edit+/idd-updateintegrate/idd-clarify) trigger 後實作,若 parser 整合再次 introduce bug → instance idd-all: direct-commit mode 加 passive warning (dirty tree / on default branch) #2/idd-edit因 bash subtle bug 誤刪 user content(catastrophic failure)→ instance idd-all: 增加 HITL(attended)模式 — direct-commit + 允許 sub-skill AskUserQuestion #1 即夠Candidate alternatives(未來 design 時評估,本 issue 暫不選)
source $CLAUDE_PLUGIN_ROOT/scripts/parse-flags.sh)python3 $CLAUDE_PLUGIN_ROOT/scripts/idd-skill-helper.py)agent-browsermodel)Type
enhancement / long-term architectural decision
Priority
P3 — parking lot until trigger fires (rule-of-three 或 catastrophic failure)
Refs #154 #150 #136