cli-five 0.2.5 → 0.2.7

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
@@ -25,12 +25,12 @@ Installs the 5 agents to your Copilot profile. No project config, no interview
25
25
  ```
26
26
  your-repo/
27
27
  ├── .github/
28
- │ ├── agents/ # 5 agents with handoffs + subagent delegation
29
- │ │ ├── orchestrator.agent.md # 📋 Plan 💻 Code 🎨 Design 🔍 Review
30
- │ │ ├── planner.agent.md # 🎯 Execute 💻 Code Directly
31
- │ │ ├── coder.agent.md # 🔍 Review 🎯 Back to Orchestrator
32
- │ │ ├── designer.agent.md # 🔍 Review 🎯 Back to Orchestrator
33
- │ │ └── reviewer.agent.md # 🎯 Back to Orchestrator 💻 Fix Issues
28
+ │ ├── agents/ # 5 agents — Orchestrator delegates autonomously
29
+ │ │ ├── orchestrator.agent.md # Routes tasks: Planner → Coder/Designer → Reviewer
30
+ │ │ ├── planner.agent.md # Researches codebase, produces implementation plans
31
+ │ │ ├── coder.agent.md # Writes production code, runs tests
32
+ │ │ ├── designer.agent.md # UI/UX design, layouts, theming
33
+ │ │ └── reviewer.agent.md # Code review, convention compliance
34
34
  │ ├── copilot-instructions.md # Persona + project mandates from interview
35
35
  │ ├── instructions/ # Stack-specific coding guidelines
36
36
  │ └── skills/ # Installed skills from awesome-copilot + skills.sh
@@ -42,14 +42,16 @@ your-repo/
42
42
  └── histories/ # Per-agent accumulated learnings
43
43
  ```
44
44
 
45
- ## Orchestration modes
45
+ ## How it works
46
46
 
47
- The Orchestrator supports **both** delegation patterns:
47
+ Select the **Orchestrator** agent in Copilot Chat and describe what you want. The Orchestrator autonomously calls Planner → Coder/Designer → Reviewer without any manual handoff clicks.
48
48
 
49
- - **Handoff buttons** — Click `📋 Plan`, `💻 Code`, `🎨 Design`, or `🔍 Review` to manually transition between agents with pre-filled context.
50
- - **Subagent delegation** — Ask the Orchestrator to handle a complex task and it calls Planner → Coder → Reviewer autonomously.
49
+ ```
50
+ User: implement from plan.md
51
+ Orchestrator → [calls Planner] → [calls Coder] → [calls Reviewer] → done
52
+ ```
51
53
 
52
- Each specialist also has handoffs: Coder/Designer → Reviewer, Reviewer → Coder (fix loop), and everyone → back to Orchestrator.
54
+ No buttons. No "click here to continue". Just results.
53
55
 
54
56
  ## Commands
55
57
 
@@ -77,10 +79,10 @@ npx cli-five help
77
79
  2. **git init** — if needed. Asks first.
78
80
  3. **Overwrite gate** — double-confirms ("Proceed?" then "R U Sure?"). Only `--force --yes` bypasses.
79
81
  4. **Interview** — name, one-liner, stack, frameworks, goals, constraints, cost mode, persona toggle.
80
- 5. **Scaffold** — writes 18 files. Substitutes answers into templates. Swaps `model:` per cost mode. Adds `handoffs:` to all agents.
82
+ 5. **Scaffold** — writes 18 files. Substitutes answers into templates. Swaps `model:` per cost mode.
81
83
  6. **Skill discovery** — the hero feature. Multi-source discovery from **awesome-copilot** (30k+ ★ community marketplace) and **skills.sh**. Color-coded recommendations, source attribution, multiselect install, and post-install breadcrumbs with copy-paste commands for the awesome-copilot suggestion skill and MCP server.
82
84
  7. **Custom instructions** — generates stack-specific `.instructions.md` files for detected languages.
83
- 8. **Next steps** — tells you to use handoff buttons or autonomous mode, offers plugin install shortcut.
85
+ 8. **Next steps** — tells you to open Copilot Chat, select Orchestrator, and start building. No button-clicking required.
84
86
 
85
87
  ## Cost modes
86
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-five",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Code Like I'm Five — scaffold a 5-agent VS Code Copilot team into any repo.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4,15 +4,6 @@ description: "Writes production code following workspace conventions. Use when:
4
4
  model: GPT-5.3-Codex (copilot)
5
5
  tools: ['vscode', 'execute', 'read', 'github/*', 'edit', 'search', 'web', 'vscode/memory', 'todo']
6
6
  agents: []
7
- handoffs:
8
- - label: "🔍 Review"
9
- agent: Reviewer
10
- prompt: "Review the changes I just made for correctness and conventions."
11
- send: false
12
- - label: "🎯 Back to Orchestrator"
13
- agent: Orchestrator
14
- prompt: "Implementation complete. Coordinate next steps."
15
- send: false
16
7
  ---
17
8
 
18
9
  ## Mandatory Coding Principles
@@ -4,15 +4,6 @@ description: "Handles all UI/UX design tasks. Use when: creating screens, layout
4
4
  model: Claude Opus 4.6 (copilot)
5
5
  tools: ['read', 'edit', 'search', 'web', 'vscode/memory']
6
6
  agents: []
7
- handoffs:
8
- - label: "🔍 Review"
9
- agent: Reviewer
10
- prompt: "Review the UI changes for accessibility, conventions, and design quality."
11
- send: false
12
- - label: "🎯 Back to Orchestrator"
13
- agent: Orchestrator
14
- prompt: "Design work complete. Coordinate next steps."
15
- send: false
16
7
  ---
17
8
 
18
9
  ## Design Principles
@@ -4,23 +4,6 @@ description: "Coordinates multi-agent workflows. Delegates to Planner, Coder, De
4
4
  model: Claude Sonnet 4.6 (copilot)
5
5
  tools: ['read/readFile', 'agent', 'vscode/memory', 'github/*']
6
6
  agents: ['Planner', 'Coder', 'Designer', 'Reviewer']
7
- handoffs:
8
- - label: "📋 Plan"
9
- agent: Planner
10
- prompt: "Research the codebase and create an implementation plan for this task."
11
- send: false
12
- - label: "💻 Code"
13
- agent: Coder
14
- prompt: "Implement the approved plan."
15
- send: false
16
- - label: "🎨 Design"
17
- agent: Designer
18
- prompt: "Design the UI components described in the plan."
19
- send: false
20
- - label: "🔍 Review"
21
- agent: Reviewer
22
- prompt: "Review the implementation for correctness, conventions, and architecture."
23
- send: false
24
7
  ---
25
8
 
26
9
  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.
@@ -3,16 +3,6 @@ name: Planner
3
3
  description: "Creates implementation plans by researching the codebase, consulting documentation, and identifying edge cases."
4
4
  model: Claude Opus 4.6 (copilot)
5
5
  tools: ['read', 'search', 'web', 'vscode/memory']
6
- user-invocable: false
7
- handoffs:
8
- - label: "🎯 Execute Plan"
9
- agent: Orchestrator
10
- prompt: "Plan is ready. Execute it phase by phase."
11
- send: false
12
- - label: "💻 Code Directly"
13
- agent: Coder
14
- prompt: "Implement this plan."
15
- send: false
16
6
  ---
17
7
 
18
8
  # Planning Agent
@@ -4,16 +4,6 @@ description: "Reviews code and agent output for correctness, convention complian
4
4
  model: Claude Opus 4.6 (copilot)
5
5
  tools: ['read', 'search', 'web', 'vscode/memory']
6
6
  agents: []
7
- user-invocable: true
8
- handoffs:
9
- - label: "🎯 Back to Orchestrator"
10
- agent: Orchestrator
11
- prompt: "Review complete. See verdict above. Coordinate fixes or proceed."
12
- send: false
13
- - label: "💻 Fix Issues"
14
- agent: Coder
15
- prompt: "Fix the issues identified in the review above."
16
- send: false
17
7
  ---
18
8
 
19
9
  ## Identity
@@ -109,6 +109,8 @@ async function ask(message, initial = false) {
109
109
  }
110
110
 
111
111
  function printNextSteps(answers) {
112
+ const hasDocs = answers.docFiles?.length > 0;
113
+
112
114
  log.raw('');
113
115
  log.raw(kleur.bold().green('Done. Next steps:'));
114
116
  log.raw('');
@@ -116,10 +118,15 @@ function printNextSteps(answers) {
116
118
  log.raw(` 2. Enable Copilot subagent invocations (settings.json):`);
117
119
  log.raw(kleur.gray(` "chat.subagents.allowInvocationsFromSubagents": true`));
118
120
  log.raw(` 3. Open Copilot Chat — select an agent from the dropdown (${kleur.bold('not')} @mention).`);
119
- log.raw(` 4. Select ${kleur.bold('Orchestrator')} — use handoff buttons or ask it to delegate:`);
120
- log.raw(kleur.gray(` 📋 Plan 💻 Code 🎨 Design 🔍 Review`));
121
- log.raw(` 5. Or go autonomous:`);
122
- log.raw(kleur.gray(` read PROJECT.md and implement Phase 1.`));
121
+ log.raw(` 4. Select ${kleur.bold('Orchestrator')} — it routes tasks autonomously to Planner, Coder, Designer, and Reviewer.`);
122
+ log.raw(` 5. ${hasDocs ? 'Kickoff prompt (paste this into Orchestrator):' : 'Start building:'}`);
123
+ if (hasDocs) {
124
+ const docList = answers.docFiles.join(', ');
125
+ log.raw(kleur.cyan(` Review PROJECT.md (your source docs — ${docList} — are embedded`));
126
+ log.raw(kleur.cyan(` in the Source Documents section) and begin implementation.`));
127
+ } else {
128
+ log.raw(kleur.gray(` read PROJECT.md and implement Phase 1.`));
129
+ }
123
130
  log.raw(` 6. Review generated instruction files in .github/instructions/.`);
124
131
  log.raw(kleur.gray(` Edit applyTo globs and guidelines to fit your project.`));
125
132
  log.raw('');
@@ -1,3 +1,4 @@
1
+ import kleur from 'kleur';
1
2
  import prompts from 'prompts';
2
3
 
3
4
  // ── Preset stacks ─────────────────────────────────────────────────────
@@ -85,6 +86,9 @@ export async function interview(detected, args, docHints = {}) {
85
86
  throw new Error('Interview cancelled. Nothing was written.');
86
87
  };
87
88
 
89
+ const hasDocs = (docHints.files?.length ?? 0) > 0;
90
+ const skipHint = hasDocs ? kleur.dim(' (↵ to skip — your docs cover this)') : '';
91
+
88
92
  // ── Basic info ────────────────────────────────────────────────────
89
93
  const basic = await prompts(
90
94
  [
@@ -97,7 +101,7 @@ export async function interview(detected, args, docHints = {}) {
97
101
  {
98
102
  type: 'text',
99
103
  name: 'oneLiner',
100
- message: 'One-line description (becomes PROJECT.md vision)',
104
+ message: `One-line description (becomes PROJECT.md vision)${skipHint}`,
101
105
  initial: docHints.oneLiner || '',
102
106
  },
103
107
  ],
@@ -158,13 +162,13 @@ export async function interview(detected, args, docHints = {}) {
158
162
  {
159
163
  type: 'text',
160
164
  name: 'goals',
161
- message: 'Primary goal of this project (one sentence)',
165
+ message: `Primary goal of this project (one sentence)${skipHint}`,
162
166
  initial: docHints.goals || '',
163
167
  },
164
168
  {
165
169
  type: 'text',
166
170
  name: 'constraints',
167
- message: 'Hard constraints (perf, deps, deploy, compliance — one sentence, optional)',
171
+ message: `Hard constraints (perf, deps, deploy, compliance — one sentence, optional)${skipHint}`,
168
172
  initial: docHints.constraints || '',
169
173
  },
170
174
  {
@@ -192,6 +196,7 @@ export async function interview(detected, args, docHints = {}) {
192
196
  presetId: preset,
193
197
  quickstart: chosenPreset?.quickstart || '',
194
198
  docs: docHints.raw || '',
199
+ docFiles: docHints.files || [],
195
200
  });
196
201
  }
197
202
 
@@ -211,6 +216,7 @@ function defaults(detected, docHints = {}) {
211
216
  presetId: hasDetected ? 'custom' : fallback.value,
212
217
  quickstart: hasDetected ? '' : fallback.quickstart,
213
218
  docs: docHints.raw || '',
219
+ docFiles: docHints.files || [],
214
220
  };
215
221
  }
216
222
 
@@ -247,7 +247,7 @@ export async function skillDiscovery({ cwd, answers, args }) {
247
247
  for (const [repo, skills] of byRepo) {
248
248
  const skillArgs = skills.flatMap((s) => ['--skill', s]);
249
249
  log.info(`Installing from ${kleur.bold(repo)}: ${skills.join(', ')}`);
250
- const result = await runSkillsTracked(env, ['add', repo, ...skillArgs, '-a', 'github-copilot'], cwd);
250
+ const result = await runSkillsTracked(env, ['add', repo, ...skillArgs, '-a', 'github-copilot', '--yes'], cwd);
251
251
  for (const s of skills) {
252
252
  installResults.push({ name: `${repo}@${s}`, ...result });
253
253
  }
@@ -256,7 +256,7 @@ export async function skillDiscovery({ cwd, answers, args }) {
256
256
  // Standalone refs
257
257
  for (const ref of standalone) {
258
258
  log.info(`Installing ${ref}...`);
259
- const result = await runSkillsTracked(env, ['add', ref, '-a', 'github-copilot'], cwd);
259
+ const result = await runSkillsTracked(env, ['add', ref, '-a', 'github-copilot', '--yes'], cwd);
260
260
  installResults.push({ name: ref, ...result });
261
261
  }
262
262
 
@@ -375,20 +375,24 @@ function runSkills(env, skillsArgs, cwd) {
375
375
  function runSkillsTracked(env, skillsArgs, cwd) {
376
376
  const { cmd, args } = env.runner(skillsArgs);
377
377
  return new Promise((resolve) => {
378
- // stdout/stderr inherit so the child writes directly to the TTY.
379
- // This prevents line-buffering from swallowing unterminated prompt lines
380
- // (e.g. the global vs local install question from the skills CLI).
381
- // Failure is detected via exit code; stderr still captured for reason extraction.
382
- let stderrOutput = '';
383
- const proc = spawn(cmd, args, { cwd, stdio: ['inherit', 'inherit', 'pipe'] });
378
+ // stdout/stderr piped and re-echoed so we can capture output for failure detection.
379
+ // --yes is always passed so no interactive prompts will stall the pipe.
380
+ let output = '';
381
+ const proc = spawn(cmd, args, { cwd, stdio: ['ignore', 'pipe', 'pipe'] });
382
+ proc.stdout.on('data', (chunk) => {
383
+ const text = chunk.toString();
384
+ process.stdout.write(text);
385
+ output += text;
386
+ });
384
387
  proc.stderr.on('data', (chunk) => {
385
388
  const text = chunk.toString();
386
389
  process.stderr.write(text);
387
- stderrOutput += text;
390
+ output += text;
388
391
  });
389
392
  proc.on('exit', (code) => {
390
- if (code !== 0) {
391
- const reason = extractFailureReason(stripAnsi(stderrOutput)) || `exited with code ${code}`;
393
+ const clean = stripAnsi(output);
394
+ if (code !== 0 || /failed to clone|installation failed|canceled/i.test(clean)) {
395
+ const reason = extractFailureReason(clean);
392
396
  resolve({ ok: false, reason });
393
397
  } else {
394
398
  resolve({ ok: true, reason: null });
@@ -4,15 +4,6 @@ description: "Writes production code following workspace conventions. Use when:
4
4
  model: GPT-5.3-Codex (copilot)
5
5
  tools: ['vscode', 'execute', 'read', 'io.github.upstash/context7/*', 'github/*', 'edit', 'search', 'web', 'vscode/memory', 'todo']
6
6
  agents: []
7
- handoffs:
8
- - label: "🔍 Review"
9
- agent: Reviewer
10
- prompt: "Review the changes I just made for correctness and conventions."
11
- send: false
12
- - label: "🎯 Back to Orchestrator"
13
- agent: Orchestrator
14
- prompt: "Implementation complete. Coordinate next steps."
15
- send: false
16
7
  ---
17
8
 
18
9
  ## Model Selection
@@ -4,15 +4,6 @@ description: "Handles all UI/UX design tasks. Use when: creating screens, layout
4
4
  model: Claude Opus 4.6 (copilot)
5
5
  tools: ['read', 'edit', 'search', 'web', 'io.github.upstash/context7/*', 'vscode/memory']
6
6
  agents: []
7
- handoffs:
8
- - label: "🔍 Review"
9
- agent: Reviewer
10
- prompt: "Review the UI changes for accessibility, conventions, and design quality."
11
- send: false
12
- - label: "🎯 Back to Orchestrator"
13
- agent: Orchestrator
14
- prompt: "Design work complete. Coordinate next steps."
15
- send: false
16
7
  ---
17
8
 
18
9
  ## Model Selection
@@ -4,23 +4,6 @@ description: "Coordinates multi-agent workflows. Delegates to Planner, Coder, De
4
4
  model: Claude Sonnet 4.6 (copilot)
5
5
  tools: ['read/readFile', 'agent', 'vscode/memory', 'github/*']
6
6
  agents: ['Planner', 'Coder', 'Designer', 'Reviewer']
7
- handoffs:
8
- - label: "📋 Plan"
9
- agent: Planner
10
- prompt: "Read PROJECT.md and STATE.md, then create an implementation plan for this task."
11
- send: false
12
- - label: "💻 Code"
13
- agent: Coder
14
- prompt: "Implement the approved plan. Read decisions.md for context."
15
- send: false
16
- - label: "🎨 Design"
17
- agent: Designer
18
- prompt: "Design the UI components described in the plan."
19
- send: false
20
- - label: "🔍 Review"
21
- agent: Reviewer
22
- prompt: "Review the implementation for correctness, conventions, and architecture."
23
- send: false
24
7
  ---
25
8
 
26
9
  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.
@@ -3,16 +3,6 @@ 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
  model: Claude Opus 4.6 (copilot)
5
5
  tools: ['read', 'search', 'web', 'io.github.upstash/context7/*', 'vscode/memory']
6
- user-invocable: false
7
- handoffs:
8
- - label: "🎯 Execute Plan"
9
- agent: Orchestrator
10
- prompt: "Plan is ready. Execute it phase by phase."
11
- send: false
12
- - label: "💻 Code Directly"
13
- agent: Coder
14
- prompt: "Implement this plan."
15
- send: false
16
6
  ---
17
7
 
18
8
  # Planning Agent
@@ -4,16 +4,6 @@ description: "Reviews code and agent output for correctness, convention complian
4
4
  model: Claude Opus 4.6 (copilot)
5
5
  tools: ['read', 'search', 'web', 'vscode/memory']
6
6
  agents: []
7
- user-invocable: true
8
- handoffs:
9
- - label: "🎯 Back to Orchestrator"
10
- agent: Orchestrator
11
- prompt: "Review complete. See verdict above. Coordinate fixes or proceed."
12
- send: false
13
- - label: "💻 Fix Issues"
14
- agent: Coder
15
- prompt: "Fix the issues identified in the review above."
16
- send: false
17
7
  ---
18
8
 
19
9
  ## Model Selection