@covibes/zeroshot 5.2.1 → 5.4.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/CHANGELOG.md +174 -189
- package/README.md +226 -195
- package/cli/commands/providers.js +149 -0
- package/cli/index.js +3145 -2366
- package/cli/lib/first-run.js +40 -3
- package/cli/message-formatters-normal.js +28 -6
- package/cluster-templates/base-templates/debug-workflow.json +24 -78
- package/cluster-templates/base-templates/full-workflow.json +99 -316
- package/cluster-templates/base-templates/single-worker.json +23 -15
- package/cluster-templates/base-templates/worker-validator.json +105 -36
- package/cluster-templates/conductor-bootstrap.json +9 -7
- package/lib/docker-config.js +14 -1
- package/lib/git-remote-utils.js +165 -0
- package/lib/id-detector.js +10 -7
- package/lib/provider-defaults.js +62 -0
- package/lib/provider-detection.js +59 -0
- package/lib/provider-names.js +57 -0
- package/lib/settings/claude-auth.js +78 -0
- package/lib/settings.js +298 -15
- package/lib/stream-json-parser.js +4 -238
- package/package.json +27 -6
- package/scripts/setup-merge-queue.sh +170 -0
- package/scripts/validate-templates.js +100 -0
- package/src/agent/agent-config.js +140 -63
- package/src/agent/agent-context-builder.js +336 -165
- package/src/agent/agent-hook-executor.js +337 -67
- package/src/agent/agent-lifecycle.js +386 -287
- package/src/agent/agent-stuck-detector.js +7 -7
- package/src/agent/agent-task-executor.js +944 -683
- package/src/agent/output-extraction.js +217 -0
- package/src/agent/output-reformatter.js +175 -0
- package/src/agent/schema-utils.js +146 -0
- package/src/agent-wrapper.js +112 -31
- package/src/agents/git-pusher-template.js +285 -0
- package/src/claude-task-runner.js +145 -44
- package/src/config-router.js +13 -13
- package/src/config-validator.js +1049 -563
- package/src/input-helpers.js +65 -0
- package/src/isolation-manager.js +499 -320
- package/src/issue-providers/README.md +305 -0
- package/src/issue-providers/azure-devops-provider.js +273 -0
- package/src/issue-providers/base-provider.js +232 -0
- package/src/issue-providers/github-provider.js +179 -0
- package/src/issue-providers/gitlab-provider.js +241 -0
- package/src/issue-providers/index.js +196 -0
- package/src/issue-providers/jira-provider.js +239 -0
- package/src/ledger.js +50 -11
- package/src/lib/safe-exec.js +88 -0
- package/src/orchestrator.js +1348 -757
- package/src/preflight.js +306 -149
- package/src/process-metrics.js +98 -56
- package/src/providers/anthropic/cli-builder.js +73 -0
- package/src/providers/anthropic/index.js +204 -0
- package/src/providers/anthropic/models.js +23 -0
- package/src/providers/anthropic/output-parser.js +177 -0
- package/src/providers/base-provider.js +251 -0
- package/src/providers/capabilities.js +60 -0
- package/src/providers/google/cli-builder.js +55 -0
- package/src/providers/google/index.js +116 -0
- package/src/providers/google/models.js +24 -0
- package/src/providers/google/output-parser.js +101 -0
- package/src/providers/index.js +91 -0
- package/src/providers/openai/cli-builder.js +133 -0
- package/src/providers/openai/index.js +136 -0
- package/src/providers/openai/models.js +21 -0
- package/src/providers/openai/output-parser.js +143 -0
- package/src/providers/opencode/cli-builder.js +42 -0
- package/src/providers/opencode/index.js +103 -0
- package/src/providers/opencode/models.js +55 -0
- package/src/providers/opencode/output-parser.js +122 -0
- package/src/schemas/sub-cluster.js +68 -39
- package/src/status-footer.js +94 -48
- package/src/sub-cluster-wrapper.js +92 -36
- package/src/task-runner.js +8 -6
- package/src/template-resolver.js +12 -9
- package/src/tui/data-poller.js +123 -99
- package/src/tui/formatters.js +4 -3
- package/src/tui/keybindings.js +259 -318
- package/src/tui/layout.js +20 -3
- package/src/tui/renderer.js +11 -21
- package/task-lib/attachable-watcher.js +150 -111
- package/task-lib/claude-recovery.js +156 -0
- package/task-lib/commands/episodes.js +105 -0
- package/task-lib/commands/list.js +3 -3
- package/task-lib/commands/logs.js +231 -189
- package/task-lib/commands/resume.js +3 -2
- package/task-lib/commands/run.js +12 -3
- package/task-lib/commands/schedules.js +111 -61
- package/task-lib/config.js +0 -2
- package/task-lib/runner.js +128 -50
- package/task-lib/scheduler.js +3 -3
- package/task-lib/store.js +464 -152
- package/task-lib/tui/formatters.js +94 -45
- package/task-lib/tui/renderer.js +13 -3
- package/task-lib/tui.js +73 -32
- package/task-lib/watcher.js +157 -100
- package/src/agents/git-pusher-agent.json +0 -20
- package/src/github.js +0 -103
package/README.md
CHANGED
|
@@ -1,187 +1,229 @@
|
|
|
1
1
|
# zeroshot CLI
|
|
2
2
|
|
|
3
|
+
> **🎉 New Release:** Now supports **Codex** and **Gemini** CLI in addition to Claude! Use any provider or mix them in multi-agent workflows. See [Providers](#providers) for details.
|
|
4
|
+
|
|
5
|
+
<!-- install-placeholder -->
|
|
6
|
+
<p align="center">
|
|
7
|
+
<code>npm install -g @covibes/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
|
+
|
|
3
16
|
[](https://github.com/covibes/zeroshot/actions/workflows/ci.yml)
|
|
4
17
|
[](https://www.npmjs.com/package/@covibes/zeroshot)
|
|
5
18
|
[](LICENSE)
|
|
6
19
|
[](https://nodejs.org/)
|
|
7
|
-
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
<!-- discord-placeholder -->
|
|
8
23
|
|
|
9
|
-
|
|
24
|
+
[](https://discord.gg/PdZ3UEXB)
|
|
10
25
|
|
|
11
|
-
|
|
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.
|
|
12
27
|
|
|
13
|
-
|
|
28
|
+
It runs a **planner**, an **implementer**, and independent **validators** in isolated environments, looping until changes are **verified** or **rejected** with actionable, reproducible failures.
|
|
14
29
|
|
|
15
|
-
|
|
30
|
+
Built for tasks where correctness matters more than speed.
|
|
31
|
+
|
|
32
|
+
## How It Works
|
|
33
|
+
|
|
34
|
+
- Plan: translate a task into concrete acceptance criteria
|
|
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
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
16
41
|
|
|
17
42
|
```bash
|
|
18
|
-
|
|
43
|
+
zeroshot run 123 # GitHub issue number
|
|
44
|
+
zeroshot run feature.md # Markdown file
|
|
45
|
+
zeroshot run "Add dark mode" # Inline text
|
|
19
46
|
```
|
|
20
47
|
|
|
21
|
-
|
|
48
|
+
Or describe a complex task inline:
|
|
22
49
|
|
|
23
50
|
```bash
|
|
24
|
-
|
|
25
|
-
|
|
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."
|
|
26
54
|
```
|
|
27
55
|
|
|
28
|
-
|
|
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)** | ✅ | ✅ | ✅ | ✅ |
|
|
29
63
|
|
|
30
|
-
|
|
64
|
+
## Use Cases
|
|
31
65
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
- Gets sloppy on long tasks
|
|
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
|
|
38
71
|
|
|
39
|
-
|
|
72
|
+
## Who Is This For?
|
|
40
73
|
|
|
41
|
-
|
|
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
|
|
42
79
|
|
|
43
|
-
|
|
80
|
+
## Install and Requirements
|
|
81
|
+
|
|
82
|
+
**Platforms**: Linux, macOS (Windows WSL not yet supported)
|
|
44
83
|
|
|
45
84
|
```bash
|
|
46
|
-
zeroshot
|
|
85
|
+
npm install -g @covibes/zeroshot
|
|
47
86
|
```
|
|
48
87
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Demo
|
|
88
|
+
**Requires**: Node 18+, at least one provider CLI (Claude Code, Codex, Gemini, Opencode).
|
|
52
89
|
|
|
53
90
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
|
59
105
|
```
|
|
60
106
|
|
|
61
|
-
|
|
62
|
-
<img src="./docs/assets/zeroshot-demo.gif" alt="Demo" width="700">
|
|
63
|
-
<br>
|
|
64
|
-
<em>Sped up 100x — 90 minutes, 5 iterations until validators approved</em>
|
|
65
|
-
</p>
|
|
107
|
+
## Providers
|
|
66
108
|
|
|
67
|
-
|
|
109
|
+
Zeroshot shells out to provider CLIs. Pick a default and override per run:
|
|
68
110
|
|
|
69
|
-
|
|
111
|
+
```bash
|
|
112
|
+
zeroshot providers
|
|
113
|
+
zeroshot providers set-default codex
|
|
114
|
+
zeroshot run 123 --provider gemini
|
|
115
|
+
```
|
|
70
116
|
|
|
71
|
-
|
|
117
|
+
See `docs/providers.md` for setup, model levels, and Docker mounts.
|
|
72
118
|
|
|
73
|
-
|
|
119
|
+
## Why Multiple Agents?
|
|
74
120
|
|
|
75
|
-
|
|
121
|
+
Single-agent sessions degrade. Context gets buried under thousands of tokens. The model optimizes for "done" over "correct."
|
|
76
122
|
|
|
77
|
-
|
|
123
|
+
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.
|
|
78
124
|
|
|
79
|
-
|
|
80
|
-
|----------|:----:|-----|
|
|
81
|
-
| Add rate limiting (sliding window, per-IP, 429) | ✅ | Clear requirements |
|
|
82
|
-
| Refactor auth to JWT | ✅ | Defined end state |
|
|
83
|
-
| Fix login bug | ✅ | Success is measurable |
|
|
84
|
-
| Fix 2410 lint violations | ✅ | Clear completion criteria |
|
|
85
|
-
| Make the app faster | ❌ | Needs exploration first |
|
|
86
|
-
| Improve the codebase | ❌ | No acceptance criteria |
|
|
87
|
-
| Figure out flaky tests | ❌ | Exploratory |
|
|
125
|
+
## What Makes It Different
|
|
88
126
|
|
|
89
|
-
**
|
|
127
|
+
- **Blind validation** - Validators never see the worker's context or code history
|
|
128
|
+
- **Repeatable workflows** - Task complexity determines agent count and model selection
|
|
129
|
+
- **Accept/reject loop** - Rejections include actionable findings, not vague complaints
|
|
130
|
+
- **Crash recovery** - All state persisted to SQLite; resume anytime
|
|
131
|
+
- **Isolation modes** - None, git worktree, or Docker container
|
|
132
|
+
- **Cost control** - Model ceilings prevent runaway API spend
|
|
90
133
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
**Long-running batch tasks** → Zeroshot excels here. Run overnight with `-d` (daemon mode):
|
|
94
|
-
- "Fix all 2410 semantic linting violations"
|
|
95
|
-
- "Add TypeScript types to all 47 untyped files"
|
|
96
|
-
- "Migrate all API calls from v1 to v2"
|
|
134
|
+
## When to Use Zeroshot
|
|
97
135
|
|
|
98
|
-
|
|
136
|
+
Zeroshot performs best when tasks have clear acceptance criteria.
|
|
99
137
|
|
|
100
|
-
|
|
138
|
+
| Scenario | Use | Why |
|
|
139
|
+
| ----------------------------------------------- | --- | ------------------------- |
|
|
140
|
+
| Add rate limiting (sliding window, per-IP, 429) | Yes | Clear requirements |
|
|
141
|
+
| Refactor auth to JWT | Yes | Defined end state |
|
|
142
|
+
| Fix login bug | Yes | Success is measurable |
|
|
143
|
+
| Fix 2410 lint violations | Yes | Clear completion criteria |
|
|
144
|
+
| Make the app faster | No | Needs exploration first |
|
|
145
|
+
| Improve the codebase | No | No acceptance criteria |
|
|
146
|
+
| Figure out flaky tests | No | Exploratory |
|
|
101
147
|
|
|
102
|
-
|
|
148
|
+
Rule of thumb: if you cannot describe what "done" means, validators cannot verify it.
|
|
103
149
|
|
|
104
|
-
##
|
|
150
|
+
## Command Overview
|
|
105
151
|
|
|
106
152
|
```bash
|
|
107
|
-
|
|
108
|
-
zeroshot run
|
|
153
|
+
# Run
|
|
154
|
+
zeroshot run 123 # GitHub issue
|
|
155
|
+
zeroshot run feature.md # Markdown file
|
|
156
|
+
zeroshot run "Add dark mode" # Inline text
|
|
109
157
|
|
|
110
|
-
#
|
|
111
|
-
zeroshot run 123 --
|
|
112
|
-
zeroshot run 123 --
|
|
113
|
-
|
|
114
|
-
|
|
158
|
+
# Isolation
|
|
159
|
+
zeroshot run 123 --worktree # git worktree
|
|
160
|
+
zeroshot run 123 --docker # container
|
|
161
|
+
|
|
162
|
+
# Automation (--ship implies --pr implies --worktree)
|
|
163
|
+
zeroshot run 123 --pr # worktree + create PR
|
|
164
|
+
zeroshot run 123 --ship # PR + auto-merge on approval
|
|
115
165
|
|
|
116
166
|
# Background mode
|
|
117
|
-
zeroshot run 123 -d
|
|
118
|
-
zeroshot run 123 --ship -d
|
|
167
|
+
zeroshot run 123 -d
|
|
168
|
+
zeroshot run 123 --ship -d
|
|
119
169
|
|
|
120
170
|
# Control
|
|
121
|
-
zeroshot list
|
|
122
|
-
zeroshot status <id>
|
|
123
|
-
zeroshot logs <id> -f
|
|
124
|
-
zeroshot resume <id>
|
|
125
|
-
zeroshot
|
|
126
|
-
zeroshot
|
|
171
|
+
zeroshot list
|
|
172
|
+
zeroshot status <id>
|
|
173
|
+
zeroshot logs <id> -f
|
|
174
|
+
zeroshot resume <id>
|
|
175
|
+
zeroshot stop <id>
|
|
176
|
+
zeroshot kill <id>
|
|
177
|
+
zeroshot watch
|
|
178
|
+
|
|
179
|
+
# Providers
|
|
180
|
+
zeroshot providers
|
|
181
|
+
zeroshot providers set-default codex
|
|
127
182
|
|
|
128
183
|
# Agent library
|
|
129
|
-
zeroshot agents list
|
|
130
|
-
zeroshot agents show <name>
|
|
184
|
+
zeroshot agents list
|
|
185
|
+
zeroshot agents show <name>
|
|
131
186
|
|
|
132
187
|
# Maintenance
|
|
133
|
-
zeroshot clean
|
|
134
|
-
zeroshot purge
|
|
188
|
+
zeroshot clean
|
|
189
|
+
zeroshot purge
|
|
135
190
|
```
|
|
136
191
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<details>
|
|
140
|
-
<summary><strong>FAQ</strong></summary>
|
|
141
|
-
|
|
142
|
-
**Q: Why Claude-only (for now)?**
|
|
143
|
-
|
|
144
|
-
Claude Code is the most capable agentic coding tool available. We wrap it directly - same tools, same reliability, no custom implementations to break.
|
|
192
|
+
## Multi-Platform Issue Support
|
|
145
193
|
|
|
146
|
-
|
|
194
|
+
Zeroshot works with **GitHub, GitLab, Jira, and Azure DevOps**. Just paste the issue URL or key.
|
|
195
|
+
When working in a git repository, zeroshot automatically detects the issue provider from your git remote URL. No configuration needed!
|
|
147
196
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
- **Context Dilution**: Your initial guidelines compete with thousands of tokens of code, errors, and edits. Instructions from 50 messages ago get buried.
|
|
153
|
-
- **Success Bias**: LLMs optimize for "Task Complete" - even if that means skipping steps to get there.
|
|
154
|
-
- **Error Snowball**: When fixing mistakes repeatedly, the context fills with broken code. The model starts copying its own bad patterns.
|
|
155
|
-
|
|
156
|
-
Zeroshot fixes this with **isolated agents** where validators check work they didn't write - no self-grading, no shortcuts.
|
|
157
|
-
|
|
158
|
-
**Q: Can I customize the team?**
|
|
159
|
-
|
|
160
|
-
Yes, see CLAUDE.md. But most people never need to.
|
|
161
|
-
|
|
162
|
-
**Q: Why is it called "zeroshot"?**
|
|
163
|
-
|
|
164
|
-
In machine learning, "zero-shot" means solving tasks the model has never seen before - using only the task description, no prior examples needed.
|
|
165
|
-
|
|
166
|
-
Same idea here: give zeroshot a well-defined task, get back a result. No examples. No iterative feedback. No hand-holding.
|
|
197
|
+
```bash
|
|
198
|
+
# GitHub
|
|
199
|
+
zeroshot run 123
|
|
200
|
+
zeroshot run https://github.com/org/repo/issues/123
|
|
167
201
|
|
|
168
|
-
|
|
202
|
+
# GitLab (cloud and self-hosted)
|
|
203
|
+
zeroshot run https://gitlab.com/org/repo/-/issues/456
|
|
204
|
+
zeroshot run https://gitlab.mycompany.com/org/repo/-/issues/789
|
|
169
205
|
|
|
170
|
-
|
|
206
|
+
# Jira
|
|
207
|
+
zeroshot run PROJ-789
|
|
208
|
+
zeroshot run https://company.atlassian.net/browse/PROJ-789
|
|
171
209
|
|
|
172
|
-
|
|
210
|
+
# Azure DevOps
|
|
211
|
+
zeroshot run https://dev.azure.com/org/project/_workitems/edit/999
|
|
212
|
+
```
|
|
173
213
|
|
|
174
|
-
|
|
214
|
+
**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.
|
|
175
215
|
|
|
176
|
-
|
|
216
|
+
**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).
|
|
177
217
|
|
|
178
|
-
|
|
218
|
+
## Architecture
|
|
179
219
|
|
|
180
|
-
|
|
181
|
-
zeroshot 123 # Analyzes task → picks team → done
|
|
182
|
-
```
|
|
220
|
+
Zeroshot is a message-driven coordination layer with smart defaults.
|
|
183
221
|
|
|
184
|
-
The conductor classifies
|
|
222
|
+
- The conductor classifies tasks by complexity and type.
|
|
223
|
+
- A workflow template selects agents and validators.
|
|
224
|
+
- Agents publish results to a SQLite ledger.
|
|
225
|
+
- Validators approve or reject with specific findings.
|
|
226
|
+
- Rejections route back to the worker for fixes.
|
|
185
227
|
|
|
186
228
|
```
|
|
187
229
|
┌─────────────────┐
|
|
@@ -200,7 +242,7 @@ The conductor classifies your task (complexity × type) and picks the right work
|
|
|
200
242
|
┌───────────┐ ┌───────────┐ ┌───────────┐
|
|
201
243
|
│ TRIVIAL │ │ SIMPLE │ │ STANDARD+ │
|
|
202
244
|
│ 1 agent │──────────▶ │ worker │ │ planner │
|
|
203
|
-
│
|
|
245
|
+
│ (level1) │ COMPLETE │ + 1 valid.│ │ + worker │
|
|
204
246
|
│ no valid. │ └─────┬─────┘ │ + 3-5 val.│
|
|
205
247
|
└───────────┘ │ └─────┬─────┘
|
|
206
248
|
▼ │
|
|
@@ -231,35 +273,36 @@ The conductor classifies your task (complexity × type) and picks the right work
|
|
|
231
273
|
└─────────────────────────────────────────────────────────────────────────────┘
|
|
232
274
|
```
|
|
233
275
|
|
|
276
|
+
### Complexity Model
|
|
277
|
+
|
|
234
278
|
| Task | Complexity | Agents | Validators |
|
|
235
279
|
| ---------------------- | ---------- | ------ | ------------------------------------------------- |
|
|
236
280
|
| Fix typo in README | TRIVIAL | 1 | None |
|
|
237
|
-
| Add dark mode toggle | SIMPLE | 2 |
|
|
238
|
-
| Refactor auth system | STANDARD | 4 |
|
|
239
|
-
| Implement payment flow | CRITICAL | 7 |
|
|
281
|
+
| Add dark mode toggle | SIMPLE | 2 | Generic validator |
|
|
282
|
+
| Refactor auth system | STANDARD | 4 | Requirements, code |
|
|
283
|
+
| Implement payment flow | CRITICAL | 7 | Requirements, code, security, tester, adversarial |
|
|
240
284
|
|
|
241
285
|
### Model Selection by Complexity
|
|
242
286
|
|
|
243
287
|
| Complexity | Planner | Worker | Validators |
|
|
244
288
|
| ---------- | ------- | ------ | ---------- |
|
|
245
|
-
| TRIVIAL | - |
|
|
246
|
-
| SIMPLE | - |
|
|
247
|
-
| STANDARD |
|
|
248
|
-
| CRITICAL |
|
|
249
|
-
|
|
250
|
-
Set model ceiling: `zeroshot settings set maxModel sonnet` (prevents opus)
|
|
289
|
+
| TRIVIAL | - | level1 | - |
|
|
290
|
+
| SIMPLE | - | level2 | 1 (level2) |
|
|
291
|
+
| STANDARD | level2 | level2 | 2 (level2) |
|
|
292
|
+
| CRITICAL | level3 | level2 | 5 (level2) |
|
|
251
293
|
|
|
252
|
-
|
|
294
|
+
Levels map to provider-specific models. Configure with `zeroshot providers setup <provider>` or
|
|
295
|
+
`settings.providerSettings`. (Legacy `maxModel` applies to Claude only.)
|
|
253
296
|
|
|
254
297
|
<details>
|
|
255
298
|
<summary><strong>Custom Workflows (Framework Mode)</strong></summary>
|
|
256
299
|
|
|
257
|
-
Zeroshot is
|
|
300
|
+
Zeroshot is message-driven, so you can define any agent topology.
|
|
258
301
|
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
262
|
-
-
|
|
302
|
+
- Expert panels: parallel specialists -> aggregator -> decision
|
|
303
|
+
- Staged gates: sequential validators, each with veto power
|
|
304
|
+
- Hierarchical: supervisor dynamically spawns workers
|
|
305
|
+
- Dynamic: conductor adds agents mid-execution
|
|
263
306
|
|
|
264
307
|
**Coordination primitives:**
|
|
265
308
|
|
|
@@ -268,20 +311,14 @@ Zeroshot is **message-driven** - define any agent topology:
|
|
|
268
311
|
- Ledger (SQLite, crash recovery)
|
|
269
312
|
- Dynamic spawning (CLUSTER_OPERATIONS)
|
|
270
313
|
|
|
271
|
-
#### Creating Custom Clusters with
|
|
314
|
+
#### Creating Custom Clusters with a Provider CLI
|
|
272
315
|
|
|
273
|
-
|
|
316
|
+
Start your provider CLI and describe your cluster:
|
|
274
317
|
|
|
275
|
-
```bash
|
|
276
|
-
# In your zeroshot repo
|
|
277
|
-
claude
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
**Example prompt:**
|
|
281
318
|
```
|
|
282
319
|
Create a zeroshot cluster config for security-critical features:
|
|
283
320
|
|
|
284
|
-
1. Implementation agent (
|
|
321
|
+
1. Implementation agent (level2) implements the feature
|
|
285
322
|
2. FOUR parallel validators:
|
|
286
323
|
- Security validator: OWASP checks, SQL injection, XSS, CSRF
|
|
287
324
|
- Performance validator: No N+1 queries, proper indexing
|
|
@@ -290,76 +327,64 @@ Create a zeroshot cluster config for security-critical features:
|
|
|
290
327
|
|
|
291
328
|
3. ALL validators must approve before merge
|
|
292
329
|
4. If ANY validator rejects, implementation agent fixes and resubmits
|
|
293
|
-
5. Use
|
|
330
|
+
5. Use level3 for security validator (highest stakes)
|
|
294
331
|
|
|
295
332
|
Look at cluster-templates/base-templates/full-workflow.json
|
|
296
333
|
and create a similar cluster. Save to cluster-templates/security-review.json
|
|
297
334
|
```
|
|
298
335
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
**Built-in validation catches failures before running:**
|
|
302
|
-
- Never start (no bootstrap trigger)
|
|
303
|
-
- Never complete (no path to completion)
|
|
304
|
-
- Loop infinitely (circular dependencies)
|
|
305
|
-
- Deadlock (impossible consensus)
|
|
306
|
-
- Type mismatches (boolean → string in JSON)
|
|
336
|
+
Built-in validation checks for missing triggers, deadlocks, and invalid type wiring before running.
|
|
307
337
|
|
|
308
|
-
See [CLAUDE.md](./CLAUDE.md) for cluster
|
|
338
|
+
See [CLAUDE.md](./CLAUDE.md) for the cluster schema and examples.
|
|
309
339
|
|
|
310
340
|
</details>
|
|
311
341
|
|
|
312
|
-
---
|
|
313
|
-
|
|
314
342
|
## Crash Recovery
|
|
315
343
|
|
|
316
|
-
|
|
344
|
+
All state is persisted in the SQLite ledger. You can resume at any time:
|
|
317
345
|
|
|
318
346
|
```bash
|
|
319
347
|
zeroshot resume cluster-bold-panther
|
|
320
|
-
# Continues from exact point
|
|
321
348
|
```
|
|
322
349
|
|
|
323
|
-
---
|
|
324
|
-
|
|
325
350
|
## Isolation Modes
|
|
326
351
|
|
|
327
352
|
### Git Worktree (Default for --pr/--ship)
|
|
328
353
|
|
|
329
354
|
```bash
|
|
330
|
-
zeroshot 123 --worktree
|
|
355
|
+
zeroshot run 123 --worktree
|
|
331
356
|
```
|
|
332
357
|
|
|
333
|
-
Lightweight isolation using git worktree. Creates a separate working directory with its own branch.
|
|
358
|
+
Lightweight isolation using git worktree. Creates a separate working directory with its own branch. Auto-enabled with `--pr` and `--ship`.
|
|
334
359
|
|
|
335
360
|
### Docker Container
|
|
336
361
|
|
|
337
362
|
```bash
|
|
338
|
-
zeroshot 123 --docker
|
|
363
|
+
zeroshot run 123 --docker
|
|
339
364
|
```
|
|
340
365
|
|
|
341
|
-
Full isolation in a fresh container. Your workspace stays untouched.
|
|
366
|
+
Full isolation in a fresh container. Your workspace stays untouched. Useful for risky experiments or parallel runs.
|
|
342
367
|
|
|
343
368
|
### When to Use Which
|
|
344
369
|
|
|
345
|
-
| Scenario
|
|
346
|
-
|
|
|
347
|
-
| Quick task, review changes yourself
|
|
348
|
-
| PR workflow, code review
|
|
349
|
-
| Risky experiment, might break things | `--docker`
|
|
350
|
-
| Running multiple tasks in parallel
|
|
351
|
-
| Full automation, no review needed
|
|
370
|
+
| Scenario | Recommended |
|
|
371
|
+
| ------------------------------------ | ---------------------- |
|
|
372
|
+
| Quick task, review changes yourself | No isolation (default) |
|
|
373
|
+
| PR workflow, code review | `--worktree` or `--pr` |
|
|
374
|
+
| Risky experiment, might break things | `--docker` |
|
|
375
|
+
| Running multiple tasks in parallel | `--docker` |
|
|
376
|
+
| Full automation, no review needed | `--ship` |
|
|
352
377
|
|
|
353
|
-
**Default
|
|
378
|
+
**Default behavior:** Agents modify files only; they do not commit or push unless using an isolation mode that explicitly allows it.
|
|
354
379
|
|
|
355
380
|
<details>
|
|
356
381
|
<summary><strong>Docker Credential Mounts</strong></summary>
|
|
357
382
|
|
|
358
|
-
When using `--docker`, zeroshot mounts credential directories so
|
|
383
|
+
When using `--docker`, zeroshot mounts credential directories so agents can access provider CLIs and tools like AWS, Azure, and kubectl.
|
|
359
384
|
|
|
360
385
|
**Default mounts**: `gh`, `git`, `ssh` (GitHub CLI, git config, SSH keys)
|
|
361
386
|
|
|
362
|
-
**Available presets**: `gh`, `git`, `ssh`, `aws`, `azure`, `kube`, `terraform`, `gcloud`
|
|
387
|
+
**Available presets**: `gh`, `git`, `ssh`, `aws`, `azure`, `kube`, `terraform`, `gcloud`, `claude`, `codex`, `gemini`
|
|
363
388
|
|
|
364
389
|
```bash
|
|
365
390
|
# Configure via settings (persistent)
|
|
@@ -371,6 +396,10 @@ zeroshot settings get dockerMounts
|
|
|
371
396
|
# Per-run override
|
|
372
397
|
zeroshot run 123 --docker --mount ~/.aws:/root/.aws:ro
|
|
373
398
|
|
|
399
|
+
# Provider credentials
|
|
400
|
+
zeroshot run 123 --docker --mount ~/.config/codex:/home/node/.config/codex:ro
|
|
401
|
+
zeroshot run 123 --docker --mount ~/.config/gemini:/home/node/.config/gemini:ro
|
|
402
|
+
|
|
374
403
|
# Disable all mounts
|
|
375
404
|
zeroshot run 123 --docker --no-mounts
|
|
376
405
|
|
|
@@ -378,7 +407,10 @@ zeroshot run 123 --docker --no-mounts
|
|
|
378
407
|
ZEROSHOT_DOCKER_MOUNTS='["aws","azure"]' zeroshot run 123 --docker
|
|
379
408
|
```
|
|
380
409
|
|
|
410
|
+
See `docs/providers.md` for provider CLI setup and mount details.
|
|
411
|
+
|
|
381
412
|
**Custom mounts** (mix presets with explicit paths):
|
|
413
|
+
|
|
382
414
|
```bash
|
|
383
415
|
zeroshot settings set dockerMounts '[
|
|
384
416
|
"gh",
|
|
@@ -388,57 +420,56 @@ zeroshot settings set dockerMounts '[
|
|
|
388
420
|
```
|
|
389
421
|
|
|
390
422
|
**Container home**: Presets use `$HOME` placeholder. Default: `/root`. Override with:
|
|
423
|
+
|
|
391
424
|
```bash
|
|
392
425
|
zeroshot settings set dockerContainerHome '/home/node'
|
|
393
426
|
# Or per-run:
|
|
394
427
|
zeroshot run 123 --docker --container-home /home/node
|
|
395
428
|
```
|
|
396
429
|
|
|
397
|
-
**Env var passthrough**: Presets auto-pass related env vars (
|
|
430
|
+
**Env var passthrough**: Presets auto-pass related env vars (for example, `aws` -> `AWS_REGION`, `AWS_PROFILE`). Add custom:
|
|
431
|
+
|
|
398
432
|
```bash
|
|
399
433
|
zeroshot settings set dockerEnvPassthrough '["MY_API_KEY", "TF_VAR_*"]'
|
|
400
434
|
```
|
|
401
435
|
|
|
402
436
|
</details>
|
|
403
437
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
## More
|
|
438
|
+
## Resources
|
|
407
439
|
|
|
408
|
-
-
|
|
409
|
-
-
|
|
410
|
-
-
|
|
411
|
-
|
|
412
|
-
|
|
440
|
+
- [CLAUDE.md](./CLAUDE.md) - Architecture, cluster config schema, agent primitives
|
|
441
|
+
- `docs/providers.md` - Provider setup, model levels, and Docker mounts
|
|
442
|
+
- [Discord](https://discord.gg/PdZ3UEXB) - Support and community
|
|
443
|
+
- `zeroshot export <id>` - Export conversation to markdown
|
|
444
|
+
- `sqlite3 ~/.zeroshot/*.db` - Direct ledger access for debugging
|
|
413
445
|
|
|
414
446
|
<details>
|
|
415
447
|
<summary><strong>Troubleshooting</strong></summary>
|
|
416
448
|
|
|
417
|
-
| Issue | Fix
|
|
418
|
-
| ----------------------------- |
|
|
419
|
-
| `claude: command not found` | `npm i -g @anthropic-ai/claude-code && claude auth login`
|
|
420
|
-
| `
|
|
421
|
-
|
|
|
422
|
-
|
|
|
423
|
-
|
|
|
424
|
-
|
|
|
449
|
+
| Issue | Fix |
|
|
450
|
+
| ----------------------------- | ----------------------------------------------------------------------------------------- |
|
|
451
|
+
| `claude: command not found` | `npm i -g @anthropic-ai/claude-code && claude auth login` |
|
|
452
|
+
| `codex: command not found` | `npm i -g @openai/codex && codex login` |
|
|
453
|
+
| `gemini: command not found` | `npm i -g @google/gemini-cli && gemini auth login` |
|
|
454
|
+
| `gh: command not found` | [Install GitHub CLI](https://cli.github.com/) |
|
|
455
|
+
| `--docker` fails | Docker must be running: `docker ps` to verify |
|
|
456
|
+
| Cluster stuck | `zeroshot resume <id>` to continue |
|
|
457
|
+
| Agent keeps failing | Check `zeroshot logs <id>` for actual error |
|
|
458
|
+
| `zeroshot: command not found` | `npm install -g @covibes/zeroshot` |
|
|
459
|
+
| Agents misbehave | `/analyze-cluster-postmortem <id>` in Claude Code (creates issue if fix is generalizable) |
|
|
425
460
|
|
|
426
461
|
</details>
|
|
427
462
|
|
|
428
|
-
---
|
|
429
|
-
|
|
430
463
|
## Contributing
|
|
431
464
|
|
|
432
465
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
433
466
|
|
|
434
|
-
Please read
|
|
467
|
+
Please read [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before participating.
|
|
435
468
|
|
|
436
469
|
For security issues, see [SECURITY.md](SECURITY.md).
|
|
437
470
|
|
|
438
471
|
---
|
|
439
472
|
|
|
440
|
-
MIT
|
|
473
|
+
MIT - [Covibes](https://github.com/covibes)
|
|
441
474
|
|
|
442
475
|
Built on [Claude Code](https://claude.com/product/claude-code) by Anthropic.
|
|
443
|
-
|
|
444
|
-
|