opencastle 0.27.0 → 0.27.2
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.
- package/bin/cli.mjs +6 -0
- package/dist/cli/agents.d.ts +3 -0
- package/dist/cli/agents.d.ts.map +1 -0
- package/dist/cli/agents.js +161 -0
- package/dist/cli/agents.js.map +1 -0
- package/dist/cli/baselines.d.ts +3 -0
- package/dist/cli/baselines.d.ts.map +1 -0
- package/dist/cli/baselines.js +128 -0
- package/dist/cli/baselines.js.map +1 -0
- package/dist/cli/convoy/dashboard-types.d.ts +146 -0
- package/dist/cli/convoy/dashboard-types.d.ts.map +1 -0
- package/dist/cli/convoy/dashboard-types.js +2 -0
- package/dist/cli/convoy/dashboard-types.js.map +1 -0
- package/dist/cli/convoy/engine.d.ts +67 -2
- package/dist/cli/convoy/engine.d.ts.map +1 -1
- package/dist/cli/convoy/engine.js +2036 -28
- package/dist/cli/convoy/engine.js.map +1 -1
- package/dist/cli/convoy/engine.test.js +1659 -70
- package/dist/cli/convoy/engine.test.js.map +1 -1
- package/dist/cli/convoy/event-schemas.d.ts +9 -0
- package/dist/cli/convoy/event-schemas.d.ts.map +1 -0
- package/dist/cli/convoy/event-schemas.js +185 -0
- package/dist/cli/convoy/event-schemas.js.map +1 -0
- package/dist/cli/convoy/events.d.ts +12 -1
- package/dist/cli/convoy/events.d.ts.map +1 -1
- package/dist/cli/convoy/events.js +186 -13
- package/dist/cli/convoy/events.js.map +1 -1
- package/dist/cli/convoy/events.test.js +325 -28
- package/dist/cli/convoy/events.test.js.map +1 -1
- package/dist/cli/convoy/expertise.d.ts +16 -0
- package/dist/cli/convoy/expertise.d.ts.map +1 -0
- package/dist/cli/convoy/expertise.js +121 -0
- package/dist/cli/convoy/expertise.js.map +1 -0
- package/dist/cli/convoy/expertise.test.d.ts +2 -0
- package/dist/cli/convoy/expertise.test.d.ts.map +1 -0
- package/dist/cli/convoy/expertise.test.js +96 -0
- package/dist/cli/convoy/expertise.test.js.map +1 -0
- package/dist/cli/convoy/export.test.js +1 -0
- package/dist/cli/convoy/export.test.js.map +1 -1
- package/dist/cli/convoy/formula.d.ts +19 -0
- package/dist/cli/convoy/formula.d.ts.map +1 -0
- package/dist/cli/convoy/formula.js +142 -0
- package/dist/cli/convoy/formula.js.map +1 -0
- package/dist/cli/convoy/formula.test.d.ts +2 -0
- package/dist/cli/convoy/formula.test.d.ts.map +1 -0
- package/dist/cli/convoy/formula.test.js +342 -0
- package/dist/cli/convoy/formula.test.js.map +1 -0
- package/dist/cli/convoy/gates.d.ts +128 -0
- package/dist/cli/convoy/gates.d.ts.map +1 -0
- package/dist/cli/convoy/gates.js +606 -0
- package/dist/cli/convoy/gates.js.map +1 -0
- package/dist/cli/convoy/gates.test.d.ts +2 -0
- package/dist/cli/convoy/gates.test.d.ts.map +1 -0
- package/dist/cli/convoy/gates.test.js +976 -0
- package/dist/cli/convoy/gates.test.js.map +1 -0
- package/dist/cli/convoy/health.d.ts +11 -0
- package/dist/cli/convoy/health.d.ts.map +1 -1
- package/dist/cli/convoy/health.js +54 -0
- package/dist/cli/convoy/health.js.map +1 -1
- package/dist/cli/convoy/health.test.js +56 -1
- package/dist/cli/convoy/health.test.js.map +1 -1
- package/dist/cli/convoy/issues.d.ts +8 -0
- package/dist/cli/convoy/issues.d.ts.map +1 -0
- package/dist/cli/convoy/issues.js +98 -0
- package/dist/cli/convoy/issues.js.map +1 -0
- package/dist/cli/convoy/issues.test.d.ts +2 -0
- package/dist/cli/convoy/issues.test.d.ts.map +1 -0
- package/dist/cli/convoy/issues.test.js +107 -0
- package/dist/cli/convoy/issues.test.js.map +1 -0
- package/dist/cli/convoy/knowledge.d.ts +5 -0
- package/dist/cli/convoy/knowledge.d.ts.map +1 -0
- package/dist/cli/convoy/knowledge.js +116 -0
- package/dist/cli/convoy/knowledge.js.map +1 -0
- package/dist/cli/convoy/knowledge.test.d.ts +2 -0
- package/dist/cli/convoy/knowledge.test.d.ts.map +1 -0
- package/dist/cli/convoy/knowledge.test.js +87 -0
- package/dist/cli/convoy/knowledge.test.js.map +1 -0
- package/dist/cli/convoy/lessons.d.ts +17 -0
- package/dist/cli/convoy/lessons.d.ts.map +1 -0
- package/dist/cli/convoy/lessons.js +149 -0
- package/dist/cli/convoy/lessons.js.map +1 -0
- package/dist/cli/convoy/lessons.test.d.ts +2 -0
- package/dist/cli/convoy/lessons.test.d.ts.map +1 -0
- package/dist/cli/convoy/lessons.test.js +135 -0
- package/dist/cli/convoy/lessons.test.js.map +1 -0
- package/dist/cli/convoy/lock.d.ts +13 -0
- package/dist/cli/convoy/lock.d.ts.map +1 -0
- package/dist/cli/convoy/lock.js +88 -0
- package/dist/cli/convoy/lock.js.map +1 -0
- package/dist/cli/convoy/lock.test.d.ts +2 -0
- package/dist/cli/convoy/lock.test.d.ts.map +1 -0
- package/dist/cli/convoy/lock.test.js +136 -0
- package/dist/cli/convoy/lock.test.js.map +1 -0
- package/dist/cli/convoy/log-merge.test.d.ts +2 -0
- package/dist/cli/convoy/log-merge.test.d.ts.map +1 -0
- package/dist/cli/convoy/log-merge.test.js +147 -0
- package/dist/cli/convoy/log-merge.test.js.map +1 -0
- package/dist/cli/convoy/merge.d.ts +4 -0
- package/dist/cli/convoy/merge.d.ts.map +1 -1
- package/dist/cli/convoy/merge.js +18 -1
- package/dist/cli/convoy/merge.js.map +1 -1
- package/dist/cli/convoy/merge.test.js +6 -7
- package/dist/cli/convoy/merge.test.js.map +1 -1
- package/dist/cli/convoy/partition.d.ts +51 -0
- package/dist/cli/convoy/partition.d.ts.map +1 -0
- package/dist/cli/convoy/partition.js +186 -0
- package/dist/cli/convoy/partition.js.map +1 -0
- package/dist/cli/convoy/partition.test.d.ts +2 -0
- package/dist/cli/convoy/partition.test.d.ts.map +1 -0
- package/dist/cli/convoy/partition.test.js +315 -0
- package/dist/cli/convoy/partition.test.js.map +1 -0
- package/dist/cli/convoy/pipeline.test.js +6 -0
- package/dist/cli/convoy/pipeline.test.js.map +1 -1
- package/dist/cli/convoy/store.d.ts +99 -7
- package/dist/cli/convoy/store.d.ts.map +1 -1
- package/dist/cli/convoy/store.js +764 -31
- package/dist/cli/convoy/store.js.map +1 -1
- package/dist/cli/convoy/store.test.js +1810 -18
- package/dist/cli/convoy/store.test.js.map +1 -1
- package/dist/cli/convoy/types.d.ts +427 -5
- package/dist/cli/convoy/types.d.ts.map +1 -1
- package/dist/cli/convoy/types.js +42 -1
- package/dist/cli/convoy/types.js.map +1 -1
- package/dist/cli/log.d.ts +11 -0
- package/dist/cli/log.d.ts.map +1 -1
- package/dist/cli/log.js +114 -2
- package/dist/cli/log.js.map +1 -1
- package/dist/cli/run/adapters/claude.d.ts +2 -0
- package/dist/cli/run/adapters/claude.d.ts.map +1 -1
- package/dist/cli/run/adapters/claude.js +89 -49
- package/dist/cli/run/adapters/claude.js.map +1 -1
- package/dist/cli/run/adapters/claude.test.d.ts +2 -0
- package/dist/cli/run/adapters/claude.test.d.ts.map +1 -0
- package/dist/cli/run/adapters/claude.test.js +205 -0
- package/dist/cli/run/adapters/claude.test.js.map +1 -0
- package/dist/cli/run/adapters/copilot.d.ts +1 -0
- package/dist/cli/run/adapters/copilot.d.ts.map +1 -1
- package/dist/cli/run/adapters/copilot.js +84 -46
- package/dist/cli/run/adapters/copilot.js.map +1 -1
- package/dist/cli/run/adapters/copilot.test.d.ts +2 -0
- package/dist/cli/run/adapters/copilot.test.d.ts.map +1 -0
- package/dist/cli/run/adapters/copilot.test.js +195 -0
- package/dist/cli/run/adapters/copilot.test.js.map +1 -0
- package/dist/cli/run/adapters/cursor.d.ts +1 -0
- package/dist/cli/run/adapters/cursor.d.ts.map +1 -1
- package/dist/cli/run/adapters/cursor.js +83 -47
- package/dist/cli/run/adapters/cursor.js.map +1 -1
- package/dist/cli/run/adapters/cursor.test.d.ts +2 -0
- package/dist/cli/run/adapters/cursor.test.d.ts.map +1 -0
- package/dist/cli/run/adapters/cursor.test.js +129 -0
- package/dist/cli/run/adapters/cursor.test.js.map +1 -0
- package/dist/cli/run/adapters/opencode.d.ts +1 -0
- package/dist/cli/run/adapters/opencode.d.ts.map +1 -1
- package/dist/cli/run/adapters/opencode.js +81 -47
- package/dist/cli/run/adapters/opencode.js.map +1 -1
- package/dist/cli/run/adapters/opencode.test.d.ts +2 -0
- package/dist/cli/run/adapters/opencode.test.d.ts.map +1 -0
- package/dist/cli/run/adapters/opencode.test.js +119 -0
- package/dist/cli/run/adapters/opencode.test.js.map +1 -0
- package/dist/cli/run/executor.js +1 -1
- package/dist/cli/run/executor.js.map +1 -1
- package/dist/cli/run/schema.d.ts.map +1 -1
- package/dist/cli/run/schema.js +245 -4
- package/dist/cli/run/schema.js.map +1 -1
- package/dist/cli/run/schema.test.js +669 -0
- package/dist/cli/run/schema.test.js.map +1 -1
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +362 -22
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/types.d.ts +85 -2
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/types.js.map +1 -1
- package/dist/cli/watch.d.ts +15 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/cli/watch.js +279 -0
- package/dist/cli/watch.js.map +1 -0
- package/package.json +5 -1
- package/src/cli/agents.ts +177 -0
- package/src/cli/baselines.ts +143 -0
- package/src/cli/convoy/TELEMETRY.md +203 -0
- package/src/cli/convoy/dashboard-types.ts +141 -0
- package/src/cli/convoy/engine.test.ts +1937 -70
- package/src/cli/convoy/engine.ts +2350 -40
- package/src/cli/convoy/event-schemas.ts +195 -0
- package/src/cli/convoy/events.test.ts +384 -39
- package/src/cli/convoy/events.ts +202 -16
- package/src/cli/convoy/expertise.test.ts +128 -0
- package/src/cli/convoy/expertise.ts +163 -0
- package/src/cli/convoy/export.test.ts +1 -0
- package/src/cli/convoy/formula.test.ts +405 -0
- package/src/cli/convoy/formula.ts +174 -0
- package/src/cli/convoy/gates.test.ts +1169 -0
- package/src/cli/convoy/gates.ts +774 -0
- package/src/cli/convoy/health.test.ts +64 -2
- package/src/cli/convoy/health.ts +80 -2
- package/src/cli/convoy/issues.test.ts +143 -0
- package/src/cli/convoy/issues.ts +136 -0
- package/src/cli/convoy/knowledge.test.ts +101 -0
- package/src/cli/convoy/knowledge.ts +132 -0
- package/src/cli/convoy/lessons.test.ts +188 -0
- package/src/cli/convoy/lessons.ts +164 -0
- package/src/cli/convoy/lock.test.ts +181 -0
- package/src/cli/convoy/lock.ts +103 -0
- package/src/cli/convoy/log-merge.test.ts +179 -0
- package/src/cli/convoy/merge.test.ts +6 -7
- package/src/cli/convoy/merge.ts +19 -1
- package/src/cli/convoy/partition.test.ts +423 -0
- package/src/cli/convoy/partition.ts +232 -0
- package/src/cli/convoy/pipeline.test.ts +6 -0
- package/src/cli/convoy/store.test.ts +2041 -20
- package/src/cli/convoy/store.ts +945 -46
- package/src/cli/convoy/types.ts +278 -4
- package/src/cli/log.ts +120 -2
- package/src/cli/run/adapters/claude.test.ts +234 -0
- package/src/cli/run/adapters/claude.ts +45 -5
- package/src/cli/run/adapters/copilot.test.ts +224 -0
- package/src/cli/run/adapters/copilot.ts +34 -4
- package/src/cli/run/adapters/cursor.test.ts +144 -0
- package/src/cli/run/adapters/cursor.ts +33 -2
- package/src/cli/run/adapters/opencode.test.ts +135 -0
- package/src/cli/run/adapters/opencode.ts +30 -2
- package/src/cli/run/executor.ts +1 -1
- package/src/cli/run/schema.test.ts +758 -0
- package/src/cli/run/schema.ts +300 -25
- package/src/cli/run.ts +341 -21
- package/src/cli/types.ts +86 -1
- package/src/cli/watch.ts +298 -0
- package/src/dashboard/dist/_astro/{index.DtnyD8a5.css → index.6L3_HsPT.css} +1 -1
- package/src/dashboard/dist/data/.gitkeep +0 -0
- package/src/dashboard/dist/data/convoy-list.json +1 -0
- package/src/dashboard/dist/data/overall-stats.json +24 -0
- package/src/dashboard/dist/index.html +701 -3
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/dashboard/public/data/.gitkeep +0 -0
- package/src/dashboard/public/data/convoy-list.json +1 -0
- package/src/dashboard/public/data/overall-stats.json +24 -0
- package/src/dashboard/scripts/etl.test.ts +210 -0
- package/src/dashboard/scripts/etl.ts +108 -0
- package/src/dashboard/scripts/integration-test.ts +504 -0
- package/src/dashboard/src/pages/index.astro +854 -15
- package/src/dashboard/src/styles/dashboard.css +557 -1
- package/src/orchestrator/prompts/generate-convoy.prompt.md +212 -13
|
@@ -28,14 +28,138 @@ The output file must conform to the following schema. Fields marked **(required)
|
|
|
28
28
|
| Field | Type | Required | Default | Description |
|
|
29
29
|
|-------|------|----------|---------|-------------|
|
|
30
30
|
| `name` | string | **yes** | — | Human-readable name for the run |
|
|
31
|
-
| `version` | integer | **yes** | — | Spec schema version.
|
|
32
|
-
| `concurrency` | integer ≥ 1 | no | `1` | Max tasks executing in parallel |
|
|
31
|
+
| `version` | integer | **yes** | — | Spec schema version. `1` for convoy specs, `2` for pipeline chaining |
|
|
32
|
+
| `concurrency` | integer ≥ 1 or `"auto"` | no | `1` | Max tasks executing in parallel. `"auto"` enables swarm mode (dynamic scaling up to `defaults.max_swarm_concurrency`) |
|
|
33
33
|
| `on_failure` | `continue` \| `stop` | no | `continue` | Behaviour when a task fails |
|
|
34
|
-
| `adapter` | string | no | auto-detect | Default CLI adapter (`claude
|
|
34
|
+
| `adapter` | string | no | auto-detect | Default CLI adapter (`claude`, `copilot`, `cursor`, `opencode`). Omit to let the CLI auto-detect. |
|
|
35
35
|
| `branch` | string | no | — | Git feature branch name — created if missing |
|
|
36
|
-
| `defaults` | object | no | — | Worker defaults merged into each task
|
|
36
|
+
| `defaults` | object | no | — | Worker defaults merged into each task (see Defaults below) |
|
|
37
37
|
| `gates` | array of strings | no | — | Shell commands run after all tasks complete; each must exit 0 |
|
|
38
|
+
| `gate_retries` | integer ≥ 0 | no | `0` | How many times to retry failing gates with an auto-fix task |
|
|
39
|
+
| `guard` | object | no | — | Post-convoy guard configuration (see Guard below) |
|
|
40
|
+
| `hooks` | array of Hook | no | — | Post-convoy lifecycle hooks (see Hooks below) |
|
|
41
|
+
| `watch` | object | no | — | Watch mode configuration for continuous re-runs (see Watch below) |
|
|
38
42
|
| `tasks` | list | **yes** | — | Non-empty list of task objects |
|
|
43
|
+
| `depends_on_convoy` | list of strings | no | — | (version 2 only) Other convoy spec names to run before this one |
|
|
44
|
+
|
|
45
|
+
### Defaults Object
|
|
46
|
+
|
|
47
|
+
All fields are optional. Values are merged into each task unless the task overrides them.
|
|
48
|
+
|
|
49
|
+
| Field | Type | Default | Description |
|
|
50
|
+
|-------|------|---------|-------------|
|
|
51
|
+
| `timeout` | duration | `30m` | Default task timeout (`<n><s\|m\|h>`) |
|
|
52
|
+
| `model` | string | — | AI model override for all tasks |
|
|
53
|
+
| `max_retries` | integer | `1` | Default max retry attempts |
|
|
54
|
+
| `agent` | string | `developer` | Default agent role |
|
|
55
|
+
| `adapter` | string | — | Default adapter override |
|
|
56
|
+
| `gates` | array of strings | — | Per-task gate commands run after adapter success |
|
|
57
|
+
| `review` | `auto` \| `fast` \| `panel` \| `none` | — | Review level for completed tasks |
|
|
58
|
+
| `reviewer_model` | string | — | Model used for reviews |
|
|
59
|
+
| `review_budget` | integer | — | Max review token budget |
|
|
60
|
+
| `on_review_budget_exceeded` | `skip` \| `downgrade` \| `stop` | — | Action when review budget exhausted |
|
|
61
|
+
| `max_concurrent_reviews` | integer | — | Parallel review limit |
|
|
62
|
+
| `review_heuristics` | object | — | Auto-routing rules (see Review Heuristics below) |
|
|
63
|
+
| `detect_drift` | boolean | — | Enable drift detection on streaming adapters |
|
|
64
|
+
| `on_dispute` | `continue` \| `stop` | — | Behavior on panel disputes |
|
|
65
|
+
| `on_exhausted` | `dlq` \| `skip` \| `stop` | — | Action when max_retries exhausted |
|
|
66
|
+
| `escalate_to` | string | — | Agent for DLQ escalation |
|
|
67
|
+
| `inject_lessons` | boolean | — | Auto-inject relevant lessons from LESSONS-LEARNED.md into prompts |
|
|
68
|
+
| `track_discovered_issues` | boolean | — | Enable discovered issues tracking in prompts |
|
|
69
|
+
| `avoid_weak_agents` | boolean | — | Skip assigning agents to tasks matching their weak areas |
|
|
70
|
+
| `max_swarm_concurrency` | integer (1–50) | `8` | Max parallel tasks in swarm mode (`concurrency: auto`) |
|
|
71
|
+
| `built_in_gates` | object | — | Built-in gate configuration (see Built-in Gates below) |
|
|
72
|
+
| `browser_test` | object | — | Default browser test gate config (see Browser Test below) |
|
|
73
|
+
| `circuit_breaker` | object | — | Circuit breaker config (see Circuit Breaker below) |
|
|
74
|
+
| `mcp_servers` | array of MCPServer | — | MCP servers available to tasks |
|
|
75
|
+
| `mcp_approve_all` | boolean | — | Auto-approve all MCP tool calls |
|
|
76
|
+
| `mcp_server_approval_timeout` | number | — | Timeout (seconds) for MCP approval prompts |
|
|
77
|
+
|
|
78
|
+
### Built-in Gates
|
|
79
|
+
|
|
80
|
+
Automated validation gates run after each task completes.
|
|
81
|
+
|
|
82
|
+
| Field | Type | Default | Description |
|
|
83
|
+
|-------|------|---------|-------------|
|
|
84
|
+
| `secret_scan` | boolean \| `"auto"` | — | Scan output for leaked secrets |
|
|
85
|
+
| `blast_radius` | boolean \| `"auto"` | — | Check number of files changed is reasonable |
|
|
86
|
+
| `dependency_audit` | boolean \| `"auto"` | — | Audit new dependencies |
|
|
87
|
+
| `regression_test` | boolean \| `"auto"` | — | Run regression tests |
|
|
88
|
+
| `browser_test` | boolean \| `"auto"` | — | Run browser-based tests |
|
|
89
|
+
| `gate_timeout` | number | — | Timeout (ms) for built-in gates |
|
|
90
|
+
|
|
91
|
+
### Browser Test Config
|
|
92
|
+
|
|
93
|
+
| Field | Type | Required | Description |
|
|
94
|
+
|-------|------|----------|-------------|
|
|
95
|
+
| `urls` | array of strings | **yes** | URLs to test |
|
|
96
|
+
| `check_console_errors` | boolean | no | Fail on console errors |
|
|
97
|
+
| `visual_diff_threshold` | number (0–1) | no | Visual regression threshold |
|
|
98
|
+
| `a11y` | boolean | no | Run accessibility audit |
|
|
99
|
+
| `severity_threshold` | `critical` \| `serious` \| `moderate` \| `minor` | no | Min a11y violation severity to fail |
|
|
100
|
+
| `baselines_dir` | string | no | Directory for visual regression baselines |
|
|
101
|
+
|
|
102
|
+
### Circuit Breaker
|
|
103
|
+
|
|
104
|
+
Protects against cascading agent failures.
|
|
105
|
+
|
|
106
|
+
| Field | Type | Default | Description |
|
|
107
|
+
|-------|------|---------|-------------|
|
|
108
|
+
| `threshold` | integer | `3` | Failures before circuit opens |
|
|
109
|
+
| `cooldown_ms` | integer | `300000` (5 min) | ms in Open state before Half-Open |
|
|
110
|
+
| `fallback_agent` | string | — | Agent to reassign tasks to when circuit opens |
|
|
111
|
+
|
|
112
|
+
### Review Heuristics
|
|
113
|
+
|
|
114
|
+
Routing rules for automatic review level assignment.
|
|
115
|
+
|
|
116
|
+
| Field | Type | Description |
|
|
117
|
+
|-------|------|-------------|
|
|
118
|
+
| `panel_paths` | array of strings | File path patterns that require panel review |
|
|
119
|
+
| `panel_agents` | array of strings | Agents whose output always gets panel review |
|
|
120
|
+
| `auto_pass_agents` | array of strings | Agents whose output can auto-pass |
|
|
121
|
+
| `auto_pass_max_lines` | integer | Max changed lines for auto-pass |
|
|
122
|
+
| `auto_pass_max_files` | integer | Max changed files for auto-pass |
|
|
123
|
+
|
|
124
|
+
### Guard Config
|
|
125
|
+
|
|
126
|
+
Post-convoy compliance guard.
|
|
127
|
+
|
|
128
|
+
| Field | Type | Default | Description |
|
|
129
|
+
|-------|------|---------|-------------|
|
|
130
|
+
| `enabled` | boolean | `true` | Enable/disable the guard |
|
|
131
|
+
| `agent` | string | — | Agent to run the guard (e.g. `session-guard`) |
|
|
132
|
+
| `checks` | array of strings | — | Checks to run (e.g. `observability`, `cleanup`, `cost-report`) |
|
|
133
|
+
|
|
134
|
+
### Hooks
|
|
135
|
+
|
|
136
|
+
Lifecycle hooks run at specific points during convoy execution.
|
|
137
|
+
|
|
138
|
+
| Field | Type | Required | Description |
|
|
139
|
+
|-------|------|----------|-------------|
|
|
140
|
+
| `type` | `review` \| `guard` \| `agent` \| `command` \| `validate` | **yes** | Hook type |
|
|
141
|
+
| `name` | string | no | Human label |
|
|
142
|
+
| `prompt` | string | no | For `agent` hooks: prompt sent to the agent |
|
|
143
|
+
| `command` | string | no | For `command` hooks: shell command to run |
|
|
144
|
+
| `on` | `pre_task` \| `post_task` \| `post_convoy` | no | When to trigger |
|
|
145
|
+
|
|
146
|
+
### Watch Config
|
|
147
|
+
|
|
148
|
+
Enables continuous re-execution triggered by file changes, cron, or git push.
|
|
149
|
+
|
|
150
|
+
| Field | Type | Description |
|
|
151
|
+
|-------|------|-------------|
|
|
152
|
+
| `triggers` | array of WatchTrigger | Trigger definitions (see below) |
|
|
153
|
+
| `clear_scratchpad` | boolean | Clear scratchpad on watch start |
|
|
154
|
+
| `scratchpad_retention_days` | integer | Auto-clear scratchpad entries older than N days |
|
|
155
|
+
|
|
156
|
+
**WatchTrigger types:**
|
|
157
|
+
|
|
158
|
+
| Type | Fields | Description |
|
|
159
|
+
|------|--------|-------------|
|
|
160
|
+
| `file-change` | `glob`, `debounce_ms` (default: 500) | Re-run when matching files change |
|
|
161
|
+
| `cron` | `schedule` (5-field cron) | Re-run on cron schedule |
|
|
162
|
+
| `git-push` | `branch` | Re-run when new commits are pushed |
|
|
39
163
|
|
|
40
164
|
### Task Fields
|
|
41
165
|
|
|
@@ -47,9 +171,64 @@ The output file must conform to the following schema. Fields marked **(required)
|
|
|
47
171
|
| `description` | string | no | same as `id` | Short human label shown in progress output |
|
|
48
172
|
| `depends_on` | list of ids | no | `[]` | Task ids that must finish before this one starts |
|
|
49
173
|
| `files` | list of globs | no | `[]` | File scope the agent is allowed to modify |
|
|
50
|
-
| `timeout` | duration | no | `30m` | Max wall time (`<number><s
|
|
174
|
+
| `timeout` | duration | no | `30m` | Max wall time (`<number><s\|m\|h>`, e.g. `10m`, `1h`) |
|
|
51
175
|
| `max_retries` | integer | no | from `defaults` or `1` | Max retry attempts for this task |
|
|
52
176
|
| `model` | string | no | — | AI model override for this task |
|
|
177
|
+
| `adapter` | string | no | — | Per-task adapter override |
|
|
178
|
+
| `gates` | list of strings | no | — | Per-task gate commands run after adapter success |
|
|
179
|
+
| `review` | `auto` \| `fast` \| `panel` \| `none` | no | from `defaults` | Review level for this task |
|
|
180
|
+
| `detect_drift` | boolean | no | — | Enable drift detection (streaming adapters only) |
|
|
181
|
+
| `persistent` | boolean | no | — | Enable persistent agent identity across convoy runs |
|
|
182
|
+
| `steps` | list of TaskStep | no | — | Multi-step sub-prompts (see Steps below) |
|
|
183
|
+
| `hooks` | list of Hook | no | — | Per-task lifecycle hooks |
|
|
184
|
+
| `outputs` | list of TaskOutput | no | — | Named artifacts this task produces |
|
|
185
|
+
| `inputs` | list of TaskInput | no | — | Named artifacts this task consumes from upstream tasks |
|
|
186
|
+
| `browser_test` | object | no | — | Per-task browser test config (same schema as defaults) |
|
|
187
|
+
| `built_in_gates` | object | no | — | Per-task built-in gates override |
|
|
188
|
+
|
|
189
|
+
### Task Steps
|
|
190
|
+
|
|
191
|
+
Break a task into sequential sub-prompts. Each step runs in the same session (if the adapter supports session continuity).
|
|
192
|
+
|
|
193
|
+
| Field | Type | Required | Description |
|
|
194
|
+
|-------|------|----------|-------------|
|
|
195
|
+
| `id` | string | no | Step identifier for conditional references |
|
|
196
|
+
| `prompt` | string | **yes** | Instruction for this step |
|
|
197
|
+
| `gates` | list of strings | no | Gate commands to run after this step |
|
|
198
|
+
| `max_retries` | integer | no | Retry override for this step |
|
|
199
|
+
| `if` | StepCondition | no | Conditional execution (see below) |
|
|
200
|
+
|
|
201
|
+
**StepCondition:** `{ step: "<step-id>", exitCode: { eq?: n, ne?: n, gt?: n, lt?: n }, fileExists: { path: "<path>" } }`
|
|
202
|
+
|
|
203
|
+
### Task Outputs & Inputs (Artifact Passing)
|
|
204
|
+
|
|
205
|
+
Tasks can produce named artifacts and consume artifacts from upstream tasks.
|
|
206
|
+
|
|
207
|
+
**TaskOutput:**
|
|
208
|
+
| Field | Type | Required | Description |
|
|
209
|
+
|-------|------|----------|-------------|
|
|
210
|
+
| `name` | string | **yes** | Artifact name |
|
|
211
|
+
| `type` | `file` \| `summary` \| `json` | **yes** | Artifact type |
|
|
212
|
+
| `description` | string | no | Human description |
|
|
213
|
+
|
|
214
|
+
**TaskInput:**
|
|
215
|
+
| Field | Type | Required | Description |
|
|
216
|
+
|-------|------|----------|-------------|
|
|
217
|
+
| `from` | string | **yes** | Source task id |
|
|
218
|
+
| `name` | string | **yes** | Artifact name from the source task |
|
|
219
|
+
| `as` | string | no | Rename the artifact in the consuming task |
|
|
220
|
+
|
|
221
|
+
### MCP Server Config
|
|
222
|
+
|
|
223
|
+
| Field | Type | Required | Description |
|
|
224
|
+
|-------|------|----------|-------------|
|
|
225
|
+
| `name` | string | **yes** | Server identifier |
|
|
226
|
+
| `type` | string | **yes** | Server type (e.g. `stdio`, `http`) |
|
|
227
|
+
| `local` | boolean | no | Whether the server runs locally |
|
|
228
|
+
| `command` | string | no | Command to start the server |
|
|
229
|
+
| `args` | list of strings | no | Arguments for the command |
|
|
230
|
+
| `url` | string | no | URL for HTTP-based servers |
|
|
231
|
+
| `config` | object | no | Additional server configuration |
|
|
53
232
|
|
|
54
233
|
### Agent Roster
|
|
55
234
|
|
|
@@ -61,9 +240,12 @@ Available values for the `agent` field:
|
|
|
61
240
|
|
|
62
241
|
| Adapter | CLI binary | Notes |
|
|
63
242
|
|---------|-----------|-------|
|
|
64
|
-
| `claude
|
|
243
|
+
| `claude` | `claude` | JSON output, max-turns flag. |
|
|
65
244
|
| `copilot` | `copilot` | Uses the Copilot SDK for structured JSON-RPC sessions. |
|
|
66
245
|
| `cursor` | `agent` | Uses `--force` for unattended file writes. |
|
|
246
|
+
| `opencode` | `opencode` | OpenCode CLI agent. |
|
|
247
|
+
|
|
248
|
+
> **Auto-detection order:** `copilot` → `claude` → `cursor` → `opencode`. Omit the `adapter` field to auto-detect.
|
|
67
249
|
|
|
68
250
|
---
|
|
69
251
|
|
|
@@ -89,6 +271,7 @@ For each workstream, break it down into the smallest meaningful unit of work tha
|
|
|
89
271
|
|
|
90
272
|
- Tasks with no dependencies go first (they run in parallel up to `concurrency`).
|
|
91
273
|
- Tasks that consume output of earlier tasks declare `depends_on` with the prerequisite ids.
|
|
274
|
+
- For data flow between tasks, use `outputs` and `inputs` to pass named artifacts.
|
|
92
275
|
- **Never create cycles** — if A depends on B, B must not depend on A (directly or transitively).
|
|
93
276
|
- Draw the implicit phase structure:
|
|
94
277
|
```
|
|
@@ -100,12 +283,16 @@ For each workstream, break it down into the smallest meaningful unit of work tha
|
|
|
100
283
|
|
|
101
284
|
### 4. Set Global Options
|
|
102
285
|
|
|
103
|
-
- `concurrency` — set to 2–3 for overnight runs; keep at 1 if tasks share files or the machine is constrained.
|
|
286
|
+
- `concurrency` — set to 2–3 for overnight runs; keep at 1 if tasks share files or the machine is constrained. Use `"auto"` for swarm mode which dynamically scales concurrency.
|
|
104
287
|
- `on_failure` — use `continue` (default) when tasks are independent so one failure doesn't waste the whole run. Use `stop` when every subsequent task depends on success.
|
|
105
|
-
- `adapter` — **omit this field** to let the CLI auto-detect the first available adapter
|
|
288
|
+
- `adapter` — **omit this field** to let the CLI auto-detect the first available adapter. Only set explicitly if the user requests a specific adapter.
|
|
106
289
|
- `branch` — derive from the goal, e.g., `feat/auth-refactor`. Use a descriptive branch name.
|
|
107
|
-
- `defaults` — set sensible defaults for timeout and
|
|
290
|
+
- `defaults` — set sensible defaults for timeout, max_retries, and review. Enable `inject_lessons: true` for self-improving runs, `track_discovered_issues: true` for issue discovery, and `avoid_weak_agents: true` to route around known weaknesses. Model can be left unset for auto-detection.
|
|
108
291
|
- `gates` — include standard validation gates (lint, type-check, test) unless the user specifies otherwise.
|
|
292
|
+
- `gate_retries` — set to 1–2 if you want the engine to auto-fix gate failures by spawning a fix-up task.
|
|
293
|
+
- `guard` — enable for post-convoy compliance checks (observability, cleanup, cost reporting).
|
|
294
|
+
- For security-sensitive or database migration tasks, use `review: panel` or set `review_heuristics.panel_paths` to target critical paths.
|
|
295
|
+
- For long-running or unreliable tasks, configure `circuit_breaker` with a `fallback_agent`.
|
|
109
296
|
|
|
110
297
|
### 5. Write the Prompts
|
|
111
298
|
|
|
@@ -116,11 +303,13 @@ Each task `prompt` must be a **complete, standalone instruction**. Include:
|
|
|
116
303
|
- **Why** — business context so the agent can make good decisions.
|
|
117
304
|
- **Constraints** — coding standards, conventions, do-not-touch files.
|
|
118
305
|
- **Acceptance criteria** — bullet list of pass conditions.
|
|
119
|
-
- **Verification command** — e.g., `Run the project's test command with coverage`
|
|
306
|
+
- **Verification command** — e.g., `Run the project's test command with coverage` so the agent self-checks.
|
|
307
|
+
|
|
308
|
+
For complex tasks, consider using `steps` to break the prompt into sequential sub-prompts with individual gates at each step.
|
|
120
309
|
|
|
121
310
|
> **Weak prompt:** "Add tests for the auth module."
|
|
122
311
|
>
|
|
123
|
-
> **Strong prompt:** "Write unit tests for `libs/auth/src/server.ts` covering token refresh, expiry edge cases, and invalid signatures. Place tests in `libs/auth/src/__tests__/server.test.ts`. Follow the existing test conventions. Achieve ≥ 95 % coverage for `server.ts`. Run the project's test command with coverage
|
|
312
|
+
> **Strong prompt:** "Write unit tests for `libs/auth/src/server.ts` covering token refresh, expiry edge cases, and invalid signatures. Place tests in `libs/auth/src/__tests__/server.test.ts`. Follow the existing test conventions. Achieve ≥ 95 % coverage for `server.ts`. Run the project's test command with coverage and fix any failures."
|
|
124
313
|
|
|
125
314
|
### 6. Validate Before Outputting
|
|
126
315
|
|
|
@@ -131,6 +320,7 @@ Before presenting the YAML, mentally verify:
|
|
|
131
320
|
- [ ] No two parallel tasks share the same `files` entries (partition check)
|
|
132
321
|
- [ ] Prompts are self-contained — an agent with zero context can execute them
|
|
133
322
|
- [ ] Timeouts are reasonable for the scope of each task
|
|
323
|
+
- [ ] `outputs`/`inputs` references are consistent (consuming task depends on producing task)
|
|
134
324
|
|
|
135
325
|
### 7. Output
|
|
136
326
|
|
|
@@ -147,6 +337,9 @@ branch: <branch-name>
|
|
|
147
337
|
defaults:
|
|
148
338
|
timeout: 30m
|
|
149
339
|
max_retries: 1
|
|
340
|
+
review: fast
|
|
341
|
+
inject_lessons: true
|
|
342
|
+
track_discovered_issues: true
|
|
150
343
|
|
|
151
344
|
tasks:
|
|
152
345
|
- id: <task-id>
|
|
@@ -161,17 +354,23 @@ tasks:
|
|
|
161
354
|
- id: <next-task-id>
|
|
162
355
|
depends_on:
|
|
163
356
|
- <task-id>
|
|
164
|
-
|
|
357
|
+
agent: <agent>
|
|
358
|
+
files:
|
|
359
|
+
- <glob>
|
|
360
|
+
prompt: |
|
|
361
|
+
<full self-contained instruction>
|
|
165
362
|
|
|
166
363
|
gates:
|
|
167
364
|
- <lint command>
|
|
168
365
|
- <type-check command>
|
|
169
366
|
- <test command>
|
|
367
|
+
|
|
368
|
+
gate_retries: 1
|
|
170
369
|
````
|
|
171
370
|
|
|
172
371
|
Also provide:
|
|
173
372
|
1. A **DAG summary** showing the phase structure so the user can verify execution order.
|
|
174
373
|
2. An **estimated total duration** (sum of timeouts on the critical path).
|
|
175
|
-
3. A `--dry-run` command they can use to validate: `npx opencastle run
|
|
374
|
+
3. A `--dry-run` command they can use to validate: `npx opencastle run -f .opencastle/convoys/<feature-name>.convoy.yml --dry-run`
|
|
176
375
|
|
|
177
376
|
|