buildcrew 1.8.1 → 1.8.3
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/bin/setup.js +49 -7
- package/package.json +1 -1
package/bin/setup.js
CHANGED
|
@@ -27,6 +27,14 @@ async function exists(path) {
|
|
|
27
27
|
try { await access(path); return true; } catch { return false; }
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
async function ask(question) {
|
|
31
|
+
const { createInterface } = await import("readline");
|
|
32
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
33
|
+
return new Promise(resolve => {
|
|
34
|
+
rl.question(question, answer => { rl.close(); resolve(answer.trim().toLowerCase()); });
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
// ─── Template registry ───
|
|
31
39
|
|
|
32
40
|
const TEMPLATES = {
|
|
@@ -295,16 +303,37 @@ ${d.hasAI ? "- AI-generated content treated as untrusted (sanitize before render
|
|
|
295
303
|
if (d.apiRoutes.length > 0) log(` ${CYAN}API Routes${RESET} ${d.apiRoutes.length} found`);
|
|
296
304
|
if (d.locales.length > 0) log(` ${CYAN}Locales${RESET} ${d.locales.join(", ")}`);
|
|
297
305
|
|
|
298
|
-
//
|
|
306
|
+
// Interactive: offer remaining templates
|
|
299
307
|
const remaining = Object.entries(TEMPLATES).filter(([name, t]) => t.file && !autoTemplates.includes(name));
|
|
300
308
|
if (remaining.length > 0) {
|
|
301
|
-
log(`\n ${BOLD}
|
|
302
|
-
for (
|
|
303
|
-
|
|
309
|
+
log(`\n ${BOLD}Additional harness files available:${RESET}\n`);
|
|
310
|
+
for (let i = 0; i < remaining.length; i++) {
|
|
311
|
+
const [name, t] = remaining[i];
|
|
312
|
+
log(` ${BOLD}${i + 1})${RESET} ${CYAN}${name}${RESET} — ${DIM}${t.desc}${RESET}`);
|
|
313
|
+
}
|
|
314
|
+
log(` ${BOLD}A)${RESET} All of the above`);
|
|
315
|
+
log(` ${BOLD}S)${RESET} Skip\n`);
|
|
316
|
+
|
|
317
|
+
const answer = await ask(` Which ones? ${DIM}(numbers separated by space, A for all, S to skip)${RESET} `);
|
|
318
|
+
|
|
319
|
+
if (answer === "a" || answer === "all") {
|
|
320
|
+
for (const [name, t] of remaining) {
|
|
321
|
+
await copyFile(join(TEMPLATES_SRC, t.file), join(HARNESS_DIR, `${name}.md`));
|
|
322
|
+
log(` ${GREEN} + ${RESET} ${name}.md`);
|
|
323
|
+
}
|
|
324
|
+
log("");
|
|
325
|
+
} else if (answer && answer !== "s" && answer !== "skip") {
|
|
326
|
+
const nums = answer.split(/[\s,]+/).map(n => parseInt(n) - 1).filter(n => n >= 0 && n < remaining.length);
|
|
327
|
+
for (const idx of nums) {
|
|
328
|
+
const [name, t] = remaining[idx];
|
|
329
|
+
await copyFile(join(TEMPLATES_SRC, t.file), join(HARNESS_DIR, `${name}.md`));
|
|
330
|
+
log(` ${GREEN} + ${RESET} ${name}.md`);
|
|
331
|
+
}
|
|
332
|
+
if (nums.length > 0) log("");
|
|
304
333
|
}
|
|
305
334
|
}
|
|
306
335
|
|
|
307
|
-
log(
|
|
336
|
+
log(` ${BOLD}Next step:${RESET} Edit ${CYAN}.claude/harness/*.md${RESET} — fill in project-specific details.`);
|
|
308
337
|
log(` ${DIM}Look for <!-- comments --> — those are the parts to customize.${RESET}\n`);
|
|
309
338
|
}
|
|
310
339
|
|
|
@@ -455,9 +484,22 @@ async function runInstall(force) {
|
|
|
455
484
|
const { execSync } = await import("child_process");
|
|
456
485
|
const mcpList = execSync("claude mcp list 2>/dev/null", { encoding: "utf8" });
|
|
457
486
|
if (!mcpList.includes("playwright")) {
|
|
458
|
-
log(
|
|
459
|
-
log(` ${BOLD}claude mcp add playwright -- npx @anthropic-ai/mcp-server-playwright${RESET}\n`);
|
|
487
|
+
log(`\n ${YELLOW}Playwright MCP${RESET} is needed for browser testing agents.`);
|
|
460
488
|
log(` ${DIM}Used by: browser-qa, design-reviewer, canary-monitor, designer${RESET}\n`);
|
|
489
|
+
const answer = await ask(` Install Playwright MCP now? ${BOLD}(Y/n)${RESET} `);
|
|
490
|
+
if (answer === "" || answer === "y" || answer === "yes") {
|
|
491
|
+
log(`\n ${DIM}Running: claude mcp add playwright -- npx @anthropic-ai/mcp-server-playwright${RESET}\n`);
|
|
492
|
+
try {
|
|
493
|
+
execSync("claude mcp add playwright -- npx @anthropic-ai/mcp-server-playwright", { stdio: "inherit" });
|
|
494
|
+
log(`\n ${GREEN}${BOLD}Playwright MCP installed!${RESET}\n`);
|
|
495
|
+
} catch {
|
|
496
|
+
log(`\n ${RED}Failed to install.${RESET} Run manually:`);
|
|
497
|
+
log(` ${BOLD}claude mcp add playwright -- npx @anthropic-ai/mcp-server-playwright${RESET}\n`);
|
|
498
|
+
}
|
|
499
|
+
} else {
|
|
500
|
+
log(`\n ${DIM}Skipped. Install later with:${RESET}`);
|
|
501
|
+
log(` ${BOLD}claude mcp add playwright -- npx @anthropic-ai/mcp-server-playwright${RESET}\n`);
|
|
502
|
+
}
|
|
461
503
|
} else {
|
|
462
504
|
log(` ${GREEN}Playwright MCP:${RESET} installed ✓\n`);
|
|
463
505
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buildcrew",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "15 AI agents for Claude Code — full development lifecycle from product thinking to production monitoring",
|
|
5
5
|
"homepage": "https://buildcrew-landing.vercel.app",
|
|
6
6
|
"author": "z1nun",
|