@compozy/cli 0.2.10 → 0.2.11

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.
Files changed (2) hide show
  1. package/README.md +64 -19
  2. package/package.json +16 -16
package/README.md CHANGED
@@ -118,7 +118,7 @@ Task and review issue files use YAML frontmatter for parseable metadata such as
118
118
 
119
119
  - `compozy daemon start|status|stop` manages the home-scoped daemon lifecycle. `daemon start` is idempotent, and task/review/exec commands auto-start the daemon when needed.
120
120
  - `compozy workspaces list|show|register|unregister|resolve` exposes the daemon workspace registry. Workspaces are also lazily registered when you run daemon-backed commands inside them.
121
- - `compozy tasks run <slug>` is the canonical single-workflow runner. In interactive terminals it attaches to the TUI by default; in non-interactive environments it falls back to streaming. Use `--ui`, `--stream`, `--detach`, or `--attach` to override that behavior.
121
+ - `compozy tasks run <slug>` is the canonical single-workflow runner. In interactive terminals it attaches to the TUI by default; in non-interactive environments it falls back to streaming. Use `--ui`, `--stream`, `--detach`, or `--attach` to override that behavior. Add `--parallel-tasks` to opt into dependency-aware parallel execution for task files inside one workflow.
122
122
  - `compozy tasks run --multiple alpha,beta` starts one daemon-owned queue for several task workflows. Use `tasks run --multiple` when the same flags and runtime defaults should apply to an ordered batch; keep using `tasks run <slug>` for one workflow or scripts that expect one run ID per invocation. Add `--parallel` to run the batch concurrently — each child runs in its own isolated git worktree, bounded by `--parallel-limit` (default `2`).
123
123
  - Independent `compozy tasks run` invocations from different workspaces run concurrently on the shared home-scoped daemon. When another workspace already has an active run, the CLI prints a warning with the busy workspace and run ID before starting the new run.
124
124
  - `compozy runs attach <run-id>` restores the interactive TUI for an existing daemon-managed run, while `compozy runs watch <run-id>` streams textual observation from the same snapshot-plus-stream transport.
@@ -179,9 +179,27 @@ include_completed = false
179
179
  run_multiple_mode = "enqueued"
180
180
  run_multiple_parallel_limit = 2
181
181
 
182
+ [tasks.run.parallel]
183
+ enabled = false
184
+ max_concurrency = 4
185
+
186
+ [tasks.run.parallel.conflict_resolver]
187
+ ide = "codex"
188
+ model = "gpt-5.5"
189
+ reasoning_effort = "medium"
190
+ max_attempts = 1
191
+ validation_command = []
192
+
182
193
  [exec]
183
194
  output_format = "text"
184
195
 
196
+ [recovery]
197
+ enabled = false
198
+ ide = "codex"
199
+ model = "gpt-5.5"
200
+ reasoning_effort = "medium"
201
+ max_attempts = 1
202
+
185
203
  [fix_reviews]
186
204
  concurrent = 2
187
205
  batch_size = 3
@@ -198,8 +216,10 @@ Supported sections:
198
216
  - `[exec]` for `output_format` plus exec-specific runtime overrides such as `ide`, `model`, `reasoning_effort`, `access_mode`, `timeout`, `tail_lines`, `add_dirs`, `max_retries`, and `retry_backoff_multiplier`
199
217
  - `[tasks]` for the allowed task `type` list used by `cy-create-tasks` and `compozy tasks validate`
200
218
  - `[tasks.run]` for workflow-run defaults used by `compozy tasks run`, such as `include_completed`, `run_multiple_mode`, and `run_multiple_parallel_limit`
219
+ - `[tasks.run.parallel]` for dependency-aware parallel execution inside one PRD task workflow, including `enabled`, `max_concurrency`, and the conflict-resolver agent under `[tasks.run.parallel.conflict_resolver]`
201
220
  - `[fix_reviews]` for `concurrent`, `batch_size`, and `include_resolved`
202
221
  - `[fetch_reviews]` for `provider` and `nitpicks` (controls CodeRabbit review-body comments; default is enabled when unset)
222
+ - `[recovery]` for agentic recovery defaults used by run-producing commands: `enabled`, `ide`, `model`, `reasoning_effort`, and `max_attempts`
203
223
  - `[sound]` for optional run-completion audio presets or absolute file paths
204
224
 
205
225
  Notes:
@@ -211,9 +231,14 @@ Notes:
211
231
  - `[tasks.run] run_multiple_mode` controls `tasks run --multiple` scheduling. Valid values are `"enqueued"` and `"parallel"`; when unset, the built-in default is `"enqueued"`.
212
232
  - `run_multiple_mode = "parallel"` runs the batch concurrently, with each child in its own isolated git worktree. The CLI `--parallel` flag overrides this config value for a single invocation.
213
233
  - `[tasks.run] run_multiple_parallel_limit` caps how many children run at once in parallel mode. It must be a positive integer and defaults to `2`. The CLI `--parallel-limit <n>` flag overrides it for a single invocation. The limit has no effect in enqueued mode, which always runs one child at a time.
234
+ - `[tasks.run.parallel] enabled = true` runs pending task files in one workflow by dependency waves. The CLI `--parallel-tasks` flag overrides this config value for a single invocation.
235
+ - `[tasks.run.parallel] max_concurrency` caps concurrent task worktrees within a wave and defaults to `4`. The conflict resolver uses `ide`, `model`, `reasoning_effort`, and `max_attempts` for bounded merge-conflict resolution.
236
+ - `[tasks.run.parallel.conflict_resolver] validation_command` is optional and disabled by default. When set, it is an argv-style command such as `["go", "test", "./..."]`, runs without a shell after conflict markers and unmerged entries are gone, and must not modify the integration worktree. Omit it or set `[]` to rely only on universal git validation.
214
237
  - `max_retries` applies to execution-stage ACP failures and inactivity timeouts for `compozy exec`, `compozy tasks run`, and `compozy reviews fix`.
215
238
  - Built-in CLI defaults retry timed-out or transient ACP failures twice; set `max_retries = 0` or pass `--max-retries 0` to opt out.
216
239
  - `retry_backoff_multiplier` only increases the next attempt timeout; retries restart immediately and do not add a sleep delay.
240
+ - Recovery is disabled by default. When enabled, `max_attempts` is the number of remediation plus restart cycles and must be between `1` and `3`.
241
+ - Recovery config is resolved fresh for each invocation and is not persisted into run or exec metadata. Use `--recovery`, `--no-recovery`, `--recovery-ide`, `--recovery-model`, `--recovery-reasoning`, and `--recovery-max-attempts` to override `[recovery]` for one command.
217
242
 
218
243
  ## Reusable Agents
219
244
 
@@ -402,6 +427,7 @@ Generated task files use task schema v2 (`status`, `title`, `type`, `complexity`
402
427
 
403
428
  ```bash
404
429
  compozy tasks run user-auth --ide claude
430
+ compozy tasks run user-auth --parallel-tasks
405
431
  compozy tasks run --multiple user-auth,cleanup --ide claude
406
432
  compozy tasks run --multiple user-auth,cleanup --parallel --parallel-limit 2
407
433
  ```
@@ -616,26 +642,39 @@ compozy tasks run <slug> [flags]
616
642
 
617
643
  The CLI resolves workspace defaults locally, validates the task metadata, auto-starts the daemon when needed, and then starts the workflow through the daemon transport.
618
644
 
619
- | Flag | Default | Description |
620
- | --------------------- | ------- | ------------------------------------------------------------------------------------------------ |
621
- | `--name` | | Workflow slug (defaults to the positional slug) |
622
- | `--multiple` | | Comma-separated workflow slugs to run through one daemon-owned parent queue |
623
- | `--parallel` | `false` | Run `--multiple` workflows concurrently in isolated git worktrees (valid only with `--multiple`) |
624
- | `--parallel-limit` | `2` | Max children started at once in `--parallel` mode; must be `> 0` (valid only with `--multiple`) |
625
- | `--include-completed` | `false` | Re-run completed tasks |
626
- | `--recursive`, `-r` | `false` | Discover `task_NNN.md` files in nested subdirectories of the workflow root |
627
- | `--skip-validation` | `false` | Skip task metadata preflight; use only when validation already ran elsewhere |
628
- | `--force` | `false` | Continue after task metadata validation fails in non-interactive mode |
629
- | `--attach` | `auto` | Attach mode: `auto`, `ui`, `stream`, or `detach` |
630
- | `--ui` | `false` | Force interactive TUI attach mode |
631
- | `--stream` | `false` | Force textual stream attach mode |
632
- | `--detach` | `false` | Start the run without attaching a client |
633
- | `--task-runtime` | | Per-task runtime override rule (`type=...`, `id=...`, `ide=...`, `model=...`, etc.) |
645
+ | Flag | Default | Description |
646
+ | ------------------------- | --------- | ------------------------------------------------------------------------------------------------ |
647
+ | `--name` | | Workflow slug (defaults to the positional slug) |
648
+ | `--multiple` | | Comma-separated workflow slugs to run through one daemon-owned parent queue |
649
+ | `--parallel` | `false` | Run `--multiple` workflows concurrently in isolated git worktrees (valid only with `--multiple`) |
650
+ | `--parallel-limit` | `2` | Max children started at once in `--parallel` mode; must be `> 0` (valid only with `--multiple`) |
651
+ | `--parallel-tasks` | `false` | Run task files inside one PRD workflow in dependency-aware parallel mode |
652
+ | `--include-completed` | `false` | Re-run completed tasks |
653
+ | `--recursive`, `-r` | `false` | Discover `task_NNN.md` files in nested subdirectories of the workflow root |
654
+ | `--skip-validation` | `false` | Skip task metadata preflight; use only when validation already ran elsewhere |
655
+ | `--force` | `false` | Continue after task metadata validation fails in non-interactive mode |
656
+ | `--attach` | `auto` | Attach mode: `auto`, `ui`, `stream`, or `detach` |
657
+ | `--ui` | `false` | Force interactive TUI attach mode |
658
+ | `--stream` | `false` | Force textual stream attach mode |
659
+ | `--detach` | `false` | Start the run without attaching a client |
660
+ | `--task-runtime` | | Per-task runtime override rule (`type=...`, `id=...`, `ide=...`, `model=...`, etc.) |
661
+ | `--recovery` | `false` | Enable agentic recovery for failed runs |
662
+ | `--no-recovery` | `false` | Disable agentic recovery for this invocation |
663
+ | `--recovery-ide` | `codex` | Runtime used by the recovery agent |
664
+ | `--recovery-model` | `gpt-5.5` | Model used by the recovery agent |
665
+ | `--recovery-reasoning` | `medium` | Recovery agent reasoning effort: `low`, `medium`, `high`, or `xhigh` |
666
+ | `--recovery-max-attempts` | `1` | Recovery remediation plus restart cycles; must be between `1` and `3` |
634
667
 
635
668
  When `--recursive` is set, tasks are grouped by directory (root tasks first, then each subdirectory in alphabetical order, numerically within), and `_`/`.`-prefixed directories, `reviews-*` rounds, `adrs/`, and `memory/` are skipped. The same setting can be persisted as `[tasks.run] recursive = true` in workspace TOML or chosen from the interactive task-runtime form.
636
669
 
637
670
  Use `tasks run --multiple` when you want to start several task workflows from one invocation with the same runtime flags. Use `tasks run <slug>` when you only need one workflow run, when a script expects a single workflow slug, or when you want the existing single-run command path.
638
671
 
672
+ For one workflow, `--parallel-tasks` executes pending task files in dependency waves using isolated worktrees, bounded by `[tasks.run.parallel] max_concurrency`:
673
+
674
+ ```bash
675
+ compozy tasks run my-feature --parallel-tasks
676
+ ```
677
+
639
678
  The `--multiple` flag takes one comma-separated slug list:
640
679
 
641
680
  ```bash
@@ -668,7 +707,7 @@ Resolution precedence:
668
707
 
669
708
  **Worktree isolation.** In parallel mode the parent workspace must be on a named git branch. Compozy resolves the current branch and `HEAD` once, then creates one detached git worktree per child under `~/.compozy/state/worktrees/`. Each child runs with its workspace root and task directory remapped into that worktree, so concurrent agents get isolated working trees, indexes, and `HEAD`s while sharing the repository object store. Worktrees do **not** isolate shared runtime resources such as ports, credentials, provider rate limits, caches, or external services — treat parallel batches as genuinely independent tasks.
670
709
 
671
- **Preservation and V1 non-goals.** Every child worktree is preserved for manual review regardless of child status. Compozy does not auto-merge, auto-push, branch, or delete worktrees, and it does not predict semantic conflicts; recombining results is a manual step. Each detached worktree records its base branch and commit so you can branch or merge from it yourself.
710
+ **Preservation and V1 non-goals.** Every child worktree is preserved for manual review while the run settles, regardless of child status. Compozy does not auto-merge, auto-push, or branch those results, and it does not predict semantic conflicts; recombining results is a manual step. Each detached worktree records its base branch and commit so you can branch or merge from it yourself. Preserved worktrees are reclaimed only by explicit retention cleanup through `compozy runs purge`; dirty task worktrees make purge fail before run metadata is deleted.
672
711
 
673
712
  **Fail-late aggregation.** A child failure does not cancel its siblings. The parent reaches a terminal status only after every started child settles: `completed` when all children complete, or `failed` when any child fails, crashes, or cannot start (the parent error names the failed slugs). Canceling the parent cancels running children and marks not-started children canceled. In non-TUI runs the parent command exits non-zero when the aggregate status is failed, canceled, or crashed.
674
713
 
@@ -686,7 +725,7 @@ Cross-workspace runs are different from `--multiple` scheduling: the home-scoped
686
725
 
687
726
  In the TUI, every requested slug has a tab. Queued tabs appear before their child run exists, the running tab shows the familiar task-run surface, and completed, failed, or canceled tabs remain available for inspection. The quit dialog applies to the parent queue: `Close TUI` detaches and leaves the queue running in the daemon, `Stop Run` cancels the parent queue, cancels the active child, and marks queued workflows canceled, and `Cancel` returns to the TUI without changing execution.
688
727
 
689
- The multi-run path uses the same attach and runtime flags as single-run `tasks run`, except `--multiple` cannot be combined with a positional slug or `--name`.
728
+ The multi-run path uses the same attach and runtime flags as single-run `tasks run`, except `--multiple` cannot be combined with a positional slug, `--name`, or `--parallel-tasks`.
690
729
 
691
730
  </details>
692
731
 
@@ -713,7 +752,7 @@ compozy runs watch <run-id>
713
752
  compozy runs purge
714
753
  ```
715
754
 
716
- Use `runs attach` to restore the interactive TUI for an existing run, `runs watch` for textual streaming observation, and `runs purge` to delete terminal run artifacts according to the configured retention policy.
755
+ Use `runs attach` to restore the interactive TUI for an existing run, `runs watch` for textual streaming observation, and `runs purge` to delete terminal run artifacts according to the configured retention policy. Purge also removes clean Compozy-owned preserved worktrees recorded by terminal run events under `~/.compozy/state/worktrees/`; it ignores paths outside that root and stops before deleting run metadata if a task worktree is dirty.
717
756
 
718
757
  </details>
719
758
 
@@ -753,6 +792,12 @@ Provide exactly one prompt source: a positional prompt, `--prompt-file`, or `std
753
792
  | `--reasoning-effort` | `medium` | `low`, `medium`, `high`, `xhigh` |
754
793
  | `--access-mode` | `full` | `default` or `full` runtime access policy |
755
794
  | `--timeout` | `10m` | Activity timeout per job |
795
+ | `--recovery` | `false` | Enable agentic recovery for failed exec runs |
796
+ | `--no-recovery` | `false` | Disable agentic recovery for this invocation |
797
+ | `--recovery-ide` | `codex` | Runtime used by the recovery agent |
798
+ | `--recovery-model` | `gpt-5.5` | Model used by the recovery agent |
799
+ | `--recovery-reasoning` | `medium` | Recovery agent reasoning effort: `low`, `medium`, `high`, or `xhigh` |
800
+ | `--recovery-max-attempts` | `1` | Recovery remediation plus restart cycles; must be between `1` and `3` |
756
801
  | `--max-retries` | `2` | Retry execution-stage ACP failures or timeouts N times |
757
802
  | `--retry-backoff-multiplier` | `1.5` | Multiplier applied to the next timeout after each retry |
758
803
  | `--tail-lines` | `0` | Maximum log lines retained per job in UI (`0` = full history) |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@compozy/cli",
3
3
  "type": "module",
4
- "version": "0.2.10",
4
+ "version": "0.2.11",
5
5
  "description": "Compozy CLI",
6
6
  "scripts": {
7
7
  "postinstall": "node install.js",
@@ -27,63 +27,63 @@
27
27
  },
28
28
  "archives": {
29
29
  "darwin-arm64": {
30
- "name": "compozy_0.2.10_darwin_arm64.tar.gz",
31
- "url": "https://github.com/compozy/compozy/releases/download/v0.2.10/compozy_0.2.10_darwin_arm64.tar.gz",
30
+ "name": "compozy_0.2.11_darwin_arm64.tar.gz",
31
+ "url": "https://github.com/compozy/compozy/releases/download/v0.2.11/compozy_0.2.11_darwin_arm64.tar.gz",
32
32
  "bins": [
33
33
  "compozy"
34
34
  ],
35
35
  "format": "tar.gz",
36
36
  "checksum": {
37
37
  "algorithm": "sha256",
38
- "digest": "7bc8f1c350dabd229f5ffa3f40538b3a02b6cedd67c3329de76e7365e12054b4"
38
+ "digest": "085f7c59bdcdaf95688ba12eb8df49df59fb243bcd550771e76f810ae70a3f59"
39
39
  }
40
40
  },
41
41
  "darwin-x64": {
42
- "name": "compozy_0.2.10_darwin_x86_64.tar.gz",
43
- "url": "https://github.com/compozy/compozy/releases/download/v0.2.10/compozy_0.2.10_darwin_x86_64.tar.gz",
42
+ "name": "compozy_0.2.11_darwin_x86_64.tar.gz",
43
+ "url": "https://github.com/compozy/compozy/releases/download/v0.2.11/compozy_0.2.11_darwin_x86_64.tar.gz",
44
44
  "bins": [
45
45
  "compozy"
46
46
  ],
47
47
  "format": "tar.gz",
48
48
  "checksum": {
49
49
  "algorithm": "sha256",
50
- "digest": "d912bc15cca91336bcb20bfb2a1693f8e8558327a1893648958d3b25677068c2"
50
+ "digest": "f6f28f751b83929e7c33baafc8ee61cab007b9d574848e6cc9cb8481f266b32a"
51
51
  }
52
52
  },
53
53
  "linux-arm64": {
54
- "name": "compozy_0.2.10_linux_arm64.tar.gz",
55
- "url": "https://github.com/compozy/compozy/releases/download/v0.2.10/compozy_0.2.10_linux_arm64.tar.gz",
54
+ "name": "compozy_0.2.11_linux_arm64.tar.gz",
55
+ "url": "https://github.com/compozy/compozy/releases/download/v0.2.11/compozy_0.2.11_linux_arm64.tar.gz",
56
56
  "bins": [
57
57
  "compozy"
58
58
  ],
59
59
  "format": "tar.gz",
60
60
  "checksum": {
61
61
  "algorithm": "sha256",
62
- "digest": "923321db294487f03d4939fd2a71041f40fd25bb30638c15a028a554955be95e"
62
+ "digest": "a6f22fe7da79e791eb5c5cc370afa0135c316fec52e66cfa87e75e1d24ef809b"
63
63
  }
64
64
  },
65
65
  "linux-x64": {
66
- "name": "compozy_0.2.10_linux_x86_64.tar.gz",
67
- "url": "https://github.com/compozy/compozy/releases/download/v0.2.10/compozy_0.2.10_linux_x86_64.tar.gz",
66
+ "name": "compozy_0.2.11_linux_x86_64.tar.gz",
67
+ "url": "https://github.com/compozy/compozy/releases/download/v0.2.11/compozy_0.2.11_linux_x86_64.tar.gz",
68
68
  "bins": [
69
69
  "compozy"
70
70
  ],
71
71
  "format": "tar.gz",
72
72
  "checksum": {
73
73
  "algorithm": "sha256",
74
- "digest": "2811f0aa961c994ac87d1b93e819543561c362f3fac88ee883c174aa04e627ae"
74
+ "digest": "c87cd7055f75b258557466cbb87a019850b567bb247dbefe334b8e5dc683cf1d"
75
75
  }
76
76
  },
77
77
  "win32-x64": {
78
- "name": "compozy_0.2.10_windows_x86_64.zip",
79
- "url": "https://github.com/compozy/compozy/releases/download/v0.2.10/compozy_0.2.10_windows_x86_64.zip",
78
+ "name": "compozy_0.2.11_windows_x86_64.zip",
79
+ "url": "https://github.com/compozy/compozy/releases/download/v0.2.11/compozy_0.2.11_windows_x86_64.zip",
80
80
  "bins": [
81
81
  "compozy.exe"
82
82
  ],
83
83
  "format": "zip",
84
84
  "checksum": {
85
85
  "algorithm": "sha256",
86
- "digest": "c72bc6e2d242e6d740714846f9ca308b4d9bec2610a55f58d50db9a3939b56a8"
86
+ "digest": "bfdf1fcc2b6b0445a65b916cc8130240a136b153d77ce6b881d872d00637504a"
87
87
  }
88
88
  }
89
89
  }