@prductr/carlos 1.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.
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +157 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +21 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +43 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/market-fit/index.d.ts +13 -0
- package/dist/market-fit/index.d.ts.map +1 -0
- package/dist/market-fit/index.js +325 -0
- package/dist/market-fit/index.js.map +1 -0
- package/dist/product/index.d.ts +28 -0
- package/dist/product/index.d.ts.map +1 -0
- package/dist/product/index.js +258 -0
- package/dist/product/index.js.map +1 -0
- package/dist/roadmap/index.d.ts +13 -0
- package/dist/roadmap/index.d.ts.map +1 -0
- package/dist/roadmap/index.js +368 -0
- package/dist/roadmap/index.js.map +1 -0
- package/dist/technical/index.d.ts +13 -0
- package/dist/technical/index.d.ts.map +1 -0
- package/dist/technical/index.js +417 -0
- package/dist/technical/index.js.map +1 -0
- package/dist/types.d.ts +503 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +169 -0
- package/dist/types.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Market Fit - Assess product-market fit and competitive position
|
|
3
|
+
* Analyzes target audience, competition, and market opportunity
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync, existsSync, writeFileSync, mkdirSync } from "fs";
|
|
6
|
+
import { join } from "path";
|
|
7
|
+
/**
|
|
8
|
+
* Assess product-market fit
|
|
9
|
+
*
|
|
10
|
+
* @param config - Carlos configuration
|
|
11
|
+
* @returns Market fit assessment with score and recommendations
|
|
12
|
+
*/
|
|
13
|
+
export async function assessMarketFit(config) {
|
|
14
|
+
console.log("📊 Assessing product-market fit...");
|
|
15
|
+
// Read existing PRD if available
|
|
16
|
+
const prdContent = readPRD(config);
|
|
17
|
+
// Extract key components
|
|
18
|
+
const targetAudience = extractTargetAudience(prdContent);
|
|
19
|
+
const problemStatement = extractProblemStatement(prdContent);
|
|
20
|
+
const solution = extractSolution(prdContent);
|
|
21
|
+
const uvp = extractUVP(prdContent);
|
|
22
|
+
const competition = identifyCompetition(prdContent);
|
|
23
|
+
// Analyze positioning
|
|
24
|
+
const differentiators = analyzeDifferentiators(solution, competition);
|
|
25
|
+
const risks = identifyRisks(config, competition);
|
|
26
|
+
const opportunities = identifyOpportunities(config, targetAudience);
|
|
27
|
+
// Calculate PMF score
|
|
28
|
+
const pmfScore = calculatePMFScore({
|
|
29
|
+
hasClearAudience: targetAudience !== null,
|
|
30
|
+
hasProblem: problemStatement !== null,
|
|
31
|
+
hasSolution: solution !== null,
|
|
32
|
+
hasUVP: uvp !== null,
|
|
33
|
+
hasDifferentiators: differentiators.length > 0,
|
|
34
|
+
competitionLevel: competition.length,
|
|
35
|
+
});
|
|
36
|
+
const recommendations = generateRecommendations(pmfScore, {
|
|
37
|
+
targetAudience,
|
|
38
|
+
problemStatement,
|
|
39
|
+
solution,
|
|
40
|
+
uvp,
|
|
41
|
+
differentiators,
|
|
42
|
+
});
|
|
43
|
+
const assessment = {
|
|
44
|
+
productMarketFitScore: pmfScore,
|
|
45
|
+
targetAudience: targetAudience ?? "Not defined",
|
|
46
|
+
problemStatement: problemStatement ?? "Not defined",
|
|
47
|
+
solution: solution ?? "Not defined",
|
|
48
|
+
uniqueValueProposition: uvp ?? "Not defined",
|
|
49
|
+
competition,
|
|
50
|
+
differentiators,
|
|
51
|
+
riskFactors: risks,
|
|
52
|
+
opportunities,
|
|
53
|
+
recommendations,
|
|
54
|
+
};
|
|
55
|
+
// Write assessment file
|
|
56
|
+
writeMarketFitFile(config, assessment);
|
|
57
|
+
return assessment;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Read Product Requirements Document
|
|
61
|
+
*/
|
|
62
|
+
function readPRD(config) {
|
|
63
|
+
const prdPaths = [
|
|
64
|
+
join(config.projectRoot, config.docsDir, "PRD.md"),
|
|
65
|
+
join(config.projectRoot, "PRD.md"),
|
|
66
|
+
join(config.projectRoot, "README.md"),
|
|
67
|
+
];
|
|
68
|
+
for (const path of prdPaths) {
|
|
69
|
+
if (existsSync(path)) {
|
|
70
|
+
return readFileSync(path, "utf8");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return "";
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Extract target audience from PRD
|
|
77
|
+
*/
|
|
78
|
+
function extractTargetAudience(prd) {
|
|
79
|
+
// Look for target audience section
|
|
80
|
+
const patterns = [
|
|
81
|
+
/##\s*Target Audience\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
82
|
+
/##\s*Users?\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
83
|
+
/##\s*Who is this for\?\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
84
|
+
];
|
|
85
|
+
for (const pattern of patterns) {
|
|
86
|
+
const match = prd.match(pattern);
|
|
87
|
+
if (match)
|
|
88
|
+
return match[1].trim();
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Extract problem statement
|
|
94
|
+
*/
|
|
95
|
+
function extractProblemStatement(prd) {
|
|
96
|
+
const patterns = [
|
|
97
|
+
/##\s*Problem\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
98
|
+
/##\s*Problem Statement\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
99
|
+
/##\s*Overview\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
100
|
+
];
|
|
101
|
+
for (const pattern of patterns) {
|
|
102
|
+
const match = prd.match(pattern);
|
|
103
|
+
if (match)
|
|
104
|
+
return match[1].trim();
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Extract solution description
|
|
110
|
+
*/
|
|
111
|
+
function extractSolution(prd) {
|
|
112
|
+
const patterns = [
|
|
113
|
+
/##\s*Solution\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
114
|
+
/##\s*Features\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
115
|
+
/##\s*Overview\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
116
|
+
];
|
|
117
|
+
for (const pattern of patterns) {
|
|
118
|
+
const match = prd.match(pattern);
|
|
119
|
+
if (match)
|
|
120
|
+
return match[1].trim();
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Extract unique value proposition
|
|
126
|
+
*/
|
|
127
|
+
function extractUVP(prd) {
|
|
128
|
+
const patterns = [
|
|
129
|
+
/##\s*(?:Unique )?Value Proposition\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
130
|
+
/##\s*Why\s+(?:us|this)\?\s*\n(.+?)(?:\n\n|\n#)/s,
|
|
131
|
+
];
|
|
132
|
+
for (const pattern of patterns) {
|
|
133
|
+
const match = prd.match(pattern);
|
|
134
|
+
if (match)
|
|
135
|
+
return match[1].trim();
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Identify competition
|
|
141
|
+
*/
|
|
142
|
+
function identifyCompetition(prd) {
|
|
143
|
+
const match = prd.match(/##\s*Compet(?:ition|itors)\s*\n(.+?)(?:\n\n|\n#)/s);
|
|
144
|
+
if (!match)
|
|
145
|
+
return [];
|
|
146
|
+
// Extract bullet points
|
|
147
|
+
const bullets = match[1].match(/^[-*]\s+(.+)$/gm);
|
|
148
|
+
return bullets ? bullets.map((b) => b.replace(/^[-*]\s+/, "").trim()) : [];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Analyze differentiators
|
|
152
|
+
*/
|
|
153
|
+
function analyzeDifferentiators(solution, competition) {
|
|
154
|
+
const differentiators = [];
|
|
155
|
+
// Look for key differentiating features in solution text
|
|
156
|
+
if (solution !== null) {
|
|
157
|
+
if (solution.toLowerCase().includes("ai") || solution.toLowerCase().includes("machine learning")) {
|
|
158
|
+
differentiators.push("AI-powered capabilities");
|
|
159
|
+
}
|
|
160
|
+
if (solution.toLowerCase().includes("real-time") || solution.toLowerCase().includes("realtime")) {
|
|
161
|
+
differentiators.push("Real-time functionality");
|
|
162
|
+
}
|
|
163
|
+
if (solution.toLowerCase().includes("open source") || solution.toLowerCase().includes("open-source")) {
|
|
164
|
+
differentiators.push("Open source approach");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (competition.length === 0) {
|
|
168
|
+
differentiators.push("First mover advantage");
|
|
169
|
+
}
|
|
170
|
+
if (differentiators.length === 0) {
|
|
171
|
+
differentiators.push("Differentiation strategy needs development");
|
|
172
|
+
}
|
|
173
|
+
return differentiators;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Identify risk factors
|
|
177
|
+
*/
|
|
178
|
+
function identifyRisks(config, competition) {
|
|
179
|
+
const risks = [];
|
|
180
|
+
// Competition risk
|
|
181
|
+
if (competition.length > 3) {
|
|
182
|
+
risks.push("High competition in market space");
|
|
183
|
+
}
|
|
184
|
+
// Technical risk
|
|
185
|
+
const pkgPath = join(config.projectRoot, "package.json");
|
|
186
|
+
if (existsSync(pkgPath)) {
|
|
187
|
+
try {
|
|
188
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
189
|
+
const version = pkg.version || "0.0.0";
|
|
190
|
+
if (version.startsWith("0.")) {
|
|
191
|
+
risks.push("Early stage product - execution risk");
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
// malformed package.json — skip version-based risk
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Documentation risk
|
|
199
|
+
if (!existsSync(join(config.projectRoot, "README.md"))) {
|
|
200
|
+
risks.push("Insufficient documentation for market entry");
|
|
201
|
+
}
|
|
202
|
+
return risks;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Identify opportunities
|
|
206
|
+
*/
|
|
207
|
+
function identifyOpportunities(config, targetAudience) {
|
|
208
|
+
const opportunities = [];
|
|
209
|
+
if (targetAudience !== null) {
|
|
210
|
+
if (targetAudience.toLowerCase().includes("developer")) {
|
|
211
|
+
opportunities.push("Large developer community for adoption");
|
|
212
|
+
}
|
|
213
|
+
if (targetAudience.toLowerCase().includes("enterprise")) {
|
|
214
|
+
opportunities.push("Enterprise market with high willingness to pay");
|
|
215
|
+
}
|
|
216
|
+
if (targetAudience.toLowerCase().includes("small business") || targetAudience.toLowerCase().includes("smb")) {
|
|
217
|
+
opportunities.push("Underserved SMB market segment");
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return opportunities;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Calculate PMF score (0-100)
|
|
224
|
+
*/
|
|
225
|
+
function calculatePMFScore(factors) {
|
|
226
|
+
let score = 0;
|
|
227
|
+
// Core factors (20 points each)
|
|
228
|
+
if (factors.hasClearAudience)
|
|
229
|
+
score += 20;
|
|
230
|
+
if (factors.hasProblem)
|
|
231
|
+
score += 20;
|
|
232
|
+
if (factors.hasSolution)
|
|
233
|
+
score += 20;
|
|
234
|
+
if (factors.hasUVP)
|
|
235
|
+
score += 20;
|
|
236
|
+
// Differentiation (15 points)
|
|
237
|
+
if (factors.hasDifferentiators)
|
|
238
|
+
score += 15;
|
|
239
|
+
// Competition factor (5 points - inverse of competition)
|
|
240
|
+
if (factors.competitionLevel === 0)
|
|
241
|
+
score += 5;
|
|
242
|
+
else if (factors.competitionLevel <= 2)
|
|
243
|
+
score += 3;
|
|
244
|
+
else if (factors.competitionLevel <= 5)
|
|
245
|
+
score += 1;
|
|
246
|
+
return Math.min(score, 100);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Generate recommendations
|
|
250
|
+
*/
|
|
251
|
+
function generateRecommendations(pmfScore, components) {
|
|
252
|
+
const recommendations = [];
|
|
253
|
+
if (pmfScore < 40) {
|
|
254
|
+
recommendations.push("🚨 Critical: Define clear product-market fit strategy");
|
|
255
|
+
}
|
|
256
|
+
if (components.targetAudience === null) {
|
|
257
|
+
recommendations.push("Add a ## Target Audience section to your PRD");
|
|
258
|
+
}
|
|
259
|
+
if (components.problemStatement === null) {
|
|
260
|
+
recommendations.push("Add a ## Problem Statement section to your PRD");
|
|
261
|
+
}
|
|
262
|
+
if (components.solution === null) {
|
|
263
|
+
recommendations.push("Add a ## Solution section to your PRD");
|
|
264
|
+
}
|
|
265
|
+
if (components.uvp === null) {
|
|
266
|
+
recommendations.push("Add a ## Value Proposition section to your PRD");
|
|
267
|
+
}
|
|
268
|
+
if (components.differentiators.length === 0) {
|
|
269
|
+
recommendations.push("Identify and emphasize competitive differentiators");
|
|
270
|
+
}
|
|
271
|
+
if (pmfScore >= 70) {
|
|
272
|
+
recommendations.push("✅ Strong PMF indicators - focus on execution and growth");
|
|
273
|
+
}
|
|
274
|
+
return recommendations;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Write market fit assessment file
|
|
278
|
+
*/
|
|
279
|
+
function writeMarketFitFile(config, assessment) {
|
|
280
|
+
const outputDir = join(config.projectRoot, config.outputDir);
|
|
281
|
+
if (!existsSync(outputDir)) {
|
|
282
|
+
mkdirSync(outputDir, { recursive: true });
|
|
283
|
+
}
|
|
284
|
+
const outputPath = join(outputDir, "METRICS_AND_PMF.md");
|
|
285
|
+
const content = `# Metrics & Product-Market Fit
|
|
286
|
+
|
|
287
|
+
## Product-Market Fit Score
|
|
288
|
+
**${assessment.productMarketFitScore}/100**
|
|
289
|
+
|
|
290
|
+
${assessment.productMarketFitScore >= 70 ? "🟢 Strong" : assessment.productMarketFitScore >= 40 ? "🟡 Moderate" : "🔴 Weak"} product-market fit indicators
|
|
291
|
+
|
|
292
|
+
## Target Audience
|
|
293
|
+
${assessment.targetAudience}
|
|
294
|
+
|
|
295
|
+
## Problem Statement
|
|
296
|
+
${assessment.problemStatement}
|
|
297
|
+
|
|
298
|
+
## Solution
|
|
299
|
+
${assessment.solution}
|
|
300
|
+
|
|
301
|
+
## Unique Value Proposition
|
|
302
|
+
${assessment.uniqueValueProposition}
|
|
303
|
+
|
|
304
|
+
## Competition
|
|
305
|
+
${assessment.competition.length > 0 ? assessment.competition.map((c) => `- ${c}`).join("\n") : "_No direct competitors identified_"}
|
|
306
|
+
|
|
307
|
+
## Differentiators
|
|
308
|
+
${assessment.differentiators.map((d) => `- ${d}`).join("\n")}
|
|
309
|
+
|
|
310
|
+
## Risk Factors
|
|
311
|
+
${assessment.riskFactors.length > 0 ? assessment.riskFactors.map((r) => `- ⚠️ ${r}`).join("\n") : "_No major risks identified_"}
|
|
312
|
+
|
|
313
|
+
## Opportunities
|
|
314
|
+
${assessment.opportunities.length > 0 ? assessment.opportunities.map((o) => `- 🎯 ${o}`).join("\n") : "_Additional opportunities to explore_"}
|
|
315
|
+
|
|
316
|
+
## Recommendations
|
|
317
|
+
${assessment.recommendations.map((r, i) => `${i + 1}. ${r}`).join("\n")}
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
Generated: ${new Date().toISOString()}
|
|
321
|
+
`;
|
|
322
|
+
writeFileSync(outputPath, content);
|
|
323
|
+
console.log(`✅ Wrote market fit assessment to ${outputPath}`);
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/market-fit/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B;;;;;GAKG;A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,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;aAG1D,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;CACpC,CAAC;IAEA,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAEnC,OAAO,CAAC,GAAG,CAAC,oCAAoC,UAAU,EAAE,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product - Feature prioritization and backlog management
|
|
3
|
+
* Implements RICE scoring and Now/Next/Later framework
|
|
4
|
+
*/
|
|
5
|
+
import type { CarlosConfig, ProductBacklog } from "../types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Read features from a Markdown file (docs/FEATURES.md or FEATURES.md)
|
|
8
|
+
*
|
|
9
|
+
* @param config - Carlos configuration
|
|
10
|
+
* @returns Array of feature name strings parsed from bullet points
|
|
11
|
+
*/
|
|
12
|
+
export declare function readFeatures(config: CarlosConfig): Promise<string[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Parse --features JSON array from CLI args
|
|
15
|
+
*
|
|
16
|
+
* @param args - CLI argument array (e.g. process.argv.slice(2))
|
|
17
|
+
* @returns Parsed string array, or null if flag absent or invalid
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseFeaturesFlag(args: string[]): string[] | null;
|
|
20
|
+
/**
|
|
21
|
+
* Prioritize features and generate product backlog
|
|
22
|
+
*
|
|
23
|
+
* @param config - Carlos configuration
|
|
24
|
+
* @param features - List of feature descriptions
|
|
25
|
+
* @returns Prioritized product backlog
|
|
26
|
+
*/
|
|
27
|
+
export declare function prioritizeFeatures(config: CarlosConfig, features: string[]): Promise<ProductBacklog>;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAmB,MAAM,aAAa,CAAC;AAEjF;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAe1E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,CAWjE;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,cAAc,CAAC,CAoCzB"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product - Feature prioritization and backlog management
|
|
3
|
+
* Implements RICE scoring and Now/Next/Later framework
|
|
4
|
+
*/
|
|
5
|
+
import { writeFileSync, readFileSync, existsSync, mkdirSync } from "fs";
|
|
6
|
+
import { join } from "path";
|
|
7
|
+
/**
|
|
8
|
+
* Read features from a Markdown file (docs/FEATURES.md or FEATURES.md)
|
|
9
|
+
*
|
|
10
|
+
* @param config - Carlos configuration
|
|
11
|
+
* @returns Array of feature name strings parsed from bullet points
|
|
12
|
+
*/
|
|
13
|
+
export async function readFeatures(config) {
|
|
14
|
+
const candidates = [
|
|
15
|
+
join(config.projectRoot, config.docsDir, "FEATURES.md"),
|
|
16
|
+
join(config.projectRoot, "FEATURES.md"),
|
|
17
|
+
];
|
|
18
|
+
for (const path of candidates) {
|
|
19
|
+
if (existsSync(path)) {
|
|
20
|
+
const content = readFileSync(path, "utf8");
|
|
21
|
+
const bullets = content.match(/^[-*]\s+(.+)$/gm);
|
|
22
|
+
return bullets ? bullets.map((b) => b.replace(/^[-*]\s+/, "").trim()) : [];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Parse --features JSON array from CLI args
|
|
29
|
+
*
|
|
30
|
+
* @param args - CLI argument array (e.g. process.argv.slice(2))
|
|
31
|
+
* @returns Parsed string array, or null if flag absent or invalid
|
|
32
|
+
*/
|
|
33
|
+
export function parseFeaturesFlag(args) {
|
|
34
|
+
const idx = args.indexOf("--features");
|
|
35
|
+
if (idx === -1 || idx + 1 >= args.length)
|
|
36
|
+
return null;
|
|
37
|
+
try {
|
|
38
|
+
const parsed = JSON.parse(args[idx + 1]);
|
|
39
|
+
if (!Array.isArray(parsed))
|
|
40
|
+
return null;
|
|
41
|
+
return parsed;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Prioritize features and generate product backlog
|
|
49
|
+
*
|
|
50
|
+
* @param config - Carlos configuration
|
|
51
|
+
* @param features - List of feature descriptions
|
|
52
|
+
* @returns Prioritized product backlog
|
|
53
|
+
*/
|
|
54
|
+
export async function prioritizeFeatures(config, features) {
|
|
55
|
+
console.log("📋 Prioritizing product backlog...");
|
|
56
|
+
// Score each feature
|
|
57
|
+
const scoredFeatures = features.map((feature) => scoreFeature(feature));
|
|
58
|
+
// Sort by priority score (descending)
|
|
59
|
+
scoredFeatures.sort((a, b) => b.priority - a.priority);
|
|
60
|
+
// Categorize into Now/Next/Later
|
|
61
|
+
const nowItems = scoredFeatures
|
|
62
|
+
.filter((f) => f.recommendation === "now")
|
|
63
|
+
.map((f) => f.feature);
|
|
64
|
+
const nextItems = scoredFeatures
|
|
65
|
+
.filter((f) => f.recommendation === "next")
|
|
66
|
+
.map((f) => f.feature);
|
|
67
|
+
const laterItems = scoredFeatures
|
|
68
|
+
.filter((f) => f.recommendation === "later")
|
|
69
|
+
.map((f) => f.feature);
|
|
70
|
+
const backlog = {
|
|
71
|
+
features: scoredFeatures,
|
|
72
|
+
nowItems,
|
|
73
|
+
nextItems,
|
|
74
|
+
laterItems,
|
|
75
|
+
totalItems: features.length,
|
|
76
|
+
};
|
|
77
|
+
// Write backlog file
|
|
78
|
+
writeBacklogFile(config, backlog);
|
|
79
|
+
return backlog;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Score a feature using simplified RICE framework
|
|
83
|
+
* Priority = (Impact * Confidence) / Effort
|
|
84
|
+
*/
|
|
85
|
+
function scoreFeature(feature) {
|
|
86
|
+
// Estimate impact based on feature description
|
|
87
|
+
const impact = estimateImpact(feature);
|
|
88
|
+
// Estimate effort based on feature complexity
|
|
89
|
+
const effort = estimateEffort(feature);
|
|
90
|
+
// Estimate confidence based on clarity
|
|
91
|
+
const confidence = estimateConfidence(feature);
|
|
92
|
+
// Calculate priority score
|
|
93
|
+
const priority = (impact * confidence) / effort;
|
|
94
|
+
// Determine recommendation
|
|
95
|
+
let recommendation;
|
|
96
|
+
if (priority >= 5)
|
|
97
|
+
recommendation = "now";
|
|
98
|
+
else if (priority >= 2)
|
|
99
|
+
recommendation = "next";
|
|
100
|
+
else if (priority >= 1)
|
|
101
|
+
recommendation = "later";
|
|
102
|
+
else
|
|
103
|
+
recommendation = "never";
|
|
104
|
+
return {
|
|
105
|
+
feature,
|
|
106
|
+
impact,
|
|
107
|
+
effort,
|
|
108
|
+
confidence,
|
|
109
|
+
priority: Math.round(priority * 10) / 10,
|
|
110
|
+
recommendation,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Estimate impact (1-10)
|
|
115
|
+
*/
|
|
116
|
+
function estimateImpact(feature) {
|
|
117
|
+
const lower = feature.toLowerCase();
|
|
118
|
+
// High impact keywords
|
|
119
|
+
if (lower.includes("core") ||
|
|
120
|
+
lower.includes("critical") ||
|
|
121
|
+
lower.includes("essential") ||
|
|
122
|
+
lower.includes("must-have")) {
|
|
123
|
+
return 9;
|
|
124
|
+
}
|
|
125
|
+
// User-facing features
|
|
126
|
+
if (lower.includes("user") ||
|
|
127
|
+
lower.includes("experience") ||
|
|
128
|
+
lower.includes("onboarding")) {
|
|
129
|
+
return 7;
|
|
130
|
+
}
|
|
131
|
+
// Performance/quality improvements
|
|
132
|
+
if (lower.includes("performance") ||
|
|
133
|
+
lower.includes("quality") ||
|
|
134
|
+
lower.includes("reliability")) {
|
|
135
|
+
return 6;
|
|
136
|
+
}
|
|
137
|
+
// Nice-to-have features
|
|
138
|
+
if (lower.includes("enhancement") ||
|
|
139
|
+
lower.includes("improvement") ||
|
|
140
|
+
lower.includes("polish")) {
|
|
141
|
+
return 4;
|
|
142
|
+
}
|
|
143
|
+
// Default moderate impact
|
|
144
|
+
return 5;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Estimate effort (1-10, higher = more effort)
|
|
148
|
+
*/
|
|
149
|
+
function estimateEffort(feature) {
|
|
150
|
+
const lower = feature.toLowerCase();
|
|
151
|
+
// High effort keywords
|
|
152
|
+
if (lower.includes("redesign") ||
|
|
153
|
+
lower.includes("rebuild") ||
|
|
154
|
+
lower.includes("migrate") ||
|
|
155
|
+
lower.includes("refactor all")) {
|
|
156
|
+
return 9;
|
|
157
|
+
}
|
|
158
|
+
// Medium-high effort
|
|
159
|
+
if (lower.includes("integrate") ||
|
|
160
|
+
lower.includes("implement") ||
|
|
161
|
+
lower.includes("develop")) {
|
|
162
|
+
return 6;
|
|
163
|
+
}
|
|
164
|
+
// Low effort keywords
|
|
165
|
+
if (lower.includes("fix") ||
|
|
166
|
+
lower.includes("update") ||
|
|
167
|
+
lower.includes("tweak") ||
|
|
168
|
+
lower.includes("adjust")) {
|
|
169
|
+
return 2;
|
|
170
|
+
}
|
|
171
|
+
// Default moderate effort
|
|
172
|
+
return 5;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Estimate confidence (1-10)
|
|
176
|
+
*/
|
|
177
|
+
function estimateConfidence(feature) {
|
|
178
|
+
const lower = feature.toLowerCase();
|
|
179
|
+
// High confidence - clear, specific features
|
|
180
|
+
if (lower.includes("add") ||
|
|
181
|
+
lower.includes("create") ||
|
|
182
|
+
lower.includes("implement") ||
|
|
183
|
+
lower.match(/^\w+\s+\w+$/)) {
|
|
184
|
+
return 8;
|
|
185
|
+
}
|
|
186
|
+
// Low confidence - vague or exploratory
|
|
187
|
+
if (lower.includes("explore") ||
|
|
188
|
+
lower.includes("investigate") ||
|
|
189
|
+
lower.includes("consider") ||
|
|
190
|
+
lower.includes("maybe")) {
|
|
191
|
+
return 3;
|
|
192
|
+
}
|
|
193
|
+
// Default moderate confidence
|
|
194
|
+
return 6;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Write backlog to file
|
|
198
|
+
*/
|
|
199
|
+
function writeBacklogFile(config, backlog) {
|
|
200
|
+
const outputDir = join(config.projectRoot, config.outputDir);
|
|
201
|
+
if (!existsSync(outputDir)) {
|
|
202
|
+
mkdirSync(outputDir, { recursive: true });
|
|
203
|
+
}
|
|
204
|
+
const outputPath = join(outputDir, "PRODUCT_BACKLOG.md");
|
|
205
|
+
const content = `# Product Backlog
|
|
206
|
+
|
|
207
|
+
Total Features: ${backlog.totalItems}
|
|
208
|
+
|
|
209
|
+
## Now (Next Sprint) - ${backlog.nowItems.length} items
|
|
210
|
+
|
|
211
|
+
High priority features that should be built immediately.
|
|
212
|
+
|
|
213
|
+
${backlog.nowItems.map((item, i) => {
|
|
214
|
+
const feature = backlog.features.find((f) => f.feature === item);
|
|
215
|
+
return `### ${i + 1}. ${item}
|
|
216
|
+
|
|
217
|
+
- **Priority Score:** ${feature?.priority}
|
|
218
|
+
- **Impact:** ${feature?.impact}/10
|
|
219
|
+
- **Effort:** ${feature?.effort}/10
|
|
220
|
+
- **Confidence:** ${feature?.confidence}/10
|
|
221
|
+
`;
|
|
222
|
+
}).join("\n")}
|
|
223
|
+
|
|
224
|
+
## Next (Upcoming) - ${backlog.nextItems.length} items
|
|
225
|
+
|
|
226
|
+
Important features for subsequent iterations.
|
|
227
|
+
|
|
228
|
+
${backlog.nextItems.map((item, i) => {
|
|
229
|
+
const feature = backlog.features.find((f) => f.feature === item);
|
|
230
|
+
return `${i + 1}. **${item}** (Priority: ${feature?.priority}, Impact: ${feature?.impact}/10, Effort: ${feature?.effort}/10)`;
|
|
231
|
+
}).join("\n")}
|
|
232
|
+
|
|
233
|
+
## Later (Backlog) - ${backlog.laterItems.length} items
|
|
234
|
+
|
|
235
|
+
Features to consider for future development.
|
|
236
|
+
|
|
237
|
+
${backlog.laterItems.map((item, i) => {
|
|
238
|
+
const feature = backlog.features.find((f) => f.feature === item);
|
|
239
|
+
return `${i + 1}. ${item} (Priority: ${feature?.priority})`;
|
|
240
|
+
}).join("\n")}
|
|
241
|
+
|
|
242
|
+
## Prioritization Framework
|
|
243
|
+
|
|
244
|
+
**RICE Scoring:**
|
|
245
|
+
- **Reach:** How many users will this impact?
|
|
246
|
+
- **Impact:** How much will it improve their experience?
|
|
247
|
+
- **Confidence:** How confident are we in the estimates?
|
|
248
|
+
- **Effort:** How much time/resources will it take?
|
|
249
|
+
|
|
250
|
+
**Formula:** Priority = (Impact × Confidence) / Effort
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
Generated: ${new Date().toISOString()}
|
|
254
|
+
`;
|
|
255
|
+
writeFileSync(outputPath, content);
|
|
256
|
+
console.log(`✅ Wrote product backlog to ${outputPath}`);
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAoB;IACrD,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC;QACvD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,aA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,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roadmap - Generate comprehensive product roadmap
|
|
3
|
+
* Creates phased roadmap with epics, stories, and milestones
|
|
4
|
+
*/
|
|
5
|
+
import type { CarlosConfig, Roadmap } from "../types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Generate comprehensive product roadmap
|
|
8
|
+
*
|
|
9
|
+
* @param config - Carlos configuration
|
|
10
|
+
* @returns Complete roadmap with phases and epics
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateRoadmap(config: CarlosConfig): Promise<Roadmap>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/roadmap/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EAIR,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,OAAO,CAAC,CAgClB"}
|