Skip to content

[META] /idd-edit + IDD skills: bash vs alternative layer for strict flag parsing (sister concern from #154) #155

@kiki830621

Description

@kiki830621

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparking-lotDiagnosed but deferred until trigger condition fires. /idd-list filter candidate.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions