jumpstart-mode 1.0.6 → 1.0.8

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.
Files changed (38) hide show
  1. package/.cursorrules +3 -0
  2. package/.github/agents/jumpstart-analyst.agent.md +28 -7
  3. package/.github/agents/jumpstart-architect.agent.md +28 -7
  4. package/.github/agents/jumpstart-challenger.agent.md +37 -4
  5. package/.github/agents/jumpstart-developer.agent.md +19 -8
  6. package/.github/agents/jumpstart-facilitator.agent.md +75 -0
  7. package/.github/agents/jumpstart-pm.agent.md +13 -6
  8. package/.github/agents/jumpstart-scout.agent.md +50 -0
  9. package/.github/copilot-instructions.md +13 -5
  10. package/.github/instructions/specs.instructions.md +2 -0
  11. package/.github/prompts/jumpstart-review.prompt.md +2 -0
  12. package/.github/prompts/jumpstart-status.prompt.md +8 -1
  13. package/.jumpstart/agents/analyst.md +235 -28
  14. package/.jumpstart/agents/architect.md +163 -15
  15. package/.jumpstart/agents/challenger.md +91 -6
  16. package/.jumpstart/agents/developer.md +55 -2
  17. package/.jumpstart/agents/facilitator.md +227 -0
  18. package/.jumpstart/agents/pm.md +40 -5
  19. package/.jumpstart/agents/scout.md +358 -0
  20. package/.jumpstart/commands/commands.md +102 -26
  21. package/.jumpstart/config.yaml +46 -1
  22. package/.jumpstart/domain-complexity.csv +15 -0
  23. package/.jumpstart/roadmap.md +85 -0
  24. package/.jumpstart/templates/agents-md.md +93 -0
  25. package/.jumpstart/templates/architecture.md +48 -8
  26. package/.jumpstart/templates/challenger-brief.md +6 -4
  27. package/.jumpstart/templates/codebase-context.md +265 -0
  28. package/.jumpstart/templates/implementation-plan.md +9 -5
  29. package/.jumpstart/templates/insights.md +18 -18
  30. package/.jumpstart/templates/prd.md +7 -5
  31. package/.jumpstart/templates/product-brief.md +6 -4
  32. package/.jumpstart/templates/roadmap.md +79 -0
  33. package/AGENTS.md +31 -1
  34. package/CLAUDE.md +3 -0
  35. package/README.md +67 -8
  36. package/bin/cli.js +199 -3
  37. package/bin/context7-setup.js +405 -0
  38. package/package.json +1 -1
package/README.md CHANGED
@@ -28,23 +28,30 @@ Every artifact lives in your repository, version-controlled, diffable, and trans
28
28
 
29
29
  Jump Start runs five phases in a strict sequence. Each phase is owned by a specialized AI agent and produces Markdown artifacts that serve as the input for the next phase. A human gate sits between every transition to ensure quality.
30
30
 
31
+ For **brownfield** projects (existing codebases), an optional pre-phase Scout agent analyzes the codebase first. For **greenfield** projects (new codebases), the Architect and Developer agents create per-directory `AGENTS.md` files to document the emerging codebase.
32
+
31
33
  ```mermaid
32
34
  flowchart TB
35
+ S[Pre-Phase: Scout] -.->|brownfield only| P0
33
36
  P0[Phase 0: Challenge] -->|Brief| P1[Phase 1: Analyze]
34
37
  P1 -->|Product Brief| P2[Phase 2: Plan]
35
38
  P2 -->|PRD| P3[Phase 3: Architect]
36
39
  P3 -->|Specs| P4[Phase 4: Build]
37
40
 
41
+ SC(Scout) -.-> S
38
42
  C(Challenger) -.-> P0
39
43
  A(Analyst) -.-> P1
40
44
  PM(Product Manager) -.-> P2
41
45
  Arch(Architect) -.-> P3
42
46
  Dev(Developer) -.-> P4
43
47
 
48
+ style S fill:#ff9800,stroke:#333,stroke-width:2px,color:#fff
44
49
  style P0 fill:#1976d2,stroke:#333,stroke-width:2px,color:#fff
45
50
  style P4 fill:#43a047,stroke:#333,stroke-width:2px,color:#fff
46
51
  ```
47
52
 
53
+ **Pre-Phase -- Codebase Reconnaissance (Brownfield Only).** The Scout agent scans the existing codebase, maps the technology stack, generates C4 architecture diagrams, identifies code patterns and technical debt, and produces a codebase context document that informs all subsequent phases.
54
+
48
55
  **Phase 0 -- Problem Discovery.** The Challenger agent interrogates your idea, surfaces hidden assumptions, drills to root causes, and produces a validated problem statement.
49
56
 
50
57
  **Phase 1 -- Analysis.** The Analyst agent creates user personas, maps current and future-state journeys, and recommends an MVP scope.
@@ -70,6 +77,7 @@ npx jumpstart-mode
70
77
  Follow the prompts to set up the framework. You'll be asked for:
71
78
  - Target directory (default: current directory)
72
79
  - Project name (optional)
80
+ - Project type (greenfield or brownfield — auto-detected based on existing files)
73
81
  - Whether to include GitHub Copilot integration
74
82
 
75
83
  **Command-line Mode:**
@@ -84,6 +92,9 @@ npx jumpstart-mode ./my-project
84
92
  # Install with all options
85
93
  npx jumpstart-mode ./my-project --name "My Project" --copilot
86
94
 
95
+ # Install for an existing codebase (brownfield)
96
+ npx jumpstart-mode ./existing-app --type brownfield --copilot
97
+
87
98
  # Preview what will be installed
88
99
  npx jumpstart-mode --dry-run .
89
100
 
@@ -102,6 +113,7 @@ jumpstart-mode ./my-project --name "My Project"
102
113
 
103
114
  - `<directory>` — Target directory (default: current)
104
115
  - `--name <name>` — Set project name in config
116
+ - `--type <type>` — Set project type: `greenfield` or `brownfield` (auto-detected if omitted)
105
117
  - `--copilot` — Include GitHub Copilot integration files
106
118
  - `--force` — Overwrite existing files without prompting
107
119
  - `--dry-run` — Show what would be installed without copying
@@ -119,7 +131,7 @@ This creates the full directory structure, all agent definitions, templates, and
119
131
 
120
132
  ### 2. Configure
121
133
 
122
- Edit `.jumpstart/config.yaml` to customise agent behaviour, story format, prioritisation method, and other settings. The file is self-documenting with inline comments.
134
+ Edit `.jumpstart/config.yaml` to customise agent behavior, story format, prioritization method, and other settings. The file is self-documenting with inline comments.
123
135
 
124
136
  ### 3. Run
125
137
 
@@ -127,13 +139,18 @@ Edit `.jumpstart/config.yaml` to customise agent behaviour, story format, priori
127
139
 
128
140
  1. Open the project in VS Code
129
141
  2. Open Copilot Chat
130
- 3. Click the agent dropdown and select **"Jump Start: Challenger"**
131
- 4. Describe your idea or problem when prompted
132
- 5. After Phase 0 is approved, select **"Jump Start: Analyst"** and continue through each phase
142
+ 3. **Brownfield projects:** Select **"Jump Start: Scout"** agent first to analyze the existing codebase. After approval, proceed to Phase 0.
143
+ 4. **All projects:** Click the agent dropdown and select **"Jump Start: Challenger"**
144
+ 5. Describe your idea or problem when prompted
145
+ 6. After Phase 0 is approved, select **"Jump Start: Analyst"** and continue through each phase
133
146
 
134
147
  **With Claude Code:**
135
148
 
136
149
  ```
150
+ # Brownfield projects: run Scout first
151
+ /jumpstart.scout
152
+
153
+ # Then start Phase 0
137
154
  /jumpstart.challenge I want to build a tool that helps remote teams track meeting action items
138
155
  ```
139
156
 
@@ -147,6 +164,7 @@ Then continue with `/jumpstart.analyze`, `/jumpstart.plan`, `/jumpstart.architec
147
164
 
148
165
  | Command | Phase | What It Does |
149
166
  |---------|-------|-------------|
167
+ | `/jumpstart.scout` | Pre-0 | Analyze existing codebase (brownfield only) |
150
168
  | `/jumpstart.challenge` | 0 | Begin problem discovery |
151
169
  | `/jumpstart.analyze` | 1 | Generate Product Brief |
152
170
  | `/jumpstart.plan` | 2 | Generate PRD |
@@ -168,12 +186,15 @@ your-project/
168
186
  |-- .jumpstart/ # Framework core (do not rename)
169
187
  | |-- config.yaml # Project and agent settings
170
188
  | |-- agents/ # Detailed agent persona definitions
189
+ | | |-- scout.md # Pre-Phase: Codebase Reconnaissance (brownfield)
171
190
  | | |-- challenger.md # Phase 0: Problem Discovery
172
191
  | | |-- analyst.md # Phase 1: Analysis
173
192
  | | |-- pm.md # Phase 2: Planning
174
193
  | | |-- architect.md # Phase 3: Solutioning
175
194
  | | |-- developer.md # Phase 4: Implementing
176
195
  | |-- templates/ # Artifact templates
196
+ | | |-- codebase-context.md # Scout output template (brownfield)
197
+ | | |-- agents-md.md # Per-directory AGENTS.md template (greenfield)
177
198
  | | |-- challenger-brief.md
178
199
  | | |-- product-brief.md
179
200
  | | |-- prd.md
@@ -186,6 +207,7 @@ your-project/
186
207
  |-- .github/ # GitHub Copilot integration
187
208
  | |-- copilot-instructions.md # Always-on repo instructions
188
209
  | |-- agents/ # Custom agents (appear in Copilot dropdown)
210
+ | | |-- jumpstart-scout.agent.md # Pre-Phase: Scout (brownfield)
189
211
  | | |-- jumpstart-challenger.agent.md
190
212
  | | |-- jumpstart-analyst.agent.md
191
213
  | | |-- jumpstart-pm.agent.md
@@ -202,6 +224,7 @@ your-project/
202
224
  |-- .cursorrules # Cursor IDE integration
203
225
  |
204
226
  |-- specs/ # Generated artifacts (version-controlled)
227
+ | |-- codebase-context.md # Pre-Phase output (brownfield only)
205
228
  | |-- challenger-brief.md # Phase 0 output
206
229
  | |-- product-brief.md # Phase 1 output
207
230
  | |-- prd.md # Phase 2 output
@@ -212,6 +235,7 @@ your-project/
212
235
  | |-- research/ # Optional research artifacts
213
236
  |
214
237
  |-- src/ # Application code (Phase 4 output)
238
+ | |-- AGENTS.md # Per-directory AI context (greenfield, Phase 4)
215
239
  |-- tests/ # Test code (Phase 4 output)
216
240
  |-- README.md # Updated by Developer agent
217
241
  ```
@@ -249,9 +273,10 @@ Insights live in `specs/insights/` with a 1:1 relationship to primary artifacts:
249
273
 
250
274
  ```
251
275
  specs/insights/
276
+ ├── codebase-context-insights.md # Pre-Phase: Scout reasoning (brownfield only)
252
277
  ├── challenger-brief-insights.md # Phase 0: Problem discovery reasoning
253
278
  ├── product-brief-insights.md # Phase 1: Analysis explorations and trade-offs
254
- ├── prd-insights-md # Phase 2: Planning decisions and story prioritisation
279
+ ├── prd-insights.md # Phase 2: Planning decisions and story prioritization
255
280
  ├── architecture-insights.md # Phase 3: Technical choices and design trade-offs
256
281
  └── implementation-plan-insights.md # Phase 4: Implementation learnings and gotchas
257
282
  ```
@@ -346,14 +371,14 @@ This creates a **two-way knowledge graph** between formal specs and informal rea
346
371
 
347
372
  ## Configuration
348
373
 
349
- The `.jumpstart/config.yaml` file controls framework behaviour. Key settings:
374
+ The `.jumpstart/config.yaml` file controls framework behavior. Key settings:
350
375
 
351
376
  **Workflow:**
352
377
  - `require_gate_approval`: Enforce human approval between phases (default: true)
353
378
  - `allow_phase_skip`: Allow jumping to later phases (default: false)
354
379
 
355
380
  **Agents:**
356
- - Each agent has configurable settings (elicitation depth, story format, prioritisation method, diagram format, test framework, etc.)
381
+ - Each agent has configurable settings (elicitation depth, story format, prioritization method, diagram format, test framework, etc.)
357
382
 
358
383
  **Integrations:**
359
384
  - `ai_assistant`: Which AI tool you're using (copilot, claude-code, cursor, gemini, windsurf)
@@ -362,6 +387,40 @@ See the config file itself for full documentation of all options.
362
387
 
363
388
  ---
364
389
 
390
+ ## Greenfield vs. Brownfield
391
+
392
+ Jump Start adapts its workflow based on whether you're starting from scratch or working with an existing codebase.
393
+
394
+ ### Brownfield Projects (Existing Codebase)
395
+
396
+ When `project.type` is `brownfield`, the framework activates a **Scout** agent that runs before Phase 0. The Scout:
397
+
398
+ 1. **Scans the repository** — maps directory structure, identifies languages, and catalogs key files
399
+ 2. **Analyzes dependencies** — reads package manifests, lock files, and import graphs
400
+ 3. **Extracts architecture** — identifies patterns, layers, and component boundaries
401
+ 4. **Generates C4 diagrams** — System Context, Container, Component, and (optionally) Code-level diagrams in Mermaid
402
+ 5. **Assesses technical debt** — flags deprecated dependencies, code smells, and missing test coverage
403
+ 6. **Produces `specs/codebase-context.md`** — a comprehensive reference document that all downstream agents read
404
+
405
+ This ensures that the Challenger, Analyst, PM, Architect, and Developer agents all understand the existing system before proposing changes. The Architect uses brownfield-specific task types (`[R]` for refactoring, `[M]` for migration) in the implementation plan.
406
+
407
+ ### Greenfield Projects (New Codebase)
408
+
409
+ When `project.type` is `greenfield`, the framework adds **per-directory AGENTS.md files** to document the emerging codebase as it's built:
410
+
411
+ 1. The **Architect** plans which directories should receive `AGENTS.md` files in the architecture document
412
+ 2. The **Developer** creates these files during scaffolding and updates them as code evolves
413
+ 3. Files follow the template in `.jumpstart/templates/agents-md.md`
414
+ 4. Depth is configurable via `agents.developer.agents_md_depth` in config: `top-level`, `module`, or `deep`
415
+
416
+ These files provide AI-friendly context for each module, making the codebase easier for both humans and AI agents to navigate.
417
+
418
+ ### Detection
419
+
420
+ The CLI auto-detects project type during installation by checking for existing source files, package manifests, `.git` history, and other signals. You can override this with `--type greenfield` or `--type brownfield`. The Challenger agent also confirms the project type at the start of Phase 0.
421
+
422
+ ---
423
+
365
424
  ## Using with AI Assistants
366
425
 
367
426
  Jump Start provides first-class integration files for three AI assistants. The installer creates all of them automatically.
@@ -492,7 +551,7 @@ vscode_tools:
492
551
  ### Adding Custom Agents
493
552
 
494
553
  Create a new agent file in `.jumpstart/agents/` following the pattern of the existing agents:
495
- - Define the agent's identity, mandate, and behavioural guidelines
554
+ - Define the agent's identity, mandate, and behavioral guidelines
496
555
  - Specify its input context (which artifacts it reads)
497
556
  - Define its protocol (step-by-step instructions)
498
557
  - Specify its output (which artifacts it produces)
package/bin/cli.js CHANGED
@@ -4,6 +4,7 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const chalk = require('chalk');
6
6
  const prompts = require('prompts');
7
+ const { setupContext7 } = require('./context7-setup');
7
8
 
8
9
  // Get the package root directory (where .jumpstart/ lives)
9
10
  const PACKAGE_ROOT = path.join(__dirname, '..');
@@ -25,7 +26,8 @@ function parseArgs() {
25
26
  force: false,
26
27
  dryRun: false,
27
28
  help: false,
28
- interactive: true
29
+ interactive: true,
30
+ projectType: null // greenfield | brownfield | null (auto-detect)
29
31
  };
30
32
 
31
33
  for (let i = 0; i < args.length; i++) {
@@ -46,6 +48,15 @@ function parseArgs() {
46
48
  } else if (arg === '--dry-run') {
47
49
  config.dryRun = true;
48
50
  config.interactive = false;
51
+ } else if (arg === '--type') {
52
+ const typeVal = args[++i];
53
+ if (typeVal === 'greenfield' || typeVal === 'brownfield') {
54
+ config.projectType = typeVal;
55
+ } else {
56
+ console.error(chalk.red(`Invalid --type value: ${typeVal}. Must be 'greenfield' or 'brownfield'.`));
57
+ process.exit(1);
58
+ }
59
+ config.interactive = false;
49
60
  } else if (!arg.startsWith('--') && !config.targetDir) {
50
61
  config.targetDir = arg;
51
62
  }
@@ -67,6 +78,7 @@ function showHelp() {
67
78
  console.log(chalk.bold('OPTIONS:'));
68
79
  console.log(' <directory> Target directory (default: current directory)');
69
80
  console.log(' --name <name> Set project name in config');
81
+ console.log(' --type <type> Set project type: greenfield | brownfield');
70
82
  console.log(' --copilot Include GitHub Copilot integration');
71
83
  console.log(' --force Overwrite existing files without prompting');
72
84
  console.log(' --dry-run Show what would be installed without copying');
@@ -75,9 +87,67 @@ function showHelp() {
75
87
  console.log(' npx jumpstart-mode');
76
88
  console.log(' npx jumpstart-mode ./my-project');
77
89
  console.log(' npx jumpstart-mode . --name "My Project" --copilot');
90
+ console.log(' npx jumpstart-mode ./existing-app --type brownfield --copilot');
78
91
  console.log(' npx jumpstart-mode --dry-run .\n');
79
92
  }
80
93
 
94
+ // Detect whether a target directory is a greenfield or brownfield project
95
+ function detectProjectType(targetDir) {
96
+ const absDir = path.resolve(targetDir);
97
+
98
+ // Indicators of an existing project (brownfield)
99
+ const brownfieldIndicators = [
100
+ 'package.json', 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml',
101
+ 'requirements.txt', 'Pipfile', 'pyproject.toml', 'setup.py',
102
+ 'Gemfile', 'go.mod', 'Cargo.toml', 'pom.xml', 'build.gradle',
103
+ 'Makefile', 'CMakeLists.txt', 'composer.json',
104
+ '.gitignore', 'tsconfig.json', 'webpack.config.js', 'vite.config.ts',
105
+ 'Dockerfile', 'docker-compose.yml'
106
+ ];
107
+
108
+ const brownfieldDirs = ['src', 'lib', 'app', 'components', 'pages', 'api', 'server', 'client'];
109
+
110
+ let score = 0;
111
+ const signals = [];
112
+
113
+ // Check for .git directory (strong signal)
114
+ if (fs.existsSync(path.join(absDir, '.git'))) {
115
+ const gitLog = path.join(absDir, '.git', 'refs', 'heads');
116
+ if (fs.existsSync(gitLog)) {
117
+ score += 2;
118
+ signals.push('.git history');
119
+ }
120
+ }
121
+
122
+ // Check for config/manifest files
123
+ for (const file of brownfieldIndicators) {
124
+ if (fs.existsSync(path.join(absDir, file))) {
125
+ score += 1;
126
+ signals.push(file);
127
+ if (signals.length >= 5) break; // Enough evidence
128
+ }
129
+ }
130
+
131
+ // Check for source directories with actual files
132
+ for (const dir of brownfieldDirs) {
133
+ const dirPath = path.join(absDir, dir);
134
+ if (fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory()) {
135
+ const entries = fs.readdirSync(dirPath);
136
+ if (entries.some(e => !e.startsWith('.') && e !== '.gitkeep')) {
137
+ score += 1;
138
+ signals.push(`${dir}/`);
139
+ if (signals.length >= 5) break;
140
+ }
141
+ }
142
+ }
143
+
144
+ if (score >= 2) {
145
+ return { type: 'brownfield', confidence: Math.min(score / 5, 1), signals };
146
+ }
147
+
148
+ return { type: 'greenfield', confidence: 1 - (score / 5), signals };
149
+ }
150
+
81
151
  // Recursively copy directory
82
152
  function copyDirectoryRecursive(src, dest, options = {}) {
83
153
  const { dryRun = false, force = false, stats = { copied: [], skipped: [] } } = options;
@@ -183,6 +253,25 @@ function replaceProjectName(configPath, projectName, options = {}) {
183
253
  fs.writeFileSync(configPath, content, 'utf8');
184
254
  }
185
255
 
256
+ // Set project type in config.yaml
257
+ function setProjectType(configPath, projectType, options = {}) {
258
+ const { dryRun = false } = options;
259
+
260
+ if (!fs.existsSync(configPath) || !projectType || dryRun) {
261
+ return;
262
+ }
263
+
264
+ let content = fs.readFileSync(configPath, 'utf8');
265
+
266
+ // Replace type: null or type: "" under the project: section
267
+ content = content.replace(
268
+ /(project:\s*\n(?:.*\n)*?\s*)type:\s*(?:null|""|'')?/m,
269
+ `$1type: "${projectType}"`
270
+ );
271
+
272
+ fs.writeFileSync(configPath, content, 'utf8');
273
+ }
274
+
186
275
  // Detect conflicts
187
276
  function detectConflicts(targetDir, config) {
188
277
  const conflicts = [];
@@ -245,9 +334,53 @@ async function runInteractive() {
245
334
  process.exit(0);
246
335
  }
247
336
 
337
+ // Detect and confirm project type
338
+ const targetPath = path.resolve(answers.targetDir);
339
+ const detection = detectProjectType(targetPath);
340
+
341
+ let projectType = detection.type;
342
+
343
+ if (detection.signals.length > 0 && detection.type === 'brownfield') {
344
+ console.log(chalk.cyan(`\n🔍 Detected existing project signals: ${detection.signals.slice(0, 3).join(', ')}`));
345
+ const { confirmedType } = await prompts({
346
+ type: 'select',
347
+ name: 'confirmedType',
348
+ message: 'This looks like an existing codebase. Project type:',
349
+ choices: [
350
+ { title: 'Brownfield (existing codebase)', value: 'brownfield' },
351
+ { title: 'Greenfield (new project)', value: 'greenfield' }
352
+ ],
353
+ initial: 0
354
+ });
355
+
356
+ if (!confirmedType) {
357
+ console.log(chalk.yellow('\n❌ Setup cancelled\n'));
358
+ process.exit(0);
359
+ }
360
+ projectType = confirmedType;
361
+ } else {
362
+ const { confirmedType } = await prompts({
363
+ type: 'select',
364
+ name: 'confirmedType',
365
+ message: 'Project type:',
366
+ choices: [
367
+ { title: 'Greenfield (new project)', value: 'greenfield' },
368
+ { title: 'Brownfield (existing codebase)', value: 'brownfield' }
369
+ ],
370
+ initial: 0
371
+ });
372
+
373
+ if (!confirmedType) {
374
+ console.log(chalk.yellow('\n❌ Setup cancelled\n'));
375
+ process.exit(0);
376
+ }
377
+ projectType = confirmedType;
378
+ }
379
+
248
380
  const config = {
249
381
  targetDir: answers.targetDir,
250
382
  projectName: answers.projectName || null,
383
+ projectType,
251
384
  copilot: answers.copilot,
252
385
  force: false,
253
386
  dryRun: false,
@@ -255,7 +388,6 @@ async function runInteractive() {
255
388
  };
256
389
 
257
390
  // Check for conflicts
258
- const targetPath = path.resolve(config.targetDir);
259
391
  const conflicts = detectConflicts(targetPath, config);
260
392
 
261
393
  if (conflicts.length > 0 && !config.force) {
@@ -289,6 +421,9 @@ async function install(config) {
289
421
  if (config.projectName) {
290
422
  console.log(chalk.gray(`Project: ${config.projectName}`));
291
423
  }
424
+ if (config.projectType) {
425
+ console.log(chalk.gray(`Type: ${config.projectType}`));
426
+ }
292
427
  if (config.copilot) {
293
428
  console.log(chalk.gray('Including: GitHub Copilot integration'));
294
429
  }
@@ -342,6 +477,31 @@ async function install(config) {
342
477
  replaceProjectName(configPath, config.projectName, { dryRun: config.dryRun });
343
478
  }
344
479
 
480
+ // 6. Set project type in config
481
+ if (config.projectType) {
482
+ console.log(chalk.cyan('🏷️ Setting project type...'));
483
+ const configPath = path.join(targetPath, JUMPSTART_DIR, 'config.yaml');
484
+ setProjectType(configPath, config.projectType, { dryRun: config.dryRun });
485
+ }
486
+
487
+ // 7. Context7 MCP setup (interactive only)
488
+ if (config.interactive) {
489
+ try {
490
+ const context7Result = await setupContext7({
491
+ targetDir: targetPath,
492
+ dryRun: config.dryRun
493
+ });
494
+ if (context7Result.installed) {
495
+ // Record in config.yaml that context7 is enabled
496
+ const configPath = path.join(targetPath, JUMPSTART_DIR, 'config.yaml');
497
+ appendContext7Config(configPath, config.dryRun);
498
+ }
499
+ } catch (err) {
500
+ console.log(chalk.yellow('\n⚠️ Context7 MCP setup skipped due to an error.'));
501
+ console.log(chalk.gray(` ${err.message}`));
502
+ }
503
+ }
504
+
345
505
  // Display summary
346
506
  console.log(chalk.bold.green('\n✅ Installation complete!\n'));
347
507
 
@@ -364,10 +524,42 @@ async function install(config) {
364
524
  console.log(chalk.gray(` cd ${config.targetDir}`));
365
525
  }
366
526
  console.log(chalk.gray(' Open your project in VS Code with GitHub Copilot'));
367
- console.log(chalk.gray(' Select "Jump Start: Challenger" agent to begin Phase 0'));
527
+ if (config.projectType === 'brownfield') {
528
+ console.log(chalk.gray(' Select "Jump Start: Scout" agent to analyze your codebase'));
529
+ console.log(chalk.gray(' Then proceed to "Jump Start: Challenger" for Phase 0'));
530
+ } else {
531
+ console.log(chalk.gray(' Select "Jump Start: Challenger" agent to begin Phase 0'));
532
+ }
368
533
  console.log(chalk.gray(' Or run: @workspace /jumpstart-status\n'));
369
534
  }
370
535
 
536
+ // Append context7 integration entry to config.yaml
537
+ function appendContext7Config(configPath, dryRun) {
538
+ if (dryRun || !fs.existsSync(configPath)) return;
539
+
540
+ let content = fs.readFileSync(configPath, 'utf8');
541
+
542
+ // Only add if not already present
543
+ if (content.includes('context7:')) return;
544
+
545
+ const context7Block = [
546
+ '',
547
+ '# ---------------------------------------------------------------------------',
548
+ '# Context7 MCP (Model Context Protocol)',
549
+ '# ---------------------------------------------------------------------------',
550
+ '# Context7 provides up-to-date library documentation to AI coding assistants.',
551
+ '# Configured during setup. Manage keys at: https://context7.com',
552
+ 'context7:',
553
+ ' enabled: true',
554
+ ' # API key is stored in your client config files (e.g. .vscode/mcp.json),',
555
+ ' # NOT in this file. Keep those files in .gitignore.',
556
+ ''
557
+ ].join('\n');
558
+
559
+ content += context7Block;
560
+ fs.writeFileSync(configPath, content, 'utf8');
561
+ }
562
+
371
563
  // Main entry point
372
564
  async function main() {
373
565
  try {
@@ -381,6 +573,10 @@ async function main() {
381
573
  // Run interactive mode if no flags provided
382
574
  if (config.interactive) {
383
575
  config = await runInteractive();
576
+ } else if (!config.projectType) {
577
+ // Auto-detect project type when not specified via --type
578
+ const detection = detectProjectType(config.targetDir);
579
+ config.projectType = detection.type;
384
580
  }
385
581
 
386
582
  await install(config);