docs: update changelog, architecture, CLI tools, config, features, and user guide for parallel execution fixes
Documentation updates for #1116 fixes and code review findings: - CHANGELOG.md: Add --no-verify commit flag, post-wave hook validation, STATE.md file locking, duplicate function removal, cross-platform init - docs/ARCHITECTURE.md: Add 'Parallel Commit Safety' section explaining --no-verify strategy and STATE.md lockfile mechanism - docs/CLI-TOOLS.md: Document --no-verify flag on commit command with usage guidance - docs/CONFIGURATION.md: Add note about pre-commit hooks and parallel execution behavior under parallelization settings - docs/FEATURES.md: Add --no-verify to executor capabilities, add 'Parallel Safety' section - docs/USER-GUIDE.md: Add troubleshooting entries for parallel execution build lock errors and Windows EPERM crashes, update recovery table
This commit is contained in:
@@ -247,6 +247,14 @@ Each executor gets:
|
||||
- Project context (PROJECT.md, STATE.md)
|
||||
- Phase context (CONTEXT.md, RESEARCH.md if available)
|
||||
|
||||
#### Parallel Commit Safety
|
||||
|
||||
When multiple executors run within the same wave, two mechanisms prevent conflicts:
|
||||
|
||||
1. **`--no-verify` commits** — Parallel agents skip pre-commit hooks (which can cause build lock contention, e.g., cargo lock fights in Rust projects). The orchestrator runs `git hook run pre-commit` once after each wave completes.
|
||||
|
||||
2. **STATE.md file locking** — All `writeStateMd()` calls use lockfile-based mutual exclusion (`STATE.md.lock` with `O_EXCL` atomic creation). This prevents the read-modify-write race condition where two agents read STATE.md, modify different fields, and the last writer overwrites the other's changes. Includes stale lock detection (10s timeout) and spin-wait with jitter.
|
||||
|
||||
---
|
||||
|
||||
## Data Flow
|
||||
|
||||
@@ -331,7 +331,10 @@ node gsd-tools.cjs progress [json|table|bar]
|
||||
node gsd-tools.cjs todo complete <filename>
|
||||
|
||||
# Git commit with config checks
|
||||
node gsd-tools.cjs commit <message> [--files f1 f2] [--amend]
|
||||
node gsd-tools.cjs commit <message> [--files f1 f2] [--amend] [--no-verify]
|
||||
```
|
||||
|
||||
> **`--no-verify`**: Skips pre-commit hooks. Used by parallel executor agents during wave-based execution to avoid build lock contention (e.g., cargo lock fights in Rust projects). The orchestrator runs hooks once after each wave completes. Do not use `--no-verify` during sequential execution — let hooks run normally.
|
||||
|
||||
# Web search (requires Brave API key)
|
||||
node gsd-tools.cjs websearch <query> [--limit N] [--freshness day|week|month]
|
||||
|
||||
@@ -133,6 +133,8 @@ To keep planning artifacts out of git:
|
||||
| `parallelization.max_concurrent_agents` | number | `3` | Maximum simultaneous agents |
|
||||
| `parallelization.min_plans_for_parallel` | number | `2` | Minimum plans to trigger parallel execution |
|
||||
|
||||
> **Pre-commit hooks and parallel execution**: When parallelization is enabled, executor agents commit with `--no-verify` to avoid build lock contention (e.g., cargo lock fights in Rust projects). The orchestrator validates hooks once after each wave completes. STATE.md writes are protected by file-level locking to prevent concurrent write corruption. If you need hooks to run per-commit, set `parallelization.enabled: false`.
|
||||
|
||||
---
|
||||
|
||||
## Git Branching
|
||||
|
||||
@@ -245,9 +245,14 @@
|
||||
- Reads PLAN.md with full task instructions
|
||||
- Has access to PROJECT.md, STATE.md, CONTEXT.md, RESEARCH.md
|
||||
- Commits each task atomically with structured commit messages
|
||||
- Uses `--no-verify` on commits during parallel execution to avoid build lock contention
|
||||
- Handles checkpoint types: `auto`, `checkpoint:human-verify`, `checkpoint:decision`, `checkpoint:human-action`
|
||||
- Reports deviations from plan in SUMMARY.md
|
||||
|
||||
**Parallel Safety:**
|
||||
- **Pre-commit hooks**: Skipped by parallel agents (`--no-verify`), run once by orchestrator after each wave
|
||||
- **STATE.md locking**: File-level lockfile prevents concurrent write corruption across agents
|
||||
|
||||
---
|
||||
|
||||
### 6. Work Verification
|
||||
|
||||
@@ -564,6 +564,21 @@ Since v1.17, the installer backs up locally modified files to `gsd-local-patches
|
||||
|
||||
A known workaround exists for a Claude Code classification bug. GSD's orchestrators (execute-phase, quick) spot-check actual output before reporting failure. If you see a failure message but commits were made, check `git log` -- the work may have succeeded.
|
||||
|
||||
### Parallel Execution Causes Build Lock Errors
|
||||
|
||||
If you see pre-commit hook failures, cargo lock contention, or 30+ minute execution times during parallel wave execution, this is caused by multiple agents triggering build tools simultaneously. GSD handles this automatically since v1.26 — parallel agents use `--no-verify` on commits and the orchestrator runs hooks once after each wave. If you're on an older version, add this to your project's `CLAUDE.md`:
|
||||
|
||||
```markdown
|
||||
## Git Commit Rules for Agents
|
||||
All subagent/executor commits MUST use `--no-verify`.
|
||||
```
|
||||
|
||||
To disable parallel execution entirely: `/gsd:settings` → set `parallelization.enabled` to `false`.
|
||||
|
||||
### Windows: Installation Crashes on Protected Directories
|
||||
|
||||
If the installer crashes with `EPERM: operation not permitted, scandir` on Windows, this is caused by OS-protected directories (e.g., Chromium browser profiles). Fixed since v1.24 — update to the latest version. As a workaround, temporarily rename the problematic directory before running the installer.
|
||||
|
||||
---
|
||||
|
||||
## Recovery Quick Reference
|
||||
@@ -581,6 +596,7 @@ A known workaround exists for a Claude Code classification bug. GSD's orchestrat
|
||||
| Update broke local changes | `/gsd:reapply-patches` |
|
||||
| Want session summary for stakeholder | `/gsd:session-report` |
|
||||
| Don't know what step is next | `/gsd:next` |
|
||||
| Parallel execution build errors | Update GSD or set `parallelization.enabled: false` |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user