@girardmedia/bootspring 2.0.21 → 2.0.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.
Files changed (147) hide show
  1. package/cli/preseed/index.js +16 -0
  2. package/cli/preseed/interactive.js +143 -0
  3. package/cli/preseed/templates.js +227 -0
  4. package/cli/seed/builders/ai-context-builder.js +85 -0
  5. package/cli/seed/builders/index.js +13 -0
  6. package/cli/seed/builders/seed-builder.js +272 -0
  7. package/cli/seed/extractors/content-extractors.js +383 -0
  8. package/cli/seed/extractors/index.js +47 -0
  9. package/cli/seed/extractors/metadata-extractors.js +167 -0
  10. package/cli/seed/extractors/section-extractor.js +54 -0
  11. package/cli/seed/extractors/stack-extractors.js +228 -0
  12. package/cli/seed/index.js +18 -0
  13. package/cli/seed/utils/folder-structure.js +84 -0
  14. package/cli/seed/utils/index.js +11 -0
  15. package/dist/cli/index.d.ts +3 -0
  16. package/dist/cli/index.js +3220 -0
  17. package/dist/cli/index.js.map +1 -0
  18. package/dist/context-McpJQa_2.d.ts +5710 -0
  19. package/dist/core/index.d.ts +635 -0
  20. package/dist/core/index.js +2593 -0
  21. package/dist/core/index.js.map +1 -0
  22. package/dist/index-QqbeEiDm.d.ts +857 -0
  23. package/dist/index-UiYCgwiH.d.ts +174 -0
  24. package/dist/index.d.ts +453 -0
  25. package/dist/index.js +44228 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/mcp/index.d.ts +1 -0
  28. package/dist/mcp/index.js +41173 -0
  29. package/dist/mcp/index.js.map +1 -0
  30. package/generators/index.ts +82 -0
  31. package/intelligence/orchestrator/config/failure-signatures.js +48 -0
  32. package/intelligence/orchestrator/config/index.js +20 -0
  33. package/intelligence/orchestrator/config/phases.js +111 -0
  34. package/intelligence/orchestrator/config/remediation.js +150 -0
  35. package/intelligence/orchestrator/config/workflows.js +168 -0
  36. package/intelligence/orchestrator/core/index.js +16 -0
  37. package/intelligence/orchestrator/core/state-manager.js +88 -0
  38. package/intelligence/orchestrator/core/telemetry.js +24 -0
  39. package/intelligence/orchestrator/index.js +17 -0
  40. package/mcp/contracts/mcp-contract.v1.json +1 -1
  41. package/package.json +16 -3
  42. package/src/cli/agent.ts +703 -0
  43. package/src/cli/analyze.ts +640 -0
  44. package/src/cli/audit.ts +707 -0
  45. package/src/cli/auth.ts +930 -0
  46. package/src/cli/billing.ts +364 -0
  47. package/src/cli/build.ts +1089 -0
  48. package/src/cli/business.ts +508 -0
  49. package/src/cli/checkpoint-utils.ts +236 -0
  50. package/src/cli/checkpoint.ts +757 -0
  51. package/src/cli/cloud-sync.ts +534 -0
  52. package/src/cli/content.ts +273 -0
  53. package/src/cli/context.ts +667 -0
  54. package/src/cli/dashboard.ts +133 -0
  55. package/src/cli/deploy.ts +704 -0
  56. package/src/cli/doctor.ts +480 -0
  57. package/src/cli/fundraise.ts +494 -0
  58. package/src/cli/generate.ts +346 -0
  59. package/src/cli/github-cmd.ts +566 -0
  60. package/src/cli/health.ts +599 -0
  61. package/src/cli/index.ts +113 -0
  62. package/src/cli/init.ts +838 -0
  63. package/src/cli/legal.ts +495 -0
  64. package/src/cli/log.ts +316 -0
  65. package/src/cli/loop.ts +1660 -0
  66. package/src/cli/manager.ts +878 -0
  67. package/src/cli/mcp.ts +275 -0
  68. package/src/cli/memory.ts +346 -0
  69. package/src/cli/metrics.ts +590 -0
  70. package/src/cli/monitor.ts +960 -0
  71. package/src/cli/mvp.ts +662 -0
  72. package/src/cli/onboard.ts +663 -0
  73. package/src/cli/orchestrator.ts +622 -0
  74. package/src/cli/plugin.ts +483 -0
  75. package/src/cli/prd.ts +671 -0
  76. package/src/cli/preseed-start.ts +1633 -0
  77. package/src/cli/preseed.ts +2434 -0
  78. package/src/cli/project.ts +526 -0
  79. package/src/cli/quality.ts +885 -0
  80. package/src/cli/security.ts +1079 -0
  81. package/src/cli/seed.ts +1224 -0
  82. package/src/cli/skill.ts +537 -0
  83. package/src/cli/suggest.ts +1225 -0
  84. package/src/cli/switch.ts +518 -0
  85. package/src/cli/task.ts +780 -0
  86. package/src/cli/telemetry.ts +172 -0
  87. package/src/cli/todo.ts +627 -0
  88. package/src/cli/types.ts +15 -0
  89. package/src/cli/update.ts +334 -0
  90. package/src/cli/visualize.ts +609 -0
  91. package/src/cli/watch.ts +895 -0
  92. package/src/cli/workspace.ts +709 -0
  93. package/src/core/action-recorder.ts +673 -0
  94. package/src/core/analyze-workflow.ts +1453 -0
  95. package/src/core/api-client.ts +1120 -0
  96. package/src/core/audit-workflow.ts +1681 -0
  97. package/src/core/auth.ts +471 -0
  98. package/src/core/build-orchestrator.ts +509 -0
  99. package/src/core/build-state.ts +621 -0
  100. package/src/core/checkpoint-engine.ts +482 -0
  101. package/src/core/config.ts +1285 -0
  102. package/src/core/context-loader.ts +694 -0
  103. package/src/core/context.ts +410 -0
  104. package/src/core/deploy-workflow.ts +1085 -0
  105. package/src/core/entitlements.ts +322 -0
  106. package/src/core/github-sync.ts +720 -0
  107. package/src/core/index.ts +981 -0
  108. package/src/core/ingest.ts +1186 -0
  109. package/src/core/metrics-engine.ts +886 -0
  110. package/src/core/mvp.ts +847 -0
  111. package/src/core/onboard-workflow.ts +1293 -0
  112. package/src/core/policies.ts +81 -0
  113. package/src/core/preseed-workflow.ts +1163 -0
  114. package/src/core/preseed.ts +1826 -0
  115. package/src/core/project-context.ts +380 -0
  116. package/src/core/project-state.ts +699 -0
  117. package/src/core/r2-sync.ts +691 -0
  118. package/src/core/scaffold.ts +1715 -0
  119. package/src/core/session.ts +286 -0
  120. package/src/core/task-extractor.ts +799 -0
  121. package/src/core/telemetry.ts +371 -0
  122. package/src/core/tier-enforcement.ts +737 -0
  123. package/src/core/utils.ts +437 -0
  124. package/src/index.ts +29 -0
  125. package/src/intelligence/agent-collab.ts +2376 -0
  126. package/src/intelligence/auto-suggest.ts +713 -0
  127. package/src/intelligence/content-gen.ts +1351 -0
  128. package/src/intelligence/cross-project.ts +1692 -0
  129. package/src/intelligence/git-memory.ts +529 -0
  130. package/src/intelligence/index.ts +318 -0
  131. package/src/intelligence/orchestrator.ts +534 -0
  132. package/src/intelligence/prd.ts +466 -0
  133. package/src/intelligence/recommendations.ts +982 -0
  134. package/src/intelligence/workflow-composer.ts +1472 -0
  135. package/src/mcp/capabilities.ts +233 -0
  136. package/src/mcp/index.ts +37 -0
  137. package/src/mcp/registry.ts +1268 -0
  138. package/src/mcp/response-formatter.ts +797 -0
  139. package/src/mcp/server.ts +240 -0
  140. package/src/types/agent.ts +69 -0
  141. package/src/types/config.ts +86 -0
  142. package/src/types/context.ts +77 -0
  143. package/src/types/index.ts +53 -0
  144. package/src/types/mcp.ts +91 -0
  145. package/src/types/skills.ts +47 -0
  146. package/src/types/workflow.ts +155 -0
  147. package/generators/index.js +0 -18
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Preseed Module Index
3
+ * Re-exports all preseed submodules
4
+ * @package bootspring
5
+ */
6
+
7
+ const interactive = require('./interactive');
8
+ const templates = require('./templates');
9
+
10
+ module.exports = {
11
+ interactive,
12
+ templates,
13
+ // Re-export commonly used functions at top level
14
+ ...interactive,
15
+ ...templates
16
+ };
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Interactive Helpers
3
+ * Readline and prompting utilities for preseed wizard
4
+ * @package bootspring
5
+ */
6
+
7
+ const readline = require('readline');
8
+ const utils = require('../../core/utils');
9
+
10
+ /**
11
+ * Create readline interface
12
+ * @returns {readline.Interface}
13
+ */
14
+ function createInterface() {
15
+ return readline.createInterface({
16
+ input: process.stdin,
17
+ output: process.stdout
18
+ });
19
+ }
20
+
21
+ /**
22
+ * Ask a text question
23
+ * @param {readline.Interface} rl - readline interface
24
+ * @param {string} question - the question to ask
25
+ * @param {string} defaultValue - default value if empty
26
+ * @returns {Promise<string>}
27
+ */
28
+ function askText(rl, question, defaultValue = '') {
29
+ const prompt = defaultValue
30
+ ? `${question} ${utils.COLORS.dim}[${defaultValue}]${utils.COLORS.reset}: `
31
+ : `${question}: `;
32
+
33
+ return new Promise((resolve) => {
34
+ rl.question(prompt, (answer) => {
35
+ resolve(answer.trim() || defaultValue);
36
+ });
37
+ });
38
+ }
39
+
40
+ /**
41
+ * Ask a multi-line text question
42
+ * @param {readline.Interface} rl - readline interface
43
+ * @param {string} question - the question to ask
44
+ * @param {string} hint - hint text
45
+ * @returns {Promise<string>}
46
+ */
47
+ function askMultiLine(rl, question, hint = 'Enter text (empty line to finish)') {
48
+ return new Promise((resolve) => {
49
+ console.log(`\n${utils.COLORS.bold}${question}${utils.COLORS.reset}`);
50
+ console.log(`${utils.COLORS.dim}${hint}${utils.COLORS.reset}`);
51
+
52
+ const lines = [];
53
+ const onLine = (line) => {
54
+ if (line.trim() === '') {
55
+ rl.removeListener('line', onLine);
56
+ resolve(lines.join('\n'));
57
+ } else {
58
+ lines.push(line);
59
+ }
60
+ };
61
+ rl.on('line', onLine);
62
+ });
63
+ }
64
+
65
+ /**
66
+ * Ask a list question (comma-separated)
67
+ * @param {readline.Interface} rl - readline interface
68
+ * @param {string} question - the question to ask
69
+ * @param {string} hint - hint text
70
+ * @returns {Promise<string[]>}
71
+ */
72
+ function askList(rl, question, hint = 'Enter comma-separated values') {
73
+ return new Promise((resolve) => {
74
+ console.log(`\n${utils.COLORS.bold}${question}${utils.COLORS.reset}`);
75
+ console.log(`${utils.COLORS.dim}${hint}${utils.COLORS.reset}`);
76
+
77
+ rl.question('> ', (answer) => {
78
+ const items = answer
79
+ .split(',')
80
+ .map(s => s.trim())
81
+ .filter(s => s.length > 0);
82
+ resolve(items);
83
+ });
84
+ });
85
+ }
86
+
87
+ /**
88
+ * Ask a choice question
89
+ * @param {readline.Interface} rl - readline interface
90
+ * @param {string} question - the question to ask
91
+ * @param {Array} options - array of options (strings or {label, value, description})
92
+ * @param {number} defaultIndex - default selected index
93
+ * @returns {Promise<string>}
94
+ */
95
+ function askChoice(rl, question, options, defaultIndex = 0) {
96
+ return new Promise((resolve) => {
97
+ console.log(`\n${utils.COLORS.bold}${question}${utils.COLORS.reset}`);
98
+
99
+ options.forEach((opt, i) => {
100
+ const marker = i === defaultIndex
101
+ ? `${utils.COLORS.cyan}>${utils.COLORS.reset}`
102
+ : ' ';
103
+ const label = typeof opt === 'object' ? opt.label : opt;
104
+ const desc = typeof opt === 'object' && opt.description
105
+ ? ` ${utils.COLORS.dim}- ${opt.description}${utils.COLORS.reset}`
106
+ : '';
107
+ console.log(` ${marker} ${i + 1}. ${label}${desc}`);
108
+ });
109
+
110
+ rl.question(`\n${utils.COLORS.dim}Select [1-${options.length}]${utils.COLORS.reset}: `, (answer) => {
111
+ const index = parseInt(answer, 10) - 1;
112
+ const selectedIndex = (index >= 0 && index < options.length) ? index : defaultIndex;
113
+ const selected = options[selectedIndex];
114
+ resolve(typeof selected === 'object' ? selected.value : selected);
115
+ });
116
+ });
117
+ }
118
+
119
+ /**
120
+ * Display section header
121
+ * @param {number} number - current step number
122
+ * @param {number} total - total steps
123
+ * @param {string} title - section title
124
+ * @param {string} description - section description
125
+ */
126
+ function displaySection(number, total, title, description) {
127
+ console.log('\n');
128
+ console.log(`${utils.COLORS.cyan}${'━'.repeat(60)}${utils.COLORS.reset}`);
129
+ console.log(`${utils.COLORS.bold}Step ${number}/${total}: ${title}${utils.COLORS.reset}`);
130
+ if (description) {
131
+ console.log(`${utils.COLORS.dim}${description}${utils.COLORS.reset}`);
132
+ }
133
+ console.log(`${utils.COLORS.cyan}${'━'.repeat(60)}${utils.COLORS.reset}`);
134
+ }
135
+
136
+ module.exports = {
137
+ createInterface,
138
+ askText,
139
+ askMultiLine,
140
+ askList,
141
+ askChoice,
142
+ displaySection
143
+ };
@@ -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 };
@@ -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
+ };