@the-open-engine/zeroshot 6.1.0 → 6.3.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/README.md +141 -474
- package/cli/commands/cmdproof.js +180 -6
- package/cli/event-copy.js +12 -0
- package/cli/index.js +311 -96
- package/cli/message-formatters-normal.js +14 -2
- package/cli/message-formatters-watch.js +9 -2
- package/cluster-hooks/block-ask-user-question.py +53 -0
- package/cluster-hooks/block-dangerous-git.py +145 -0
- package/lib/clusters-registry.js +48 -0
- package/lib/compose-utils.js +101 -0
- package/lib/detached-startup.js +9 -0
- package/lib/id-detector.js +8 -9
- package/lib/path-check.js +63 -0
- package/lib/run-mode.js +22 -0
- package/lib/start-cluster.js +39 -23
- package/package.json +3 -4
- package/scripts/check-path.js +19 -0
- package/scripts/validate-templates.js +11 -29
- package/src/agent/agent-hook-executor.js +1 -1
- package/src/agent/agent-task-executor.js +4 -3
- package/src/agent/pr-verification.js +27 -1
- package/src/agents/git-pusher-template.js +121 -4
- package/src/attach/socket-discovery.js +2 -3
- package/src/claude-credentials.js +75 -0
- package/src/claude-task-runner.js +1 -0
- package/src/isolation-manager.js +12 -9
- package/src/issue-providers/README.md +45 -15
- package/src/issue-providers/index.js +2 -0
- package/src/issue-providers/jira-provider.js +8 -1
- package/src/issue-providers/linear-provider.js +405 -0
- package/src/ledger.js +42 -3
- package/src/lib/gc.js +2 -3
- package/src/message-bus.js +10 -0
- package/src/orchestrator.js +264 -144
- package/src/preflight.js +12 -16
- package/src/providers/base-provider.js +7 -6
- package/src/status-footer.js +13 -1
- package/src/template-validation/index.js +3 -0
- package/src/template-validation/report-formatter.js +55 -0
- package/src/worktree-claude-config.js +2 -13
- package/task-lib/runner.js +1 -0
- package/task-lib/watcher.js +1 -0
package/README.md
CHANGED
|
@@ -1,554 +1,221 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/brand/zeroshot-hero-dark.png">
|
|
5
|
+
<img alt="Zeroshot. Self-driving software engineering. Layer 01 · Verification, The Open Engine." src="docs/brand/zeroshot-hero-light.png" width="100%">
|
|
6
|
+
</picture>
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
<p align="center">
|
|
7
|
-
<code>npm install -g @the-open-engine/zeroshot</code>
|
|
8
|
-
</p>
|
|
9
|
-
|
|
10
|
-
<p align="center">
|
|
11
|
-
<img src="./docs/assets/zeroshot-demo.gif" alt="Demo" width="700">
|
|
12
|
-
<br>
|
|
13
|
-
<em>Demo (100x speed, 90-minute run, 5 iterations to approval)</em>
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
[](https://github.com/the-open-engine/zeroshot/actions/workflows/ci.yml)
|
|
17
|
-
[](https://www.npmjs.com/package/@the-open-engine/zeroshot)
|
|
18
|
-
[](LICENSE)
|
|
19
|
-
[](https://nodejs.org/)
|
|
20
|
-

|
|
21
|
-
|
|
22
|
-
<!-- discord-placeholder -->
|
|
23
|
-
|
|
24
|
-
[](https://discord.gg/PdZ3UEXB)
|
|
25
|
-
|
|
26
|
-
Zeroshot is an open-source AI coding agent orchestration CLI that runs multi-agent workflows to autonomously implement, review, test, and verify code changes.
|
|
8
|
+
|
|
27
9
|
|
|
28
|
-
|
|
10
|
+
<a href="https://theopenengine.com"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/brand/social/website-dark.png"><img alt="Website" src="docs/brand/social/website-light.png" height="30"></picture></a>
|
|
11
|
+
<a href="https://x.com/OpenEngineCo"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/brand/social/x-dark.png"><img alt="X · @OpenEngineCo" src="docs/brand/social/x-light.png" height="30"></picture></a>
|
|
12
|
+
<a href="https://www.linkedin.com/company/the-open-engine-company"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/brand/social/linkedin-dark.png"><img alt="LinkedIn" src="docs/brand/social/linkedin-light.png" height="30"></picture></a>
|
|
13
|
+
<a href="https://discord.gg/fZyzf2Cut9"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/brand/social/discord-dark.png"><img alt="Discord" src="docs/brand/social/discord-light.png" height="30"></picture></a>
|
|
29
14
|
|
|
30
|
-
|
|
15
|
+
[](https://www.npmjs.com/package/@the-open-engine/zeroshot)
|
|
16
|
+
[](https://github.com/the-open-engine/zeroshot/actions/workflows/ci.yml)
|
|
17
|
+
[](LICENSE)
|
|
18
|
+
[](#install)
|
|
19
|
+
[](#install)
|
|
20
|
+
[](https://github.com/the-open-engine/zeroshot)
|
|
21
|
+
[](#the-open-engine)
|
|
31
22
|
|
|
32
|
-
|
|
23
|
+
</div>
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
- Implement: make changes in an isolated workspace (local, worktree, or Docker)
|
|
36
|
-
- Validate: run automated checks with independent validators
|
|
37
|
-
- Iterate: repeat until verified, or return actionable failures
|
|
38
|
-
- Resume: crash-safe state persisted for recovery
|
|
25
|
+
**The agent that wrote the code shouldn't be the one that says it works.**
|
|
39
26
|
|
|
40
|
-
|
|
27
|
+
Zeroshot is an open-source, multi-agent orchestration engine for autonomous software engineering. It drives a coding agent you already run (Claude Code, OpenAI Codex, Gemini CLI, or OpenCode) through an **executor-verifier loop**: an agent writes the change, then an _independent_ verifier that never saw how it was made approves it, or hands back a reproducible failure. The loop runs until the change is verified.
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
zeroshot run 123 # GitHub issue number
|
|
44
|
-
zeroshot run feature.md # Markdown file
|
|
45
|
-
zeroshot run "Add dark mode" # Inline text
|
|
46
|
-
```
|
|
29
|
+
## Install
|
|
47
30
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
zeroshot run "Add optimistic locking with automatic retry: when updating a user,
|
|
52
|
-
retry with exponential backoff up to 3 times, merge non-conflicting field changes,
|
|
53
|
-
and surface conflicts with details. Handle the ABA problem where version goes A->B->A."
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Why Not Just Use a Single AI Agent?
|
|
57
|
-
|
|
58
|
-
| Approach | Writes Code | Runs Tests | Blind Validation | Iterates Until Verified |
|
|
59
|
-
| -------------------------- | ----------- | ---------- | ---------------- | ----------------------- |
|
|
60
|
-
| Chat-based assistant | ✅ | ⚠️ | ❌ | ❌ |
|
|
61
|
-
| Single coding agent | ✅ | ⚠️ | ❌ | ⚠️ |
|
|
62
|
-
| **Zeroshot (multi-agent)** | ✅ | ✅ | ✅ | ✅ |
|
|
63
|
-
|
|
64
|
-
## Use Cases
|
|
65
|
-
|
|
66
|
-
- Autonomous AI code refactoring
|
|
67
|
-
- AI-powered pull request automation
|
|
68
|
-
- Automated bug fixing with validation
|
|
69
|
-
- Multi-agent code generation for software engineering
|
|
70
|
-
- Agentic coding workflows with blind validation
|
|
71
|
-
|
|
72
|
-
## Who Is This For?
|
|
73
|
-
|
|
74
|
-
- Senior engineers who care about correctness and reproducibility
|
|
75
|
-
- Teams automating PR workflows and code review gates
|
|
76
|
-
- Infra/platform teams standardizing agentic workflows
|
|
77
|
-
- Open-source maintainers working through issue backlogs
|
|
78
|
-
- AI power users who want verification, not vibes
|
|
79
|
-
|
|
80
|
-
## Install and Requirements
|
|
81
|
-
|
|
82
|
-
**Platforms**: Linux, macOS. Windows (native/WSL) is deferred while we harden reliability and multi-provider correctness.
|
|
31
|
+
<!-- install-placeholder -->
|
|
83
32
|
|
|
84
33
|
```bash
|
|
85
34
|
npm install -g @the-open-engine/zeroshot
|
|
86
35
|
```
|
|
87
36
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
# Install one or more providers
|
|
92
|
-
npm i -g @anthropic-ai/claude-code
|
|
93
|
-
npm i -g @openai/codex
|
|
94
|
-
npm i -g @google/gemini-cli
|
|
95
|
-
# Opencode: see https://opencode.ai
|
|
96
|
-
|
|
97
|
-
# Authenticate with the provider CLI
|
|
98
|
-
claude login # Claude
|
|
99
|
-
codex login # Codex
|
|
100
|
-
gemini auth login # Gemini
|
|
101
|
-
opencode auth login # Opencode
|
|
102
|
-
|
|
103
|
-
# GitHub auth (for issue numbers)
|
|
104
|
-
gh auth login
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Providers
|
|
108
|
-
|
|
109
|
-
Zeroshot shells out to provider CLIs. Pick a default and override per run:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
zeroshot providers
|
|
113
|
-
zeroshot providers set-default codex
|
|
114
|
-
zeroshot run 123 --provider gemini
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
See `docs/providers.md` for setup, model levels, and Docker mounts.
|
|
118
|
-
See `docs/provider-cli-helper.md` for the strict TypeScript provider helper,
|
|
119
|
-
the `zeroshot-agent-provider` JSON executable contract, and the boundary with
|
|
120
|
-
Orchestra.
|
|
121
|
-
|
|
122
|
-
## Why Multiple Agents?
|
|
123
|
-
|
|
124
|
-
Single-agent sessions degrade. Context gets buried under thousands of tokens. The model optimizes for "done" over "correct."
|
|
125
|
-
|
|
126
|
-
Zeroshot fixes this with isolated agents that check each other's work. Validators can't lie about code they didn't write. Fail the check? Fix and retry until it actually works.
|
|
127
|
-
|
|
128
|
-
## What Makes It Different
|
|
129
|
-
|
|
130
|
-
- **Blind validation** - Validators never see the worker's context or code history
|
|
131
|
-
- **Repeatable workflows** - Task complexity determines agent count and model selection
|
|
132
|
-
- **Accept/reject loop** - Rejections include actionable findings, not vague complaints
|
|
133
|
-
- **Crash recovery** - All state persisted to SQLite; resume anytime
|
|
134
|
-
- **Isolation modes** - None, git worktree, or Docker container
|
|
135
|
-
- **Cost control** - Model ceilings prevent runaway API spend
|
|
136
|
-
|
|
137
|
-
## Required Handoff Quality Gates
|
|
138
|
-
|
|
139
|
-
Zeroshot owns a tool-neutral handoff contract for `--pr` and `--ship` flows. It does not know which tool produced a gate. Repos configure required gates, validators publish matching `qualityGates` evidence, and the git-pusher trigger refuses to wake until every configured gate has fresh passing evidence after `IMPLEMENTATION_READY`.
|
|
140
|
-
|
|
141
|
-
Gate config can come from run options or repo settings:
|
|
142
|
-
|
|
143
|
-
```json
|
|
144
|
-
{
|
|
145
|
-
"ship": {
|
|
146
|
-
"requiredQualityGates": [
|
|
147
|
-
{
|
|
148
|
-
"id": "repo-quality",
|
|
149
|
-
"scope": "repo",
|
|
150
|
-
"description": "Repository quality gate",
|
|
151
|
-
"command": "repo-quality --changed --json"
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
The `id` and optional `scope` are generic. A repo may bind `repo-quality` to any local quality command, a CI status command, or another quality command outside Zeroshot. Validators receive the configured gate list and must publish entries with `status`, `completedAt` or `timestamp`, and `evidence.command`, `evidence.exitCode`, and string `evidence.output`. Failing or unavailable commands mean `approved: false` with gate status `FAIL` or `UNAVAILABLE`.
|
|
37
|
+
Requires **Node ≥ 18** and at least one provider CLI (Claude Code, Codex, Gemini, or OpenCode). Linux and macOS today; Windows is deferred.
|
|
159
38
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
39
|
+
<div align="center">
|
|
40
|
+
<img src="docs/assets/zeroshot-demo.gif" alt="Zeroshot resolving an issue through the executor-verifier loop" width="760">
|
|
41
|
+
<br>
|
|
42
|
+
<em>One run, unattended. 100× speed · 90-minute run · 5 iterations to approval.</em>
|
|
43
|
+
</div>
|
|
165
44
|
|
|
166
|
-
|
|
45
|
+
## How it works
|
|
167
46
|
|
|
168
|
-
|
|
169
|
-
```zeroshot-command-proofs
|
|
170
|
-
[
|
|
171
|
-
{
|
|
172
|
-
"id": "repo-ci",
|
|
173
|
-
"profile": "ci-equivalent",
|
|
174
|
-
"scope": "repo",
|
|
175
|
-
"description": "Repository local CI-equivalent gate",
|
|
176
|
-
"command": "bash ./scripts/ci/run-local-ci-equivalent.sh"
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
```
|
|
180
|
-
````
|
|
181
|
-
|
|
182
|
-
Repos can also configure the same commands in `.zeroshot/settings.json`:
|
|
183
|
-
|
|
184
|
-
```json
|
|
185
|
-
{
|
|
186
|
-
"ship": {
|
|
187
|
-
"commandProofs": [
|
|
188
|
-
{
|
|
189
|
-
"id": "repo-ci",
|
|
190
|
-
"profile": "ci-equivalent",
|
|
191
|
-
"scope": "repo",
|
|
192
|
-
"description": "Repository local CI-equivalent gate",
|
|
193
|
-
"command": "bash ./scripts/ci/run-local-ci-equivalent.sh"
|
|
194
|
-
}
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
```
|
|
47
|
+
Zeroshot separates the agent that **writes** the code from the agent that **judges** it.
|
|
199
48
|
|
|
200
|
-
|
|
49
|
+
A conductor sizes the workflow to the task. An executor (an AI coding agent) implements the change in an isolated workspace (git worktree or Docker). Then an **independent verifier** inspects the result without ever seeing the executor's context or history, so it cannot approve its own reasoning. The verifier returns `APPROVED`, or `REJECTED` with an actionable, reproducible failure, and the loop repeats until the change is verified or hands back a concrete reason it isn't. Every step is written to a crash-safe SQLite ledger, so a run survives a reboot and resumes where it stopped.
|
|
201
50
|
|
|
202
|
-
```
|
|
203
|
-
|
|
51
|
+
```text
|
|
52
|
+
task --> plan --> implement --> verify --> APPROVED --> done
|
|
53
|
+
^ |
|
|
54
|
+
+- REJECTED -+ (reproducible failure)
|
|
204
55
|
```
|
|
205
56
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
## When to Use Zeroshot
|
|
209
|
-
|
|
210
|
-
Zeroshot performs best when tasks have clear acceptance criteria.
|
|
57
|
+
Bring your own provider and your own backend. Zeroshot orchestrates the agents that write your code; it doesn't store your keys or replace your models.
|
|
211
58
|
|
|
212
|
-
|
|
213
|
-
| ----------------------------------------------- | --- | ------------------------- |
|
|
214
|
-
| Add rate limiting (sliding window, per-IP, 429) | Yes | Clear requirements |
|
|
215
|
-
| Refactor auth to JWT | Yes | Defined end state |
|
|
216
|
-
| Fix login bug | Yes | Success is measurable |
|
|
217
|
-
| Fix 2410 lint violations | Yes | Clear completion criteria |
|
|
218
|
-
| Make the app faster | No | Needs exploration first |
|
|
219
|
-
| Improve the codebase | No | No acceptance criteria |
|
|
220
|
-
| Figure out flaky tests | No | Exploratory |
|
|
59
|
+
## How is this different from a single coding agent?
|
|
221
60
|
|
|
222
|
-
|
|
61
|
+
| | A single coding agent | Zeroshot |
|
|
62
|
+
| --------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------- |
|
|
63
|
+
| Who says it is correct? | the same agent that wrote it | a separate agent that never saw how it was written |
|
|
64
|
+
| Is the code actually run? | usually just claimed | executed against your real tests |
|
|
65
|
+
| When it fails, you get | an assertion it is fine | a reproducible failure |
|
|
66
|
+
| When does it stop? | when it decides it is done | when the change is verified, or provably is not |
|
|
67
|
+
| Which coding agent runs it? | one, fixed | any you already run: Zeroshot is the harness around Claude Code, Codex, Gemini, or OpenCode |
|
|
223
68
|
|
|
224
|
-
##
|
|
69
|
+
## Quick start
|
|
225
70
|
|
|
226
71
|
```bash
|
|
227
|
-
#
|
|
228
|
-
zeroshot run
|
|
229
|
-
zeroshot run
|
|
230
|
-
zeroshot run "Add dark mode" # Inline text
|
|
231
|
-
|
|
232
|
-
# Isolation
|
|
233
|
-
zeroshot run 123 --worktree # git worktree
|
|
234
|
-
zeroshot run 123 --docker # container
|
|
235
|
-
|
|
236
|
-
# Automation (--ship implies --pr implies --worktree)
|
|
237
|
-
zeroshot run 123 --pr # worktree + create PR
|
|
238
|
-
zeroshot run 123 --ship # PR + auto-merge on approval
|
|
239
|
-
|
|
240
|
-
# Background mode
|
|
241
|
-
zeroshot run 123 -d
|
|
242
|
-
zeroshot run 123 --ship -d
|
|
243
|
-
|
|
244
|
-
# Control
|
|
245
|
-
zeroshot list
|
|
246
|
-
zeroshot status <id>
|
|
247
|
-
zeroshot logs <id> -f
|
|
248
|
-
zeroshot resume <id>
|
|
249
|
-
zeroshot stop <id>
|
|
250
|
-
zeroshot kill <id>
|
|
251
|
-
|
|
252
|
-
# Providers
|
|
253
|
-
zeroshot providers
|
|
254
|
-
zeroshot providers set-default codex
|
|
255
|
-
|
|
256
|
-
# Agent library
|
|
257
|
-
zeroshot agents list
|
|
258
|
-
zeroshot agents show <name>
|
|
259
|
-
|
|
260
|
-
# Maintenance
|
|
261
|
-
zeroshot clean
|
|
262
|
-
zeroshot purge
|
|
72
|
+
zeroshot run 123 # a GitHub issue number
|
|
73
|
+
zeroshot run feature.md # a markdown spec
|
|
74
|
+
zeroshot run "Add a --json flag" # inline text
|
|
263
75
|
```
|
|
264
76
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
Zeroshot works with **GitHub, GitLab, Jira, and Azure DevOps**. Just paste the issue URL or key.
|
|
268
|
-
When working in a git repository, zeroshot automatically detects the issue provider from your git remote URL. No configuration needed!
|
|
77
|
+
Describe a non-trivial task inline and let the loop run it to a verified change:
|
|
269
78
|
|
|
270
79
|
```bash
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
# GitLab (cloud and self-hosted)
|
|
276
|
-
zeroshot run https://gitlab.com/org/repo/-/issues/456
|
|
277
|
-
zeroshot run https://gitlab.mycompany.com/org/repo/-/issues/789
|
|
278
|
-
|
|
279
|
-
# Jira
|
|
280
|
-
zeroshot run PROJ-789
|
|
281
|
-
zeroshot run https://company.atlassian.net/browse/PROJ-789
|
|
282
|
-
|
|
283
|
-
# Azure DevOps
|
|
284
|
-
zeroshot run https://dev.azure.com/org/project/_workitems/edit/999
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
**Requires**: CLI tools ([`gh`](https://cli.github.com/), [`glab`](https://gitlab.com/gitlab-org/cli), [`jira`](https://github.com/go-jira/jira), or [`az`](https://docs.microsoft.com/cli/azure/)) for the platform you use. See [issue-providers README](src/issue-providers/README.md) for setup and self-hosted instances.
|
|
288
|
-
|
|
289
|
-
**Important for `--pr` mode**: Run zeroshot from the target repository directory. PRs are created on the git remote of your current directory. If you run from a different repo, zeroshot will warn you and skip the "Closes #X" reference (the PR is still created, but won't auto-close the issue).
|
|
290
|
-
|
|
291
|
-
## Architecture
|
|
292
|
-
|
|
293
|
-
Zeroshot is a message-driven coordination layer with smart defaults.
|
|
294
|
-
|
|
295
|
-
- The conductor classifies tasks by complexity and type.
|
|
296
|
-
- A workflow template selects agents and validators.
|
|
297
|
-
- Agents publish results to a SQLite ledger.
|
|
298
|
-
- Validators approve or reject with specific findings.
|
|
299
|
-
- Rejections route back to the worker for fixes.
|
|
300
|
-
|
|
301
|
-
```
|
|
302
|
-
┌─────────────────┐
|
|
303
|
-
│ TASK │
|
|
304
|
-
└────────┬────────┘
|
|
305
|
-
│
|
|
306
|
-
▼
|
|
307
|
-
┌────────────────────────────────────────────┐
|
|
308
|
-
│ CONDUCTOR │
|
|
309
|
-
│ Complexity × TaskType → Workflow │
|
|
310
|
-
└────────────────────────┬───────────────────┘
|
|
311
|
-
│
|
|
312
|
-
┌─────────────────────────────┼─────────────────────────────┐
|
|
313
|
-
│ │ │
|
|
314
|
-
▼ ▼ ▼
|
|
315
|
-
┌───────────┐ ┌───────────┐ ┌───────────┐
|
|
316
|
-
│ TRIVIAL │ │ SIMPLE │ │ STANDARD+ │
|
|
317
|
-
│ 1 agent │──────────▶ │ worker │ │ planner │
|
|
318
|
-
│ (level1) │ COMPLETE │ + 1 valid.│ │ + worker │
|
|
319
|
-
│ no valid. │ └─────┬─────┘ │ + 3-5 val.│
|
|
320
|
-
└───────────┘ │ └─────┬─────┘
|
|
321
|
-
▼ │
|
|
322
|
-
┌─────────────┐ ▼
|
|
323
|
-
┌──▶│ WORKER │ ┌─────────────┐
|
|
324
|
-
│ └──────┬──────┘ │ PLANNER │
|
|
325
|
-
│ │ └──────┬──────┘
|
|
326
|
-
│ ▼ │
|
|
327
|
-
│ ┌─────────────────────┐ ▼
|
|
328
|
-
│ │ ✓ validator │ ┌─────────────┐
|
|
329
|
-
│ │ (generic check) │ ┌──▶│ WORKER │
|
|
330
|
-
│ └──────────┬──────────┘ │ └──────┬──────┘
|
|
331
|
-
│ REJECT │ ALL OK │ │
|
|
332
|
-
└──────────────┘ │ │ ▼
|
|
333
|
-
│ │ ┌──────────────────────┐
|
|
334
|
-
│ │ │ ✓ requirements │
|
|
335
|
-
│ │ │ ✓ code (STANDARD+) │
|
|
336
|
-
│ │ │ ✓ security (CRIT) │
|
|
337
|
-
│ │ │ ✓ tester (CRIT) │
|
|
338
|
-
│ │ │ ✓ adversarial │
|
|
339
|
-
│ │ │ (real execution) │
|
|
340
|
-
│ │ └──────────┬───────────┘
|
|
341
|
-
│ │ REJECT │ ALL OK
|
|
342
|
-
│ └──────────────┘ │
|
|
343
|
-
▼ ▼
|
|
344
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
345
|
-
│ COMPLETE │
|
|
346
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
80
|
+
zeroshot run "Add optimistic locking with automatic retry: when updating a user,
|
|
81
|
+
retry with exponential backoff up to 3 times, merge non-conflicting field changes,
|
|
82
|
+
and surface conflicts with details. Handle the ABA problem where version goes A->B->A."
|
|
347
83
|
```
|
|
348
84
|
|
|
349
|
-
### Complexity Model
|
|
350
|
-
|
|
351
|
-
| Task | Complexity | Agents | Validators |
|
|
352
|
-
| ---------------------- | ---------- | ------ | ------------------------------------------------- |
|
|
353
|
-
| Fix typo in README | TRIVIAL | 1 | None |
|
|
354
|
-
| Add dark mode toggle | SIMPLE | 2 | Generic validator |
|
|
355
|
-
| Refactor auth system | STANDARD | 4 | Requirements, code |
|
|
356
|
-
| Implement payment flow | CRITICAL | 7 | Requirements, code, security, tester, adversarial |
|
|
357
|
-
|
|
358
|
-
### Model Selection by Complexity
|
|
359
|
-
|
|
360
|
-
| Complexity | Planner | Worker | Validators |
|
|
361
|
-
| ---------- | ------- | ------ | ---------- |
|
|
362
|
-
| TRIVIAL | - | level1 | - |
|
|
363
|
-
| SIMPLE | - | level2 | 1 (level2) |
|
|
364
|
-
| STANDARD | level2 | level2 | 2 (level2) |
|
|
365
|
-
| CRITICAL | level3 | level2 | 5 (level2) |
|
|
366
|
-
|
|
367
|
-
Levels map to provider-specific models. Configure with `zeroshot providers setup <provider>` or
|
|
368
|
-
`settings.providerSettings`. (Legacy `maxModel` applies to Claude only.)
|
|
369
|
-
|
|
370
85
|
<details>
|
|
371
|
-
<summary><strong>
|
|
372
|
-
|
|
373
|
-
Zeroshot is message-driven, so you can define any agent topology.
|
|
374
|
-
|
|
375
|
-
- Expert panels: parallel specialists -> aggregator -> decision
|
|
376
|
-
- Staged gates: sequential validators, each with veto power
|
|
377
|
-
- Hierarchical: supervisor dynamically spawns workers
|
|
378
|
-
- Dynamic: conductor adds agents mid-execution
|
|
379
|
-
|
|
380
|
-
**Coordination primitives:**
|
|
86
|
+
<summary><strong>Command reference</strong></summary>
|
|
381
87
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
and create a similar cluster. Save to cluster-templates/security-review.json
|
|
88
|
+
```bash
|
|
89
|
+
# Run
|
|
90
|
+
zeroshot run <input> # issue number / URL / key / markdown file / inline text
|
|
91
|
+
zeroshot run 123 --worktree # isolate in a git worktree
|
|
92
|
+
zeroshot run 123 --docker # isolate in a container
|
|
93
|
+
zeroshot run 123 --pr # worktree + open a pull request
|
|
94
|
+
zeroshot run 123 --ship # worktree + PR + auto-merge on approval
|
|
95
|
+
zeroshot run 123 -d # background (daemon)
|
|
96
|
+
zeroshot run 123 --provider gemini # override the provider for this run
|
|
97
|
+
|
|
98
|
+
# Monitor & manage
|
|
99
|
+
zeroshot list # all clusters (--json)
|
|
100
|
+
zeroshot status <id> # cluster details
|
|
101
|
+
zeroshot logs <id> -f # stream logs
|
|
102
|
+
zeroshot resume <id> [prompt] # resume a stopped/failed run
|
|
103
|
+
zeroshot stop <id> # graceful stop
|
|
104
|
+
zeroshot kill <id> # force kill
|
|
105
|
+
zeroshot export <id> # export the conversation
|
|
106
|
+
|
|
107
|
+
# Library & config
|
|
108
|
+
zeroshot providers # list providers / set-default / setup
|
|
109
|
+
zeroshot agents list # available agents (agents show <name>)
|
|
110
|
+
zeroshot settings # view / get / set settings
|
|
111
|
+
zeroshot cmdproof check <id> # reuse a verified command result
|
|
407
112
|
```
|
|
408
113
|
|
|
409
|
-
Built-in validation checks for missing triggers, deadlocks, and invalid type wiring before running.
|
|
410
|
-
|
|
411
|
-
See [CLAUDE.md](./CLAUDE.md) for the cluster schema and examples.
|
|
412
|
-
|
|
413
114
|
</details>
|
|
414
115
|
|
|
415
|
-
##
|
|
116
|
+
## Providers and backends
|
|
416
117
|
|
|
417
|
-
|
|
118
|
+
Zeroshot shells out to provider CLIs; it stores no API keys and manages no auth. Pick a default and override per run.
|
|
418
119
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
### Git Worktree (Default for --pr/--ship)
|
|
120
|
+
| Provider | CLI |
|
|
121
|
+
| ------------ | -------------------------------------- |
|
|
122
|
+
| Claude Code | `npm i -g @anthropic-ai/claude-code` |
|
|
123
|
+
| OpenAI Codex | `npm i -g @openai/codex` |
|
|
124
|
+
| Gemini CLI | `npm i -g @google/gemini-cli` |
|
|
125
|
+
| OpenCode | see [opencode.ai](https://opencode.ai) |
|
|
426
126
|
|
|
427
127
|
```bash
|
|
428
|
-
zeroshot
|
|
128
|
+
zeroshot providers # see what's installed
|
|
129
|
+
zeroshot providers set-default codex
|
|
130
|
+
zeroshot run 123 --provider gemini
|
|
429
131
|
```
|
|
430
132
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
### Docker Container
|
|
133
|
+
Issue backends are **auto-detected from your git remote**: **GitHub, GitLab, Jira, and Azure DevOps**. Paste a number, key, or URL:
|
|
434
134
|
|
|
435
135
|
```bash
|
|
436
|
-
zeroshot run 123
|
|
136
|
+
zeroshot run 123 # GitHub
|
|
137
|
+
zeroshot run https://gitlab.com/org/repo/-/issues/456 # GitLab
|
|
138
|
+
zeroshot run PROJ-789 # Jira
|
|
139
|
+
zeroshot run https://dev.azure.com/org/project/_workitems/edit/999 # Azure DevOps
|
|
437
140
|
```
|
|
438
141
|
|
|
439
|
-
|
|
142
|
+
Each backend needs its own CLI installed (`gh`, `glab`, `jira`, or `az`). See [`docs/providers.md`](docs/providers.md) for model levels and setup.
|
|
440
143
|
|
|
441
|
-
|
|
144
|
+
## Isolation
|
|
442
145
|
|
|
443
|
-
|
|
444
|
-
| ------------------------------------ | ---------------------- |
|
|
445
|
-
| Quick task, review changes yourself | No isolation (default) |
|
|
446
|
-
| PR workflow, code review | `--worktree` or `--pr` |
|
|
447
|
-
| Risky experiment, might break things | `--docker` |
|
|
448
|
-
| Running multiple tasks in parallel | `--docker` |
|
|
449
|
-
| Full automation, no review needed | `--ship` |
|
|
146
|
+
By default, agents modify files only; they do **not** commit or push. Opt into isolation to let the loop own a branch (the flags cascade: `--ship` → `--pr` → `--worktree`).
|
|
450
147
|
|
|
451
|
-
|
|
148
|
+
| Mode | Flag | Use when |
|
|
149
|
+
| ------------ | ------------ | ------------------------------------------------ |
|
|
150
|
+
| None | _(default)_ | quick task, you review the changes yourself |
|
|
151
|
+
| Git worktree | `--worktree` | PR workflows, lightweight branch isolation |
|
|
152
|
+
| Docker | `--docker` | risky experiments, parallel runs, full isolation |
|
|
452
153
|
|
|
453
154
|
<details>
|
|
454
|
-
<summary><strong>Docker
|
|
455
|
-
|
|
456
|
-
When using `--docker`, zeroshot mounts credential directories so agents can access provider CLIs and tools like AWS, Azure, and kubectl.
|
|
155
|
+
<summary><strong>Docker credential mounts</strong></summary>
|
|
457
156
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
**Available presets**: `gh`, `git`, `ssh`, `aws`, `azure`, `kube`, `terraform`, `gcloud`, `claude`, `codex`, `gemini`
|
|
157
|
+
When using `--docker`, Zeroshot mounts credential directories so agents can reach provider CLIs and tools. Defaults: `gh`, `git`, `ssh`. Presets include `aws`, `azure`, `kube`, `terraform`, `gcloud`, and the provider configs.
|
|
461
158
|
|
|
462
159
|
```bash
|
|
463
|
-
|
|
464
|
-
zeroshot settings set dockerMounts '["gh", "git", "ssh", "aws", "azure"]'
|
|
465
|
-
|
|
466
|
-
# View current config
|
|
467
|
-
zeroshot settings get dockerMounts
|
|
468
|
-
|
|
469
|
-
# Per-run override
|
|
160
|
+
zeroshot settings set dockerMounts '["gh","git","ssh","aws"]'
|
|
470
161
|
zeroshot run 123 --docker --mount ~/.aws:/root/.aws:ro
|
|
471
|
-
|
|
472
|
-
# Provider credentials
|
|
473
|
-
zeroshot run 123 --docker --mount ~/.config/codex:/home/node/.config/codex:ro
|
|
474
|
-
zeroshot run 123 --docker --mount ~/.config/gemini:/home/node/.config/gemini:ro
|
|
475
|
-
|
|
476
|
-
# Disable all mounts
|
|
477
162
|
zeroshot run 123 --docker --no-mounts
|
|
478
|
-
|
|
479
|
-
# CI: env var override
|
|
480
|
-
ZEROSHOT_DOCKER_MOUNTS='["aws","azure"]' zeroshot run 123 --docker
|
|
481
163
|
```
|
|
482
164
|
|
|
483
|
-
See `docs/providers.md` for
|
|
484
|
-
|
|
485
|
-
**Custom mounts** (mix presets with explicit paths):
|
|
165
|
+
See [`docs/providers.md`](docs/providers.md) for mount details.
|
|
486
166
|
|
|
487
|
-
|
|
488
|
-
zeroshot settings set dockerMounts '[
|
|
489
|
-
"gh",
|
|
490
|
-
"git",
|
|
491
|
-
{"host": "~/.myconfig", "container": "$HOME/.myconfig", "readonly": true}
|
|
492
|
-
]'
|
|
493
|
-
```
|
|
167
|
+
</details>
|
|
494
168
|
|
|
495
|
-
|
|
169
|
+
## Scope and status
|
|
496
170
|
|
|
497
|
-
|
|
498
|
-
zeroshot settings set dockerContainerHome '/home/node'
|
|
499
|
-
# Or per-run:
|
|
500
|
-
zeroshot run 123 --docker --container-home /home/node
|
|
501
|
-
```
|
|
171
|
+
Zeroshot performs best when a task has **clear acceptance criteria**. If you can't say what "done" means, an independent verifier can't confirm it.
|
|
502
172
|
|
|
503
|
-
|
|
173
|
+
| Task | Good fit? | Why |
|
|
174
|
+
| ----------------------------------------------- | --------- | ----------------------- |
|
|
175
|
+
| Add rate limiting (sliding window, per-IP, 429) | Yes | clear requirements |
|
|
176
|
+
| Refactor auth to JWT | Yes | defined end state |
|
|
177
|
+
| Fix a login bug | Yes | success is measurable |
|
|
178
|
+
| "Make the app faster" | No | needs exploration first |
|
|
179
|
+
| "Improve the codebase" | No | no acceptance criteria |
|
|
504
180
|
|
|
505
|
-
|
|
506
|
-
zeroshot
|
|
507
|
-
|
|
181
|
+
- **Pre-1.0 in spirit.** Interfaces still move between releases; pin your version. (The npm version auto-increments on every merge, so read it as a build counter, not a stability promise.)
|
|
182
|
+
- **Crash-safe.** All state persists to a SQLite ledger; `zeroshot resume <id>` continues at any time.
|
|
183
|
+
- **No TUI in this release.** Monitor with `zeroshot logs <id> -f`, `zeroshot list`, and `zeroshot status <id>`.
|
|
508
184
|
|
|
509
|
-
|
|
185
|
+
<details>
|
|
186
|
+
<summary><strong>Architecture, quality gates and command proofs</strong></summary>
|
|
510
187
|
|
|
511
|
-
|
|
188
|
+
Zeroshot is a message-driven coordination layer: a conductor classifies each task by complexity and type, a workflow template selects agents and validators, agents publish results to a SQLite ledger, and validators approve or reject with specific findings.
|
|
512
189
|
|
|
513
|
-
-
|
|
514
|
-
-
|
|
515
|
-
- `docs/context-management.md` - Context selection, context packs, and state snapshots
|
|
516
|
-
- [Discord](https://discord.gg/PdZ3UEXB) - Support and community
|
|
517
|
-
- `zeroshot export <id>` - Export conversation to markdown
|
|
518
|
-
- `sqlite3 ~/.zeroshot/*.db` - Direct ledger access for debugging
|
|
190
|
+
- **Required handoff quality gates**: in `--pr`/`--ship` flows, the git-pusher fails closed until every configured gate has fresh passing evidence.
|
|
191
|
+
- **Cmdproof**: make expensive exact commands reusable across agents with `zeroshot cmdproof check <id>`.
|
|
519
192
|
|
|
520
|
-
|
|
521
|
-
<summary><strong>Troubleshooting</strong></summary>
|
|
522
|
-
|
|
523
|
-
| Issue | Fix |
|
|
524
|
-
| ----------------------------- | ----------------------------------------------------------------------------------------- |
|
|
525
|
-
| `claude: command not found` | `npm i -g @anthropic-ai/claude-code && claude auth login` |
|
|
526
|
-
| `codex: command not found` | `npm i -g @openai/codex && codex login` |
|
|
527
|
-
| `gemini: command not found` | `npm i -g @google/gemini-cli && gemini auth login` |
|
|
528
|
-
| `gh: command not found` | [Install GitHub CLI](https://cli.github.com/) |
|
|
529
|
-
| `--docker` fails | Docker must be running: `docker ps` to verify |
|
|
530
|
-
| Cluster stuck | `zeroshot resume <id>` to continue |
|
|
531
|
-
| Agent keeps failing | Check `zeroshot logs <id>` for actual error |
|
|
532
|
-
| `zeroshot: command not found` | `npm install -g @the-open-engine/zeroshot` |
|
|
533
|
-
| Agents misbehave | `/analyze-cluster-postmortem <id>` in Claude Code (creates issue if fix is generalizable) |
|
|
193
|
+
See [CLAUDE.md](./CLAUDE.md) for the cluster schema, primitives, and the conductor's classification model.
|
|
534
194
|
|
|
535
195
|
</details>
|
|
536
196
|
|
|
537
|
-
##
|
|
197
|
+
## The Open Engine
|
|
538
198
|
|
|
539
|
-
|
|
199
|
+
Zeroshot is **Layer 01 · Verification** of [The Open Engine](https://theopenengine.com), the open stack for autonomous software production. Generating code is easy; trusting it is not. The engine is layered because trust is layered:
|
|
540
200
|
|
|
541
|
-
|
|
201
|
+
| | Layer | Status |
|
|
202
|
+
| ------ | -------------------------- | --------------------------- |
|
|
203
|
+
| **01** | **Verification: Zeroshot** | This repo · open · shipping |
|
|
204
|
+
| 02 | Constraints: **Opcore** | Sibling · alpha |
|
|
205
|
+
| 03-05 | Intent · Context · Runtime | In development |
|
|
542
206
|
|
|
543
|
-
|
|
207
|
+
Zeroshot runs the loop: an agent writes the change, and an **independent** verifier decides whether it holds: approve, or a reproducible failure. **Opcore** is the sibling layer, a deterministic, local, read-only **constraints** gate for coding agents (currently private alpha `0.1.0-alpha.0`, built in the open, not yet published). Verification asks _"does this meet the goal?"_; constraints ask _"is this within tolerance?"_
|
|
544
208
|
|
|
545
|
-
|
|
209
|
+
Each layer ships the same way: extracted from the platform we run, then opened. **Trust nothing. Verify everything.**
|
|
546
210
|
|
|
547
|
-
|
|
548
|
-
|
|
211
|
+
## Contributing
|
|
212
|
+
|
|
213
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before participating, and [SECURITY.md](SECURITY.md) for security reports. More in [`docs/`](docs/) and [CLAUDE.md](./CLAUDE.md).
|
|
214
|
+
|
|
215
|
+
<!-- discord-placeholder -->
|
|
549
216
|
|
|
550
|
-
|
|
217
|
+
Questions and help: [Discord](https://discord.gg/fZyzf2Cut9).
|
|
551
218
|
|
|
552
|
-
|
|
219
|
+
## License
|
|
553
220
|
|
|
554
|
-
|
|
221
|
+
MIT. [The Open Engine Company](https://github.com/the-open-engine).
|