Skip to main content

SDD-Parallel — Deterministic Parallel AI Agent Orchestrator

CI PyPI version Python 3.11+ License: MIT Offline demo under 5 seconds
Works with Claude Code, Codex, Antigravity, Cursor, OpenCode, Kimi SDD kits: Spec Kit, BMAD, GSD, OpenSpec, Beads

🌐 Language: English | 简体中文 | Español | Português (BR) | 日本語 | 한국어 | Русский

Quick Demo · Why · How It Works · Your SDD Layout · Harnesses · Daily CLI · Deep-Dives

Run Multiple AI Coding Agents in Parallel — Up to 3x Faster, Zero Merge-Bombs.
sdd-parallel is the deterministic traffic controller, worktree isolator, and blast-radius guard between your Spec Kit / BMAD / GSD / OpenSpec / Beads backlog and the coding agents (Claude Code, Codex, Antigravity, or any worktree-capable CLI) that implement it.

https://github.com/user-attachments/assets/76b8c429-3146-43b9-9ba9-89de15f97b13

🎬 Full 1080p Explainer Video (03:49) · 🇷🇺 Смотреть на русском (RU, 03:55) · ⚡ Live Interactive Wave Inspector

Prefer to explore hands-on? Open the ⚡ Live Interactive Wave Inspector (zero-install browser demo) or read the 4-step annotated walkthrough below.


⚡ Why Does This Exist? (In Plain English)

Anatomy of a Merge-Bomb: sequential vs naive worktrees vs sdd-parallel

With a backlog of 10–15 specs or stories, you currently pick one of two bad options:

  1. One agent, sequentially — safe, but 6–8 hours of waiting.
  2. 3–4 agents in naive git worktree folders — fast, until merge time:
    • Type-1 collision (direct): two agents edit sprint-status.yaml, STATE.md, or cli.py → <<<<<<< on every merge.
    • Type-2 collision (semantic, silent): Agent A changes a signature in normalizer.py; Agent B, in another worktree, calls the old signature from api.py. Git merges cleanly with zero conflict markers — and main is broken.
    • Scope creep: a "helpful" agent rewrites the shared schema.py that was never in its task.

sdd-parallel resolves this before a single LLM token is spent: it scans your AST and call graph, groups provably safe tasks into parallel Waves, locks each agent inside a clean fixed slot (track-a, track-b, …), blocks out-of-scope writes at the hook and OS level, and merges each wave behind a quality-gate barrier.

What Happens ❌ Sequential (1 Agent) 💥 Naive Parallel (--worktree) ✅ With sdd-parallel
12-story sprint time ~6–8 h (one by one) ~2 h coding + ~2 h fixing broken merges ~2.5 h total (2x–3x speedup)
Hidden type / API collisions Avoided only by going slow Breaks main after merge (W_A ∩ I_B ≠ ∅) Prevented upfront (split into Wave 1 → Wave 2)
Shared CLI / router files One agent at a time Git conflict on every merge Parallel-safe (ADDITIVE_REGISTRY detection)
sprint-status.yaml / tasks.md / STATE.md Updated serially Constant <<<<<<< conflicts Auto-merged (monotonic 3-way merger)
Agent edits the wrong file Prompt says "please don't" Bypassed via bash / sed Blocked (PreToolUse hook + Terminal Guard + chmod a-w)
Worktree folder clutter None 15 leftover .worktrees/task-* folders Fixed reusable slots (track-a, track-b, track-c)

🚀 Try It in 5 Seconds (Zero API Keys, Annotated Walkthrough)

No API key, no LLM subscription, no clone. One command via uv (or pipx run sdd-parallel demo):

uvx sdd-parallel demo          # or test a specific kit: uvx sdd-parallel demo --kit spec-kit

The demo scaffolds a throwaway repo with 5 tasks and 6 Python modules, runs the real engine against it, and finishes in ~4 seconds. Below is the --kit spec-kit run, split into its 4 stages.

[Step 1/4] AST & Role Classification

┌────────────────────────────────────────────────────────────────────┐
│ ⚠️  HIDDEN LINK FOUND: api.py (T004) imports normalizer.py (T002)   │
│    Standard worktrees run them in parallel and crash on merge.     │
│    SDD-Parallel AST scanner catches semantic imports upfront.      │
└────────────────────────────────────────────────────────────────────┘

[Step 1/4] AST & Architectural Role Classification
File Path                              | Detected Role      | Importers
----------------------------------------------------------------------
src/demo_app/api.py                    | standard           | -
src/demo_app/cli.py                    | additive_registry  | -
src/demo_app/exporter.py               | standard           | -
src/demo_app/normalizer.py             | standard           | src/demo_app/api.py
src/demo_app/schema.py                 | spine              | -

----------------------------------------------------------------------
[Step 1/4 ●○○○] Next: sdd-parallel plan ...

No configuration, no hardcoded paths: the scanner marks schema.py as the spine (everything depends on it → serialize), cli.py as an additive_registry (append-only command registration → safe to share), and records that api.py imports normalizer.py.

[Step 2/4] Catching the Hidden Type-2 Merge-Bomb

┌────────────────────────────────────────────────────────────────────┐
│ ❌ Standard Worktrees: T002 + T004 in parallel -> CRASH ON MERGE   │
│ ✅ SDD-Parallel Plan : Split into Wave 1 -> Wave 2                 │
│    Hidden import resolved sequentially, cli.py merged safely!      │
└────────────────────────────────────────────────────────────────────┘

[Step 2/4] Type-2 Semantic Collision Detection & BSP Wave Schedule
Collision Analysis:
  - Hidden Link Found: api.py (T004) imports normalizer.py (T002)
  - Additive Registry: T002 and T003 extend cli.py (Wave 1 Safe)
Wave Schedule:
  * Wave 1: [track-a: T002] [track-b: T003] (parallel independent)
  * Wave 2: [track-a: T001] [track-b: T004] (runs after Wave 1 normalizer)
  * Wave 3: [track-a: T005] (schema migration barrier)

----------------------------------------------------------------------
[Step 2/4 ●●○○] Next: sdd-parallel prepare --wave 1 ...

Both T002 and T004 carry a hand-written [P] tag in tasks.md, and their write sets are disjoint (normalizer.py ≠ api.py), so a file-locking scheduler would run them together. BSPWaveScheduler sees that T002's writes land inside T004's impact set and moves T004 to Wave 2, where it builds on the already-merged normalizer.py. Meanwhile T002 and T003 both write cli.py and still run in parallel, because it is an additive registry.

[Step 3/4] Clean Fixed Slots & Scope Guard Interception

┌────────────────────────────────────────────────────────────────────┐
│ 🔒 Fixed-slot worktrees (.worktrees/track-a, track-b)              │
│    PreToolUse Scope Guard prevents rogue writes across slots       │
│    track-a attempt to edit schema.py -> DENY (Spine-Lock)!         │
└────────────────────────────────────────────────────────────────────┘

[Step 3/4] Fixed-Slot Worktree Provisioning & PreToolUse Scope Guard
----------------------------------------------------------------------
Provisioned Fixed Slots (100% Clean git status: True):
  - track-a (.worktrees/track-a)
  - track-b (.worktrees/track-b)
PreToolUse Scope Guard Check (track-a -> 'src/demo_app/schema.py'):
  - Decision : DENY
  - Reason   : Locked by Spine Chain invariant.

----------------------------------------------------------------------
[Step 3/4 ●●●○] Next: sdd-parallel merge --wave 1 ...

Injected boundary files (ACTIVE_TRACK.md, .parallel-lock.json, .tmp/track-context.md) are masked via the worktree's info/exclude, so git status --porcelain stays empty. When the track-a agent reaches for schema.py, the write is denied before it touches disk.

[Step 4/4] Barrier Checkpoint & Zero-Conflict 3-Way Merge

┌────────────────────────────────────────────────────────────────────┐
│ ✨ Wave 1 merged with 0 conflict markers in tasks.md               │
│    Verified across all 5 SDD frameworks (BMAD, Spec Kit, GSD...)   │
│    Worktrees cleaned up. Ready for Wave 2 execution!               │
└────────────────────────────────────────────────────────────────────┘

[Step 4/4] Barrier Checkpoint & Monotonic 3-Way Merge
----------------------------------------------------------------------
Merged Branches: parallel/track-a, parallel/track-b
Resolved tasks.md (0 conflict markers):
  - [x] T002 [P] [US1] Normalize `src/demo_app/normalizer.py`, `src/demo_app/cli.py`
  - [x] T003 [P] [US1] Export `src/demo_app/exporter.py`, `src/demo_app/cli.py`
======================================================================
ALL 5 CORE INVARIANTS VERIFIED IN 0.38s (5/5 SDD KITS PASSED)
======================================================================

----------------------------------------------------------------------
[Step 4/4 ●●●●] Complete! Try: uvx sdd-parallel demo

Both branches edited the same tasks.md. The status merger resolves each line monotonically ([ ] < [x], backlog < … < done), so the result has no <<<<<<< markers. The same logic covers sprint-status.yaml, STATE.md, and .beads/*.jsonl.

🧪 Click to view the 5-kit verification matrix (uvx sdd-parallel demo --kit all) and the sandbox mode
============================================================================
5/5 SDD KITS VERIFIED (BMAD, SPEC KIT, GSD, OPENSPEC, BEADS)
============================================================================
Kit          | Merge-Bomb   | Worktrees    | Scope Guard  | 3-Way Merge
----------------------------------------------------------------------------
bmad         | PASSED       | PASSED       | PASSED       | PASSED
spec-kit     | PASSED       | PASSED       | PASSED       | PASSED
gsd          | PASSED       | PASSED       | PASSED       | PASSED
openspec     | PASSED       | PASSED       | PASSED       | PASSED
beads        | PASSED       | PASSED       | PASSED       | PASSED
============================================================================

Want to drive the workflow by hand? Scaffold a persistent sandbox and run the real commands inside it:

uvx sdd-parallel demo --kit gsd --scaffold-only --output-dir ./sdd-sandbox
cd sdd-sandbox
sdd-parallel plan
sdd-parallel prepare --wave 1

🗺️ How It Works & Daily 4-Command Workflow

sdd-parallel pipeline: plan, prepare, run agents, verify and merge

1. Install once (requires Python >= 3.11, Git >= 2.30):

uv tool install sdd-parallel     # or: pipx install sdd-parallel

Both sdd-parallel and the shorthand alias parallel-flow become available globally.

2. Run a wave in any SDD project:

# 1. Scan specs + codebase AST and build safe waves
sdd-parallel plan

# 2. Provision Wave 1 into fixed slots and print the launch command for each track
sdd-parallel prepare --wave 1
sdd-parallel run-guide --wave 1

# 3. Start your agents inside .worktrees/track-a, track-b, ... (one per slot)

# 4. Audit scope, run quality gates, and merge Wave 1 back into main
sdd-parallel verify-wave --wave 1
sdd-parallel merge --wave 1

Undo: sdd-parallel abort-wave --wave 1 (before merge) or sdd-parallel rollback-wave --wave 1 (after merge; LIFO order, automatic backup/wave-<K>-before-rollback-* branch, SDD status reset).

Visualize & Inspect: explore wave plans, blast-radius locks, and interactive SVG DAG graphs via sdd-parallel inspect --open (standalone zero-dependency UI at assets/inspector.html). Reproducible terminal screencasts are defined via assets/demo.tape (charmbracelet/vhs).

Two Orchestration Modes: Interactive Assisted vs. Autonomous Autopilot

sdd-parallel supports two complementary operational modes designed to match your workflow:

  • Mode A — Interactive Two-Stage Assisted (Wave Inspector + Fixed IDE Slots, shown in the video): Run sdd-parallel plan, open sdd-parallel inspect --open, inspect the conflict graph, and copy prepare --wave K / merge --wave K commands in one click via the CLI Action Bridge, supervising coding agents in fixed slots .worktrees/track-a, track-b.
  • Mode B — Multi-Window & Headless Cyclic Autopilot: The command sdd-parallel autopilot --wave 1 --harness {antigravity,claude-code,codex} [--execute] [--policy {single-shot,cyclic}] [--max-review-rounds N] [--routing-file FILE] automatically spawns parallel slots with model effort routing (low/medium/high) and an optional cyclic review loop implement -> verify -> review -> fix (BoundedCyclicReviewPolicy).

🌐 Interactive Wave Inspector Guide (sdd-parallel inspect --open)

Run sdd-parallel inspect --open (or open the Live Web Inspector) to launch the zero-dependency browser cockpit visualizing the entire concurrency architecture:

  • Top Summary Bar & 4-Step Pipeline Strip: Instant metrics banner (Waves, Tracks, Tasks, Conflicts Caught, Spine Locks) and visual execution lifecycle (1 plan ➔ 2 prepare --wave K ➔ 3 execute tracks ➔ 4 merge --wave K).
  • Tab 1 — 🌊 Waves & Tracks & CLI Action Bridge: Interactive cards for planned waves and parallel slots (track-a, track-b). Features strict color-coded file roles (green for exclusive write, cyan for ADDITIVE_REGISTRY with AST function isolation e.g. fn: register_..., purple for SPINE contracts), dependency blocking rules (e.g. T002 blocks T004), and one-click Copy buttons in the wave header (sdd-parallel prepare --wave K) and barrier footer (sdd-parallel merge --wave K).
  • Tab 2 — 📊 Conflict DAG & Task Specification Modal: Interactive directed acyclic graph organizing tasks into wave columns. Clicking any task node opens the Task Spec Modal with full blast-radius specifications (Exclusive Write Scope, Additive Shared Files & AST Function Scopes, Protected Spine Locks, and Related Conflict Constraints).
  • Tab 3 — ⚡ Conflict Matrix: Exhaustive audit table of all intercepted collisions—both direct write collisions ($W_A \cap W_B \neq \emptyset$) and semantic import hazards ($W_A \cap I_B \neq \emptyset$)—explaining why conflicting tasks were separated into distinct waves.
  • Tab 4 — 🔒 Architectural Roles: Consolidated codebase classification mapping repository modules to SPINE (strict schema/contract serialization) or ADDITIVE_REGISTRY (safe parallel append for routers/CLI).

📂 See Your Exact SDD Project Layout (Before & After)

What sdd-parallel creates inside your repository: .parallel/ state and .worktrees/ track slots

sdd-parallel reads your framework files as they are — no migration, no new spec format.

SDD Framework Read-Only Artifacts (locked in slots) Task Discovery Status Synchronization
GitHub Spec Kit (.specify/) constitution.md, feature.json, spec.md, plan.md specs/*/tasks.md (T001 [P]) 3-way Markdown checkbox merge
BMAD Method (v6.3+ / v7) epic-*-context.md (Zero Cache Invalidation) sprint-status.yaml, epics.md, spec-*.md Monotonic 3-way YAML merge
GSD (.planning/) PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md phases/*/NN-NN-PLAN.md Artifact Hijack (STATE.md updated centrally on merge)
OpenSpec (openspec/) openspec/specs/**, project.md, config.yaml, sibling change folders openspec/changes/<slug>/tasks.md 3-way Markdown checkbox merge
Beads (.beads/) .beads/config.yaml .beads/*.jsonl (bd-101 + blocks edges) Line-wise 3-way semi-lattice JSONL merge

Every snapshot below is taken from the real sdd-parallel demo --scaffold-only fixtures after plan + prepare --wave 1. Source trees are collapsed to src/… for readability.

🌱 GitHub Spec Kit (.specify/ & specs/*/tasks.md) — Click to inspect Before & After tree

Before — your project as-is:

my-project/
├── .specify/
│   ├── memory/
│   │   └── constitution.md
│   ├── templates/
│   │   └── tasks-template.md
│   └── feature.json
├── specs/
│   └── 001-telemetry/
│       ├── plan.md
│       ├── spec.md
│       └── tasks.md
└── src/…

specs/001-telemetry/tasks.md — note the hand-written [P] on T004, which is unsafe next to T002:

- [ ] T001 [US1] Upgrade schema in `src/demo_app/schema.py` (depends on T002)
- [ ] T002 [P] [US1] Normalize `src/demo_app/normalizer.py`, `src/demo_app/cli.py`
- [ ] T003 [P] [US1] Export `src/demo_app/exporter.py`, `src/demo_app/cli.py`
- [ ] T004 [P] [US2] Expose ingestion in `src/demo_app/api.py`
- [ ] T005 [US2] Add audit log in `src/demo_app/schema.py` (depends on T001)

After sdd-parallel plan + prepare --wave 1:

my-project/
├── .parallel/                        # planner state (new)
│   ├── artifacts/
│   │   ├── execution-plan-parallel.md
│   │   └── wave-plan.json
│   ├── history/run-001-<timestamp>/wave-plan.json
│   └── state.json
├── .specify/…                        # untouched
├── .worktrees/
│   ├── track-a/                      # Wave 1 → T002
│   │   ├── .specify/memory/constitution.md   # 🔒 read-only
│   │   ├── specs/001-telemetry/
│   │   │   ├── plan.md               # 🔒 read-only
│   │   │   ├── spec.md               # 🔒 read-only
│   │   │   └── tasks.md
│   │   ├── src/…
│   │   ├── .tmp/track-context.md     # 👻 hidden via info/exclude
│   │   ├── .parallel-lock.json       # 👻 hidden via info/exclude
│   │   └── ACTIVE_TRACK.md           # 👻 → /speckit.implement T002
│   └── track-b/                      # Wave 1 → T003 (same layout)
├── specs/…                           # untouched
└── src/…
📐 BMAD Method (v6.3+ / v7 — _bmad-output/) — Click to inspect Before & After tree

Before:

my-project/
├── _bmad-output/
│   ├── implementation-artifacts/
│   │   ├── epic-1-context.md
│   │   ├── epic-2-context.md
│   │   ├── epics.md
│   │   ├── spec-1-1-upgrade-schema-v2.md
│   │   ├── spec-1-2-normalize-telemetry-payload.md
│   │   ├── spec-1-3-cli-batch-export.md
│   │   ├── spec-2-1-expose-ingestion-api.md
│   │   ├── spec-2-2-add-audit-log-schema.md
│   │   └── sprint-status.yaml
│   └── planning-artifacts/
│       ├── epic-1-context.md
│       ├── epic-2-context.md
│       ├── epics.md
│       └── project-context.md
└── src/…

After sdd-parallel plan + prepare --wave 1:

my-project/
├── .parallel/
│   ├── history/run-001-<timestamp>/wave-plan.json
│   └── state.json
├── .worktrees/
│   ├── track-a/                      # Wave 1 → story 1-2
│   │   ├── _bmad/custom/             # 👻 per-slot BMAD overlay (hidden)
│   │   │   ├── bmad-build.toml
│   │   │   ├── bmad-build.user.toml
│   │   │   ├── bmad-build-auto.toml
│   │   │   └── bmad-build-auto.user.toml
│   │   ├── _bmad-output/
│   │   │   ├── implementation-artifacts/   # sprint-status.yaml merged 3-way
│   │   │   └── planning-artifacts/
│   │   │       ├── epic-1-context.md # 🔒 Zero Cache Invalidation lock
│   │   │       ├── epic-2-context.md # 🔒
│   │   │       └── project-context.md
│   │   ├── src/…
│   │   ├── .tmp/track-context.md     # 👻
│   │   ├── .parallel-lock.json       # 👻
│   │   └── ACTIVE_TRACK.md           # 👻 → /bmad-build 1-2
│   └── track-b/                      # Wave 1 → story 1-3
├── _bmad-output/
│   ├── implementation-artifacts/…
│   ├── parallel-artifacts/           # planner output (BMAD keeps it under _bmad-output)
│   │   ├── execution-plan-parallel.md
│   │   └── wave-plan.json
│   └── planning-artifacts/…
└── src/…
⚡ GSD — Get Shit Done (.planning/phases/ Artifact Hijack) — Click to inspect Before & After tree

Before:

my-project/
├── .planning/
│   ├── phases/
│   │   ├── 01-core/
│   │   │   ├── 01-01-PLAN.md
│   │   │   ├── 01-02-PLAN.md
│   │   │   └── 01-03-PLAN.md
│   │   └── 02-api/
│   │       ├── 02-01-PLAN.md
│   │       └── 02-02-PLAN.md
│   ├── PROJECT.md
│   ├── REQUIREMENTS.md
│   ├── ROADMAP.md
│   └── STATE.md
└── src/…

01-02-PLAN.md (normalizer) and 02-01-PLAN.md (API) live in different phases and share no files, yet 02-01 calls into 01-02's code. The planner schedules them into different waves.

After sdd-parallel plan + prepare --wave 1:

my-project/
├── .parallel/
│   ├── artifacts/
│   │   ├── execution-plan-parallel.md
│   │   └── wave-plan.json
│   ├── history/run-001-<timestamp>/wave-plan.json
│   └── state.json
├── .planning/…                       # untouched in main
├── .worktrees/
│   ├── track-a/                      # Wave 1 → 01-02
│   │   ├── .planning/
│   │   │   ├── phases/01-core/ · 02-api/
│   │   │   ├── PROJECT.md            # 🔒 read-only
│   │   │   ├── REQUIREMENTS.md       # 🔒 read-only
│   │   │   ├── ROADMAP.md            # 🔒 read-only
│   │   │   └── STATE.md              # 🔒 locked in slots, updated centrally on merge
│   │   ├── src/…
│   │   ├── .tmp/track-context.md     # 👻
│   │   ├── .parallel-lock.json       # 👻
│   │   └── ACTIVE_TRACK.md           # 👻 → /gsd-execute-phase 01-02
│   └── track-b/                      # Wave 1 → 01-03
└── src/…
📑 OpenSpec (openspec/changes/) — Click to inspect Before & After tree

Before:

my-project/
├── openspec/
│   ├── changes/
│   │   ├── audit-log-schema/
│   │   ├── cli-batch-export/
│   │   ├── ingestion-api-endpoint/
│   │   ├── normalize-telemetry/
│   │   │   ├── design.md
│   │   │   ├── proposal.md
│   │   │   └── tasks.md
│   │   └── upgrade-schema-v2/
│   ├── specs/
│   │   └── telemetry/
│   │       └── spec.md
│   ├── config.yaml
│   └── project.md
└── src/…

After sdd-parallel plan + prepare --wave 1:

my-project/
├── .parallel/
│   ├── artifacts/
│   │   ├── execution-plan-parallel.md
│   │   └── wave-plan.json
│   ├── history/run-001-<timestamp>/wave-plan.json
│   └── state.json
├── .worktrees/
│   ├── track-a/                      # Wave 1 → normalize-telemetry
│   │   ├── openspec/
│   │   │   ├── changes/
│   │   │   │   ├── normalize-telemetry/   # ✍️ this track's change folder
│   │   │   │   ├── cli-batch-export/      # 🔒 locked by sibling track-b
│   │   │   │   └── …
│   │   │   ├── specs/                # 🔒 canonical specs (changed only via openspec archive)
│   │   │   ├── config.yaml           # 🔒
│   │   │   └── project.md            # 🔒
│   │   ├── src/…
│   │   ├── .tmp/track-context.md     # 👻
│   │   ├── .parallel-lock.json       # 👻
│   │   └── ACTIVE_TRACK.md           # 👻 → /opsx:apply normalize-telemetry
│   └── track-b/                      # Wave 1 → cli-batch-export (mirror locks)
├── openspec/…                        # untouched
└── src/…
🔗 Beads (.beads/beads.jsonl) — Click to inspect Before & After tree

Before:

my-project/
├── .beads/
│   ├── beads.jsonl
│   ├── config.yaml
│   └── issues.jsonl
└── src/…

The graph tasks bd-101, bd-102, bd-103, bd-201, bd-202, with blocks edges between them:

{"id": "bd-101", "title": "Upgrade schema to v2", "status": "open", "files": ["src/demo_app/schema.py"], "dependencies": [{"target": "bd-102", "type": "blocks"}], "priority": 1, "epic": "epic-1"}
{"id": "bd-102", "title": "Normalize telemetry payload", "status": "open", "files": ["src/demo_app/normalizer.py", "src/demo_app/cli.py"], "dependencies": [], "priority": 2, "epic": "epic-1"}

After sdd-parallel plan + prepare --wave 1:

my-project/
├── .beads/…                          # main copy, merged line-wise on `merge --wave 1`
├── .parallel/
│   ├── artifacts/
│   │   ├── execution-plan-parallel.md
│   │   └── wave-plan.json
│   ├── history/run-001-<timestamp>/wave-plan.json
│   └── state.json
├── .worktrees/
│   ├── track-a/                      # Wave 1 → bd-102
│   │   ├── .beads/
│   │   │   ├── beads.jsonl           # status edits merged 3-way per line (open < closed)
│   │   │   ├── config.yaml           # 🔒 read-only
│   │   │   └── issues.jsonl
│   │   ├── src/…
│   │   ├── .tmp/track-context.md     # 👻
│   │   ├── .parallel-lock.json       # 👻
│   │   └── ACTIVE_TRACK.md           # 👻 → bd update bd-102 --status in-progress
│   └── track-b/                      # Wave 1 → bd-103
└── src/…

After merge --wave 1, bd-102 and bd-103 are both closed in .beads/beads.jsonl, with 0 conflict markers.

Legend: 🔒 read-only (chmod a-w + PreToolUse deny) · 👻 injected, hidden from Git via .git/worktrees/<slot>/info/exclude · ✍️ writable scope of the track.


🔌 Fits Right Into Your Existing Stack (Zero Lock-In)

You keep your agent and your prompts. After sdd-parallel prepare --wave 1, sdd-parallel run-guide --wave 1 prints the exact native command for each slot, and the same line is written to .worktrees/track-<id>/ACTIVE_TRACK.md. You don't type any context paths by hand:

SDD Kit Native command printed per track
GitHub Spec Kit /speckit.implement T002
BMAD Method /bmad-build 1-2
GSD /gsd-execute-phase 01-02
OpenSpec /opsx:apply normalize-telemetry
Beads bd update bd-102 --status in-progress

📦 GitHub Spec Kit Official Extension (extension.yml & commands/): Install sdd-parallel directly as a first-class Spec Kit extension:

# Direct Zero-Wait installation (v0.2.1):
specify extension add --from https://github.com/stopActingSoSmall/sdd-parallel/archive/refs/tags/v0.2.1.zip

# Or via Community Catalog:
specify extension add sdd-parallel

Native Spec Kit slash commands:

  • /specify plan-waves — deterministic parallel wave planning from specs/*/tasks.md
  • /specify prepare-wave --wave 1 — provisions isolated track-a/b/c worktrees and scope locks
  • /specify merge-wave --wave 1 — barrier gates, monotonic 3-way checkbox merge, and slot teardown
Harness How it plugs in
Claude Code (claude) Open claude inside .worktrees/track-a; out-of-scope writes are blocked by native permissions.blockWritesOutsideWorkingDirectories: true plus PreToolUse hook and OS chmod a-w. Or spawn all tracks with sdd-parallel autopilot --wave 1 --harness claude-code (fixed slots track-a/b/c, explicit --model).
OpenAI Codex CLI (codex) codex --cd .worktrees/track-b; read-only files are protected by chmod a-w, and sdd-parallel verify-wave audits the diff before merge. Autopilot: --harness codex.
Google Antigravity sdd-parallel prepare --wave 1 --antigravity-layout places slots under ~/.gemini/antigravity/worktrees/<Project>/track-a; ACTIVE_TRACK.md sits at the slot root; sdd-parallel install-plugin installs the portable plugin with the scope-guard hook.
Any worktree-capable CLI or IDE — Cursor, Windsurf, OpenCode, Kimi CLI, MiniMax Code, Aider, Cline, Trae Works without extra setup: standard git worktree slots (track-a, track-b, track-c, … via --max-tracks N), OS-level chmod a-w locks, ACTIVE_TRACK.md, and post-hoc diff verification with sdd-parallel verify-wave.

🔍 Architecture, Mathematical Model & Dossier Deep-Dives

🏛️ Click to expand: Internal Engine Architecture & 9 Core Invariants

Internal Component Flow

flowchart TD
    subgraph Inputs["1. Multi-SDD Roadmap Adapters"]
        BMAD["BMAD Method (v6/v7)"]
        SpecKit["GitHub Spec Kit (.specify/)"]
        GSD["GSD Artifact Hijack (.planning/)"]
        OpenSpec["OpenSpec (openspec/changes/)"]
        Beads["Beads (.beads/*.jsonl)"]
    end

    subgraph Engine["2. Hybrid DAG & Blast-Radius Engine"]
        AST["Universal AST Classifier\n(SPINE, ADDITIVE_REGISTRY, STANDARD)"]
        CRG["CRGSidecarAdapter\n(code-review-graph v2.3.9 WAL)"]
        BSP["Deterministic BSPWaveScheduler\n(K-Track Waves, Kahn Acyclicity)"]
    end

    subgraph Actuation["3. Actuation & Scope Guard"]
        Slots["Fixed Track Slots (track-a/b/c)\n(In-Place Reset, core.fileMode false)"]
        Guard["Three-Tier Scope Guard\n(PreToolUse + Terminal Guard + chmod a-w)"]
        Verify["verify-wave Gate\n(git diff merge-base...HEAD audit)"]
    end

    subgraph Barrier["4. Barrier Checkpoint & Rollback"]
        Merge["merge-wave Checkpoint\n(3-Way Monotonic Status Merger)"]
        Rollback["LIFO Rollback Engine\n(abort-wave / rollback-wave --save-backup)"]
    end

    Inputs --> AST & CRG
    AST & CRG --> BSP
    BSP --> Slots
    Slots --> Guard --> Verify
    Verify --> Merge
    Merge -. Error / Revert .-> Rollback

The 9 Core Engineering Invariants

  1. Zero Worktree Pollution: injected boundaries (.tmp/track-context.md, .parallel-lock.json, ACTIVE_TRACK.md) are masked via git info/exclude; git status --porcelain stays empty.
  2. Zero Cache Invalidation: pre-compiled context files (e.g. BMAD epic-*-context.md) are read-only during a wave; planner state goes to .parallel/ (or _bmad-output/parallel-artifacts/ for BMAD).
  3. 100% Task Coverage & Acyclicity: Kahn topological verification guarantees zero lost tasks and zero dependency cycles.
  4. Blast-Radius Enforcement (Type-1 & Type-2): disjoint writes ($W_A \cap W_B = \emptyset$) plus disjoint semantic impact ($W_A \cap I_B = \emptyset$).
  5. Universal Anti-Overfitting: no domain-specific paths in the core engine; SPINE, ADDITIVE_REGISTRY, and STANDARD are derived from AST heuristics and graph centrality only.
  6. Fixed Track Slots: slots track-a, track-b, track-c are reused in place via git checkout -B + git clean -fd, with no folder clutter.
  7. Three-Tier Defense-in-Depth Guard: PreToolUse hook + terminal command interception (Bash, run_command) + OS chmod a-w.
  8. Monotonic Status Semi-Lattice: statuses resolve as $\texttt{backlog}(0) < \dots < \texttt{done}(4)$ with no merge markers.
  9. LIFO Transactional Rollbacks: merged waves revert strictly in reverse order with automatic safety branches (backup/wave-<K>-before-rollback-*).

🛠️ Full CLI Reference

Click to expand: all 15 subcommands & flags
Command Purpose
sdd-parallel demo [--kit {bmad,spec-kit,gsd,openspec,beads,all}] [--keep-temp] [--scaffold-only] [--output-dir DIR] Run the offline Merge-Bomb demo or scaffold an interactive sandbox for any of the 5 SDD kits.
sdd-parallel plan [--repo REPO] [--max-tracks N] [--kit KIT] [--include-done] [--dry-run] [--plan-source {auto,plan,specs}] [--output-dir DIR] [--routing-file FILE] Analyze roadmap + code graph; write execution-plan-parallel.md and wave-plan.json.
sdd-parallel prepare --wave K [--repo REPO] [--max-tracks N] [--kit KIT] [--headless] [--antigravity-layout] [--dynamic-worktrees] [--dry-run] [--routing-file FILE] Provision slots (track-a, track-b, …), apply OS locks, inject boundaries.
sdd-parallel claim-track --wave K --track <id> --worktree <path> [--repo REPO] [--max-tracks N] [--kit KIT] [--headless] Attach boundary locks to an existing external worktree.
sdd-parallel run-guide --wave K [--repo REPO] [--max-tracks N] [--kit KIT] [--antigravity-layout] [--routing-file FILE] Print the operator run-guide with the native launch command for each track.
sdd-parallel verify-wave --wave K [--repo REPO] [--max-tracks N] [--kit KIT] [--dynamic-worktrees] Audit slots against .parallel-lock.json, multi-commit diff against merge-base, and save manifest.
sdd-parallel merge --wave K [--repo REPO] [--max-tracks N] [--kit KIT] [--dynamic-worktrees] [--skip-gates] [--strict-gates] [--cleanup] [--dry-run] Barrier merge: 3-way status merge, git merge, quality gates, transactional auto-rollback, and manifest.
sdd-parallel abort-wave --wave K [--repo REPO] [--dynamic-worktrees] Abort an unmerged wave: reset slots, remove temporary parallel branches.
sdd-parallel rollback-wave --wave K [--repo REPO] [--dynamic-worktrees] [--to-commit COMMIT] [--save-backup] [--no-backup] [--kit KIT] Revert a merged wave (LIFO) with a safety backup branch and SDD status reset.
sdd-parallel merge-status --base B --ours O --theirs T --out OUT Low-level deterministic 3-way merge for sprint-status.yaml.
sdd-parallel check-lock --file PATH [--tool TOOL] Check a write against the active worktree lock manifest.
sdd-parallel install-plugin [--target-dir DIR] Package and install the portable Antigravity plugin.
sdd-parallel autopilot --wave K [--repo REPO] [--max-tracks N] [--kit KIT] [--harness {antigravity,claude-code,codex}] [--antigravity-layout] [--execute] [--policy {single-shot,cyclic}] [--max-review-rounds N] [--routing-file FILE] Generate or execute multi-window autopilot launch commands with model effort routing and optional bounded cyclic review loop (BoundedCyclicReviewPolicy).
sdd-parallel bench [--repo REPO] [--since REV] [--until REV] [--demo] [--max-tracks N] [--kit KIT] [--format {text,json}] [--output-file FILE] Retrospective backtest on commit history or demo repo evaluating Merge-Bomb collision metrics (TP/FP/FN/TN, Precision, Recall, F1).
sdd-parallel inspect [--repo REPO] [--plan PATH] [--output PATH] [--open] [--kit KIT] Generate and view standalone offline HTML Wave Inspector visualizing wave tracks, slot boundaries, and interactive SVG DAG conflict graphs.

🚢 Release Matrix: Shipped (v0.1.0) vs Roadmap (v0.2+)

✅ Shipped in v0.1.0

  • Deterministic Bulk-Synchronous Parallel (BSP) wave scheduler with Kahn acyclicity check.
  • AST hotspot scanner + code-review-graph v2.3.9 sidecar integration.
  • Fixed track slots (track-a, track-b, track-c) with in-place reset and info/exclude masking.
  • Three-tier scope guard (PreToolUse + Terminal Guard + OS chmod a-w).
  • Monotonic 3-way status merger for YAML, Markdown checklists, STATE.md, and JSONL.
  • LIFO transactional wave rollback with automatic safety branches.
  • 5 SDD adapters: Spec Kit, BMAD, GSD (Artifact Hijack), OpenSpec, Beads, each with a native per-track worker command.
  • Offline Merge-Bomb demo (sdd-parallel demo --kit all) and sandbox scaffolding (--scaffold-only).
  • Multi-window autopilot for Antigravity, Claude Code, and Codex.
  • Clean-clone CI on Ubuntu / macOS / Windows, Python 3.11–3.13; PyPI Trusted Publishing.

🚧 Planned for v0.2.0+

  • Community adapters: mattpocock/skills (/implement-spec) and bmad-loop frontmatter status adapter.
  • Zero-pollution environment sync: .venv / node_modules symlinks into fixed slots.
  • Pre-wave static symbol linker & scope escalation: automatic write-set expansion via AST symbols with dynamic rescheduling.
  • Execution manifest & Cognitive Router contract: deterministic .parallel/run-manifest.json, AST structural signals (TaskStructuralSignals), and --routing-file contract for external System-1 routers and AgentLens (ADR-0009).
  • Official Depth-0 wave runner (agy CLI / SDK): parallel headless track execution with TrackExecutionPolicy (BoundedCyclicReviewPolicy, --policy cyclic).

🤝 Contributing, Local Development & Security

git clone https://github.com/stopActingSoSmall/sdd-parallel.git
cd sdd-parallel
uv sync

uv run pytest                          # unit + integration suite
uv run mypy --strict src/sdd_parallel  # strict typing
uv run ruff check src/ tests/ scripts/ # lint
uv run sdd-parallel demo --kit all     # offline 5-kit demo

💼 Commercial Audits & Enterprise Monorepo Support

Scaling autonomous AI coding agents across engineering teams with large codebases requires deterministic blast-radius isolation. We offer fixed-scope asynchronous B2B audits (Parallel SDD Readiness & Blast-Radius Audit, $500–$2,500):

  • Commit History Retrospective: sdd-parallel bench backtest detecting historical Merge-Bomb hotspots and blast-radius bottlenecks.
  • Custom Repository Configuration: Tailored .parallel-config.json defining exact contract_globs, spine schema serialization, port isolation, and CI/CD quality gate barriers.
  • Interactive Multi-Agent Roadmap: Pre-computed wave-plan.json and standalone HTML inspector report detailing velocity gains and agent slot allocations.

To discuss architecture or schedule an audit, open a topic in GitHub Discussions or reach out to the maintainers.

Metadata

Release files for sdd-parallel 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sdd-parallel 0.2.1
File Size Uploaded Provenance Actions
sdd_parallel-0.2.1.tar.gz 206.3 kB With provenance Details for sdd_parallel-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sdd-parallel 0.2.1
File Interpreter ABI Platform Actions
sdd_parallel-0.2.1-py3-none-any.whl Python 3 none any Details for sdd_parallel-0.2.1-py3-none-any.whl

Total release size: 355.6 kB

Release files / sdd_parallel-0.2.1.tar.gz

Download URL sdd_parallel-0.2.1.tar.gz
Size 206.3 kB
Tags Source
SHA-256 checksum
How to use checksums
db972526a3cc9b3a8dfeb89443e206817dda5972c93ed855dbe24144a19fd35e
BLAKE2b-256 checksum
How to use checksums
023eb8b897e15e8ed5ec2e95735f5405eec8f5c81038c213772760ba5e5aed7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / sdd_parallel-0.2.1-py3-none-any.whl

Download URL sdd_parallel-0.2.1-py3-none-any.whl
Size 149.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed24fa996d0ddbe4457721f5a6ae3563da8e02a6a0ac04ea0e8b09c243b2252b
BLAKE2b-256 checksum
How to use checksums
df11504be790e53c0f40255344819c516ff59b224980d1e605b31584e7c462b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for sdd-parallel 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sdd_parallel-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page