opencastle 0.31.0 → 0.31.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/README.md +3 -3
- package/bin/cli.mjs +4 -2
- package/dist/cli/convoy/spec-builder.d.ts +68 -0
- package/dist/cli/convoy/spec-builder.d.ts.map +1 -0
- package/dist/cli/convoy/spec-builder.js +179 -0
- package/dist/cli/convoy/spec-builder.js.map +1 -0
- package/dist/cli/convoy/spec-builder.test.d.ts +2 -0
- package/dist/cli/convoy/spec-builder.test.d.ts.map +1 -0
- package/dist/cli/convoy/spec-builder.test.js +453 -0
- package/dist/cli/convoy/spec-builder.test.js.map +1 -0
- package/dist/cli/pipeline.d.ts +1 -0
- package/dist/cli/pipeline.d.ts.map +1 -1
- package/dist/cli/pipeline.js +254 -185
- package/dist/cli/pipeline.js.map +1 -1
- package/dist/cli/pipeline.test.js +15 -1
- package/dist/cli/pipeline.test.js.map +1 -1
- package/dist/cli/plan.d.ts +1 -1
- package/dist/cli/plan.d.ts.map +1 -1
- package/dist/cli/plan.js +4 -4
- package/dist/cli/plan.js.map +1 -1
- package/dist/cli/prompt.js +2 -1
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/run/adapters/claude.js +2 -2
- package/dist/cli/run/adapters/claude.js.map +1 -1
- package/dist/cli/run/adapters/copilot.js +2 -2
- package/dist/cli/run/adapters/copilot.js.map +1 -1
- package/dist/cli/run/adapters/cursor.js +1 -1
- package/dist/cli/run/adapters/cursor.js.map +1 -1
- package/dist/cli/run/adapters/opencode.js +1 -1
- package/dist/cli/run/adapters/opencode.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/convoy/spec-builder.test.ts +523 -0
- package/src/cli/convoy/spec-builder.ts +221 -0
- package/src/cli/pipeline.test.ts +21 -1
- package/src/cli/pipeline.ts +274 -224
- package/src/cli/plan.ts +5 -4
- package/src/cli/prompt.ts +1 -1
- package/src/cli/run/adapters/claude.ts +2 -2
- package/src/cli/run/adapters/copilot.ts +2 -2
- package/src/cli/run/adapters/cursor.ts +1 -1
- package/src/cli/run/adapters/opencode.ts +1 -1
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/prompts/fix-convoy.prompt.md +47 -56
- package/src/orchestrator/prompts/generate-convoy.prompt.md +85 -295
- package/src/orchestrator/prompts/validate-convoy.prompt.md +31 -42
|
@@ -138,7 +138,7 @@ async function executeViaSdk(task: Task, options: ExecuteOptions = {}): Promise<
|
|
|
138
138
|
: undefined
|
|
139
139
|
return {
|
|
140
140
|
success: true,
|
|
141
|
-
output: output.slice(0,
|
|
141
|
+
output: output.slice(0, 500_000),
|
|
142
142
|
exitCode: 0,
|
|
143
143
|
usage: usageResult,
|
|
144
144
|
}
|
|
@@ -233,7 +233,7 @@ export async function executeViaCli(task: Task, options: ExecuteOptions = {}): P
|
|
|
233
233
|
} catch { /* not JSON or no usage — graceful degradation */ }
|
|
234
234
|
resolve({
|
|
235
235
|
success: code === 0,
|
|
236
|
-
output: output.slice(0,
|
|
236
|
+
output: output.slice(0, 500_000),
|
|
237
237
|
exitCode: code ?? -1,
|
|
238
238
|
usage,
|
|
239
239
|
})
|
|
@@ -108,7 +108,7 @@ async function executeViaSdk(task: Task, options: ExecuteOptions = {}): Promise<
|
|
|
108
108
|
} : undefined
|
|
109
109
|
return {
|
|
110
110
|
success: true,
|
|
111
|
-
output: output.slice(0,
|
|
111
|
+
output: output.slice(0, 500_000),
|
|
112
112
|
exitCode: 0,
|
|
113
113
|
usage: usageResult,
|
|
114
114
|
}
|
|
@@ -203,7 +203,7 @@ async function executeViaCli(task: Task, options: ExecuteOptions = {}): Promise<
|
|
|
203
203
|
} catch { /* not JSON or no usage — graceful degradation */ }
|
|
204
204
|
resolve({
|
|
205
205
|
success: code === 0,
|
|
206
|
-
output: output.slice(0,
|
|
206
|
+
output: output.slice(0, 500_000),
|
|
207
207
|
exitCode: code ?? -1,
|
|
208
208
|
usage,
|
|
209
209
|
})
|
|
@@ -98,7 +98,7 @@ export async function execute(task: Task, options: ExecuteOptions = {}): Promise
|
|
|
98
98
|
} catch { /* not JSON or no usage — graceful degradation */ }
|
|
99
99
|
resolve({
|
|
100
100
|
success: code === 0,
|
|
101
|
-
output: output.slice(0,
|
|
101
|
+
output: output.slice(0, 500_000),
|
|
102
102
|
exitCode: code ?? -1,
|
|
103
103
|
usage,
|
|
104
104
|
})
|
|
@@ -89,7 +89,7 @@ export async function execute(task: Task, options: ExecuteOptions = {}): Promise
|
|
|
89
89
|
} catch { /* not JSON or no usage — graceful degradation */ }
|
|
90
90
|
resolve({
|
|
91
91
|
success: code === 0,
|
|
92
|
-
output: output.slice(0,
|
|
92
|
+
output: output.slice(0, 500_000),
|
|
93
93
|
exitCode: code ?? -1,
|
|
94
94
|
usage,
|
|
95
95
|
})
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "4f137c25",
|
|
3
3
|
"configHash": "30f8ea04",
|
|
4
|
-
"lockfileHash": "
|
|
5
|
-
"browserHash": "
|
|
4
|
+
"lockfileHash": "82bb881c",
|
|
5
|
+
"browserHash": "353b1dbb",
|
|
6
6
|
"optimized": {
|
|
7
7
|
"astro > cssesc": {
|
|
8
8
|
"src": "../../../../../node_modules/cssesc/cssesc.js",
|
|
9
9
|
"file": "astro___cssesc.js",
|
|
10
|
-
"fileHash": "
|
|
10
|
+
"fileHash": "0f534c8a",
|
|
11
11
|
"needsInterop": true
|
|
12
12
|
},
|
|
13
13
|
"astro > aria-query": {
|
|
14
14
|
"src": "../../../../../node_modules/aria-query/lib/index.js",
|
|
15
15
|
"file": "astro___aria-query.js",
|
|
16
|
-
"fileHash": "
|
|
16
|
+
"fileHash": "8e98e147",
|
|
17
17
|
"needsInterop": true
|
|
18
18
|
},
|
|
19
19
|
"astro > axobject-query": {
|
|
20
20
|
"src": "../../../../../node_modules/axobject-query/lib/index.js",
|
|
21
21
|
"file": "astro___axobject-query.js",
|
|
22
|
-
"fileHash": "
|
|
22
|
+
"fileHash": "8e5189a3",
|
|
23
23
|
"needsInterop": true
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 'Fix
|
|
2
|
+
description: 'Fix validation errors in a convoy task plan by outputting targeted JSON patches.'
|
|
3
3
|
agent: 'Team Lead (OpenCastle)'
|
|
4
|
-
output:
|
|
4
|
+
output: json
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
8
8
|
|
|
9
|
-
# Fix
|
|
9
|
+
# Fix Task Plan
|
|
10
10
|
|
|
11
|
-
You are the Team Lead. The
|
|
11
|
+
You are the Team Lead. The task plan below has validation errors. Fix every error by outputting targeted JSON patches.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Task Plan
|
|
14
14
|
|
|
15
|
-
```
|
|
15
|
+
```json
|
|
16
16
|
{{goal}}
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -22,58 +22,49 @@ You are the Team Lead. The convoy spec below failed validation. Fix **every repo
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
1. Read every error before
|
|
28
|
-
2. Fix
|
|
29
|
-
3.
|
|
30
|
-
4.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
`api-designer`, `architect`, `content-engineer`, `copywriter`, `data-expert`,
|
|
56
|
-
`database-engineer`, `developer`, `devops-expert`, `documentation-writer`,
|
|
57
|
-
`performance-expert`, `release-manager`, `researcher`, `security-expert`,
|
|
58
|
-
`seo-specialist`, `team-lead`, `testing-expert`, `ui-ux-expert`
|
|
25
|
+
## Instructions
|
|
26
|
+
|
|
27
|
+
1. Read every error before writing patches.
|
|
28
|
+
2. Fix ALL reported errors — do not partially fix.
|
|
29
|
+
3. Preserve intent, agent assignments, and task scope. Only fix what is broken.
|
|
30
|
+
4. Each patch replaces ONE field on ONE task.
|
|
31
|
+
|
|
32
|
+
## Patch Format
|
|
33
|
+
|
|
34
|
+
Output a single `json` fenced code block with an array of patches:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
"task_id": "the-task-id",
|
|
40
|
+
"field": "prompt",
|
|
41
|
+
"value": "Complete corrected prompt text..."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"task_id": "another-task",
|
|
45
|
+
"field": "depends_on",
|
|
46
|
+
"value": ["project-scaffold", "shared-ui-components"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"task_id": "_plan",
|
|
50
|
+
"field": "concurrency",
|
|
51
|
+
"value": 2
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
```
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
- `
|
|
62
|
-
- `
|
|
63
|
-
- `
|
|
56
|
+
### Patch fields
|
|
57
|
+
- `task_id`: Task ID to modify, or `"_plan"` for top-level plan fields (`name`, `branch`, `concurrency`, `on_failure`, `gates`, `gate_retries`)
|
|
58
|
+
- `field`: Field name to replace (`prompt`, `files`, `depends_on`, `agent`, `timeout`, `description`, `max_retries`, `review`, `gates`)
|
|
59
|
+
- `value`: Complete new value (replaces old value entirely)
|
|
64
60
|
|
|
65
|
-
|
|
61
|
+
### Common fixes
|
|
62
|
+
- **Truncated prompt** → patch `field: "prompt"` with the complete, self-contained prompt text
|
|
63
|
+
- **Missing dependency** → patch `field: "depends_on"` with the corrected array
|
|
64
|
+
- **Partition conflict** → patch `field: "files"` to use specific paths, or patch `field: "depends_on"` to add sequencing
|
|
65
|
+
- **Wrong agent** → patch `field: "agent"` with correct value from roster
|
|
66
|
+
- **Vague prompt** → patch with detailed, file-specific prompt including acceptance criteria
|
|
66
67
|
|
|
67
68
|
## Output
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```yaml
|
|
72
|
-
# .opencastle/convoys/<same-filename-as-original>
|
|
73
|
-
name: ...
|
|
74
|
-
version: 2
|
|
75
|
-
tasks:
|
|
76
|
-
...
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Do not add explanatory prose before or after the YAML block.
|
|
70
|
+
Your entire response must be a single `json` fenced code block with the patches array. No text before or after.
|