mycontext-cli 1.0.80 → 1.0.82
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/README.md +123 -0
- package/dist/agents/implementations/BuildStrategyAgent.d.ts +99 -0
- package/dist/agents/implementations/BuildStrategyAgent.d.ts.map +1 -0
- package/dist/agents/implementations/BuildStrategyAgent.js +554 -0
- package/dist/agents/implementations/BuildStrategyAgent.js.map +1 -0
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/build-strategy.d.ts +3 -0
- package/dist/commands/build-strategy.d.ts.map +1 -0
- package/dist/commands/build-strategy.js +358 -0
- package/dist/commands/build-strategy.js.map +1 -0
- package/dist/config/build-strategies.json +496 -0
- package/dist/utils/buildStrategyManager.d.ts +95 -0
- package/dist/utils/buildStrategyManager.d.ts.map +1 -0
- package/dist/utils/buildStrategyManager.js +613 -0
- package/dist/utils/buildStrategyManager.js.map +1 -0
- package/dist/utils/contextLoader.d.ts +3 -0
- package/dist/utils/contextLoader.d.ts.map +1 -1
- package/dist/utils/contextLoader.js +49 -0
- package/dist/utils/contextLoader.js.map +1 -1
- package/dist/utils/envExampleGenerator.d.ts.map +1 -1
- package/dist/utils/envExampleGenerator.js +211 -4
- package/dist/utils/envExampleGenerator.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ mycontext generate-components all --with-tests
|
|
|
39
39
|
- **⚡ Fast Setup**: Initialize projects in seconds with Next.js, TypeScript, and Tailwind CSS
|
|
40
40
|
- **🎨 Component Generation**: Create production-ready React components with Shadcn UI
|
|
41
41
|
- **📋 Context-Aware**: Generates PRDs, types, and branding based on your project
|
|
42
|
+
- **🧠 LLM-Powered Strategy**: AI generates 100% accurate, project-specific build strategies
|
|
43
|
+
- **🎯 Smart Planning**: Get personalized recommendations for development approach
|
|
42
44
|
- **🔧 Developer-Friendly**: Built-in validation, testing, and preview capabilities
|
|
43
45
|
- **🆓 Free Tier**: Use Qwen3 Coder model for free testing, or premium X.AI/Claude for production
|
|
44
46
|
|
|
@@ -80,6 +82,108 @@ mycontext list [type] # List components, projects, or files
|
|
|
80
82
|
mycontext promote # Promote components to production
|
|
81
83
|
```
|
|
82
84
|
|
|
85
|
+
### Build Strategy Planning
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
mycontext build-strategy # Interactive strategy selection
|
|
89
|
+
mycontext build-strategy --recommend # Get AI-powered strategy recommendations
|
|
90
|
+
mycontext build-strategy --plan # Generate detailed build plan
|
|
91
|
+
mycontext build-strategy --tasks # Generate task list for current phase
|
|
92
|
+
mycontext build-strategy --compare # Compare all available strategies
|
|
93
|
+
mycontext build-strategy --context # Show loaded project context
|
|
94
|
+
mycontext build-strategy --list # List all saved strategy files
|
|
95
|
+
mycontext build-strategy --load <type> # Load saved strategy data
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Build Strategy Planning
|
|
99
|
+
|
|
100
|
+
MyContext's **AI-Powered Build Strategy** feature analyzes your project context and generates 100% accurate, project-specific development plans.
|
|
101
|
+
|
|
102
|
+
### How It Works
|
|
103
|
+
|
|
104
|
+
1. **Context Analysis**: Reads all your `.mycontext` files (PRD, components, user flows, technical specs)
|
|
105
|
+
2. **AI Processing**: Uses AI to understand your project's unique characteristics and complexity
|
|
106
|
+
3. **Strategic Insights**: Generates project-specific recommendations and build plans
|
|
107
|
+
4. **Custom Strategies**: Creates build strategies tailored to your exact project type and requirements
|
|
108
|
+
|
|
109
|
+
### Available Strategies
|
|
110
|
+
|
|
111
|
+
- **🏗️ Foundation First**: Build core infrastructure first (auth, DB, architecture)
|
|
112
|
+
- **🎯 Vertical Slice**: Build complete user journeys end-to-end
|
|
113
|
+
- **📊 Horizontal Slice**: Build feature by feature across the app
|
|
114
|
+
- **🔄 Iterative Scaffolding**: Small chunks everywhere, refine later
|
|
115
|
+
- **⚡ Hybrid Approach**: Combines multiple strategies based on project needs
|
|
116
|
+
|
|
117
|
+
### AI-Powered Analysis
|
|
118
|
+
|
|
119
|
+
The system provides:
|
|
120
|
+
|
|
121
|
+
- **Project Complexity Assessment**: Understand your project's technical complexity
|
|
122
|
+
- **Risk Factor Analysis**: Identify potential challenges and bottlenecks
|
|
123
|
+
- **Success Factor Identification**: Key elements for project success
|
|
124
|
+
- **Custom Recommendations**: Specific advice for your project
|
|
125
|
+
- **Optimal Strategy Selection**: AI-recommended approach with detailed reasoning
|
|
126
|
+
|
|
127
|
+
### Example Output
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
🎯 Getting AI-Powered Strategy Recommendations
|
|
131
|
+
|
|
132
|
+
✅ Recommended Strategies:
|
|
133
|
+
|
|
134
|
+
🎯 Vertical Slice
|
|
135
|
+
Build complete user journeys end-to-end
|
|
136
|
+
Time to first demo: 2-3 weeks
|
|
137
|
+
Complexity: medium
|
|
138
|
+
|
|
139
|
+
💡 Reasoning:
|
|
140
|
+
Vertical slice approach recommended for balanced development with quick user value
|
|
141
|
+
|
|
142
|
+
💾 Saved to: /path/to/project/.mycontext/build-strategy-recommendations-2024-01-15.json
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Strategy Data Management
|
|
146
|
+
|
|
147
|
+
All generated strategies are automatically saved as JSON files in `.mycontext/` for easy access and project tracking:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# List all saved strategy files
|
|
151
|
+
mycontext build-strategy --list
|
|
152
|
+
|
|
153
|
+
# Load specific strategy data
|
|
154
|
+
mycontext build-strategy --load recommendations
|
|
155
|
+
mycontext build-strategy --load plan
|
|
156
|
+
mycontext build-strategy --load tasks
|
|
157
|
+
mycontext build-strategy --load comparison
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**File Structure:**
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
.mycontext/
|
|
164
|
+
├── build-strategy-recommendations-2024-01-15.json
|
|
165
|
+
├── build-strategy-plan-2024-01-15.json
|
|
166
|
+
├── build-strategy-tasks-2024-01-15.json
|
|
167
|
+
└── build-strategy-comparison-2024-01-15.json
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**TypeScript Integration:**
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
import { BuildStrategyManager } from "./buildStrategyManager";
|
|
174
|
+
|
|
175
|
+
const manager = new BuildStrategyManager();
|
|
176
|
+
|
|
177
|
+
// Load latest recommendations
|
|
178
|
+
const recommendations = await manager.loadStrategyData("recommendations");
|
|
179
|
+
|
|
180
|
+
// Load specific date
|
|
181
|
+
const plan = await manager.loadStrategyData("plan", "2024-01-15");
|
|
182
|
+
|
|
183
|
+
// List all available files
|
|
184
|
+
const files = await manager.listStrategyFiles();
|
|
185
|
+
```
|
|
186
|
+
|
|
83
187
|
## Configuration
|
|
84
188
|
|
|
85
189
|
### AI Providers
|
|
@@ -156,6 +260,25 @@ mycontext generate-components authentication
|
|
|
156
260
|
mycontext build-app --description "E-commerce platform" --interactive
|
|
157
261
|
```
|
|
158
262
|
|
|
263
|
+
### Plan Your Development Strategy
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# Get AI-powered strategy recommendations
|
|
267
|
+
mycontext build-strategy --recommend
|
|
268
|
+
|
|
269
|
+
# Generate detailed build plan
|
|
270
|
+
mycontext build-strategy --plan --strategy vertical-slice
|
|
271
|
+
|
|
272
|
+
# Get task list for current phase
|
|
273
|
+
mycontext build-strategy --tasks --strategy foundation-first --phase 1
|
|
274
|
+
|
|
275
|
+
# Compare all strategies
|
|
276
|
+
mycontext build-strategy --compare
|
|
277
|
+
|
|
278
|
+
# Show project context analysis
|
|
279
|
+
mycontext build-strategy --context
|
|
280
|
+
```
|
|
281
|
+
|
|
159
282
|
## Documentation
|
|
160
283
|
|
|
161
284
|
- [Full Documentation](https://mycontext.fbien.com/docs)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { SubAgent } from "../interfaces/SubAgent";
|
|
2
|
+
export interface BuildStrategyInput {
|
|
3
|
+
projectPath: string;
|
|
4
|
+
strategyType?: "recommend" | "plan" | "tasks" | "compare";
|
|
5
|
+
specificStrategy?: string;
|
|
6
|
+
phaseNumber?: number;
|
|
7
|
+
userPreferences?: {
|
|
8
|
+
projectType: "client" | "personal" | "team" | "mvp" | "enterprise";
|
|
9
|
+
complexity: "simple" | "medium" | "complex";
|
|
10
|
+
userRoles: "single" | "multiple";
|
|
11
|
+
timeline: "urgent" | "moderate" | "flexible";
|
|
12
|
+
teamSize: "solo" | "small" | "large";
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface BuildStrategyOutput {
|
|
16
|
+
strategy: {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
complexity: "low" | "medium" | "high";
|
|
22
|
+
timeToFirstDemo: string;
|
|
23
|
+
bestFor: string[];
|
|
24
|
+
pros: string[];
|
|
25
|
+
cons: string[];
|
|
26
|
+
phases: BuildPhase[];
|
|
27
|
+
};
|
|
28
|
+
recommendations?: {
|
|
29
|
+
recommended: any[];
|
|
30
|
+
reasoning: string;
|
|
31
|
+
alternatives: any[];
|
|
32
|
+
};
|
|
33
|
+
plan?: {
|
|
34
|
+
strategy: any;
|
|
35
|
+
plan: any[];
|
|
36
|
+
totalDuration: string;
|
|
37
|
+
milestones: string[];
|
|
38
|
+
};
|
|
39
|
+
taskList?: {
|
|
40
|
+
phase: BuildPhase;
|
|
41
|
+
tasks: TaskDetail[];
|
|
42
|
+
};
|
|
43
|
+
contextAnalysis: {
|
|
44
|
+
projectName: string;
|
|
45
|
+
description: string;
|
|
46
|
+
components: string[];
|
|
47
|
+
userRoles: string[];
|
|
48
|
+
techStack: string[];
|
|
49
|
+
contextCompleteness: number;
|
|
50
|
+
accuracyLevel: "excellent" | "good" | "limited";
|
|
51
|
+
};
|
|
52
|
+
llmInsights: {
|
|
53
|
+
projectComplexity: string;
|
|
54
|
+
riskFactors: string[];
|
|
55
|
+
successFactors: string[];
|
|
56
|
+
customRecommendations: string[];
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface BuildPhase {
|
|
60
|
+
phase: number;
|
|
61
|
+
name: string;
|
|
62
|
+
duration: string;
|
|
63
|
+
tasks: string[];
|
|
64
|
+
deliverables: string[];
|
|
65
|
+
successCriteria: string;
|
|
66
|
+
}
|
|
67
|
+
export interface TaskDetail {
|
|
68
|
+
id: string;
|
|
69
|
+
title: string;
|
|
70
|
+
description: string;
|
|
71
|
+
priority: "high" | "medium" | "low";
|
|
72
|
+
estimatedTime: string;
|
|
73
|
+
dependencies: string[];
|
|
74
|
+
deliverables: string[];
|
|
75
|
+
}
|
|
76
|
+
export declare class BuildStrategyAgent implements SubAgent<BuildStrategyInput, BuildStrategyOutput> {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
personality: string;
|
|
80
|
+
llmProvider: string;
|
|
81
|
+
expertise: string[];
|
|
82
|
+
private aiClient;
|
|
83
|
+
private contextLoader;
|
|
84
|
+
constructor();
|
|
85
|
+
run(input: BuildStrategyInput): Promise<BuildStrategyOutput>;
|
|
86
|
+
validate(input: BuildStrategyInput): Promise<boolean>;
|
|
87
|
+
cleanup(): Promise<void>;
|
|
88
|
+
getStatus(): Promise<any>;
|
|
89
|
+
private analyzeProjectContext;
|
|
90
|
+
private generateLLMInsights;
|
|
91
|
+
private generateRecommendations;
|
|
92
|
+
private generateBuildPlan;
|
|
93
|
+
private generateTaskList;
|
|
94
|
+
private generateComparison;
|
|
95
|
+
private getDefaultStrategy;
|
|
96
|
+
private getDefaultPhase;
|
|
97
|
+
private getDefaultTask;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=BuildStrategyAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BuildStrategyAgent.d.ts","sourceRoot":"","sources":["../../../src/agents/implementations/BuildStrategyAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,M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