cli-five 0.2.18 → 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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Code Like I'm Five** — scaffold a 5-agent AI team into any repo.
4
4
 
5
- ## Two ways to install
5
+ ## Three ways to install
6
6
 
7
7
  ### Full setup (recommended for teams)
8
8
 
@@ -27,6 +27,21 @@ copilot plugin install idusortus/cli-five
27
27
 
28
28
  Installs the 5 agents to your Copilot profile. No project config, no interview — just the agents with the same autonomous contracts shipped by the scaffolded templates.
29
29
 
30
+ ### Let an agent do it (prompt)
31
+
32
+ Paste a ready-made prompt into any repo and have your agent install *and verify* cli-five there:
33
+
34
+ ```text
35
+ Install cli-five in this repo for OpenCode and verify it works. Preview with
36
+ `npx -y cli-five@latest init --target opencode --dry-run --yes` first, then run it
37
+ without --dry-run. Confirm all five agents appear in `opencode debug agents`, run a
38
+ live orchestrator->planner delegation smoke test, run `npx -y cli-five@latest doctor`,
39
+ gitignore STATE.md/agent-diary.md/histories/, and leave everything staged without
40
+ committing. Report what you verified.
41
+ ```
42
+
43
+ The full version — platform detection, provider/auth checks, collision preview, stop conditions, and what to report back — is in **[docs/INSTALL_PROMPT.md](docs/INSTALL_PROMPT.md)**. It is generic: use it in any repository, Copilot or OpenCode.
44
+
30
45
  ## Supported platforms
31
46
 
32
47
  cli-five can scaffold for:
@@ -210,12 +225,14 @@ During `init --full-interview` you can choose the model provider and optionally
210
225
  |---|---|---|
211
226
  | GitHub Copilot | Copilot | `Claude Sonnet 4.6 (copilot)` |
212
227
  | OpenCode Zen | OpenCode | `opencode/gpt-5.3-codex` |
213
- | OpenCode Go | OpenCode | `opencode-go/qwen3.8-max` |
228
+ | OpenCode Go | OpenCode | `opencode-go/deepseek-v4.1-flash` |
214
229
 
215
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.
216
231
 
217
232
  `--yes` uses the provider's defaults. `--provider opencode-go --yes` skips the provider prompt.
218
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
+
219
236
  ### Copilot cost modes
220
237
 
221
238
  | Agent | `premium` (1x–3x) | `cheap` (0x) | `mixed` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-five",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "description": "Code Like I'm Five — scaffold a 5-agent AI team (GitHub Copilot or OpenCode) into any repo.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -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
- const task = frontmatter.permission?.task || frontmatter.permissions?.task;
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']
@@ -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/qwen3.8-max',
35
- Planner: 'opencode-go/deepseek-v4-pro',
36
- Coder: 'opencode-go/qwen3.8-max',
37
- Designer: 'opencode-go/gpt-5.6-luna',
38
- Reviewer: 'opencode-go/kimi-k2.7-code',
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
- permission:
7
- read: allow
8
- edit: allow
9
- write: allow
10
- glob: allow
11
- grep: allow
12
- list: allow
13
- bash: allow
14
- webfetch: allow
15
- websearch: allow
16
- skill: allow
17
- lsp: allow
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** | GPT 5.3 Codex | 1x |
25
- | **Cheap** | Qwen 3.8 Max | 0x |
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
- permission:
7
- read: allow
8
- edit: allow
9
- write: allow
10
- glob: allow
11
- grep: allow
12
- list: allow
13
- webfetch: allow
14
- websearch: allow
15
- skill: allow
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** | Gemini 3.1 Pro | 1x |
23
- | **Cheap** | GPT 5.6 Luna | 0x |
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
- permission:
7
- task:
8
- planner: allow
9
- coder: allow
10
- designer: allow
11
- reviewer: allow
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** | GPT 5.3 Codex | 1x |
21
- | **Cheap** | Qwen 3.8 Max | 0x |
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
- permission:
7
- read: allow
8
- glob: allow
9
- grep: allow
10
- list: allow
11
- webfetch: allow
12
- websearch: allow
13
- skill: allow
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** | Claude Opus 4.6 | 3x |
25
- | **Cheap** | Qwen 3.8 Flash | 0x |
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
- permission:
7
- read: allow
8
- glob: allow
9
- grep: allow
10
- list: allow
11
- webfetch: allow
12
- websearch: allow
13
- skill: allow
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** | Claude Sonnet 4.6 | 1x |
21
- | **Cheap** | Qwen 3.8 Flash | 0x |
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