@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.
Files changed (98) hide show
  1. package/CHANGELOG.md +174 -189
  2. package/README.md +226 -195
  3. package/cli/commands/providers.js +149 -0
  4. package/cli/index.js +3145 -2366
  5. package/cli/lib/first-run.js +40 -3
  6. package/cli/message-formatters-normal.js +28 -6
  7. package/cluster-templates/base-templates/debug-workflow.json +24 -78
  8. package/cluster-templates/base-templates/full-workflow.json +99 -316
  9. package/cluster-templates/base-templates/single-worker.json +23 -15
  10. package/cluster-templates/base-templates/worker-validator.json +105 -36
  11. package/cluster-templates/conductor-bootstrap.json +9 -7
  12. package/lib/docker-config.js +14 -1
  13. package/lib/git-remote-utils.js +165 -0
  14. package/lib/id-detector.js +10 -7
  15. package/lib/provider-defaults.js +62 -0
  16. package/lib/provider-detection.js +59 -0
  17. package/lib/provider-names.js +57 -0
  18. package/lib/settings/claude-auth.js +78 -0
  19. package/lib/settings.js +298 -15
  20. package/lib/stream-json-parser.js +4 -238
  21. package/package.json +27 -6
  22. package/scripts/setup-merge-queue.sh +170 -0
  23. package/scripts/validate-templates.js +100 -0
  24. package/src/agent/agent-config.js +140 -63
  25. package/src/agent/agent-context-builder.js +336 -165
  26. package/src/agent/agent-hook-executor.js +337 -67
  27. package/src/agent/agent-lifecycle.js +386 -287
  28. package/src/agent/agent-stuck-detector.js +7 -7
  29. package/src/agent/agent-task-executor.js +944 -683
  30. package/src/agent/output-extraction.js +217 -0
  31. package/src/agent/output-reformatter.js +175 -0
  32. package/src/agent/schema-utils.js +146 -0
  33. package/src/agent-wrapper.js +112 -31
  34. package/src/agents/git-pusher-template.js +285 -0
  35. package/src/claude-task-runner.js +145 -44
  36. package/src/config-router.js +13 -13
  37. package/src/config-validator.js +1049 -563
  38. package/src/input-helpers.js +65 -0
  39. package/src/isolation-manager.js +499 -320
  40. package/src/issue-providers/README.md +305 -0
  41. package/src/issue-providers/azure-devops-provider.js +273 -0
  42. package/src/issue-providers/base-provider.js +232 -0
  43. package/src/issue-providers/github-provider.js +179 -0
  44. package/src/issue-providers/gitlab-provider.js +241 -0
  45. package/src/issue-providers/index.js +196 -0
  46. package/src/issue-providers/jira-provider.js +239 -0
  47. package/src/ledger.js +50 -11
  48. package/src/lib/safe-exec.js +88 -0
  49. package/src/orchestrator.js +1348 -757
  50. package/src/preflight.js +306 -149
  51. package/src/process-metrics.js +98 -56
  52. package/src/providers/anthropic/cli-builder.js +73 -0
  53. package/src/providers/anthropic/index.js +204 -0
  54. package/src/providers/anthropic/models.js +23 -0
  55. package/src/providers/anthropic/output-parser.js +177 -0
  56. package/src/providers/base-provider.js +251 -0
  57. package/src/providers/capabilities.js +60 -0
  58. package/src/providers/google/cli-builder.js +55 -0
  59. package/src/providers/google/index.js +116 -0
  60. package/src/providers/google/models.js +24 -0
  61. package/src/providers/google/output-parser.js +101 -0
  62. package/src/providers/index.js +91 -0
  63. package/src/providers/openai/cli-builder.js +133 -0
  64. package/src/providers/openai/index.js +136 -0
  65. package/src/providers/openai/models.js +21 -0
  66. package/src/providers/openai/output-parser.js +143 -0
  67. package/src/providers/opencode/cli-builder.js +42 -0
  68. package/src/providers/opencode/index.js +103 -0
  69. package/src/providers/opencode/models.js +55 -0
  70. package/src/providers/opencode/output-parser.js +122 -0
  71. package/src/schemas/sub-cluster.js +68 -39
  72. package/src/status-footer.js +94 -48
  73. package/src/sub-cluster-wrapper.js +92 -36
  74. package/src/task-runner.js +8 -6
  75. package/src/template-resolver.js +12 -9
  76. package/src/tui/data-poller.js +123 -99
  77. package/src/tui/formatters.js +4 -3
  78. package/src/tui/keybindings.js +259 -318
  79. package/src/tui/layout.js +20 -3
  80. package/src/tui/renderer.js +11 -21
  81. package/task-lib/attachable-watcher.js +150 -111
  82. package/task-lib/claude-recovery.js +156 -0
  83. package/task-lib/commands/episodes.js +105 -0
  84. package/task-lib/commands/list.js +3 -3
  85. package/task-lib/commands/logs.js +231 -189
  86. package/task-lib/commands/resume.js +3 -2
  87. package/task-lib/commands/run.js +12 -3
  88. package/task-lib/commands/schedules.js +111 -61
  89. package/task-lib/config.js +0 -2
  90. package/task-lib/runner.js +128 -50
  91. package/task-lib/scheduler.js +3 -3
  92. package/task-lib/store.js +464 -152
  93. package/task-lib/tui/formatters.js +94 -45
  94. package/task-lib/tui/renderer.js +13 -3
  95. package/task-lib/tui.js +73 -32
  96. package/task-lib/watcher.js +157 -100
  97. package/src/agents/git-pusher-agent.json +0 -20
  98. 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
  [![CI](https://github.com/covibes/zeroshot/actions/workflows/ci.yml/badge.svg)](https://github.com/covibes/zeroshot/actions/workflows/ci.yml)
4
17
  [![npm version](https://img.shields.io/npm/v/@covibes/zeroshot.svg)](https://www.npmjs.com/package/@covibes/zeroshot)
5
18
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
19
  [![Node 18+](https://img.shields.io/badge/node-18%2B-brightgreen.svg)](https://nodejs.org/)
7
- [![Platform: Linux | macOS](https://img.shields.io/badge/platform-Linux%20%7C%20macOS-blue.svg)]()
20
+ ![Platform: Linux | macOS](https://img.shields.io/badge/platform-Linux%20%7C%20macOS-blue.svg)
21
+
22
+ <!-- discord-placeholder -->
8
23
 
9
- > **2024** was the year of LLMs. **2025** was the year of agents. **2026** is the year of agent clusters.
24
+ [![Discord](https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white)](https://discord.gg/PdZ3UEXB)
10
25
 
11
- **Autonomous engineering teams for Claude Code.**
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
- ## Install
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
- **Platforms**: Linux, macOS
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
- npm install -g @covibes/zeroshot
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
- **Requires**: Node 18+, [Claude Code CLI](https://claude.com/product/claude-code), [GitHub CLI](https://cli.github.com/)
48
+ Or describe a complex task inline:
22
49
 
23
50
  ```bash
24
- npm i -g @anthropic-ai/claude-code && claude auth login
25
- gh auth login
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
- You know the problem. Your AI agent:
64
+ ## Use Cases
31
65
 
32
- - Says "tests pass" (never ran them)
33
- - Says "done!" (nothing works)
34
- - Implements 60% of what you asked
35
- - Ignores your coding guidelines
36
- - Introduces antipatterns like a junior dev
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
- **AI is extremely capable. But not when one agent does everything in one session.**
72
+ ## Who Is This For?
40
73
 
41
- Context degrades. Attention drifts. Shortcuts get taken.
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
- Zeroshot fixes this with **multiple isolated agents** that check each other's work. The validator didn't write the code, so it can't lie about tests. Fail? Fix and retry until it works.
80
+ ## Install and Requirements
81
+
82
+ **Platforms**: Linux, macOS (Windows WSL not yet supported)
44
83
 
45
84
  ```bash
46
- zeroshot 123
85
+ npm install -g @covibes/zeroshot
47
86
  ```
48
87
 
49
- Point at a GitHub issue, walk away, come back to working code.
50
-
51
- ### Demo
88
+ **Requires**: Node 18+, at least one provider CLI (Claude Code, Codex, Gemini, Opencode).
52
89
 
53
90
  ```bash
54
- zeroshot "Add optimistic locking with automatic retry: when updating a user,
55
- detect if another request modified it first using version numbers,
56
- automatically retry with exponential backoff up to 3 times,
57
- merge non-conflicting field changes, surface true conflicts to the caller
58
- with details of what conflicted. Handle the ABA problem where version goes A->B->A."
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
- <p align="center">
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
- **The full fix cycle.** Initial implementation passed basic tests but validators caught edge cases: race conditions in concurrent updates, ABA problem not fully handled, retry backoff timing issues. Each rejection triggered fixes until all 48 tests passed with 91%+ coverage.
109
+ Zeroshot shells out to provider CLIs. Pick a default and override per run:
68
110
 
69
- A single agent would say "done!" after the first implementation. Here, the adversarial tester actually *runs* concurrent requests, times the retry backoff, and verifies conflict detection works under load.
111
+ ```bash
112
+ zeroshot providers
113
+ zeroshot providers set-default codex
114
+ zeroshot run 123 --provider gemini
115
+ ```
70
116
 
71
- **This is what production-grade looks like.** Not "tests pass" — validators reject until it actually works. 5 iterations, each one fixing real bugs the previous attempt missed.
117
+ See `docs/providers.md` for setup, model levels, and Docker mounts.
72
118
 
73
- ---
119
+ ## Why Multiple Agents?
74
120
 
75
- ## When to Use Zeroshot
121
+ Single-agent sessions degrade. Context gets buried under thousands of tokens. The model optimizes for "done" over "correct."
76
122
 
77
- **Zeroshot requires well-defined tasks with clear acceptance criteria.**
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
- | Scenario | Use? | Why |
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
- **Known unknowns** (implementation details unclear) Zeroshot handles this. The planner figures it out.
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
- **Unknown unknowns** (don't know what you'll discover) → Use single-agent Claude Code for exploration first, then come back with a well-defined task.
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
- Crash recovery (`zeroshot resume`) means multi-hour tasks survive interruptions.
136
+ Zeroshot performs best when tasks have clear acceptance criteria.
99
137
 
100
- **Rule of thumb:** If you can't describe what "done" looks like, zeroshot's validators can't verify it.
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
- ## Commands
150
+ ## Command Overview
105
151
 
106
152
  ```bash
107
- zeroshot run 123 # Run on GitHub issue
108
- zeroshot run "Add dark mode" # Run from description
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
- # Automation levels (cascading: --ship → --pr → --worktree)
111
- zeroshot run 123 --docker # Docker isolation (full container)
112
- zeroshot run 123 --worktree # Git worktree isolation (lightweight)
113
- zeroshot run 123 --pr # Worktree + PR (human reviews)
114
- zeroshot run 123 --ship # Worktree + PR + auto-merge (full automation)
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 # Detached/daemon
118
- zeroshot run 123 --ship -d # Full automation, background
167
+ zeroshot run 123 -d
168
+ zeroshot run 123 --ship -d
119
169
 
120
170
  # Control
121
- zeroshot list # See all running (--json for scripting)
122
- zeroshot status <id> # Cluster status (--json for scripting)
123
- zeroshot logs <id> -f # Follow output
124
- zeroshot resume <id> # Continue after crash
125
- zeroshot kill <id> # Stop
126
- zeroshot watch # TUI dashboard
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 # View available agents
130
- zeroshot agents show <name> # Agent details
184
+ zeroshot agents list
185
+ zeroshot agents show <name>
131
186
 
132
187
  # Maintenance
133
- zeroshot clean # Remove old records
134
- zeroshot purge # NUCLEAR: kill all + delete all
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
- Multi-model support (Codex CLI, Gemini CLI) is planned - see [#19](https://github.com/covibes/zeroshot/issues/19).
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
- **Q: Why do single-agent coding sessions get sloppy?**
149
-
150
- Three failure modes compound when one agent does everything in one session:
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
- The multi-agent architecture handles planning, implementation, and validation internally. You provide a clear problem statement. Zeroshot handles the rest.
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
- </details>
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
- ## How It Works
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
- Zeroshot is a **multi-agent coordination framework** with smart defaults.
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
- ### Zero Config
218
+ ## Architecture
179
219
 
180
- ```bash
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 your task (complexity × type) and picks the right workflow:
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
- (haiku) │ COMPLETE │ + 1 valid.│ │ + worker │
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 | generic validator |
238
- | Refactor auth system | STANDARD | 4 | requirements, code |
239
- | Implement payment flow | CRITICAL | 7 | requirements, code, security, tester, adversarial |
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 | - | haiku | 0 |
246
- | SIMPLE | - | sonnet | 1 (sonnet) |
247
- | STANDARD | sonnet | sonnet | 2 (sonnet) |
248
- | CRITICAL | opus | sonnet | 5 (sonnet) |
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 **message-driven** - define any agent topology:
300
+ Zeroshot is message-driven, so you can define any agent topology.
258
301
 
259
- - **Expert panels**: Parallel specialists aggregator decision
260
- - **Staged gates**: Sequential validators, each with veto power
261
- - **Hierarchical**: Supervisor dynamically spawns workers
262
- - **Dynamic**: Conductor adds agents mid-execution
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 Claude Code
314
+ #### Creating Custom Clusters with a Provider CLI
272
315
 
273
- **The easiest way to create a custom cluster: just ask Claude Code.**
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 (sonnet) implements the feature
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 opus for security validator (highest stakes)
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
- Claude Code will read existing templates, create valid JSON config, and iterate until it works.
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 config schema and examples.
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
- Everything saves to SQLite. If your 2-hour run crashes at 1:59:
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. Fast (<1s setup), no Docker required. Auto-enabled with `--pr` and `--ship`.
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. Good for risky experiments or parallel agents.
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 | Recommended |
346
- | -------- | ----------- |
347
- | Quick task, review changes yourself | No isolation (default) |
348
- | PR workflow, code review | `--worktree` or `--pr` |
349
- | Risky experiment, might break things | `--docker` |
350
- | Running multiple tasks in parallel | `--docker` |
351
- | Full automation, no review needed | `--ship` |
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 mode:** Agents are instructed to only modify files (no git commit/push). You review and commit yourself.
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 Claude can access tools like AWS, Azure, kubectl.
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 (e.g., `aws` `AWS_REGION`, `AWS_PROFILE`). Add custom:
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
- - **Debug**: `sqlite3 ~/.zeroshot/cluster-abc.db "SELECT * FROM messages;"`
409
- - **Export**: `zeroshot export <id> --format markdown`
410
- - **Architecture**: See [CLAUDE.md](./CLAUDE.md)
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
- | `gh: command not found` | [Install GitHub CLI](https://cli.github.com/) |
421
- | `--docker` fails | Docker must be running: `docker ps` to verify |
422
- | Cluster stuck | `zeroshot resume <id>` to continue with guidance |
423
- | Agent keeps failing | Check `zeroshot logs <id>` for actual error |
424
- | `zeroshot: command not found` | `npm install -g @covibes/zeroshot` |
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 our [Code of Conduct](CODE_OF_CONDUCT.md) before participating.
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 [Covibes](https://github.com/covibes)
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
-