myaidev-method 0.3.3 → 0.3.5

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 (132) hide show
  1. package/.claude-plugin/plugin.json +0 -1
  2. package/.env.example +5 -4
  3. package/CHANGELOG.md +2 -2
  4. package/CONTENT_CREATION_GUIDE.md +489 -3211
  5. package/DEVELOPER_USE_CASES.md +1 -1
  6. package/MODULAR_INSTALLATION.md +2 -2
  7. package/README.md +39 -33
  8. package/TECHNICAL_ARCHITECTURE.md +1 -1
  9. package/USER_GUIDE.md +242 -190
  10. package/agents/content-editor-agent.md +90 -0
  11. package/agents/content-planner-agent.md +97 -0
  12. package/agents/content-research-agent.md +62 -0
  13. package/agents/content-seo-agent.md +101 -0
  14. package/agents/content-writer-agent.md +69 -0
  15. package/agents/infographic-analyzer-agent.md +63 -0
  16. package/agents/infographic-designer-agent.md +72 -0
  17. package/bin/cli.js +777 -535
  18. package/{content-rules.example.md → content-rules-example.md} +2 -2
  19. package/dist/mcp/health-check.js +82 -68
  20. package/dist/mcp/mcp-config.json +8 -0
  21. package/dist/mcp/openstack-server.js +1746 -1262
  22. package/dist/server/.tsbuildinfo +1 -1
  23. package/extension.json +21 -4
  24. package/package.json +181 -184
  25. package/skills/company-config/SKILL.md +133 -0
  26. package/skills/configure/SKILL.md +1 -1
  27. package/skills/myai-configurator/SKILL.md +77 -0
  28. package/skills/myai-configurator/content-creation-configurator/SKILL.md +516 -0
  29. package/skills/myai-configurator/content-maintenance-configurator/SKILL.md +397 -0
  30. package/skills/myai-content-enrichment/SKILL.md +114 -0
  31. package/skills/myai-content-ideation/SKILL.md +288 -0
  32. package/skills/myai-content-ideation/evals/evals.json +182 -0
  33. package/skills/myai-content-production-coordinator/SKILL.md +946 -0
  34. package/skills/{content-rules-setup → myai-content-rules-setup}/SKILL.md +1 -1
  35. package/skills/{content-verifier → myai-content-verifier}/SKILL.md +1 -1
  36. package/skills/myai-content-writer/SKILL.md +333 -0
  37. package/skills/myai-content-writer/agents/editor-agent.md +138 -0
  38. package/skills/myai-content-writer/agents/planner-agent.md +121 -0
  39. package/skills/myai-content-writer/agents/research-agent.md +83 -0
  40. package/skills/myai-content-writer/agents/seo-agent.md +139 -0
  41. package/skills/myai-content-writer/agents/visual-planner-agent.md +110 -0
  42. package/skills/myai-content-writer/agents/writer-agent.md +85 -0
  43. package/skills/{infographic → myai-infographic}/SKILL.md +1 -1
  44. package/skills/myai-proprietary-content-verifier/SKILL.md +175 -0
  45. package/skills/myai-proprietary-content-verifier/evals/evals.json +36 -0
  46. package/skills/myai-skill-builder/SKILL.md +699 -0
  47. package/skills/myai-skill-builder/agents/analyzer-agent.md +137 -0
  48. package/skills/myai-skill-builder/agents/comparator-agent.md +77 -0
  49. package/skills/myai-skill-builder/agents/grader-agent.md +103 -0
  50. package/skills/myai-skill-builder/assets/eval_review.html +131 -0
  51. package/skills/myai-skill-builder/references/schemas.md +211 -0
  52. package/skills/myai-skill-builder/scripts/aggregate_benchmark.py +190 -0
  53. package/skills/myai-skill-builder/scripts/generate_review.py +381 -0
  54. package/skills/myai-skill-builder/scripts/package_skill.py +91 -0
  55. package/skills/myai-skill-builder/scripts/run_eval.py +105 -0
  56. package/skills/myai-skill-builder/scripts/run_loop.py +211 -0
  57. package/skills/myai-skill-builder/scripts/utils.py +123 -0
  58. package/skills/myai-visual-generator/SKILL.md +125 -0
  59. package/skills/myai-visual-generator/evals/evals.json +155 -0
  60. package/skills/myai-visual-generator/references/infographic-pipeline.md +73 -0
  61. package/skills/myai-visual-generator/references/research-visuals.md +57 -0
  62. package/skills/myai-visual-generator/references/services.md +89 -0
  63. package/skills/myai-visual-generator/scripts/visual-generation-utils.js +1272 -0
  64. package/skills/myaidev-analyze/agents/dependency-mapper-agent.md +236 -0
  65. package/skills/myaidev-analyze/agents/pattern-detector-agent.md +240 -0
  66. package/skills/myaidev-analyze/agents/structure-scanner-agent.md +171 -0
  67. package/skills/myaidev-analyze/agents/tech-profiler-agent.md +291 -0
  68. package/skills/myaidev-architect/agents/compliance-checker-agent.md +287 -0
  69. package/skills/myaidev-architect/agents/requirements-analyst-agent.md +194 -0
  70. package/skills/myaidev-architect/agents/system-designer-agent.md +315 -0
  71. package/skills/myaidev-coder/agents/implementer-agent.md +185 -0
  72. package/skills/myaidev-coder/agents/integration-agent.md +168 -0
  73. package/skills/myaidev-coder/agents/pattern-scanner-agent.md +161 -0
  74. package/skills/myaidev-coder/agents/self-reviewer-agent.md +168 -0
  75. package/skills/myaidev-debug/agents/fix-agent-debug.md +317 -0
  76. package/skills/myaidev-debug/agents/hypothesis-agent.md +226 -0
  77. package/skills/myaidev-debug/agents/investigator-agent.md +250 -0
  78. package/skills/myaidev-debug/agents/symptom-collector-agent.md +231 -0
  79. package/skills/myaidev-documenter/agents/code-reader-agent.md +172 -0
  80. package/skills/myaidev-documenter/agents/doc-validator-agent.md +174 -0
  81. package/skills/myaidev-documenter/agents/doc-writer-agent.md +379 -0
  82. package/skills/myaidev-figma/SKILL.md +212 -0
  83. package/skills/myaidev-figma/capture.js +133 -0
  84. package/skills/myaidev-figma/crawl.js +130 -0
  85. package/skills/myaidev-figma-configure/SKILL.md +130 -0
  86. package/skills/myaidev-migrate/agents/migration-planner-agent.md +237 -0
  87. package/skills/myaidev-migrate/agents/migration-writer-agent.md +248 -0
  88. package/skills/myaidev-migrate/agents/schema-analyzer-agent.md +190 -0
  89. package/skills/myaidev-performance/agents/benchmark-agent.md +281 -0
  90. package/skills/myaidev-performance/agents/optimizer-agent.md +277 -0
  91. package/skills/myaidev-performance/agents/profiler-agent.md +252 -0
  92. package/skills/myaidev-refactor/agents/refactor-executor-agent.md +221 -0
  93. package/skills/myaidev-refactor/agents/refactor-planner-agent.md +213 -0
  94. package/skills/myaidev-refactor/agents/regression-guard-agent.md +242 -0
  95. package/skills/myaidev-refactor/agents/smell-detector-agent.md +233 -0
  96. package/skills/myaidev-reviewer/agents/auto-fixer-agent.md +238 -0
  97. package/skills/myaidev-reviewer/agents/code-analyst-agent.md +220 -0
  98. package/skills/myaidev-reviewer/agents/security-scanner-agent.md +262 -0
  99. package/skills/myaidev-tester/agents/coverage-analyst-agent.md +163 -0
  100. package/skills/myaidev-tester/agents/tdd-driver-agent.md +242 -0
  101. package/skills/myaidev-tester/agents/test-runner-agent.md +176 -0
  102. package/skills/myaidev-tester/agents/test-strategist-agent.md +154 -0
  103. package/skills/myaidev-tester/agents/test-writer-agent.md +242 -0
  104. package/skills/myaidev-workflow/agents/analyzer-agent.md +317 -0
  105. package/skills/myaidev-workflow/agents/coordinator-agent.md +253 -0
  106. package/skills/openstack-manager/SKILL.md +1 -1
  107. package/skills/payloadcms-publisher/SKILL.md +141 -77
  108. package/skills/payloadcms-publisher/references/field-mapping.md +142 -0
  109. package/skills/payloadcms-publisher/references/lexical-format.md +97 -0
  110. package/skills/security-auditor/SKILL.md +1 -1
  111. package/src/cli/commands/addon.js +184 -123
  112. package/src/config/workflows.js +172 -228
  113. package/src/lib/ascii-banner.js +197 -182
  114. package/src/lib/{content-coordinator.js → content-production-coordinator.js} +649 -459
  115. package/src/lib/installation-detector.js +93 -59
  116. package/src/lib/payloadcms-utils.js +285 -510
  117. package/src/lib/update-manager.js +120 -61
  118. package/src/lib/workflow-installer.js +55 -0
  119. package/src/mcp/health-check.js +82 -68
  120. package/src/mcp/openstack-server.js +1746 -1262
  121. package/src/scripts/configure-visual-apis.js +224 -173
  122. package/src/scripts/configure-wordpress-mcp.js +96 -66
  123. package/src/scripts/init/install.js +109 -85
  124. package/src/scripts/init-project.js +138 -67
  125. package/src/scripts/utils/write-content.js +67 -52
  126. package/src/scripts/wordpress/publish-to-wordpress.js +128 -128
  127. package/src/templates/claude/CLAUDE.md +131 -0
  128. package/hooks/hooks.json +0 -26
  129. package/skills/content-coordinator/SKILL.md +0 -130
  130. package/skills/content-enrichment/SKILL.md +0 -80
  131. package/skills/content-writer/SKILL.md +0 -285
  132. package/skills/visual-generator/SKILL.md +0 -140
@@ -5,83 +5,154 @@
5
5
  * Enhanced welcome and quick start guide
6
6
  */
7
7
 
8
- import chalk from 'chalk';
8
+ import chalk from "chalk";
9
9
 
10
10
  function printWelcome() {
11
- console.log('');
12
- console.log(chalk.cyan.bold('🚀 Welcome to MyAIDev Method!'));
13
- console.log('');
14
- console.log(chalk.gray('A comprehensive AI-powered content creation and publishing toolkit'));
15
- console.log(chalk.gray('for Claude Code, optimized for modern development workflows'));
16
- console.log('');
11
+ console.log("");
12
+ console.log(chalk.cyan.bold("🚀 Welcome to MyAIDev Method!"));
13
+ console.log("");
14
+ console.log(
15
+ chalk.gray(
16
+ "A comprehensive AI-powered content creation and publishing toolkit",
17
+ ),
18
+ );
19
+ console.log(
20
+ chalk.gray("for Claude Code, optimized for modern development workflows"),
21
+ );
22
+ console.log("");
17
23
 
18
- console.log(chalk.yellow.bold('📝 CONTENT CREATION'));
19
- console.log(chalk.white(' • AI-powered content writing agent'));
20
- console.log(chalk.white(' • SEO-optimized article generation'));
21
- console.log(chalk.white(' • Multiple tone and style options'));
22
- console.log(chalk.cyan(' Command: ') + chalk.green('/myai-content-writer'));
23
- console.log('');
24
+ console.log(chalk.yellow.bold("📝 CONTENT CREATION"));
25
+ console.log(chalk.white(" • AI-powered content writing agent"));
26
+ console.log(chalk.white(" • SEO-optimized article generation"));
27
+ console.log(chalk.white(" • Multiple tone and style options"));
28
+ console.log(chalk.cyan(" Command: ") + chalk.green("/content-writer"));
29
+ console.log("");
24
30
 
25
- console.log(chalk.yellow.bold('📤 PUBLISHING PLATFORMS'));
26
- console.log(chalk.white(' • ') + chalk.bold('WordPress') + chalk.gray(' - REST API publishing with Gutenberg blocks'));
27
- console.log(chalk.white('') + chalk.bold('PayloadCMS') + chalk.gray(' - Headless CMS publishing with Lexical editor'));
28
- console.log(chalk.white(' • ') + chalk.bold('Docusaurus') + chalk.gray(' - Documentation site publishing'));
29
- console.log(chalk.white(' • ') + chalk.bold('Mintlify') + chalk.gray(' - API documentation publishing'));
30
- console.log(chalk.white(' • ') + chalk.bold('Astro') + chalk.gray(' - Static site publishing'));
31
- console.log('');
32
- console.log(chalk.cyan(' Configure: ') + chalk.green('/myai-configure'));
33
- console.log(chalk.cyan(' Publish: ') + chalk.green('/myai-[platform]-publish "content.md"'));
34
- console.log('');
31
+ console.log(chalk.yellow.bold("📤 PUBLISHING PLATFORMS"));
32
+ console.log(
33
+ chalk.white("") +
34
+ chalk.bold("WordPress") +
35
+ chalk.gray(" - REST API publishing with Gutenberg blocks"),
36
+ );
37
+ console.log(
38
+ chalk.white(" ") +
39
+ chalk.bold("PayloadCMS") +
40
+ chalk.gray(" - Headless CMS publishing with Lexical editor"),
41
+ );
42
+ console.log(
43
+ chalk.white(" • ") +
44
+ chalk.bold("Docusaurus") +
45
+ chalk.gray(" - Documentation site publishing"),
46
+ );
47
+ console.log(
48
+ chalk.white(" • ") +
49
+ chalk.bold("Mintlify") +
50
+ chalk.gray(" - API documentation publishing"),
51
+ );
52
+ console.log(
53
+ chalk.white(" • ") +
54
+ chalk.bold("Astro") +
55
+ chalk.gray(" - Static site publishing"),
56
+ );
57
+ console.log("");
58
+ console.log(chalk.cyan(" Configure: ") + chalk.green("/myai-configure"));
59
+ console.log(
60
+ chalk.cyan(" Publish: ") +
61
+ chalk.green('/[platform]-publish "content.md"'),
62
+ );
63
+ console.log("");
35
64
 
36
- console.log(chalk.yellow.bold('🚀 DEPLOYMENT'));
37
- console.log(chalk.white(' • ') + chalk.bold('Coolify') + chalk.gray(' - Self-hosted PaaS deployment'));
38
- console.log(chalk.white('Automated app deployment and management'));
39
- console.log(chalk.white(' • Health monitoring and status checks'));
40
- console.log(chalk.cyan(' Command: ') + chalk.green('/myai-coolify-deploy'));
41
- console.log('');
65
+ console.log(chalk.yellow.bold("🚀 DEPLOYMENT"));
66
+ console.log(
67
+ chalk.white("") +
68
+ chalk.bold("Coolify") +
69
+ chalk.gray(" - Self-hosted PaaS deployment"),
70
+ );
71
+ console.log(chalk.white(" • Automated app deployment and management"));
72
+ console.log(chalk.white(" • Health monitoring and status checks"));
73
+ console.log(chalk.cyan(" Command: ") + chalk.green("/coolify-deployer"));
74
+ console.log("");
42
75
 
43
- console.log(chalk.yellow.bold('⚙️ WORDPRESS ADMIN'));
44
- console.log(chalk.white(' • Health checks and security scanning'));
45
- console.log(chalk.white(' • Performance monitoring'));
46
- console.log(chalk.white(' • Comprehensive reporting'));
47
- console.log(chalk.cyan(' Scripts: ') + chalk.green('npm run wordpress:health-check'));
48
- console.log('');
76
+ console.log(chalk.yellow.bold("⚙️ WORDPRESS ADMIN"));
77
+ console.log(chalk.white(" • Health checks and security scanning"));
78
+ console.log(chalk.white(" • Performance monitoring"));
79
+ console.log(chalk.white(" • Comprehensive reporting"));
80
+ console.log(
81
+ chalk.cyan(" Scripts: ") + chalk.green("npm run wordpress:health-check"),
82
+ );
83
+ console.log("");
49
84
 
50
- console.log(chalk.yellow.bold('📚 QUICK START'));
51
- console.log(chalk.white(' 1. Configure your platform:'));
52
- console.log(chalk.gray(' ') + chalk.green('/myai-configure'));
53
- console.log('');
54
- console.log(chalk.white(' 2. Create content:'));
55
- console.log(chalk.gray(' ') + chalk.green('/myai-content-writer "your topic"'));
56
- console.log('');
57
- console.log(chalk.white(' 3. Publish to your platform:'));
58
- console.log(chalk.gray(' ') + chalk.green('/myai-wordpress-publish "content.md"'));
59
- console.log(chalk.gray(' ') + chalk.green('/myai-payloadcms-publish "content.md" --status published'));
60
- console.log(chalk.gray(' ') + chalk.green('/myai-docusaurus-publish "content.md" --type blog'));
61
- console.log('');
62
- console.log(chalk.white(' 4. Deploy your application:'));
63
- console.log(chalk.gray(' ') + chalk.green('/myai-coolify-deploy'));
64
- console.log('');
85
+ console.log(chalk.yellow.bold("📚 QUICK START"));
86
+ console.log(chalk.white(" 1. Configure your platform:"));
87
+ console.log(chalk.gray(" ") + chalk.green("/myai-configurator"));
88
+ console.log("");
89
+ console.log(chalk.white(" 2. Create content:"));
90
+ console.log(
91
+ chalk.gray(" ") + chalk.green('/content-writer "your topic"'),
92
+ );
93
+ console.log("");
94
+ console.log(chalk.white(" 3. Publish to your platform:"));
95
+ console.log(
96
+ chalk.gray(" ") + chalk.green('/wordpress-publish "content.md"'),
97
+ );
98
+ console.log(
99
+ chalk.gray(" ") +
100
+ chalk.green('/payloadcms-publish "content.md" --status published'),
101
+ );
102
+ console.log(
103
+ chalk.gray(" ") +
104
+ chalk.green('/docusaurus-publish "content.md" --type blog'),
105
+ );
106
+ console.log("");
107
+ console.log(chalk.white(" 4. Deploy your application:"));
108
+ console.log(chalk.gray(" ") + chalk.green("/coolify-deployer"));
109
+ console.log("");
65
110
 
66
- console.log(chalk.yellow.bold('📖 DOCUMENTATION'));
67
- console.log(chalk.white(' • Publishing Guide: ') + chalk.cyan('PUBLISHING_GUIDE.md'));
68
- console.log(chalk.white('WordPress Admin: ') + chalk.cyan('WORDPRESS_ADMIN_SCRIPTS.md'));
69
- console.log(chalk.white(' • PayloadCMS: ') + chalk.cyan('PAYLOADCMS_PUBLISHING.md'));
70
- console.log(chalk.white(' • Static Sites: ') + chalk.cyan('STATIC_SITE_PUBLISHING.md'));
71
- console.log(chalk.white(' • Coolify Deployment: ') + chalk.cyan('COOLIFY_DEPLOYMENT.md'));
72
- console.log(chalk.white('User Guide: ') + chalk.cyan('USER_GUIDE.md'));
73
- console.log('');
111
+ console.log(chalk.yellow.bold("📖 DOCUMENTATION"));
112
+ console.log(
113
+ chalk.white("Publishing Guide: ") +
114
+ chalk.cyan("PUBLISHING_GUIDE.md"),
115
+ );
116
+ console.log(
117
+ chalk.white("WordPress Admin: ") +
118
+ chalk.cyan("WORDPRESS_ADMIN_SCRIPTS.md"),
119
+ );
120
+ console.log(
121
+ chalk.white(" • PayloadCMS: ") +
122
+ chalk.cyan("PAYLOADCMS_PUBLISHING.md"),
123
+ );
124
+ console.log(
125
+ chalk.white(" • Static Sites: ") +
126
+ chalk.cyan("STATIC_SITE_PUBLISHING.md"),
127
+ );
128
+ console.log(
129
+ chalk.white(" • Coolify Deployment: ") +
130
+ chalk.cyan("COOLIFY_DEPLOYMENT.md"),
131
+ );
132
+ console.log(
133
+ chalk.white(" • User Guide: ") + chalk.cyan("USER_GUIDE.md"),
134
+ );
135
+ console.log("");
74
136
 
75
- console.log(chalk.yellow.bold('🔗 LINKS'));
76
- console.log(chalk.white(' • GitHub: ') + chalk.cyan('https://github.com/myaione/myaidev-method'));
77
- console.log(chalk.white('NPM Package: ') + chalk.cyan('https://www.npmjs.com/package/myaidev-method'));
78
- console.log(chalk.white(' • Issues: ') + chalk.cyan('https://github.com/myaione/myaidev-method/issues'));
79
- console.log('');
137
+ console.log(chalk.yellow.bold("🔗 LINKS"));
138
+ console.log(
139
+ chalk.white("GitHub: ") +
140
+ chalk.cyan("https://github.com/myaione/myaidev-method"),
141
+ );
142
+ console.log(
143
+ chalk.white(" • NPM Package: ") +
144
+ chalk.cyan("https://www.npmjs.com/package/myaidev-method"),
145
+ );
146
+ console.log(
147
+ chalk.white(" • Issues: ") +
148
+ chalk.cyan("https://github.com/myaione/myaidev-method/issues"),
149
+ );
150
+ console.log("");
80
151
 
81
- console.log(chalk.gray(''.repeat(70)));
82
- console.log(chalk.green('✨ Ready to create and publish amazing content!'));
83
- console.log(chalk.gray(''.repeat(70)));
84
- console.log('');
152
+ console.log(chalk.gray("".repeat(70)));
153
+ console.log(chalk.green("✨ Ready to create and publish amazing content!"));
154
+ console.log(chalk.gray("".repeat(70)));
155
+ console.log("");
85
156
  }
86
157
 
87
158
  if (import.meta.url === `file://${process.argv[1]}`) {
@@ -6,11 +6,11 @@
6
6
  * Usage: node write-content.js "Topic" [options]
7
7
  */
8
8
 
9
- import { ContentGenerator } from '../../lib/content-generator.js';
10
- import { SEOOptimizer } from '../../lib/seo-optimizer.js';
11
- import { logger, formatTable } from './logger.js';
12
- import fs from 'fs-extra';
13
- import path from 'path';
9
+ import { ContentGenerator } from "../../lib/content-generator.js";
10
+ import { SEOOptimizer } from "../../lib/seo-optimizer.js";
11
+ import { logger, formatTable } from "./logger.js";
12
+ import fs from "fs-extra";
13
+ import path from "path";
14
14
 
15
15
  /**
16
16
  * Parse command line arguments
@@ -19,38 +19,38 @@ import path from 'path';
19
19
  */
20
20
  function parseArgs(args) {
21
21
  const options = {
22
- topic: '',
23
- contentType: 'blog-post',
22
+ topic: "",
23
+ contentType: "blog-post",
24
24
  wordCount: 1500,
25
- tone: 'professional',
25
+ tone: "professional",
26
26
  keywords: [],
27
- outputDir: './content',
28
- outputFile: '',
27
+ outputDir: "./content",
28
+ outputFile: "",
29
29
  analyze: false,
30
- help: false
30
+ help: false,
31
31
  };
32
32
 
33
33
  let i = 0;
34
34
  while (i < args.length) {
35
35
  const arg = args[i];
36
36
 
37
- if (arg === '--help' || arg === '-h') {
37
+ if (arg === "--help" || arg === "-h") {
38
38
  options.help = true;
39
- } else if (arg === '--type' || arg === '-t') {
39
+ } else if (arg === "--type" || arg === "-t") {
40
40
  options.contentType = args[++i];
41
- } else if (arg === '--word-count' || arg === '-w') {
41
+ } else if (arg === "--word-count" || arg === "-w") {
42
42
  options.wordCount = parseInt(args[++i], 10);
43
- } else if (arg === '--tone') {
43
+ } else if (arg === "--tone") {
44
44
  options.tone = args[++i];
45
- } else if (arg === '--keywords' || arg === '-k') {
46
- options.keywords = args[++i].split(',').map(k => k.trim());
47
- } else if (arg === '--output' || arg === '-o') {
45
+ } else if (arg === "--keywords" || arg === "-k") {
46
+ options.keywords = args[++i].split(",").map((k) => k.trim());
47
+ } else if (arg === "--output" || arg === "-o") {
48
48
  options.outputFile = args[++i];
49
- } else if (arg === '--output-dir') {
49
+ } else if (arg === "--output-dir") {
50
50
  options.outputDir = args[++i];
51
- } else if (arg === '--analyze' || arg === '-a') {
51
+ } else if (arg === "--analyze" || arg === "-a") {
52
52
  options.analyze = true;
53
- } else if (!arg.startsWith('-')) {
53
+ } else if (!arg.startsWith("-")) {
54
54
  options.topic = arg;
55
55
  }
56
56
 
@@ -94,7 +94,7 @@ async function generateContentSpec(options) {
94
94
  const generator = new ContentGenerator({
95
95
  outputDir: options.outputDir,
96
96
  tone: options.tone,
97
- wordCount: options.wordCount
97
+ wordCount: options.wordCount,
98
98
  });
99
99
 
100
100
  await generator.initialize();
@@ -113,32 +113,35 @@ async function generateContentSpec(options) {
113
113
  contentType: options.contentType,
114
114
  wordCount: options.wordCount,
115
115
  tone: options.tone,
116
- keywords: options.keywords
116
+ keywords: options.keywords,
117
117
  });
118
118
 
119
- logger.header('Content Specification');
119
+ logger.header("Content Specification");
120
120
  logger.log(`Topic: ${spec.topic}`);
121
121
  logger.log(`Type: ${spec.contentType}`);
122
122
  logger.log(`Word Count Target: ${spec.wordCount}`);
123
123
  logger.log(`Tone: ${spec.tone}`);
124
- logger.log(`Keywords: ${spec.keywords.length > 0 ? spec.keywords.join(', ') : 'None specified'}`);
124
+ logger.log(
125
+ `Keywords: ${spec.keywords.length > 0 ? spec.keywords.join(", ") : "None specified"}`,
126
+ );
125
127
  logger.blank();
126
128
 
127
- logger.section('Required Sections');
129
+ logger.section("Required Sections");
128
130
  for (const section of spec.sections) {
129
131
  logger.log(` • ${section}`);
130
132
  }
131
133
 
132
- logger.section('Frontmatter Fields');
134
+ logger.section("Frontmatter Fields");
133
135
  for (const field of spec.requiredFrontmatter) {
134
136
  logger.log(` • ${field}`);
135
137
  }
136
138
 
137
139
  // Generate filename
138
- const filename = options.outputFile || generator.generateFilename(options.topic);
140
+ const filename =
141
+ options.outputFile || generator.generateFilename(options.topic);
139
142
  const outputPath = path.join(options.outputDir, filename);
140
143
 
141
- logger.section('Output');
144
+ logger.section("Output");
142
145
  logger.log(`Filename: ${filename}`);
143
146
  logger.log(`Path: ${outputPath}`);
144
147
  logger.blank();
@@ -146,12 +149,12 @@ async function generateContentSpec(options) {
146
149
  // Generate frontmatter template
147
150
  const frontmatterData = {
148
151
  title: options.topic,
149
- description: '',
150
- date: new Date().toISOString().split('T')[0],
151
- author: '',
152
+ description: "",
153
+ date: new Date().toISOString().split("T")[0],
154
+ author: "",
152
155
  categories: [],
153
156
  tags: options.keywords,
154
- status: 'draft'
157
+ status: "draft",
155
158
  };
156
159
 
157
160
  const frontmatter = generator.generateFrontmatter(frontmatterData);
@@ -166,11 +169,19 @@ async function generateContentSpec(options) {
166
169
 
167
170
  [Write introduction here]
168
171
 
169
- ${spec.sections.slice(1).map(section => `
170
- ## ${section.split('-').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ')}
172
+ ${spec.sections
173
+ .slice(1)
174
+ .map(
175
+ (section) => `
176
+ ## ${section
177
+ .split("-")
178
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
179
+ .join(" ")}
171
180
 
172
181
  [Write ${section} content here]
173
- `).join('\n')}
182
+ `,
183
+ )
184
+ .join("\n")}
174
185
 
175
186
  <!-- Call to Action -->
176
187
 
@@ -180,12 +191,14 @@ ${spec.sections.slice(1).map(section => `
180
191
  `;
181
192
 
182
193
  await fs.ensureDir(options.outputDir);
183
- await fs.writeFile(outputPath, templateContent, 'utf-8');
194
+ await fs.writeFile(outputPath, templateContent, "utf-8");
184
195
 
185
196
  logger.success(`Template created: ${outputPath}`);
186
197
  logger.blank();
187
- logger.info('Use the content-writer agent to generate full content:');
188
- logger.log(` /myai-content-writer "${options.topic}" --type ${options.contentType}`);
198
+ logger.info("Use the content-writer agent to generate full content:");
199
+ logger.log(
200
+ ` /content-writer "${options.topic}" --type ${options.contentType}`,
201
+ );
189
202
 
190
203
  return { spec, outputPath, templateContent };
191
204
  }
@@ -198,21 +211,23 @@ ${spec.sections.slice(1).map(section => `
198
211
  async function analyzeContent(filePath, keywords) {
199
212
  const optimizer = new SEOOptimizer();
200
213
 
201
- const content = await fs.readFile(filePath, 'utf-8');
214
+ const content = await fs.readFile(filePath, "utf-8");
202
215
 
203
216
  // Extract title from frontmatter or first heading
204
- const titleMatch = content.match(/^title:\s*(.+)$/m) || content.match(/^#\s+(.+)$/m);
205
- const title = titleMatch ? titleMatch[1].trim() : '';
217
+ const titleMatch =
218
+ content.match(/^title:\s*(.+)$/m) || content.match(/^#\s+(.+)$/m);
219
+ const title = titleMatch ? titleMatch[1].trim() : "";
206
220
 
207
- logger.header('SEO Analysis');
221
+ logger.header("SEO Analysis");
208
222
  logger.log(`File: ${filePath}`);
209
- logger.log(`Title: ${title || 'Not found'}`);
223
+ logger.log(`Title: ${title || "Not found"}`);
210
224
  logger.blank();
211
225
 
212
226
  const analysis = optimizer.analyzeSEO(content, keywords, title);
213
227
 
214
228
  // Score display
215
- const scoreColor = analysis.score >= 80 ? 'green' : analysis.score >= 60 ? 'yellow' : 'red';
229
+ const scoreColor =
230
+ analysis.score >= 80 ? "green" : analysis.score >= 60 ? "yellow" : "red";
216
231
  logger.log(`SEO Score: ${analysis.score}/100 (Grade: ${analysis.grade})`);
217
232
  logger.log(`Word Count: ${analysis.wordCount}`);
218
233
  if (analysis.keywordDensity !== null) {
@@ -222,7 +237,7 @@ async function analyzeContent(filePath, keywords) {
222
237
 
223
238
  // Issues
224
239
  if (analysis.issues.length > 0) {
225
- logger.section('Issues');
240
+ logger.section("Issues");
226
241
  for (const issue of analysis.issues) {
227
242
  logger.error(issue);
228
243
  }
@@ -230,21 +245,21 @@ async function analyzeContent(filePath, keywords) {
230
245
 
231
246
  // Recommendations
232
247
  if (analysis.recommendations.length > 0) {
233
- logger.section('Recommendations');
248
+ logger.section("Recommendations");
234
249
  for (const rec of analysis.recommendations) {
235
250
  logger.warn(rec);
236
251
  }
237
252
  }
238
253
 
239
254
  // Meta description
240
- logger.section('Generated Meta Description');
255
+ logger.section("Generated Meta Description");
241
256
  const metaDesc = optimizer.generateMetaDescription(content);
242
257
  logger.log(metaDesc);
243
258
  logger.log(`Length: ${metaDesc.length} characters`);
244
259
 
245
260
  // Slug
246
261
  if (title) {
247
- logger.section('Generated Slug');
262
+ logger.section("Generated Slug");
248
263
  logger.log(optimizer.generateSlug(title));
249
264
  }
250
265
 
@@ -264,14 +279,14 @@ async function main() {
264
279
  }
265
280
 
266
281
  if (!options.topic && !options.analyze) {
267
- logger.error('Topic is required. Use --help for usage information.');
282
+ logger.error("Topic is required. Use --help for usage information.");
268
283
  process.exit(1);
269
284
  }
270
285
 
271
286
  try {
272
287
  if (options.analyze && options.topic) {
273
288
  // If topic looks like a file path, analyze it
274
- if (options.topic.endsWith('.md') || options.topic.includes('/')) {
289
+ if (options.topic.endsWith(".md") || options.topic.includes("/")) {
275
290
  await analyzeContent(options.topic, options.keywords);
276
291
  } else {
277
292
  // Generate spec and analyze
@@ -279,7 +294,7 @@ async function main() {
279
294
  await analyzeContent(outputPath, options.keywords);
280
295
  }
281
296
  } else if (options.analyze && !options.topic) {
282
- logger.error('Please provide a file path to analyze.');
297
+ logger.error("Please provide a file path to analyze.");
283
298
  process.exit(1);
284
299
  } else {
285
300
  await generateContentSpec(options);