start-vibing 2.0.12 → 2.0.14

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/dist/cli.js CHANGED
@@ -12,7 +12,14 @@ import { join, dirname } from "path";
12
12
  import { fileURLToPath } from "url";
13
13
  var __filename2 = fileURLToPath(import.meta.url);
14
14
  var __dirname2 = dirname(__filename2);
15
- var ALWAYS_OVERWRITE = ["agents/", "hooks/", "settings.json", "CLAUDE.md", "commands/"];
15
+ var ALWAYS_OVERWRITE = [
16
+ "agents/",
17
+ "hooks/",
18
+ "settings.json",
19
+ "commands/",
20
+ "CLAUDE.md",
21
+ "README.md"
22
+ ];
16
23
  var NEVER_OVERWRITE = [
17
24
  "skills/codebase-knowledge/domains/",
18
25
  "skills/research-cache/cache/",
@@ -103,9 +110,19 @@ async function copyClaudeSetup(targetDir, options = {}) {
103
110
  }
104
111
  const claudeMdTemplate = join(templateDir, "CLAUDE.md");
105
112
  const claudeMdDest = join(targetDir, "CLAUDE.md");
113
+ const claudeTemplateDest = join(destDir, "CLAUDE.template.md");
106
114
  if (existsSync(claudeMdTemplate)) {
107
- if (!existsSync(claudeMdDest) || options.force) {
115
+ if (!existsSync(claudeMdDest)) {
116
+ copyFileSync(claudeMdTemplate, claudeMdDest);
117
+ console.log(" \u2713 Created CLAUDE.md from template");
118
+ } else if (options.force) {
108
119
  copyFileSync(claudeMdTemplate, claudeMdDest);
120
+ console.log(" \u2713 Overwrote CLAUDE.md (force mode)");
121
+ } else {
122
+ copyFileSync(claudeMdTemplate, claudeTemplateDest);
123
+ console.log(" \u2713 Preserved your CLAUDE.md");
124
+ console.log(" \u2713 Created .claude/CLAUDE.template.md for smart merge");
125
+ console.log(" \u2192 The stop hook will help merge new rules on first run");
109
126
  }
110
127
  }
111
128
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "start-vibing",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "description": "Setup Claude Code agents, skills, and hooks in your project. Smart copy that preserves your custom domains and configurations.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,17 +33,20 @@ You analyze requests and route them to the correct specialized agent.
33
33
 
34
34
  ### By File Type
35
35
 
36
- | File Pattern | Agents |
37
- | --------------------------- | ---------------------------------------- |
38
- | `*.ts` (not test) | ts-strict-checker, zod-validator |
39
- | `*.spec.ts`, `*.test.ts` | tester-unit, vitest-config |
40
- | `*.e2e.ts` | playwright-e2e, playwright-fixtures |
41
- | `Dockerfile*` | dockerfile-optimizer, docker-multi-stage |
42
- | `docker-compose*.yml` | docker-compose-designer |
43
- | `*schema*.ts`, `*model*.ts` | mongoose-schema-designer |
44
- | `*.md` | documenter, readme-generator |
45
- | `auth*.ts`, `session*.ts` | security-auditor, auth-session-validator |
46
- | `*.json` (config) | deployment-validator |
36
+ | File Pattern | Agents |
37
+ | --------------------------- | ------------------------------------------------- |
38
+ | `*.tsx`, `*.jsx` | **ui-mobile + ui-tablet + ui-desktop** (MANDATORY)|
39
+ | `*.ts` (not test) | ts-strict-checker, zod-validator |
40
+ | `*.spec.ts`, `*.test.ts` | tester-unit, vitest-config |
41
+ | `*.e2e.ts` | playwright-e2e, playwright-fixtures |
42
+ | `Dockerfile*` | dockerfile-optimizer, docker-multi-stage |
43
+ | `docker-compose*.yml` | docker-compose-designer |
44
+ | `*schema*.ts`, `*model*.ts` | mongoose-schema-designer |
45
+ | `*.md` | documenter, readme-generator |
46
+ | `auth*.ts`, `session*.ts` | security-auditor, auth-session-validator |
47
+ | `*.json` (config) | deployment-validator |
48
+
49
+ > **CRITICAL:** ANY task touching `.tsx` or `.jsx` files MUST invoke UI agents in parallel.
47
50
 
48
51
  ### By Workflow Phase
49
52
 
@@ -112,3 +115,5 @@ If multiple routes are valid:
112
115
  2. **CHECK FILE TYPES** - Files often indicate correct agent
113
116
  3. **CONSIDER PHASE** - Where are we in the workflow?
114
117
  4. **PARALLEL WHEN POSSIBLE** - Route to multiple if independent
118
+ 5. **PLAN FIRST** - Use EnterPlanMode for non-trivial tasks before implementing
119
+ 6. **JSX = UI AGENTS** - Any .tsx/.jsx file REQUIRES ui-mobile + ui-tablet + ui-desktop
@@ -89,6 +89,32 @@ const handleTouchMove = (e: TouchEvent) => {
89
89
  };
90
90
  ```
91
91
 
92
+ ## FORBIDDEN Patterns (Mobile)
93
+
94
+ | Pattern | Problem | Alternative |
95
+ |---------|---------|-------------|
96
+ | Cards in flex-col | Waste vertical space, poor scanning | Use compact lists or rows |
97
+ | Card grids | Too cramped, hard to tap | Full-width list items |
98
+ | Nested cards | Confusing hierarchy | Flat structure with dividers |
99
+ | Card carousels | Horizontal scroll issues | Vertical scrolling lists |
100
+ | Multiple CTAs per card | Touch target confusion | Single primary action |
101
+
102
+ ### NO CARDS ON MOBILE
103
+
104
+ ```tsx
105
+ // ❌ BAD - Cards in vertical layout waste space
106
+ <div className="flex flex-col gap-4">
107
+ <Card>...</Card>
108
+ <Card>...</Card>
109
+ </div>
110
+
111
+ // ✅ GOOD - Compact list items
112
+ <ul className="divide-y">
113
+ <li className="py-3 flex justify-between">...</li>
114
+ <li className="py-3 flex justify-between">...</li>
115
+ </ul>
116
+ ```
117
+
92
118
  ## Critical Rules
93
119
 
94
120
  1. **44px MINIMUM** - All touch targets
@@ -96,3 +122,4 @@ const handleTouchMove = (e: TouchEvent) => {
96
122
  3. **NO HOVER STATES** - Touch doesn't hover
97
123
  4. **FULL-WIDTH INPUTS** - Easy to tap
98
124
  5. **NO HORIZONTAL SCROLL** - Ever
125
+ 6. **NO CARDS** - Use lists/rows instead (cards waste space in flex-col)
@@ -437,6 +437,64 @@ After editing, verify: wc -m CLAUDE.md
437
437
  };
438
438
  }
439
439
 
440
+ function validateClaudeMdTemplateMerge(): ValidationError | null {
441
+ const templatePath = join(PROJECT_DIR, '.claude', 'CLAUDE.template.md');
442
+
443
+ // Only check if template exists (created by start-vibing when user has existing CLAUDE.md)
444
+ if (!existsSync(templatePath)) return null;
445
+ if (!existsSync(CLAUDE_MD_PATH)) return null;
446
+
447
+ const userContent = readFileSync(CLAUDE_MD_PATH, 'utf8');
448
+ const templateContent = readFileSync(templatePath, 'utf8');
449
+
450
+ // Check if user's CLAUDE.md is missing required sections
451
+ const missingSections: string[] = [];
452
+ for (const section of REQUIRED_SECTIONS) {
453
+ if (!section.pattern.test(userContent)) {
454
+ missingSections.push(section.name);
455
+ }
456
+ }
457
+
458
+ // If user has all required sections, they're probably fine - skip merge suggestion
459
+ if (missingSections.length === 0) {
460
+ return null; // User's CLAUDE.md is well-structured, no merge needed
461
+ }
462
+
463
+ return {
464
+ type: 'CLAUDE_MD_TEMPLATE_MERGE_NEEDED',
465
+ message: `Your CLAUDE.md is missing ${missingSections.length} required section(s). A template with recommended structure is available.`,
466
+ action: `
467
+ ================================================================================
468
+ SMART MERGE: COMBINE YOUR CLAUDE.MD WITH NEW TEMPLATE
469
+ ================================================================================
470
+
471
+ Your CLAUDE.md is missing these sections:
472
+ ${missingSections.map((s) => ` - ${s}`).join('\n')}
473
+
474
+ A template file exists at: .claude/CLAUDE.template.md
475
+
476
+ REQUIRED ACTION:
477
+ Perform a smart merge that:
478
+ 1. KEEPS all your existing project-specific content
479
+ 2. ADDS the missing required sections from the template
480
+ 3. PRESERVES your custom rules and configurations
481
+
482
+ MERGE STEPS:
483
+ 1. Read your current CLAUDE.md content
484
+ 2. Read .claude/CLAUDE.template.md for structure reference
485
+ 3. Create a merged version that:
486
+ - Keeps your project title, overview, and custom rules
487
+ - Adds missing sections (${missingSections.join(', ')})
488
+ - Follows the template structure
489
+ 4. Write the merged content to CLAUDE.md
490
+ 5. Delete .claude/CLAUDE.template.md after successful merge
491
+
492
+ IMPORTANT: Do NOT just overwrite - intelligently MERGE the content!
493
+ After merging, delete the template file to mark merge as complete.
494
+ ================================================================================`,
495
+ };
496
+ }
497
+
440
498
  function validateClaudeMdStructure(): ValidationError | null {
441
499
  if (!existsSync(CLAUDE_MD_PATH)) return null;
442
500
 
@@ -762,6 +820,10 @@ async function main(): Promise<void> {
762
820
  if (claudeMdExistsError) errors.push(claudeMdExistsError);
763
821
 
764
822
  if (!claudeMdExistsError) {
823
+ // Check if there's a template pending merge (from start-vibing install)
824
+ const templateMergeError = validateClaudeMdTemplateMerge();
825
+ if (templateMergeError) errors.push(templateMergeError);
826
+
765
827
  const sizeError = validateClaudeMdSize();
766
828
  if (sizeError) errors.push(sizeError);
767
829