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.
- package/.claude-plugin/plugin.json +0 -1
- package/.env.example +5 -4
- package/CHANGELOG.md +2 -2
- package/CONTENT_CREATION_GUIDE.md +489 -3211
- package/DEVELOPER_USE_CASES.md +1 -1
- package/MODULAR_INSTALLATION.md +2 -2
- package/README.md +39 -33
- package/TECHNICAL_ARCHITECTURE.md +1 -1
- package/USER_GUIDE.md +242 -190
- package/agents/content-editor-agent.md +90 -0
- package/agents/content-planner-agent.md +97 -0
- package/agents/content-research-agent.md +62 -0
- package/agents/content-seo-agent.md +101 -0
- package/agents/content-writer-agent.md +69 -0
- package/agents/infographic-analyzer-agent.md +63 -0
- package/agents/infographic-designer-agent.md +72 -0
- package/bin/cli.js +777 -535
- package/{content-rules.example.md → content-rules-example.md} +2 -2
- package/dist/mcp/health-check.js +82 -68
- package/dist/mcp/mcp-config.json +8 -0
- package/dist/mcp/openstack-server.js +1746 -1262
- package/dist/server/.tsbuildinfo +1 -1
- package/extension.json +21 -4
- package/package.json +181 -184
- package/skills/company-config/SKILL.md +133 -0
- package/skills/configure/SKILL.md +1 -1
- package/skills/myai-configurator/SKILL.md +77 -0
- package/skills/myai-configurator/content-creation-configurator/SKILL.md +516 -0
- package/skills/myai-configurator/content-maintenance-configurator/SKILL.md +397 -0
- package/skills/myai-content-enrichment/SKILL.md +114 -0
- package/skills/myai-content-ideation/SKILL.md +288 -0
- package/skills/myai-content-ideation/evals/evals.json +182 -0
- package/skills/myai-content-production-coordinator/SKILL.md +946 -0
- package/skills/{content-rules-setup → myai-content-rules-setup}/SKILL.md +1 -1
- package/skills/{content-verifier → myai-content-verifier}/SKILL.md +1 -1
- package/skills/myai-content-writer/SKILL.md +333 -0
- package/skills/myai-content-writer/agents/editor-agent.md +138 -0
- package/skills/myai-content-writer/agents/planner-agent.md +121 -0
- package/skills/myai-content-writer/agents/research-agent.md +83 -0
- package/skills/myai-content-writer/agents/seo-agent.md +139 -0
- package/skills/myai-content-writer/agents/visual-planner-agent.md +110 -0
- package/skills/myai-content-writer/agents/writer-agent.md +85 -0
- package/skills/{infographic → myai-infographic}/SKILL.md +1 -1
- package/skills/myai-proprietary-content-verifier/SKILL.md +175 -0
- package/skills/myai-proprietary-content-verifier/evals/evals.json +36 -0
- package/skills/myai-skill-builder/SKILL.md +699 -0
- package/skills/myai-skill-builder/agents/analyzer-agent.md +137 -0
- package/skills/myai-skill-builder/agents/comparator-agent.md +77 -0
- package/skills/myai-skill-builder/agents/grader-agent.md +103 -0
- package/skills/myai-skill-builder/assets/eval_review.html +131 -0
- package/skills/myai-skill-builder/references/schemas.md +211 -0
- package/skills/myai-skill-builder/scripts/aggregate_benchmark.py +190 -0
- package/skills/myai-skill-builder/scripts/generate_review.py +381 -0
- package/skills/myai-skill-builder/scripts/package_skill.py +91 -0
- package/skills/myai-skill-builder/scripts/run_eval.py +105 -0
- package/skills/myai-skill-builder/scripts/run_loop.py +211 -0
- package/skills/myai-skill-builder/scripts/utils.py +123 -0
- package/skills/myai-visual-generator/SKILL.md +125 -0
- package/skills/myai-visual-generator/evals/evals.json +155 -0
- package/skills/myai-visual-generator/references/infographic-pipeline.md +73 -0
- package/skills/myai-visual-generator/references/research-visuals.md +57 -0
- package/skills/myai-visual-generator/references/services.md +89 -0
- package/skills/myai-visual-generator/scripts/visual-generation-utils.js +1272 -0
- package/skills/myaidev-analyze/agents/dependency-mapper-agent.md +236 -0
- package/skills/myaidev-analyze/agents/pattern-detector-agent.md +240 -0
- package/skills/myaidev-analyze/agents/structure-scanner-agent.md +171 -0
- package/skills/myaidev-analyze/agents/tech-profiler-agent.md +291 -0
- package/skills/myaidev-architect/agents/compliance-checker-agent.md +287 -0
- package/skills/myaidev-architect/agents/requirements-analyst-agent.md +194 -0
- package/skills/myaidev-architect/agents/system-designer-agent.md +315 -0
- package/skills/myaidev-coder/agents/implementer-agent.md +185 -0
- package/skills/myaidev-coder/agents/integration-agent.md +168 -0
- package/skills/myaidev-coder/agents/pattern-scanner-agent.md +161 -0
- package/skills/myaidev-coder/agents/self-reviewer-agent.md +168 -0
- package/skills/myaidev-debug/agents/fix-agent-debug.md +317 -0
- package/skills/myaidev-debug/agents/hypothesis-agent.md +226 -0
- package/skills/myaidev-debug/agents/investigator-agent.md +250 -0
- package/skills/myaidev-debug/agents/symptom-collector-agent.md +231 -0
- package/skills/myaidev-documenter/agents/code-reader-agent.md +172 -0
- package/skills/myaidev-documenter/agents/doc-validator-agent.md +174 -0
- package/skills/myaidev-documenter/agents/doc-writer-agent.md +379 -0
- package/skills/myaidev-figma/SKILL.md +212 -0
- package/skills/myaidev-figma/capture.js +133 -0
- package/skills/myaidev-figma/crawl.js +130 -0
- package/skills/myaidev-figma-configure/SKILL.md +130 -0
- package/skills/myaidev-migrate/agents/migration-planner-agent.md +237 -0
- package/skills/myaidev-migrate/agents/migration-writer-agent.md +248 -0
- package/skills/myaidev-migrate/agents/schema-analyzer-agent.md +190 -0
- package/skills/myaidev-performance/agents/benchmark-agent.md +281 -0
- package/skills/myaidev-performance/agents/optimizer-agent.md +277 -0
- package/skills/myaidev-performance/agents/profiler-agent.md +252 -0
- package/skills/myaidev-refactor/agents/refactor-executor-agent.md +221 -0
- package/skills/myaidev-refactor/agents/refactor-planner-agent.md +213 -0
- package/skills/myaidev-refactor/agents/regression-guard-agent.md +242 -0
- package/skills/myaidev-refactor/agents/smell-detector-agent.md +233 -0
- package/skills/myaidev-reviewer/agents/auto-fixer-agent.md +238 -0
- package/skills/myaidev-reviewer/agents/code-analyst-agent.md +220 -0
- package/skills/myaidev-reviewer/agents/security-scanner-agent.md +262 -0
- package/skills/myaidev-tester/agents/coverage-analyst-agent.md +163 -0
- package/skills/myaidev-tester/agents/tdd-driver-agent.md +242 -0
- package/skills/myaidev-tester/agents/test-runner-agent.md +176 -0
- package/skills/myaidev-tester/agents/test-strategist-agent.md +154 -0
- package/skills/myaidev-tester/agents/test-writer-agent.md +242 -0
- package/skills/myaidev-workflow/agents/analyzer-agent.md +317 -0
- package/skills/myaidev-workflow/agents/coordinator-agent.md +253 -0
- package/skills/openstack-manager/SKILL.md +1 -1
- package/skills/payloadcms-publisher/SKILL.md +141 -77
- package/skills/payloadcms-publisher/references/field-mapping.md +142 -0
- package/skills/payloadcms-publisher/references/lexical-format.md +97 -0
- package/skills/security-auditor/SKILL.md +1 -1
- package/src/cli/commands/addon.js +184 -123
- package/src/config/workflows.js +172 -228
- package/src/lib/ascii-banner.js +197 -182
- package/src/lib/{content-coordinator.js → content-production-coordinator.js} +649 -459
- package/src/lib/installation-detector.js +93 -59
- package/src/lib/payloadcms-utils.js +285 -510
- package/src/lib/update-manager.js +120 -61
- package/src/lib/workflow-installer.js +55 -0
- package/src/mcp/health-check.js +82 -68
- package/src/mcp/openstack-server.js +1746 -1262
- package/src/scripts/configure-visual-apis.js +224 -173
- package/src/scripts/configure-wordpress-mcp.js +96 -66
- package/src/scripts/init/install.js +109 -85
- package/src/scripts/init-project.js +138 -67
- package/src/scripts/utils/write-content.js +67 -52
- package/src/scripts/wordpress/publish-to-wordpress.js +128 -128
- package/src/templates/claude/CLAUDE.md +131 -0
- package/hooks/hooks.json +0 -26
- package/skills/content-coordinator/SKILL.md +0 -130
- package/skills/content-enrichment/SKILL.md +0 -80
- package/skills/content-writer/SKILL.md +0 -285
- 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
|
|
8
|
+
import chalk from "chalk";
|
|
9
9
|
|
|
10
10
|
function printWelcome() {
|
|
11
|
-
console.log(
|
|
12
|
-
console.log(chalk.cyan.bold(
|
|
13
|
-
console.log(
|
|
14
|
-
console.log(
|
|
15
|
-
|
|
16
|
-
|
|
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(
|
|
19
|
-
console.log(chalk.white(
|
|
20
|
-
console.log(chalk.white(
|
|
21
|
-
console.log(chalk.white(
|
|
22
|
-
console.log(chalk.cyan(
|
|
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(
|
|
26
|
-
console.log(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
console.log(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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(
|
|
37
|
-
console.log(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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(
|
|
44
|
-
console.log(chalk.white(
|
|
45
|
-
console.log(chalk.white(
|
|
46
|
-
console.log(chalk.white(
|
|
47
|
-
console.log(
|
|
48
|
-
|
|
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(
|
|
51
|
-
console.log(chalk.white(
|
|
52
|
-
console.log(chalk.gray(
|
|
53
|
-
console.log(
|
|
54
|
-
console.log(chalk.white(
|
|
55
|
-
console.log(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
console.log(
|
|
59
|
-
console.log(chalk.
|
|
60
|
-
console.log(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
console.log(
|
|
64
|
-
|
|
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(
|
|
67
|
-
console.log(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
console.log(
|
|
72
|
-
|
|
73
|
-
|
|
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(
|
|
76
|
-
console.log(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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(
|
|
82
|
-
console.log(chalk.green(
|
|
83
|
-
console.log(chalk.gray(
|
|
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
|
|
10
|
-
import { SEOOptimizer } from
|
|
11
|
-
import { logger, formatTable } from
|
|
12
|
-
import fs from
|
|
13
|
-
import path from
|
|
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:
|
|
22
|
+
topic: "",
|
|
23
|
+
contentType: "blog-post",
|
|
24
24
|
wordCount: 1500,
|
|
25
|
-
tone:
|
|
25
|
+
tone: "professional",
|
|
26
26
|
keywords: [],
|
|
27
|
-
outputDir:
|
|
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 ===
|
|
37
|
+
if (arg === "--help" || arg === "-h") {
|
|
38
38
|
options.help = true;
|
|
39
|
-
} else if (arg ===
|
|
39
|
+
} else if (arg === "--type" || arg === "-t") {
|
|
40
40
|
options.contentType = args[++i];
|
|
41
|
-
} else if (arg ===
|
|
41
|
+
} else if (arg === "--word-count" || arg === "-w") {
|
|
42
42
|
options.wordCount = parseInt(args[++i], 10);
|
|
43
|
-
} else if (arg ===
|
|
43
|
+
} else if (arg === "--tone") {
|
|
44
44
|
options.tone = args[++i];
|
|
45
|
-
} else if (arg ===
|
|
46
|
-
options.keywords = args[++i].split(
|
|
47
|
-
} else if (arg ===
|
|
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 ===
|
|
49
|
+
} else if (arg === "--output-dir") {
|
|
50
50
|
options.outputDir = args[++i];
|
|
51
|
-
} else if (arg ===
|
|
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(
|
|
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(
|
|
124
|
+
logger.log(
|
|
125
|
+
`Keywords: ${spec.keywords.length > 0 ? spec.keywords.join(", ") : "None specified"}`,
|
|
126
|
+
);
|
|
125
127
|
logger.blank();
|
|
126
128
|
|
|
127
|
-
logger.section(
|
|
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(
|
|
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 =
|
|
140
|
+
const filename =
|
|
141
|
+
options.outputFile || generator.generateFilename(options.topic);
|
|
139
142
|
const outputPath = path.join(options.outputDir, filename);
|
|
140
143
|
|
|
141
|
-
logger.section(
|
|
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(
|
|
151
|
-
author:
|
|
152
|
+
description: "",
|
|
153
|
+
date: new Date().toISOString().split("T")[0],
|
|
154
|
+
author: "",
|
|
152
155
|
categories: [],
|
|
153
156
|
tags: options.keywords,
|
|
154
|
-
status:
|
|
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
|
|
170
|
-
|
|
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
|
-
|
|
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,
|
|
194
|
+
await fs.writeFile(outputPath, templateContent, "utf-8");
|
|
184
195
|
|
|
185
196
|
logger.success(`Template created: ${outputPath}`);
|
|
186
197
|
logger.blank();
|
|
187
|
-
logger.info(
|
|
188
|
-
logger.log(
|
|
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,
|
|
214
|
+
const content = await fs.readFile(filePath, "utf-8");
|
|
202
215
|
|
|
203
216
|
// Extract title from frontmatter or first heading
|
|
204
|
-
const titleMatch =
|
|
205
|
-
|
|
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(
|
|
221
|
+
logger.header("SEO Analysis");
|
|
208
222
|
logger.log(`File: ${filePath}`);
|
|
209
|
-
logger.log(`Title: ${title ||
|
|
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 =
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
297
|
+
logger.error("Please provide a file path to analyze.");
|
|
283
298
|
process.exit(1);
|
|
284
299
|
} else {
|
|
285
300
|
await generateContentSpec(options);
|