@aslomon/effectum 0.2.1 → 0.3.0

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
@@ -1,6 +1,12 @@
1
1
  <div align="center">
2
2
 
3
- # ⚡ Effectum
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="docs/logo-dark.svg">
5
+ <source media="(prefers-color-scheme: light)" srcset="docs/logo-light.svg">
6
+ <img src="docs/logo-light.svg" alt="effectum" width="280">
7
+ </picture>
8
+
9
+ <br><br>
4
10
 
5
11
  ### Describe what you want. Get production-ready code.
6
12
 
@@ -9,10 +15,11 @@ _Effectum (Latin): the result, the accomplishment — that which has been brough
9
15
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
16
  [![Claude Code](https://img.shields.io/badge/Built%20for-Claude%20Code-blueviolet)](https://claude.ai/claude-code)
11
17
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
18
+ [![Website](https://img.shields.io/badge/Website-aslomon.github.io%2Feffectum-D97706)](https://aslomon.github.io/effectum/)
12
19
 
13
20
  <br>
14
21
 
15
- [Quick Start](#-quick-start) · [How It Works](#-how-it-works) · [The Workflow](#-the-workflow) · [PRD Workshop](#-the-prd-workshop) · [How is this different?](#-how-is-this-different) · [Limitations](#-limitations)
22
+ [Quick Start](#-quick-start) · [How It Works](#-how-it-works) · [The Workflow](#-the-workflow) · [PRD Workshop](#-the-prd-workshop) · [How is this different?](#-how-is-this-different) · [Website](https://aslomon.github.io/effectum/)
16
23
 
17
24
  </div>
18
25
 
@@ -82,15 +89,15 @@ claude
82
89
 
83
90
  One command. Everything you need for autonomous Claude Code development.
84
91
 
85
- | What | Details |
86
- |------|---------|
92
+ | What | Details |
93
+ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
87
94
  | **10 workflow commands** | `/plan`, `/tdd`, `/verify`, `/e2e`, `/code-review`, `/build-fix`, `/refactor-clean`, `/ralph-loop`, `/cancel-ralph`, `/checkpoint` |
88
- | **PRD Workshop** | 8 knowledge files for guided specification writing |
89
- | **4 MCP servers** | Context7, Playwright, Sequential Thinking, Filesystem |
90
- | **Playwright setup** | Browser install + `playwright.config.ts` |
91
- | **Stack presets** | Next.js + Supabase, Python + FastAPI, Swift/SwiftUI, Generic |
92
- | **Quality gates** | 8 automated checks (build, types, lint, tests, security, etc.) |
93
- | **Guardrails** | Rules that prevent known mistakes |
95
+ | **PRD Workshop** | 8 knowledge files for guided specification writing |
96
+ | **4 MCP servers** | Context7, Playwright, Sequential Thinking, Filesystem |
97
+ | **Playwright setup** | Browser install + `playwright.config.ts` |
98
+ | **Stack presets** | Next.js + Supabase, Python + FastAPI, Swift/SwiftUI, Generic |
99
+ | **Quality gates** | 8 automated checks (build, types, lint, tests, security, etc.) |
100
+ | **Guardrails** | Rules that prevent known mistakes |
94
101
 
95
102
  ---
96
103
 
@@ -296,12 +303,12 @@ The better the spec, the better the code.
296
303
 
297
304
  ## 🆚 How is this different?
298
305
 
299
- | Tool | What it does | What Effectum adds |
300
- |------|-------------|-------------------|
301
- | **GSD** | Context engineering, prevents context rot | PRD Workshop (helps you write the spec), Ralph Loop (autonomous overnight) |
302
- | **BMAD** | Full enterprise methodology | Same ideas, 90% less ceremony |
303
- | **SpecKit** | Living specifications | + Autonomous execution + Quality gates |
304
- | **Taskmaster** | Task breakdown from PRDs | + TDD workflow + Code review + E2E testing |
306
+ | Tool | What it does | What Effectum adds |
307
+ | -------------- | ----------------------------------------- | -------------------------------------------------------------------------- |
308
+ | **GSD** | Context engineering, prevents context rot | PRD Workshop (helps you write the spec), Ralph Loop (autonomous overnight) |
309
+ | **BMAD** | Full enterprise methodology | Same ideas, 90% less ceremony |
310
+ | **SpecKit** | Living specifications | + Autonomous execution + Quality gates |
311
+ | **Taskmaster** | Task breakdown from PRDs | + TDD workflow + Code review + E2E testing |
305
312
 
306
313
  The short version: Effectum doesn't invent new concepts. It combines what already works, removes what doesn't, and packages it so it actually runs.
307
314
 
package/bin/install.js CHANGED
@@ -1,14 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Effectum interactive installer.
4
- * Rewritten with @clack/prompts for full TUI experience.
3
+ * Effectum interactive installer — Intelligent Setup Recommender.
4
+ *
5
+ * 9-step flow:
6
+ * 1. Install Scope (global / local)
7
+ * 2. Project Basics (name, stack, package manager)
8
+ * 3. App Type (web-app, api, mobile, cli, ...)
9
+ * 4. Description (free-text intent)
10
+ * 5. Language (15+ languages + custom)
11
+ * 6. Autonomy (conservative / standard / full)
12
+ * 7. Recommendation (preview calculated setup)
13
+ * 8. Decision (use recommended / customize / manual)
14
+ * 9. Install (write files)
5
15
  *
6
16
  * Usage:
7
- * npx @aslomon/effectum interactive install
8
- * npx @aslomon/effectum --global non-interactive global install
9
- * npx @aslomon/effectum --local non-interactive local install
10
- * npx @aslomon/effectum --yes non-interactive with smart defaults
11
- * npx @aslomon/effectum --dry-run show plan without writing
17
+ * npx @aslomon/effectum -> interactive install
18
+ * npx @aslomon/effectum --global -> non-interactive global install
19
+ * npx @aslomon/effectum --local -> non-interactive local install
20
+ * npx @aslomon/effectum --yes -> non-interactive with smart defaults
21
+ * npx @aslomon/effectum --dry-run -> show plan without writing
12
22
  */
13
23
  "use strict";
14
24
 
@@ -22,26 +32,38 @@ const {
22
32
  buildSubstitutionMap,
23
33
  renderTemplate,
24
34
  findTemplatePath,
25
- findRemainingPlaceholders,
26
35
  } = require("./lib/template");
27
36
  const { writeConfig } = require("./lib/config");
28
37
  const { AUTONOMY_MAP, FORMATTER_MAP, MCP_SERVERS } = require("./lib/constants");
29
- const { ensureDir, deepMerge, findRepoRoot: findRepoRootShared } = require("./lib/utils");
38
+ const {
39
+ ensureDir,
40
+ deepMerge,
41
+ findRepoRoot: findRepoRootShared,
42
+ } = require("./lib/utils");
43
+ const { recommend } = require("./lib/recommendation");
30
44
  const {
31
45
  initClack,
32
46
  getClack,
33
47
  printBanner,
48
+ askScope,
34
49
  askProjectName,
35
50
  askStack,
51
+ askAppType,
52
+ askDescription,
36
53
  askLanguage,
37
54
  askAutonomy,
38
- askMcpServers,
55
+ showRecommendation,
56
+ askSetupMode,
57
+ askCustomize,
58
+ askManual,
39
59
  askPlaywright,
40
60
  askGitBranch,
41
61
  showSummary,
42
62
  showOutro,
43
63
  } = require("./lib/ui");
44
64
 
65
+ // ─── File helpers ─────────────────────────────────────────────────────────────
66
+
45
67
  function copyFile(src, dest, opts = {}) {
46
68
  if (fs.existsSync(dest) && opts.skipExisting) {
47
69
  return { status: "skipped", dest };
@@ -71,7 +93,7 @@ function findRepoRoot() {
71
93
  return findRepoRootShared();
72
94
  }
73
95
 
74
- // ─── Parse CLI args ───────────────────────────────────────────────────────
96
+ // ─── Parse CLI args ─────────────────────────────────────────────────────────
75
97
 
76
98
  function parseArgs(argv) {
77
99
  const args = argv.slice(2);
@@ -84,11 +106,11 @@ function parseArgs(argv) {
84
106
  yes: args.includes("--yes") || args.includes("-y"),
85
107
  dryRun: args.includes("--dry-run"),
86
108
  help: args.includes("--help") || args.includes("-h"),
87
- nonInteractive: false, // computed below
109
+ nonInteractive: false,
88
110
  };
89
111
  }
90
112
 
91
- // ─── MCP server install helpers ───────────────────────────────────────────
113
+ // ─── MCP server install helpers ─────────────────────────────────────────────
92
114
 
93
115
  function checkPackageAvailable(pkg) {
94
116
  try {
@@ -174,7 +196,7 @@ function addMcpToSettings(settingsPath, mcpResults, targetDir) {
174
196
  );
175
197
  }
176
198
 
177
- // ─── Playwright install helpers ───────────────────────────────────────────
199
+ // ─── Playwright install helpers ─────────────────────────────────────────────
178
200
 
179
201
  function installPlaywrightBrowsers() {
180
202
  try {
@@ -228,7 +250,7 @@ export default defineConfig({
228
250
  return { status: "created", dest: tsConfig };
229
251
  }
230
252
 
231
- // ─── Core install: copy commands, templates, stacks ───────────────────────
253
+ // ─── Core install: copy commands, templates, stacks ─────────────────────────
232
254
 
233
255
  function installBaseFiles(targetDir, repoRoot, isGlobal) {
234
256
  const claudeDir = isGlobal ? targetDir : path.join(targetDir, ".claude");
@@ -278,7 +300,7 @@ function installBaseFiles(targetDir, repoRoot, isGlobal) {
278
300
  return steps;
279
301
  }
280
302
 
281
- // ─── Generate configured files (CLAUDE.md, settings.json, guardrails.md)
303
+ // ─── Generate configured files (CLAUDE.md, settings.json, guardrails.md) ───
282
304
 
283
305
  function generateConfiguredFiles(config, targetDir, repoRoot, isGlobal) {
284
306
  const claudeDir = isGlobal ? targetDir : path.join(targetDir, ".claude");
@@ -292,16 +314,14 @@ function generateConfiguredFiles(config, targetDir, repoRoot, isGlobal) {
292
314
  const claudeMdTmpl = findTemplatePath("CLAUDE.md.tmpl", targetDir, repoRoot);
293
315
  const { content: claudeMdContent, remaining: claudeMdRemaining } =
294
316
  renderTemplate(claudeMdTmpl, vars);
295
- const claudeMdDest = isGlobal
296
- ? path.join(targetDir, "CLAUDE.md")
297
- : path.join(targetDir, "CLAUDE.md");
317
+ const claudeMdDest = path.join(targetDir, "CLAUDE.md");
298
318
  ensureDir(path.dirname(claudeMdDest));
299
319
  fs.writeFileSync(claudeMdDest, claudeMdContent, "utf8");
300
320
  steps.push({ status: "created", dest: claudeMdDest });
301
321
 
302
322
  if (claudeMdRemaining.length > 0) {
303
323
  console.warn(
304
- `⚠ CLAUDE.md has remaining placeholders: ${claudeMdRemaining.join(", ")}`,
324
+ `Warning: CLAUDE.md has remaining placeholders: ${claudeMdRemaining.join(", ")}`,
305
325
  );
306
326
  }
307
327
 
@@ -327,6 +347,12 @@ function generateConfiguredFiles(config, targetDir, repoRoot, isGlobal) {
327
347
  deny: settingsObj.permissions?.deny || [],
328
348
  };
329
349
 
350
+ // Apply Agent Teams env var
351
+ if (settingsObj.env) {
352
+ settingsObj.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS =
353
+ config.recommended && config.recommended.agentTeams ? "1" : "0";
354
+ }
355
+
330
356
  // Apply formatter in PostToolUse hook
331
357
  const formatter = FORMATTER_MAP[config.stack] || FORMATTER_MAP.generic;
332
358
  if (settingsObj.hooks?.PostToolUse) {
@@ -374,7 +400,6 @@ function generateConfiguredFiles(config, targetDir, repoRoot, isGlobal) {
374
400
  const guardrailsRaw = fs.readFileSync(guardrailsTmpl, "utf8");
375
401
  let guardrailsContent = guardrailsRaw;
376
402
 
377
- // Replace "No stack-specific guardrails..." with actual content
378
403
  if (stackSections.STACK_SPECIFIC_GUARDRAILS) {
379
404
  guardrailsContent = guardrailsContent.replace(
380
405
  /No stack-specific guardrails configured yet\. Run \/setup to configure for your stack\./,
@@ -396,26 +421,39 @@ function generateConfiguredFiles(config, targetDir, repoRoot, isGlobal) {
396
421
  return steps;
397
422
  }
398
423
 
399
- // ─── Smart defaults for non-interactive mode ──────────────────────────────
424
+ // ─── Smart defaults for non-interactive mode ────────────────────────────────
400
425
 
401
426
  function buildSmartDefaults(targetDir) {
402
427
  const detected = detectAll(targetDir);
403
- const formatter =
404
- FORMATTER_MAP[detected.stack || "generic"] || FORMATTER_MAP.generic;
428
+ const stack = detected.stack || "generic";
429
+ const formatter = FORMATTER_MAP[stack] || FORMATTER_MAP.generic;
430
+
431
+ const rec = recommend({
432
+ stack,
433
+ appType: "web-app",
434
+ description: "",
435
+ autonomyLevel: "standard",
436
+ language: "english",
437
+ });
438
+
405
439
  return {
406
440
  projectName: detected.projectName,
407
- stack: detected.stack || "generic",
441
+ stack,
442
+ appType: "web-app",
443
+ description: "",
408
444
  language: "english",
409
445
  autonomyLevel: "standard",
410
446
  packageManager: detected.packageManager,
411
447
  formatter: formatter.name,
412
- mcpServers: MCP_SERVERS.map((s) => s.key),
413
- playwrightBrowsers: true,
448
+ mcpServers: rec.mcps,
449
+ playwrightBrowsers: rec.mcps.includes("playwright"),
414
450
  installScope: "local",
451
+ recommended: rec,
452
+ mode: "recommended",
415
453
  };
416
454
  }
417
455
 
418
- // ─── Git branch creation ──────────────────────────────────────────────────
456
+ // ─── Git branch creation ────────────────────────────────────────────────────
419
457
 
420
458
  function createGitBranch(name) {
421
459
  const result = spawnSync("git", ["checkout", "-b", name], {
@@ -425,7 +463,7 @@ function createGitBranch(name) {
425
463
  return result.status === 0;
426
464
  }
427
465
 
428
- // ─── Main ─────────────────────────────────────────────────────────────────
466
+ // ─── Main ───────────────────────────────────────────────────────────────────
429
467
 
430
468
  async function main() {
431
469
  const args = parseArgs(process.argv);
@@ -434,10 +472,10 @@ async function main() {
434
472
  // Help
435
473
  if (args.help) {
436
474
  console.log(`
437
- effectum — autonomous development system for Claude Code
475
+ effectum — intelligent setup for Claude Code
438
476
 
439
477
  Usage:
440
- npx effectum Interactive installer
478
+ npx effectum Interactive installer (9-step flow)
441
479
  npx effectum init Per-project init (after global install)
442
480
  npx effectum reconfigure Re-apply config from .effectum.json
443
481
  npx effectum --global Install globally (~/.claude/, no prompts)
@@ -477,7 +515,7 @@ Options:
477
515
  const homeClaudeDir = path.join(os.homedir(), ".claude");
478
516
  const targetDir = isGlobal ? homeClaudeDir : process.cwd();
479
517
 
480
- // ── Non-interactive mode ────────────────────────────────────────────────
518
+ // ── Non-interactive mode ──────────────────────────────────────────────────
481
519
  if (isNonInteractive) {
482
520
  const config = buildSmartDefaults(targetDir);
483
521
  config.installScope = isGlobal ? "global" : "local";
@@ -524,7 +562,7 @@ Options:
524
562
  process.exit(0);
525
563
  }
526
564
 
527
- // ── Interactive mode ────────────────────────────────────────────────────
565
+ // ── Interactive mode — 9-step flow ────────────────────────────────────────
528
566
  const p = await initClack();
529
567
  printBanner();
530
568
 
@@ -536,47 +574,77 @@ Options:
536
574
  );
537
575
  }
538
576
 
539
- // Scope
540
- const scopeValue = await p.select({
541
- message: "Install scope",
542
- options: [
543
- {
544
- value: "local",
545
- label: "Local",
546
- hint: "This project only (./.claude/)",
547
- },
548
- {
549
- value: "global",
550
- label: "Global",
551
- hint: "All projects (~/.claude/)",
552
- },
553
- ],
554
- initialValue: "local",
555
- });
556
- if (p.isCancel(scopeValue)) {
557
- p.cancel("Setup cancelled.");
558
- process.exit(0);
559
- }
577
+ // ── Step 1: Install Scope ─────────────────────────────────────────────────
578
+ const scopeValue = await askScope();
560
579
  const installGlobal = scopeValue === "global";
561
580
  const installTargetDir = installGlobal ? homeClaudeDir : process.cwd();
562
581
 
563
- // Project name
564
- const projectName = await askProjectName(detected.projectName);
582
+ // Global install: skip project-specific steps, install base only
583
+ if (installGlobal) {
584
+ if (args.dryRun) {
585
+ p.log.info("Dry run — no files will be written.");
586
+ p.note(
587
+ [
588
+ "~/.claude/commands/*.md",
589
+ "~/.claude/settings.json",
590
+ "~/.claude/guardrails.md",
591
+ "~/.effectum/templates/",
592
+ "~/.effectum/stacks/",
593
+ ].join("\n"),
594
+ "Files to be created",
595
+ );
596
+ p.outro("Dry run complete. No changes made.");
597
+ process.exit(0);
598
+ }
565
599
 
566
- // Stack
600
+ const s = p.spinner();
601
+ s.start("Installing global workflow commands and templates...");
602
+ installBaseFiles(installTargetDir, repoRoot, true);
603
+ s.stop("Global base files installed");
604
+
605
+ showOutro(true);
606
+ process.exit(0);
607
+ }
608
+
609
+ // ── Step 2: Project Basics ────────────────────────────────────────────────
610
+ const projectName = await askProjectName(detected.projectName);
567
611
  const stack = await askStack(detected.stack);
568
612
 
569
- // Language
613
+ // ── Step 3: App Type ──────────────────────────────────────────────────────
614
+ const appType = await askAppType();
615
+
616
+ // ── Step 4: Description ───────────────────────────────────────────────────
617
+ const description = await askDescription();
618
+
619
+ // ── Step 5: Language ──────────────────────────────────────────────────────
570
620
  const langResult = await askLanguage();
571
621
 
572
- // Autonomy
622
+ // ── Step 6: Autonomy ──────────────────────────────────────────────────────
573
623
  const autonomyLevel = await askAutonomy();
574
624
 
575
- // MCP servers
576
- const mcpServerKeys = await askMcpServers();
625
+ // ── Step 7: Recommendation Preview ────────────────────────────────────────
626
+ const rec = recommend({
627
+ stack,
628
+ appType,
629
+ description,
630
+ autonomyLevel,
631
+ language: langResult.language,
632
+ });
633
+
634
+ showRecommendation(rec);
577
635
 
578
- // Playwright
579
- const wantPlaywright = mcpServerKeys.includes("playwright")
636
+ // ── Step 8: Decision ──────────────────────────────────────────────────────
637
+ const setupMode = await askSetupMode();
638
+
639
+ let finalSetup = rec;
640
+ if (setupMode === "customize") {
641
+ finalSetup = await askCustomize(rec);
642
+ } else if (setupMode === "manual") {
643
+ finalSetup = await askManual();
644
+ }
645
+
646
+ // Check if playwright is in the final MCP list and ask about browser install
647
+ const wantPlaywright = finalSetup.mcps.includes("playwright")
580
648
  ? await askPlaywright()
581
649
  : false;
582
650
 
@@ -584,23 +652,34 @@ Options:
584
652
  const gitBranch = await askGitBranch();
585
653
 
586
654
  // Build config object
587
- const formatter = FORMATTER_MAP[stack] || FORMATTER_MAP.generic;
655
+ const formatterDef = FORMATTER_MAP[stack] || FORMATTER_MAP.generic;
588
656
  const config = {
589
657
  projectName,
590
658
  stack,
659
+ appType,
660
+ description,
591
661
  language: langResult.language,
592
662
  ...(langResult.customLanguage
593
663
  ? { customLanguage: langResult.customLanguage }
594
664
  : {}),
595
665
  autonomyLevel,
596
666
  packageManager: detected.packageManager,
597
- formatter: formatter.name,
598
- mcpServers: mcpServerKeys,
667
+ formatter: formatterDef.name,
668
+ mcpServers: finalSetup.mcps,
599
669
  playwrightBrowsers: wantPlaywright,
600
- installScope: installGlobal ? "global" : "local",
670
+ installScope: "local",
671
+ recommended: {
672
+ commands: finalSetup.commands,
673
+ hooks: finalSetup.hooks,
674
+ skills: finalSetup.skills,
675
+ mcps: finalSetup.mcps,
676
+ subagents: finalSetup.subagents,
677
+ agentTeams: finalSetup.agentTeams,
678
+ },
679
+ mode: setupMode,
601
680
  };
602
681
 
603
- // ── Dry run ─────────────────────────────────────────────────────────────
682
+ // ── Dry run ───────────────────────────────────────────────────────────────
604
683
  if (args.dryRun) {
605
684
  p.log.info("Dry run — no files will be written.");
606
685
  p.note(JSON.stringify(config, null, 2), "Planned Configuration");
@@ -612,7 +691,7 @@ Options:
612
691
  "AUTONOMOUS-WORKFLOW.md",
613
692
  ".effectum.json",
614
693
  ];
615
- if (mcpServerKeys.length > 0) {
694
+ if (finalSetup.mcps.length > 0) {
616
695
  plannedFiles.push("MCP servers in settings.json");
617
696
  }
618
697
  p.note(plannedFiles.join("\n"), "Files to be created/updated");
@@ -620,62 +699,60 @@ Options:
620
699
  process.exit(0);
621
700
  }
622
701
 
623
- // ── Create git branch ──────────────────────────────────────────────────
702
+ // ── Step 9: Install ───────────────────────────────────────────────────────
703
+
704
+ // Create git branch if requested
624
705
  if (gitBranch.create) {
625
- const s = p.spinner();
626
- s.start("Creating git branch...");
706
+ const sGit = p.spinner();
707
+ sGit.start("Creating git branch...");
627
708
  const ok = createGitBranch(gitBranch.name);
628
709
  if (ok) {
629
- s.stop(`Branch "${gitBranch.name}" created`);
710
+ sGit.stop(`Branch "${gitBranch.name}" created`);
630
711
  } else {
631
- s.stop("Could not create branch (may already exist)");
712
+ sGit.stop("Could not create branch (may already exist)");
632
713
  }
633
714
  }
634
715
 
635
- // ── Step 1: Base files ─────────────────────────────────────────────────
716
+ // 9a: Base files
636
717
  const s1 = p.spinner();
637
718
  s1.start("Installing workflow commands and templates...");
638
- const baseSteps = installBaseFiles(installTargetDir, repoRoot, installGlobal);
719
+ const baseSteps = installBaseFiles(installTargetDir, repoRoot, false);
639
720
  s1.stop(
640
721
  `Installed ${baseSteps.filter((s) => s.status === "created").length} files`,
641
722
  );
642
723
 
643
- // ── Step 2: Configure (local only) ────────────────────────────────────
644
- const configSteps = [];
645
- if (!installGlobal) {
646
- const s2 = p.spinner();
647
- s2.start(
648
- "Generating configured files (CLAUDE.md, settings.json, guardrails.md)...",
649
- );
650
- const cSteps = generateConfiguredFiles(
651
- config,
652
- installTargetDir,
653
- repoRoot,
654
- installGlobal,
655
- );
656
- configSteps.push(...cSteps);
657
- s2.stop("Configuration files generated");
658
- }
724
+ // 9b: Configure
725
+ const s2 = p.spinner();
726
+ s2.start("Generating CLAUDE.md, settings.json, guardrails.md...");
727
+ const configSteps = generateConfiguredFiles(
728
+ config,
729
+ installTargetDir,
730
+ repoRoot,
731
+ false,
732
+ );
733
+ s2.stop("Configuration files generated");
659
734
 
660
- // ── Step 3: MCP servers ────────────────────────────────────────────────
661
- if (mcpServerKeys.length > 0) {
735
+ // 9c: MCP servers
736
+ if (finalSetup.mcps.length > 0) {
662
737
  const s3 = p.spinner();
663
738
  s3.start("Setting up MCP servers...");
664
- const mcpResults = installMcpServers(mcpServerKeys);
665
- const settingsPath = installGlobal
666
- ? path.join(homeClaudeDir, "settings.json")
667
- : path.join(installTargetDir, ".claude", "settings.json");
739
+ const mcpResults = installMcpServers(finalSetup.mcps);
740
+ const settingsPath = path.join(
741
+ installTargetDir,
742
+ ".claude",
743
+ "settings.json",
744
+ );
668
745
  addMcpToSettings(settingsPath, mcpResults, installTargetDir);
669
746
  const okCount = mcpResults.filter((r) => r.ok).length;
670
747
  s3.stop(`${okCount} MCP servers configured`);
671
748
  }
672
749
 
673
- // ── Step 4: Playwright ─────────────────────────────────────────────────
750
+ // 9d: Playwright
674
751
  if (wantPlaywright) {
675
752
  const s4 = p.spinner();
676
753
  s4.start("Installing Playwright browsers...");
677
754
  const pwResult = installPlaywrightBrowsers();
678
- if (!installGlobal) ensurePlaywrightConfig(process.cwd());
755
+ ensurePlaywrightConfig(process.cwd());
679
756
  s4.stop(
680
757
  pwResult.ok
681
758
  ? "Playwright browsers installed"
@@ -683,13 +760,11 @@ Options:
683
760
  );
684
761
  }
685
762
 
686
- // ── Step 5: Save config ────────────────────────────────────────────────
687
- if (!installGlobal) {
688
- const configPath = writeConfig(installTargetDir, config);
689
- configSteps.push({ status: "created", dest: configPath });
690
- }
763
+ // 9e: Save config
764
+ const configPath = writeConfig(installTargetDir, config);
765
+ configSteps.push({ status: "created", dest: configPath });
691
766
 
692
- // ── Summary ─────────────────────────────────────────────────────────────
767
+ // ── Summary ───────────────────────────────────────────────────────────────
693
768
  const allSteps = [...baseSteps, ...configSteps];
694
769
  const allFiles = allSteps
695
770
  .filter((s) => s && s.dest)
@@ -700,10 +775,9 @@ Options:
700
775
  : path.relative(process.cwd(), s.dest);
701
776
  });
702
777
 
703
- // Deduplicate for summary
704
778
  const uniqueFiles = [...new Set(allFiles)].slice(0, 20);
705
779
  showSummary(config, uniqueFiles);
706
- showOutro(installGlobal);
780
+ showOutro(false);
707
781
  }
708
782
 
709
783
  main().catch((err) => {