orchestr8 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,105 @@
1
+ # Feature Specification — Parallel Logging
2
+
3
+ ## 1. Feature Intent
4
+
5
+ Write each pipeline's output to a dedicated log file instead of interleaving on console. When multiple pipelines run simultaneously, their output becomes unreadable. Logging to files keeps the console clean while preserving full output for debugging.
6
+
7
+ **Problem:** With 3 pipelines running in parallel, console output is an unreadable mess of interleaved messages from different agents.
8
+
9
+ **Solution:** Write each pipeline's stdout/stderr to a log file; show only summary status on console.
10
+
11
+ ---
12
+
13
+ ## 2. Scope
14
+
15
+ ### In Scope
16
+ - Log file per pipeline: `.claude/worktrees/feat-{slug}/pipeline.log`
17
+ - Summary status on console (started, completed, failed)
18
+ - `--verbose` flag to also stream to console
19
+ - Timestamps on log entries
20
+
21
+ ### Out of Scope
22
+ - Log rotation
23
+ - Log compression
24
+ - Remote log shipping
25
+
26
+ ---
27
+
28
+ ## 3. Behaviour Overview
29
+
30
+ ### Default (Quiet Console)
31
+
32
+ ```
33
+ $ orchestr8 parallel feat-a feat-b feat-c
34
+
35
+ Starting parallel pipelines...
36
+
37
+ [10:30:01] feat-a: Started (log: .claude/worktrees/feat-feat-a/pipeline.log)
38
+ [10:30:02] feat-b: Started (log: .claude/worktrees/feat-feat-b/pipeline.log)
39
+ [10:30:03] feat-c: Started (log: .claude/worktrees/feat-feat-c/pipeline.log)
40
+ [10:35:15] feat-b: Completed ✓
41
+ [10:36:22] feat-a: Completed ✓
42
+ [10:38:45] feat-c: Failed ✗ (see log for details)
43
+
44
+ Summary: 2 completed, 1 failed
45
+ ```
46
+
47
+ ### Verbose Mode
48
+
49
+ ```
50
+ $ orchestr8 parallel feat-a --verbose
51
+
52
+ Starting parallel pipelines...
53
+
54
+ [10:30:01] feat-a: Started
55
+ --- feat-a output ---
56
+ You are Alex, the System Specification Agent...
57
+ [Alex output streams here]
58
+ ...
59
+ --- end feat-a output ---
60
+
61
+ [10:35:15] feat-a: Completed ✓
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 4. Log File Format
67
+
68
+ Location: `.claude/worktrees/feat-{slug}/pipeline.log`
69
+
70
+ ```
71
+ [2026-02-25T10:30:01.123Z] Pipeline started for feat-a
72
+ [2026-02-25T10:30:01.456Z] [stdout] You are Alex, the System Specification Agent...
73
+ [2026-02-25T10:30:02.789Z] [stdout] Reading feature spec...
74
+ [2026-02-25T10:35:15.000Z] [stderr] Warning: some warning
75
+ [2026-02-25T10:35:15.100Z] Pipeline completed with exit code 0
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 5. Implementation Notes
81
+
82
+ - Change `stdio: 'inherit'` to `stdio: 'pipe'`
83
+ - Create write stream to log file
84
+ - Prefix each line with timestamp and stream type
85
+ - On `--verbose`, also pipe to `process.stdout`
86
+ - Console shows only status updates (not full output)
87
+
88
+ ---
89
+
90
+ ## 6. Test Themes
91
+
92
+ - Log file created in worktree directory
93
+ - Log contains timestamped output
94
+ - Console shows only status by default
95
+ - `--verbose` streams output to console
96
+ - Log preserved on failure for debugging
97
+ - Multiple pipelines don't interleave in logs
98
+
99
+ ---
100
+
101
+ ## 7. Change Log
102
+
103
+ | Date | Change | Reason |
104
+ |------|--------|--------|
105
+ | 2026-02-25 | Initial spec | Parallel safeguards |
@@ -0,0 +1,141 @@
1
+ # Feature Specification — Parallel Pre-flight Validation
2
+
3
+ ## 1. Feature Intent
4
+
5
+ Validate that a batch of features is safe to run in parallel before execution begins. This prevents wasted resources from features that would fail due to conflicts, missing specs, or dependencies.
6
+
7
+ **Problem:** Users can queue features for parallel execution without knowing if they'll conflict. Discovering issues mid-execution wastes time and creates cleanup work.
8
+
9
+ **Solution:** Pre-flight validation that checks feature readiness, detects conflicts, and estimates scope before any worktrees are created.
10
+
11
+ ---
12
+
13
+ ## 2. Scope
14
+
15
+ ### In Scope
16
+ - Check feature specs exist and are complete
17
+ - Detect dependencies between features in batch
18
+ - Detect file overlap from implementation plans
19
+ - Estimate scope and warn about timeout risk
20
+ - Integrate with existing dry-run flow
21
+
22
+ ### Out of Scope
23
+ - Automatic dependency resolution
24
+ - Automatic batching suggestions
25
+ - Cross-repo validation
26
+
27
+ ---
28
+
29
+ ## 3. Behaviour Overview
30
+
31
+ ### Pre-flight Check Output
32
+
33
+ ```
34
+ $ orchestr8 parallel feat-a feat-b feat-c --dry-run
35
+
36
+ Pre-flight Validation
37
+ =====================
38
+
39
+ ✓ feat-a: Spec complete, plan exists
40
+ ✓ feat-b: Spec complete, plan exists
41
+ ✗ feat-c: Missing FEATURE_SPEC.md
42
+
43
+ Conflict Analysis
44
+ =================
45
+
46
+ ⚠ File overlap detected:
47
+ • src/utils.js: feat-a, feat-b both modify
48
+ • bin/cli.js: feat-a, feat-c both modify
49
+
50
+ Recommendation: Run feat-a alone, then feat-b + feat-c
51
+
52
+ Scope Estimation
53
+ ================
54
+
55
+ Feature | Stories | Tests | Est. Time
56
+ ----------|---------|-------|----------
57
+ feat-a | 3 | 12 | ~15 min
58
+ feat-b | 2 | 8 | ~10 min
59
+ feat-c | 1 | 4 | ~5 min
60
+
61
+ Total estimated: ~30 min (parallel: ~15 min)
62
+
63
+ Proceed? [y/N]
64
+ ```
65
+
66
+ ### Validation Failures Block Execution
67
+
68
+ ```
69
+ $ orchestr8 parallel feat-a feat-b
70
+
71
+ Pre-flight Validation
72
+ =====================
73
+
74
+ ✗ feat-a: Missing FEATURE_SPEC.md
75
+ ✗ feat-b: Missing user stories
76
+
77
+ Cannot proceed. Run these commands first:
78
+ /implement-feature feat-a --pause-after=alex
79
+ /implement-feature feat-b --pause-after=cass
80
+ ```
81
+
82
+ ### Override with --skip-preflight
83
+
84
+ ```
85
+ $ orchestr8 parallel feat-a feat-b --skip-preflight
86
+
87
+ ⚠ Skipping pre-flight validation (not recommended)
88
+
89
+ Starting parallel pipelines...
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 4. Implementation Notes
95
+
96
+ ### Validation Checks
97
+
98
+ 1. **Spec Completeness**
99
+ - FEATURE_SPEC.md exists and has required sections
100
+ - At least one story-*.md file exists
101
+ - Test file exists (optional - may be created by pipeline)
102
+
103
+ 2. **Dependency Detection**
104
+ - Parse feature specs for "depends_on" or similar markers
105
+ - Scan for references to other feature slugs
106
+ - Warn if features reference each other
107
+
108
+ 3. **File Overlap Detection**
109
+ - Parse IMPLEMENTATION_PLAN.md for "Files to Create/Modify" section
110
+ - Extract file paths from each feature's plan
111
+ - Flag any files that appear in multiple features
112
+
113
+ 4. **Scope Estimation**
114
+ - Count stories and acceptance criteria
115
+ - Count existing tests
116
+ - Use history averages to estimate duration
117
+
118
+ ### Integration Points
119
+
120
+ - Called from `runParallel()` before worktree creation
121
+ - Results displayed in dry-run output
122
+ - Blocking by default, override with `--skip-preflight`
123
+
124
+ ---
125
+
126
+ ## 5. Test Themes
127
+
128
+ - Detects missing feature specs
129
+ - Detects missing stories
130
+ - Detects file overlap from plans
131
+ - Allows override with flag
132
+ - Integrates with dry-run
133
+ - Scope estimation uses history
134
+
135
+ ---
136
+
137
+ ## 6. Change Log
138
+
139
+ | Date | Change | Reason |
140
+ |------|--------|--------|
141
+ | 2026-02-25 | Initial spec | Upfront validation for parallel safety |
package/README.md CHANGED
@@ -55,6 +55,17 @@ This updates `.blueprint/agents/`, `.blueprint/templates/`, `.blueprint/ways_of_
55
55
  | `npx orchestr8 insights --bottlenecks` | View bottleneck analysis |
56
56
  | `npx orchestr8 insights --failures` | View failure pattern analysis |
57
57
 
58
+ ### Parallel Execution
59
+
60
+ | Command | Description |
61
+ |---------|-------------|
62
+ | `npx orchestr8 parallel <slugs...>` | Run multiple features in parallel |
63
+ | `npx orchestr8 parallel <slugs...> --dry-run` | Preview execution plan |
64
+ | `npx orchestr8 parallel status` | Show status of running pipelines |
65
+ | `npx orchestr8 parallel cleanup` | Remove completed worktrees |
66
+ | `npx orchestr8 parallel-config` | View parallel configuration |
67
+ | `npx orchestr8 parallel-config set <key> <value>` | Modify parallel settings |
68
+
58
69
  ### Configuration
59
70
 
60
71
  | Command | Description |
@@ -64,6 +75,8 @@ This updates `.blueprint/agents/`, `.blueprint/templates/`, `.blueprint/ways_of_
64
75
  | `npx orchestr8 retry-config reset` | Reset to defaults |
65
76
  | `npx orchestr8 feedback-config` | View feedback thresholds |
66
77
  | `npx orchestr8 feedback-config set <key> <value>` | Modify feedback settings |
78
+ | `npx orchestr8 parallel-config` | View parallel pipeline configuration |
79
+ | `npx orchestr8 parallel-config set <key> <value>` | Modify parallel settings |
67
80
 
68
81
  ## Usage
69
82
 
@@ -183,6 +196,7 @@ orchestr8 includes these built-in modules for observability and self-improvement
183
196
  | **handoff** | Structured summaries between agents for token efficiency |
184
197
  | **business-context** | Lazy loading of business context based on feature needs |
185
198
  | **tools** | Tool schemas and validation for Claude native features |
199
+ | **parallel** | Parallel pipeline execution using git worktrees |
186
200
 
187
201
  ### How They Work Together
188
202
 
@@ -239,9 +253,13 @@ your-project/
239
253
  ├── .claude/
240
254
  │ ├── commands/
241
255
  │ │ └── implement-feature.md # The /implement-feature skill
256
+ │ ├── worktrees/ # Git worktrees for parallel execution
257
+ │ │ └── feat-{slug}/ # Isolated worktree per feature
242
258
  │ ├── pipeline-history.json # Execution history (gitignored)
243
259
  │ ├── retry-config.json # Retry configuration (gitignored)
244
260
  │ ├── feedback-config.json # Feedback thresholds (gitignored)
261
+ │ ├── parallel-config.json # Parallel execution config (gitignored)
262
+ │ ├── parallel-queue.json # Parallel pipeline state (gitignored)
245
263
  │ └── implement-queue.json # Pipeline queue state (gitignored)
246
264
  └── test/
247
265
  ├── artifacts/ # Test specs per feature
@@ -308,6 +326,206 @@ Version 2.7 introduces several optimizations to reduce token usage:
308
326
 
309
327
  **Total estimated savings: 10,000+ tokens per pipeline run** (more for technical features)
310
328
 
329
+ ## Parallel Execution with Git Worktrees
330
+
331
+ Run multiple feature pipelines simultaneously using git worktrees for isolation. Each feature gets its own worktree and branch, allowing true parallel development without conflicts.
332
+
333
+ ### How It Works
334
+
335
+ ```
336
+ orchestr8 parallel user-auth dashboard notifications
337
+
338
+
339
+ ┌───────────────────────────────────────┐
340
+ │ Pre-flight Validation │
341
+ │ • Git repository check │
342
+ │ • Clean working tree required │
343
+ │ • Git 2.5+ for worktree support │
344
+ │ • Feature specs exist & complete │
345
+ │ • File overlap detection │
346
+ │ • Dependency detection │
347
+ │ • Scope estimation │
348
+ └───────────────────────────────────────┘
349
+
350
+
351
+ ┌───────────────────────────────────────┐
352
+ │ Create Isolated Worktrees │
353
+ │ │
354
+ │ .claude/worktrees/feat-user-auth/ │
355
+ │ └─ branch: feature/user-auth │
356
+ │ │
357
+ │ .claude/worktrees/feat-dashboard/ │
358
+ │ └─ branch: feature/dashboard │
359
+ │ │
360
+ │ .claude/worktrees/feat-notifications/│
361
+ │ └─ branch: feature/notifications│
362
+ └───────────────────────────────────────┘
363
+
364
+
365
+ ┌───────────────────────────────────────┐
366
+ │ Spawn Parallel Pipelines │
367
+ │ (max 3 concurrent by default) │
368
+ │ │
369
+ │ Each runs: Alex → Nigel → Codey │
370
+ │ in its isolated worktree │
371
+ └───────────────────────────────────────┘
372
+
373
+
374
+ ┌───────────────────────────────────────┐
375
+ │ Merge on Completion │
376
+ │ • First finished = first merged │
377
+ │ • Conflicts preserved for resolution │
378
+ │ • Successful worktrees cleaned up │
379
+ └───────────────────────────────────────┘
380
+ ```
381
+
382
+ ### Usage
383
+
384
+ ```bash
385
+ # Run 3 features in parallel (default concurrency)
386
+ npx orchestr8 parallel user-auth dashboard notifications
387
+
388
+ # Preview what would happen without executing
389
+ npx orchestr8 parallel user-auth dashboard --dry-run
390
+
391
+ # Limit concurrent pipelines
392
+ npx orchestr8 parallel feat-a feat-b feat-c feat-d --max-concurrency=2
393
+
394
+ # Check status of running pipelines
395
+ npx orchestr8 parallel status
396
+
397
+ # Skip pre-flight feature validation
398
+ npx orchestr8 parallel user-auth dashboard --skip-preflight
399
+
400
+ # Clean up completed/aborted worktrees
401
+ npx orchestr8 parallel cleanup
402
+ ```
403
+
404
+ ### Pre-flight Batch Validation (v2.8)
405
+
406
+ Before parallel execution, the system validates the batch to prevent wasted resources:
407
+
408
+ ```
409
+ $ npx orchestr8 parallel feat-a feat-b feat-c --dry-run
410
+
411
+ Pre-flight Validation
412
+ =====================
413
+
414
+ ✓ feat-a: Spec complete, 3 stories, Plan exists
415
+ ✓ feat-b: Spec complete, 2 stories
416
+ ✗ feat-c: Not ready
417
+ ✗ Missing FEATURE_SPEC.md
418
+
419
+ Conflict Analysis
420
+ =================
421
+
422
+ ⚠ File overlap detected:
423
+ • src/utils.js: feat-a, feat-b both modify
424
+
425
+ Scope Estimation
426
+ ================
427
+
428
+ Feature | Stories | Files | Est. Time
429
+ ----------|---------|-------|----------
430
+ feat-a | 3 | 4 | ~27 min
431
+ feat-b | 2 | 2 | ~24 min
432
+ feat-c | 0 | 0 | ~10 min
433
+
434
+ Total estimated: ~61 min (parallel: ~27 min)
435
+ ```
436
+
437
+ **Validation checks:**
438
+ - Feature specs exist and have required sections
439
+ - User stories present (warns if missing)
440
+ - Implementation plans scanned for file overlap
441
+ - Dependencies between features detected
442
+ - Scope estimated from story/file counts
443
+
444
+ **On validation failure:**
445
+ ```
446
+ Cannot proceed. Fix issues above or use --skip-preflight to override.
447
+
448
+ Suggested commands:
449
+ /implement-feature "feat-c" --pause-after=alex
450
+ ```
451
+
452
+ ### Configuration
453
+
454
+ The parallel module is **CLI-agnostic** — configure it to work with different AI coding tools:
455
+
456
+ ```bash
457
+ # View current configuration
458
+ npx orchestr8 parallel-config
459
+
460
+ # Output:
461
+ # cli: npx claude
462
+ # skill: /implement-feature
463
+ # skillFlags: --no-commit
464
+ # worktreeDir: .claude/worktrees
465
+ # maxConcurrency: 3
466
+ # queueFile: .claude/parallel-queue.json
467
+ ```
468
+
469
+ #### Configuration Options
470
+
471
+ | Option | Default | Description |
472
+ |--------|---------|-------------|
473
+ | `cli` | `npx claude` | The CLI tool to invoke |
474
+ | `skill` | `/implement-feature` | The command/skill to run |
475
+ | `skillFlags` | `--no-commit` | Additional flags for the skill |
476
+ | `worktreeDir` | `.claude/worktrees` | Where to create worktrees |
477
+ | `maxConcurrency` | `3` | Maximum parallel pipelines |
478
+ | `maxFeatures` | `10` | Maximum features per batch |
479
+ | `timeout` | `30` | Timeout per pipeline (minutes) |
480
+ | `minDiskSpaceMB` | `500` | Minimum disk space warning threshold |
481
+ | `queueFile` | `.claude/parallel-queue.json` | State persistence file |
482
+
483
+ #### Examples for Different CLIs
484
+
485
+ ```bash
486
+ # Claude Code (default)
487
+ npx orchestr8 parallel-config set cli "npx claude"
488
+ npx orchestr8 parallel-config set skill "/implement-feature"
489
+
490
+ # Cursor
491
+ npx orchestr8 parallel-config set cli "cursor"
492
+ npx orchestr8 parallel-config set skill "composer"
493
+ npx orchestr8 parallel-config set skillFlags ""
494
+
495
+ # Aider
496
+ npx orchestr8 parallel-config set cli "aider"
497
+ npx orchestr8 parallel-config set skill "--message"
498
+ npx orchestr8 parallel-config set skillFlags "implement feature:"
499
+
500
+ # Custom agent script
501
+ npx orchestr8 parallel-config set cli "./my-agent.sh"
502
+ npx orchestr8 parallel-config set skill "run"
503
+
504
+ # Reset to defaults
505
+ npx orchestr8 parallel-config reset
506
+ ```
507
+
508
+ ### State Management
509
+
510
+ Each feature progresses through these states:
511
+
512
+ ```
513
+ parallel_queued → worktree_created → parallel_running → merge_pending → parallel_complete
514
+ │ │
515
+ ▼ ▼
516
+ parallel_failed merge_conflict
517
+ ```
518
+
519
+ - **Successful features**: Merged to main, worktree cleaned up
520
+ - **Failed pipelines**: Worktree preserved for debugging
521
+ - **Merge conflicts**: Branch preserved, manual resolution required
522
+
523
+ ### Requirements
524
+
525
+ - **Git 2.5+** (worktree support)
526
+ - **Clean working tree** (no uncommitted changes)
527
+ - **Sufficient disk space** (each worktree is a full checkout)
528
+
311
529
  ## License
312
530
 
313
531
  MIT
package/bin/cli.js CHANGED
@@ -13,6 +13,22 @@ const {
13
13
  resetConfig: resetFeedbackConfig
14
14
  } = require('../src/feedback');
15
15
  const { displayFeedbackInsights } = require('../src/insights');
16
+ const {
17
+ formatStatus,
18
+ getDefaultConfig,
19
+ splitByLimit,
20
+ runParallel,
21
+ loadQueue,
22
+ cleanupWorktrees,
23
+ readParallelConfig,
24
+ writeParallelConfig,
25
+ getDefaultParallelConfig,
26
+ abortParallel,
27
+ getLockInfo,
28
+ getDetailedStatus,
29
+ formatDetailedStatus,
30
+ rollbackParallel
31
+ } = require('../src/parallel');
16
32
 
17
33
  const args = process.argv.slice(2);
18
34
  const command = args[0];
@@ -129,6 +145,134 @@ const commands = {
129
145
  },
130
146
  description: 'Manage feedback loop configuration'
131
147
  },
148
+ 'parallel-config': {
149
+ fn: () => {
150
+ if (subArg === 'set') {
151
+ const key = args[2];
152
+ const value = args[3];
153
+ if (!key || !value) {
154
+ console.error('Usage: parallel-config set <key> <value>');
155
+ console.error('Valid keys: cli, skill, skillFlags, worktreeDir, maxConcurrency, queueFile');
156
+ process.exit(1);
157
+ }
158
+ const config = readParallelConfig();
159
+ if (key === 'maxConcurrency') {
160
+ config[key] = parseInt(value, 10);
161
+ } else {
162
+ config[key] = value;
163
+ }
164
+ writeParallelConfig(config);
165
+ console.log(`Set ${key} = ${value}`);
166
+ } else if (subArg === 'reset') {
167
+ writeParallelConfig(getDefaultParallelConfig());
168
+ console.log('Parallel configuration reset to defaults.');
169
+ } else {
170
+ const config = readParallelConfig();
171
+ console.log('Parallel Configuration\n');
172
+ console.log(` cli: ${config.cli}`);
173
+ console.log(` skill: ${config.skill}`);
174
+ console.log(` skillFlags: ${config.skillFlags}`);
175
+ console.log(` worktreeDir: ${config.worktreeDir}`);
176
+ console.log(` maxConcurrency: ${config.maxConcurrency}`);
177
+ console.log(` maxFeatures: ${config.maxFeatures}`);
178
+ console.log(` timeout: ${config.timeout} min`);
179
+ console.log(` minDiskSpaceMB: ${config.minDiskSpaceMB}`);
180
+ console.log(` queueFile: ${config.queueFile}`);
181
+ console.log('\nTo change: orchestr8 parallel-config set <key> <value>');
182
+ }
183
+ },
184
+ description: 'View or modify parallel pipeline configuration'
185
+ },
186
+ parallel: {
187
+ fn: async () => {
188
+ if (subArg === 'status') {
189
+ const detailed = args.includes('--detailed') || args.includes('-d');
190
+ const lock = getLockInfo();
191
+
192
+ if (detailed) {
193
+ const details = getDetailedStatus();
194
+ console.log(formatDetailedStatus(details));
195
+ } else {
196
+ const queue = loadQueue();
197
+
198
+ if (!queue.features || queue.features.length === 0) {
199
+ if (lock) {
200
+ console.log(`Parallel execution in progress (PID: ${lock.pid})`);
201
+ console.log(`Started: ${lock.startedAt}`);
202
+ console.log(`Features: ${lock.features.join(', ')}`);
203
+ } else {
204
+ console.log('No parallel pipelines active.');
205
+ }
206
+ return;
207
+ }
208
+
209
+ console.log('Parallel Pipeline Status\n');
210
+ console.log(formatStatus(queue.features));
211
+ const summary = {
212
+ running: queue.features.filter(f => f.status === 'parallel_running').length,
213
+ pending: queue.features.filter(f => f.status === 'parallel_queued').length,
214
+ completed: queue.features.filter(f => f.status === 'parallel_complete').length,
215
+ failed: queue.features.filter(f => f.status === 'parallel_failed').length,
216
+ conflicts: queue.features.filter(f => f.status === 'merge_conflict').length
217
+ };
218
+ console.log(`\nRunning: ${summary.running} | Pending: ${summary.pending} | Completed: ${summary.completed} | Failed: ${summary.failed} | Conflicts: ${summary.conflicts}`);
219
+
220
+ // Show log paths for running/failed
221
+ const withLogs = queue.features.filter(f =>
222
+ f.logPath && (f.status === 'parallel_running' || f.status === 'parallel_failed')
223
+ );
224
+ if (withLogs.length > 0) {
225
+ console.log('\nLog files:');
226
+ withLogs.forEach(f => console.log(` ${f.slug}: ${f.logPath}`));
227
+ }
228
+
229
+ console.log('\nTip: Use --detailed for progress bars');
230
+ }
231
+ } else if (subArg === 'rollback') {
232
+ const dryRunFlag = args.includes('--dry-run');
233
+ const forceFlag = args.includes('--force');
234
+ await rollbackParallel({ dryRun: dryRunFlag, force: forceFlag });
235
+ } else if (subArg === 'cleanup') {
236
+ const cleaned = await cleanupWorktrees();
237
+ console.log(`Cleaned ${cleaned} worktree(s).`);
238
+ } else if (subArg === 'abort') {
239
+ const cleanupFlag = args.includes('--cleanup');
240
+ await abortParallel({ cleanup: cleanupFlag });
241
+ } else {
242
+ const slugs = args.slice(1).filter(a => !a.startsWith('--') && !a.startsWith('-'));
243
+ if (slugs.length === 0) {
244
+ console.error('Usage: orchestr8 parallel <slug1> <slug2> ... [options]');
245
+ console.error('\nOptions:');
246
+ console.error(' --dry-run Preview execution plan without running');
247
+ console.error(' --yes, -y Skip confirmation prompt');
248
+ console.error(' --force Override existing lock');
249
+ console.error(' --verbose Stream output to console (not just logs)');
250
+ console.error(' --skip-preflight Skip feature validation checks');
251
+ console.error(' --max-concurrency=N Set max parallel pipelines (default: 3)');
252
+ console.error('\nSubcommands:');
253
+ console.error(' parallel status Show status of all pipelines');
254
+ console.error(' parallel abort Stop all running pipelines');
255
+ console.error(' parallel cleanup Remove completed/aborted worktrees');
256
+ process.exit(1);
257
+ }
258
+
259
+ const maxFlag = args.find(a => a.startsWith('--max-concurrency='));
260
+ const options = {
261
+ dryRun: args.includes('--dry-run'),
262
+ yes: args.includes('--yes') || args.includes('-y'),
263
+ force: args.includes('--force'),
264
+ verbose: args.includes('--verbose'),
265
+ skipPreflight: args.includes('--skip-preflight')
266
+ };
267
+ if (maxFlag) {
268
+ options.maxConcurrency = parseInt(maxFlag.split('=')[1], 10);
269
+ }
270
+ const result = await runParallel(slugs, options);
271
+ process.exit(result.success ? 0 : 1);
272
+ }
273
+ },
274
+ description: 'Run multiple feature pipelines in parallel using git worktrees'
275
+ },
132
276
  help: {
133
277
  fn: showHelp,
134
278
  description: 'Show this help message'
@@ -163,6 +307,21 @@ Commands:
163
307
  feedback-config View current feedback loop configuration
164
308
  feedback-config set <key> <value> Modify a config value (minRatingThreshold, enabled)
165
309
  feedback-config reset Reset feedback configuration to defaults
310
+ parallel <slugs...> Run multiple feature pipelines in parallel
311
+ parallel <slugs...> --dry-run Show execution plan without running
312
+ parallel <slugs...> --yes Skip confirmation prompt
313
+ parallel <slugs...> --verbose Stream output to console
314
+ parallel <slugs...> --skip-preflight Skip feature validation checks
315
+ parallel status Show status of all parallel pipelines
316
+ parallel status --detailed Show progress bars and stage info
317
+ parallel abort Stop all running pipelines
318
+ parallel abort --cleanup Stop all and remove worktrees
319
+ parallel rollback Undo completed merges and cleanup failures
320
+ parallel rollback --dry-run Preview what would be rolled back
321
+ parallel cleanup Remove completed/aborted worktrees
322
+ parallel-config View parallel pipeline configuration
323
+ parallel-config set <key> <value> Modify config (cli, skill, skillFlags, etc.)
324
+ parallel-config reset Reset parallel configuration to defaults
166
325
  help Show this help message
167
326
 
168
327
  Examples:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestr8",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Multi-agent workflow framework for automated feature development",
5
5
  "main": "src/index.js",
6
6
  "bin": {