@girardmedia/bootspring 2.0.21 → 2.0.23
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/bin/bootspring.js +5 -0
- package/cli/org.js +474 -0
- package/cli/preseed/index.js +16 -0
- package/cli/preseed/interactive.js +143 -0
- package/cli/preseed/templates.js +227 -0
- package/cli/preseed.js +9 -301
- package/cli/seed/builders/ai-context-builder.js +85 -0
- package/cli/seed/builders/index.js +13 -0
- package/cli/seed/builders/seed-builder.js +272 -0
- package/cli/seed/extractors/content-extractors.js +383 -0
- package/cli/seed/extractors/index.js +47 -0
- package/cli/seed/extractors/metadata-extractors.js +167 -0
- package/cli/seed/extractors/section-extractor.js +54 -0
- package/cli/seed/extractors/stack-extractors.js +228 -0
- package/cli/seed/index.js +18 -0
- package/cli/seed/utils/folder-structure.js +84 -0
- package/cli/seed/utils/index.js +11 -0
- package/cli/seed.js +23 -1074
- package/core/api-client.js +77 -0
- package/core/entitlements.js +36 -0
- package/core/organizations.js +223 -0
- package/core/policies.js +51 -6
- package/core/policy-matrix.js +303 -0
- package/core/project-context.js +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +3220 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/context-McpJQa_2.d.ts +5710 -0
- package/dist/core/index.d.ts +635 -0
- package/dist/core/index.js +2593 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index-QqbeEiDm.d.ts +857 -0
- package/dist/index-UiYCgwiH.d.ts +174 -0
- package/dist/index.d.ts +453 -0
- package/dist/index.js +44228 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +41173 -0
- package/dist/mcp/index.js.map +1 -0
- package/generators/index.ts +82 -0
- package/intelligence/orchestrator/config/failure-signatures.js +48 -0
- package/intelligence/orchestrator/config/index.js +23 -0
- package/intelligence/orchestrator/config/pack-lifecycle.js +262 -0
- package/intelligence/orchestrator/config/phases.js +111 -0
- package/intelligence/orchestrator/config/remediation.js +150 -0
- package/intelligence/orchestrator/config/workflows.js +168 -0
- package/intelligence/orchestrator/core/index.js +16 -0
- package/intelligence/orchestrator/core/state-manager.js +88 -0
- package/intelligence/orchestrator/core/telemetry.js +24 -0
- package/intelligence/orchestrator/index.js +17 -0
- package/intelligence/orchestrator.js +17 -512
- package/mcp/contracts/mcp-contract.v1.json +1 -1
- package/package.json +16 -3
- package/src/cli/agent.ts +703 -0
- package/src/cli/analyze.ts +640 -0
- package/src/cli/audit.ts +707 -0
- package/src/cli/auth.ts +930 -0
- package/src/cli/billing.ts +364 -0
- package/src/cli/build.ts +1089 -0
- package/src/cli/business.ts +508 -0
- package/src/cli/checkpoint-utils.ts +236 -0
- package/src/cli/checkpoint.ts +757 -0
- package/src/cli/cloud-sync.ts +534 -0
- package/src/cli/content.ts +273 -0
- package/src/cli/context.ts +667 -0
- package/src/cli/dashboard.ts +133 -0
- package/src/cli/deploy.ts +704 -0
- package/src/cli/doctor.ts +480 -0
- package/src/cli/fundraise.ts +494 -0
- package/src/cli/generate.ts +346 -0
- package/src/cli/github-cmd.ts +566 -0
- package/src/cli/health.ts +599 -0
- package/src/cli/index.ts +113 -0
- package/src/cli/init.ts +838 -0
- package/src/cli/legal.ts +495 -0
- package/src/cli/log.ts +316 -0
- package/src/cli/loop.ts +1660 -0
- package/src/cli/manager.ts +878 -0
- package/src/cli/mcp.ts +275 -0
- package/src/cli/memory.ts +346 -0
- package/src/cli/metrics.ts +590 -0
- package/src/cli/monitor.ts +960 -0
- package/src/cli/mvp.ts +662 -0
- package/src/cli/onboard.ts +663 -0
- package/src/cli/orchestrator.ts +622 -0
- package/src/cli/plugin.ts +483 -0
- package/src/cli/prd.ts +671 -0
- package/src/cli/preseed-start.ts +1633 -0
- package/src/cli/preseed.ts +2434 -0
- package/src/cli/project.ts +526 -0
- package/src/cli/quality.ts +885 -0
- package/src/cli/security.ts +1079 -0
- package/src/cli/seed.ts +1224 -0
- package/src/cli/skill.ts +537 -0
- package/src/cli/suggest.ts +1225 -0
- package/src/cli/switch.ts +518 -0
- package/src/cli/task.ts +780 -0
- package/src/cli/telemetry.ts +172 -0
- package/src/cli/todo.ts +627 -0
- package/src/cli/types.ts +15 -0
- package/src/cli/update.ts +334 -0
- package/src/cli/visualize.ts +609 -0
- package/src/cli/watch.ts +895 -0
- package/src/cli/workspace.ts +709 -0
- package/src/core/action-recorder.ts +673 -0
- package/src/core/analyze-workflow.ts +1453 -0
- package/src/core/api-client.ts +1120 -0
- package/src/core/audit-workflow.ts +1681 -0
- package/src/core/auth.ts +471 -0
- package/src/core/build-orchestrator.ts +509 -0
- package/src/core/build-state.ts +621 -0
- package/src/core/checkpoint-engine.ts +482 -0
- package/src/core/config.ts +1285 -0
- package/src/core/context-loader.ts +694 -0
- package/src/core/context.ts +410 -0
- package/src/core/deploy-workflow.ts +1085 -0
- package/src/core/entitlements.ts +322 -0
- package/src/core/github-sync.ts +720 -0
- package/src/core/index.ts +981 -0
- package/src/core/ingest.ts +1186 -0
- package/src/core/metrics-engine.ts +886 -0
- package/src/core/mvp.ts +847 -0
- package/src/core/onboard-workflow.ts +1293 -0
- package/src/core/policies.ts +81 -0
- package/src/core/preseed-workflow.ts +1163 -0
- package/src/core/preseed.ts +1826 -0
- package/src/core/project-context.ts +380 -0
- package/src/core/project-state.ts +699 -0
- package/src/core/r2-sync.ts +691 -0
- package/src/core/scaffold.ts +1715 -0
- package/src/core/session.ts +286 -0
- package/src/core/task-extractor.ts +799 -0
- package/src/core/telemetry.ts +371 -0
- package/src/core/tier-enforcement.ts +737 -0
- package/src/core/utils.ts +437 -0
- package/src/index.ts +29 -0
- package/src/intelligence/agent-collab.ts +2376 -0
- package/src/intelligence/auto-suggest.ts +713 -0
- package/src/intelligence/content-gen.ts +1351 -0
- package/src/intelligence/cross-project.ts +1692 -0
- package/src/intelligence/git-memory.ts +529 -0
- package/src/intelligence/index.ts +318 -0
- package/src/intelligence/orchestrator.ts +534 -0
- package/src/intelligence/prd.ts +466 -0
- package/src/intelligence/recommendations.ts +982 -0
- package/src/intelligence/workflow-composer.ts +1472 -0
- package/src/mcp/capabilities.ts +233 -0
- package/src/mcp/index.ts +37 -0
- package/src/mcp/registry.ts +1268 -0
- package/src/mcp/response-formatter.ts +797 -0
- package/src/mcp/server.ts +240 -0
- package/src/types/agent.ts +69 -0
- package/src/types/config.ts +86 -0
- package/src/types/context.ts +77 -0
- package/src/types/index.ts +53 -0
- package/src/types/mcp.ts +91 -0
- package/src/types/skills.ts +47 -0
- package/src/types/workflow.ts +155 -0
- package/generators/index.js +0 -18
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document Templates
|
|
3
|
+
* Template generation for preseed documents
|
|
4
|
+
* @package bootspring
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Generate a document template
|
|
9
|
+
* @param {string} docType - Document type (vision, audience, etc.)
|
|
10
|
+
* @param {string} name - Fallback document name
|
|
11
|
+
* @returns {string} Template content
|
|
12
|
+
*/
|
|
13
|
+
function generateDocumentTemplate(docType, name) {
|
|
14
|
+
const date = new Date().toISOString().split('T')[0];
|
|
15
|
+
const templates = {
|
|
16
|
+
vision: `# Vision Document
|
|
17
|
+
|
|
18
|
+
**Generated:** ${date}
|
|
19
|
+
|
|
20
|
+
## The Problem
|
|
21
|
+
|
|
22
|
+
*Describe the problem you're solving...*
|
|
23
|
+
|
|
24
|
+
## Our Solution
|
|
25
|
+
|
|
26
|
+
*Describe your solution...*
|
|
27
|
+
|
|
28
|
+
### Key Features
|
|
29
|
+
|
|
30
|
+
- Feature 1
|
|
31
|
+
- Feature 2
|
|
32
|
+
- Feature 3
|
|
33
|
+
|
|
34
|
+
### Unique Value Proposition
|
|
35
|
+
|
|
36
|
+
*What makes your solution unique?*
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
*This is a draft. Edit and approve to continue.*
|
|
40
|
+
`,
|
|
41
|
+
audience: `# Target Audience
|
|
42
|
+
|
|
43
|
+
**Generated:** ${date}
|
|
44
|
+
|
|
45
|
+
## Primary Audience
|
|
46
|
+
|
|
47
|
+
*Describe your primary audience...*
|
|
48
|
+
|
|
49
|
+
## Market Segments
|
|
50
|
+
|
|
51
|
+
1. Segment 1
|
|
52
|
+
2. Segment 2
|
|
53
|
+
|
|
54
|
+
## User Personas
|
|
55
|
+
|
|
56
|
+
### Persona 1
|
|
57
|
+
|
|
58
|
+
**Role:** *Job title*
|
|
59
|
+
**Goals:** *What they want to achieve*
|
|
60
|
+
**Pain Points:** *What frustrates them*
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
*This is a draft. Edit and approve to continue.*
|
|
64
|
+
`,
|
|
65
|
+
market: `# Market Analysis
|
|
66
|
+
|
|
67
|
+
**Generated:** ${date}
|
|
68
|
+
|
|
69
|
+
## Market Size
|
|
70
|
+
|
|
71
|
+
| Metric | Value |
|
|
72
|
+
|--------|-------|
|
|
73
|
+
| TAM | $X billion |
|
|
74
|
+
| SAM | $X million |
|
|
75
|
+
| SOM | $X million |
|
|
76
|
+
|
|
77
|
+
## Market Trends
|
|
78
|
+
|
|
79
|
+
- Trend 1
|
|
80
|
+
- Trend 2
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
*This is a draft. Edit and approve to continue.*
|
|
84
|
+
`,
|
|
85
|
+
competitors: `# Competitive Analysis
|
|
86
|
+
|
|
87
|
+
**Generated:** ${date}
|
|
88
|
+
|
|
89
|
+
## Direct Competitors
|
|
90
|
+
|
|
91
|
+
| Company | Strengths | Weaknesses |
|
|
92
|
+
|---------|-----------|------------|
|
|
93
|
+
| Competitor 1 | ... | ... |
|
|
94
|
+
|
|
95
|
+
## Our Positioning
|
|
96
|
+
|
|
97
|
+
*How we differentiate...*
|
|
98
|
+
|
|
99
|
+
## Key Differentiators
|
|
100
|
+
|
|
101
|
+
1. Differentiator 1
|
|
102
|
+
2. Differentiator 2
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
*This is a draft. Edit and approve to continue.*
|
|
106
|
+
`,
|
|
107
|
+
'business-model': `# Business Model
|
|
108
|
+
|
|
109
|
+
**Generated:** ${date}
|
|
110
|
+
|
|
111
|
+
## Model Type
|
|
112
|
+
|
|
113
|
+
*Subscription / Freemium / Usage-based / etc.*
|
|
114
|
+
|
|
115
|
+
## Revenue Streams
|
|
116
|
+
|
|
117
|
+
1. Primary revenue source
|
|
118
|
+
2. Secondary revenue source
|
|
119
|
+
|
|
120
|
+
## Pricing Strategy
|
|
121
|
+
|
|
122
|
+
| Tier | Price | Features |
|
|
123
|
+
|------|-------|----------|
|
|
124
|
+
| Free | $0 | Basic |
|
|
125
|
+
| Pro | $X/mo | Advanced |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
*This is a draft. Edit and approve to continue.*
|
|
129
|
+
`,
|
|
130
|
+
prd: `# Product Requirements Document
|
|
131
|
+
|
|
132
|
+
**Generated:** ${date}
|
|
133
|
+
**Version:** 1.0
|
|
134
|
+
|
|
135
|
+
## Product Vision
|
|
136
|
+
|
|
137
|
+
*What we're building and why...*
|
|
138
|
+
|
|
139
|
+
## MVP Features
|
|
140
|
+
|
|
141
|
+
| Feature | Priority | Description |
|
|
142
|
+
|---------|----------|-------------|
|
|
143
|
+
| Feature 1 | P1 | ... |
|
|
144
|
+
| Feature 2 | P1 | ... |
|
|
145
|
+
|
|
146
|
+
## User Stories
|
|
147
|
+
|
|
148
|
+
### US-001: User Login
|
|
149
|
+
|
|
150
|
+
**As a** user
|
|
151
|
+
**I want to** log in to my account
|
|
152
|
+
**So that** I can access my data
|
|
153
|
+
|
|
154
|
+
**Acceptance Criteria:**
|
|
155
|
+
- [ ] User can enter email/password
|
|
156
|
+
- [ ] System validates credentials
|
|
157
|
+
- [ ] User is redirected to dashboard
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
*This is a draft. Edit and approve to continue.*
|
|
161
|
+
`,
|
|
162
|
+
'technical-spec': `# Technical Specification
|
|
163
|
+
|
|
164
|
+
**Generated:** ${date}
|
|
165
|
+
|
|
166
|
+
## Technology Stack
|
|
167
|
+
|
|
168
|
+
| Component | Technology |
|
|
169
|
+
|-----------|------------|
|
|
170
|
+
| Frontend | ... |
|
|
171
|
+
| Backend | ... |
|
|
172
|
+
| Database | ... |
|
|
173
|
+
|
|
174
|
+
## Architecture Overview
|
|
175
|
+
|
|
176
|
+
*High-level architecture description...*
|
|
177
|
+
|
|
178
|
+
## Third-Party Integrations
|
|
179
|
+
|
|
180
|
+
- Integration 1
|
|
181
|
+
- Integration 2
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
*This is a draft. Edit and approve to continue.*
|
|
185
|
+
`,
|
|
186
|
+
roadmap: `# Product Roadmap
|
|
187
|
+
|
|
188
|
+
**Generated:** ${date}
|
|
189
|
+
|
|
190
|
+
## Development Phases
|
|
191
|
+
|
|
192
|
+
### Phase 1: MVP
|
|
193
|
+
|
|
194
|
+
**Duration:** X weeks
|
|
195
|
+
|
|
196
|
+
**Goals:**
|
|
197
|
+
- Launch core features
|
|
198
|
+
- Validate with early users
|
|
199
|
+
|
|
200
|
+
**Deliverables:**
|
|
201
|
+
- [ ] Core feature 1
|
|
202
|
+
- [ ] Core feature 2
|
|
203
|
+
|
|
204
|
+
### Phase 2: Growth
|
|
205
|
+
|
|
206
|
+
**Duration:** X months
|
|
207
|
+
|
|
208
|
+
**Goals:**
|
|
209
|
+
- Scale user base
|
|
210
|
+
- Add key features
|
|
211
|
+
|
|
212
|
+
## Key Milestones
|
|
213
|
+
|
|
214
|
+
| Milestone | Target Date | Status |
|
|
215
|
+
|-----------|-------------|--------|
|
|
216
|
+
| MVP Launch | TBD | Planned |
|
|
217
|
+
| Beta | TBD | Planned |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
*This is a draft. Edit and approve to continue.*
|
|
221
|
+
`
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
return templates[docType] || `# ${name}\n\n**Generated:** ${date}\n\n*Add content here...*\n`;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
module.exports = { generateDocumentTemplate };
|
package/cli/preseed.js
CHANGED
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
const path = require('path');
|
|
32
32
|
const fs = require('fs');
|
|
33
|
-
const readline = require('readline');
|
|
34
33
|
const config = require('../core/config');
|
|
35
34
|
const utils = require('../core/utils');
|
|
36
35
|
const { PreseedEngine, PRESETS, DOCUMENT_TYPES } = require('../core/preseed');
|
|
@@ -46,30 +45,15 @@ const session = require('../core/session');
|
|
|
46
45
|
const preseedStart = require('./preseed-start');
|
|
47
46
|
const tierEnforcement = require('../core/tier-enforcement');
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Ask a text question
|
|
61
|
-
*/
|
|
62
|
-
function askText(rl, question, defaultValue = '') {
|
|
63
|
-
const prompt = defaultValue
|
|
64
|
-
? `${question} ${utils.COLORS.dim}[${defaultValue}]${utils.COLORS.reset}: `
|
|
65
|
-
: `${question}: `;
|
|
66
|
-
|
|
67
|
-
return new Promise((resolve) => {
|
|
68
|
-
rl.question(prompt, (answer) => {
|
|
69
|
-
resolve(answer.trim() || defaultValue);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
}
|
|
48
|
+
// Import from extracted modules
|
|
49
|
+
const {
|
|
50
|
+
createInterface,
|
|
51
|
+
askText,
|
|
52
|
+
askList,
|
|
53
|
+
askChoice,
|
|
54
|
+
displaySection
|
|
55
|
+
} = require('./preseed/interactive');
|
|
56
|
+
const { generateDocumentTemplate } = require('./preseed/templates');
|
|
73
57
|
|
|
74
58
|
/**
|
|
75
59
|
* Ask a multi-line text question
|
|
@@ -96,64 +80,6 @@ function _askMultiLine(rl, question, hint = 'Enter text (empty line to finish)')
|
|
|
96
80
|
});
|
|
97
81
|
}
|
|
98
82
|
|
|
99
|
-
/**
|
|
100
|
-
* Ask a list question (comma-separated)
|
|
101
|
-
*/
|
|
102
|
-
function askList(rl, question, hint = 'Enter comma-separated values') {
|
|
103
|
-
return new Promise((resolve) => {
|
|
104
|
-
console.log(`\n${utils.COLORS.bold}${question}${utils.COLORS.reset}`);
|
|
105
|
-
console.log(`${utils.COLORS.dim}${hint}${utils.COLORS.reset}`);
|
|
106
|
-
|
|
107
|
-
rl.question('> ', (answer) => {
|
|
108
|
-
const items = answer
|
|
109
|
-
.split(',')
|
|
110
|
-
.map(s => s.trim())
|
|
111
|
-
.filter(s => s.length > 0);
|
|
112
|
-
resolve(items);
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Ask a choice question
|
|
119
|
-
*/
|
|
120
|
-
function askChoice(rl, question, options, defaultIndex = 0) {
|
|
121
|
-
return new Promise((resolve) => {
|
|
122
|
-
console.log(`\n${utils.COLORS.bold}${question}${utils.COLORS.reset}`);
|
|
123
|
-
|
|
124
|
-
options.forEach((opt, i) => {
|
|
125
|
-
const marker = i === defaultIndex
|
|
126
|
-
? `${utils.COLORS.cyan}>${utils.COLORS.reset}`
|
|
127
|
-
: ' ';
|
|
128
|
-
const label = typeof opt === 'object' ? opt.label : opt;
|
|
129
|
-
const desc = typeof opt === 'object' && opt.description
|
|
130
|
-
? ` ${utils.COLORS.dim}- ${opt.description}${utils.COLORS.reset}`
|
|
131
|
-
: '';
|
|
132
|
-
console.log(` ${marker} ${i + 1}. ${label}${desc}`);
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
rl.question(`\n${utils.COLORS.dim}Select [1-${options.length}]${utils.COLORS.reset}: `, (answer) => {
|
|
136
|
-
const index = parseInt(answer, 10) - 1;
|
|
137
|
-
const selectedIndex = (index >= 0 && index < options.length) ? index : defaultIndex;
|
|
138
|
-
const selected = options[selectedIndex];
|
|
139
|
-
resolve(typeof selected === 'object' ? selected.value : selected);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Display section header
|
|
146
|
-
*/
|
|
147
|
-
function displaySection(number, total, title, description) {
|
|
148
|
-
console.log('\n');
|
|
149
|
-
console.log(`${utils.COLORS.cyan}${'━'.repeat(60)}${utils.COLORS.reset}`);
|
|
150
|
-
console.log(`${utils.COLORS.bold}Step ${number}/${total}: ${title}${utils.COLORS.reset}`);
|
|
151
|
-
if (description) {
|
|
152
|
-
console.log(`${utils.COLORS.dim}${description}${utils.COLORS.reset}`);
|
|
153
|
-
}
|
|
154
|
-
console.log(`${utils.COLORS.cyan}${'━'.repeat(60)}${utils.COLORS.reset}`);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
83
|
/**
|
|
158
84
|
* Run the preseed wizard
|
|
159
85
|
*/
|
|
@@ -1705,224 +1631,6 @@ async function runWorkflowLoop(workflow) {
|
|
|
1705
1631
|
}
|
|
1706
1632
|
}
|
|
1707
1633
|
}
|
|
1708
|
-
|
|
1709
|
-
/**
|
|
1710
|
-
* Generate a document template
|
|
1711
|
-
*/
|
|
1712
|
-
function generateDocumentTemplate(docType, name) {
|
|
1713
|
-
const date = new Date().toISOString().split('T')[0];
|
|
1714
|
-
const templates = {
|
|
1715
|
-
vision: `# Vision Document
|
|
1716
|
-
|
|
1717
|
-
**Generated:** ${date}
|
|
1718
|
-
|
|
1719
|
-
## The Problem
|
|
1720
|
-
|
|
1721
|
-
*Describe the problem you're solving...*
|
|
1722
|
-
|
|
1723
|
-
## Our Solution
|
|
1724
|
-
|
|
1725
|
-
*Describe your solution...*
|
|
1726
|
-
|
|
1727
|
-
### Key Features
|
|
1728
|
-
|
|
1729
|
-
- Feature 1
|
|
1730
|
-
- Feature 2
|
|
1731
|
-
- Feature 3
|
|
1732
|
-
|
|
1733
|
-
### Unique Value Proposition
|
|
1734
|
-
|
|
1735
|
-
*What makes your solution unique?*
|
|
1736
|
-
|
|
1737
|
-
---
|
|
1738
|
-
*This is a draft. Edit and approve to continue.*
|
|
1739
|
-
`,
|
|
1740
|
-
audience: `# Target Audience
|
|
1741
|
-
|
|
1742
|
-
**Generated:** ${date}
|
|
1743
|
-
|
|
1744
|
-
## Primary Audience
|
|
1745
|
-
|
|
1746
|
-
*Describe your primary audience...*
|
|
1747
|
-
|
|
1748
|
-
## Market Segments
|
|
1749
|
-
|
|
1750
|
-
1. Segment 1
|
|
1751
|
-
2. Segment 2
|
|
1752
|
-
|
|
1753
|
-
## User Personas
|
|
1754
|
-
|
|
1755
|
-
### Persona 1
|
|
1756
|
-
|
|
1757
|
-
**Role:** *Job title*
|
|
1758
|
-
**Goals:** *What they want to achieve*
|
|
1759
|
-
**Pain Points:** *What frustrates them*
|
|
1760
|
-
|
|
1761
|
-
---
|
|
1762
|
-
*This is a draft. Edit and approve to continue.*
|
|
1763
|
-
`,
|
|
1764
|
-
market: `# Market Analysis
|
|
1765
|
-
|
|
1766
|
-
**Generated:** ${date}
|
|
1767
|
-
|
|
1768
|
-
## Market Size
|
|
1769
|
-
|
|
1770
|
-
| Metric | Value |
|
|
1771
|
-
|--------|-------|
|
|
1772
|
-
| TAM | $X billion |
|
|
1773
|
-
| SAM | $X million |
|
|
1774
|
-
| SOM | $X million |
|
|
1775
|
-
|
|
1776
|
-
## Market Trends
|
|
1777
|
-
|
|
1778
|
-
- Trend 1
|
|
1779
|
-
- Trend 2
|
|
1780
|
-
|
|
1781
|
-
---
|
|
1782
|
-
*This is a draft. Edit and approve to continue.*
|
|
1783
|
-
`,
|
|
1784
|
-
competitors: `# Competitive Analysis
|
|
1785
|
-
|
|
1786
|
-
**Generated:** ${date}
|
|
1787
|
-
|
|
1788
|
-
## Direct Competitors
|
|
1789
|
-
|
|
1790
|
-
| Company | Strengths | Weaknesses |
|
|
1791
|
-
|---------|-----------|------------|
|
|
1792
|
-
| Competitor 1 | ... | ... |
|
|
1793
|
-
|
|
1794
|
-
## Our Positioning
|
|
1795
|
-
|
|
1796
|
-
*How we differentiate...*
|
|
1797
|
-
|
|
1798
|
-
## Key Differentiators
|
|
1799
|
-
|
|
1800
|
-
1. Differentiator 1
|
|
1801
|
-
2. Differentiator 2
|
|
1802
|
-
|
|
1803
|
-
---
|
|
1804
|
-
*This is a draft. Edit and approve to continue.*
|
|
1805
|
-
`,
|
|
1806
|
-
'business-model': `# Business Model
|
|
1807
|
-
|
|
1808
|
-
**Generated:** ${date}
|
|
1809
|
-
|
|
1810
|
-
## Model Type
|
|
1811
|
-
|
|
1812
|
-
*Subscription / Freemium / Usage-based / etc.*
|
|
1813
|
-
|
|
1814
|
-
## Revenue Streams
|
|
1815
|
-
|
|
1816
|
-
1. Primary revenue source
|
|
1817
|
-
2. Secondary revenue source
|
|
1818
|
-
|
|
1819
|
-
## Pricing Strategy
|
|
1820
|
-
|
|
1821
|
-
| Tier | Price | Features |
|
|
1822
|
-
|------|-------|----------|
|
|
1823
|
-
| Free | $0 | Basic |
|
|
1824
|
-
| Pro | $X/mo | Advanced |
|
|
1825
|
-
|
|
1826
|
-
---
|
|
1827
|
-
*This is a draft. Edit and approve to continue.*
|
|
1828
|
-
`,
|
|
1829
|
-
prd: `# Product Requirements Document
|
|
1830
|
-
|
|
1831
|
-
**Generated:** ${date}
|
|
1832
|
-
**Version:** 1.0
|
|
1833
|
-
|
|
1834
|
-
## Product Vision
|
|
1835
|
-
|
|
1836
|
-
*What we're building and why...*
|
|
1837
|
-
|
|
1838
|
-
## MVP Features
|
|
1839
|
-
|
|
1840
|
-
| Feature | Priority | Description |
|
|
1841
|
-
|---------|----------|-------------|
|
|
1842
|
-
| Feature 1 | P1 | ... |
|
|
1843
|
-
| Feature 2 | P1 | ... |
|
|
1844
|
-
|
|
1845
|
-
## User Stories
|
|
1846
|
-
|
|
1847
|
-
### US-001: User Login
|
|
1848
|
-
|
|
1849
|
-
**As a** user
|
|
1850
|
-
**I want to** log in to my account
|
|
1851
|
-
**So that** I can access my data
|
|
1852
|
-
|
|
1853
|
-
**Acceptance Criteria:**
|
|
1854
|
-
- [ ] User can enter email/password
|
|
1855
|
-
- [ ] System validates credentials
|
|
1856
|
-
- [ ] User is redirected to dashboard
|
|
1857
|
-
|
|
1858
|
-
---
|
|
1859
|
-
*This is a draft. Edit and approve to continue.*
|
|
1860
|
-
`,
|
|
1861
|
-
'technical-spec': `# Technical Specification
|
|
1862
|
-
|
|
1863
|
-
**Generated:** ${date}
|
|
1864
|
-
|
|
1865
|
-
## Technology Stack
|
|
1866
|
-
|
|
1867
|
-
| Component | Technology |
|
|
1868
|
-
|-----------|------------|
|
|
1869
|
-
| Frontend | ... |
|
|
1870
|
-
| Backend | ... |
|
|
1871
|
-
| Database | ... |
|
|
1872
|
-
|
|
1873
|
-
## Architecture Overview
|
|
1874
|
-
|
|
1875
|
-
*High-level architecture description...*
|
|
1876
|
-
|
|
1877
|
-
## Third-Party Integrations
|
|
1878
|
-
|
|
1879
|
-
- Integration 1
|
|
1880
|
-
- Integration 2
|
|
1881
|
-
|
|
1882
|
-
---
|
|
1883
|
-
*This is a draft. Edit and approve to continue.*
|
|
1884
|
-
`,
|
|
1885
|
-
roadmap: `# Product Roadmap
|
|
1886
|
-
|
|
1887
|
-
**Generated:** ${date}
|
|
1888
|
-
|
|
1889
|
-
## Development Phases
|
|
1890
|
-
|
|
1891
|
-
### Phase 1: MVP
|
|
1892
|
-
|
|
1893
|
-
**Duration:** X weeks
|
|
1894
|
-
|
|
1895
|
-
**Goals:**
|
|
1896
|
-
- Launch core features
|
|
1897
|
-
- Validate with early users
|
|
1898
|
-
|
|
1899
|
-
**Deliverables:**
|
|
1900
|
-
- [ ] Core feature 1
|
|
1901
|
-
- [ ] Core feature 2
|
|
1902
|
-
|
|
1903
|
-
### Phase 2: Growth
|
|
1904
|
-
|
|
1905
|
-
**Duration:** X months
|
|
1906
|
-
|
|
1907
|
-
**Goals:**
|
|
1908
|
-
- Scale user base
|
|
1909
|
-
- Add key features
|
|
1910
|
-
|
|
1911
|
-
## Key Milestones
|
|
1912
|
-
|
|
1913
|
-
| Milestone | Target Date | Status |
|
|
1914
|
-
|-----------|-------------|--------|
|
|
1915
|
-
| MVP Launch | TBD | Planned |
|
|
1916
|
-
| Beta | TBD | Planned |
|
|
1917
|
-
|
|
1918
|
-
---
|
|
1919
|
-
*This is a draft. Edit and approve to continue.*
|
|
1920
|
-
`
|
|
1921
|
-
};
|
|
1922
|
-
|
|
1923
|
-
return templates[docType] || `# ${name}\n\n**Generated:** ${date}\n\n*Add content here...*\n`;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
1634
|
/**
|
|
1927
1635
|
* Format quality score with color
|
|
1928
1636
|
*/
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Context Builder - Generate CLAUDE.md and AGENTS.md
|
|
3
|
+
* @package bootspring
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const utils = require('../../../core/utils');
|
|
9
|
+
const claudeTemplate = require('../../../generators/templates/claude.template');
|
|
10
|
+
const agentsTemplate = require('../../../generators/templates/agents.template');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Generate AI context files (CLAUDE.md and AGENTS.md)
|
|
14
|
+
* @param {string} projectRoot - Project root path
|
|
15
|
+
* @param {object} scaffoldConfig - Configuration object
|
|
16
|
+
* @returns {object} Results of generation
|
|
17
|
+
*/
|
|
18
|
+
function generateAIContextFiles(projectRoot, scaffoldConfig) {
|
|
19
|
+
const results = { claudeMd: false, agentsMd: false, planningAgentsMd: false };
|
|
20
|
+
|
|
21
|
+
// Build a config object suitable for the templates
|
|
22
|
+
const cfg = {
|
|
23
|
+
project: {
|
|
24
|
+
name: scaffoldConfig.project?.name || 'My Project',
|
|
25
|
+
description: scaffoldConfig.project?.description || '',
|
|
26
|
+
version: scaffoldConfig.project?.version || '0.1.0',
|
|
27
|
+
status: 'development'
|
|
28
|
+
},
|
|
29
|
+
stack: scaffoldConfig.stack || {
|
|
30
|
+
framework: 'nextjs',
|
|
31
|
+
language: 'typescript',
|
|
32
|
+
database: 'postgresql',
|
|
33
|
+
hosting: 'vercel'
|
|
34
|
+
},
|
|
35
|
+
frontend: scaffoldConfig.frontend || {
|
|
36
|
+
uiLibrary: 'shadcn',
|
|
37
|
+
styling: 'tailwind'
|
|
38
|
+
},
|
|
39
|
+
backend: scaffoldConfig.backend || {
|
|
40
|
+
orm: 'prisma',
|
|
41
|
+
auth: 'clerk'
|
|
42
|
+
},
|
|
43
|
+
plugins: scaffoldConfig.plugins || {},
|
|
44
|
+
instructions: scaffoldConfig.instructions || {},
|
|
45
|
+
workflow: scaffoldConfig.workflow || {},
|
|
46
|
+
business: scaffoldConfig.business || {}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// Generate CLAUDE.md
|
|
50
|
+
try {
|
|
51
|
+
const claudePath = path.join(projectRoot, 'CLAUDE.md');
|
|
52
|
+
const claudeContent = claudeTemplate.generate(cfg);
|
|
53
|
+
fs.writeFileSync(claudePath, claudeContent);
|
|
54
|
+
results.claudeMd = true;
|
|
55
|
+
} catch (error) {
|
|
56
|
+
utils.print.debug(`Failed to generate CLAUDE.md: ${error.message}`);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Generate AGENTS.md (root level)
|
|
60
|
+
try {
|
|
61
|
+
const agentsPath = path.join(projectRoot, 'AGENTS.md');
|
|
62
|
+
const agentsContent = agentsTemplate.generate(cfg);
|
|
63
|
+
fs.writeFileSync(agentsPath, agentsContent);
|
|
64
|
+
results.agentsMd = true;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
utils.print.debug(`Failed to generate AGENTS.md: ${error.message}`);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Generate planning/AGENTS.md if planning folder exists
|
|
70
|
+
const planningDir = path.join(projectRoot, 'planning');
|
|
71
|
+
if (fs.existsSync(planningDir)) {
|
|
72
|
+
try {
|
|
73
|
+
const planningAgentsPath = path.join(planningDir, 'AGENTS.md');
|
|
74
|
+
const planningAgentsContent = agentsTemplate.generatePlanningAgents(cfg);
|
|
75
|
+
fs.writeFileSync(planningAgentsPath, planningAgentsContent);
|
|
76
|
+
results.planningAgentsMd = true;
|
|
77
|
+
} catch (error) {
|
|
78
|
+
utils.print.debug(`Failed to generate planning/AGENTS.md: ${error.message}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return results;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
module.exports = { generateAIContextFiles };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seed Builders - Re-export all builder functions
|
|
3
|
+
* @package bootspring
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const { generateSeedFromPreseed, generateEnhancementPrompt } = require('./seed-builder');
|
|
7
|
+
const { generateAIContextFiles } = require('./ai-context-builder');
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
generateSeedFromPreseed,
|
|
11
|
+
generateEnhancementPrompt,
|
|
12
|
+
generateAIContextFiles
|
|
13
|
+
};
|