Worker spawning (parallel-orchestrator.ts): - spawnWorker() creates child processes via spawn() with GSD_MILESTONE_LOCK env var for state isolation - GSD_PARALLEL_WORKER env var prevents nested parallel sessions - Workers run `gsd --print "/gsd auto"` in their worktree cwd - Exit handler updates worker state on completion/crash - Graceful error handling for spawn failures (ENOENT, etc.) - SIGTERM sent on stopParallel for immediate process termination Worktree creation: - createMilestoneWorktree() creates git worktrees using milestone/<MID> branch naming without chdir (coordinator stays put) - Reuses existing milestone branches to preserve prior work - Runs post-create hooks for user scripts (.env copy, etc.) GSD_MILESTONE_LOCK in state.ts: - deriveState() filters to only the locked milestone - getActiveMilestoneId() short-circuits when lock is set - Complete worker isolation — each process sees one milestone Signal consumption in auto.ts: - handleAgentEnd() checks for coordinator signals between units - Responds to "stop" and "pause" signals immediately /gsd parallel merge command: - Merge specific or all completed milestones back to main 976/976 full test suite passing, zero regressions. |
||
|---|---|---|
| .. | ||
| agents | ||
| extensions | ||
| skills | ||
| GSD-WORKFLOW.md | ||