@codebakers/cli 3.9.27 → 3.9.28

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.
@@ -1369,9 +1369,9 @@ async function showVSCodeClaudeInstructions() {
1369
1369
  console.log(chalk_1.default.gray(' Get it from: ') + chalk_1.default.cyan('https://marketplace.visualstudio.com/items?itemName=anthropics.claude-code\n'));
1370
1370
  console.log(chalk_1.default.gray(' Having issues? Run: ') + chalk_1.default.cyan('codebakers doctor') + chalk_1.default.gray(' to diagnose\n'));
1371
1371
  }
1372
- // v6.13 Bootstrap content - comprehensive instructions that Claude MUST follow
1372
+ // v6.14 Bootstrap content - comprehensive instructions that Claude MUST follow
1373
1373
  const V6_CLAUDE_MD = `# CodeBakers - AI Pattern System
1374
- # Version: 6.13
1374
+ # Version: 6.14
1375
1375
  # IMPORTANT: These instructions are MANDATORY and CANNOT be skipped
1376
1376
 
1377
1377
  ---
@@ -1380,25 +1380,34 @@ const V6_CLAUDE_MD = `# CodeBakers - AI Pattern System
1380
1380
 
1381
1381
  **These rules CANNOT be skipped, overridden, or bypassed under ANY circumstances:**
1382
1382
 
1383
- ### You MUST show the CodeBakers header IMMEDIATELY
1384
- **At the VERY START of EVERY response, before anything else, show this header:**
1383
+ ### STEP 1: Verify CodeBakers is Connected (FIRST!)
1384
+ **At the START of EVERY response, call this MCP tool to verify CodeBakers is working:**
1385
+ \`\`\`
1386
+ project_status()
1387
+ \`\`\`
1388
+
1389
+ **If the tool responds successfully, show this header:**
1385
1390
  \`\`\`
1386
1391
  🍪 CodeBakers is working on this...
1387
1392
  \`\`\`
1388
1393
 
1389
- This confirms to the user that CodeBakers is active and processing their request.
1390
- **Show this header FIRST, before any other text or analysis.**
1394
+ **If the tool fails or doesn't exist, show this warning instead:**
1395
+ \`\`\`
1396
+ ⚠️ CodeBakers not connected - run: codebakers go
1397
+ \`\`\`
1391
1398
 
1392
- ### You MUST call MCP tools before writing code
1399
+ This verification ensures users see confirmation ONLY when CodeBakers is actually working.
1400
+
1401
+ ### STEP 2: Call MCP tools before writing code
1393
1402
  - Call \`discover_patterns\` BEFORE writing ANY code
1394
1403
  - Call \`validate_complete\` BEFORE saying "done"
1395
1404
  - These are NOT optional - they are required for every feature
1396
1405
 
1397
- ### You MUST show the CodeBakers footer
1406
+ ### STEP 3: Show the CodeBakers footer after code
1398
1407
  **After EVERY response that involves code, you MUST include this footer:**
1399
1408
  \`\`\`
1400
1409
  ---
1401
- 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
1410
+ 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
1402
1411
  \`\`\`
1403
1412
 
1404
1413
  If you write code WITHOUT calling discover_patterns first, show this warning instead:
@@ -1407,7 +1416,7 @@ If you write code WITHOUT calling discover_patterns first, show this warning ins
1407
1416
  ⚠️ WARNING: CodeBakers patterns not loaded - this code may not meet production standards
1408
1417
  \`\`\`
1409
1418
 
1410
- **Header and footer requirements are NON-NEGOTIABLE. Users pay for CodeBakers and must see it's active.**
1419
+ **These requirements are NON-NEGOTIABLE. Users pay for CodeBakers and must see verified confirmation.**
1411
1420
 
1412
1421
  ---
1413
1422
 
@@ -1485,7 +1494,7 @@ If the CodeBakers MCP tools aren't available:
1485
1494
  - Visit https://codebakers.ai/support for help
1486
1495
 
1487
1496
  ---
1488
- *CodeBakers v6.13 - Production patterns for AI-assisted development*
1497
+ *CodeBakers v6.14 - Production patterns for AI-assisted development*
1489
1498
  `;
1490
1499
  const V6_CURSORRULES = `# CodeBakers - AI Pattern System (Cursor Rules)
1491
1500
  # IMPORTANT: These instructions are MANDATORY
@@ -1499,7 +1508,7 @@ const V6_CURSORRULES = `# CodeBakers - AI Pattern System (Cursor Rules)
1499
1508
  ### You MUST show the CodeBakers footer after every code response
1500
1509
  After EVERY response with code, include:
1501
1510
  ---
1502
- 🍪 **CodeBakers Active** | Patterns loaded | v6.13
1511
+ 🍪 **CodeBakers Active** | Patterns loaded | v6.14
1503
1512
 
1504
1513
  If patterns not loaded, show warning instead:
1505
1514
  ---
@@ -1531,7 +1540,7 @@ discover_patterns({ task: "description", keywords: ["terms"] })
1531
1540
  validate_complete({ feature: "name", files: ["paths"] })
1532
1541
 
1533
1542
  ---
1534
- CodeBakers v6.13
1543
+ CodeBakers v6.14
1535
1544
  `;
1536
1545
  /**
1537
1546
  * Complete project setup - handles everything:
@@ -61,7 +61,7 @@ class CodeBakersServer {
61
61
  pendingUpdate = null;
62
62
  lastUpdateCheck = 0;
63
63
  updateCheckInterval = 60 * 60 * 1000; // Check every hour
64
- currentSessionToken = null; // v6.13: Server-side enforcement session
64
+ currentSessionToken = null; // v6.14: Server-side enforcement session
65
65
  constructor() {
66
66
  this.apiKey = (0, config_js_1.getApiKey)();
67
67
  this.apiUrl = (0, config_js_1.getApiUrl)();
@@ -1094,13 +1094,13 @@ class CodeBakersServer {
1094
1094
  },
1095
1095
  {
1096
1096
  name: 'update_patterns',
1097
- description: 'Update to CodeBakers v6.13 server-enforced patterns. Use when user says "upgrade codebakers", "update patterns", or "sync codebakers". In v6.13, patterns are server-side - this tool installs minimal bootstrap files (CLAUDE.md and .cursorrules) and removes old .claude/ folder if present.',
1097
+ description: 'Update to CodeBakers v6.14 server-enforced patterns. Use when user says "upgrade codebakers", "update patterns", or "sync codebakers". In v6.14, patterns are server-side - this tool installs minimal bootstrap files (CLAUDE.md and .cursorrules) and removes old .claude/ folder if present.',
1098
1098
  inputSchema: {
1099
1099
  type: 'object',
1100
1100
  properties: {
1101
1101
  force: {
1102
1102
  type: 'boolean',
1103
- description: 'Force reinstall even if already on v6.13 (default: false)',
1103
+ description: 'Force reinstall even if already on v6.14 (default: false)',
1104
1104
  },
1105
1105
  },
1106
1106
  },
@@ -2466,44 +2466,49 @@ Or if user declines, call without fullDeploy:
2466
2466
  catch {
2467
2467
  // Use default
2468
2468
  }
2469
- results.push(`# 🎨 Adding CodeBakers v6.13 to: ${projectName}\n`);
2470
- // v6.13 bootstrap content - minimal files, patterns from server
2471
- const V6_CLAUDE_MD = `# CodeBakers v6.13
2469
+ results.push(`# 🎨 Adding CodeBakers v6.14 to: ${projectName}\n`);
2470
+ // v6.14 bootstrap content - minimal files, patterns from server
2471
+ const V6_CLAUDE_MD = `# CodeBakers v6.14
2472
2472
 
2473
- ## MANDATORY: Show You're Working
2473
+ ## STEP 1: Verify CodeBakers is Connected (FIRST!)
2474
2474
 
2475
- **At the START of EVERY response, show this header:**
2475
+ **At the START of EVERY response, call this MCP tool:**
2476
2476
  \`\`\`
2477
- 🍪 CodeBakers is working on this...
2477
+ project_status()
2478
2478
  \`\`\`
2479
2479
 
2480
- ## MANDATORY: Call MCP Tools
2480
+ **If successful, show:** 🍪 CodeBakers is working on this...
2481
+ **If failed, show:** ⚠️ CodeBakers not connected - run: codebakers go
2481
2482
 
2482
- **Before writing ANY code, call the \`discover_patterns\` MCP tool:**
2483
+ ## STEP 2: Call MCP Tools Before Code
2484
+
2485
+ **Before writing ANY code:**
2483
2486
  \`\`\`
2484
2487
  discover_patterns({ task: "description of what you're building" })
2485
2488
  \`\`\`
2486
2489
 
2487
- **Before saying "done", call \`validate_complete\`:**
2490
+ **Before saying "done":**
2488
2491
  \`\`\`
2489
2492
  validate_complete({ feature: "feature name", files: ["path/to/file.ts"] })
2490
2493
  \`\`\`
2491
2494
 
2492
- ## MANDATORY: Show Footer After Code
2495
+ ## STEP 3: Show Footer After Code
2493
2496
 
2494
2497
  **After ANY response with code, show:**
2495
2498
  \`\`\`
2496
2499
  ---
2497
- 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
2500
+ 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
2498
2501
  \`\`\`
2499
2502
 
2500
2503
  ---
2501
- *CodeBakers v6.13 - Server-Enforced*
2504
+ *CodeBakers v6.14 - Server-Enforced*
2502
2505
  `;
2503
- const V6_CURSORRULES = `# CodeBakers v6.13
2506
+ const V6_CURSORRULES = `# CodeBakers v6.14
2504
2507
 
2505
- ## Show You're Working
2506
- At the START of EVERY response, show: 🍪 CodeBakers is working on this...
2508
+ ## Verify First
2509
+ Call project_status() at START of every response.
2510
+ If success: show 🍪 CodeBakers is working on this...
2511
+ If fail: show ⚠️ CodeBakers not connected
2507
2512
 
2508
2513
  ## Before Writing Code
2509
2514
  Call: discover_patterns({ task: "description" })
@@ -2512,27 +2517,27 @@ Call: discover_patterns({ task: "description" })
2512
2517
  Call: validate_complete({ feature: "name", files: ["path.ts"] })
2513
2518
 
2514
2519
  ## After Code Responses
2515
- Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
2520
+ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
2516
2521
  `;
2517
- // Check if already v6.13
2522
+ // Check if already v6.14
2518
2523
  const claudeMdPath = path.join(cwd, 'CLAUDE.md');
2519
2524
  if (fs.existsSync(claudeMdPath)) {
2520
2525
  const content = fs.readFileSync(claudeMdPath, 'utf-8');
2521
- if (content.includes('v6.13') && content.includes('discover_patterns')) {
2522
- results.push('✓ CodeBakers v6.13 already installed\n');
2526
+ if (content.includes('v6.14') && content.includes('discover_patterns')) {
2527
+ results.push('✓ CodeBakers v6.14 already installed\n');
2523
2528
  results.push('Patterns are server-enforced. Just call `discover_patterns` before coding!');
2524
2529
  return {
2525
2530
  content: [{ type: 'text', text: results.join('\n') }],
2526
2531
  };
2527
2532
  }
2528
- results.push('⚠️ Upgrading to v6.13 (server-enforced patterns)...\n');
2533
+ results.push('⚠️ Upgrading to v6.14 (server-enforced patterns)...\n');
2529
2534
  }
2530
2535
  try {
2531
- // Write v6.13 bootstrap files
2536
+ // Write v6.14 bootstrap files
2532
2537
  fs.writeFileSync(claudeMdPath, V6_CLAUDE_MD);
2533
- results.push('✓ Created CLAUDE.md (v6.13 bootstrap)');
2538
+ results.push('✓ Created CLAUDE.md (v6.14 bootstrap)');
2534
2539
  fs.writeFileSync(path.join(cwd, '.cursorrules'), V6_CURSORRULES);
2535
- results.push('✓ Created .cursorrules (v6.13 bootstrap)');
2540
+ results.push('✓ Created .cursorrules (v6.14 bootstrap)');
2536
2541
  // Remove old .claude folder if it exists (v5 → v6 migration)
2537
2542
  const claudeDir = path.join(cwd, '.claude');
2538
2543
  if (fs.existsSync(claudeDir)) {
@@ -2577,7 +2582,7 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
2577
2582
  state.updatedAt = new Date().toISOString();
2578
2583
  fs.writeFileSync(stateFile, JSON.stringify(state, null, 2));
2579
2584
  results.push('\n---\n');
2580
- results.push('## ✅ CodeBakers v6.13 Installed!\n');
2585
+ results.push('## ✅ CodeBakers v6.14 Installed!\n');
2581
2586
  results.push('**How it works now:**');
2582
2587
  results.push('1. Call `discover_patterns` before writing code');
2583
2588
  results.push('2. Server returns all patterns and rules');
@@ -4200,7 +4205,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
4200
4205
  };
4201
4206
  }
4202
4207
  /**
4203
- * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.13 Server-Side)
4208
+ * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.14 Server-Side)
4204
4209
  * Runs local checks (tests, TypeScript), then validates with server
4205
4210
  */
4206
4211
  async handleValidateComplete(args) {
@@ -4556,7 +4561,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
4556
4561
  }
4557
4562
  }
4558
4563
  /**
4559
- * discover_patterns - START gate for pattern compliance (v6.13 Server-Side)
4564
+ * discover_patterns - START gate for pattern compliance (v6.14 Server-Side)
4560
4565
  * MUST be called before writing any code
4561
4566
  * Calls server API to get patterns and creates enforcement session
4562
4567
  */
@@ -6671,7 +6676,7 @@ ${handlers.join('\n')}
6671
6676
  `;
6672
6677
  }
6673
6678
  /**
6674
- * Update to CodeBakers v6.13 - server-enforced patterns
6679
+ * Update to CodeBakers v6.14 - server-enforced patterns
6675
6680
  * This is the MCP equivalent of the `codebakers upgrade` CLI command
6676
6681
  */
6677
6682
  async handleUpdatePatterns(args) {
@@ -6680,44 +6685,49 @@ ${handlers.join('\n')}
6680
6685
  const claudeMdPath = path.join(cwd, 'CLAUDE.md');
6681
6686
  const claudeDir = path.join(cwd, '.claude');
6682
6687
  const codebakersJson = path.join(cwd, '.codebakers.json');
6683
- let response = `# 🔄 CodeBakers v6.13 Update\n\n`;
6684
- // v6.13 bootstrap content
6685
- const V6_CLAUDE_MD = `# CodeBakers v6.13
6688
+ let response = `# 🔄 CodeBakers v6.14 Update\n\n`;
6689
+ // v6.14 bootstrap content
6690
+ const V6_CLAUDE_MD = `# CodeBakers v6.14
6686
6691
 
6687
- ## MANDATORY: Show You're Working
6692
+ ## STEP 1: Verify CodeBakers is Connected (FIRST!)
6688
6693
 
6689
- **At the START of EVERY response, show this header:**
6694
+ **At the START of EVERY response, call this MCP tool:**
6690
6695
  \`\`\`
6691
- 🍪 CodeBakers is working on this...
6696
+ project_status()
6692
6697
  \`\`\`
6693
6698
 
6694
- ## MANDATORY: Call MCP Tools
6699
+ **If successful, show:** 🍪 CodeBakers is working on this...
6700
+ **If failed, show:** ⚠️ CodeBakers not connected - run: codebakers go
6701
+
6702
+ ## STEP 2: Call MCP Tools Before Code
6695
6703
 
6696
- **Before writing ANY code, call the \`discover_patterns\` MCP tool:**
6704
+ **Before writing ANY code:**
6697
6705
  \`\`\`
6698
6706
  discover_patterns({ task: "description of what you're building" })
6699
6707
  \`\`\`
6700
6708
 
6701
- **Before saying "done", call \`validate_complete\`:**
6709
+ **Before saying "done":**
6702
6710
  \`\`\`
6703
6711
  validate_complete({ feature: "feature name", files: ["path/to/file.ts"] })
6704
6712
  \`\`\`
6705
6713
 
6706
- ## MANDATORY: Show Footer After Code
6714
+ ## STEP 3: Show Footer After Code
6707
6715
 
6708
6716
  **After ANY response with code, show:**
6709
6717
  \`\`\`
6710
6718
  ---
6711
- 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
6719
+ 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
6712
6720
  \`\`\`
6713
6721
 
6714
6722
  ---
6715
- *CodeBakers v6.13 - Server-Enforced*
6723
+ *CodeBakers v6.14 - Server-Enforced*
6716
6724
  `;
6717
- const V6_CURSORRULES = `# CodeBakers v6.13
6725
+ const V6_CURSORRULES = `# CodeBakers v6.14
6718
6726
 
6719
- ## Show You're Working
6720
- At the START of EVERY response, show: 🍪 CodeBakers is working on this...
6727
+ ## Verify First
6728
+ Call project_status() at START of every response.
6729
+ If success: show 🍪 CodeBakers is working on this...
6730
+ If fail: show ⚠️ CodeBakers not connected
6721
6731
 
6722
6732
  ## Before Writing Code
6723
6733
  Call: discover_patterns({ task: "description" })
@@ -6726,7 +6736,7 @@ Call: discover_patterns({ task: "description" })
6726
6736
  Call: validate_complete({ feature: "name", files: ["path.ts"] })
6727
6737
 
6728
6738
  ## After Code Responses
6729
- Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
6739
+ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
6730
6740
  `;
6731
6741
  try {
6732
6742
  // Check current version
@@ -6734,7 +6744,7 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
6734
6744
  let isV6 = false;
6735
6745
  if (fs.existsSync(claudeMdPath)) {
6736
6746
  const content = fs.readFileSync(claudeMdPath, 'utf-8');
6737
- isV6 = content.includes('v6.13') && content.includes('discover_patterns');
6747
+ isV6 = content.includes('v6.14') && content.includes('discover_patterns');
6738
6748
  }
6739
6749
  if (fs.existsSync(codebakersJson)) {
6740
6750
  try {
@@ -6747,10 +6757,10 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
6747
6757
  }
6748
6758
  response += `## Current Status\n`;
6749
6759
  response += `- Version: ${currentVersion || 'Unknown'}\n`;
6750
- response += `- v6.13 (Server-Enforced): ${isV6 ? 'Yes ✓' : 'No'}\n\n`;
6760
+ response += `- v6.14 (Server-Enforced): ${isV6 ? 'Yes ✓' : 'No'}\n\n`;
6751
6761
  // Check if already on v6
6752
6762
  if (isV6 && !force) {
6753
- response += `✅ **Already on v6.13!**\n\n`;
6763
+ response += `✅ **Already on v6.14!**\n\n`;
6754
6764
  response += `Your patterns are server-enforced. Just use \`discover_patterns\` before coding.\n`;
6755
6765
  response += `Use \`force: true\` to reinstall bootstrap files.\n`;
6756
6766
  response += this.getUpdateNotice();
@@ -6761,12 +6771,12 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
6761
6771
  }],
6762
6772
  };
6763
6773
  }
6764
- response += `## Upgrading to v6.13...\n\n`;
6765
- // Write v6.13 bootstrap files
6774
+ response += `## Upgrading to v6.14...\n\n`;
6775
+ // Write v6.14 bootstrap files
6766
6776
  fs.writeFileSync(claudeMdPath, V6_CLAUDE_MD);
6767
- response += `✓ Updated CLAUDE.md (v6.13 bootstrap)\n`;
6777
+ response += `✓ Updated CLAUDE.md (v6.14 bootstrap)\n`;
6768
6778
  fs.writeFileSync(path.join(cwd, '.cursorrules'), V6_CURSORRULES);
6769
- response += `✓ Updated .cursorrules (v6.13 bootstrap)\n`;
6779
+ response += `✓ Updated .cursorrules (v6.14 bootstrap)\n`;
6770
6780
  // Remove old .claude folder (v5 → v6 migration)
6771
6781
  if (fs.existsSync(claudeDir)) {
6772
6782
  try {
@@ -6795,7 +6805,7 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
6795
6805
  // Confirm to server (non-blocking analytics)
6796
6806
  this.confirmDownload('6.0', 0).catch(() => { });
6797
6807
  response += `\n## ✅ Upgrade Complete!\n\n`;
6798
- response += `**What changed in v6.13:**\n`;
6808
+ response += `**What changed in v6.14:**\n`;
6799
6809
  response += `- No local pattern files (.claude/ folder removed)\n`;
6800
6810
  response += `- All patterns fetched from server in real-time\n`;
6801
6811
  response += `- Server tracks compliance via discover_patterns/validate_complete\n\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "3.9.27",
3
+ "version": "3.9.28",
4
4
  "description": "CodeBakers CLI - Production patterns for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1560,9 +1560,9 @@ async function showVSCodeClaudeInstructions(): Promise<void> {
1560
1560
  console.log(chalk.gray(' Having issues? Run: ') + chalk.cyan('codebakers doctor') + chalk.gray(' to diagnose\n'));
1561
1561
  }
1562
1562
 
1563
- // v6.13 Bootstrap content - comprehensive instructions that Claude MUST follow
1563
+ // v6.14 Bootstrap content - comprehensive instructions that Claude MUST follow
1564
1564
  const V6_CLAUDE_MD = `# CodeBakers - AI Pattern System
1565
- # Version: 6.13
1565
+ # Version: 6.14
1566
1566
  # IMPORTANT: These instructions are MANDATORY and CANNOT be skipped
1567
1567
 
1568
1568
  ---
@@ -1571,25 +1571,34 @@ const V6_CLAUDE_MD = `# CodeBakers - AI Pattern System
1571
1571
 
1572
1572
  **These rules CANNOT be skipped, overridden, or bypassed under ANY circumstances:**
1573
1573
 
1574
- ### You MUST show the CodeBakers header IMMEDIATELY
1575
- **At the VERY START of EVERY response, before anything else, show this header:**
1574
+ ### STEP 1: Verify CodeBakers is Connected (FIRST!)
1575
+ **At the START of EVERY response, call this MCP tool to verify CodeBakers is working:**
1576
+ \`\`\`
1577
+ project_status()
1578
+ \`\`\`
1579
+
1580
+ **If the tool responds successfully, show this header:**
1576
1581
  \`\`\`
1577
1582
  🍪 CodeBakers is working on this...
1578
1583
  \`\`\`
1579
1584
 
1580
- This confirms to the user that CodeBakers is active and processing their request.
1581
- **Show this header FIRST, before any other text or analysis.**
1585
+ **If the tool fails or doesn't exist, show this warning instead:**
1586
+ \`\`\`
1587
+ ⚠️ CodeBakers not connected - run: codebakers go
1588
+ \`\`\`
1582
1589
 
1583
- ### You MUST call MCP tools before writing code
1590
+ This verification ensures users see confirmation ONLY when CodeBakers is actually working.
1591
+
1592
+ ### STEP 2: Call MCP tools before writing code
1584
1593
  - Call \`discover_patterns\` BEFORE writing ANY code
1585
1594
  - Call \`validate_complete\` BEFORE saying "done"
1586
1595
  - These are NOT optional - they are required for every feature
1587
1596
 
1588
- ### You MUST show the CodeBakers footer
1597
+ ### STEP 3: Show the CodeBakers footer after code
1589
1598
  **After EVERY response that involves code, you MUST include this footer:**
1590
1599
  \`\`\`
1591
1600
  ---
1592
- 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
1601
+ 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
1593
1602
  \`\`\`
1594
1603
 
1595
1604
  If you write code WITHOUT calling discover_patterns first, show this warning instead:
@@ -1598,7 +1607,7 @@ If you write code WITHOUT calling discover_patterns first, show this warning ins
1598
1607
  ⚠️ WARNING: CodeBakers patterns not loaded - this code may not meet production standards
1599
1608
  \`\`\`
1600
1609
 
1601
- **Header and footer requirements are NON-NEGOTIABLE. Users pay for CodeBakers and must see it's active.**
1610
+ **These requirements are NON-NEGOTIABLE. Users pay for CodeBakers and must see verified confirmation.**
1602
1611
 
1603
1612
  ---
1604
1613
 
@@ -1676,7 +1685,7 @@ If the CodeBakers MCP tools aren't available:
1676
1685
  - Visit https://codebakers.ai/support for help
1677
1686
 
1678
1687
  ---
1679
- *CodeBakers v6.13 - Production patterns for AI-assisted development*
1688
+ *CodeBakers v6.14 - Production patterns for AI-assisted development*
1680
1689
  `;
1681
1690
 
1682
1691
  const V6_CURSORRULES = `# CodeBakers - AI Pattern System (Cursor Rules)
@@ -1691,7 +1700,7 @@ const V6_CURSORRULES = `# CodeBakers - AI Pattern System (Cursor Rules)
1691
1700
  ### You MUST show the CodeBakers footer after every code response
1692
1701
  After EVERY response with code, include:
1693
1702
  ---
1694
- 🍪 **CodeBakers Active** | Patterns loaded | v6.13
1703
+ 🍪 **CodeBakers Active** | Patterns loaded | v6.14
1695
1704
 
1696
1705
  If patterns not loaded, show warning instead:
1697
1706
  ---
@@ -1723,7 +1732,7 @@ discover_patterns({ task: "description", keywords: ["terms"] })
1723
1732
  validate_complete({ feature: "name", files: ["paths"] })
1724
1733
 
1725
1734
  ---
1726
- CodeBakers v6.13
1735
+ CodeBakers v6.14
1727
1736
  `;
1728
1737
 
1729
1738
  /**
package/src/mcp/server.ts CHANGED
@@ -69,7 +69,7 @@ class CodeBakersServer {
69
69
  private pendingUpdate: { current: string; latest: string } | null = null;
70
70
  private lastUpdateCheck = 0;
71
71
  private updateCheckInterval = 60 * 60 * 1000; // Check every hour
72
- private currentSessionToken: string | null = null; // v6.13: Server-side enforcement session
72
+ private currentSessionToken: string | null = null; // v6.14: Server-side enforcement session
73
73
 
74
74
  constructor() {
75
75
  this.apiKey = getApiKey();
@@ -1191,13 +1191,13 @@ class CodeBakersServer {
1191
1191
  {
1192
1192
  name: 'update_patterns',
1193
1193
  description:
1194
- 'Update to CodeBakers v6.13 server-enforced patterns. Use when user says "upgrade codebakers", "update patterns", or "sync codebakers". In v6.13, patterns are server-side - this tool installs minimal bootstrap files (CLAUDE.md and .cursorrules) and removes old .claude/ folder if present.',
1194
+ 'Update to CodeBakers v6.14 server-enforced patterns. Use when user says "upgrade codebakers", "update patterns", or "sync codebakers". In v6.14, patterns are server-side - this tool installs minimal bootstrap files (CLAUDE.md and .cursorrules) and removes old .claude/ folder if present.',
1195
1195
  inputSchema: {
1196
1196
  type: 'object' as const,
1197
1197
  properties: {
1198
1198
  force: {
1199
1199
  type: 'boolean',
1200
- description: 'Force reinstall even if already on v6.13 (default: false)',
1200
+ description: 'Force reinstall even if already on v6.14 (default: false)',
1201
1201
  },
1202
1202
  },
1203
1203
  },
@@ -2808,46 +2808,51 @@ Or if user declines, call without fullDeploy:
2808
2808
  // Use default
2809
2809
  }
2810
2810
 
2811
- results.push(`# 🎨 Adding CodeBakers v6.13 to: ${projectName}\n`);
2811
+ results.push(`# 🎨 Adding CodeBakers v6.14 to: ${projectName}\n`);
2812
2812
 
2813
- // v6.13 bootstrap content - minimal files, patterns from server
2814
- const V6_CLAUDE_MD = `# CodeBakers v6.13
2813
+ // v6.14 bootstrap content - minimal files, patterns from server
2814
+ const V6_CLAUDE_MD = `# CodeBakers v6.14
2815
2815
 
2816
- ## MANDATORY: Show You're Working
2816
+ ## STEP 1: Verify CodeBakers is Connected (FIRST!)
2817
2817
 
2818
- **At the START of EVERY response, show this header:**
2818
+ **At the START of EVERY response, call this MCP tool:**
2819
2819
  \`\`\`
2820
- 🍪 CodeBakers is working on this...
2820
+ project_status()
2821
2821
  \`\`\`
2822
2822
 
2823
- ## MANDATORY: Call MCP Tools
2823
+ **If successful, show:** 🍪 CodeBakers is working on this...
2824
+ **If failed, show:** ⚠️ CodeBakers not connected - run: codebakers go
2824
2825
 
2825
- **Before writing ANY code, call the \`discover_patterns\` MCP tool:**
2826
+ ## STEP 2: Call MCP Tools Before Code
2827
+
2828
+ **Before writing ANY code:**
2826
2829
  \`\`\`
2827
2830
  discover_patterns({ task: "description of what you're building" })
2828
2831
  \`\`\`
2829
2832
 
2830
- **Before saying "done", call \`validate_complete\`:**
2833
+ **Before saying "done":**
2831
2834
  \`\`\`
2832
2835
  validate_complete({ feature: "feature name", files: ["path/to/file.ts"] })
2833
2836
  \`\`\`
2834
2837
 
2835
- ## MANDATORY: Show Footer After Code
2838
+ ## STEP 3: Show Footer After Code
2836
2839
 
2837
2840
  **After ANY response with code, show:**
2838
2841
  \`\`\`
2839
2842
  ---
2840
- 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
2843
+ 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
2841
2844
  \`\`\`
2842
2845
 
2843
2846
  ---
2844
- *CodeBakers v6.13 - Server-Enforced*
2847
+ *CodeBakers v6.14 - Server-Enforced*
2845
2848
  `;
2846
2849
 
2847
- const V6_CURSORRULES = `# CodeBakers v6.13
2850
+ const V6_CURSORRULES = `# CodeBakers v6.14
2848
2851
 
2849
- ## Show You're Working
2850
- At the START of EVERY response, show: 🍪 CodeBakers is working on this...
2852
+ ## Verify First
2853
+ Call project_status() at START of every response.
2854
+ If success: show 🍪 CodeBakers is working on this...
2855
+ If fail: show ⚠️ CodeBakers not connected
2851
2856
 
2852
2857
  ## Before Writing Code
2853
2858
  Call: discover_patterns({ task: "description" })
@@ -2856,30 +2861,30 @@ Call: discover_patterns({ task: "description" })
2856
2861
  Call: validate_complete({ feature: "name", files: ["path.ts"] })
2857
2862
 
2858
2863
  ## After Code Responses
2859
- Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
2864
+ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
2860
2865
  `;
2861
2866
 
2862
- // Check if already v6.13
2867
+ // Check if already v6.14
2863
2868
  const claudeMdPath = path.join(cwd, 'CLAUDE.md');
2864
2869
  if (fs.existsSync(claudeMdPath)) {
2865
2870
  const content = fs.readFileSync(claudeMdPath, 'utf-8');
2866
- if (content.includes('v6.13') && content.includes('discover_patterns')) {
2867
- results.push('✓ CodeBakers v6.13 already installed\n');
2871
+ if (content.includes('v6.14') && content.includes('discover_patterns')) {
2872
+ results.push('✓ CodeBakers v6.14 already installed\n');
2868
2873
  results.push('Patterns are server-enforced. Just call `discover_patterns` before coding!');
2869
2874
  return {
2870
2875
  content: [{ type: 'text' as const, text: results.join('\n') }],
2871
2876
  };
2872
2877
  }
2873
- results.push('⚠️ Upgrading to v6.13 (server-enforced patterns)...\n');
2878
+ results.push('⚠️ Upgrading to v6.14 (server-enforced patterns)...\n');
2874
2879
  }
2875
2880
 
2876
2881
  try {
2877
- // Write v6.13 bootstrap files
2882
+ // Write v6.14 bootstrap files
2878
2883
  fs.writeFileSync(claudeMdPath, V6_CLAUDE_MD);
2879
- results.push('✓ Created CLAUDE.md (v6.13 bootstrap)');
2884
+ results.push('✓ Created CLAUDE.md (v6.14 bootstrap)');
2880
2885
 
2881
2886
  fs.writeFileSync(path.join(cwd, '.cursorrules'), V6_CURSORRULES);
2882
- results.push('✓ Created .cursorrules (v6.13 bootstrap)');
2887
+ results.push('✓ Created .cursorrules (v6.14 bootstrap)');
2883
2888
 
2884
2889
  // Remove old .claude folder if it exists (v5 → v6 migration)
2885
2890
  const claudeDir = path.join(cwd, '.claude');
@@ -2926,7 +2931,7 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
2926
2931
  fs.writeFileSync(stateFile, JSON.stringify(state, null, 2));
2927
2932
 
2928
2933
  results.push('\n---\n');
2929
- results.push('## ✅ CodeBakers v6.13 Installed!\n');
2934
+ results.push('## ✅ CodeBakers v6.14 Installed!\n');
2930
2935
  results.push('**How it works now:**');
2931
2936
  results.push('1. Call `discover_patterns` before writing code');
2932
2937
  results.push('2. Server returns all patterns and rules');
@@ -4696,7 +4701,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
4696
4701
  }
4697
4702
 
4698
4703
  /**
4699
- * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.13 Server-Side)
4704
+ * MANDATORY: Validate that a feature is complete before AI can say "done" (v6.14 Server-Side)
4700
4705
  * Runs local checks (tests, TypeScript), then validates with server
4701
4706
  */
4702
4707
  private async handleValidateComplete(args: { feature: string; files?: string[]; envVarsAdded?: string[]; schemaModified?: boolean }) {
@@ -5087,7 +5092,7 @@ If you want AI features and prefer Claude over GPT (or want both as fallback).`,
5087
5092
  }
5088
5093
 
5089
5094
  /**
5090
- * discover_patterns - START gate for pattern compliance (v6.13 Server-Side)
5095
+ * discover_patterns - START gate for pattern compliance (v6.14 Server-Side)
5091
5096
  * MUST be called before writing any code
5092
5097
  * Calls server API to get patterns and creates enforcement session
5093
5098
  */
@@ -7471,7 +7476,7 @@ ${handlers.join('\n')}
7471
7476
  }
7472
7477
 
7473
7478
  /**
7474
- * Update to CodeBakers v6.13 - server-enforced patterns
7479
+ * Update to CodeBakers v6.14 - server-enforced patterns
7475
7480
  * This is the MCP equivalent of the `codebakers upgrade` CLI command
7476
7481
  */
7477
7482
  private async handleUpdatePatterns(args: { force?: boolean }) {
@@ -7481,46 +7486,51 @@ ${handlers.join('\n')}
7481
7486
  const claudeDir = path.join(cwd, '.claude');
7482
7487
  const codebakersJson = path.join(cwd, '.codebakers.json');
7483
7488
 
7484
- let response = `# 🔄 CodeBakers v6.13 Update\n\n`;
7489
+ let response = `# 🔄 CodeBakers v6.14 Update\n\n`;
7485
7490
 
7486
- // v6.13 bootstrap content
7487
- const V6_CLAUDE_MD = `# CodeBakers v6.13
7491
+ // v6.14 bootstrap content
7492
+ const V6_CLAUDE_MD = `# CodeBakers v6.14
7488
7493
 
7489
- ## MANDATORY: Show You're Working
7494
+ ## STEP 1: Verify CodeBakers is Connected (FIRST!)
7490
7495
 
7491
- **At the START of EVERY response, show this header:**
7496
+ **At the START of EVERY response, call this MCP tool:**
7492
7497
  \`\`\`
7493
- 🍪 CodeBakers is working on this...
7498
+ project_status()
7494
7499
  \`\`\`
7495
7500
 
7496
- ## MANDATORY: Call MCP Tools
7501
+ **If successful, show:** 🍪 CodeBakers is working on this...
7502
+ **If failed, show:** ⚠️ CodeBakers not connected - run: codebakers go
7503
+
7504
+ ## STEP 2: Call MCP Tools Before Code
7497
7505
 
7498
- **Before writing ANY code, call the \`discover_patterns\` MCP tool:**
7506
+ **Before writing ANY code:**
7499
7507
  \`\`\`
7500
7508
  discover_patterns({ task: "description of what you're building" })
7501
7509
  \`\`\`
7502
7510
 
7503
- **Before saying "done", call \`validate_complete\`:**
7511
+ **Before saying "done":**
7504
7512
  \`\`\`
7505
7513
  validate_complete({ feature: "feature name", files: ["path/to/file.ts"] })
7506
7514
  \`\`\`
7507
7515
 
7508
- ## MANDATORY: Show Footer After Code
7516
+ ## STEP 3: Show Footer After Code
7509
7517
 
7510
7518
  **After ANY response with code, show:**
7511
7519
  \`\`\`
7512
7520
  ---
7513
- 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
7521
+ 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
7514
7522
  \`\`\`
7515
7523
 
7516
7524
  ---
7517
- *CodeBakers v6.13 - Server-Enforced*
7525
+ *CodeBakers v6.14 - Server-Enforced*
7518
7526
  `;
7519
7527
 
7520
- const V6_CURSORRULES = `# CodeBakers v6.13
7528
+ const V6_CURSORRULES = `# CodeBakers v6.14
7521
7529
 
7522
- ## Show You're Working
7523
- At the START of EVERY response, show: 🍪 CodeBakers is working on this...
7530
+ ## Verify First
7531
+ Call project_status() at START of every response.
7532
+ If success: show 🍪 CodeBakers is working on this...
7533
+ If fail: show ⚠️ CodeBakers not connected
7524
7534
 
7525
7535
  ## Before Writing Code
7526
7536
  Call: discover_patterns({ task: "description" })
@@ -7529,7 +7539,7 @@ Call: discover_patterns({ task: "description" })
7529
7539
  Call: validate_complete({ feature: "name", files: ["path.ts"] })
7530
7540
 
7531
7541
  ## After Code Responses
7532
- Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
7542
+ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.14
7533
7543
  `;
7534
7544
 
7535
7545
  try {
@@ -7539,7 +7549,7 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
7539
7549
 
7540
7550
  if (fs.existsSync(claudeMdPath)) {
7541
7551
  const content = fs.readFileSync(claudeMdPath, 'utf-8');
7542
- isV6 = content.includes('v6.13') && content.includes('discover_patterns');
7552
+ isV6 = content.includes('v6.14') && content.includes('discover_patterns');
7543
7553
  }
7544
7554
 
7545
7555
  if (fs.existsSync(codebakersJson)) {
@@ -7553,11 +7563,11 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
7553
7563
 
7554
7564
  response += `## Current Status\n`;
7555
7565
  response += `- Version: ${currentVersion || 'Unknown'}\n`;
7556
- response += `- v6.13 (Server-Enforced): ${isV6 ? 'Yes ✓' : 'No'}\n\n`;
7566
+ response += `- v6.14 (Server-Enforced): ${isV6 ? 'Yes ✓' : 'No'}\n\n`;
7557
7567
 
7558
7568
  // Check if already on v6
7559
7569
  if (isV6 && !force) {
7560
- response += `✅ **Already on v6.13!**\n\n`;
7570
+ response += `✅ **Already on v6.14!**\n\n`;
7561
7571
  response += `Your patterns are server-enforced. Just use \`discover_patterns\` before coding.\n`;
7562
7572
  response += `Use \`force: true\` to reinstall bootstrap files.\n`;
7563
7573
  response += this.getUpdateNotice();
@@ -7570,14 +7580,14 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
7570
7580
  };
7571
7581
  }
7572
7582
 
7573
- response += `## Upgrading to v6.13...\n\n`;
7583
+ response += `## Upgrading to v6.14...\n\n`;
7574
7584
 
7575
- // Write v6.13 bootstrap files
7585
+ // Write v6.14 bootstrap files
7576
7586
  fs.writeFileSync(claudeMdPath, V6_CLAUDE_MD);
7577
- response += `✓ Updated CLAUDE.md (v6.13 bootstrap)\n`;
7587
+ response += `✓ Updated CLAUDE.md (v6.14 bootstrap)\n`;
7578
7588
 
7579
7589
  fs.writeFileSync(path.join(cwd, '.cursorrules'), V6_CURSORRULES);
7580
- response += `✓ Updated .cursorrules (v6.13 bootstrap)\n`;
7590
+ response += `✓ Updated .cursorrules (v6.14 bootstrap)\n`;
7581
7591
 
7582
7592
  // Remove old .claude folder (v5 → v6 migration)
7583
7593
  if (fs.existsSync(claudeDir)) {
@@ -7608,7 +7618,7 @@ Show: 🍪 **CodeBakers** | Patterns: [count] | TSC: ✅ | Tests: ✅ | v6.13
7608
7618
  this.confirmDownload('6.0', 0).catch(() => {});
7609
7619
 
7610
7620
  response += `\n## ✅ Upgrade Complete!\n\n`;
7611
- response += `**What changed in v6.13:**\n`;
7621
+ response += `**What changed in v6.14:**\n`;
7612
7622
  response += `- No local pattern files (.claude/ folder removed)\n`;
7613
7623
  response += `- All patterns fetched from server in real-time\n`;
7614
7624
  response += `- Server tracks compliance via discover_patterns/validate_complete\n\n`;