feat(idd-all-chain): Phase 0 diagnosis-readiness gate (Step 0.4)#50
Merged
kiki830621 merged 5 commits intomainfrom May 10, 2026
Merged
Conversation
P1 blockings: - F1: Remove IN_CHAIN_CONTEXT dead code (no producer in repo; /idd-all-chain is user-invoked deliberation moment, no unattended path) - F2: Move AskUserQuestion(...) out of bash block as prose (per idd-all/SKILL.md Phase 0.5 ask-policy pattern; AskUserQuestion is Claude tool not bash binary) - F3: Inline AUDIT_BLOCK build (no forward-ref function); audit logic now self-contained at proceed-anyway branch P2 in-scope: - P2.1: Add 'set -e' + numeric regex check on HAS_DIAGNOSIS (gh/jq failure no longer silently passes the gate) - P2.2: Renumber 3 Phase 0.4 entries in Failure modes table → Phase 0.5 (cluster branch checks moved with the renumbering); add 2 new Phase 0.4 entries for diagnosis-readiness halts - P2.3: Audit insertion now detects existing '---' separator and inserts before it (no more separator stacking when proceed-anyway fires on already-PATCHed body) Refs #47 (verify findings) Follow-ups filed separately: #51 helper extraction, #52 verify orchestration playbook, #53 regex anchor for ## Diagnosis match, #54 archived spec sync mechanism.
…h sed split, sync prose Re-verify findings: - macOS awk doesn't accept multi-line -v values → switch to line-split with grep -n + sed -n. POSIX-portable, no quirks. - Stale 'bypass_audit_trail block' label in routing prose → rename to 'proceed-anyway audit trail PATCH bash' to match the actual section heading. - chain-flow.md still described unattended fallback even though IN_CHAIN_CONTEXT was removed from SKILL.md → align: explicit 'No unattended fallback by design' paragraph documenting why (deliberation moment, no automated caller path). Refs #47 (verify re-verify cleanup)
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #47
Summary
/idd-all-chainPhase 0 加新 gate (Step 0.4) 偵測 root issue 是否有 diagnosis comment。沒 diagnosis 跑 chain 風險:unattended idd-diagnose Layer V 自動 proceed → 基於 vague spec 做 design 猜測 → 6-AI verify 抓不到根本問題。3 個 commits:
0fd9dbdStep 0 Bootstrap TaskList 加check_diagnosis_readinessentrye36e658Phase 0 插入 NEW Step 0.4 (Diagnosis-readiness check) + renumber existing 0.4→0.5, 0.5→0.63092f68references/chain-flow.md同步更新 Phase 0 章節 + 新增 "Diagnosis-readiness gate" 段落Step placement decision
Diagnosis 推 between cluster branch setup 和 manifest init,Plan refined 到 between universal gates 和 cluster branch setup。Rationale:cancel-path side-effect minimization — 若 user 選 cancel,no branch/manifest yet,cleanup 是 zero-action。
AskUserQuestion 3-option (per IC_R011 canonical)
run /idd-diagnose first(default,safest) — halt cleanproceed anyway— 繼續 chain + PATCH issue body audit trailcancel— clean exit + 「無 cleanup needed」訊息Trigger context
Sister concern surfaced from #45 first-real-use chain run (halted at Phase 2 entry because user observed #45 had no diagnosis comment + body had pseudocode-shell spec)。本 PR 把那次失敗 reproduction 的 lesson learned 直接固化進 chain pre-flight。
Future #46 multi-root extension hook
Helper function
check_diagnosis_readiness(issue_numbers...)signature 設計保留 N-arg shape,#46 multi-root 落地時可直接 reuse 做 per-root readiness aggregation。Verification
6-AI cross-model verification PENDING (run /idd-verify #47)。
Checklist
~/.claude/plans/snug-tumbling-bentley.md)/idd-verify #47)/idd-close #47after mergeRelated
🤖 Generated by /idd-implement on PR path. Do NOT add 'Closes #47' — IDD discipline requires manual /idd-close after merge to enforce checklist gate + closing summary。