feat(idd-all-chain): multi-root + DFS/BFS traversal + per-root halt (#46)#82
Open
kiki830621 wants to merge 6 commits into
Open
feat(idd-all-chain): multi-root + DFS/BFS traversal + per-root halt (#46)#82kiki830621 wants to merge 6 commits into
kiki830621 wants to merge 6 commits into
Conversation
Add Spectra change directory: - proposal.md (Why / What Changes / 10 BREAKING & feature items) - design.md (7 Decisions D1-D7 + Implementation Contract + Risks) - specs/idd-all-chain/spec.md (3 MODIFIED + 1 ADDED forest tree) - specs/idd-spawn-manifest/spec.md (3 MODIFIED — schema v2 hard-break) - tasks.md (15 tasks across 7 groups + Design decisions coverage map) Analyzer: 0 Critical / 0 Warning / 1 Suggestion Validation: passed Refs #46
manifest-append.sh: - bump EXPECTED_SCHEMA_VERSION from 1 to 2 - accept 9th positional arg `root_id` (integer > 0, must be in root_issues array) - emit root_id in spawn entry JSON - migration hint on v1 manifest detection spawn-manifest.md: - top-level: `root_issue: <int>` → `root_issues: [<int>, ...]` + `traversal: "dfs"|"bfs"` - spawn entry: add `root_id: <int>` (required) - example switches to multi-root sample (roots [28, 44], DFS) - chain context detection: schema_version=2 instead of 1 Unit tests pass: - 8 args → exit 2 (usage) - 9 args + v2 fixture manifest → exit 0, root_id written - v1 manifest under v2 helper → exit 1 (schema mismatch) - root_id not in root_issues → exit 2 (validation) Covers tasks 1.1, 1.2 (D1: Schema v2 hard-break) Refs #46
…Refs #46) Phase 0: - accept ≥1 root issue + optional --bfs flag - branch naming: N=1 backward compat 'idd/chain-<N>-<slug>', N>1 'idd/chain-multi-<hash8>-<root1-slug>' with hash16 collision fallback - check-diagnosis-readiness.sh now called variadic across all roots - AskUserQuestion aggregates not-ready roots in one prompt - proceed-anyway PATCH iterates per not-ready root Phase 1: - QUEUE seeded with sorted roots - per-root DEPTH_MAP and ROOT_ID_MAP for subtree tracking - FAIL_ROOTS associative array - caps bumped: CHAIN_MAX_DEPTH 2→3, CHAIN_MAX_ISSUES 5→10 Phase 2: - DFS = push-spawn-to-front, BFS = push-spawn-to-back - per-root depth cap (max-depth=3 per subtree) + global max-issues=10 - verify FAIL = halt that root's subtree (D4 Option C), purge same-root pending from QUEUE, continue other root subtrees, commits preserved - export IDD_CHAIN_CURRENT_ROOT_ID so sub-skills can propagate root_id to manifest Phase 3: - PR title dispatch: N=1 'chain: <title>', N>1 'chain (multi-root): N issues — <root#1 title>' - cluster overview table adds root_id column - Refs lists all roots first then chained spawns (dedup) Phase 4: - forest tree printout per root subtree with status icons ✓/✗/⊘ - per-root PASS/FAIL/SKIPPED summary block - filed-only-not-chained list Top-of-file caps + 鐵律 + Failure modes table updated for multi-root. Covers tasks 2.1, 3.1, 3.2, 3.3, 4.1, 4.2 (D2, D3, D4, D5, D6, D7) Refs #46
All four spawning sub-skills now pass the 9th positional arg `root_id` to scripts/manifest-append.sh per v2 schema: - idd-implement Step 5.7 (sister bug sweep) - idd-verify Phase 4 (follow-up findings triage) - idd-plan Step 2.5 (tangential observations) - idd-diagnose Step 3.6 (sister concern surfacing) root_id is derived from: 1. IDD_CHAIN_CURRENT_ROOT_ID env var (set by idd-all-chain Phase 2 before each /idd-all --in-chain invocation), or 2. Fallback to current issue's #NNN — covers single-root chain or root-self-spawn case When chain context is inactive (manifest file absent), helper exits 0 silently and behavior is identical to baseline (additive change). Covers tasks 5.1, 5.2, 5.3, 5.4 (D1: Schema v2 hard-break) Refs #46
…ion (Refs #46) Update reference doc for v2.60+ multi-root chain semantics: - Cluster branch naming: dispatch N=1 vs N>1 with hash8 + hash16 fallback - Chain state: add ROOT_ID_MAP, FAIL_ROOTS, FAILED_AT, TRAVERSAL fields - Caps: chain_max_depth 2→3 (per-root), chain_max_issues 5→10 (global) - NEW section 'Traversal mode (DFS vs BFS)' explaining push-front vs push-back with example queue order table - Loop algorithm: pseudo-code shows traversal dispatch, per-root halt logic (FAIL_ROOTS + same-root queue purge), root_id_map inheritance, env var IDD_CHAIN_CURRENT_ROOT_ID propagation to sub-skills - Failure mode table: per-root halt rows + manifest schema mismatch rows + missing-9th-arg row - PR title + body schema split for N=1 vs N>1; cluster overview table adds root_id column; details summary shows root_id Covers task 6.1 (D1, D2, D3, D4, D5, D6, D7 all referenced) Refs #46
…n track (Refs #46) Mark tasks 7.1 and 7.2 as [~] (skipped with reason) per IDD checklist convention (per plugins/issue-driven-dev/CLAUDE.md): - 7.1 Single-root + multi-root happy path smoke tests - 7.2 Multi-root edge cases smoke tests (verify FAIL, depth-cap, issues-cap) Reason: no test fixture repo for orchestration testing exists in this codebase (consistent with #52 idd-verify orchestration validation track — orchestration tests cannot mock GitHub API / git operations without significant fixture infrastructure investment). Acceptance criteria covered through: - Deterministic unit-test snippets in commit 49b2cc0 (branch naming for N=1/N=3 with hash8 reproducibility check) - 4 unit tests in commit ed9682d (manifest-append.sh arg-count + schema + root_id validation) - First real /idd-all-chain invocation after merge serves as acceptance for the orchestration algorithm (DFS push-front, per-root halt, caps) Refs #46
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 #46
Summary
/idd-all-chain從 single-root 擴展為 multi-root forest orchestrator,加入 DFS/BFS traversal mode 與 per-root verify FAIL halt 語意。Spawn manifest schema v1 → v2 hard-break(no v1 clients in the wild)。What changed (10 BREAKING + feature items per proposal)
/idd-all-chain #44 #45 #50接受 ≥2 個 root issue;N=1 行為 byte-equivalent backward compat--bfs(fairness)root_issue: int→root_issues: [int]、top-level 加traversal、每 spawn entry 加root_idchain_max_depth2 → 3(per-root),chain_max_issues5 → 10(global)idd/chain-<N>-<slug>(backward compat);N>1idd/chain-multi-<hash8>-<root1-slug>chain: <title>;N>1chain (multi-root): N issues — <root#1 title>root_idSpectra change directory
openspec/changes/multi-root-traversal-idd-all-chain/:proposal.md— Why / What Changes / Capabilities / Impactdesign.md— 7 Decisions (D1 schema v2 hard-break, D2 DFS=push-front, D3 caps, D4 per-root halt, D5 branch hash8, D6 PR title, D7 forest tree) + Implementation Contract + Risksspecs/idd-all-chain/spec.md— 3 MODIFIED + 1 ADDED Requirement(forest tree)specs/idd-spawn-manifest/spec.md— 3 MODIFIED Requirements(schema v2)tasks.md— 15 tasks across 7 groupsCluster overview
Task state
[x]complete[~]skipped-with-reason — smoke tests 7.1/7.2 deferred to first-real-use validation track (no orchestration test fixture repo exists; consistent with feature: idd-verify orchestration playbook (subagent_type guidance + recovery protocol) #52 idd-verify validation pattern)Acceptance coverage
idd-all-chain/SKILL.mdPhase 1/2 visible in diff for reviewidd/chain-99-...; N=3 with roots {44,45,50} yieldsidd/chain-multi-c3d62b8a-...(hash reproducible)/idd-all-chain #A #B #Cinvocation after merge serves as smoke for orchestration end-to-endVerify
The 6-AI ensemble can review the algorithm logic, schema contract, and IDD discipline (no auto-close trailers, IDD checklist conventions for
[~]+reason).Pending review
spectra validatepassed)/idd-close #46after merge — per IDD discipline; noCloses #46trailer (must run idd-close skill to enforce closing summary + checklist gate)🤖 Generated by /spectra-apply + /idd-implement on PR path. Do NOT add 'Closes #46' — IDD discipline requires manual
/idd-close #46after merge to enforce checklist gate + post Closing Summary comment.