@girardmedia/bootspring 2.1.3 → 2.2.1

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 (65) hide show
  1. package/bin/bootspring.js +157 -83
  2. package/claude-commands/agent.md +34 -0
  3. package/claude-commands/bs.md +31 -0
  4. package/claude-commands/build.md +25 -0
  5. package/claude-commands/skill.md +31 -0
  6. package/claude-commands/todo.md +25 -0
  7. package/dist/core/index.d.ts +5814 -0
  8. package/dist/core.js +5779 -0
  9. package/dist/index.js +93883 -0
  10. package/dist/mcp/index.d.ts +1 -0
  11. package/dist/mcp-server.js +2298 -0
  12. package/generators/api-docs.js +3 -3
  13. package/generators/decisions.js +14 -14
  14. package/generators/health.js +6 -6
  15. package/generators/sprint.js +4 -4
  16. package/generators/templates/build-planning.template.js +2 -2
  17. package/generators/visual-doc-generator.js +1 -1
  18. package/package.json +22 -68
  19. package/cli/agent.js +0 -799
  20. package/cli/auth.js +0 -896
  21. package/cli/billing.js +0 -320
  22. package/cli/build.js +0 -1442
  23. package/cli/dashboard.js +0 -123
  24. package/cli/init.js +0 -669
  25. package/cli/mcp.js +0 -240
  26. package/cli/orchestrator.js +0 -240
  27. package/cli/project.js +0 -825
  28. package/cli/quality.js +0 -281
  29. package/cli/skill.js +0 -503
  30. package/cli/switch.js +0 -453
  31. package/cli/todo.js +0 -629
  32. package/cli/update.js +0 -132
  33. package/core/api-client.d.ts +0 -69
  34. package/core/api-client.js +0 -1482
  35. package/core/auth.d.ts +0 -98
  36. package/core/auth.js +0 -737
  37. package/core/build-orchestrator.js +0 -508
  38. package/core/build-state.js +0 -612
  39. package/core/config.d.ts +0 -106
  40. package/core/config.js +0 -1328
  41. package/core/context-loader.js +0 -580
  42. package/core/context.d.ts +0 -61
  43. package/core/context.js +0 -327
  44. package/core/entitlements.d.ts +0 -70
  45. package/core/entitlements.js +0 -322
  46. package/core/index.d.ts +0 -53
  47. package/core/index.js +0 -62
  48. package/core/mcp-config.js +0 -115
  49. package/core/policies.d.ts +0 -43
  50. package/core/policies.js +0 -113
  51. package/core/policy-matrix.js +0 -303
  52. package/core/project-activity.js +0 -175
  53. package/core/redaction.d.ts +0 -5
  54. package/core/redaction.js +0 -63
  55. package/core/self-update.js +0 -259
  56. package/core/session.js +0 -353
  57. package/core/task-extractor.js +0 -1098
  58. package/core/telemetry.d.ts +0 -55
  59. package/core/telemetry.js +0 -617
  60. package/core/tier-enforcement.js +0 -928
  61. package/core/utils.d.ts +0 -90
  62. package/core/utils.js +0 -455
  63. package/core/validation.js +0 -572
  64. package/mcp/server.d.ts +0 -57
  65. package/mcp/server.js +0 -264
package/bin/bootspring.js CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- /**
4
- * Bootspring CLI
5
- * Thin client for the hosted Bootspring MCP and API platform.
6
- */
3
+ /** Bootspring CLI bridge. Stable runtime by default, monorepo preview via --v2. */
7
4
 
8
5
  const path = require('path');
9
- const selfUpdate = require('../core/self-update');
10
- const { ensureProjectMcpConfig } = require('../core/mcp-config');
6
+ const fs = require('fs');
7
+ const { spawn } = require('child_process');
11
8
 
12
9
  const VERSION = require('../package.json').version;
10
+ const STABLE_CLI_DIST = path.join(__dirname, '../dist/index.js');
11
+ const MONOREPO_CLI_DIST = path.join(__dirname, '../monorepo/apps/cli/dist/index.js');
12
+ const USE_V2 = process.env.BOOTSPRING_V2 === 'true' || process.argv.includes('--v2');
13
13
 
14
14
  const C = {
15
15
  reset: '\x1b[0m',
@@ -21,119 +21,193 @@ const C = {
21
21
  red: '\x1b[31m'
22
22
  };
23
23
 
24
- const LOGO = `${C.cyan}${C.bold}⚡ Bootspring${C.reset} ${C.dim}v${VERSION}${C.reset}`;
24
+ const LOGO = `${C.cyan}${C.bold}⚡ Bootspring${C.reset} ${C.dim}v${VERSION}${C.reset}${USE_V2 ? ` ${C.green}(v2-beta)${C.reset}` : ''}`;
25
25
 
26
26
  const COMMANDS = {
27
- auth: { handler: '../cli/auth.js', description: 'Login, logout, and account status' },
28
- switch: { handler: '../cli/switch.js', description: 'Switch project context' },
29
- project: { handler: '../cli/project.js', description: 'Manage cloud projects and members' },
30
- init: { handler: '../cli/init.js', description: 'Initialize Bootspring in the current project' },
31
- build: { handler: '../cli/build.js', description: 'Run the local build loop and task workflow' },
32
- agent: { handler: '../cli/agent.js', description: 'Use hosted specialist agents' },
33
- skill: { handler: '../cli/skill.js', description: 'Browse hosted skills and patterns' },
34
- orchestrator: { handler: '../cli/orchestrator.js', description: 'Run hosted workflow orchestration' },
35
- quality: { handler: '../cli/quality.js', description: 'Fetch hosted quality gates' },
36
- billing: { handler: '../cli/billing.js', description: 'View subscription and usage' },
37
- update: { handler: '../cli/update.js', description: 'Check for and apply updates' },
38
- todo: { handler: '../cli/todo.js', description: 'Manage local todo.md tasks' },
39
- dashboard: { handler: '../cli/dashboard.js', description: 'Open the cloud dashboard' },
40
- mcp: { handler: '../cli/mcp.js', description: 'Start the hosted MCP proxy' },
41
- help: { description: 'Show help' }
27
+ auth: 'auth',
28
+ init: 'init',
29
+ project: 'project',
30
+ switch: { module: 'switchCmd' },
31
+ health: 'health',
32
+ mcp: 'mcp',
33
+ dashboard: 'dashboard',
34
+ context: 'context',
35
+ build: 'build',
36
+ deploy: 'deploy',
37
+ loop: 'loop',
38
+ quality: 'quality',
39
+ security: 'security',
40
+ doctor: 'doctor',
41
+ update: 'update',
42
+ plan: 'plan',
43
+ prd: 'prd',
44
+ preseed: 'preseed',
45
+ 'preseed-start': { module: 'preseedStart', method: 'start' },
46
+ 'preseed-from-codebase': { module: 'preseed', prepend: ['from-codebase'] },
47
+ seed: 'seed',
48
+ manager: 'manager',
49
+ agent: 'agent',
50
+ skill: 'skill',
51
+ todo: 'todo',
52
+ billing: 'billing',
53
+ plugin: 'plugin',
54
+ analyze: 'analyze',
55
+ audit: 'audit',
56
+ monitor: 'monitor',
57
+ metrics: 'metrics',
58
+ validate: 'validate',
59
+ visualize: 'visualize',
60
+ generate: 'generate',
61
+ content: 'content',
62
+ docs: 'docs',
63
+ learn: 'learn',
64
+ memory: 'memory',
65
+ suggest: 'suggest',
66
+ orchestrator: 'orchestrator',
67
+ watch: 'watch',
68
+ business: 'business',
69
+ fundraise: 'fundraise',
70
+ legal: 'legal',
71
+ org: 'org',
72
+ workspace: 'workspace',
73
+ 'cloud-sync': { module: 'cloudSync' },
74
+ github: { module: 'githubCmd' },
75
+ onboard: 'onboard',
76
+ checkpoint: 'checkpoint',
77
+ setup: 'setup',
78
+ log: 'log',
79
+ mvp: 'mvp',
80
+ task: 'task',
81
+ telemetry: 'telemetry'
42
82
  };
43
83
 
44
- function showHelp(command = null) {
45
- if (command && COMMANDS[command]) {
46
- console.log(LOGO);
47
- console.log(`\n${C.bold}${command}${C.reset}`);
48
- console.log(`${C.dim}${COMMANDS[command].description}${C.reset}\n`);
49
- return;
50
- }
84
+ const HELP_GROUPS = {
85
+ 'Core': ['auth', 'init', 'project', 'switch', 'health', 'mcp', 'dashboard', 'context'],
86
+ 'Build & Deploy': ['build', 'deploy', 'loop', 'quality', 'security', 'doctor', 'update'],
87
+ 'Planning': ['plan', 'prd', 'preseed', 'preseed-start', 'preseed-from-codebase', 'seed', 'manager'],
88
+ 'Agents & Skills': ['agent', 'skill', 'todo', 'billing', 'plugin'],
89
+ 'Analysis': ['analyze', 'audit', 'monitor', 'metrics', 'validate', 'visualize'],
90
+ 'Docs & Content': ['generate', 'content', 'docs'],
91
+ 'Intelligence': ['learn', 'memory', 'suggest', 'orchestrator', 'watch'],
92
+ 'Business': ['business', 'fundraise', 'legal', 'org'],
93
+ 'Infrastructure': ['workspace', 'cloud-sync', 'github', 'onboard', 'checkpoint', 'setup'],
94
+ 'Tools': ['log', 'mvp', 'task', 'telemetry']
95
+ };
51
96
 
97
+ function showHelp() {
52
98
  console.log(LOGO);
53
- console.log(`${C.dim}Thin client powered by Bootspring cloud MCP and API services${C.reset}\n`);
99
+ console.log(`${C.dim}Development scaffolding with intelligence${C.reset}\n`);
54
100
  console.log(`${C.bold}Usage:${C.reset} bootspring <command> [options]\n`);
55
- console.log(`${C.bold}Commands:${C.reset}`);
56
101
 
57
- for (const [name, config] of Object.entries(COMMANDS)) {
58
- const padding = ' '.repeat(Math.max(2, 14 - name.length));
59
- console.log(` ${C.cyan}${name}${C.reset}${padding}${C.dim}${config.description}${C.reset}`);
102
+ for (const [group, cmds] of Object.entries(HELP_GROUPS)) {
103
+ console.log(`${C.bold}${group}:${C.reset} ${cmds.map(c => `${C.green}${c}${C.reset}`).join(', ')}`);
60
104
  }
61
105
 
62
- console.log(`\n${C.bold}Get Started:${C.reset}`);
63
- console.log(` ${C.dim}$${C.reset} bootspring auth login`);
64
- console.log(` ${C.dim}$${C.reset} bootspring init`);
65
- console.log(` ${C.dim}$${C.reset} bootspring mcp config`);
106
+ console.log(`\n${C.dim}Run "bootspring <command> --help" for command details${C.reset}`);
107
+ console.log(`${C.dim}Use --v2 to try the monorepo preview CLI${C.reset}`);
108
+ console.log(`${C.dim}The preview CLI is not the production MCP/server path${C.reset}`);
109
+ console.log(`${C.dim}Docs: https://bootspring.com/docs${C.reset}\n`);
110
+ }
66
111
 
67
- console.log(`\n${C.dim}Docs: https://bootspring.com/docs${C.reset}`);
68
- console.log(`${C.dim}Pricing: https://bootspring.com/pricing${C.reset}\n`);
112
+ function loadStableCli() {
113
+ if (!fs.existsSync(STABLE_CLI_DIST)) {
114
+ console.error(`${C.red}Error: stable CLI build not found at ${STABLE_CLI_DIST}${C.reset}`);
115
+ console.error(`${C.dim}Please run 'npm run build' first.${C.reset}`);
116
+ process.exit(1);
117
+ }
118
+
119
+ return require(STABLE_CLI_DIST);
69
120
  }
70
121
 
71
- async function runCommand(command, args) {
122
+ async function runStable(command, args) {
72
123
  const config = COMMANDS[command];
73
- if (!config || !config.handler) {
74
- showHelp(command);
75
- return;
124
+ if (!config) {
125
+ return false;
76
126
  }
77
127
 
78
- const handler = require(path.resolve(__dirname, config.handler));
79
- await handler.run(args);
128
+ const stableCli = loadStableCli();
129
+ const route = typeof config === 'string'
130
+ ? { module: config, method: 'run', prepend: [] }
131
+ : { method: 'run', prepend: [], ...config };
132
+ const cliModule = stableCli.cli && stableCli.cli[route.module];
133
+ const handler = cliModule && cliModule[route.method];
134
+ const normalizedArgs = args[0] === '--help' || args[0] === '-h'
135
+ ? ['help', ...args.slice(1)]
136
+ : args;
137
+
138
+ if (typeof handler !== 'function') {
139
+ console.error(`${C.red}Error: missing stable CLI handler for ${command}${C.reset}`);
140
+ process.exit(1);
141
+ }
142
+
143
+ const result = await Promise.resolve(handler([...(route.prepend || []), ...normalizedArgs]));
144
+ if (typeof result === 'number' && Number.isFinite(result)) {
145
+ process.exit(result);
146
+ }
147
+
148
+ return true;
149
+ }
150
+
151
+ async function runV2(args) {
152
+ if (!fs.existsSync(MONOREPO_CLI_DIST)) {
153
+ console.error(`${C.red}Error: v2 CLI build not found at ${MONOREPO_CLI_DIST}${C.reset}`);
154
+ console.error(`${C.dim}Please run 'cd monorepo && pnpm build' first.${C.reset}`);
155
+ process.exit(1);
156
+ }
157
+
158
+ console.error(`${C.yellow}Warning: using preview v2 CLI. Stable npm CLI remains the supported production path.${C.reset}`);
159
+ const cleanArgs = args.filter(arg => arg !== '--v2');
160
+ const child = spawn('node', [MONOREPO_CLI_DIST, ...cleanArgs], {
161
+ stdio: 'inherit',
162
+ env: { ...process.env, BOOTSPRING_V2_BRIDGE: 'true' }
163
+ });
164
+
165
+ child.on('exit', (code) => {
166
+ process.exit(code || 0);
167
+ });
80
168
  }
81
169
 
82
170
  async function main() {
83
- const args = process.argv.slice(2);
171
+ const rawArgs = process.argv.slice(2);
172
+ const args = rawArgs.filter(arg => arg !== '--v2');
84
173
  const command = args[0];
85
174
 
86
- if (!command) {
175
+ if (!command || command === '--help' || command === '-h' || command === 'help') {
176
+ if (command === 'help' && args[1]) {
177
+ const handled = await runStable(args[1], ['--help']);
178
+ if (handled) return;
179
+ }
87
180
  showHelp();
88
181
  return;
89
182
  }
90
183
 
91
184
  if (command === '--version' || command === '-v') {
92
- console.log(`Bootspring v${VERSION}`);
185
+ console.log(`Bootspring v${VERSION} (Bridge)`);
93
186
  return;
94
187
  }
95
188
 
96
- if (command === '--help' || command === '-h' || command === 'help') {
97
- showHelp(args[1]);
98
- return;
189
+ try {
190
+ const { selfUpdate } = require(path.resolve(__dirname, '../dist/core'));
191
+ selfUpdate.ensureLatestVersion(args);
192
+ } catch {
193
+ // Best-effort; do not block CLI on update failures.
99
194
  }
100
195
 
101
- if (!COMMANDS[command]) {
102
- console.log(LOGO);
103
- console.log(`\n${C.red}Command '${command}' is not available in the public thin client.${C.reset}`);
104
- console.log(`${C.dim}Run 'bootspring help' to see supported launch commands.${C.reset}\n`);
105
- process.exitCode = 1;
196
+ if (USE_V2) {
197
+ await runV2(args);
106
198
  return;
107
199
  }
108
200
 
109
- const updateResult = selfUpdate.ensureLatestVersion(args);
110
- if (updateResult.updated) {
111
- process.exitCode = updateResult.exitCode;
201
+ if (await runStable(command, args.slice(1))) {
112
202
  return;
113
203
  }
114
204
 
115
- const mcpConfigResult = ensureProjectMcpConfig(process.cwd(), { createIfMissing: false });
116
- if (mcpConfigResult.status === 'updated') {
117
- console.error('[bootspring] Updated .mcp.json to use the managed latest-package launcher.');
118
- }
119
-
120
- try {
121
- await runCommand(command, args.slice(1));
122
- } catch (error) {
123
- console.log(LOGO);
124
- console.log(`\n${C.red}Error: ${error.message}${C.reset}`);
125
-
126
- if (error.code === 'AUTH_REQUIRED' || error.status === 401) {
127
- console.log(`${C.dim}Run 'bootspring auth login' to authenticate.${C.reset}`);
128
- } else if (error.status === 403) {
129
- console.log(`${C.dim}Upgrade access: https://bootspring.com/pricing${C.reset}`);
130
- } else if (error.code === 'ENOTFOUND' || error.code === 'ECONNREFUSED') {
131
- console.log(`${C.dim}Could not reach the Bootspring API.${C.reset}`);
132
- }
133
-
134
- console.log();
135
- process.exitCode = 1;
136
- }
205
+ console.log(`${C.red}Unknown command: ${command}${C.reset}`);
206
+ showHelp();
207
+ process.exit(1);
137
208
  }
138
209
 
139
- main();
210
+ main().catch((error) => {
211
+ console.error(`\n${C.red}Error: ${error.message}${C.reset}\n`);
212
+ process.exit(1);
213
+ });
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: agent
3
+ description: Invoke Bootspring specialized AI agents
4
+ ---
5
+
6
+ # /agent - Bootspring Agents
7
+
8
+ Invoke specialized AI agents for focused tasks.
9
+
10
+ ## Instructions
11
+
12
+ When user invokes `/agent`, use the `bootspring_agent` MCP tool:
13
+
14
+ ```json
15
+ {
16
+ "action": "invoke",
17
+ "name": "<agent-name>"
18
+ }
19
+ ```
20
+
21
+ ## Actions
22
+
23
+ - `/agent <name>` → `bootspring_agent` with action: "invoke", name: "<name>"
24
+ - `/agent list` → `bootspring_agent` with action: "list"
25
+ - `/agent show <name>` → `bootspring_agent` with action: "show", name: "<name>"
26
+
27
+ ## Available Agents
28
+
29
+ - `security` - Security audit
30
+ - `performance` - Performance review
31
+ - `api` - API design review
32
+ - `database` - Database review
33
+ - `testing` - Test analysis
34
+ - `code-reviewer` - Code review
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: bs
3
+ description: Bootspring quick commands (universal shorthand)
4
+ ---
5
+
6
+ # /bs - Bootspring Quick Commands
7
+
8
+ Universal shorthand for Bootspring operations. Works with any AI CLI.
9
+
10
+ ## Instructions
11
+
12
+ Parse the subcommand and use the appropriate bootspring MCP tool or CLI command.
13
+
14
+ ## Commands
15
+
16
+ | Command | MCP Tool | CLI Fallback |
17
+ |---------|----------|--------------|
18
+ | `/bs skill <q>` | `bootspring_skill` action:search | `bootspring skill search <q>` |
19
+ | `/bs agent <n>` | `bootspring_agent` action:invoke | `bootspring agent invoke <n>` |
20
+ | `/bs todo` | `bootspring_todo` action:list | `bootspring todo list` |
21
+ | `/bs todo add "<t>"` | `bootspring_todo` action:add | `bootspring todo add "<t>"` |
22
+ | `/bs build` | `bootspring_seed` action:build-status | `bootspring build status` |
23
+ | `/bs health` | `bootspring_context` action:health | `bootspring health` |
24
+ | `/bs help` | - | `bootspring help` |
25
+
26
+ ## Examples
27
+
28
+ - `/bs skill auth` - Search auth patterns
29
+ - `/bs agent security` - Run security agent
30
+ - `/bs todo add "Fix bug"` - Add todo
31
+ - `/bs build` - Check build status
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: build
3
+ description: Bootspring build management
4
+ ---
5
+
6
+ # /build - Bootspring Build
7
+
8
+ Manage the Bootspring build loop and task execution.
9
+
10
+ ## Instructions
11
+
12
+ When user invokes `/build`, use the `bootspring_seed` MCP tool with build actions:
13
+
14
+ ## Actions
15
+
16
+ - `/build` → `bootspring_seed` with action: "build-status"
17
+ - `/build status` → `bootspring_seed` with action: "build-status"
18
+ - `/build next` → `bootspring_seed` with action: "build-next"
19
+ - `/build done` → `bootspring_seed` with action: "build-done"
20
+
21
+ ## Workflow
22
+
23
+ 1. `/build next` - Get next task
24
+ 2. Implement the task
25
+ 3. `/build done` - Mark complete
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: skill
3
+ description: Search and view Bootspring code patterns
4
+ ---
5
+
6
+ # /skill - Bootspring Skills
7
+
8
+ Search and view code patterns from the Bootspring library.
9
+
10
+ ## Instructions
11
+
12
+ When user invokes `/skill`, use the `bootspring_skill` MCP tool:
13
+
14
+ ```json
15
+ {
16
+ "action": "search",
17
+ "query": "<user's query>"
18
+ }
19
+ ```
20
+
21
+ ## Actions
22
+
23
+ - `/skill <query>` → `bootspring_skill` with action: "search", query: "<query>"
24
+ - `/skill show <name>` → `bootspring_skill` with action: "show", name: "<name>"
25
+ - `/skill list` → `bootspring_skill` with action: "list"
26
+
27
+ ## Examples
28
+
29
+ - `/skill auth` → Search for authentication patterns
30
+ - `/skill show auth/clerk` → Show the Clerk auth pattern
31
+ - `/skill list` → List all available patterns
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: todo
3
+ description: Manage Bootspring project todos
4
+ ---
5
+
6
+ # /todo - Bootspring Todos
7
+
8
+ Manage project todos tracked by Bootspring.
9
+
10
+ ## Instructions
11
+
12
+ When user invokes `/todo`, use the `bootspring_todo` MCP tool:
13
+
14
+ ## Actions
15
+
16
+ - `/todo` → `bootspring_todo` with action: "list"
17
+ - `/todo add "<task>"` → `bootspring_todo` with action: "add", text: "<task>"
18
+ - `/todo done <id>` → `bootspring_todo` with action: "done", id: "<id>"
19
+ - `/todo clear` → `bootspring_todo` with action: "clear"
20
+
21
+ ## Examples
22
+
23
+ - `/todo` - List all todos
24
+ - `/todo add "Fix login bug"` - Add new todo
25
+ - `/todo done 1` - Complete todo #1