@girardmedia/bootspring 1.2.0 → 2.0.3
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/README.md +107 -14
- package/bin/bootspring.js +166 -27
- package/cli/agent.js +189 -17
- package/cli/analyze.js +499 -0
- package/cli/audit.js +557 -0
- package/cli/auth.js +495 -38
- package/cli/billing.js +302 -0
- package/cli/build.js +695 -0
- package/cli/business.js +109 -26
- package/cli/checkpoint-utils.js +168 -0
- package/cli/checkpoint.js +639 -0
- package/cli/cloud-sync.js +447 -0
- package/cli/content.js +198 -0
- package/cli/context.js +1 -1
- package/cli/deploy.js +543 -0
- package/cli/fundraise.js +112 -50
- package/cli/github-cmd.js +435 -0
- package/cli/health.js +477 -0
- package/cli/init.js +84 -13
- package/cli/legal.js +107 -95
- package/cli/log.js +2 -2
- package/cli/loop.js +976 -73
- package/cli/manager.js +711 -0
- package/cli/metrics.js +480 -0
- package/cli/monitor.js +812 -0
- package/cli/onboard.js +521 -0
- package/cli/orchestrator.js +12 -24
- package/cli/prd.js +594 -0
- package/cli/preseed-start.js +1483 -0
- package/cli/preseed.js +2302 -0
- package/cli/project.js +436 -0
- package/cli/quality.js +233 -0
- package/cli/security.js +913 -0
- package/cli/seed.js +1441 -5
- package/cli/skill.js +273 -211
- package/cli/suggest.js +989 -0
- package/cli/switch.js +453 -0
- package/cli/visualize.js +527 -0
- package/cli/watch.js +769 -0
- package/cli/workspace.js +607 -0
- package/core/analyze-workflow.js +1134 -0
- package/core/api-client.js +535 -22
- package/core/audit-workflow.js +1350 -0
- package/core/build-orchestrator.js +480 -0
- package/core/build-state.js +577 -0
- package/core/checkpoint-engine.js +408 -0
- package/core/config.js +1109 -26
- package/core/context-loader.js +21 -1
- package/core/deploy-workflow.js +836 -0
- package/core/entitlements.js +93 -22
- package/core/github-sync.js +610 -0
- package/core/index.js +8 -1
- package/core/ingest.js +1111 -0
- package/core/metrics-engine.js +768 -0
- package/core/onboard-workflow.js +1007 -0
- package/core/preseed-workflow.js +934 -0
- package/core/preseed.js +1617 -0
- package/core/project-context.js +325 -0
- package/core/project-state.js +694 -0
- package/core/r2-sync.js +583 -0
- package/core/scaffold.js +525 -7
- package/core/session.js +258 -0
- package/core/task-extractor.js +758 -0
- package/core/telemetry.js +28 -6
- package/core/tier-enforcement.js +737 -0
- package/core/utils.js +38 -14
- package/generators/questionnaire.js +15 -12
- package/generators/sections/ai.js +7 -7
- package/generators/sections/content.js +300 -0
- package/generators/sections/index.js +3 -0
- package/generators/sections/plugins.js +7 -6
- package/generators/templates/build-planning.template.js +596 -0
- package/generators/templates/content.template.js +819 -0
- package/generators/templates/index.js +2 -1
- package/hooks/git-autopilot.js +1250 -0
- package/hooks/index.js +9 -0
- package/intelligence/agent-collab.js +2057 -0
- package/intelligence/auto-suggest.js +634 -0
- package/intelligence/content-gen.js +1589 -0
- package/intelligence/cross-project.js +1647 -0
- package/intelligence/index.js +184 -0
- package/intelligence/learning/insights.json +517 -7
- package/intelligence/learning/pattern-learner.js +1008 -14
- package/intelligence/memory/decision-tracker.js +1431 -31
- package/intelligence/memory/decisions.jsonl +0 -0
- package/intelligence/orchestrator.js +2896 -1
- package/intelligence/prd.js +92 -1
- package/intelligence/recommendation-weights.json +14 -2
- package/intelligence/recommendations.js +463 -9
- package/intelligence/workflow-composer.js +1451 -0
- package/marketplace/index.d.ts +324 -0
- package/marketplace/index.js +1921 -0
- package/mcp/contracts/mcp-contract.v1.json +342 -4
- package/mcp/registry.js +680 -3
- package/mcp/response-formatter.js +23 -0
- package/mcp/tools/assist-tool.js +78 -4
- package/mcp/tools/autopilot-tool.js +408 -0
- package/mcp/tools/content-tool.js +571 -0
- package/mcp/tools/dashboard-tool.js +251 -5
- package/mcp/tools/mvp-tool.js +344 -0
- package/mcp/tools/plugin-tool.js +23 -1
- package/mcp/tools/prd-tool.js +579 -0
- package/mcp/tools/seed-tool.js +447 -0
- package/mcp/tools/skill-tool.js +43 -14
- package/mcp/tools/suggest-tool.js +147 -0
- package/package.json +15 -6
- package/agents/README.md +0 -93
- package/agents/ai-integration-expert/context.md +0 -386
- package/agents/api-expert/context.md +0 -416
- package/agents/architecture-expert/context.md +0 -454
- package/agents/auth-expert/context.md +0 -399
- package/agents/backend-expert/context.md +0 -483
- package/agents/business-strategy-expert/context.md +0 -180
- package/agents/code-review-expert/context.md +0 -365
- package/agents/competitive-analysis-expert/context.md +0 -239
- package/agents/data-modeling-expert/context.md +0 -352
- package/agents/database-expert/context.md +0 -250
- package/agents/devops-expert/context.md +0 -446
- package/agents/email-expert/context.md +0 -379
- package/agents/financial-expert/context.md +0 -213
- package/agents/frontend-expert/context.md +0 -364
- package/agents/fundraising-expert/context.md +0 -257
- package/agents/growth-expert/context.md +0 -249
- package/agents/index.js +0 -140
- package/agents/investor-relations-expert/context.md +0 -266
- package/agents/legal-expert/context.md +0 -284
- package/agents/marketing-expert/context.md +0 -236
- package/agents/monitoring-expert/context.md +0 -362
- package/agents/operations-expert/context.md +0 -279
- package/agents/partnerships-expert/context.md +0 -286
- package/agents/payment-expert/context.md +0 -340
- package/agents/performance-expert/context.md +0 -377
- package/agents/private-equity-expert/context.md +0 -246
- package/agents/railway-expert/context.md +0 -284
- package/agents/research-expert/context.md +0 -245
- package/agents/sales-expert/context.md +0 -241
- package/agents/security-expert/context.md +0 -343
- package/agents/testing-expert/context.md +0 -414
- package/agents/ui-ux-expert/context.md +0 -448
- package/agents/vercel-expert/context.md +0 -426
- package/skills/index.js +0 -787
- package/skills/patterns/README.md +0 -163
- package/skills/patterns/ai/agents.md +0 -281
- package/skills/patterns/ai/claude.md +0 -138
- package/skills/patterns/ai/embeddings.md +0 -150
- package/skills/patterns/ai/rag.md +0 -266
- package/skills/patterns/ai/streaming.md +0 -170
- package/skills/patterns/ai/structured-output.md +0 -162
- package/skills/patterns/ai/tools.md +0 -154
- package/skills/patterns/analytics/tracking.md +0 -220
- package/skills/patterns/api/errors.md +0 -296
- package/skills/patterns/api/graphql.md +0 -440
- package/skills/patterns/api/middleware.md +0 -279
- package/skills/patterns/api/openapi.md +0 -285
- package/skills/patterns/api/rate-limiting.md +0 -231
- package/skills/patterns/api/route-handler.md +0 -217
- package/skills/patterns/api/server-action.md +0 -249
- package/skills/patterns/api/versioning.md +0 -443
- package/skills/patterns/api/webhooks.md +0 -247
- package/skills/patterns/auth/clerk.md +0 -132
- package/skills/patterns/auth/mfa.md +0 -313
- package/skills/patterns/auth/nextauth.md +0 -140
- package/skills/patterns/auth/oauth.md +0 -237
- package/skills/patterns/auth/rbac.md +0 -152
- package/skills/patterns/auth/session-management.md +0 -367
- package/skills/patterns/auth/session.md +0 -120
- package/skills/patterns/database/audit.md +0 -177
- package/skills/patterns/database/migrations.md +0 -177
- package/skills/patterns/database/pagination.md +0 -230
- package/skills/patterns/database/pooling.md +0 -357
- package/skills/patterns/database/prisma.md +0 -180
- package/skills/patterns/database/relations.md +0 -187
- package/skills/patterns/database/seeding.md +0 -246
- package/skills/patterns/database/soft-delete.md +0 -153
- package/skills/patterns/database/transactions.md +0 -162
- package/skills/patterns/deployment/ci-cd.md +0 -231
- package/skills/patterns/deployment/docker.md +0 -188
- package/skills/patterns/deployment/monitoring.md +0 -387
- package/skills/patterns/deployment/vercel.md +0 -160
- package/skills/patterns/email/resend.md +0 -143
- package/skills/patterns/email/templates.md +0 -245
- package/skills/patterns/email/transactional.md +0 -503
- package/skills/patterns/email/verification.md +0 -176
- package/skills/patterns/files/download.md +0 -243
- package/skills/patterns/files/upload.md +0 -239
- package/skills/patterns/i18n/nextintl.md +0 -188
- package/skills/patterns/logging/structured.md +0 -292
- package/skills/patterns/notifications/email-queue.md +0 -248
- package/skills/patterns/notifications/push.md +0 -279
- package/skills/patterns/payments/checkout.md +0 -303
- package/skills/patterns/payments/invoices.md +0 -287
- package/skills/patterns/payments/portal.md +0 -245
- package/skills/patterns/payments/stripe.md +0 -272
- package/skills/patterns/payments/subscriptions.md +0 -300
- package/skills/patterns/payments/usage.md +0 -279
- package/skills/patterns/performance/caching.md +0 -276
- package/skills/patterns/performance/code-splitting.md +0 -233
- package/skills/patterns/performance/edge.md +0 -254
- package/skills/patterns/performance/isr.md +0 -266
- package/skills/patterns/performance/lazy-loading.md +0 -281
- package/skills/patterns/realtime/sse.md +0 -327
- package/skills/patterns/realtime/websockets.md +0 -336
- package/skills/patterns/search/filtering.md +0 -329
- package/skills/patterns/search/fulltext.md +0 -260
- package/skills/patterns/security/audit-logging.md +0 -444
- package/skills/patterns/security/csrf.md +0 -234
- package/skills/patterns/security/headers.md +0 -252
- package/skills/patterns/security/sanitization.md +0 -258
- package/skills/patterns/security/secrets.md +0 -261
- package/skills/patterns/security/validation.md +0 -268
- package/skills/patterns/security/xss.md +0 -229
- package/skills/patterns/seo/metadata.md +0 -252
- package/skills/patterns/state/context.md +0 -349
- package/skills/patterns/state/react-query.md +0 -313
- package/skills/patterns/state/url-state.md +0 -482
- package/skills/patterns/state/zustand.md +0 -262
- package/skills/patterns/testing/api.md +0 -259
- package/skills/patterns/testing/component.md +0 -233
- package/skills/patterns/testing/coverage.md +0 -207
- package/skills/patterns/testing/fixtures.md +0 -225
- package/skills/patterns/testing/integration.md +0 -436
- package/skills/patterns/testing/mocking.md +0 -177
- package/skills/patterns/testing/playwright.md +0 -162
- package/skills/patterns/testing/snapshot.md +0 -175
- package/skills/patterns/testing/vitest.md +0 -307
- package/skills/patterns/ui/accordions.md +0 -395
- package/skills/patterns/ui/cards.md +0 -299
- package/skills/patterns/ui/dropdowns.md +0 -476
- package/skills/patterns/ui/empty-states.md +0 -320
- package/skills/patterns/ui/forms.md +0 -405
- package/skills/patterns/ui/inputs.md +0 -319
- package/skills/patterns/ui/layouts.md +0 -282
- package/skills/patterns/ui/loading.md +0 -291
- package/skills/patterns/ui/modals.md +0 -338
- package/skills/patterns/ui/navigation.md +0 -374
- package/skills/patterns/ui/tables.md +0 -407
- package/skills/patterns/ui/toasts.md +0 -300
- package/skills/patterns/ui/tooltips.md +0 -396
- package/skills/patterns/utils/dates.md +0 -435
- package/skills/patterns/utils/errors.md +0 -451
- package/skills/patterns/utils/formatting.md +0 -345
- package/skills/patterns/utils/validation.md +0 -434
- package/templates/bootspring.config.js +0 -83
- package/templates/business/business-model-canvas.md +0 -246
- package/templates/business/business-plan.md +0 -266
- package/templates/business/competitive-analysis.md +0 -312
- package/templates/fundraising/data-room-checklist.md +0 -300
- package/templates/fundraising/investor-research.md +0 -243
- package/templates/fundraising/pitch-deck-outline.md +0 -253
- package/templates/legal/gdpr-checklist.md +0 -339
- package/templates/legal/privacy-policy.md +0 -285
- package/templates/legal/terms-of-service.md +0 -222
- package/templates/mcp.json +0 -9
package/core/utils.js
CHANGED
|
@@ -372,33 +372,44 @@ function isMCPContext() {
|
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
/**
|
|
375
|
-
* Print MCP
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
* @param {
|
|
375
|
+
* Print MCP recommendation message and return false if not in MCP context.
|
|
376
|
+
* This is a soft gate - callers should provide degraded functionality.
|
|
377
|
+
* @param {string} feature - Feature name that benefits from MCP
|
|
378
|
+
* @param {Object} options - Configuration options
|
|
379
|
+
* @param {boolean} options.silent - Don't print any message
|
|
380
|
+
* @param {boolean} options.brief - Print brief message instead of full
|
|
379
381
|
* @returns {boolean} True if in MCP context, false otherwise
|
|
380
382
|
*/
|
|
381
|
-
function requireMCP(feature) {
|
|
383
|
+
function requireMCP(feature, options = {}) {
|
|
382
384
|
if (isMCPContext()) {
|
|
383
385
|
return true;
|
|
384
386
|
}
|
|
385
387
|
|
|
388
|
+
if (options.silent) {
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if (options.brief) {
|
|
393
|
+
console.log(`${COLORS.dim}Note: ${feature} has enhanced features when used with MCP integration.${COLORS.reset}`);
|
|
394
|
+
console.log(`${COLORS.dim}Run "bootspring mcp" for setup instructions.${COLORS.reset}\n`);
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
|
|
386
398
|
console.log(`
|
|
387
|
-
${COLORS.yellow}${COLORS.bold}MCP Integration
|
|
399
|
+
${COLORS.yellow}${COLORS.bold}Limited Mode - MCP Integration Recommended${COLORS.reset}
|
|
400
|
+
|
|
401
|
+
${feature} works in CLI mode but has enhanced features through MCP integration.
|
|
402
|
+
MCP enables real-time AI-assisted workflows and deeper integration.
|
|
388
403
|
|
|
389
|
-
${
|
|
390
|
-
|
|
404
|
+
${COLORS.bold}Current Mode:${COLORS.reset} CLI (limited functionality)
|
|
405
|
+
${COLORS.bold}Enhanced Mode:${COLORS.reset} MCP (full AI integration)
|
|
391
406
|
|
|
392
|
-
${COLORS.bold}
|
|
407
|
+
${COLORS.bold}To enable full features:${COLORS.reset}
|
|
393
408
|
1. Start the MCP server:
|
|
394
409
|
${COLORS.cyan}bootspring mcp start${COLORS.reset}
|
|
395
410
|
|
|
396
411
|
2. Add Bootspring to your AI client's MCP configuration
|
|
397
412
|
|
|
398
|
-
3. Use natural language with your AI assistant:
|
|
399
|
-
${COLORS.dim}"Help me implement authentication"${COLORS.reset}
|
|
400
|
-
${COLORS.dim}"Review this code for security issues"${COLORS.reset}
|
|
401
|
-
|
|
402
413
|
${COLORS.bold}Documentation:${COLORS.reset}
|
|
403
414
|
https://bootspring.com/docs/mcp-setup
|
|
404
415
|
|
|
@@ -408,6 +419,18 @@ ${COLORS.dim}Run "bootspring mcp" for server options${COLORS.reset}
|
|
|
408
419
|
return false;
|
|
409
420
|
}
|
|
410
421
|
|
|
422
|
+
/**
|
|
423
|
+
* Print a warning about MCP-only features (non-blocking)
|
|
424
|
+
* Use this when a command works without MCP but has reduced functionality
|
|
425
|
+
* @param {string} feature - Feature with limited functionality
|
|
426
|
+
*/
|
|
427
|
+
function warnMCPLimited(feature) {
|
|
428
|
+
if (isMCPContext()) return;
|
|
429
|
+
|
|
430
|
+
console.log(`${COLORS.dim}Note: ${feature} - some features require MCP integration.${COLORS.reset}`);
|
|
431
|
+
console.log(`${COLORS.dim}Run "bootspring mcp" for setup instructions.${COLORS.reset}\n`);
|
|
432
|
+
}
|
|
433
|
+
|
|
411
434
|
module.exports = {
|
|
412
435
|
COLORS,
|
|
413
436
|
print,
|
|
@@ -427,5 +450,6 @@ module.exports = {
|
|
|
427
450
|
isCI,
|
|
428
451
|
getPackageJson,
|
|
429
452
|
isMCPContext,
|
|
430
|
-
requireMCP
|
|
453
|
+
requireMCP,
|
|
454
|
+
warnMCPLimited
|
|
431
455
|
};
|
|
@@ -12,7 +12,7 @@ const readline = require('readline');
|
|
|
12
12
|
const utils = require('../core/utils');
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Questionnaire configuration -
|
|
15
|
+
* Questionnaire configuration - 17 sections
|
|
16
16
|
*/
|
|
17
17
|
const QUESTIONNAIRE_CONFIG = {
|
|
18
18
|
sections: [
|
|
@@ -29,28 +29,31 @@ const QUESTIONNAIRE_CONFIG = {
|
|
|
29
29
|
'deployment', // 11. DevOps & Deployment
|
|
30
30
|
'security', // 12. Security Requirements
|
|
31
31
|
'features', // 13. Features & Functionality
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
32
|
+
'content', // 14. Content & Documentation
|
|
33
|
+
'workflow', // 15. Team & Workflow
|
|
34
|
+
'instructions', // 16. Custom Instructions
|
|
35
|
+
'advanced' // 17. Advanced Options
|
|
35
36
|
],
|
|
36
37
|
presets: {
|
|
37
38
|
// Quick setup - just the essentials (4 sections)
|
|
38
39
|
minimal: ['pre-build', 'identity', 'technical', 'features'],
|
|
39
|
-
// Standard setup - core config (
|
|
40
|
-
standard: ['pre-build', 'identity', 'business', 'technical', 'frontend', 'auth', 'workflow', 'instructions'],
|
|
41
|
-
// Full setup - all sections (
|
|
40
|
+
// Standard setup - core config (9 sections)
|
|
41
|
+
standard: ['pre-build', 'identity', 'business', 'technical', 'frontend', 'auth', 'content', 'workflow', 'instructions'],
|
|
42
|
+
// Full setup - all sections (17 sections)
|
|
42
43
|
full: [
|
|
43
44
|
'pre-build', 'identity', 'business', 'technical', 'frontend', 'backend',
|
|
44
45
|
'auth', 'payments', 'ai', 'testing', 'deployment', 'security',
|
|
45
|
-
'features', 'workflow', 'instructions', 'advanced'
|
|
46
|
+
'features', 'content', 'workflow', 'instructions', 'advanced'
|
|
46
47
|
],
|
|
47
|
-
// Startup preset - business-focused (
|
|
48
|
+
// Startup preset - business-focused (11 sections)
|
|
48
49
|
startup: [
|
|
49
50
|
'pre-build', 'identity', 'business', 'technical', 'frontend',
|
|
50
|
-
'auth', 'payments', 'features', 'workflow', 'instructions'
|
|
51
|
+
'auth', 'payments', 'features', 'content', 'workflow', 'instructions'
|
|
51
52
|
],
|
|
52
|
-
// API preset - backend-focused (
|
|
53
|
-
api: ['pre-build', 'identity', 'technical', 'backend', 'auth', 'testing', 'deployment', 'security']
|
|
53
|
+
// API preset - backend-focused (9 sections)
|
|
54
|
+
api: ['pre-build', 'identity', 'technical', 'backend', 'auth', 'testing', 'deployment', 'security', 'content'],
|
|
55
|
+
// Content preset - content and marketing focused (8 sections)
|
|
56
|
+
content: ['pre-build', 'identity', 'business', 'technical', 'frontend', 'content', 'workflow', 'instructions']
|
|
54
57
|
}
|
|
55
58
|
};
|
|
56
59
|
|
|
@@ -28,21 +28,21 @@ async function run(rl, previousAnswers, helpers) {
|
|
|
28
28
|
return answers;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
// AI
|
|
31
|
+
// AI Providers (multi-select)
|
|
32
32
|
const providerOptions = [
|
|
33
33
|
{ label: 'Anthropic (Claude)', value: 'anthropic', description: 'Claude models (Recommended)' },
|
|
34
34
|
{ label: 'OpenAI', value: 'openai', description: 'GPT models' },
|
|
35
|
-
{ label: 'Vercel AI SDK', value: 'vercel-ai', description: 'Multi-provider SDK' },
|
|
36
35
|
{ label: 'Google AI', value: 'google', description: 'Gemini models' },
|
|
37
|
-
{ label: '
|
|
38
|
-
{ label: '
|
|
36
|
+
{ label: 'Cohere', value: 'cohere', description: 'Enterprise NLP' },
|
|
37
|
+
{ label: 'Hugging Face', value: 'huggingface', description: 'Open source models' },
|
|
38
|
+
{ label: 'Local (Ollama)', value: 'ollama', description: 'Self-hosted models' }
|
|
39
39
|
];
|
|
40
40
|
|
|
41
|
-
answers.
|
|
41
|
+
answers.aiProviders = await askMultiSelect(
|
|
42
42
|
rl,
|
|
43
|
-
'
|
|
43
|
+
'AI providers to integrate (select one or more):',
|
|
44
44
|
providerOptions,
|
|
45
|
-
|
|
45
|
+
['anthropic']
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
// AI Features
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content Section
|
|
3
|
+
*
|
|
4
|
+
* Content strategy, documentation, and publishing planning.
|
|
5
|
+
*
|
|
6
|
+
* @package bootspring
|
|
7
|
+
* @module generators/sections/content
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const title = 'Content & Documentation';
|
|
11
|
+
const description = 'Content strategy and documentation planning';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Run the content section
|
|
15
|
+
*/
|
|
16
|
+
async function run(rl, previousAnswers, helpers) {
|
|
17
|
+
const { askChoice, askMultiSelect, askText } = helpers;
|
|
18
|
+
const answers = {};
|
|
19
|
+
|
|
20
|
+
// Content Strategy
|
|
21
|
+
const strategyOptions = [
|
|
22
|
+
{ label: 'Developer-focused', value: 'developer', description: 'Technical docs, tutorials, API refs' },
|
|
23
|
+
{ label: 'Marketing-focused', value: 'marketing', description: 'Landing pages, blog, case studies' },
|
|
24
|
+
{ label: 'Mixed (Dev + Marketing)', value: 'mixed', description: 'Both technical and marketing' },
|
|
25
|
+
{ label: 'Internal only', value: 'internal', description: 'Internal docs and wikis' },
|
|
26
|
+
{ label: 'Minimal', value: 'minimal', description: 'Just README and basics' }
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
answers.contentStrategy = await askChoice(
|
|
30
|
+
rl,
|
|
31
|
+
'Content strategy:',
|
|
32
|
+
strategyOptions,
|
|
33
|
+
2
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
// Documentation Types
|
|
37
|
+
const docTypeOptions = [
|
|
38
|
+
{ label: 'Getting Started guide', value: 'getting-started' },
|
|
39
|
+
{ label: 'API Reference', value: 'api-reference' },
|
|
40
|
+
{ label: 'Tutorials/Guides', value: 'tutorials' },
|
|
41
|
+
{ label: 'Architecture docs', value: 'architecture' },
|
|
42
|
+
{ label: 'Contributing guide', value: 'contributing' },
|
|
43
|
+
{ label: 'Changelog', value: 'changelog' },
|
|
44
|
+
{ label: 'FAQ', value: 'faq' },
|
|
45
|
+
{ label: 'Troubleshooting', value: 'troubleshooting' }
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const defaultDocs = {
|
|
49
|
+
developer: ['getting-started', 'api-reference', 'tutorials', 'contributing', 'changelog'],
|
|
50
|
+
marketing: ['getting-started', 'faq'],
|
|
51
|
+
mixed: ['getting-started', 'api-reference', 'tutorials', 'faq', 'changelog'],
|
|
52
|
+
internal: ['architecture', 'contributing', 'troubleshooting'],
|
|
53
|
+
minimal: ['getting-started']
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
answers.documentationTypes = await askMultiSelect(
|
|
57
|
+
rl,
|
|
58
|
+
'Documentation to generate:',
|
|
59
|
+
docTypeOptions,
|
|
60
|
+
defaultDocs[answers.contentStrategy] || defaultDocs.minimal
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
// Blog/Content Publishing
|
|
64
|
+
const publishingOptions = [
|
|
65
|
+
{ label: 'Yes, blog with regular posts', value: 'blog', description: 'Regular content publishing' },
|
|
66
|
+
{ label: 'Yes, announcements only', value: 'announcements', description: 'Release notes, updates' },
|
|
67
|
+
{ label: 'Yes, technical blog', value: 'technical', description: 'Tutorials, deep dives' },
|
|
68
|
+
{ label: 'No blog planned', value: 'none', description: 'No content publishing' }
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
answers.contentPublishing = await askChoice(
|
|
72
|
+
rl,
|
|
73
|
+
'Content publishing:',
|
|
74
|
+
publishingOptions,
|
|
75
|
+
answers.contentStrategy === 'marketing' ? 0 :
|
|
76
|
+
answers.contentStrategy === 'developer' ? 2 : 3
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
// Content Formats
|
|
80
|
+
if (answers.contentPublishing !== 'none') {
|
|
81
|
+
const formatOptions = [
|
|
82
|
+
{ label: 'Blog posts', value: 'blog-posts' },
|
|
83
|
+
{ label: 'Tutorials', value: 'tutorials' },
|
|
84
|
+
{ label: 'Case studies', value: 'case-studies' },
|
|
85
|
+
{ label: 'Video content', value: 'video' },
|
|
86
|
+
{ label: 'Newsletter', value: 'newsletter' },
|
|
87
|
+
{ label: 'Social media', value: 'social' },
|
|
88
|
+
{ label: 'Podcasts', value: 'podcasts' },
|
|
89
|
+
{ label: 'Webinars', value: 'webinars' }
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
const defaultFormats = {
|
|
93
|
+
blog: ['blog-posts', 'social', 'newsletter'],
|
|
94
|
+
announcements: ['blog-posts'],
|
|
95
|
+
technical: ['tutorials', 'blog-posts', 'video']
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
answers.contentFormats = await askMultiSelect(
|
|
99
|
+
rl,
|
|
100
|
+
'Content formats:',
|
|
101
|
+
formatOptions,
|
|
102
|
+
defaultFormats[answers.contentPublishing] || []
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// SEO Priority
|
|
107
|
+
const seoOptions = [
|
|
108
|
+
{ label: 'High priority', value: 'high', description: 'Full SEO optimization' },
|
|
109
|
+
{ label: 'Medium priority', value: 'medium', description: 'Basic SEO practices' },
|
|
110
|
+
{ label: 'Low priority', value: 'low', description: 'Minimal SEO focus' },
|
|
111
|
+
{ label: 'Not applicable', value: 'none', description: 'Internal/private content' }
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
answers.seoPriority = await askChoice(
|
|
115
|
+
rl,
|
|
116
|
+
'SEO priority:',
|
|
117
|
+
seoOptions,
|
|
118
|
+
answers.contentStrategy === 'marketing' ? 0 : 1
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
// Documentation Platform
|
|
122
|
+
const platformOptions = [
|
|
123
|
+
{ label: 'Built into app (MDX/Next.js)', value: 'builtin', description: 'Self-hosted docs' },
|
|
124
|
+
{ label: 'Docusaurus', value: 'docusaurus', description: 'React-based docs' },
|
|
125
|
+
{ label: 'GitBook', value: 'gitbook', description: 'Hosted docs platform' },
|
|
126
|
+
{ label: 'ReadMe', value: 'readme', description: 'API docs platform' },
|
|
127
|
+
{ label: 'Notion', value: 'notion', description: 'Wiki-style docs' },
|
|
128
|
+
{ label: 'GitHub Wiki', value: 'github-wiki', description: 'Simple wiki' },
|
|
129
|
+
{ label: 'Custom', value: 'custom', description: 'Build from scratch' }
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
answers.docsPlatform = await askChoice(
|
|
133
|
+
rl,
|
|
134
|
+
'Documentation platform:',
|
|
135
|
+
platformOptions,
|
|
136
|
+
0
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
// Writing Style
|
|
140
|
+
const styleOptions = [
|
|
141
|
+
{ label: 'Technical & precise', value: 'technical', description: 'Developer-focused, detailed' },
|
|
142
|
+
{ label: 'Friendly & approachable', value: 'friendly', description: 'Casual, welcoming' },
|
|
143
|
+
{ label: 'Professional & formal', value: 'professional', description: 'Enterprise, formal' },
|
|
144
|
+
{ label: 'Minimal & concise', value: 'minimal', description: 'Brief, to the point' }
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
answers.writingStyle = await askChoice(
|
|
148
|
+
rl,
|
|
149
|
+
'Writing style:',
|
|
150
|
+
styleOptions,
|
|
151
|
+
answers.contentStrategy === 'marketing' ? 1 :
|
|
152
|
+
answers.contentStrategy === 'internal' ? 2 : 0
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
// Content Templates
|
|
156
|
+
const templateOptions = [
|
|
157
|
+
{ label: 'README template', value: 'readme' },
|
|
158
|
+
{ label: 'Blog post template', value: 'blog' },
|
|
159
|
+
{ label: 'API endpoint docs', value: 'api-docs' },
|
|
160
|
+
{ label: 'Release notes template', value: 'release-notes' },
|
|
161
|
+
{ label: 'Tutorial template', value: 'tutorial' },
|
|
162
|
+
{ label: 'Landing page copy', value: 'landing' },
|
|
163
|
+
{ label: 'Email templates', value: 'email' },
|
|
164
|
+
{ label: 'Social media templates', value: 'social' }
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
answers.contentTemplates = await askMultiSelect(
|
|
168
|
+
rl,
|
|
169
|
+
'Content templates to generate:',
|
|
170
|
+
templateOptions,
|
|
171
|
+
['readme', 'blog', 'release-notes']
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
// Localization
|
|
175
|
+
const localizationOptions = [
|
|
176
|
+
{ label: 'English only', value: 'en', description: 'Single language' },
|
|
177
|
+
{ label: 'English + top languages', value: 'multi-top', description: 'EN, ES, FR, DE, ZH' },
|
|
178
|
+
{ label: 'Full i18n', value: 'full', description: 'All major languages' },
|
|
179
|
+
{ label: 'Community translations', value: 'community', description: 'Crowdsourced' }
|
|
180
|
+
];
|
|
181
|
+
|
|
182
|
+
answers.localization = await askChoice(
|
|
183
|
+
rl,
|
|
184
|
+
'Content localization:',
|
|
185
|
+
localizationOptions,
|
|
186
|
+
0
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
// Content calendar
|
|
190
|
+
if (answers.contentPublishing !== 'none') {
|
|
191
|
+
const calendarOptions = [
|
|
192
|
+
{ label: 'Weekly publishing', value: 'weekly', description: '1+ posts per week' },
|
|
193
|
+
{ label: 'Bi-weekly publishing', value: 'biweekly', description: '2 posts per month' },
|
|
194
|
+
{ label: 'Monthly publishing', value: 'monthly', description: '1 post per month' },
|
|
195
|
+
{ label: 'Release-driven', value: 'release', description: 'Publish with releases' },
|
|
196
|
+
{ label: 'Ad-hoc', value: 'adhoc', description: 'No schedule' }
|
|
197
|
+
];
|
|
198
|
+
|
|
199
|
+
answers.contentCadence = await askChoice(
|
|
200
|
+
rl,
|
|
201
|
+
'Content cadence:',
|
|
202
|
+
calendarOptions,
|
|
203
|
+
3
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return answers;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Generate content-related CLAUDE.md sections
|
|
212
|
+
*/
|
|
213
|
+
function generateSection(answers) {
|
|
214
|
+
const sections = [];
|
|
215
|
+
|
|
216
|
+
if (answers.contentStrategy && answers.contentStrategy !== 'minimal') {
|
|
217
|
+
sections.push(`## Content Strategy
|
|
218
|
+
|
|
219
|
+
- **Strategy**: ${answers.contentStrategy}
|
|
220
|
+
- **Writing Style**: ${answers.writingStyle || 'technical'}
|
|
221
|
+
- **SEO Priority**: ${answers.seoPriority || 'medium'}
|
|
222
|
+
- **Documentation Platform**: ${answers.docsPlatform || 'builtin'}
|
|
223
|
+
- **Localization**: ${answers.localization || 'en'}
|
|
224
|
+
`);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (answers.documentationTypes && answers.documentationTypes.length > 0) {
|
|
228
|
+
sections.push(`### Documentation Types
|
|
229
|
+
|
|
230
|
+
${answers.documentationTypes.map(d => `- ${formatDocType(d)}`).join('\n')}
|
|
231
|
+
`);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (answers.contentFormats && answers.contentFormats.length > 0) {
|
|
235
|
+
sections.push(`### Content Formats
|
|
236
|
+
|
|
237
|
+
${answers.contentFormats.map(f => `- ${formatContentFormat(f)}`).join('\n')}
|
|
238
|
+
|
|
239
|
+
**Cadence**: ${answers.contentCadence || 'ad-hoc'}
|
|
240
|
+
`);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (answers.contentTemplates && answers.contentTemplates.length > 0) {
|
|
244
|
+
sections.push(`### Content Templates
|
|
245
|
+
|
|
246
|
+
${answers.contentTemplates.map(t => `- ${formatTemplate(t)}`).join('\n')}
|
|
247
|
+
`);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return sections.join('\n');
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function formatDocType(type) {
|
|
254
|
+
const labels = {
|
|
255
|
+
'getting-started': 'Getting Started Guide',
|
|
256
|
+
'api-reference': 'API Reference',
|
|
257
|
+
'tutorials': 'Tutorials & Guides',
|
|
258
|
+
'architecture': 'Architecture Documentation',
|
|
259
|
+
'contributing': 'Contributing Guide',
|
|
260
|
+
'changelog': 'Changelog',
|
|
261
|
+
'faq': 'FAQ',
|
|
262
|
+
'troubleshooting': 'Troubleshooting Guide'
|
|
263
|
+
};
|
|
264
|
+
return labels[type] || type;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function formatContentFormat(format) {
|
|
268
|
+
const labels = {
|
|
269
|
+
'blog-posts': 'Blog Posts',
|
|
270
|
+
'tutorials': 'Tutorial Articles',
|
|
271
|
+
'case-studies': 'Case Studies',
|
|
272
|
+
'video': 'Video Content',
|
|
273
|
+
'newsletter': 'Email Newsletter',
|
|
274
|
+
'social': 'Social Media',
|
|
275
|
+
'podcasts': 'Podcast Episodes',
|
|
276
|
+
'webinars': 'Webinars'
|
|
277
|
+
};
|
|
278
|
+
return labels[format] || format;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function formatTemplate(template) {
|
|
282
|
+
const labels = {
|
|
283
|
+
'readme': 'README Template',
|
|
284
|
+
'blog': 'Blog Post Template',
|
|
285
|
+
'api-docs': 'API Documentation Template',
|
|
286
|
+
'release-notes': 'Release Notes Template',
|
|
287
|
+
'tutorial': 'Tutorial Template',
|
|
288
|
+
'landing': 'Landing Page Copy Template',
|
|
289
|
+
'email': 'Email Templates',
|
|
290
|
+
'social': 'Social Media Templates'
|
|
291
|
+
};
|
|
292
|
+
return labels[template] || template;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
module.exports = {
|
|
296
|
+
title,
|
|
297
|
+
description,
|
|
298
|
+
run,
|
|
299
|
+
generateSection
|
|
300
|
+
};
|
|
@@ -31,6 +31,9 @@ module.exports = {
|
|
|
31
31
|
'workflow': require('./workflow'),
|
|
32
32
|
'instructions': require('./instructions'),
|
|
33
33
|
|
|
34
|
+
// Content & Documentation section
|
|
35
|
+
'content': require('./content'),
|
|
36
|
+
|
|
34
37
|
// Legacy sections
|
|
35
38
|
'plugins': require('./plugins'),
|
|
36
39
|
'advanced': require('./advanced')
|
|
@@ -14,7 +14,7 @@ const description = 'Select the features you need';
|
|
|
14
14
|
* Run the plugins section
|
|
15
15
|
*/
|
|
16
16
|
async function run(rl, previousAnswers, helpers) {
|
|
17
|
-
const { askYesNo, askChoice } = helpers;
|
|
17
|
+
const { askYesNo, askChoice, askMultiSelect } = helpers;
|
|
18
18
|
|
|
19
19
|
const answers = {};
|
|
20
20
|
|
|
@@ -87,16 +87,17 @@ async function run(rl, previousAnswers, helpers) {
|
|
|
87
87
|
);
|
|
88
88
|
|
|
89
89
|
if (answers.enableAI) {
|
|
90
|
-
answers.
|
|
90
|
+
answers.aiProviders = await askMultiSelect(
|
|
91
91
|
rl,
|
|
92
|
-
'AI
|
|
92
|
+
'AI providers (select one or more):',
|
|
93
93
|
[
|
|
94
94
|
{ label: 'Anthropic (Claude)', value: 'anthropic', description: 'Claude API' },
|
|
95
95
|
{ label: 'OpenAI', value: 'openai', description: 'GPT models' },
|
|
96
|
-
{ label: '
|
|
97
|
-
{ label: '
|
|
96
|
+
{ label: 'Google AI', value: 'google', description: 'Gemini models' },
|
|
97
|
+
{ label: 'Cohere', value: 'cohere', description: 'Enterprise NLP' },
|
|
98
|
+
{ label: 'Hugging Face', value: 'huggingface', description: 'Open source models' }
|
|
98
99
|
],
|
|
99
|
-
|
|
100
|
+
['anthropic']
|
|
100
101
|
);
|
|
101
102
|
|
|
102
103
|
answers.aiFeatures = [];
|