mycontext-cli 1.0.95 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +424 -202
  2. package/dist/agents/implementations/ClaudeAgentWorkflow.d.ts.map +1 -1
  3. package/dist/agents/implementations/ClaudeAgentWorkflow.js +38 -3
  4. package/dist/agents/implementations/ClaudeAgentWorkflow.js.map +1 -1
  5. package/dist/agents/implementations/WorkflowAgent.d.ts +4 -0
  6. package/dist/agents/implementations/WorkflowAgent.d.ts.map +1 -1
  7. package/dist/agents/implementations/WorkflowAgent.js +90 -10
  8. package/dist/agents/implementations/WorkflowAgent.js.map +1 -1
  9. package/dist/agents/interfaces/SubAgent.d.ts +5 -0
  10. package/dist/agents/interfaces/SubAgent.d.ts.map +1 -1
  11. package/dist/commands/build-app.d.ts +5 -0
  12. package/dist/commands/build-app.d.ts.map +1 -1
  13. package/dist/commands/build-app.js +127 -4
  14. package/dist/commands/build-app.js.map +1 -1
  15. package/dist/commands/compile-prd.d.ts.map +1 -1
  16. package/dist/commands/compile-prd.js +18 -54
  17. package/dist/commands/compile-prd.js.map +1 -1
  18. package/dist/commands/enhance.d.ts +21 -0
  19. package/dist/commands/enhance.d.ts.map +1 -1
  20. package/dist/commands/enhance.js +155 -12
  21. package/dist/commands/enhance.js.map +1 -1
  22. package/dist/commands/generate-components.d.ts +43 -0
  23. package/dist/commands/generate-components.d.ts.map +1 -1
  24. package/dist/commands/generate-components.js +270 -0
  25. package/dist/commands/generate-components.js.map +1 -1
  26. package/dist/constants/fileNames.d.ts +68 -0
  27. package/dist/constants/fileNames.d.ts.map +1 -0
  28. package/dist/constants/fileNames.js +102 -0
  29. package/dist/constants/fileNames.js.map +1 -0
  30. package/dist/interfaces/AIClient.d.ts +198 -0
  31. package/dist/interfaces/AIClient.d.ts.map +1 -0
  32. package/dist/interfaces/AIClient.js +40 -0
  33. package/dist/interfaces/AIClient.js.map +1 -0
  34. package/dist/package.json +4 -3
  35. package/dist/types/index.d.ts +423 -0
  36. package/dist/types/index.d.ts.map +1 -1
  37. package/dist/utils/agentDefinitions.d.ts +60 -0
  38. package/dist/utils/agentDefinitions.d.ts.map +1 -0
  39. package/dist/utils/agentDefinitions.js +344 -0
  40. package/dist/utils/agentDefinitions.js.map +1 -0
  41. package/dist/utils/aiClientFactory.d.ts +93 -0
  42. package/dist/utils/aiClientFactory.d.ts.map +1 -0
  43. package/dist/utils/aiClientFactory.js +290 -0
  44. package/dist/utils/aiClientFactory.js.map +1 -0
  45. package/dist/utils/aiClientRouter.d.ts +121 -0
  46. package/dist/utils/aiClientRouter.d.ts.map +1 -0
  47. package/dist/utils/aiClientRouter.js +401 -0
  48. package/dist/utils/aiClientRouter.js.map +1 -0
  49. package/dist/utils/claudeAgentClient.d.ts +79 -11
  50. package/dist/utils/claudeAgentClient.d.ts.map +1 -1
  51. package/dist/utils/claudeAgentClient.js +306 -1
  52. package/dist/utils/claudeAgentClient.js.map +1 -1
  53. package/dist/utils/claudeClient.d.ts +7 -3
  54. package/dist/utils/claudeClient.d.ts.map +1 -1
  55. package/dist/utils/claudeClient.js +28 -5
  56. package/dist/utils/claudeClient.js.map +1 -1
  57. package/dist/utils/completeArchitectureEngine.d.ts +67 -0
  58. package/dist/utils/completeArchitectureEngine.d.ts.map +1 -0
  59. package/dist/utils/completeArchitectureEngine.js +329 -0
  60. package/dist/utils/completeArchitectureEngine.js.map +1 -0
  61. package/dist/utils/contextLoader.d.ts +1 -12
  62. package/dist/utils/contextLoader.d.ts.map +1 -1
  63. package/dist/utils/contextLoader.js +29 -150
  64. package/dist/utils/contextLoader.js.map +1 -1
  65. package/dist/utils/contextManager.d.ts +2 -12
  66. package/dist/utils/contextManager.d.ts.map +1 -1
  67. package/dist/utils/contextManager.js +11 -6
  68. package/dist/utils/contextManager.js.map +1 -1
  69. package/dist/utils/mcpTools.d.ts +164 -0
  70. package/dist/utils/mcpTools.d.ts.map +1 -0
  71. package/dist/utils/mcpTools.js +385 -0
  72. package/dist/utils/mcpTools.js.map +1 -0
  73. package/dist/utils/routeGenerator.d.ts +56 -0
  74. package/dist/utils/routeGenerator.d.ts.map +1 -0
  75. package/dist/utils/routeGenerator.js +231 -0
  76. package/dist/utils/routeGenerator.js.map +1 -0
  77. package/dist/utils/serverActionGenerator.d.ts +56 -0
  78. package/dist/utils/serverActionGenerator.d.ts.map +1 -0
  79. package/dist/utils/serverActionGenerator.js +258 -0
  80. package/dist/utils/serverActionGenerator.js.map +1 -0
  81. package/dist/utils/streamingHandler.d.ts +98 -0
  82. package/dist/utils/streamingHandler.d.ts.map +1 -0
  83. package/dist/utils/streamingHandler.js +259 -0
  84. package/dist/utils/streamingHandler.js.map +1 -0
  85. package/package.json +4 -3
package/README.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  **🧠 The AI That Actually Understands Your Project**
4
4
 
5
- AI-powered tool that generates production-ready React components through an advanced agent-driven workflow that deeply understands your project context.
5
+ AI-powered tool that generates production-ready full-stack applications through an advanced agent-driven workflow that deeply understands your project context.
6
+
7
+ [![npm version](https://badge.fury.io/js/mycontext-cli.svg)](https://www.npmjs.com/package/mycontext-cli)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+ [![Node Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org)
6
10
 
7
11
  ## Installation
8
12
 
@@ -14,7 +18,7 @@ pnpm add -g mycontext-cli
14
18
  yarn global add mycontext-cli
15
19
  ```
16
20
 
17
- ## Quick Start
21
+ ## Quick Start
18
22
 
19
23
  ```bash
20
24
  # Initialize a new project
@@ -24,44 +28,290 @@ mycontext init my-project
24
28
  echo 'MYCONTEXT_XAI_API_KEY=xai-xxx' > .mycontext/.env
25
29
 
26
30
  # Generate context files (A/B/C/D workflow)
27
- mycontext generate-context-files --description 'Modern todo app'
31
+ mycontext generate-context-files --description 'Modern e-commerce app'
28
32
 
29
33
  # Compile PRD from context files
30
34
  mycontext compile-prd
31
35
 
32
- # Generate components
33
- mycontext generate-components all --with-tests
36
+ # 🆕 Generate complete full-stack architecture (NEW!)
37
+ mycontext generate-components all --complete-architecture
38
+
39
+ # Or use build-app for complete workflow
40
+ mycontext build-app --description "E-commerce platform" --complete-architecture
34
41
  ```
35
42
 
36
- ## Features
43
+ ## Features
44
+
45
+ ### 🎯 Complete Architecture Generation (NEW!)
46
+
47
+ Generate production-ready full-stack applications with **a single command**:
48
+
49
+ - **🏗️ Server Actions** - Next.js server actions with validation, middleware, and caching
50
+ - **🛣️ App Router Routes** - Complete Next.js 15 App Router structure with layouts
51
+ - **📚 Self-Documenting Components** - Components with comprehensive inline documentation
52
+ - **📋 Architecture Plans** - Complete project architecture specification
53
+ - **🔒 Type-Safe Throughout** - Full TypeScript support across the stack
54
+
55
+ ### Core Features
37
56
 
38
57
  - **🤖 AI-Powered Generation**: Uses advanced AI models to understand your project context
39
- - **⚡ Fast Setup**: Initialize projects in seconds with Next.js, TypeScript, and Tailwind CSS
58
+ - **⚡ Fast Setup**: Initialize projects in seconds with Next.js 15, TypeScript, and Tailwind CSS
40
59
  - **🎨 Component Generation**: Create production-ready React components with Shadcn UI
41
60
  - **📋 Context-Aware**: Generates PRDs, types, and branding based on your project
42
- - **🧠 Interactive Strategy Planning**: AI-powered build strategy recommendations through guided questions
61
+ - **🧠 Interactive Strategy Planning**: AI-powered build strategy recommendations
43
62
  - **🎯 Smart Planning**: Get personalized development approach recommendations
44
63
  - **🔧 Developer-Friendly**: Built-in validation, testing, and preview capabilities
45
64
  - **🆓 Free Tier**: Use Qwen3 Coder model for free testing, or premium X.AI/Claude for production
46
65
 
47
- ### 🚀 **Claude Agent SDK Integration** (NEW!)
66
+ ### 🚀 Claude Agent SDK Integration (v2.0.0) 🆕
67
+
68
+ MyContext v2.0 features **complete Claude Agent SDK integration** with intelligent routing and specialized AI agents:
69
+
70
+ #### **8 Specialized AI Agents**
71
+
72
+ Each agent is pre-configured with specific expertise, tools, and system prompts:
73
+
74
+ 1. **🎨 Component Generator** - Production-ready React components
75
+ - Tools: `Read`, `Write`, `Glob`, `AnalyzeComponent`
76
+ - Expert in: Next.js 15, TypeScript, Shadcn UI, Tailwind CSS
77
+
78
+ 2. **🔍 Code Reviewer** - Quality analysis and best practices
79
+ - Tools: `Read`, `Grep`, `Glob`, `AnalyzeComponent`, `CheckTypes`
80
+ - Expert in: SOLID principles, performance, security, testing
81
+
82
+ 3. **📚 Documentation Writer** - Comprehensive docs generation
83
+ - Tools: `Read`, `Write`, `Glob`, `GenerateDocs`, `AnalyzeComponent`
84
+ - Expert in: API docs, component guides, architecture overviews
85
+
86
+ 4. **🧪 Testing Agent** - Unit and integration tests
87
+ - Tools: `Read`, `Write`, `Glob`, `AnalyzeComponent`
88
+ - Expert in: Jest, React Testing Library, E2E testing
89
+
90
+ 5. **🏗️ Architecture Designer** - System design and structure
91
+ - Tools: `Read`, `Glob`, `Grep`, `ValidatePRD`
92
+ - Expert in: Scalability, folder structure, data flow, API design
93
+
94
+ 6. **🔒 Security Auditor** - Vulnerability detection
95
+ - Tools: `Read`, `Grep`, `Glob`
96
+ - Expert in: XSS, CSRF, SQL injection, authentication, authorization
97
+
98
+ 7. **♻️ Refactoring Specialist** - Code quality improvements
99
+ - Tools: `Read`, `Write`, `Edit`, `AnalyzeComponent`
100
+ - Expert in: Clean code, design patterns, performance optimization
101
+
102
+ 8. **⚡ Performance Optimizer** - Speed and efficiency
103
+ - Tools: `Read`, `Glob`, `Grep`, `AnalyzeComponent`
104
+ - Expert in: React performance, Core Web Vitals, bundle optimization
105
+
106
+ #### **4 Custom MCP Tools**
107
+
108
+ 1. **AnalyzeComponent** - Deep component structure analysis
109
+ - Analyzes: Imports, hooks, props, TypeScript types, dependencies
110
+ - Returns: Detailed component report with insights
111
+
112
+ 2. **ValidatePRD** - PRD completeness checker
113
+ - Checks: Required sections, content length, code examples
114
+ - Returns: Quality score (0-100) with recommendations
115
+
116
+ 3. **CheckTypes** - TypeScript validation
117
+ - Validates: Type safety, `any` usage, prop types
118
+ - Returns: Type issues and suggestions
119
+
120
+ 4. **GenerateDocs** - Auto-documentation generator
121
+ - Generates: Component docs with props, usage, dependencies
122
+ - Returns: Markdown documentation
123
+
124
+ #### **Intelligent Routing**
125
+
126
+ MyContext automatically chooses between **Agent SDK** and **Direct API** based on operation complexity:
127
+
128
+ | Operation Type | Client Used | Why |
129
+ |----------------|-------------|-----|
130
+ | `build-app` | **Agent SDK** | Complex workflow + Tools + Streaming |
131
+ | `generate-components` | **Agent SDK** | File operations + Context management |
132
+ | `enhance <file>` | **Agent SDK** | Refactoring agent + File R/W |
133
+ | `agent-flow` | **Agent SDK** | Multi-step workflow orchestration |
134
+ | Simple text gen | **Direct API** | Fast, single-shot operations |
135
+
136
+ #### **Core Features**
137
+
138
+ - **🧠 Advanced Context Management**: Automatic compaction and intelligent memory
139
+ - **🔐 Fine-Grained Tool Permissions**: Granular control over AI capabilities
140
+ - **🔌 MCP Integration**: Model Context Protocol for custom tools
141
+ - **⚡ Enhanced Workflows**: Intelligent agent coordination with error handling
142
+ - **🎯 Smart Fallbacks**: Seamless fallback to standard clients
143
+ - **📊 Real-Time Progress**: Streaming updates with token tracking
144
+ - **🪝 Hook System**: Lifecycle events (PreToolUse, PostToolUse, SessionStart)
145
+ - **📈 Performance Tracking**: Operation statistics and metrics
146
+
147
+ #### **Usage Examples**
148
+
149
+ ```bash
150
+ # Use specific agent
151
+ mycontext enhance Button.tsx --prompt "Add dark mode support"
152
+ # → Uses Refactoring Agent automatically
153
+
154
+ # Component generation with analysis
155
+ mycontext generate-components ProductCard
156
+ # → Uses Component Generator + AnalyzeComponent tool
157
+
158
+ # Security audit
159
+ mycontext audit auth/ --agent security
160
+ # → Uses Security Agent with Read/Grep tools
161
+
162
+ # Generate tests
163
+ mycontext generate test LoginForm.tsx --agent testing
164
+ # → Uses Testing Agent with component analysis
165
+ ```
166
+
167
+ #### **How It Works**
168
+
169
+ ```typescript
170
+ // MyContext analyzes your operation
171
+ const operation = {
172
+ type: 'enhance',
173
+ target: 'Button.tsx',
174
+ complexity: 'moderate',
175
+ requiresTools: true, // Needs Read/Write
176
+ requiresStreaming: false
177
+ };
178
+
179
+ // Router intelligently selects client
180
+ if (complexity === 'complex' || requiresTools) {
181
+ → Use Agent SDK with appropriate agent
182
+ } else {
183
+ → Use Direct API for speed
184
+ }
185
+
186
+ // Agent SDK handles the rest
187
+ - Loads refactoring agent
188
+ - Grants Read/Write/Edit permissions
189
+ - Streams progress in real-time
190
+ - Validates output with CheckTypes
191
+ - Returns enhanced component
192
+ ```
48
193
 
49
- - **🧠 Advanced Context Management**: Automatic context compaction and intelligent memory management
50
- - **🔐 Fine-Grained Tool Permissions**: Granular control over AI capabilities with strict/permissive modes
51
- - **🔌 MCP Integration**: Model Context Protocol support for external tools and services
52
- - **⚡ Enhanced Workflows**: Intelligent agent coordination with automatic error handling and retry logic
53
- - **🎯 Smart Fallbacks**: Seamless fallback to standard clients when Agent SDK isn't available
54
- - **📊 Context Analytics**: Detailed context statistics and compression ratios
55
- - **🛡️ Security Controls**: File size limits, directory restrictions, and tool validation
194
+ ## 🎯 Complete Architecture Generation
56
195
 
57
- ## Commands
196
+ ### What Gets Generated
197
+
198
+ When using `--complete-architecture`, MyContext generates a **production-ready full-stack application**:
199
+
200
+ ```
201
+ project/
202
+ ├── .mycontext/
203
+ │ └── architecture-plan.json # Complete architecture specification
204
+ ├── components/
205
+ │ └── .mycontext/
206
+ │ ├── ProductCatalog/
207
+ │ │ └── ProductCatalog.tsx # Self-documenting components
208
+ │ ├── ProductGrid/
209
+ │ └── ProductCard/
210
+ ├── actions/
211
+ │ ├── productCatalogActions.ts # Server actions with validation
212
+ │ ├── productGridActions.ts
213
+ │ └── productCardActions.ts
214
+ └── app/
215
+ ├── page.tsx # Next.js 15 App Router
216
+ ├── layout.tsx
217
+ ├── products/
218
+ │ ├── page.tsx
219
+ │ ├── layout.tsx
220
+ │ ├── new/
221
+ │ │ └── page.tsx # Create forms
222
+ │ └── [id]/
223
+ │ ├── page.tsx # Dynamic routes
224
+ │ └── edit/
225
+ │ └── page.tsx # Edit forms
226
+ ```
227
+
228
+ ### Usage
229
+
230
+ ```bash
231
+ # Generate complete architecture with specific type
232
+ mycontext generate-components all --complete-architecture --architecture-type nextjs-app-router
233
+
234
+ # Only generate server actions
235
+ mycontext generate-components all --server-actions
236
+
237
+ # Only generate routes
238
+ mycontext generate-components all --routes
239
+
240
+ # Use build-app for complete workflow with interactive prompts
241
+ mycontext build-app --description "E-commerce platform" --interactive --complete-architecture
242
+ ```
243
+
244
+ ### Architecture Types
245
+
246
+ - **nextjs-app-router** (default) - Next.js 15 App Router with React Server Components
247
+ - **nextjs-pages** - Next.js Pages Router for compatibility
248
+ - **react-spa** - React Single Page Application
249
+
250
+ ### Self-Documenting Components
251
+
252
+ Every generated component includes comprehensive documentation:
253
+
254
+ ```typescript
255
+ /**
256
+ * Component: ProductCard
257
+ * Level: 3 (Atomic Component)
258
+ * Type: display
259
+ *
260
+ * Dependencies:
261
+ * - ProductGrid (parent)
262
+ * - ProductCatalog (ancestor)
263
+ *
264
+ * Server Actions:
265
+ * - getProduct: Fetch single product by ID
266
+ *
267
+ * Purpose: Display individual product information in a card format
268
+ *
269
+ * User Expectations:
270
+ * - Users expect clear product images, titles, and prices
271
+ * - Users expect to be able to click to view product details
272
+ * - Users expect loading states while data fetches
273
+ *
274
+ * Data Flow:
275
+ * ProductGrid → ProductCard (product data)
276
+ * ProductCard → getProduct (server action)
277
+ * getProduct → Database.products (Product)
278
+ */
279
+ export function ProductCard({ product }: ProductCardProps) {
280
+ // Component implementation
281
+ }
282
+ ```
283
+
284
+ ## 📚 Commands
58
285
 
59
286
  ### Project Setup
60
287
 
61
288
  ```bash
62
289
  mycontext init <project-name> # Initialize new project
290
+ mycontext init . --analyze # Analyze existing project
63
291
  mycontext setup # Configure AI providers
64
- mycontext analyze # Analyze existing project
292
+ ```
293
+
294
+ ### 🆕 Complete App Building (Enhanced)
295
+
296
+ ```bash
297
+ # Basic build
298
+ mycontext build-app --description "E-commerce platform"
299
+
300
+ # 🆕 Complete architecture build (NEW!)
301
+ mycontext build-app --description "E-commerce platform" --complete-architecture
302
+
303
+ # 🆕 Interactive mode with prompts (NEW!)
304
+ mycontext build-app --description "E-commerce platform" --interactive
305
+
306
+ # 🆕 Specific architecture type (NEW!)
307
+ mycontext build-app --description "Blog" --complete-architecture --architecture-type nextjs-pages
308
+
309
+ # Options:
310
+ # --complete-architecture Generate with actions, routes, full docs
311
+ # --architecture-type nextjs-app-router | nextjs-pages | react-spa
312
+ # --server-actions Generate server actions (default: true)
313
+ # --routes Generate Next.js routes (default: true)
314
+ # --interactive Interactive mode with guided prompts
65
315
  ```
66
316
 
67
317
  ### Context Generation
@@ -74,10 +324,25 @@ mycontext generate components-list # Generate component list
74
324
  mycontext compile-prd # Compile PRD from context files
75
325
  ```
76
326
 
77
- ### Component Development
327
+ ### 🆕 Component Development (Enhanced)
78
328
 
79
329
  ```bash
80
- mycontext generate-components <target> # Generate React components
330
+ # Basic component generation
331
+ mycontext generate-components <target>
332
+
333
+ # 🆕 Complete architecture generation (NEW!)
334
+ mycontext generate-components all --complete-architecture
335
+
336
+ # 🆕 With specific architecture type (NEW!)
337
+ mycontext generate-components all --complete-architecture --architecture-type nextjs-app-router
338
+
339
+ # 🆕 Only server actions (NEW!)
340
+ mycontext generate-components all --server-actions
341
+
342
+ # 🆕 Only routes (NEW!)
343
+ mycontext generate-components all --routes
344
+
345
+ # Other commands
81
346
  mycontext enhance <component> # Enhance existing components
82
347
  mycontext refine <component> # Refine components with AI
83
348
  mycontext preview <type> # Preview components or brand
@@ -96,25 +361,18 @@ mycontext promote # Promote components to production
96
361
 
97
362
  ```bash
98
363
  mycontext build-strategy # Interactive strategy selection
99
- mycontext build-strategy --recommend # Get AI-powered strategy recommendations
100
- mycontext build-strategy --plan # Generate detailed build plan
101
- mycontext build-strategy --tasks # Generate task list for current phase
102
- mycontext build-strategy --compare # Compare all available strategies
103
- mycontext build-strategy --context # Show loaded project context
104
- mycontext build-strategy --list # List all saved strategy files
364
+ mycontext build-strategy --recommend # Get AI-powered strategy recommendations
365
+ mycontext build-strategy --plan # Generate detailed build plan
366
+ mycontext build-strategy --tasks # Generate task list for current phase
367
+ mycontext build-strategy --compare # Compare all available strategies
368
+ mycontext build-strategy --context # Show loaded project context
369
+ mycontext build-strategy --list # List all saved strategy files
105
370
  mycontext build-strategy --load <type> # Load saved strategy data
106
371
  ```
107
372
 
108
- ## Build Strategy Planning
109
-
110
- MyContext's **AI-Powered Build Strategy** feature helps you choose the right development approach for your project through interactive questions and AI-generated recommendations.
111
-
112
- ### How It Works
373
+ ## 🎯 Build Strategy Planning
113
374
 
114
- 1. **Interactive Questions**: Asks about your project type, complexity, timeline, and team size
115
- 2. **AI Processing**: Uses AI to analyze your answers and project context
116
- 3. **Strategic Recommendations**: Generates personalized development strategies
117
- 4. **Strategy Comparison**: Shows different approaches with pros/cons and timelines
375
+ MyContext's **AI-Powered Build Strategy** feature helps you choose the right development approach through interactive questions and AI-generated recommendations.
118
376
 
119
377
  ### Available Strategies
120
378
 
@@ -124,16 +382,6 @@ MyContext's **AI-Powered Build Strategy** feature helps you choose the right dev
124
382
  - **🔄 Iterative Scaffolding**: Small chunks everywhere, refine later
125
383
  - **⚡ Hybrid Approach**: Combines multiple strategies based on project needs
126
384
 
127
- ### Interactive Strategy Selection
128
-
129
- The system provides:
130
-
131
- - **Project Type Selection**: Choose from client work, personal projects, team development, etc.
132
- - **Complexity Assessment**: Simple, medium, or complex application classification
133
- - **Timeline Planning**: Urgent, moderate, or flexible development timelines
134
- - **Team Size Consideration**: Solo developer, small team, or large team approaches
135
- - **AI Recommendations**: Personalized strategy suggestions based on your answers
136
-
137
385
  ### Example Workflow
138
386
 
139
387
  ```bash
@@ -158,11 +406,6 @@ $ mycontext build-strategy --recommend
158
406
  Moderate (balanced approach)
159
407
  Flexible (quality over speed)
160
408
 
161
- ? What's your team size?
162
- ❯ Solo developer
163
- Small team (2-5 people)
164
- Large team (6+ people)
165
-
166
409
  ✅ Recommended Strategies:
167
410
 
168
411
  🎯 Vertical Slice
@@ -173,52 +416,10 @@ $ mycontext build-strategy --recommend
173
416
  💡 Reasoning:
174
417
  Vertical slice approach recommended for balanced development with quick user value
175
418
 
176
- 💾 Saved to: /path/to/project/.mycontext/build-strategy-recommendations-2025-09-23.json
419
+ 💾 Saved to: .mycontext/build-strategy-recommendations-2025-10-02.json
177
420
  ```
178
421
 
179
- ### Strategy Data Management
180
-
181
- All generated strategies are automatically saved as JSON files in `.mycontext/` for easy access and project tracking:
182
-
183
- ```bash
184
- # List all saved strategy files
185
- mycontext build-strategy --list
186
-
187
- # Load specific strategy data
188
- mycontext build-strategy --load recommendations
189
- mycontext build-strategy --load plan
190
- mycontext build-strategy --load tasks
191
- mycontext build-strategy --load comparison
192
- ```
193
-
194
- **File Structure:**
195
-
196
- ```
197
- .mycontext/
198
- ├── build-strategy-recommendations-2025-09-23.json
199
- ├── build-strategy-plan-2025-09-23.json
200
- ├── build-strategy-tasks-2025-09-23.json
201
- └── build-strategy-comparison-2025-09-23.json
202
- ```
203
-
204
- **File Format:**
205
-
206
- Each saved strategy file contains:
207
-
208
- ```json
209
- {
210
- "type": "recommendations",
211
- "generatedAt": "2025-09-23T11:05:52.000Z",
212
- "projectPath": "/path/to/project",
213
- "data": {
214
- "recommended": [...],
215
- "reasoning": "...",
216
- "alternatives": [...]
217
- }
218
- }
219
- ```
220
-
221
- ## Configuration
422
+ ## ⚙️ Configuration
222
423
 
223
424
  ### AI Providers
224
425
 
@@ -226,45 +427,38 @@ MyContext supports multiple AI providers with intelligent fallback:
226
427
 
227
428
  #### **Recommended (Premium)**
228
429
 
229
- 1. **🚀 Claude Agent SDK - Best for Advanced Workflows** (NEW!)
230
-
430
+ 1. **🚀 Claude Agent SDK** (NEW!)
231
431
  ```bash
232
432
  echo 'MYCONTEXT_CLAUDE_API_KEY=sk-ant-xxx' > .mycontext/.env
233
433
  ```
234
-
235
- **Features:**
236
434
  - Advanced context management and compaction
237
435
  - Fine-grained tool permissions
238
- - MCP (Model Context Protocol) integration
239
- - Intelligent agent coordination
240
- - Automatic error handling and retry logic
436
+ - MCP integration
437
+ - Best for complex workflows
241
438
 
242
439
  2. **X.AI (Grok) - Best for Code Generation**
243
-
244
440
  ```bash
245
441
  echo 'MYCONTEXT_XAI_API_KEY=xai-xxx' > .mycontext/.env
246
442
  ```
247
443
 
248
- 3. **Claude (Anthropic) - Best for Complex Reasoning**
249
-
444
+ 3. **Claude (Anthropic)**
250
445
  ```bash
251
446
  echo 'MYCONTEXT_CLAUDE_API_KEY=sk-ant-xxx' > .mycontext/.env
252
447
  ```
253
448
 
254
- 4. **OpenAI (GPT-4) - Most Versatile**
449
+ 4. **OpenAI (GPT-4)**
255
450
  ```bash
256
451
  echo 'MYCONTEXT_OPENAI_API_KEY=sk-xxx' > .mycontext/.env
257
452
  ```
258
453
 
259
- #### **Testing & Fallback**
454
+ #### **Testing & Free Tier**
260
455
 
261
456
  5. **Qwen3 Coder (FREE)**
262
-
263
457
  ```bash
264
458
  echo 'MYCONTEXT_QWEN_API_KEY=sk-or-xxx' > .mycontext/.env
265
459
  ```
266
460
 
267
- 6. **GitHub Models (Self-hosted)**
461
+ 6. **GitHub Models**
268
462
  ```bash
269
463
  echo 'MYCONTEXT_GITHUB_TOKEN=ghp_xxx' > .mycontext/.env
270
464
  ```
@@ -273,143 +467,171 @@ MyContext supports multiple AI providers with intelligent fallback:
273
467
 
274
468
  ```
275
469
  my-project/
276
- ├── .mycontext/ # MyContext configuration
277
- │ ├── 01-prd.md # Product Requirements Document
278
- │ ├── 02-types.ts # TypeScript types
279
- │ ├── 03-branding.md # Branding guidelines
280
- └── .env # Environment variables
281
- ├── components/ # Generated components
470
+ ├── .mycontext/ # MyContext configuration
471
+ │ ├── 01a-features.md # Feature specifications
472
+ │ ├── 01b-user-flows.md # User flow documentation
473
+ │ ├── 01c-edge-cases.md # Edge case scenarios
474
+ ├── 01d-technical-specs.md # Technical requirements
475
+ ├── 02-prd.md # Compiled PRD
476
+ │ ├── 02-types.ts # TypeScript types
477
+ │ ├── 03-branding.md # Branding guidelines
478
+ │ ├── 04-component-list.json # Component hierarchy
479
+ │ ├── architecture-plan.json # 🆕 Complete architecture spec
480
+ │ └── .env # Environment variables
481
+ ├── components/ # Generated components
482
+ │ └── .mycontext/ # MyContext-generated components
483
+ ├── actions/ # 🆕 Server actions
484
+ ├── app/ # 🆕 Next.js App Router
282
485
  └── package.json
283
486
  ```
284
487
 
285
- ## Examples
488
+ ## 🚀 Examples
286
489
 
287
- ### Create a Todo App
490
+ ### Create Complete E-commerce App
288
491
 
289
492
  ```bash
290
- mycontext init todo-app --description "A modern todo application with dark mode"
291
- cd todo-app
292
- mycontext generate-context-files
293
- mycontext compile-prd
294
- mycontext generate-components all --with-tests
493
+ # Initialize project
494
+ mycontext init ecommerce-app
495
+
496
+ # Set up AI provider
497
+ echo 'MYCONTEXT_XAI_API_KEY=xai-xxx' > ecommerce-app/.mycontext/.env
498
+ cd ecommerce-app
499
+
500
+ # 🆕 Generate complete architecture (NEW!)
501
+ mycontext build-app --description "E-commerce platform with products, cart, and checkout" --complete-architecture
502
+
503
+ # Start development
504
+ npm run dev
295
505
  ```
296
506
 
507
+ **Result**: Production-ready e-commerce app with:
508
+ - Product catalog with server actions
509
+ - Shopping cart functionality
510
+ - Checkout flow with forms
511
+ - Complete Next.js App Router structure
512
+ - Self-documenting components
513
+
297
514
  ### Work with Existing Project
298
515
 
299
516
  ```bash
300
517
  mycontext init . --analyze
301
518
  mycontext generate-context-files
302
- mycontext generate-components authentication
519
+ mycontext generate-components all --complete-architecture
303
520
  ```
304
521
 
305
- ### Build Complete App
522
+ ### Build Todo App with Architecture
306
523
 
307
524
  ```bash
308
- mycontext build-app --description "E-commerce platform" --interactive
525
+ mycontext init todo-app --description "Modern todo application"
526
+ cd todo-app
527
+ mycontext generate-context-files
528
+ mycontext compile-prd
529
+ mycontext generate-components all --complete-architecture --with-tests
309
530
  ```
310
531
 
311
- ### Plan Your Development Strategy
532
+ ## 📊 What Makes MyContext Different?
312
533
 
313
- ```bash
314
- # Get AI-powered strategy recommendations
315
- mycontext build-strategy --recommend
316
-
317
- # Generate detailed build plan
318
- mycontext build-strategy --plan --strategy vertical-slice
319
-
320
- # Get task list for current phase
321
- mycontext build-strategy --tasks --strategy foundation-first --phase 1
534
+ ### Traditional Approach
535
+ ```
536
+ Time: 8-12 hours
537
+ - Manual server action creation: 2-4 hours
538
+ - Manual route setup: 1-2 hours
539
+ - Manual documentation: 1-2 hours
540
+ - Manual testing setup: 2-3 hours
541
+ - Manual integration: 1-2 hours
542
+ ```
322
543
 
323
- # Compare all strategies
324
- mycontext build-strategy --compare
544
+ ### MyContext Approach
545
+ ```
546
+ Time: 2-3 hours
547
+ - Generate complete architecture: 15 minutes
548
+ - Review and customize: 1-2 hours
549
+ - Ready for production ✅
325
550
 
326
- # Show project context analysis
327
- mycontext build-strategy --context
551
+ Savings: 6-10 hours (60-75% reduction)
328
552
  ```
329
553
 
330
- ## 🚀 **Claude Agent SDK Features**
554
+ ### Key Advantages
555
+
556
+ ✅ **Production-Ready** - Server actions, routes, validation built-in
557
+ ✅ **Self-Documenting** - Components explain themselves
558
+ ✅ **Type-Safe** - Full TypeScript throughout
559
+ ✅ **Best Practices** - Auth, caching, error handling
560
+ ✅ **Scalable** - Proper architecture from start
331
561
 
332
- ### **Advanced Context Management**
562
+ ## 🔧 Advanced Features
333
563
 
334
- The Claude Agent SDK provides intelligent context management with automatic compaction:
564
+ ### Claude Agent SDK
335
565
 
336
566
  ```bash
337
- # Context is automatically managed and compacted when it exceeds limits
567
+ # Automatic context management
338
568
  mycontext build-app --description "Complex enterprise application"
339
- ```
340
-
341
- **Features:**
342
569
 
343
- - **Automatic Compaction**: Context is compressed when it exceeds size limits
344
- - **Smart Preservation**: Recent outputs and important data are preserved
345
- - **Context Analytics**: Detailed statistics on context size and compression ratios
346
- - **Memory Management**: Persistent context storage across sessions
347
-
348
- ### **Fine-Grained Tool Permissions**
349
-
350
- Control exactly what the AI can do with granular permissions:
570
+ # MCP integration
571
+ mycontext setup-mcp --provider instantdb
351
572
 
352
- ```bash
353
- # Tool permissions are automatically configured based on your project needs
573
+ # Fine-grained permissions
354
574
  mycontext setup
355
575
  ```
356
576
 
357
- **Permission Modes:**
358
-
359
- - **Strict**: Deny by default, require explicit permission
360
- - **Permissive**: Allow by default, block specific tools
361
- - **Custom**: Fine-grained control over individual tools
362
-
363
- **Security Features:**
364
-
365
- - File size limits and type restrictions
366
- - Directory access controls
367
- - API call rate limiting
368
- - Tool validation and restrictions
369
-
370
- ### **MCP (Model Context Protocol) Integration**
371
-
372
- Connect to external tools and services through MCP:
577
+ ### InstantDB Integration
373
578
 
374
579
  ```bash
375
- # Set up MCP integration
376
- mycontext setup-mcp --provider instantdb
377
- ```
378
-
379
- **Supported Providers:**
580
+ # Set up InstantDB with MCP
581
+ mycontext setup-instantdb
380
582
 
381
- - **InstantDB**: Real-time database integration
382
- - **GitHub**: Repository and issue management
383
- - **Custom**: Your own MCP servers
384
-
385
- ### **Enhanced Workflows**
386
-
387
- Intelligent agent coordination with automatic error handling:
388
-
389
- ```bash
390
- # Enhanced workflows automatically use Claude Agent SDK when available
391
- mycontext build-app --interactive
583
+ # Default for all MyContext apps
392
584
  ```
393
585
 
394
- **Workflow Features:**
586
+ ## 📖 Documentation
395
587
 
396
- - **Smart Fallbacks**: Seamless fallback to standard clients
397
- - **Error Recovery**: Automatic retry logic with exponential backoff
398
- - **Context Awareness**: Each step builds on previous context
399
- - **Progress Tracking**: Detailed progress reporting and analytics
588
+ - [Full Documentation](https://docs.mycontext.fbien.com)
589
+ - [API Reference](https://docs.mycontext.fbien.com/api)
590
+ - [Examples](https://docs.mycontext.fbien.com/examples)
591
+ - [Complete Architecture Guide](https://docs.mycontext.fbien.com/complete-architecture)
400
592
 
401
- ## Documentation
593
+ ## 🤝 Support
402
594
 
403
- - [Full Documentation](https://mycontext.fbien.com/docs)
404
- - [API Reference](https://mycontext.fbien.com/docs/api)
405
- - [Examples](https://mycontext.fbien.com/docs/examples)
595
+ - [GitHub Issues](https://github.com/farajabien/mycontext/issues)
596
+ - [Discord Community](https://discord.gg/mycontext)
597
+ - [Documentation](https://docs.mycontext.fbien.com)
598
+
599
+ ## 🎯 Roadmap
600
+
601
+ ### Current (v2.0.0) 🆕
602
+ - ✅ **Complete Claude Agent SDK Integration**
603
+ - ✅ 8 Specialized AI agents (Code Review, Testing, Security, etc.)
604
+ - ✅ 4 Custom MCP tools (Component Analysis, PRD Validation, etc.)
605
+ - ✅ Intelligent routing (Agent SDK vs Direct API)
606
+ - ✅ Streaming progress with real-time feedback
607
+ - ✅ Hook system for lifecycle events
608
+ - ✅ Fine-grained tool permissions
609
+ - ✅ Setting sources for reproducible builds
610
+ - ✅ Complete architecture generation
611
+ - ✅ Server actions with validation
612
+ - ✅ Next.js App Router routes
613
+ - ✅ Self-documenting components
614
+
615
+ ### Upcoming (v2.1.0)
616
+ - 🔄 Database schema generation (Prisma/Drizzle)
617
+ - 🔄 API documentation (OpenAPI/Swagger)
618
+ - 🔄 E2E test generation (Playwright/Cypress)
619
+ - 🔄 Deployment configuration (Docker, CI/CD)
620
+ - 🔄 More specialized agents (Database, API, DevOps)
621
+
622
+ ### Future
623
+ - GraphQL resolver generation
624
+ - tRPC procedure generation
625
+ - WebSocket/real-time actions
626
+ - Monitoring & logging setup
627
+ - Multi-agent collaboration workflows
628
+
629
+ ## 📄 License
406
630
 
407
- ## Support
631
+ MIT © MyContext
408
632
 
409
- - [GitHub Issues](https://github.com/mycontext/cli/issues)
410
- - [Discord Community](https://discord.gg/mycontext)
411
- - [Documentation](https://mycontext.fbien.com/docs)
633
+ ---
412
634
 
413
- ## License
635
+ **Made with ❤️ by the MyContext team**
414
636
 
415
- MIT © MyContext
637
+ [⭐ Star us on GitHub](https://github.com/farajabien/mycontext) | [📖 Read the Docs](https://docs.mycontext.fbien.com) | [🐦 Follow on Twitter](https://twitter.com/mycontext)