@covibes/zeroshot 1.0.1
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 +167 -0
- package/LICENSE +21 -0
- package/README.md +364 -0
- package/cli/index.js +3990 -0
- package/cluster-templates/base-templates/debug-workflow.json +181 -0
- package/cluster-templates/base-templates/full-workflow.json +455 -0
- package/cluster-templates/base-templates/single-worker.json +48 -0
- package/cluster-templates/base-templates/worker-validator.json +131 -0
- package/cluster-templates/conductor-bootstrap.json +122 -0
- package/cluster-templates/conductor-junior-bootstrap.json +69 -0
- package/docker/zeroshot-cluster/Dockerfile +132 -0
- package/lib/completion.js +174 -0
- package/lib/id-detector.js +53 -0
- package/lib/settings.js +97 -0
- package/lib/stream-json-parser.js +236 -0
- package/package.json +121 -0
- package/src/agent/agent-config.js +121 -0
- package/src/agent/agent-context-builder.js +241 -0
- package/src/agent/agent-hook-executor.js +329 -0
- package/src/agent/agent-lifecycle.js +555 -0
- package/src/agent/agent-stuck-detector.js +256 -0
- package/src/agent/agent-task-executor.js +1034 -0
- package/src/agent/agent-trigger-evaluator.js +67 -0
- package/src/agent-wrapper.js +459 -0
- package/src/agents/git-pusher-agent.json +20 -0
- package/src/attach/attach-client.js +438 -0
- package/src/attach/attach-server.js +543 -0
- package/src/attach/index.js +35 -0
- package/src/attach/protocol.js +220 -0
- package/src/attach/ring-buffer.js +121 -0
- package/src/attach/socket-discovery.js +242 -0
- package/src/claude-task-runner.js +468 -0
- package/src/config-router.js +80 -0
- package/src/config-validator.js +598 -0
- package/src/github.js +103 -0
- package/src/isolation-manager.js +1042 -0
- package/src/ledger.js +429 -0
- package/src/logic-engine.js +223 -0
- package/src/message-bus-bridge.js +139 -0
- package/src/message-bus.js +202 -0
- package/src/name-generator.js +232 -0
- package/src/orchestrator.js +1938 -0
- package/src/schemas/sub-cluster.js +156 -0
- package/src/sub-cluster-wrapper.js +545 -0
- package/src/task-runner.js +28 -0
- package/src/template-resolver.js +347 -0
- package/src/tui/CHANGES.txt +133 -0
- package/src/tui/LAYOUT.md +261 -0
- package/src/tui/README.txt +192 -0
- package/src/tui/TWO-LEVEL-NAVIGATION.md +186 -0
- package/src/tui/data-poller.js +325 -0
- package/src/tui/demo.js +208 -0
- package/src/tui/formatters.js +123 -0
- package/src/tui/index.js +193 -0
- package/src/tui/keybindings.js +383 -0
- package/src/tui/layout.js +317 -0
- package/src/tui/renderer.js +194 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
## [1.0.1](https://github.com/covibes/zeroshot/compare/v1.0.0...v1.0.1) (2025-12-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **ci:** checkout latest main to prevent stale SHA race condition ([dd302ba](https://github.com/covibes/zeroshot/commit/dd302ba8e0755cea6835cfae3286b3aa51e2f92a))
|
|
7
|
+
* trigger npm publish ([6aa6708](https://github.com/covibes/zeroshot/commit/6aa6708dca0e55299ba5d1be9eb54410731a7da0))
|
|
8
|
+
|
|
9
|
+
# 1.0.0 (2025-12-27)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **ci:** update codecov to v5 and add continue-on-error ([53de603](https://github.com/covibes/zeroshot/commit/53de603d008764c31dc158a3f2702128d6cf8bc4))
|
|
15
|
+
* **ci:** use Node.js 22 for semantic-release compatibility ([#9](https://github.com/covibes/zeroshot/issues/9)) ([0387c7d](https://github.com/covibes/zeroshot/commit/0387c7dcf5211b8632cf5c19a5516ad119c69a59))
|
|
16
|
+
* disable checkJs to fix CI typecheck failures ([cabe14c](https://github.com/covibes/zeroshot/commit/cabe14c21e8827b26423aa1b5339cb4056f0f8a5))
|
|
17
|
+
* **lint:** add missing eslint-config-prettier + fix no-control-regex ([d26e1ba](https://github.com/covibes/zeroshot/commit/d26e1ba404a85c96519d2945501dfa4b09505190))
|
|
18
|
+
* mark task-lib as ES module for Node 18 compatibility ([44fea80](https://github.com/covibes/zeroshot/commit/44fea80bd4d28877786eb140d9a9d63ac9f609ee))
|
|
19
|
+
* prevent agents from asking questions in non-interactive mode ([#8](https://github.com/covibes/zeroshot/issues/8)) ([458ed29](https://github.com/covibes/zeroshot/commit/458ed299aefa2790fcc951dd0efcd9d347c485ce))
|
|
20
|
+
* **resume:** find last workflow trigger instead of arbitrary last 5 messages ([497c24f](https://github.com/covibes/zeroshot/commit/497c24f4bd0b8c0be168167965520600b82a3f2a))
|
|
21
|
+
* **test:** correct npm install retry timing assertion ([36222d6](https://github.com/covibes/zeroshot/commit/36222d69920fc1aed012002c3846cf9f7d9e6392))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **validator:** make validator-tester repo-calibrated and intelligent ([#5](https://github.com/covibes/zeroshot/issues/5)) ([3bccad2](https://github.com/covibes/zeroshot/commit/3bccad2ab32130efb897864de2a31d10c1f1842c))
|
|
27
|
+
* **validators:** enforce test quality with antipattern detection ([#2](https://github.com/covibes/zeroshot/issues/2)) ([9b4f912](https://github.com/covibes/zeroshot/commit/9b4f91200f4429acbce300f2c049d1d23191e768))
|
|
28
|
+
|
|
29
|
+
# 1.0.0 (2025-12-27)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **ci:** update codecov to v5 and add continue-on-error ([53de603](https://github.com/covibes/zeroshot/commit/53de603d008764c31dc158a3f2702128d6cf8bc4))
|
|
35
|
+
* **ci:** use Node.js 22 for semantic-release compatibility ([#9](https://github.com/covibes/zeroshot/issues/9)) ([0387c7d](https://github.com/covibes/zeroshot/commit/0387c7dcf5211b8632cf5c19a5516ad119c69a59))
|
|
36
|
+
* disable checkJs to fix CI typecheck failures ([cabe14c](https://github.com/covibes/zeroshot/commit/cabe14c21e8827b26423aa1b5339cb4056f0f8a5))
|
|
37
|
+
* **lint:** add missing eslint-config-prettier + fix no-control-regex ([d26e1ba](https://github.com/covibes/zeroshot/commit/d26e1ba404a85c96519d2945501dfa4b09505190))
|
|
38
|
+
* mark task-lib as ES module for Node 18 compatibility ([44fea80](https://github.com/covibes/zeroshot/commit/44fea80bd4d28877786eb140d9a9d63ac9f609ee))
|
|
39
|
+
* prevent agents from asking questions in non-interactive mode ([#8](https://github.com/covibes/zeroshot/issues/8)) ([458ed29](https://github.com/covibes/zeroshot/commit/458ed299aefa2790fcc951dd0efcd9d347c485ce))
|
|
40
|
+
* **resume:** find last workflow trigger instead of arbitrary last 5 messages ([497c24f](https://github.com/covibes/zeroshot/commit/497c24f4bd0b8c0be168167965520600b82a3f2a))
|
|
41
|
+
* **test:** correct npm install retry timing assertion ([36222d6](https://github.com/covibes/zeroshot/commit/36222d69920fc1aed012002c3846cf9f7d9e6392))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* **validator:** make validator-tester repo-calibrated and intelligent ([#5](https://github.com/covibes/zeroshot/issues/5)) ([3bccad2](https://github.com/covibes/zeroshot/commit/3bccad2ab32130efb897864de2a31d10c1f1842c))
|
|
47
|
+
* **validators:** enforce test quality with antipattern detection ([#2](https://github.com/covibes/zeroshot/issues/2)) ([9b4f912](https://github.com/covibes/zeroshot/commit/9b4f91200f4429acbce300f2c049d1d23191e768))
|
|
48
|
+
|
|
49
|
+
# Changelog
|
|
50
|
+
|
|
51
|
+
All notable changes to this project will be documented in this file.
|
|
52
|
+
|
|
53
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
54
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
55
|
+
|
|
56
|
+
## [Unreleased]
|
|
57
|
+
|
|
58
|
+
## [0.1.0] - 2025-12-25
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
|
|
62
|
+
#### Core Architecture
|
|
63
|
+
|
|
64
|
+
- Multi-agent coordination engine with message-passing primitives
|
|
65
|
+
- SQLite-backed immutable ledger for crash recovery and state persistence
|
|
66
|
+
- Pub/sub message bus with topic-based routing and WebSocket support
|
|
67
|
+
- JavaScript-based logic engine for trigger evaluation with sandboxed execution
|
|
68
|
+
- Agent lifecycle management with state machine (idle → evaluating → executing)
|
|
69
|
+
- Dynamic agent spawning via CLUSTER_OPERATIONS messages
|
|
70
|
+
|
|
71
|
+
#### Agent System
|
|
72
|
+
|
|
73
|
+
- AgentWrapper for managing Claude CLI process lifecycle
|
|
74
|
+
- Context building from ledger with configurable strategies
|
|
75
|
+
- Hook system for onComplete, onError, and onStart actions
|
|
76
|
+
- Output streaming via message bus with real-time updates
|
|
77
|
+
- Liveness detection to identify stuck agents
|
|
78
|
+
- Resume capability for failed tasks with error context
|
|
79
|
+
- Dynamic model selection based on iteration count and complexity
|
|
80
|
+
- Support for both static and parameterized model configurations
|
|
81
|
+
|
|
82
|
+
#### CLI Commands
|
|
83
|
+
|
|
84
|
+
- `zeroshot run` - Start multi-agent cluster from GitHub issue or text
|
|
85
|
+
- `zeroshot auto` - Full automation with Docker isolation and auto-merge PR
|
|
86
|
+
- `zeroshot list` - View all running clusters and tasks
|
|
87
|
+
- `zeroshot status` - Get detailed cluster status with zombie detection
|
|
88
|
+
- `zeroshot logs` - Follow cluster output in real-time
|
|
89
|
+
- `zeroshot resume` - Continue from crashed or stopped clusters
|
|
90
|
+
- `zeroshot stop` - Graceful cluster shutdown
|
|
91
|
+
- `zeroshot kill` - Force stop running cluster
|
|
92
|
+
- `zeroshot clear` - Remove all stopped clusters
|
|
93
|
+
- `zeroshot export` - Export conversation as JSON or Markdown
|
|
94
|
+
- `zeroshot watch` - Interactive TUI dashboard (htop-style)
|
|
95
|
+
- `zeroshot agents` - View available agent definitions
|
|
96
|
+
- `zeroshot settings` - Manage global settings
|
|
97
|
+
- Shell completion support via omelette
|
|
98
|
+
|
|
99
|
+
#### Docker Isolation
|
|
100
|
+
|
|
101
|
+
- IsolationManager for container lifecycle management
|
|
102
|
+
- Fresh git repository initialization in isolated containers
|
|
103
|
+
- Credential mounting for Claude CLI, AWS, GitHub, Kubernetes
|
|
104
|
+
- Docker-in-Docker support for e2e tests
|
|
105
|
+
- Automatic npm dependency installation in containers
|
|
106
|
+
- Terraform state preservation across container cleanup
|
|
107
|
+
- Git worktree support (alternative to full copy)
|
|
108
|
+
|
|
109
|
+
#### Workflow Templates
|
|
110
|
+
|
|
111
|
+
- Conductor system with 2D classification (Complexity × TaskType)
|
|
112
|
+
- Four base templates: single-worker, worker-validator, debug-workflow, full-workflow
|
|
113
|
+
- Parameterized template resolution with TemplateResolver
|
|
114
|
+
- Dynamic agent spawning based on task analysis
|
|
115
|
+
- Model tier selection: Haiku (TRIVIAL), Sonnet (SIMPLE/STANDARD), Opus (CRITICAL)
|
|
116
|
+
- Validator scaling: 0-5 validators based on complexity
|
|
117
|
+
- Adversarial tester for STANDARD/CRITICAL tasks
|
|
118
|
+
|
|
119
|
+
#### GitHub Integration
|
|
120
|
+
|
|
121
|
+
- Issue fetching with automatic URL parsing
|
|
122
|
+
- GitHub CLI (gh) integration for PR creation
|
|
123
|
+
- Auto-merge support via git-pusher agent
|
|
124
|
+
- Token authentication with hosts.yml fallback
|
|
125
|
+
|
|
126
|
+
#### TUI Dashboard
|
|
127
|
+
|
|
128
|
+
- Real-time cluster monitoring with blessed/blessed-contrib
|
|
129
|
+
- Cluster list with state, agent count, and message count
|
|
130
|
+
- Message viewer with topic filtering
|
|
131
|
+
- Agent status display with iteration tracking
|
|
132
|
+
- Log viewer with search and navigation
|
|
133
|
+
- System resource monitoring (CPU, memory)
|
|
134
|
+
- Responsive layout with keyboard navigation
|
|
135
|
+
|
|
136
|
+
#### Developer Tools
|
|
137
|
+
|
|
138
|
+
- Config validator with strict mode and warning detection
|
|
139
|
+
- ESLint configuration with unused imports detection
|
|
140
|
+
- TypeScript type checking with JSDoc annotations
|
|
141
|
+
- Mocha test framework with comprehensive test coverage
|
|
142
|
+
- Dead code detection with ts-prune, unimported, depcheck
|
|
143
|
+
- Proper lockfile support for concurrent file access
|
|
144
|
+
|
|
145
|
+
#### Safety Features
|
|
146
|
+
|
|
147
|
+
- PreToolUse hook to block AskUserQuestion in non-interactive mode
|
|
148
|
+
- Explicit prompts for autonomous decision-making
|
|
149
|
+
- Git safety enforcement (no destructive operations)
|
|
150
|
+
- Zombie cluster detection for orphaned processes
|
|
151
|
+
- Retry logic with exponential backoff for network operations
|
|
152
|
+
- File locking for concurrent orchestrator instances
|
|
153
|
+
|
|
154
|
+
### Security
|
|
155
|
+
|
|
156
|
+
- Sandboxed JavaScript execution for trigger logic
|
|
157
|
+
- Frozen prototypes in VM context to prevent pollution
|
|
158
|
+
- Read-only mounts for credentials in Docker containers
|
|
159
|
+
- Docker group GID detection for socket access control
|
|
160
|
+
- Timeout enforcement for logic scripts (1 second limit)
|
|
161
|
+
|
|
162
|
+
## [0.0.0] - Development
|
|
163
|
+
|
|
164
|
+
Initial development phase before first release.
|
|
165
|
+
|
|
166
|
+
[Unreleased]: https://github.com/covibes/zeroshot/compare/v0.1.0...HEAD
|
|
167
|
+
[0.1.0]: https://github.com/covibes/zeroshot/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Covibes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
# zeroshot CLI
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://nodejs.org/)
|
|
5
|
+
[]()
|
|
6
|
+
|
|
7
|
+
**Multi-agent coding CLI built on Claude Code.**
|
|
8
|
+
|
|
9
|
+
You know the problem. Your AI agent:
|
|
10
|
+
|
|
11
|
+
- Says "tests pass" (never ran them)
|
|
12
|
+
- Says "done!" (nothing works)
|
|
13
|
+
- Implements 60% of what you asked
|
|
14
|
+
- Ignores your coding guidelines
|
|
15
|
+
- Introduces antipatterns like a junior dev
|
|
16
|
+
- Gets sloppy on long tasks
|
|
17
|
+
|
|
18
|
+
**AI is extremely capable. But not when one agent does everything in one session.**
|
|
19
|
+
|
|
20
|
+
Context degrades. Attention drifts. Shortcuts get taken.
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
zeroshot 123
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Point at a GitHub issue, walk away, come back to working code.
|
|
29
|
+
|
|
30
|
+
### Demo
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
zeroshot "Add rate limiting middleware: sliding window algorithm (not fixed window),
|
|
34
|
+
per-IP tracking with in-memory store and automatic TTL cleanup to prevent memory leaks,
|
|
35
|
+
configurable limits per endpoint. Return 429 Too Many Requests with Retry-After header
|
|
36
|
+
(seconds until reset) and X-RateLimit-Remaining header on ALL responses.
|
|
37
|
+
Must handle both IPv4 and IPv6, normalizing IPv6 to consistent format."
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="./docs/assets/zeroshot-demo.gif" alt="Demo" width="700">
|
|
42
|
+
<br>
|
|
43
|
+
<em>Sped up — original recording: 32 minutes</em>
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
**Platforms**: Linux, macOS
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install -g @covibes/zeroshot
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Requires**: Node 18+, [Claude Code CLI](https://claude.com/product/claude-code), [GitHub CLI](https://cli.github.com/)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm i -g @anthropic-ai/claude-code && claude auth login
|
|
60
|
+
gh auth login
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Commands
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
zeroshot 123 # Run on GitHub issue
|
|
69
|
+
zeroshot "Add dark mode" # Run from description
|
|
70
|
+
|
|
71
|
+
# Full automation (isolated container + PR + merge)
|
|
72
|
+
zeroshot auto 123
|
|
73
|
+
zeroshot auto 123 -d # Background
|
|
74
|
+
|
|
75
|
+
# Control
|
|
76
|
+
zeroshot list # See all running
|
|
77
|
+
zeroshot logs <id> -f # Follow output
|
|
78
|
+
zeroshot resume <id> # Continue after crash
|
|
79
|
+
zeroshot kill <id> # Stop
|
|
80
|
+
zeroshot watch # TUI dashboard
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## FAQ
|
|
86
|
+
|
|
87
|
+
**Q: Why Claude-only?**
|
|
88
|
+
|
|
89
|
+
Claude Code is the most capable agentic coding tool available. We wrap it directly - same tools, same reliability, no custom implementations to break.
|
|
90
|
+
|
|
91
|
+
**Q: Why do single-agent coding sessions get sloppy?**
|
|
92
|
+
|
|
93
|
+
Three failure modes compound when one agent does everything in one session:
|
|
94
|
+
|
|
95
|
+
- **Context Dilution**: Your initial guidelines compete with thousands of tokens of code, errors, and edits. Instructions from 50 messages ago get buried.
|
|
96
|
+
- **Success Bias**: LLMs optimize for "Task Complete" - even if that means skipping steps to get there.
|
|
97
|
+
- **Error Snowball**: When fixing mistakes repeatedly, the context fills with broken code. The model starts copying its own bad patterns.
|
|
98
|
+
|
|
99
|
+
Zeroshot fixes this with **isolated agents** where validators check work they didn't write - no self-grading, no shortcuts.
|
|
100
|
+
|
|
101
|
+
**Q: Can I customize the team?**
|
|
102
|
+
|
|
103
|
+
Yes, see CLAUDE.md. But most people never need to.
|
|
104
|
+
|
|
105
|
+
**Q: Why does the CLI appear frozen?**
|
|
106
|
+
|
|
107
|
+
Zeroshot agents use strict JSON schema outputs to ensure reliable parsing and hook execution. This is incompatible with live streaming - agents can't stream partial JSON.
|
|
108
|
+
|
|
109
|
+
During heavy tasks (large refactors, complex analysis), the CLI may appear frozen for several minutes while the agent works. This is normal - the agent is actively running, just not streaming output.
|
|
110
|
+
|
|
111
|
+
**Q: Why is it called "zeroshot"?**
|
|
112
|
+
|
|
113
|
+
In machine learning, "zero-shot" means solving tasks the model has never seen before - using only the task description, no prior examples needed.
|
|
114
|
+
|
|
115
|
+
Same idea here: give zeroshot a well-defined task, get back a result. No examples. No iterative feedback. No hand-holding.
|
|
116
|
+
|
|
117
|
+
The multi-agent architecture handles planning, implementation, and validation internally. You provide a clear problem statement. Zeroshot handles the rest.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## How It Works
|
|
122
|
+
|
|
123
|
+
Zeroshot is a **multi-agent coordination framework** with smart defaults.
|
|
124
|
+
|
|
125
|
+
### Zero Config
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
zeroshot 123 # Analyzes task → picks team → done
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The conductor classifies your task (complexity × type) and routes to a pre-built workflow.
|
|
132
|
+
|
|
133
|
+
### Default Workflows (Out of the Box)
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
┌─────────────────┐
|
|
137
|
+
│ TASK │
|
|
138
|
+
└────────┬────────┘
|
|
139
|
+
│
|
|
140
|
+
▼
|
|
141
|
+
┌────────────────────────────────────────────┐
|
|
142
|
+
│ CONDUCTOR │
|
|
143
|
+
│ Complexity × TaskType → Workflow │
|
|
144
|
+
└────────────────────────┬───────────────────┘
|
|
145
|
+
│
|
|
146
|
+
┌─────────────────────────────┼─────────────────────────────┐
|
|
147
|
+
│ │ │
|
|
148
|
+
▼ ▼ ▼
|
|
149
|
+
┌───────────┐ ┌───────────┐ ┌───────────┐
|
|
150
|
+
│ TRIVIAL │ │ SIMPLE │ │ STANDARD+ │
|
|
151
|
+
│ 1 agent │──────────▶ │ worker │ │ planner │
|
|
152
|
+
│ (haiku) │ COMPLETE │ + 1 valid.│ │ + worker │
|
|
153
|
+
│ no valid. │ └─────┬─────┘ │ + 3-5 val.│
|
|
154
|
+
└───────────┘ │ └─────┬─────┘
|
|
155
|
+
▼ │
|
|
156
|
+
┌─────────────┐ ▼
|
|
157
|
+
┌──▶│ WORKER │ ┌─────────────┐
|
|
158
|
+
│ └──────┬──────┘ │ PLANNER │
|
|
159
|
+
│ │ └──────┬──────┘
|
|
160
|
+
│ ▼ │
|
|
161
|
+
│ ┌─────────────────────┐ ▼
|
|
162
|
+
│ │ ✓ validator │ ┌─────────────┐
|
|
163
|
+
│ │ (generic check) │ ┌──▶│ WORKER │
|
|
164
|
+
│ └──────────┬──────────┘ │ └──────┬──────┘
|
|
165
|
+
│ REJECT │ ALL OK │ │
|
|
166
|
+
└──────────────┘ │ │ ▼
|
|
167
|
+
│ │ ┌──────────────────────┐
|
|
168
|
+
│ │ │ ✓ requirements │
|
|
169
|
+
│ │ │ ✓ code (STANDARD+) │
|
|
170
|
+
│ │ │ ✓ security (CRIT) │
|
|
171
|
+
│ │ │ ✓ tester (CRIT) │
|
|
172
|
+
│ │ │ ✓ adversarial │
|
|
173
|
+
│ │ │ (curl + browser) │
|
|
174
|
+
│ │ └──────────┬───────────┘
|
|
175
|
+
│ │ REJECT │ ALL OK
|
|
176
|
+
│ └──────────────┘ │
|
|
177
|
+
▼ ▼
|
|
178
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
179
|
+
│ COMPLETE │
|
|
180
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
These are **templates**. The conductor picks based on what you're building.
|
|
184
|
+
|
|
185
|
+
| Task | Complexity | Agents | Validators |
|
|
186
|
+
| ---------------------- | ---------- | ------ | ------------------------------------------------- |
|
|
187
|
+
| Fix typo in README | TRIVIAL | 1 | None |
|
|
188
|
+
| Add dark mode toggle | SIMPLE | 2 | generic validator |
|
|
189
|
+
| Refactor auth system | STANDARD | 5 | requirements, code, adversarial |
|
|
190
|
+
| Implement payment flow | CRITICAL | 7 | requirements, code, security, tester, adversarial |
|
|
191
|
+
|
|
192
|
+
## End-to-End Flow
|
|
193
|
+
|
|
194
|
+
**This is how zeroshot processes a task from start to finish:**
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
╔═════════════════════════════════════════════════════╗
|
|
198
|
+
║ ZEROSHOT ORCHESTRATION ENGINE ║
|
|
199
|
+
╚═════════════════════════════════════════════════════╝
|
|
200
|
+
|
|
201
|
+
┌─────────────────┐
|
|
202
|
+
│ "Add auth │
|
|
203
|
+
│ to the API" │
|
|
204
|
+
└────────┬────────┘
|
|
205
|
+
│
|
|
206
|
+
▼
|
|
207
|
+
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
208
|
+
│ CONDUCTOR (2D Classification) │
|
|
209
|
+
│ ┌─────────────────────────────────────────────────────────────────────────────────────────┐ │
|
|
210
|
+
│ │ Junior (Haiku) Senior (Sonnet) │ │
|
|
211
|
+
│ │ ───────────── ─────────────── │ │
|
|
212
|
+
│ │ Fast classification on 2 dimensions: ───▶ Handles UNCERTAIN cases │ │
|
|
213
|
+
│ │ • Complexity: TRIVIAL | SIMPLE | STANDARD (if with deeper analysis │ │
|
|
214
|
+
│ │ • TaskType: INQUIRY | TASK | DEBUG Junior │ │
|
|
215
|
+
│ │ unsure) │ │
|
|
216
|
+
│ └─────────────────────────────────────────────────────────────────────────────────────────┘ │
|
|
217
|
+
└──────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
218
|
+
│
|
|
219
|
+
│ Classification: STANDARD × TASK
|
|
220
|
+
▼
|
|
221
|
+
┌─────────────────────────────────────────┐
|
|
222
|
+
│ CONFIG ROUTER │
|
|
223
|
+
│ ───────────────────────────────────── │
|
|
224
|
+
│ TRIVIAL → single-worker │
|
|
225
|
+
│ SIMPLE → worker-validator │
|
|
226
|
+
│ DEBUG (non-trivial) → debug-workflow │
|
|
227
|
+
│ STANDARD/CRITICAL → full-workflow ◀──│
|
|
228
|
+
└─────────────────────────────────────────┘
|
|
229
|
+
│
|
|
230
|
+
│ Spawns full-workflow agents
|
|
231
|
+
▼
|
|
232
|
+
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
233
|
+
│ FULL WORKFLOW │
|
|
234
|
+
│ ┌─────────────────────────────────────────────────────────────────────────────────────────┐ │
|
|
235
|
+
│ │ │ │
|
|
236
|
+
│ │ ┌──────────────┐ │ │
|
|
237
|
+
│ │ │ PLANNER │ Creates implementation plan │ │
|
|
238
|
+
│ │ │ (opus/sonnet)│ • Analyzes requirements │ │
|
|
239
|
+
│ │ └──────┬───────┘ • Identifies files to change │ │
|
|
240
|
+
│ │ │ • Breaks into actionable steps │ │
|
|
241
|
+
│ │ │ PLAN_READY │ │
|
|
242
|
+
│ │ ▼ │ │
|
|
243
|
+
│ │ ┌──────────────┐ │ │
|
|
244
|
+
│ │ │ WORKER │◀─────────────────────────────────────────────┐ │ │
|
|
245
|
+
│ │ │ (sonnet) │ Implements the plan │ │ │
|
|
246
|
+
│ │ └──────┬───────┘ • Writes/modifies code │ │ │
|
|
247
|
+
│ │ │ • Handles rejections │ │ │
|
|
248
|
+
│ │ │ IMPLEMENTATION_READY │ │ │
|
|
249
|
+
│ │ ▼ │ │ │
|
|
250
|
+
│ │ ┌─────────────────────────────────────────────────────┐ │ │ │
|
|
251
|
+
│ │ │ VALIDATORS (parallel) │ │ │ │
|
|
252
|
+
│ │ │ │ │ │ │
|
|
253
|
+
│ │ │ ┌────────────┐ ┌────────────┐ ┌─────────────────┐ │ │ REJECTED │ │
|
|
254
|
+
│ │ │ │Requirements│ │Code Review │ │ Adversarial │ │ │ │ │
|
|
255
|
+
│ │ │ │ Validator │ │ (reviewer)│ │ Tester │ │───────┘ │ │
|
|
256
|
+
│ │ │ │ (validator)│ │ │ │ EXECUTES tests │ │ │ │
|
|
257
|
+
│ │ │ └────────────┘ └────────────┘ └─────────────────┘ │ │ │
|
|
258
|
+
│ │ │ │ │ │
|
|
259
|
+
│ │ └──────────────────────┬──────────────────────────────┘ │ │
|
|
260
|
+
│ │ │ │ │
|
|
261
|
+
│ │ │ ALL APPROVED │ │
|
|
262
|
+
│ │ ▼ │ │
|
|
263
|
+
│ │ ┌──────────────┐ │ │
|
|
264
|
+
│ │ │ COMPLETE │ │ │
|
|
265
|
+
│ │ │ ────────── │ │ │
|
|
266
|
+
│ │ │ PR Created │ (with --pr flag) │ │
|
|
267
|
+
│ │ │ Auto-merged │ (with --merge flag) │ │
|
|
268
|
+
│ │ └──────────────┘ │ │
|
|
269
|
+
│ │ │ │
|
|
270
|
+
│ └─────────────────────────────────────────────────────────────────────────────────────────┘ │
|
|
271
|
+
└──────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Model Selection by Complexity
|
|
275
|
+
|
|
276
|
+
| Complexity | Planner | Worker | Validators |
|
|
277
|
+
| ---------- | ------- | ------ | ---------- |
|
|
278
|
+
| TRIVIAL | - | haiku | 0 |
|
|
279
|
+
| SIMPLE | - | sonnet | 1 (sonnet) |
|
|
280
|
+
| STANDARD | sonnet | sonnet | 3 (sonnet) |
|
|
281
|
+
| CRITICAL | opus | sonnet | 5 (sonnet) |
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
### Custom Workflows (Framework Mode)
|
|
286
|
+
|
|
287
|
+
Zeroshot is **message-driven** - define any agent topology:
|
|
288
|
+
|
|
289
|
+
- **Expert panels**: Parallel specialists → aggregator → decision
|
|
290
|
+
- **Staged gates**: Sequential validators, each with veto power
|
|
291
|
+
- **Hierarchical**: Supervisor dynamically spawns workers
|
|
292
|
+
- **Dynamic**: Conductor adds agents mid-execution
|
|
293
|
+
|
|
294
|
+
**Coordination primitives:**
|
|
295
|
+
|
|
296
|
+
- Message bus (pub/sub topics)
|
|
297
|
+
- Triggers (wake agents on conditions)
|
|
298
|
+
- Ledger (SQLite, crash recovery)
|
|
299
|
+
- Dynamic spawning (CLUSTER_OPERATIONS)
|
|
300
|
+
|
|
301
|
+
See [CLAUDE.md](./CLAUDE.md) for custom cluster configs.
|
|
302
|
+
|
|
303
|
+
You don't configure defaults. But you **can** when needed.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Crash Recovery
|
|
308
|
+
|
|
309
|
+
Everything saves to SQLite. If your 2-hour run crashes at 1:59:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
zeroshot resume cluster-bold-panther
|
|
313
|
+
# Continues from exact point
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Docker Isolation
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
zeroshot 123 --isolation
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Runs in a fresh container. Your workspace stays untouched. Good for risky experiments.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## More
|
|
329
|
+
|
|
330
|
+
- **Debug**: `sqlite3 ~/.zeroshot/cluster-abc.db "SELECT * FROM messages;"`
|
|
331
|
+
- **Export**: `zeroshot export <id> --format markdown`
|
|
332
|
+
- **Architecture**: See [CLAUDE.md](./CLAUDE.md)
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## Troubleshooting
|
|
337
|
+
|
|
338
|
+
| Issue | Fix |
|
|
339
|
+
| ----------------------------- | -------------------------------------------------------------------- |
|
|
340
|
+
| `claude: command not found` | `npm i -g @anthropic-ai/claude-code && claude auth login` |
|
|
341
|
+
| `gh: command not found` | [Install GitHub CLI](https://cli.github.com/) |
|
|
342
|
+
| CLI frozen for minutes | Normal - agents use JSON schema output, can't stream partial results |
|
|
343
|
+
| `--isolation` fails | Docker must be running: `docker ps` to verify |
|
|
344
|
+
| Cluster stuck | `zeroshot resume <id>` to continue with guidance |
|
|
345
|
+
| Agent keeps failing | Check `zeroshot logs <id>` for actual error |
|
|
346
|
+
| `zeroshot: command not found` | `npm install -g @covibes/zeroshot` |
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Contributing
|
|
351
|
+
|
|
352
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
353
|
+
|
|
354
|
+
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before participating.
|
|
355
|
+
|
|
356
|
+
For security issues, see [SECURITY.md](SECURITY.md).
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
MIT — [Covibes](https://github.com/covibes)
|
|
361
|
+
|
|
362
|
+
Built on [Claude Code](https://claude.com/product/claude-code) by Anthropic.
|
|
363
|
+
|
|
364
|
+
|