mycontext-cli 2.0.25 → 2.0.27

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 (105) hide show
  1. package/README.md +184 -37
  2. package/dist/cli.js +92 -80
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/build-app.d.ts +6 -1
  5. package/dist/commands/build-app.d.ts.map +1 -1
  6. package/dist/commands/build-app.js +97 -9
  7. package/dist/commands/build-app.js.map +1 -1
  8. package/dist/commands/compile-prd.d.ts.map +1 -1
  9. package/dist/commands/compile-prd.js +7 -0
  10. package/dist/commands/compile-prd.js.map +1 -1
  11. package/dist/commands/export-progress.d.ts +34 -0
  12. package/dist/commands/export-progress.d.ts.map +1 -0
  13. package/dist/commands/export-progress.js +552 -0
  14. package/dist/commands/export-progress.js.map +1 -0
  15. package/dist/commands/generate-context-files.d.ts.map +1 -1
  16. package/dist/commands/generate-context-files.js +10 -2
  17. package/dist/commands/generate-context-files.js.map +1 -1
  18. package/dist/commands/generate.d.ts +8 -1
  19. package/dist/commands/generate.d.ts.map +1 -1
  20. package/dist/commands/generate.js +212 -0
  21. package/dist/commands/generate.js.map +1 -1
  22. package/dist/commands/help.d.ts +17 -0
  23. package/dist/commands/help.d.ts.map +1 -0
  24. package/dist/commands/help.js +329 -0
  25. package/dist/commands/help.js.map +1 -0
  26. package/dist/commands/import-project-plan.d.ts +27 -0
  27. package/dist/commands/import-project-plan.d.ts.map +1 -0
  28. package/dist/commands/import-project-plan.js +411 -0
  29. package/dist/commands/import-project-plan.js.map +1 -0
  30. package/dist/commands/pm-integration.d.ts +18 -0
  31. package/dist/commands/pm-integration.d.ts.map +1 -0
  32. package/dist/commands/pm-integration.js +385 -0
  33. package/dist/commands/pm-integration.js.map +1 -0
  34. package/dist/commands/setup-complete.d.ts +16 -0
  35. package/dist/commands/setup-complete.d.ts.map +1 -0
  36. package/dist/commands/setup-complete.js +468 -0
  37. package/dist/commands/setup-complete.js.map +1 -0
  38. package/dist/commands/setup-shadcn.d.ts +20 -0
  39. package/dist/commands/setup-shadcn.d.ts.map +1 -0
  40. package/dist/commands/setup-shadcn.js +241 -0
  41. package/dist/commands/setup-shadcn.js.map +1 -0
  42. package/dist/commands/suggest.d.ts +15 -0
  43. package/dist/commands/suggest.d.ts.map +1 -0
  44. package/dist/commands/suggest.js +288 -0
  45. package/dist/commands/suggest.js.map +1 -0
  46. package/dist/commands/update.d.ts +0 -4
  47. package/dist/commands/update.d.ts.map +1 -1
  48. package/dist/commands/update.js +7 -197
  49. package/dist/commands/update.js.map +1 -1
  50. package/dist/commands/workflow.d.ts +16 -0
  51. package/dist/commands/workflow.d.ts.map +1 -0
  52. package/dist/commands/workflow.js +464 -0
  53. package/dist/commands/workflow.js.map +1 -0
  54. package/dist/package.json +1 -1
  55. package/dist/services/PMIntegrationService.d.ts +46 -0
  56. package/dist/services/PMIntegrationService.d.ts.map +1 -0
  57. package/dist/services/PMIntegrationService.js +363 -0
  58. package/dist/services/PMIntegrationService.js.map +1 -0
  59. package/dist/services/WebhookServer.d.ts +37 -0
  60. package/dist/services/WebhookServer.d.ts.map +1 -0
  61. package/dist/services/WebhookServer.js +231 -0
  62. package/dist/services/WebhookServer.js.map +1 -0
  63. package/dist/types/index.d.ts +1 -0
  64. package/dist/types/index.d.ts.map +1 -1
  65. package/dist/types/index.js +2 -0
  66. package/dist/types/index.js.map +1 -1
  67. package/dist/types/pm-integration.d.ts +241 -0
  68. package/dist/types/pm-integration.d.ts.map +1 -0
  69. package/dist/types/pm-integration.js +24 -0
  70. package/dist/types/pm-integration.js.map +1 -0
  71. package/dist/utils/NextJSProjectValidator.d.ts.map +1 -1
  72. package/dist/utils/NextJSProjectValidator.js +14 -7
  73. package/dist/utils/NextJSProjectValidator.js.map +1 -1
  74. package/dist/utils/ProjectStateAnalyzer.d.ts +46 -0
  75. package/dist/utils/ProjectStateAnalyzer.d.ts.map +1 -0
  76. package/dist/utils/ProjectStateAnalyzer.js +311 -0
  77. package/dist/utils/ProjectStateAnalyzer.js.map +1 -0
  78. package/dist/utils/ProjectStructureValidator.d.ts +12 -0
  79. package/dist/utils/ProjectStructureValidator.d.ts.map +1 -1
  80. package/dist/utils/ProjectStructureValidator.js +111 -14
  81. package/dist/utils/ProjectStructureValidator.js.map +1 -1
  82. package/dist/utils/claudeAgentClient.d.ts +4 -0
  83. package/dist/utils/claudeAgentClient.d.ts.map +1 -1
  84. package/dist/utils/claudeAgentClient.js +90 -20
  85. package/dist/utils/claudeAgentClient.js.map +1 -1
  86. package/dist/utils/errorHandler.d.ts +31 -74
  87. package/dist/utils/errorHandler.d.ts.map +1 -1
  88. package/dist/utils/errorHandler.js +190 -276
  89. package/dist/utils/errorHandler.js.map +1 -1
  90. package/dist/utils/hybridAIClient.js +1 -1
  91. package/dist/utils/hybridAIClient.js.map +1 -1
  92. package/dist/utils/mcpTools.d.ts +9 -9
  93. package/dist/utils/nextStepsSuggester.d.ts +52 -0
  94. package/dist/utils/nextStepsSuggester.d.ts.map +1 -0
  95. package/dist/utils/nextStepsSuggester.js +438 -0
  96. package/dist/utils/nextStepsSuggester.js.map +1 -0
  97. package/dist/utils/progress.d.ts +31 -1
  98. package/dist/utils/progress.d.ts.map +1 -1
  99. package/dist/utils/progress.js +110 -2
  100. package/dist/utils/progress.js.map +1 -1
  101. package/dist/utils/workflowEngine.d.ts +96 -0
  102. package/dist/utils/workflowEngine.d.ts.map +1 -0
  103. package/dist/utils/workflowEngine.js +793 -0
  104. package/dist/utils/workflowEngine.js.map +1 -0
  105. package/package.json +1 -1
package/README.md CHANGED
@@ -1,15 +1,33 @@
1
- # MyContext CLI
1
+ # MyContext CLI + mycontext PM System
2
2
 
3
- **🎨 Component-First Visual Builder with Zero-Error Guarantees**
3
+ **🤖 AI-Powered Project Management + Component-First Development**
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/mycontext-cli.svg)](https://www.npmjs.com/package/mycontext-cli)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
  [![Node Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org)
8
8
 
9
- Generate production-ready React/Next.js components **one at a time**, preview them visually, then scale to complete applications. Every component guaranteed **zero TypeScript/ESLint/build errors**.
9
+ **🎨 MyContext CLI** - Component-first development with zero-error guarantees and production-ready code generation
10
+
11
+ <!-- Future: mycontext PM - Intelligent project planning, task decomposition, and real-time monitoring using Claude Agent SDK -->
12
+
13
+ **Result:** From client requirements to production deployment - fully automated with AI oversight.
10
14
 
11
15
  ## 🚀 Quick Start
12
16
 
17
+ ### **Option 1: Complete Guided Setup (⭐ Recommended for New Projects)**
18
+
19
+ ```bash
20
+ # Install globally
21
+ npm install -g mycontext-cli
22
+
23
+ # Single command complete setup with AI guidance
24
+ mycontext setup-complete --interactive
25
+
26
+ # That's it! Project is ready for development.
27
+ ```
28
+
29
+ ### **Option 2: Step-by-Step Development**
30
+
13
31
  ```bash
14
32
  # Install globally
15
33
  npm install -g mycontext-cli
@@ -20,10 +38,15 @@ mycontext init my-app
20
38
  # 2. Generate context files (PRD, features, etc.)
21
39
  mycontext generate-context-files --description "Your app idea"
22
40
 
23
- # 3. Component list is generated automatically
24
- # 4. Compile PRD (requires approval)
41
+ # 3. Compile PRD (requires approval)
25
42
  mycontext compile-prd
26
43
 
44
+ # 4. Generate individual components
45
+ mycontext generate types
46
+ mycontext generate brand
47
+ mycontext generate components-list
48
+ mycontext generate project-structure
49
+
27
50
  # 5. Generate components with validation
28
51
  mycontext generate-components all --with-tests
29
52
 
@@ -34,6 +57,24 @@ mycontext preview components
34
57
  mycontext build-app --interactive
35
58
  ```
36
59
 
60
+ ### **Option 3: AI-Powered Workflow Analysis**
61
+
62
+ ```bash
63
+ # Install globally
64
+ npm install -g mycontext-cli
65
+
66
+ # 1. AI analyzes your project requirements
67
+
68
+ # 2. AI generates contextual workflow and executes it
69
+ mycontext workflow generate --description "E-commerce platform with payments"
70
+
71
+ # 3. Or use interactive workflow planning
72
+ mycontext workflow --interactive
73
+
74
+ # 4. AI creates complete project structure with components
75
+ # 5. Continue development with AI-generated architecture
76
+ ```
77
+
37
78
  ## 💡 Philosophy: Component-First Development
38
79
 
39
80
  **Start Small, Scale Gradually:**
@@ -47,43 +88,112 @@ mycontext build-app --interactive
47
88
 
48
89
  **Result:** Production-ready apps with 0 errors, built incrementally.
49
90
 
50
- ## 🎯 Key Features
91
+ ## 🏗️ System Architecture
51
92
 
52
- ### ✅ Zero-Error Guarantee
93
+ ```
94
+ ┌─────────────────┐ ┌─────────────────┐
95
+ │ Client Input │───▶│ MyContext CLI │
96
+ │ │ │ │
97
+ │ • Requirements │ │ • Code Generation│
98
+ │ • Description │ │ • Component │
99
+ │ • Tech Stack │ │ Creation │
100
+ └─────────────────┘ └─────────────────┘
101
+ ```
53
102
 
54
- - **TypeScript validation** on every component
55
- - **ESLint checks** with automatic fixes
56
- - **Build validation** before moving forward
57
- - **Automatic retries** with error context (max 3 attempts)
103
+ <!-- Future PM Architecture:
104
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
105
+ │ Client Input │───▶│ mycontext PM │───▶│ MyContext CLI │
106
+ │ │ │ (Next.js App) │ │ │
107
+ │ • Requirements │ │ │ │ • Code Generation│
108
+ │ • Budget │ │ • Task Planning │ │ • Component │
109
+ │ • Timeline │ │ • Progress Mgmt │ │ Creation │
110
+ └─────────────────┘ │ • Real-time │ └─────────────────┘
111
+ │ Monitoring │
112
+ └─────────────────┘
113
+
114
+
115
+ ┌─────────────────┐
116
+ │ Progress Sync │
117
+ │ (Webhooks) │
118
+ └─────────────────┘
119
+ -->
120
+
121
+ ### **Data Flow:**
122
+
123
+ 1. **Client Requirements** → AI analyzes and generates project structure
124
+ 2. **Code Generation** → MyContext builds production-ready components
125
+ 3. **AI Oversight** → Intelligent suggestions and validation throughout development
126
+
127
+ <!-- Future PM Data Flow:
128
+ 1. Client Requirements → mycontext PM analyzes and decomposes into structured JSON
129
+ 2. mycontext PM Plan → MyContext CLI imports and generates project structure
130
+ 3. Code Generation → MyContext builds production-ready components
131
+ 4. Progress Updates → Real-time sync back to mycontext PM dashboard
132
+ 5. AI Oversight → Continuous monitoring and intelligent suggestions
133
+ -->
58
134
 
59
- ### UI Specification System
135
+ ## 🎯 Key Features
60
136
 
61
- - **Plain-English specs** from component descriptions
62
- - **JSON-to-spec conversion** for structured input
63
- - **Built-in templates** for common patterns (cards, forms, buttons)
64
- - **Detailed implementation guidance** with accessibility & responsive requirements
65
- - **Integrated workflow** with component generation
137
+ <!-- Future: mycontext PM (Coming Soon)
138
+ - Intelligent Project Planning - AI decomposes requirements into epics, user stories, and tasks
139
+ - Real-time Progress Monitoring - Hourly checks, blocker detection, timeline adjustments
140
+ - Client Brief Processing - Parse contracts, budgets, and timelines into structured plans
141
+ - Task Assignment & Tracking - Automated task management with priority and dependency handling
142
+ - Progress Synchronization - Webhook integration for live dashboard updates
143
+ -->
66
144
 
67
- ### ✅ Visual Preview
145
+ ### ✅ **MyContext CLI (Component-First Development)**
68
146
 
69
- - **Figma-like component board** for visual testing
70
- - **Interactive component playground**
71
- - **Responsive design testing**
147
+ - **Streamlined Workflow** - Single `setup-complete` command for full project setup
148
+ - **Smart Next Steps** - Context-aware suggestions guide you through the development process
149
+ - **Zero-Error Guarantee** - TypeScript/ESLint/build validation on every component
150
+ - **UI Specification System** - Plain-English specs with accessibility & responsive guidance
151
+ - **Visual Preview** - Figma-like component board for testing
152
+ - **BYOK Model** - Use your own Claude/X.AI/OpenAI API keys (~$20/month)
72
153
 
73
- ### BYOK Model (Bring Your Own Keys)
154
+ ### 🤖 **AI Workflow Analysis**
74
155
 
75
- - Use your own Claude/X.AI/OpenAI API keys
76
- - No billing from us - you control costs
77
- - Transparent pricing (~$20/month for unlimited usage)
156
+ - **Intelligent Project Analysis** - AI understands your requirements and suggests optimal workflows
157
+ - **Contextual Workflow Generation** - Custom workflows tailored to your specific project needs
158
+ - **Component Recommendations** - AI suggests appropriate components and features
159
+ - **Architecture Guidance** - Recommends best tech stack and project structure
78
160
 
79
161
  ## 📋 Commands
80
162
 
81
- ### Core Workflow
163
+ ### Complete Project Setup (⭐ NEW)
164
+
165
+ ```bash
166
+ mycontext setup-complete --interactive # Complete guided project setup
167
+ mycontext setup-complete --name "MyApp" # Direct setup with options
168
+ ```
169
+
170
+ ### AI Workflow Analysis (NEW)
171
+
172
+ ```bash
173
+ mycontext workflow analyze # Analyze project with AI
174
+ mycontext workflow generate # Generate and execute workflow
175
+ mycontext workflow --interactive # Interactive workflow planning
176
+ ```
177
+
178
+ ### Streamlined Workflow (Recommended)
179
+
180
+ ```bash
181
+ mycontext init <project-name> # Initialize project
182
+ mycontext generate-context-files # Generate PRD, features, specs
183
+ mycontext generate architecture # Generate complete architecture
184
+ mycontext build-app # Build complete application
185
+ ```
186
+
187
+ ### Traditional Component-First Workflow
82
188
 
83
189
  ```bash
84
190
  mycontext init <project-name> # Initialize project
85
191
  mycontext generate-context-files # Generate PRD, features, specs
86
192
  mycontext compile-prd # Compile context into PRD
193
+ mycontext generate types # Generate TypeScript types
194
+ mycontext generate brand # Generate brand guidelines
195
+ mycontext generate components-list # Generate component list
196
+ mycontext generate project-structure # Generate project structure
87
197
  mycontext generate-components <name|all> # Generate components
88
198
  mycontext preview <type> # Preview components/app
89
199
  mycontext build-app # Build complete application
@@ -196,17 +306,18 @@ mycontext refine spec RevenueCard --desc "A card showing total revenue prominent
196
306
  - Desktop (> 768px): Standard spacing, maintain layout
197
307
  ```
198
308
 
199
- ## 🆚 MyContext vs Others
309
+ ## 🆚 MyContext CLI vs Others
200
310
 
201
- | Feature | MyContext | Lovable | v0.dev |
202
- | ------------------------ | --------------- | ---------- | ----------- |
203
- | **Code Location** | Your machine | Cloud | Cloud |
204
- | **Validation Gates** | 12+ checkpoints | None | None |
205
- | **Build Validation** | Every component | None | None |
206
- | **TypeScript Guarantee** | 100% | No | No |
207
- | **UI Specifications** | Plain-English | None | None |
208
- | **Pricing** | BYOK ($0-20/mo) | $20-200/mo | Usage-based |
209
- | **Deployment** | Anywhere | Limited | Vercel only |
311
+ | Feature | MyContext CLI | Lovable | v0.dev | Bolt |
312
+ | ------------------------- | ---------------------- | ---------- | ----------- | ----------- |
313
+ | **AI Project Management** | 🚧 Coming Soon | ❌ None | ❌ None | ❌ None |
314
+ | **Code Location** | Your machine | Cloud | Cloud | Cloud |
315
+ | **End-to-End Automation** | Requirements→Deploy | ❌ Manual | ❌ Manual | ❌ Manual |
316
+ | **Progress Monitoring** | ✅ Context-Aware | ❌ None | ❌ None | ❌ None |
317
+ | **Validation Gates** | 12+ checkpoints | None | None | None |
318
+ | **TypeScript Guarantee** | 100% | No | No | No |
319
+ | **PM Integration** | 🚧 Coming Soon | ❌ None | None | ❌ None |
320
+ | **Pricing** | BYOK ($0-20/mo) | $20-200/mo | Usage-based | Usage-based |
210
321
 
211
322
  ## 🐛 Troubleshooting
212
323
 
@@ -243,10 +354,42 @@ mycontext refine spec ComponentName --desc "description" --verbose
243
354
  mycontext refine spec ComponentName --json-file component.json
244
355
  ```
245
356
 
357
+ **"PM Plan Import Failed"**
358
+
359
+ ```bash
360
+ # Validate PM plan structure first
361
+ mycontext import-project-plan ./pm-plan.json --validate
362
+
363
+ # Check for required fields in PM plan
364
+ # Required: project.name, project.description, breakdown.tasks, myContext.framework
365
+ ```
366
+
367
+ **"Progress Export Issues"**
368
+
369
+ ```bash
370
+ # Check if project has been initialized
371
+ mycontext export-progress --format summary
372
+
373
+ # Ensure .mycontext directory exists with todos.json
374
+ ls -la .mycontext/
375
+ ```
376
+
377
+ <!-- Future: mycontext PM Synchronization (Coming Soon)
378
+ # Test webhook connectivity
379
+ curl -X POST https://mycontext-pm.example.com/webhook \
380
+ -H "Content-Type: application/json" \
381
+ -d '{"test": "connection"}'
382
+
383
+ # Check webhook URL format
384
+ mycontext export-progress --webhook https://mycontext-pm.example.com/webhook
385
+ -->
386
+
246
387
  ## 📚 Documentation
247
388
 
248
389
  - [Getting Started](https://github.com/farajabien/mycontext-cli#quick-start)
249
- - [Component Generation](https://github.com/farajabien/mycontext-cli#commands)
390
+ - [AI Workflow Analysis](https://github.com/farajabien/mycontext-cli#ai-workflow-analysis-new)
391
+ - [Component Generation](https://github.com/farajabien/mycontext-cli#traditional-component-first-workflow)
392
+ - [System Architecture](https://github.com/farajabien/mycontext-cli#system-architecture)
250
393
  - [Build Strategies](https://github.com/farajabien/mycontext-cli#philosophy-component-first-development)
251
394
 
252
395
  ## 🤝 Contributing
@@ -259,4 +402,8 @@ MIT © MyContext
259
402
 
260
403
  ---
261
404
 
405
+ **🤖 The future of AI-powered development: From requirements to production with intelligent automation.**
406
+
262
407
  **Built by developers, for developers. Your code stays on your machine.** 🚀
408
+
409
+ <!-- Future: 🤖 The future of AI-powered development: From requirements to production with mycontext PM oversight. -->
package/dist/cli.js CHANGED
@@ -31,6 +31,14 @@ const sanitize_1 = require("./commands/sanitize");
31
31
  const setup_database_1 = require("./commands/setup-database");
32
32
  const setup_instantdb_1 = require("./commands/setup-instantdb");
33
33
  const setup_mcp_1 = require("./commands/setup-mcp");
34
+ const setup_shadcn_1 = require("./commands/setup-shadcn");
35
+ const setup_complete_1 = require("./commands/setup-complete");
36
+ const import_project_plan_1 = require("./commands/import-project-plan");
37
+ const export_progress_1 = require("./commands/export-progress");
38
+ const pm_integration_1 = require("./commands/pm-integration");
39
+ const help_1 = require("./commands/help");
40
+ const suggest_1 = require("./commands/suggest");
41
+ const workflow_1 = require("./commands/workflow");
34
42
  const generate_context_files_1 = require("./commands/generate-context-files");
35
43
  const compile_prd_1 = require("./commands/compile-prd");
36
44
  const build_strategy_1 = require("./commands/build-strategy");
@@ -77,7 +85,7 @@ try {
77
85
  ];
78
86
  for (const p of candidates) {
79
87
  if (fs.pathExistsSync(p)) {
80
- const result = dotenv.config({ path: p });
88
+ const result = dotenv.config({ path: p, silent: true });
81
89
  dotenvExpand.expand(result);
82
90
  }
83
91
  }
@@ -164,6 +172,7 @@ program
164
172
  .option("--force", "Overwrite existing output files without prompt")
165
173
  .option("--full", "Generate full context (PRD + A/B/C/D files) - for 'context' type only")
166
174
  .option("--files-only", "Generate only A/B/C/D files (requires existing PRD) - for 'context' type only")
175
+ .option("--auto-continue", "Automatically continue to next logical steps after completion")
167
176
  .action(async (type, options) => {
168
177
  try {
169
178
  const generateCommand = new generate_1.GenerateCommand();
@@ -229,6 +238,42 @@ program
229
238
  process.exit(1);
230
239
  }
231
240
  });
241
+ // Context-aware help command
242
+ program
243
+ .command("help [topic]")
244
+ .description("Show context-aware help and guidance")
245
+ .option("--verbose", "Show detailed help information")
246
+ .action(async (topic, options) => {
247
+ try {
248
+ const helpCommand = new help_1.HelpCommand(program);
249
+ await helpCommand.execute({
250
+ topic,
251
+ verbose: Boolean(options.verbose),
252
+ });
253
+ }
254
+ catch (error) {
255
+ console.error(chalk_1.default.red("❌ Help command failed:"), error);
256
+ process.exit(1);
257
+ }
258
+ });
259
+ // Intelligent command suggestions
260
+ program
261
+ .command("suggest [command]")
262
+ .description("Get intelligent command suggestions and recommendations")
263
+ .option("--limit <number>", "Limit number of suggestions", "5")
264
+ .action(async (command, options) => {
265
+ try {
266
+ const suggestCommand = new suggest_1.SuggestCommand(program);
267
+ await suggestCommand.execute({
268
+ command,
269
+ limit: parseInt(options.limit) || 5,
270
+ });
271
+ }
272
+ catch (error) {
273
+ console.error(chalk_1.default.red("❌ Suggest command failed:"), error);
274
+ process.exit(1);
275
+ }
276
+ });
232
277
  // Generate components command
233
278
  const generateComponentsCmd = program
234
279
  .command("generate-components [target]")
@@ -424,85 +469,9 @@ program
424
469
  process.exit(1);
425
470
  }
426
471
  });
427
- // Workflow command - streamlined development flow
428
- program
429
- .command("workflow <step>")
430
- .description("Streamlined development workflow: init → context → types → brand → components")
431
- .option("--description <desc>", "Project description for context generation")
432
- .option("--with-tests", "Generate tests for components")
433
- .option("--skip-brand", "Skip brand generation step")
434
- .action(async (step, options) => {
435
- try {
436
- const steps = ["init", "context", "types", "brand", "components"];
437
- const currentIndex = steps.indexOf(step);
438
- if (currentIndex === -1) {
439
- console.error(chalk_1.default.red(`❌ Invalid step: ${step}`));
440
- console.log(chalk_1.default.blue("Available steps: " + steps.join(" → ")));
441
- process.exit(1);
442
- }
443
- console.log(chalk_1.default.blue(`🚀 Running workflow step: ${step}`));
444
- // Run the current step and all previous steps if needed
445
- for (let i = 0; i <= currentIndex; i++) {
446
- const currentStep = steps[i];
447
- console.log(chalk_1.default.gray(`\n📋 Step ${i + 1}/${steps.length}: ${currentStep}`));
448
- switch (currentStep) {
449
- case "init":
450
- // Skip if already initialized
451
- if (await require("fs-extra").pathExists(".mycontext")) {
452
- console.log(chalk_1.default.gray(" ✓ Already initialized"));
453
- continue;
454
- }
455
- break;
456
- case "context":
457
- const generateCommand = new generate_1.GenerateCommand();
458
- await generateCommand.execute({
459
- type: "context",
460
- full: true,
461
- description: options.description,
462
- ...options,
463
- });
464
- break;
465
- case "types":
466
- const generateTypesCommand = new generate_1.GenerateCommand();
467
- await generateTypesCommand.execute({
468
- type: "types",
469
- ...options,
470
- });
471
- break;
472
- case "brand":
473
- if (options.skipBrand) {
474
- console.log(chalk_1.default.gray(" ⏭️ Skipped (--skip-brand)"));
475
- continue;
476
- }
477
- const generateBrandCommand = new generate_1.GenerateCommand();
478
- await generateBrandCommand.execute({
479
- type: "brand",
480
- ...options,
481
- });
482
- break;
483
- case "components":
484
- const generateComponentsCommand = new generate_components_1.GenerateComponentsCommand();
485
- await generateComponentsCommand.execute("all", {
486
- withTests: options.withTests || false,
487
- all: true,
488
- ...options,
489
- });
490
- break;
491
- }
492
- }
493
- console.log(chalk_1.default.green(`\n✅ Workflow step '${step}' completed successfully!`));
494
- if (currentIndex < steps.length - 1) {
495
- console.log(chalk_1.default.blue(`\n➡️ Next step: mycontext workflow ${steps[currentIndex + 1]}`));
496
- }
497
- else {
498
- console.log(chalk_1.default.green(`\n🎉 All workflow steps completed! Your project is ready.`));
499
- }
500
- }
501
- catch (error) {
502
- console.error(chalk_1.default.red("❌ Workflow failed:"), error);
503
- process.exit(1);
504
- }
505
- });
472
+ // Workflow command - pre-configured workflow templates
473
+ const workflowCommand = new workflow_1.WorkflowCommand();
474
+ workflowCommand.register(program);
506
475
  // Update command (mycontext update)
507
476
  program
508
477
  .command("update")
@@ -538,6 +507,15 @@ program.addCommand(build_strategy_1.buildStrategyCommand);
538
507
  // Health check command
539
508
  const healthCheckCommand = new health_check_1.HealthCheckCommand();
540
509
  healthCheckCommand.register(program);
510
+ // Import Project Plan command (mycontext PM integration)
511
+ const importProjectPlanCommand = new import_project_plan_1.ImportProjectPlanCommand();
512
+ importProjectPlanCommand.register(program);
513
+ // Export Progress command (mycontext PM integration)
514
+ const exportProgressCommand = new export_progress_1.ExportProgressCommand();
515
+ exportProgressCommand.register(program);
516
+ // PM Integration command (comprehensive PM integration management)
517
+ const pmIntegrationCommand = new pm_integration_1.PMIntegrationCommand();
518
+ pmIntegrationCommand.register(program);
541
519
  // Build App command (agent-driven workflow with looping)
542
520
  const buildAppCmd = program
543
521
  .command("build-app")
@@ -552,6 +530,9 @@ const buildAppCmd = program
552
530
  .option("--interactive", "Enable interactive mode with user prompts and confirmations")
553
531
  .option("--skip-validation", "Skip validation and quality assurance steps")
554
532
  .option("--max-retries <number>", "Maximum retry attempts for failed steps", "3")
533
+ .option("--pm-plan <file>", "Use mycontext PM project plan JSON file")
534
+ .option("--auto-sync", "Automatically sync progress with mycontext PM")
535
+ .option("--webhook-url <url>", "Webhook URL for progress updates")
555
536
  .action(async (options) => {
556
537
  try {
557
538
  const command = new build_app_1.BuildAppCommand();
@@ -566,6 +547,9 @@ const buildAppCmd = program
566
547
  interactive: Boolean(options.interactive),
567
548
  skipValidation: Boolean(options.skipValidation),
568
549
  maxRetries: parseInt(options.maxRetries) || 3,
550
+ pmPlan: options.pmPlan,
551
+ autoSync: Boolean(options.autoSync),
552
+ webhookUrl: options.webhookUrl,
569
553
  });
570
554
  }
571
555
  catch (error) {
@@ -713,6 +697,34 @@ program
713
697
  process.exit(1);
714
698
  }
715
699
  });
700
+ // shadcn/ui setup command
701
+ program
702
+ .command("setup-shadcn")
703
+ .description("Set up shadcn/ui components with interactive terminal installation")
704
+ .option("--all", "Install all essential components automatically")
705
+ .option("--components <list>", "Comma-separated list of components to install")
706
+ .option("--force", "Force reinitialization even if already set up")
707
+ .option("--skip-prompts", "Skip interactive prompts")
708
+ .action(async (options) => {
709
+ try {
710
+ const command = new setup_shadcn_1.SetupShadcnCommand();
711
+ await command.execute({
712
+ all: Boolean(options.all),
713
+ components: options.components
714
+ ? options.components.split(",").map((c) => c.trim())
715
+ : undefined,
716
+ force: Boolean(options.force),
717
+ skipPrompts: Boolean(options.skipPrompts),
718
+ });
719
+ }
720
+ catch (error) {
721
+ console.error(chalk_1.default.red("❌ shadcn/ui setup failed:"), error);
722
+ process.exit(1);
723
+ }
724
+ });
725
+ // Setup complete command - guided complete project setup
726
+ const setupCompleteCommand = new setup_complete_1.SetupCompleteCommand();
727
+ setupCompleteCommand.register(program);
716
728
  // Promote command for moving components to production
717
729
  program
718
730
  .command("promote")