cli-five 0.2.19 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +1 -1
- package/src/util/agents.mjs +31 -5
- package/src/util/models.mjs +5 -5
- package/templates/opencode/agents/coder.md +36 -14
- package/templates/opencode/agents/designer.md +30 -12
- package/templates/opencode/agents/orchestrator.md +15 -8
- package/templates/opencode/agents/planner.md +24 -10
- package/templates/opencode/agents/reviewer.md +24 -10
package/README.md
CHANGED
|
@@ -225,12 +225,14 @@ During `init --full-interview` you can choose the model provider and optionally
|
|
|
225
225
|
|---|---|---|
|
|
226
226
|
| GitHub Copilot | Copilot | `Claude Sonnet 4.6 (copilot)` |
|
|
227
227
|
| OpenCode Zen | OpenCode | `opencode/gpt-5.3-codex` |
|
|
228
|
-
| OpenCode Go | OpenCode | `opencode-go/
|
|
228
|
+
| OpenCode Go | OpenCode | `opencode-go/deepseek-v4.1-flash` |
|
|
229
229
|
|
|
230
230
|
**On OpenCode, the default provider is auth-aware.** cli-five checks which provider you are actually authenticated for (`opencode auth list`) and uses it instead of blindly defaulting to OpenCode Zen. If you are authenticated for Go only, `init --target opencode` writes Go models automatically — no `--provider` flag needed. If nothing is detected, or the selected provider does not match your auth, `init` prints a warning telling you how to fix it, so you do not end up with agent files whose models silently fail.
|
|
231
231
|
|
|
232
232
|
`--yes` uses the provider's defaults. `--provider opencode-go --yes` skips the provider prompt.
|
|
233
233
|
|
|
234
|
+
**OpenCode Go defaults:** all five agents use `opencode-go/deepseek-v4.1-flash`, except the Planner, which uses `opencode-go/kimi-k2.7-code`.
|
|
235
|
+
|
|
234
236
|
### Copilot cost modes
|
|
235
237
|
|
|
236
238
|
| Agent | `premium` (1x–3x) | `cheap` (0x) | `mixed` |
|
package/package.json
CHANGED
package/src/util/agents.mjs
CHANGED
|
@@ -98,6 +98,14 @@ export function validateAgentSource(source, fileName, { requiredMarkers = [] } =
|
|
|
98
98
|
return errors;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Validate OpenCode agent frontmatter.
|
|
103
|
+
*
|
|
104
|
+
* Accepts BOTH permission shapes, which OpenCode treats equivalently:
|
|
105
|
+
* - V1 map: permission: { read: allow, task: { planner: allow } }
|
|
106
|
+
* - V2 list: permissions: [{ action: read, resource: "*", effect: allow }, ...]
|
|
107
|
+
* The orchestrator must, in either shape, grant subagent access to its children.
|
|
108
|
+
*/
|
|
101
109
|
export function validateOpenCodeAgentSource(source, fileName) {
|
|
102
110
|
const errors = [];
|
|
103
111
|
const { frontmatter, body } = parseAgentSource(source);
|
|
@@ -122,11 +130,8 @@ export function validateOpenCodeAgentSource(source, fileName) {
|
|
|
122
130
|
errors.push(`expected mode ${expectedMode}, found ${frontmatter.mode}`);
|
|
123
131
|
}
|
|
124
132
|
|
|
125
|
-
if (fileName === 'orchestrator.md') {
|
|
126
|
-
|
|
127
|
-
if (!task) {
|
|
128
|
-
errors.push('orchestrator must declare permission.task for subagents');
|
|
129
|
-
}
|
|
133
|
+
if (fileName === 'orchestrator.md' && !hasSubagentGrant(frontmatter)) {
|
|
134
|
+
errors.push('orchestrator must declare subagent/task permissions for its children');
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
if (!body.trim()) {
|
|
@@ -136,6 +141,27 @@ export function validateOpenCodeAgentSource(source, fileName) {
|
|
|
136
141
|
return errors;
|
|
137
142
|
}
|
|
138
143
|
|
|
144
|
+
/**
|
|
145
|
+
* True when the frontmatter grants subagent access to children, in either form:
|
|
146
|
+
* V1: permission.task is a non-empty map
|
|
147
|
+
* V2: permissions[] contains an action: subagent|task entry
|
|
148
|
+
*/
|
|
149
|
+
function hasSubagentGrant(frontmatter) {
|
|
150
|
+
const task = frontmatter.permission?.task;
|
|
151
|
+
if (task && typeof task === 'object' && Object.keys(task).length > 0) return true;
|
|
152
|
+
if (task === true) return true;
|
|
153
|
+
|
|
154
|
+
const list = frontmatter.permissions;
|
|
155
|
+
if (Array.isArray(list)) {
|
|
156
|
+
return list.some((entry) => {
|
|
157
|
+
const action = String(entry?.action || '').toLowerCase();
|
|
158
|
+
return action === 'subagent' || action === 'task';
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
|
|
139
165
|
function requiredFrontmatterKeys(fileName) {
|
|
140
166
|
return fileName === 'orchestrator.agent.md'
|
|
141
167
|
? ['name', 'description', 'model', 'tools', 'agents']
|
package/src/util/models.mjs
CHANGED
|
@@ -31,11 +31,11 @@ export const DEFAULT_MODEL_MAP = {
|
|
|
31
31
|
Reviewer: 'opencode/claude-sonnet-4-6',
|
|
32
32
|
},
|
|
33
33
|
[PROVIDER_GO]: {
|
|
34
|
-
Orchestrator: 'opencode-go/
|
|
35
|
-
Planner: 'opencode-go/
|
|
36
|
-
Coder: 'opencode-go/
|
|
37
|
-
Designer: 'opencode-go/
|
|
38
|
-
Reviewer: 'opencode-go/
|
|
34
|
+
Orchestrator: 'opencode-go/deepseek-v4.1-flash',
|
|
35
|
+
Planner: 'opencode-go/kimi-k2.7-code',
|
|
36
|
+
Coder: 'opencode-go/deepseek-v4.1-flash',
|
|
37
|
+
Designer: 'opencode-go/deepseek-v4.1-flash',
|
|
38
|
+
Reviewer: 'opencode-go/deepseek-v4.1-flash',
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -3,26 +3,48 @@ name: Coder
|
|
|
3
3
|
description: "Writes production code following workspace conventions. Use when: implementing features, fixing bugs, writing tests, creating modules."
|
|
4
4
|
mode: subagent
|
|
5
5
|
model: opencode/gpt-5.3-codex
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
permissions:
|
|
7
|
+
- action: read
|
|
8
|
+
resource: "*"
|
|
9
|
+
effect: allow
|
|
10
|
+
- action: edit
|
|
11
|
+
resource: "*"
|
|
12
|
+
effect: allow
|
|
13
|
+
- action: write
|
|
14
|
+
resource: "*"
|
|
15
|
+
effect: allow
|
|
16
|
+
- action: glob
|
|
17
|
+
resource: "*"
|
|
18
|
+
effect: allow
|
|
19
|
+
- action: grep
|
|
20
|
+
resource: "*"
|
|
21
|
+
effect: allow
|
|
22
|
+
- action: list
|
|
23
|
+
resource: "*"
|
|
24
|
+
effect: allow
|
|
25
|
+
- action: bash
|
|
26
|
+
resource: "*"
|
|
27
|
+
effect: allow
|
|
28
|
+
- action: webfetch
|
|
29
|
+
resource: "*"
|
|
30
|
+
effect: allow
|
|
31
|
+
- action: websearch
|
|
32
|
+
resource: "*"
|
|
33
|
+
effect: allow
|
|
34
|
+
- action: skill
|
|
35
|
+
resource: "*"
|
|
36
|
+
effect: allow
|
|
37
|
+
- action: lsp
|
|
38
|
+
resource: "*"
|
|
39
|
+
effect: allow
|
|
18
40
|
---
|
|
19
41
|
|
|
20
42
|
## Model Selection
|
|
21
43
|
|
|
22
44
|
| Mode | Model | Premium Cost |
|
|
23
45
|
|---|---|---|
|
|
24
|
-
| **Default** |
|
|
25
|
-
| **
|
|
46
|
+
| **Default** (OpenCode Go) | DeepSeek V4.1 Flash | 0x |
|
|
47
|
+
| **Alternative** (OpenCode Zen) | GPT 5.3 Codex | 1x |
|
|
26
48
|
|
|
27
49
|
To switch: change the `model` key in frontmatter above.
|
|
28
50
|
|
|
@@ -3,24 +3,42 @@ name: Designer
|
|
|
3
3
|
description: "Handles all UI/UX design tasks. Use when: creating screens, layouts, theming, navigation flows, design systems."
|
|
4
4
|
mode: subagent
|
|
5
5
|
model: opencode/gemini-3.1-pro
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
permissions:
|
|
7
|
+
- action: read
|
|
8
|
+
resource: "*"
|
|
9
|
+
effect: allow
|
|
10
|
+
- action: edit
|
|
11
|
+
resource: "*"
|
|
12
|
+
effect: allow
|
|
13
|
+
- action: write
|
|
14
|
+
resource: "*"
|
|
15
|
+
effect: allow
|
|
16
|
+
- action: glob
|
|
17
|
+
resource: "*"
|
|
18
|
+
effect: allow
|
|
19
|
+
- action: grep
|
|
20
|
+
resource: "*"
|
|
21
|
+
effect: allow
|
|
22
|
+
- action: list
|
|
23
|
+
resource: "*"
|
|
24
|
+
effect: allow
|
|
25
|
+
- action: webfetch
|
|
26
|
+
resource: "*"
|
|
27
|
+
effect: allow
|
|
28
|
+
- action: websearch
|
|
29
|
+
resource: "*"
|
|
30
|
+
effect: allow
|
|
31
|
+
- action: skill
|
|
32
|
+
resource: "*"
|
|
33
|
+
effect: allow
|
|
16
34
|
---
|
|
17
35
|
|
|
18
36
|
## Model Selection
|
|
19
37
|
|
|
20
38
|
| Mode | Model | Premium Cost |
|
|
21
39
|
|---|---|---|
|
|
22
|
-
| **Default** |
|
|
23
|
-
| **
|
|
40
|
+
| **Default** (OpenCode Go) | DeepSeek V4.1 Flash | 0x |
|
|
41
|
+
| **Alternative** (OpenCode Zen) | Gemini 3.1 Pro | 1x |
|
|
24
42
|
|
|
25
43
|
To switch: change the `model` key in frontmatter above.
|
|
26
44
|
|
|
@@ -3,12 +3,19 @@ name: Orchestrator
|
|
|
3
3
|
description: "Coordinates multi-agent workflows. Delegates to Planner, Coder, Designer, and Reviewer. Use when: complex multi-step tasks, cross-cutting changes, feature implementation."
|
|
4
4
|
mode: primary
|
|
5
5
|
model: opencode/gpt-5.3-codex
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
permissions:
|
|
7
|
+
- action: subagent
|
|
8
|
+
resource: planner
|
|
9
|
+
effect: allow
|
|
10
|
+
- action: subagent
|
|
11
|
+
resource: coder
|
|
12
|
+
effect: allow
|
|
13
|
+
- action: subagent
|
|
14
|
+
resource: designer
|
|
15
|
+
effect: allow
|
|
16
|
+
- action: subagent
|
|
17
|
+
resource: reviewer
|
|
18
|
+
effect: allow
|
|
12
19
|
---
|
|
13
20
|
|
|
14
21
|
You are a project orchestrator. You break down complex requests into tasks and delegate to specialist subagents. You coordinate work but NEVER implement anything yourself.
|
|
@@ -17,8 +24,8 @@ You are a project orchestrator. You break down complex requests into tasks and d
|
|
|
17
24
|
|
|
18
25
|
| Mode | Model | Premium Cost |
|
|
19
26
|
|---|---|---|
|
|
20
|
-
| **Default** |
|
|
21
|
-
| **
|
|
27
|
+
| **Default** (OpenCode Go) | DeepSeek V4.1 Flash | 0x |
|
|
28
|
+
| **Alternative** (OpenCode Zen) | GPT 5.3 Codex | 1x |
|
|
22
29
|
|
|
23
30
|
To switch: change the `model` key in frontmatter above.
|
|
24
31
|
|
|
@@ -3,14 +3,28 @@ name: Planner
|
|
|
3
3
|
description: "Creates implementation plans by researching the codebase, consulting documentation, and identifying edge cases. Use when: planning features, architectural decisions, or complex multi-file changes."
|
|
4
4
|
mode: subagent
|
|
5
5
|
model: opencode/claude-opus-4-6
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
permissions:
|
|
7
|
+
- action: read
|
|
8
|
+
resource: "*"
|
|
9
|
+
effect: allow
|
|
10
|
+
- action: glob
|
|
11
|
+
resource: "*"
|
|
12
|
+
effect: allow
|
|
13
|
+
- action: grep
|
|
14
|
+
resource: "*"
|
|
15
|
+
effect: allow
|
|
16
|
+
- action: list
|
|
17
|
+
resource: "*"
|
|
18
|
+
effect: allow
|
|
19
|
+
- action: webfetch
|
|
20
|
+
resource: "*"
|
|
21
|
+
effect: allow
|
|
22
|
+
- action: websearch
|
|
23
|
+
resource: "*"
|
|
24
|
+
effect: allow
|
|
25
|
+
- action: skill
|
|
26
|
+
resource: "*"
|
|
27
|
+
effect: allow
|
|
14
28
|
---
|
|
15
29
|
|
|
16
30
|
# Planning Agent
|
|
@@ -21,8 +35,8 @@ You create plans. You do NOT write code.
|
|
|
21
35
|
|
|
22
36
|
| Mode | Model | Premium Cost |
|
|
23
37
|
|---|---|---|
|
|
24
|
-
| **Default** |
|
|
25
|
-
| **
|
|
38
|
+
| **Default** (OpenCode Go) | Kimi K2.7 Code | 0x |
|
|
39
|
+
| **Alternative** (OpenCode Zen) | Claude Opus 4.6 | 3x |
|
|
26
40
|
|
|
27
41
|
To switch: change the `model` key in frontmatter above.
|
|
28
42
|
|
|
@@ -3,22 +3,36 @@ name: Reviewer
|
|
|
3
3
|
description: "Reviews code and agent output for correctness, convention compliance, and architectural alignment. Use when: code review, auditing agent work, validating against specs."
|
|
4
4
|
mode: subagent
|
|
5
5
|
model: opencode/claude-sonnet-4-6
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
permissions:
|
|
7
|
+
- action: read
|
|
8
|
+
resource: "*"
|
|
9
|
+
effect: allow
|
|
10
|
+
- action: glob
|
|
11
|
+
resource: "*"
|
|
12
|
+
effect: allow
|
|
13
|
+
- action: grep
|
|
14
|
+
resource: "*"
|
|
15
|
+
effect: allow
|
|
16
|
+
- action: list
|
|
17
|
+
resource: "*"
|
|
18
|
+
effect: allow
|
|
19
|
+
- action: webfetch
|
|
20
|
+
resource: "*"
|
|
21
|
+
effect: allow
|
|
22
|
+
- action: websearch
|
|
23
|
+
resource: "*"
|
|
24
|
+
effect: allow
|
|
25
|
+
- action: skill
|
|
26
|
+
resource: "*"
|
|
27
|
+
effect: allow
|
|
14
28
|
---
|
|
15
29
|
|
|
16
30
|
## Model Selection
|
|
17
31
|
|
|
18
32
|
| Mode | Model | Premium Cost |
|
|
19
33
|
|---|---|---|
|
|
20
|
-
| **Default** |
|
|
21
|
-
| **
|
|
34
|
+
| **Default** (OpenCode Go) | DeepSeek V4.1 Flash | 0x |
|
|
35
|
+
| **Alternative** (OpenCode Zen) | Claude Sonnet 4.6 | 1x |
|
|
22
36
|
|
|
23
37
|
To switch: change the `model` key in frontmatter above.
|
|
24
38
|
|