@covibes/zeroshot 5.4.0 → 5.4.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/LICENSE +1 -1
- package/README.md +8 -465
- package/cli/index.js +101 -5231
- package/package.json +16 -130
- package/CHANGELOG.md +0 -537
- package/cli/commands/providers.js +0 -149
- package/cli/lib/first-run.js +0 -211
- package/cli/lib/update-checker.js +0 -281
- package/cli/message-formatter-utils.js +0 -75
- package/cli/message-formatters-normal.js +0 -275
- package/cli/message-formatters-watch.js +0 -181
- package/cluster-templates/base-templates/debug-workflow.json +0 -375
- package/cluster-templates/base-templates/full-workflow.json +0 -581
- package/cluster-templates/base-templates/single-worker.json +0 -63
- package/cluster-templates/base-templates/worker-validator.json +0 -208
- package/cluster-templates/conductor-bootstrap.json +0 -124
- package/docker/zeroshot-cluster/Dockerfile +0 -152
- package/docker/zeroshot-cluster/pre-baked-deps.json +0 -28
- package/lib/completion.js +0 -174
- package/lib/docker-config.js +0 -220
- package/lib/git-remote-utils.js +0 -165
- package/lib/id-detector.js +0 -56
- package/lib/provider-defaults.js +0 -62
- package/lib/provider-detection.js +0 -59
- package/lib/provider-names.js +0 -57
- package/lib/settings/claude-auth.js +0 -78
- package/lib/settings.js +0 -503
- package/lib/stream-json-parser.js +0 -10
- package/scripts/fix-node-pty-permissions.js +0 -75
- package/scripts/record-demo.sh +0 -279
- package/scripts/setup-merge-queue.sh +0 -170
- package/scripts/test-install.sh +0 -40
- package/scripts/validate-templates.js +0 -100
- package/src/agent/agent-config.js +0 -246
- package/src/agent/agent-context-builder.js +0 -444
- package/src/agent/agent-hook-executor.js +0 -599
- package/src/agent/agent-lifecycle.js +0 -743
- package/src/agent/agent-stuck-detector.js +0 -256
- package/src/agent/agent-task-executor.js +0 -1690
- package/src/agent/agent-trigger-evaluator.js +0 -67
- package/src/agent/output-extraction.js +0 -217
- package/src/agent/output-reformatter.js +0 -175
- package/src/agent/schema-utils.js +0 -146
- package/src/agent-wrapper.js +0 -579
- package/src/agents/git-pusher-template.js +0 -285
- package/src/attach/attach-client.js +0 -438
- package/src/attach/attach-server.js +0 -543
- package/src/attach/index.js +0 -35
- package/src/attach/protocol.js +0 -220
- package/src/attach/ring-buffer.js +0 -121
- package/src/attach/socket-discovery.js +0 -267
- package/src/claude-task-runner.js +0 -574
- package/src/config-router.js +0 -80
- package/src/config-validator.js +0 -1925
- package/src/copy-worker.js +0 -43
- package/src/input-helpers.js +0 -65
- package/src/isolation-manager.js +0 -1471
- package/src/issue-providers/README.md +0 -305
- package/src/issue-providers/azure-devops-provider.js +0 -273
- package/src/issue-providers/base-provider.js +0 -232
- package/src/issue-providers/github-provider.js +0 -179
- package/src/issue-providers/gitlab-provider.js +0 -241
- package/src/issue-providers/index.js +0 -196
- package/src/issue-providers/jira-provider.js +0 -239
- package/src/ledger.js +0 -631
- package/src/lib/safe-exec.js +0 -88
- package/src/logic-engine.js +0 -223
- package/src/message-bus-bridge.js +0 -139
- package/src/message-bus.js +0 -249
- package/src/name-generator.js +0 -232
- package/src/orchestrator.js +0 -2815
- package/src/preflight.js +0 -639
- package/src/process-metrics.js +0 -608
- package/src/providers/anthropic/cli-builder.js +0 -73
- package/src/providers/anthropic/index.js +0 -204
- package/src/providers/anthropic/models.js +0 -23
- package/src/providers/anthropic/output-parser.js +0 -177
- package/src/providers/base-provider.js +0 -251
- package/src/providers/capabilities.js +0 -60
- package/src/providers/google/cli-builder.js +0 -55
- package/src/providers/google/index.js +0 -116
- package/src/providers/google/models.js +0 -24
- package/src/providers/google/output-parser.js +0 -101
- package/src/providers/index.js +0 -91
- package/src/providers/openai/cli-builder.js +0 -133
- package/src/providers/openai/index.js +0 -136
- package/src/providers/openai/models.js +0 -21
- package/src/providers/openai/output-parser.js +0 -143
- package/src/providers/opencode/cli-builder.js +0 -42
- package/src/providers/opencode/index.js +0 -103
- package/src/providers/opencode/models.js +0 -55
- package/src/providers/opencode/output-parser.js +0 -122
- package/src/schemas/sub-cluster.js +0 -185
- package/src/status-footer.js +0 -1026
- package/src/sub-cluster-wrapper.js +0 -601
- package/src/task-runner.js +0 -30
- package/src/template-resolver.js +0 -372
- package/src/tui/CHANGES.txt +0 -133
- package/src/tui/LAYOUT.md +0 -261
- package/src/tui/README.txt +0 -192
- package/src/tui/TWO-LEVEL-NAVIGATION.md +0 -186
- package/src/tui/data-poller.js +0 -349
- package/src/tui/demo.js +0 -208
- package/src/tui/formatters.js +0 -129
- package/src/tui/index.js +0 -193
- package/src/tui/keybindings.js +0 -324
- package/src/tui/layout.js +0 -334
- package/src/tui/renderer.js +0 -184
- package/task-lib/attachable-watcher.js +0 -309
- package/task-lib/claude-recovery.js +0 -156
- package/task-lib/commands/clean.js +0 -50
- package/task-lib/commands/episodes.js +0 -105
- package/task-lib/commands/get-log-path.js +0 -23
- package/task-lib/commands/kill.js +0 -32
- package/task-lib/commands/list.js +0 -105
- package/task-lib/commands/logs.js +0 -453
- package/task-lib/commands/resume.js +0 -42
- package/task-lib/commands/run.js +0 -57
- package/task-lib/commands/schedule.js +0 -105
- package/task-lib/commands/scheduler-cmd.js +0 -96
- package/task-lib/commands/schedules.js +0 -148
- package/task-lib/commands/status.js +0 -44
- package/task-lib/commands/unschedule.js +0 -16
- package/task-lib/completion.js +0 -9
- package/task-lib/config.js +0 -8
- package/task-lib/name-generator.js +0 -230
- package/task-lib/package.json +0 -3
- package/task-lib/runner.js +0 -201
- package/task-lib/scheduler.js +0 -252
- package/task-lib/store.js +0 -529
- package/task-lib/tui/formatters.js +0 -215
- package/task-lib/tui/index.js +0 -197
- package/task-lib/tui/layout.js +0 -111
- package/task-lib/tui/renderer.js +0 -129
- package/task-lib/tui.js +0 -425
- package/task-lib/watcher.js +0 -226
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Worker + Validator",
|
|
3
|
-
"description": "Worker implements, validator checks, rejection loop. For SIMPLE tasks.",
|
|
4
|
-
"params": {
|
|
5
|
-
"worker_level": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"enum": ["level1", "level2", "level3"],
|
|
8
|
-
"default": "level2"
|
|
9
|
-
},
|
|
10
|
-
"validator_level": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"enum": ["level1", "level2", "level3"],
|
|
13
|
-
"default": "level2"
|
|
14
|
-
},
|
|
15
|
-
"max_iterations": {
|
|
16
|
-
"type": "number",
|
|
17
|
-
"default": 3
|
|
18
|
-
},
|
|
19
|
-
"max_tokens": {
|
|
20
|
-
"type": "number",
|
|
21
|
-
"default": 100000
|
|
22
|
-
},
|
|
23
|
-
"timeout": {
|
|
24
|
-
"type": "number",
|
|
25
|
-
"default": 0,
|
|
26
|
-
"description": "Task timeout in milliseconds (0 = no timeout)"
|
|
27
|
-
},
|
|
28
|
-
"task_type": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"enum": ["INQUIRY", "TASK", "DEBUG"],
|
|
31
|
-
"description": "Type of work"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"agents": [
|
|
35
|
-
{
|
|
36
|
-
"id": "worker",
|
|
37
|
-
"role": "implementation",
|
|
38
|
-
"modelLevel": "{{worker_level}}",
|
|
39
|
-
"timeout": "{{timeout}}",
|
|
40
|
-
"outputFormat": "json",
|
|
41
|
-
"jsonSchema": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"properties": {
|
|
44
|
-
"summary": {
|
|
45
|
-
"type": "string",
|
|
46
|
-
"description": "Brief description of work done this iteration"
|
|
47
|
-
},
|
|
48
|
-
"completionStatus": {
|
|
49
|
-
"type": "object",
|
|
50
|
-
"description": "Self-assessment of completion state",
|
|
51
|
-
"properties": {
|
|
52
|
-
"canValidate": {
|
|
53
|
-
"type": "boolean",
|
|
54
|
-
"description": "true if work is ready for validator review, false if more work needed"
|
|
55
|
-
},
|
|
56
|
-
"percentComplete": {
|
|
57
|
-
"type": "number",
|
|
58
|
-
"description": "Estimated completion percentage (0-100)"
|
|
59
|
-
},
|
|
60
|
-
"blockers": {
|
|
61
|
-
"type": "array",
|
|
62
|
-
"items": { "type": "string" },
|
|
63
|
-
"description": "Issues preventing completion (empty if canValidate=true)"
|
|
64
|
-
},
|
|
65
|
-
"nextSteps": {
|
|
66
|
-
"type": "array",
|
|
67
|
-
"items": { "type": "string" },
|
|
68
|
-
"description": "Remaining work items (empty if canValidate=true)"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"required": ["canValidate", "percentComplete"]
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"required": ["summary", "completionStatus"]
|
|
75
|
-
},
|
|
76
|
-
"prompt": {
|
|
77
|
-
"system": "## 🚫 YOU CANNOT ASK QUESTIONS\n\nYou are running non-interactively. There is NO USER to answer.\n- NEVER use AskUserQuestion tool\n- NEVER say \"Should I...\" or \"Would you like...\"\n- When unsure: Make the SAFER choice and proceed.\n\nYou are an implementation agent for a SIMPLE {{task_type}} task.\n\n## FIRST ITERATION\n\n{{#if task_type == 'TASK'}}\nImplement the requested feature/change:\n- Well-defined scope (one feature, one fix)\n- Standard patterns apply\n- Complete the implementation fully\n{{/if}}\n\n{{#if task_type == 'DEBUG'}}\nInvestigate and fix the issue:\n- Reproduce the problem\n- Find the root cause (not just symptoms)\n- Apply the fix\n- Verify it works\n{{/if}}\n\n{{#if task_type == 'INQUIRY'}}\nResearch and provide detailed answers:\n- Explore relevant code and documentation\n- Explain how things work\n- Provide accurate, complete information\n{{/if}}\n\n## SUBSEQUENT ITERATIONS (after rejection)\n\nYou are being called back because validators REJECTED your implementation. This is NOT a minor issue.\n\n### FIX LIKE A SENIOR ENGINEER\n\n1. **STOP AND UNDERSTAND FIRST**\n - Read ALL VALIDATION_RESULT messages completely\n - Understand WHY each issue exists, not just WHAT it is\n - Trace the root cause - don't patch symptoms\n\n2. **FIX PROPERLY - NO SHORTCUTS**\n - Fix the ACTUAL problem, not the error message\n - If your approach was wrong, redesign it - don't add band-aids\n - Consider architectural implications of your fix\n - A senior dev would be embarrassed to submit a half-fix\n\n3. **VERIFY YOUR FIX**\n - Test your changes actually work\n - Check you didn't break anything else\n - If unsure, investigate before committing\n\n### MINDSET\n- Validators are senior engineers reviewing your code\n- They found REAL problems - take them seriously\n- Shortcuts will be caught and rejected again\n\n## 🔴 COMPLETION SELF-ASSESSMENT (REQUIRED)\n\nYour output MUST include a `completionStatus` object with honest self-assessment:\n\n**Set canValidate: true** when:\n- All work for this iteration is complete\n- Code compiles/runs without errors\n- You would be confident submitting for review\n\n**Set canValidate: false** when:\n- Work is partially complete\n- Blocked by an issue you're working around\n- Code doesn't compile or has obvious bugs\n\nValidators cost money. If you're not done, say so - your WORKER_PROGRESS message will let you continue."
|
|
78
|
-
},
|
|
79
|
-
"contextStrategy": {
|
|
80
|
-
"sources": [
|
|
81
|
-
{
|
|
82
|
-
"topic": "ISSUE_OPENED",
|
|
83
|
-
"limit": 1
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"topic": "WORKER_PROGRESS",
|
|
87
|
-
"since": "last_task_end",
|
|
88
|
-
"limit": 3
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"topic": "VALIDATION_RESULT",
|
|
92
|
-
"since": "last_task_end",
|
|
93
|
-
"limit": 3
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"format": "chronological",
|
|
97
|
-
"maxTokens": "{{max_tokens}}"
|
|
98
|
-
},
|
|
99
|
-
"triggers": [
|
|
100
|
-
{
|
|
101
|
-
"topic": "ISSUE_OPENED",
|
|
102
|
-
"action": "execute_task"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"topic": "WORKER_PROGRESS",
|
|
106
|
-
"logic": {
|
|
107
|
-
"engine": "javascript",
|
|
108
|
-
"script": "return message.sender === 'worker';"
|
|
109
|
-
},
|
|
110
|
-
"action": "execute_task"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"topic": "VALIDATION_RESULT",
|
|
114
|
-
"logic": {
|
|
115
|
-
"engine": "javascript",
|
|
116
|
-
"script": "const lastPush = ledger.findLast({ topic: 'IMPLEMENTATION_READY' });\nif (!lastPush) return false;\nconst response = ledger.findLast({ topic: 'VALIDATION_RESULT', since: lastPush.timestamp });\nreturn response?.content?.data?.approved === false || response?.content?.data?.approved === 'false';"
|
|
117
|
-
},
|
|
118
|
-
"action": "execute_task"
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
"hooks": {
|
|
122
|
-
"onComplete": {
|
|
123
|
-
"action": "publish_message",
|
|
124
|
-
"config": {
|
|
125
|
-
"topic": "IMPLEMENTATION_READY",
|
|
126
|
-
"content": {
|
|
127
|
-
"text": "{{result.summary}}",
|
|
128
|
-
"data": {
|
|
129
|
-
"completionStatus": "{{result.completionStatus}}"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
"logic": {
|
|
134
|
-
"engine": "javascript",
|
|
135
|
-
"script": "if (!result.completionStatus?.canValidate) return { topic: 'WORKER_PROGRESS' };"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"maxIterations": "{{max_iterations}}"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"id": "validator",
|
|
143
|
-
"role": "validator",
|
|
144
|
-
"modelLevel": "{{validator_level}}",
|
|
145
|
-
"timeout": "{{timeout}}",
|
|
146
|
-
"outputFormat": "json",
|
|
147
|
-
"jsonSchema": {
|
|
148
|
-
"type": "object",
|
|
149
|
-
"properties": {
|
|
150
|
-
"approved": {
|
|
151
|
-
"type": "boolean",
|
|
152
|
-
"description": "true if implementation is correct"
|
|
153
|
-
},
|
|
154
|
-
"summary": {
|
|
155
|
-
"type": "string",
|
|
156
|
-
"description": "One-line validation result"
|
|
157
|
-
},
|
|
158
|
-
"errors": {
|
|
159
|
-
"type": "array",
|
|
160
|
-
"items": {
|
|
161
|
-
"type": "string"
|
|
162
|
-
},
|
|
163
|
-
"description": "Issues found (empty if approved)"
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"required": ["approved", "summary", "errors"]
|
|
167
|
-
},
|
|
168
|
-
"prompt": {
|
|
169
|
-
"system": "## 🔴 OUTPUT FORMAT (CRITICAL - READ FIRST)\n\nYour output MUST be MINIMAL and STRUCTURED:\n- Output ONLY the required JSON schema fields\n- NO preambles (\"Here is my analysis...\", \"Let me explain...\")\n- NO verbose summaries - be CONCISE (max 100 chars per string field)\n- NO redundant information\n- NO explanations before or after the JSON\n\n## 🚫 YOU CANNOT ASK QUESTIONS\n\nYou are running non-interactively. There is NO USER to answer.\n- NEVER use AskUserQuestion tool\n- NEVER say \"Should I...\" or \"Would you like...\"\n- When unsure: Make the SAFER choice and proceed.\n\nYou are a validator for a SIMPLE {{task_type}} task.\n\n## 🔴 VERIFICATION PROTOCOL (REQUIRED - PREVENTS FALSE CLAIMS)\n\nBefore making ANY claim about missing functionality or code issues:\n\n1. **SEARCH FIRST** - Use Glob to find ALL relevant files\n2. **READ THE CODE** - Use Read to inspect actual implementation\n3. **GREP FOR PATTERNS** - Use Grep to search for specific code (function names, endpoints, etc.)\n\n**NEVER claim something doesn't exist without FIRST searching for it.**\n\nThe worker may have implemented features in different files than originally planned. If you claim '/api/metrics endpoint is missing' without searching, you may miss that it exists in 'server/routes/health.ts' instead of 'server/routes/api.ts'.\n\n### Example Verification Flow:\n```\n1. Claim: 'Missing error handling for network failures'\n2. BEFORE claiming → Grep for 'catch', 'error', 'try' in relevant files\n3. BEFORE claiming → Read the actual implementation\n4. ONLY IF NOT FOUND → Add to errors array\n```\n\n## VALIDATION CRITERIA\n\n**APPROVE** if:\n- Core functionality works as requested\n- Implementation is correct and complete\n- No obvious bugs or critical issues\n\n**REJECT** if:\n- Major functionality is missing or broken (VERIFIED by searching)\n- Implementation doesn't match requirements (VERIFIED by reading code)\n- Critical bugs present (VERIFIED by inspection)\n\n## TASK TYPE: {{task_type}}\n\n{{#if task_type == 'TASK'}}\nVerify the feature/change works correctly.\n{{/if}}\n\n{{#if task_type == 'DEBUG'}}\nVerify the bug is actually fixed at root cause.\n{{/if}}\n\n{{#if task_type == 'INQUIRY'}}\nVerify the information is accurate and complete.\n{{/if}}\n\nFor SIMPLE tasks, don't nitpick. Focus on: Does it work and meet requirements?\n\n## 🔴 DEBUGGING METHODOLOGY CHECK\n\nBefore approving, verify the worker didn't take shortcuts:\n\n### Ad Hoc Fix Detection\n- Did worker fix ONE instance? → Grep for similar patterns. If N > 1 exists, REJECT.\n- Example: Fixed null check in `auth.ts:42`? → `grep -r \"similar pattern\" .` - are there others?\n\n### Root Cause vs Symptom\n- Did worker add a workaround? → Find the ACTUAL bug. If workaround hides real issue, REJECT.\n- Example: Added `|| []` fallback? → WHY is it undefined? Fix THAT.\n\n### Lazy Debugging Red Flags (INSTANT REJECT)\n- Worker suggests \"restart the service\" → REJECT (hides the bug)\n- Worker suggests \"clear the cache\" → REJECT (hides the bug)\n- Worker says \"works on my machine\" → REJECT (not a fix)\n- Worker blames the test → REJECT unless they PROVE test is wrong with evidence"
|
|
170
|
-
},
|
|
171
|
-
"contextStrategy": {
|
|
172
|
-
"sources": [
|
|
173
|
-
{
|
|
174
|
-
"topic": "ISSUE_OPENED",
|
|
175
|
-
"limit": 1
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"topic": "IMPLEMENTATION_READY",
|
|
179
|
-
"limit": 1
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
|
-
"format": "chronological",
|
|
183
|
-
"maxTokens": "{{max_tokens}}"
|
|
184
|
-
},
|
|
185
|
-
"triggers": [
|
|
186
|
-
{
|
|
187
|
-
"topic": "IMPLEMENTATION_READY",
|
|
188
|
-
"action": "execute_task"
|
|
189
|
-
}
|
|
190
|
-
],
|
|
191
|
-
"hooks": {
|
|
192
|
-
"onComplete": {
|
|
193
|
-
"action": "publish_message",
|
|
194
|
-
"config": {
|
|
195
|
-
"topic": "VALIDATION_RESULT",
|
|
196
|
-
"content": {
|
|
197
|
-
"text": "{{result.summary}}",
|
|
198
|
-
"data": {
|
|
199
|
-
"approved": "{{result.approved}}",
|
|
200
|
-
"errors": "{{result.errors}}"
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Two-Tier Conductor (Complexity × TaskType)",
|
|
3
|
-
"description": "Cost-optimized conductor: level1 junior for 2D classification (complexity + taskType), level2 senior for UNCERTAIN tasks. Routes to appropriate cluster config via helpers.getConfig().",
|
|
4
|
-
"agents": [
|
|
5
|
-
{
|
|
6
|
-
"id": "junior-conductor",
|
|
7
|
-
"role": "conductor",
|
|
8
|
-
"modelLevel": "level1",
|
|
9
|
-
"useDirectApi": true,
|
|
10
|
-
"outputFormat": "json",
|
|
11
|
-
"jsonSchema": {
|
|
12
|
-
"type": "object",
|
|
13
|
-
"properties": {
|
|
14
|
-
"complexity": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"enum": ["TRIVIAL", "SIMPLE", "STANDARD", "CRITICAL", "UNCERTAIN"],
|
|
17
|
-
"description": "Task complexity level"
|
|
18
|
-
},
|
|
19
|
-
"taskType": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"enum": ["INQUIRY", "TASK", "DEBUG"],
|
|
22
|
-
"description": "Type of work: INQUIRY (read-only), TASK (implement / known fix), DEBUG (investigate unknown root cause)"
|
|
23
|
-
},
|
|
24
|
-
"reasoning": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "Why this classification (1-2 sentences)"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"required": ["complexity", "taskType", "reasoning"]
|
|
30
|
-
},
|
|
31
|
-
"prompt": {
|
|
32
|
-
"system": "You are the JUNIOR CONDUCTOR - fast task classification.\n\n## Your Job\nClassify the task on TWO dimensions.\n\n## 🔴 COST REMINDER\n- CRITICAL uses Opus ($15/M tokens) + 4 validators = EXPENSIVE\n- STANDARD uses Sonnet ($3/M tokens) + 2 validators = NORMAL\n- Don't waste money on false positives. CRITICAL is rare.\n\n## COMPLEXITY (pick ONE)\n- TRIVIAL - One file, mechanical change; no behavior change.\n- SIMPLE - Small change, 1-2 files, low risk.\n- STANDARD - Multi-file work or user-visible behavior. **DEFAULT CHOICE.**\n- CRITICAL - ONLY when code DIRECTLY modifies: (1) authentication/authorization LOGIC, (2) payment processing/billing calculations, (3) secrets/credentials handling, (4) destructive database operations (DROP, DELETE), (5) production deployment or live infrastructure, (6) PII processing (not just displaying it).\n- UNCERTAIN - Escalate to senior conductor.\n\n**🔴 BIAS: If unsure between STANDARD and CRITICAL, choose STANDARD.** CRITICAL is expensive. Reserve it for actual risk.\n\n## NOT CRITICAL (Common False Positives)\n\nThese are STANDARD, not CRITICAL:\n- Refactoring code that MENTIONS auth/billing/security (not MODIFYING the logic)\n- Adding TypeScript types for existing structures\n- Code cleanup in infra-related files\n- Read-only queries to production data\n- Tests for auth/billing code (tests don't touch prod)\n- Extracting modules or services (code organization)\n- Factory patterns, dependency injection (architecture)\n- Config file reorganization (not production config values)\n\n## TASK TYPE (pick ONE)\n- INQUIRY - Questions, exploration, read-only\n- TASK - Implement something new\n- DEBUG - Fix something broken\n\n## Examples\n\nTask: \"Explain current auth flow (read-only)\"\n```json\n{\"complexity\": \"SIMPLE\", \"taskType\": \"INQUIRY\", \"reasoning\": \"Read-only explanation\"}\n```\n\nTask: \"Refactor auth service into smaller modules\"\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"Refactoring code organization, not modifying auth logic\"}\n```\n\nTask: \"Add TypeScript types to payment types\"\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"Adding types, not modifying billing logic\"}\n```\n\nTask: \"Fix bug in password validation logic\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"DEBUG\", \"reasoning\": \"Directly modifying authentication logic\"}\n```\n\nTask: \"Add new payment method integration\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"New billing/payment processing code\"}\n```\n\nTask: \"Rotate production API keys\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"Modifying production secrets\"}\n```\n\nTask: \"DROP TABLE users migration\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"Destructive database operation\"}\n```\n\n## Critical Rules\n1. Output ONLY valid JSON - no other text\n2. complexity must be EXACTLY one of: TRIVIAL, SIMPLE, STANDARD, CRITICAL, UNCERTAIN\n3. taskType must be EXACTLY one of: INQUIRY, TASK, DEBUG\n\nTask: {{ISSUE_OPENED.content.text}}"
|
|
33
|
-
},
|
|
34
|
-
"contextStrategy": {
|
|
35
|
-
"sources": [{ "topic": "ISSUE_OPENED", "limit": 1 }],
|
|
36
|
-
"format": "chronological",
|
|
37
|
-
"maxTokens": 100000
|
|
38
|
-
},
|
|
39
|
-
"triggers": [
|
|
40
|
-
{
|
|
41
|
-
"topic": "ISSUE_OPENED",
|
|
42
|
-
"logic": {
|
|
43
|
-
"engine": "javascript",
|
|
44
|
-
"script": "return message.sender === 'system' && !message.metadata?._republished;"
|
|
45
|
-
},
|
|
46
|
-
"action": "execute_task"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"hooks": {
|
|
50
|
-
"onComplete": {
|
|
51
|
-
"action": "publish_message",
|
|
52
|
-
"transform": {
|
|
53
|
-
"engine": "javascript",
|
|
54
|
-
"script": "const { complexity, taskType, reasoning } = result;\nconst taskText = triggeringMessage.content?.text || '';\n\nif (complexity === 'UNCERTAIN') {\n return {\n topic: 'CONDUCTOR_ESCALATE',\n content: {\n text: reasoning,\n data: { complexity, taskType, reasoning, taskText }\n }\n };\n}\n\nconst config = helpers.getConfig(complexity, taskType);\n\nreturn {\n topic: 'CLUSTER_OPERATIONS',\n content: {\n text: `[${complexity}:${taskType}] ${reasoning}`,\n data: {\n complexity,\n taskType,\n operations: [\n { action: 'load_config', config },\n { action: 'publish', topic: 'ISSUE_OPENED', content: { text: taskText }, metadata: { _republished: true } }\n ]\n }\n }\n};"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"id": "senior-conductor",
|
|
61
|
-
"role": "conductor",
|
|
62
|
-
"modelLevel": "level2",
|
|
63
|
-
"useDirectApi": true,
|
|
64
|
-
"outputFormat": "json",
|
|
65
|
-
"jsonSchema": {
|
|
66
|
-
"type": "object",
|
|
67
|
-
"properties": {
|
|
68
|
-
"complexity": {
|
|
69
|
-
"type": "string",
|
|
70
|
-
"enum": ["TRIVIAL", "SIMPLE", "STANDARD", "CRITICAL"],
|
|
71
|
-
"description": "Task complexity (no UNCERTAIN - must decide)"
|
|
72
|
-
},
|
|
73
|
-
"taskType": {
|
|
74
|
-
"type": "string",
|
|
75
|
-
"enum": ["INQUIRY", "TASK", "DEBUG"],
|
|
76
|
-
"description": "Type of work after analysis (INQUIRY/TASK/DEBUG)"
|
|
77
|
-
},
|
|
78
|
-
"reasoning": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"description": "Detailed explanation"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"required": ["complexity", "taskType", "reasoning"]
|
|
84
|
-
},
|
|
85
|
-
"prompt": {
|
|
86
|
-
"system": "You are the SENIOR CONDUCTOR - expert task analyzer.\n\nThe junior conductor was uncertain. Make a definitive classification.\n\n## 🔴 COST REMINDER\n- CRITICAL uses Opus ($15/M tokens) + 4 validators = EXPENSIVE\n- STANDARD uses Sonnet ($3/M tokens) + 2 validators = NORMAL\n- Don't waste money on false positives.\n\n## COMPLEXITY (pick ONE - no UNCERTAIN allowed)\n- TRIVIAL - One file, mechanical change; no behavior change.\n- SIMPLE - Small change, 1-2 files, low risk.\n- STANDARD - Multi-file work or user-visible behavior. **DEFAULT CHOICE.**\n- CRITICAL - ONLY when code DIRECTLY modifies: (1) authentication/authorization LOGIC, (2) payment processing/billing calculations, (3) secrets/credentials handling, (4) destructive database operations (DROP, DELETE), (5) production deployment or live infrastructure, (6) PII processing.\n\n**🔴 BIAS: If unsure between STANDARD and CRITICAL, choose STANDARD.** CRITICAL is expensive.\n\n## NOT CRITICAL (Common False Positives)\n- Refactoring code that MENTIONS auth/billing/security (not MODIFYING the logic)\n- Adding TypeScript types, tests, code organization\n- Read-only queries, config reorganization\n- Factory patterns, dependency injection\n\n## TASK TYPE (pick ONE)\n- INQUIRY - Questions, exploration (read-only)\n- TASK - Implement something new\n- DEBUG - Fix something broken\n\n## Examples\n\nTask: \"Refactor auth service into smaller modules\"\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"Code refactor, not modifying auth logic\"}\n```\n\nTask: \"Fix bug in password validation\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"DEBUG\", \"reasoning\": \"Directly modifying auth logic\"}\n```\n\nTask: \"Add payment method\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"New billing code\"}\n```\n\n## Rules\n1. Output ONLY valid JSON - no other text\n2. YOU MUST DECIDE - pick exactly one value for each field\n3. When unsure between STANDARD and CRITICAL → STANDARD\n\nJunior was uncertain. Original task follows."
|
|
87
|
-
},
|
|
88
|
-
"contextStrategy": {
|
|
89
|
-
"sources": [
|
|
90
|
-
{ "topic": "ISSUE_OPENED", "limit": 1 },
|
|
91
|
-
{
|
|
92
|
-
"topic": "CONDUCTOR_ESCALATE",
|
|
93
|
-
"since": "last_agent_start",
|
|
94
|
-
"limit": 1
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"topic": "CLUSTER_OPERATIONS_VALIDATION_FAILED",
|
|
98
|
-
"since": "cluster_start",
|
|
99
|
-
"limit": 3
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"format": "chronological",
|
|
103
|
-
"maxTokens": 100000
|
|
104
|
-
},
|
|
105
|
-
"maxRetries": 3,
|
|
106
|
-
"triggers": [
|
|
107
|
-
{ "topic": "CONDUCTOR_ESCALATE", "action": "execute_task" },
|
|
108
|
-
{
|
|
109
|
-
"topic": "CLUSTER_OPERATIONS_VALIDATION_FAILED",
|
|
110
|
-
"action": "execute_task"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"hooks": {
|
|
114
|
-
"onComplete": {
|
|
115
|
-
"action": "publish_message",
|
|
116
|
-
"transform": {
|
|
117
|
-
"engine": "javascript",
|
|
118
|
-
"script": "const { complexity, taskType, reasoning } = result;\n\nlet taskText = triggeringMessage.content?.data?.taskText || '';\nif (!taskText) {\n taskText = triggeringMessage.content?.text || '';\n}\n\nconst config = helpers.getConfig(complexity, taskType);\n\nreturn {\n topic: 'CLUSTER_OPERATIONS',\n content: {\n text: `Senior: [${complexity}:${taskType}] ${reasoning}`,\n data: {\n complexity,\n taskType,\n operations: [\n { action: 'load_config', config },\n { action: 'publish', topic: 'ISSUE_OPENED', content: { text: taskText }, metadata: { _republished: true } }\n ]\n }\n }\n};"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
# Base image for vibe cluster isolation mode
|
|
2
|
-
# Provides: Node.js, Python, Git, Chromium, Claude CLI, Playwright deps, Infrastructure tools
|
|
3
|
-
#
|
|
4
|
-
# Build: docker build -t vibe-cluster-base vibe/cluster/docker/vibe-cluster/
|
|
5
|
-
# Usage: zeroshot run <task> --docker
|
|
6
|
-
|
|
7
|
-
FROM node:20-slim
|
|
8
|
-
|
|
9
|
-
# Upgrade npm to fix Arborist isDescendantOf bug (npm 10.x crash on complex peer deps)
|
|
10
|
-
# See: https://github.com/npm/cli/issues/7682
|
|
11
|
-
RUN npm install -g npm@latest
|
|
12
|
-
|
|
13
|
-
# Version pinning for infrastructure tools
|
|
14
|
-
ARG AWS_CLI_VERSION=2.15.10
|
|
15
|
-
ARG TERRAFORM_VERSION=1.6.6
|
|
16
|
-
ARG KUBECTL_VERSION=1.29.0
|
|
17
|
-
ARG HELM_VERSION=3.13.3
|
|
18
|
-
ARG INFRACOST_VERSION=0.10.32
|
|
19
|
-
ARG TFLINT_VERSION=0.50.0
|
|
20
|
-
ARG TFSEC_VERSION=1.28.4
|
|
21
|
-
|
|
22
|
-
# Install system dependencies for e2e testing and development
|
|
23
|
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
24
|
-
git \
|
|
25
|
-
curl \
|
|
26
|
-
# Build tools for native modules (node-gyp needs make, gcc, g++)
|
|
27
|
-
build-essential \
|
|
28
|
-
python3-dev \
|
|
29
|
-
ca-certificates \
|
|
30
|
-
gnupg \
|
|
31
|
-
unzip \
|
|
32
|
-
# Docker for starting services
|
|
33
|
-
docker.io \
|
|
34
|
-
docker-compose \
|
|
35
|
-
# Python for general development
|
|
36
|
-
python3 \
|
|
37
|
-
python3-pip \
|
|
38
|
-
python3-venv \
|
|
39
|
-
# Chromium dependencies
|
|
40
|
-
chromium \
|
|
41
|
-
fonts-liberation \
|
|
42
|
-
libasound2 \
|
|
43
|
-
libatk-bridge2.0-0 \
|
|
44
|
-
libatk1.0-0 \
|
|
45
|
-
libcups2 \
|
|
46
|
-
libdbus-1-3 \
|
|
47
|
-
libdrm2 \
|
|
48
|
-
libgbm1 \
|
|
49
|
-
libgtk-3-0 \
|
|
50
|
-
libnspr4 \
|
|
51
|
-
libnss3 \
|
|
52
|
-
libx11-xcb1 \
|
|
53
|
-
libxcomposite1 \
|
|
54
|
-
libxdamage1 \
|
|
55
|
-
libxfixes3 \
|
|
56
|
-
libxrandr2 \
|
|
57
|
-
xdg-utils \
|
|
58
|
-
&& rm -rf /var/lib/apt/lists/* \
|
|
59
|
-
# Create python symlink for compatibility
|
|
60
|
-
&& ln -sf /usr/bin/python3 /usr/bin/python
|
|
61
|
-
|
|
62
|
-
# Install GitHub CLI for git authentication
|
|
63
|
-
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
|
64
|
-
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
|
|
65
|
-
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
|
66
|
-
&& apt-get update && apt-get install -y gh \
|
|
67
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
68
|
-
|
|
69
|
-
# Install infrastructure tools
|
|
70
|
-
# AWS CLI v2
|
|
71
|
-
RUN curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip" -o /tmp/awscliv2.zip \
|
|
72
|
-
&& unzip -q /tmp/awscliv2.zip -d /tmp \
|
|
73
|
-
&& /tmp/aws/install \
|
|
74
|
-
&& rm -rf /tmp/awscliv2.zip /tmp/aws
|
|
75
|
-
|
|
76
|
-
# Terraform
|
|
77
|
-
RUN curl -fsSL "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -o /tmp/terraform.zip \
|
|
78
|
-
&& unzip -q /tmp/terraform.zip -d /usr/local/bin \
|
|
79
|
-
&& chmod +x /usr/local/bin/terraform \
|
|
80
|
-
&& rm /tmp/terraform.zip
|
|
81
|
-
|
|
82
|
-
# kubectl
|
|
83
|
-
RUN curl -fsSL "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
|
|
84
|
-
&& chmod +x /usr/local/bin/kubectl
|
|
85
|
-
|
|
86
|
-
# Helm
|
|
87
|
-
RUN curl -fsSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" -o /tmp/helm.tar.gz \
|
|
88
|
-
&& tar -xzf /tmp/helm.tar.gz -C /tmp \
|
|
89
|
-
&& mv /tmp/linux-amd64/helm /usr/local/bin/helm \
|
|
90
|
-
&& chmod +x /usr/local/bin/helm \
|
|
91
|
-
&& rm -rf /tmp/helm.tar.gz /tmp/linux-amd64
|
|
92
|
-
|
|
93
|
-
# infracost (cost estimation)
|
|
94
|
-
RUN curl -fsSL "https://github.com/infracost/infracost/releases/download/v${INFRACOST_VERSION}/infracost-linux-amd64.tar.gz" -o /tmp/infracost.tar.gz \
|
|
95
|
-
&& tar -xzf /tmp/infracost.tar.gz -C /tmp \
|
|
96
|
-
&& mv /tmp/infracost-linux-amd64 /usr/local/bin/infracost \
|
|
97
|
-
&& chmod +x /usr/local/bin/infracost \
|
|
98
|
-
&& rm /tmp/infracost.tar.gz
|
|
99
|
-
|
|
100
|
-
# tflint (terraform linter)
|
|
101
|
-
RUN curl -fsSL "https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_amd64.zip" -o /tmp/tflint.zip \
|
|
102
|
-
&& unzip -q /tmp/tflint.zip -d /usr/local/bin \
|
|
103
|
-
&& chmod +x /usr/local/bin/tflint \
|
|
104
|
-
&& rm /tmp/tflint.zip
|
|
105
|
-
|
|
106
|
-
# tfsec (security scanner)
|
|
107
|
-
RUN curl -fsSL "https://github.com/aquasecurity/tfsec/releases/download/v${TFSEC_VERSION}/tfsec-linux-amd64" -o /usr/local/bin/tfsec \
|
|
108
|
-
&& chmod +x /usr/local/bin/tfsec
|
|
109
|
-
|
|
110
|
-
# Set AWS_PAGER to empty to disable paging in AWS CLI
|
|
111
|
-
ENV AWS_PAGER=""
|
|
112
|
-
|
|
113
|
-
# Set Chromium path for Playwright
|
|
114
|
-
ENV CHROME_BIN=/usr/bin/chromium
|
|
115
|
-
ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
|
|
116
|
-
|
|
117
|
-
# Copy zeroshot source into container and install globally
|
|
118
|
-
# CRITICAL: This enables isolation mode to use 'zeroshot task run' inside container
|
|
119
|
-
# which provides timeout, error handling, and log streaming infrastructure
|
|
120
|
-
COPY --chown=node:node . /tmp/zeroshot/
|
|
121
|
-
RUN cd /tmp/zeroshot && npm install && npm link
|
|
122
|
-
|
|
123
|
-
# Pre-bake common npm dependencies (Issue #20: 30-40% startup reduction)
|
|
124
|
-
# These are installed once at image build time, then copied to workspaces at runtime
|
|
125
|
-
# if the project's dependencies are satisfied by the pre-baked set.
|
|
126
|
-
COPY docker/zeroshot-cluster/pre-baked-deps.json /pre-baked-deps/package.json
|
|
127
|
-
RUN cd /pre-baked-deps && npm install --ignore-scripts \
|
|
128
|
-
&& chown -R node:node /pre-baked-deps
|
|
129
|
-
|
|
130
|
-
# Install Claude CLI globally
|
|
131
|
-
RUN npm install -g @anthropic-ai/claude-code
|
|
132
|
-
|
|
133
|
-
# Install Playwright (uses system Chromium)
|
|
134
|
-
RUN npx playwright install-deps chromium 2>/dev/null || true
|
|
135
|
-
|
|
136
|
-
# Add node user to docker group for Docker socket access
|
|
137
|
-
RUN groupadd -f docker && usermod -aG docker node
|
|
138
|
-
|
|
139
|
-
# Use existing 'node' user from base image (uid 1000)
|
|
140
|
-
# Create directories with proper ownership for Claude CLI
|
|
141
|
-
RUN mkdir -p /home/node/.claude /home/node/.config/gh \
|
|
142
|
-
&& chown -R node:node /home/node
|
|
143
|
-
|
|
144
|
-
# Create workspace directory with node ownership
|
|
145
|
-
RUN mkdir -p /workspace && chown node:node /workspace
|
|
146
|
-
WORKDIR /workspace
|
|
147
|
-
|
|
148
|
-
# Switch to non-root user (required for --dangerously-skip-permissions)
|
|
149
|
-
USER node
|
|
150
|
-
|
|
151
|
-
# Default command (overridden by vibe)
|
|
152
|
-
CMD ["bash"]
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pre-baked-deps",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Pre-baked npm dependencies for zeroshot isolation containers",
|
|
5
|
-
"private": true,
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"typescript": "^5.3.0",
|
|
8
|
-
"eslint": "^8.56.0",
|
|
9
|
-
"@typescript-eslint/parser": "^6.19.0",
|
|
10
|
-
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
11
|
-
"prettier": "^3.2.0",
|
|
12
|
-
"jest": "^29.7.0",
|
|
13
|
-
"@types/jest": "^29.5.0",
|
|
14
|
-
"ts-jest": "^29.1.0",
|
|
15
|
-
"@types/node": "^20.11.0",
|
|
16
|
-
"tsx": "^4.7.0",
|
|
17
|
-
"esbuild": "^0.19.0",
|
|
18
|
-
"dotenv": "^16.4.0",
|
|
19
|
-
"glob": "^10.3.0",
|
|
20
|
-
"chalk": "^5.3.0",
|
|
21
|
-
"commander": "^12.0.0",
|
|
22
|
-
"axios": "^1.6.0",
|
|
23
|
-
"node-fetch": "^3.3.0",
|
|
24
|
-
"zod": "^3.22.0",
|
|
25
|
-
"lodash": "^4.17.0",
|
|
26
|
-
"@types/lodash": "^4.14.0"
|
|
27
|
-
}
|
|
28
|
-
}
|