@compilr-dev/factory 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-tools.js +15 -7
- package/dist/business-model/index.d.ts +4 -0
- package/dist/business-model/index.js +3 -0
- package/dist/business-model/scaffold-tool.d.ts +25 -0
- package/dist/business-model/scaffold-tool.js +122 -0
- package/dist/business-model/templates/full-plan.d.ts +8 -0
- package/dist/business-model/templates/full-plan.js +26 -0
- package/dist/business-model/templates/helpers.d.ts +11 -0
- package/dist/business-model/templates/helpers.js +77 -0
- package/dist/business-model/templates/index.d.ts +12 -0
- package/dist/business-model/templates/index.js +17 -0
- package/dist/business-model/templates/market-entry.d.ts +7 -0
- package/dist/business-model/templates/market-entry.js +24 -0
- package/dist/business-model/templates/product-launch.d.ts +7 -0
- package/dist/business-model/templates/product-launch.js +24 -0
- package/dist/business-model/templates/startup-pitch.d.ts +8 -0
- package/dist/business-model/templates/startup-pitch.js +24 -0
- package/dist/business-model/templates/types.d.ts +18 -0
- package/dist/business-model/templates/types.js +4 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/all-tools.js
CHANGED
|
@@ -13,6 +13,7 @@ import { createModelTools } from './model/tools.js';
|
|
|
13
13
|
import { createResearchModelTools } from './research-model/tools.js';
|
|
14
14
|
import { createResearchScaffoldTool } from './research-model/scaffold-tool.js';
|
|
15
15
|
import { createBusinessModelTools } from './business-model/tools.js';
|
|
16
|
+
import { createBusinessScaffoldTool } from './business-model/scaffold-tool.js';
|
|
16
17
|
import { createFactoryTools } from './factory/tools.js';
|
|
17
18
|
import { writeFileSync, mkdirSync } from 'fs';
|
|
18
19
|
import { dirname } from 'path';
|
|
@@ -21,20 +22,27 @@ import { dirname } from 'path';
|
|
|
21
22
|
* Includes app model, research model, research scaffold, and software factory tools.
|
|
22
23
|
*/
|
|
23
24
|
export function createAllFactoryTools(config) {
|
|
24
|
-
const
|
|
25
|
+
const writeFile = (path, content) => {
|
|
26
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
27
|
+
writeFileSync(path, content, 'utf-8');
|
|
28
|
+
return Promise.resolve();
|
|
29
|
+
};
|
|
30
|
+
const researchScaffold = createResearchScaffoldTool({
|
|
25
31
|
context: config.context,
|
|
26
32
|
cwd: config.cwd,
|
|
27
|
-
writeFile
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
writeFile,
|
|
34
|
+
});
|
|
35
|
+
const businessScaffold = createBusinessScaffoldTool({
|
|
36
|
+
context: config.context,
|
|
37
|
+
cwd: config.cwd,
|
|
38
|
+
writeFile,
|
|
32
39
|
});
|
|
33
40
|
return [
|
|
34
41
|
...createModelTools({ context: config.context, cwd: config.cwd }),
|
|
35
42
|
...createResearchModelTools({ context: config.context }),
|
|
36
43
|
...createBusinessModelTools({ context: config.context }),
|
|
37
|
-
|
|
44
|
+
researchScaffold,
|
|
45
|
+
businessScaffold,
|
|
38
46
|
...createFactoryTools({ context: config.context, cwd: config.cwd }),
|
|
39
47
|
];
|
|
40
48
|
}
|
|
@@ -8,3 +8,7 @@ export { validateBusinessModel } from './schema.js';
|
|
|
8
8
|
export type { BusinessValidationError, BusinessValidationResult } from './schema.js';
|
|
9
9
|
export { createBusinessModelTools } from './tools.js';
|
|
10
10
|
export type { BusinessModelToolsConfig } from './tools.js';
|
|
11
|
+
export type { BusinessTemplate, BusinessTemplateFile } from './templates/types.js';
|
|
12
|
+
export { startupPitchTemplate, fullPlanTemplate, marketEntryTemplate, productLaunchTemplate, BUSINESS_TEMPLATES, getBusinessTemplate, } from './templates/index.js';
|
|
13
|
+
export { createBusinessScaffoldTool } from './scaffold-tool.js';
|
|
14
|
+
export type { BusinessScaffoldConfig } from './scaffold-tool.js';
|
|
@@ -5,3 +5,6 @@ export { createDefaultBusinessModel, generateBusinessId, resetBusinessIdCounter,
|
|
|
5
5
|
export { BusinessModelStore } from './persistence.js';
|
|
6
6
|
export { validateBusinessModel } from './schema.js';
|
|
7
7
|
export { createBusinessModelTools } from './tools.js';
|
|
8
|
+
export { startupPitchTemplate, fullPlanTemplate, marketEntryTemplate, productLaunchTemplate, BUSINESS_TEMPLATES, getBusinessTemplate, } from './templates/index.js';
|
|
9
|
+
// Scaffold tool
|
|
10
|
+
export { createBusinessScaffoldTool } from './scaffold-tool.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* business_scaffold Tool
|
|
3
|
+
*
|
|
4
|
+
* Scaffolds a business plan project from a template:
|
|
5
|
+
* 1. Creates a pre-populated Business Model
|
|
6
|
+
* 2. Generates folder structure and section files
|
|
7
|
+
* 3. Creates work items for each section
|
|
8
|
+
*/
|
|
9
|
+
import type { Tool } from '@compilr-dev/agents';
|
|
10
|
+
import type { PlatformContext } from '@compilr-dev/sdk';
|
|
11
|
+
export interface BusinessScaffoldConfig {
|
|
12
|
+
readonly context: PlatformContext;
|
|
13
|
+
readonly cwd?: string;
|
|
14
|
+
readonly writeFile?: (path: string, content: string) => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
interface BusinessScaffoldInput {
|
|
17
|
+
template: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
stage?: string;
|
|
20
|
+
dry_run?: boolean;
|
|
21
|
+
output_dir?: string;
|
|
22
|
+
project_id?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function createBusinessScaffoldTool(config: BusinessScaffoldConfig): Tool<BusinessScaffoldInput>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* business_scaffold Tool
|
|
3
|
+
*
|
|
4
|
+
* Scaffolds a business plan project from a template:
|
|
5
|
+
* 1. Creates a pre-populated Business Model
|
|
6
|
+
* 2. Generates folder structure and section files
|
|
7
|
+
* 3. Creates work items for each section
|
|
8
|
+
*/
|
|
9
|
+
import { defineTool, createSuccessResult, createErrorResult } from '@compilr-dev/agents';
|
|
10
|
+
import { BusinessModelStore } from './persistence.js';
|
|
11
|
+
import { BUSINESS_TEMPLATES, getBusinessTemplate } from './templates/index.js';
|
|
12
|
+
export function createBusinessScaffoldTool(config) {
|
|
13
|
+
return defineTool({
|
|
14
|
+
name: 'business_scaffold',
|
|
15
|
+
description: 'Scaffold a business plan project from a template. Creates a Business Model, generates folder structure and section files, and creates work items.',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
template: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
enum: BUSINESS_TEMPLATES.map((t) => t.id),
|
|
22
|
+
description: `Template. Options: ${BUSINESS_TEMPLATES.map((t) => `"${t.id}" (${t.name})`).join(', ')}`,
|
|
23
|
+
},
|
|
24
|
+
name: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Business name. Defaults to "My Business".',
|
|
27
|
+
},
|
|
28
|
+
stage: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: ['idea', 'pre-seed', 'seed', 'series-a', 'growth', 'established'],
|
|
31
|
+
description: "Business stage. Defaults to the template's default.",
|
|
32
|
+
},
|
|
33
|
+
dry_run: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
description: 'Preview without writing files or creating model.',
|
|
36
|
+
},
|
|
37
|
+
output_dir: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Output directory. Defaults to project path or cwd.',
|
|
40
|
+
},
|
|
41
|
+
project_id: {
|
|
42
|
+
type: 'number',
|
|
43
|
+
description: 'Project ID. Uses active project if omitted.',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: ['template'],
|
|
47
|
+
},
|
|
48
|
+
execute: async (input) => {
|
|
49
|
+
try {
|
|
50
|
+
const template = getBusinessTemplate(input.template);
|
|
51
|
+
if (!template) {
|
|
52
|
+
return createErrorResult(`Unknown template "${input.template}". Available: ${BUSINESS_TEMPLATES.map((t) => t.id).join(', ')}`);
|
|
53
|
+
}
|
|
54
|
+
const name = input.name ?? 'My Business';
|
|
55
|
+
const stage = input.stage ? input.stage : template.stage;
|
|
56
|
+
const model = template.createModel(name, stage);
|
|
57
|
+
const files = template.generateFiles(model);
|
|
58
|
+
if (input.dry_run) {
|
|
59
|
+
return createSuccessResult({
|
|
60
|
+
template: template.id,
|
|
61
|
+
name,
|
|
62
|
+
stage,
|
|
63
|
+
phases: model.goToMarket.phases.length,
|
|
64
|
+
files: files.map((f) => f.path),
|
|
65
|
+
message: 'Dry run — no files written.',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Save model to DB
|
|
69
|
+
const projectId = input.project_id ?? config.context.currentProjectId;
|
|
70
|
+
if (projectId) {
|
|
71
|
+
const store = new BusinessModelStore({
|
|
72
|
+
documents: config.context.documents,
|
|
73
|
+
projectId,
|
|
74
|
+
});
|
|
75
|
+
await store.save(model);
|
|
76
|
+
}
|
|
77
|
+
// Write files
|
|
78
|
+
if (config.writeFile) {
|
|
79
|
+
const baseDir = input.output_dir ?? config.cwd ?? '.';
|
|
80
|
+
for (const file of files) {
|
|
81
|
+
await config.writeFile(`${baseDir}/${file.path}`, file.content);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Create work items for each section
|
|
85
|
+
const sectionTitles = [
|
|
86
|
+
'Executive Summary',
|
|
87
|
+
'Problem & Solution',
|
|
88
|
+
'Market Analysis',
|
|
89
|
+
'Competitive Landscape',
|
|
90
|
+
'Business Model',
|
|
91
|
+
'Go-to-Market Strategy',
|
|
92
|
+
'Financial Projections',
|
|
93
|
+
'Team',
|
|
94
|
+
'The Ask',
|
|
95
|
+
];
|
|
96
|
+
if (projectId) {
|
|
97
|
+
for (const title of sectionTitles) {
|
|
98
|
+
await config.context.workItems.create({
|
|
99
|
+
project_id: projectId,
|
|
100
|
+
type: 'feature',
|
|
101
|
+
title: `Draft: ${title}`,
|
|
102
|
+
description: `Write the ${title} section of the business plan.`,
|
|
103
|
+
priority: title === 'Executive Summary' ? 'low' : 'medium',
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return createSuccessResult({
|
|
108
|
+
template: template.id,
|
|
109
|
+
name,
|
|
110
|
+
stage,
|
|
111
|
+
phases: model.goToMarket.phases.length,
|
|
112
|
+
files: files.map((f) => f.path),
|
|
113
|
+
workItems: sectionTitles.length,
|
|
114
|
+
message: `Business plan scaffolded with ${String(files.length)} files and ${String(sectionTitles.length)} work items.`,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
return createErrorResult(error instanceof Error ? error.message : String(error));
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full Business Plan Template
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive plan: executive summary, market, competition,
|
|
5
|
+
* operations, financials, team, funding.
|
|
6
|
+
*/
|
|
7
|
+
import { phase, generateCommonFiles, baseModel } from './helpers.js';
|
|
8
|
+
export const fullPlanTemplate = {
|
|
9
|
+
id: 'full-plan',
|
|
10
|
+
name: 'Full Business Plan',
|
|
11
|
+
description: 'Comprehensive business plan — executive summary, market, competition, operations, financials',
|
|
12
|
+
stage: 'seed',
|
|
13
|
+
createModel(name, stage) {
|
|
14
|
+
return baseModel(name, stage ?? 'seed', [
|
|
15
|
+
phase('Research', 'Market research, competitive analysis, customer interviews'),
|
|
16
|
+
phase('Strategy', 'Define business model, pricing, go-to-market strategy'),
|
|
17
|
+
phase('Financials', 'Build financial projections, cost model, break-even analysis'),
|
|
18
|
+
phase('Document', 'Write all sections of the business plan'),
|
|
19
|
+
phase('Review', 'Internal review, advisor feedback, investor testing'),
|
|
20
|
+
phase('Present', 'Finalize pitch materials and present to stakeholders'),
|
|
21
|
+
]);
|
|
22
|
+
},
|
|
23
|
+
generateFiles(model) {
|
|
24
|
+
return generateCommonFiles(model, 'full-plan');
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for business plan templates.
|
|
3
|
+
*/
|
|
4
|
+
import type { BusinessModel, BusinessStage, GTMPhase } from '../types.js';
|
|
5
|
+
import type { BusinessTemplateFile } from './types.js';
|
|
6
|
+
/** Create a GTM phase with auto-generated ID */
|
|
7
|
+
export declare function phase(name: string, description: string): GTMPhase;
|
|
8
|
+
/** Generate the standard scaffold files */
|
|
9
|
+
export declare function generateCommonFiles(model: BusinessModel, templateId: string): BusinessTemplateFile[];
|
|
10
|
+
/** Create base model with common fields */
|
|
11
|
+
export declare function baseModel(name: string, stage: BusinessStage, phases: GTMPhase[]): BusinessModel;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for business plan templates.
|
|
3
|
+
*/
|
|
4
|
+
import { generateBusinessId } from '../defaults.js';
|
|
5
|
+
/** Create a GTM phase with auto-generated ID */
|
|
6
|
+
export function phase(name, description) {
|
|
7
|
+
return { id: generateBusinessId('ph'), name, description };
|
|
8
|
+
}
|
|
9
|
+
/** Generate the standard scaffold files */
|
|
10
|
+
export function generateCommonFiles(model, templateId) {
|
|
11
|
+
const files = [];
|
|
12
|
+
files.push({
|
|
13
|
+
path: 'COMPILR.md',
|
|
14
|
+
content: `# ${model.identity.name}
|
|
15
|
+
|
|
16
|
+
## Project Type: Business Plan
|
|
17
|
+
**Template:** ${templateId}
|
|
18
|
+
**Stage:** ${model.identity.stage}
|
|
19
|
+
|
|
20
|
+
## Project Context
|
|
21
|
+
This is a business plan project. The agent team assists with
|
|
22
|
+
market analysis, financial modeling, competitive positioning,
|
|
23
|
+
and pitch preparation.
|
|
24
|
+
|
|
25
|
+
## Folder Structure
|
|
26
|
+
- \`sections/\` — Business plan sections (one file per section)
|
|
27
|
+
- \`research/\` — Market data, competitor profiles, industry reports
|
|
28
|
+
- \`financials/\` — Spreadsheets, projections, models
|
|
29
|
+
- \`knowledge/\` — Reference material and supporting documents
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
1. Run \`/business-vision\` to define the business identity and value proposition
|
|
33
|
+
2. Run \`/market-analysis\` to size the market and define customer segments
|
|
34
|
+
3. Run \`/competitor-analysis\` to map the competitive landscape
|
|
35
|
+
4. Run \`/financial-model\` to build revenue and cost projections
|
|
36
|
+
5. Run \`/pitch-outline\` to structure the investor pitch
|
|
37
|
+
6. Run \`/business-review\` to validate the complete plan
|
|
38
|
+
`,
|
|
39
|
+
});
|
|
40
|
+
// Section stub files
|
|
41
|
+
const sections = [
|
|
42
|
+
{ num: '01', slug: 'executive-summary', title: 'Executive Summary' },
|
|
43
|
+
{ num: '02', slug: 'problem-solution', title: 'Problem & Solution' },
|
|
44
|
+
{ num: '03', slug: 'market-analysis', title: 'Market Analysis' },
|
|
45
|
+
{ num: '04', slug: 'competitive-landscape', title: 'Competitive Landscape' },
|
|
46
|
+
{ num: '05', slug: 'business-model', title: 'Business Model' },
|
|
47
|
+
{ num: '06', slug: 'go-to-market', title: 'Go-to-Market Strategy' },
|
|
48
|
+
{ num: '07', slug: 'financial-projections', title: 'Financial Projections' },
|
|
49
|
+
{ num: '08', slug: 'team', title: 'Team' },
|
|
50
|
+
{ num: '09', slug: 'the-ask', title: 'The Ask' },
|
|
51
|
+
];
|
|
52
|
+
for (const sec of sections) {
|
|
53
|
+
files.push({
|
|
54
|
+
path: `sections/${sec.num}-${sec.slug}.md`,
|
|
55
|
+
content: `# ${sec.title}\n\n<!-- TODO: Draft this section -->\n\n`,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
// Empty directories
|
|
59
|
+
files.push({ path: 'research/.gitkeep', content: '' });
|
|
60
|
+
files.push({ path: 'financials/.gitkeep', content: '' });
|
|
61
|
+
files.push({ path: 'knowledge/.gitkeep', content: '' });
|
|
62
|
+
return files;
|
|
63
|
+
}
|
|
64
|
+
/** Create base model with common fields */
|
|
65
|
+
export function baseModel(name, stage, phases) {
|
|
66
|
+
const now = new Date().toISOString();
|
|
67
|
+
return {
|
|
68
|
+
identity: { name, stage },
|
|
69
|
+
valueProposition: { problem: '', solution: '', uniqueValue: '' },
|
|
70
|
+
market: { segments: [] },
|
|
71
|
+
competitors: [],
|
|
72
|
+
canvas: { revenueStreams: [], costStructure: [] },
|
|
73
|
+
financials: { revenueForecasts: [], expenseForecasts: [] },
|
|
74
|
+
goToMarket: { phases },
|
|
75
|
+
meta: { revision: 1, createdAt: now, updatedAt: now },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Business Plan Templates — barrel export
|
|
3
|
+
*/
|
|
4
|
+
export type { BusinessTemplate, BusinessTemplateFile } from './types.js';
|
|
5
|
+
import type { BusinessTemplate } from './types.js';
|
|
6
|
+
import { startupPitchTemplate } from './startup-pitch.js';
|
|
7
|
+
import { fullPlanTemplate } from './full-plan.js';
|
|
8
|
+
import { marketEntryTemplate } from './market-entry.js';
|
|
9
|
+
import { productLaunchTemplate } from './product-launch.js';
|
|
10
|
+
export { startupPitchTemplate, fullPlanTemplate, marketEntryTemplate, productLaunchTemplate };
|
|
11
|
+
export declare const BUSINESS_TEMPLATES: readonly BusinessTemplate[];
|
|
12
|
+
export declare function getBusinessTemplate(id: string): BusinessTemplate | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Business Plan Templates — barrel export
|
|
3
|
+
*/
|
|
4
|
+
import { startupPitchTemplate } from './startup-pitch.js';
|
|
5
|
+
import { fullPlanTemplate } from './full-plan.js';
|
|
6
|
+
import { marketEntryTemplate } from './market-entry.js';
|
|
7
|
+
import { productLaunchTemplate } from './product-launch.js';
|
|
8
|
+
export { startupPitchTemplate, fullPlanTemplate, marketEntryTemplate, productLaunchTemplate };
|
|
9
|
+
export const BUSINESS_TEMPLATES = [
|
|
10
|
+
startupPitchTemplate,
|
|
11
|
+
fullPlanTemplate,
|
|
12
|
+
marketEntryTemplate,
|
|
13
|
+
productLaunchTemplate,
|
|
14
|
+
];
|
|
15
|
+
export function getBusinessTemplate(id) {
|
|
16
|
+
return BUSINESS_TEMPLATES.find((t) => t.id === id);
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Market Entry Template
|
|
3
|
+
*
|
|
4
|
+
* Focused plan for entering a new market or launching in a new geography.
|
|
5
|
+
*/
|
|
6
|
+
import { phase, generateCommonFiles, baseModel } from './helpers.js';
|
|
7
|
+
export const marketEntryTemplate = {
|
|
8
|
+
id: 'market-entry',
|
|
9
|
+
name: 'Market Entry',
|
|
10
|
+
description: 'Enter a new market — market analysis, competitive landscape, go-to-market plan',
|
|
11
|
+
stage: 'growth',
|
|
12
|
+
createModel(name, stage) {
|
|
13
|
+
return baseModel(name, stage ?? 'growth', [
|
|
14
|
+
phase('Market Research', 'Analyze target market size, trends, regulations, and barriers'),
|
|
15
|
+
phase('Competitive Mapping', 'Identify local competitors and differentiation opportunities'),
|
|
16
|
+
phase('Localization', 'Adapt product, pricing, and messaging for the new market'),
|
|
17
|
+
phase('Launch', 'Execute market entry with initial partners and channels'),
|
|
18
|
+
phase('Scale', 'Expand distribution and optimize based on market feedback'),
|
|
19
|
+
]);
|
|
20
|
+
},
|
|
21
|
+
generateFiles(model) {
|
|
22
|
+
return generateCommonFiles(model, 'market-entry');
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Launch Template
|
|
3
|
+
*
|
|
4
|
+
* GTM-focused plan for launching a new product or feature line.
|
|
5
|
+
*/
|
|
6
|
+
import { phase, generateCommonFiles, baseModel } from './helpers.js';
|
|
7
|
+
export const productLaunchTemplate = {
|
|
8
|
+
id: 'product-launch',
|
|
9
|
+
name: 'Product Launch',
|
|
10
|
+
description: 'Launch a new product — positioning, channels, timeline, budget, metrics',
|
|
11
|
+
stage: 'growth',
|
|
12
|
+
createModel(name, stage) {
|
|
13
|
+
return baseModel(name, stage ?? 'growth', [
|
|
14
|
+
phase('Positioning', 'Define target audience, messaging, and competitive positioning'),
|
|
15
|
+
phase('Pre-Launch', 'Build landing page, waitlist, early access program'),
|
|
16
|
+
phase('Beta', 'Limited release to beta users, collect feedback, iterate'),
|
|
17
|
+
phase('Launch', 'Public launch across all channels'),
|
|
18
|
+
phase('Post-Launch', 'Monitor metrics, optimize conversion, expand reach'),
|
|
19
|
+
]);
|
|
20
|
+
},
|
|
21
|
+
generateFiles(model) {
|
|
22
|
+
return generateCommonFiles(model, 'product-launch');
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Startup Pitch Template
|
|
3
|
+
*
|
|
4
|
+
* Lean pitch structure for early-stage startups:
|
|
5
|
+
* Problem → Solution → Market → Traction → Team → Ask
|
|
6
|
+
*/
|
|
7
|
+
import { phase, generateCommonFiles, baseModel } from './helpers.js';
|
|
8
|
+
export const startupPitchTemplate = {
|
|
9
|
+
id: 'startup-pitch',
|
|
10
|
+
name: 'Startup Pitch',
|
|
11
|
+
description: 'Lean pitch for early-stage startups — problem, solution, market, traction, team, ask',
|
|
12
|
+
stage: 'pre-seed',
|
|
13
|
+
createModel(name, stage) {
|
|
14
|
+
return baseModel(name, stage ?? 'pre-seed', [
|
|
15
|
+
phase('Validate', 'Validate problem-solution fit with target customers'),
|
|
16
|
+
phase('MVP', 'Build minimum viable product and get first users'),
|
|
17
|
+
phase('Launch', 'Public launch and initial customer acquisition'),
|
|
18
|
+
phase('Fundraise', 'Prepare pitch deck and close funding round'),
|
|
19
|
+
]);
|
|
20
|
+
},
|
|
21
|
+
generateFiles(model) {
|
|
22
|
+
return generateCommonFiles(model, 'startup-pitch');
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Business Plan Template Types
|
|
3
|
+
*/
|
|
4
|
+
import type { BusinessModel, BusinessStage } from '../types.js';
|
|
5
|
+
export interface BusinessTemplate {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
readonly stage: BusinessStage;
|
|
10
|
+
/** Generate the Business Model with pre-populated structure */
|
|
11
|
+
createModel(name: string, stage?: BusinessStage): BusinessModel;
|
|
12
|
+
/** Generate scaffold files */
|
|
13
|
+
generateFiles(model: BusinessModel): BusinessTemplateFile[];
|
|
14
|
+
}
|
|
15
|
+
export interface BusinessTemplateFile {
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly content: string;
|
|
18
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,4 +29,5 @@ export { factoryScaffoldSkill, factorySkills } from './factory/skill.js';
|
|
|
29
29
|
export type { ResearchModel, Section, SectionStatus, Claim, ClaimType, EvidenceStrength, SourceRef, Source, SourceRelevance, CitationInfo, CitationType, CitationStyle, ResearchQuestion, QuestionStatus, ResearchMeta, ResearchValidationError, ResearchValidationResult, ResearchModelOperation, ResearchModelToolsConfig, BibliographyOptions, BibTeXEntry, ResearchTemplate, ResearchTemplateFile, ResearchScaffoldConfig, } from './research-model/index.js';
|
|
30
30
|
export { createDefaultResearchModel, createDefaultSection, createDefaultClaim, createDefaultSource, createDefaultQuestion, ResearchModelStore, applyResearchOperation, validateResearchModel, createResearchModelTools, generateBibliography, parseBibTeX, RESEARCH_TEMPLATES, getResearchTemplate, apaPaperTemplate, ieeePaperTemplate, thesisTemplate, literatureReviewTemplate, labReportTemplate, createResearchScaffoldTool, } from './research-model/index.js';
|
|
31
31
|
export type { BusinessModel, BusinessIdentity, BusinessStage, ValueProposition, Market, MarketSize, CustomerSegment, Competitor, MarketPosition, BusinessCanvas, RevenueStream, RevenueType, CostItem, Financials, ForecastEntry, GoToMarket, GTMPhase, TeamMember, BusinessMeta, BusinessValidationError, BusinessValidationResult, BusinessModelToolsConfig, } from './business-model/index.js';
|
|
32
|
-
export { createDefaultBusinessModel, BusinessModelStore, validateBusinessModel, createBusinessModelTools, } from './business-model/index.js';
|
|
32
|
+
export { createDefaultBusinessModel, BusinessModelStore, validateBusinessModel, createBusinessModelTools, startupPitchTemplate, fullPlanTemplate, marketEntryTemplate, productLaunchTemplate, BUSINESS_TEMPLATES, getBusinessTemplate, createBusinessScaffoldTool, } from './business-model/index.js';
|
|
33
|
+
export type { BusinessTemplate, BusinessTemplateFile, BusinessScaffoldConfig, } from './business-model/index.js';
|
package/dist/index.js
CHANGED
|
@@ -34,4 +34,4 @@ export { reactGoToolkit } from './toolkits/react-go/index.js';
|
|
|
34
34
|
// Factory skill (Phase 5)
|
|
35
35
|
export { factoryScaffoldSkill, factorySkills } from './factory/skill.js';
|
|
36
36
|
export { createDefaultResearchModel, createDefaultSection, createDefaultClaim, createDefaultSource, createDefaultQuestion, ResearchModelStore, applyResearchOperation, validateResearchModel, createResearchModelTools, generateBibliography, parseBibTeX, RESEARCH_TEMPLATES, getResearchTemplate, apaPaperTemplate, ieeePaperTemplate, thesisTemplate, literatureReviewTemplate, labReportTemplate, createResearchScaffoldTool, } from './research-model/index.js';
|
|
37
|
-
export { createDefaultBusinessModel, BusinessModelStore, validateBusinessModel, createBusinessModelTools, } from './business-model/index.js';
|
|
37
|
+
export { createDefaultBusinessModel, BusinessModelStore, validateBusinessModel, createBusinessModelTools, startupPitchTemplate, fullPlanTemplate, marketEntryTemplate, productLaunchTemplate, BUSINESS_TEMPLATES, getBusinessTemplate, createBusinessScaffoldTool, } from './business-model/index.js';
|