cli-five 0.2.4 → 0.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-five",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
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": {
@@ -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('');
@@ -118,8 +120,14 @@ function printNextSteps(answers) {
118
120
  log.raw(` 3. Open Copilot Chat — select an agent from the dropdown (${kleur.bold('not')} @mention).`);
119
121
  log.raw(` 4. Select ${kleur.bold('Orchestrator')} — use handoff buttons or ask it to delegate:`);
120
122
  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.`));
123
+ log.raw(` 5. ${hasDocs ? 'Kickoff prompt (paste this into Orchestrator):' : 'Or go autonomous:'}`);
124
+ if (hasDocs) {
125
+ const docList = answers.docFiles.join(', ');
126
+ log.raw(kleur.cyan(` Review PROJECT.md (your source docs — ${docList} — are embedded`));
127
+ log.raw(kleur.cyan(` in the Source Documents section) and begin implementation.`));
128
+ } else {
129
+ log.raw(kleur.gray(` read PROJECT.md and implement Phase 1.`));
130
+ }
123
131
  log.raw(` 6. Review generated instruction files in .github/instructions/.`);
124
132
  log.raw(kleur.gray(` Edit applyTo globs and guidelines to fit your project.`));
125
133
  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,8 +375,10 @@ 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 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.
378
380
  let output = '';
379
- const proc = spawn(cmd, args, { cwd, stdio: ['inherit', 'pipe', 'pipe'] });
381
+ const proc = spawn(cmd, args, { cwd, stdio: ['ignore', 'pipe', 'pipe'] });
380
382
  proc.stdout.on('data', (chunk) => {
381
383
  const text = chunk.toString();
382
384
  process.stdout.write(text);