@the-open-engine-company/zeroshot 11.1.0 → 12.0.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.
- package/bin/zeroshot.js +10 -2
- package/package.json +1 -1
- package/skills/zeroshot/SKILL.md +33 -1
- package/skills/zeroshot-plan/SKILL.md +34 -0
package/bin/zeroshot.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
const fs = require('fs');
|
|
5
|
+
const os = require('os');
|
|
5
6
|
const path = require('path');
|
|
6
7
|
const { spawnSync } = require('child_process');
|
|
7
8
|
const { selectTarget } = require('../lib/install');
|
|
@@ -16,8 +17,15 @@ try {
|
|
|
16
17
|
}
|
|
17
18
|
const result = spawnSync(binary, process.argv.slice(2), { stdio: 'inherit' });
|
|
18
19
|
if (result.error) throw result.error;
|
|
19
|
-
if (result.signal)
|
|
20
|
-
|
|
20
|
+
if (result.signal) {
|
|
21
|
+
// Node ignores some signals, such as SIGPIPE and SIGXFSZ, so the re-raise can return.
|
|
22
|
+
// Then exit with the status a shell reports for that signal death.
|
|
23
|
+
const number = os.constants.signals[result.signal];
|
|
24
|
+
process.exitCode = number === undefined ? 1 : 128 + number;
|
|
25
|
+
process.kill(process.pid, result.signal);
|
|
26
|
+
} else {
|
|
27
|
+
process.exitCode = result.status === null ? 1 : result.status;
|
|
28
|
+
}
|
|
21
29
|
} catch (error) {
|
|
22
30
|
process.stderr.write(`zeroshot: ${error.message}\n`);
|
|
23
31
|
process.exitCode = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-open-engine-company/zeroshot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "The open-source engine for autonomous software production. Orchestrate coding agents through implementation, code review, testing and repair.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
package/skills/zeroshot/SKILL.md
CHANGED
|
@@ -30,7 +30,8 @@ a plan file exists (`.zeroshot/plans/<id>.md`), use its Goal, Context, Acceptanc
|
|
|
30
30
|
Constraints, Decided approach and Decisions as the task. Criteria marked `Check (manual):` need a
|
|
31
31
|
person or another environment: tell the run to list them rather than verify them. If the plan lists
|
|
32
32
|
`depends_on`, confirm with the user that those plans are built and merged before starting it, and
|
|
33
|
-
include any constraints they share that the plan does not repeat
|
|
33
|
+
include any constraints they share that the plan does not repeat, or submit the dependent plans
|
|
34
|
+
together as a stack on Platform (see Submit a stack).
|
|
34
35
|
|
|
35
36
|
Never start a Zeroshot run merely because the skill is available. The user must ask to use Zeroshot.
|
|
36
37
|
A worker already executing inside a Zeroshot run should perform its assigned work directly, not start
|
|
@@ -251,6 +252,37 @@ Named targets receive the remote revision, not uncommitted files. Check dirty or
|
|
|
251
252
|
never push or omit it without authorization. Confirm the exact repository, branch, revision, target,
|
|
252
253
|
profile, and delivery intent reported for the run.
|
|
253
254
|
|
|
255
|
+
## Submit a stack
|
|
256
|
+
|
|
257
|
+
A stack submits several dependent tasks to Platform at once, for example the stack manifest the
|
|
258
|
+
`zeroshot-plan` skill writes as `.zeroshot/plans/<id>.stack.json`. It is atomic and immutable: every
|
|
259
|
+
run uses one repository, base branch and profile, and `needs` decides which runs must succeed before
|
|
260
|
+
another starts without passing output between them. Submit one only when the user asks. The
|
|
261
|
+
manifest's `delivery` is required; when it is still a placeholder, ask the user to choose:
|
|
262
|
+
|
|
263
|
+
- `merge`: each run merges into the base branch before the runs that need it start. The profile
|
|
264
|
+
needs exactly one Git merge delivery node, `merge@2` or `merge@3` (`--ship` templates use
|
|
265
|
+
`merge@3`).
|
|
266
|
+
- `stacked_pull_requests`: Zeroshot puts the runs in one line, in dependency order with ties broken
|
|
267
|
+
by run name, and each run opens a pull request against the branch of the run before it. Nothing
|
|
268
|
+
merges; the stack is done when every pull request is open. The profile needs exactly one `pr@2`
|
|
269
|
+
delivery node, the `software-change` default.
|
|
270
|
+
|
|
271
|
+
Agent bindings in the profile must not declare `GH_TOKEN`. Validate, show the user the printed order
|
|
272
|
+
for stacked pull requests, then submit with a stable key and follow it:
|
|
273
|
+
|
|
274
|
+
```console
|
|
275
|
+
zeroshot stack validate STACK.json
|
|
276
|
+
zeroshot stack submit STACK.json --target platform --submission-key KEY
|
|
277
|
+
zeroshot stack status STACK_ID --target platform
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
`zeroshot stack --help` documents the manifest. Stacked pull requests are reviewed and merged from
|
|
281
|
+
the bottom up. GitHub moves a child pull request onto the base branch when its merged parent's
|
|
282
|
+
branch is deleted; a squash-merged parent, or a parent changed during review, leaves the pull
|
|
283
|
+
requests above it to rebase by hand. `zeroshot stack force-stop` stops every unfinished run; use it
|
|
284
|
+
only when the user intends to stop the stack.
|
|
285
|
+
|
|
254
286
|
## Observe and troubleshoot
|
|
255
287
|
|
|
256
288
|
Keep the run ID and target:
|
|
@@ -212,3 +212,37 @@ prepares the edit you are about to make; this skill writes a plan file that outl
|
|
|
212
212
|
`zeroshot` skill with the plan's Goal, Context, Acceptance criteria, Constraints, Decided approach
|
|
213
213
|
and Decisions as the task, and start it only when the user asks. After the run, remind the user of
|
|
214
214
|
the manual checks it could not perform.
|
|
215
|
+
- **Stack:** when the plans you wrote are linked by `depends_on`, offer to also write a stack
|
|
216
|
+
manifest so Zeroshot Platform can build them in order from one submission. Write it only when the
|
|
217
|
+
user agrees, as `.zeroshot/plans/<id>.stack.json` beside the plans, where `<id>` is the plan the
|
|
218
|
+
others build on:
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"schema": "zeroshot.stack/v1",
|
|
223
|
+
"title": "<title of that plan>",
|
|
224
|
+
"delivery": "<merge or stacked_pull_requests>",
|
|
225
|
+
"source": { "repository": "<owner/name>", "branch": "<base branch>" },
|
|
226
|
+
"profile": "<org:NAME or user:NAME>",
|
|
227
|
+
"expiresAt": "<RFC 3339 time, at most seven days ahead>",
|
|
228
|
+
"runs": {
|
|
229
|
+
"<plan id>": {
|
|
230
|
+
"needs": ["<ids from the plan's depends_on>"],
|
|
231
|
+
"input": { "task": "<the plan's Goal through Decisions>" }
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Add one run per plan, named by its id. Its task is one string holding the plan's Goal, Context,
|
|
238
|
+
Acceptance criteria, Constraints, Decided approach and Decisions sections as written, the task a
|
|
239
|
+
single run would get; use the profile's own input field if it has no `task`. `needs` lists the
|
|
240
|
+
`depends_on` ids that are in this stack and is omitted when there are none; a dependency outside
|
|
241
|
+
the stack must be built and merged before the stack is submitted. Take the repository and base
|
|
242
|
+
branch from the checkout and ask for the Platform profile and deadline. Leave `delivery` to the
|
|
243
|
+
user and keep the placeholder until they choose: `merge` merges each plan into the base branch
|
|
244
|
+
before the plans that need it start; `stacked_pull_requests` builds the plans in one line, in
|
|
245
|
+
dependency order with ties broken by id, and opens one pull request per plan against the branch of
|
|
246
|
+
the plan before it, merging nothing. Check the file with `zeroshot stack validate` when the CLI is
|
|
247
|
+
installed (the placeholder fails until `delivery` is chosen) and leave submission to the
|
|
248
|
+
`zeroshot` skill.
|