myaidev-method 0.2.23 ā 0.2.24-2
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 +251 -0
- package/PLUGIN_ARCHITECTURE.md +276 -0
- package/README.md +204 -0
- package/USER_GUIDE.md +436 -9
- package/bin/cli.js +370 -38
- package/dist/server/.tsbuildinfo +1 -1
- package/extension.json +174 -0
- package/hooks/hooks.json +221 -0
- package/marketplace.json +179 -0
- package/package.json +24 -7
- package/skills/content-verifier/SKILL.md +178 -0
- package/skills/content-writer/SKILL.md +151 -0
- package/skills/coolify-deployer/SKILL.md +207 -0
- package/skills/openstack-manager/SKILL.md +213 -0
- package/skills/security-auditor/SKILL.md +180 -0
- package/skills/security-tester/SKILL.md +171 -0
- package/skills/sparc-architect/SKILL.md +146 -0
- package/skills/sparc-coder/SKILL.md +136 -0
- package/skills/sparc-documenter/SKILL.md +195 -0
- package/skills/sparc-reviewer/SKILL.md +179 -0
- package/skills/sparc-tester/SKILL.md +156 -0
- package/skills/visual-generator/SKILL.md +147 -0
- package/skills/wordpress-publisher/SKILL.md +150 -0
- package/src/config/workflows.js +28 -44
- package/src/lib/ascii-banner.js +214 -0
- package/src/lib/config-manager.js +470 -0
- package/src/lib/content-coordinator.js +2562 -0
- package/src/lib/content-generator.js +427 -0
- package/src/lib/html-conversion-utils.js +843 -0
- package/src/lib/installation-detector.js +266 -0
- package/src/lib/seo-optimizer.js +515 -0
- package/src/lib/visual-config-utils.js +1 -1
- package/src/lib/visual-generation-utils.js +34 -14
- package/src/lib/wordpress-client.js +633 -0
- package/src/lib/workflow-installer.js +3 -3
- package/src/scripts/generate-visual-cli.js +39 -10
- package/src/scripts/html-conversion-cli.js +526 -0
- package/src/scripts/init/configure.js +436 -0
- package/src/scripts/init/install.js +460 -0
- package/src/scripts/ping.js +0 -1
- package/src/scripts/utils/file-utils.js +404 -0
- package/src/scripts/utils/logger.js +300 -0
- package/src/scripts/utils/write-content.js +293 -0
- package/src/templates/claude/agents/content-production-coordinator.md +689 -15
- package/src/templates/claude/agents/visual-content-generator.md +129 -4
- package/src/templates/claude/commands/myai-content-enrichment.md +227 -0
- package/src/templates/claude/commands/myai-content-writer.md +48 -37
- package/src/templates/claude/commands/myai-convert-html.md +186 -0
- package/src/templates/claude/commands/myai-coordinate-content.md +347 -11
- package/src/templates/diagrams/architecture.d2 +52 -0
- package/src/templates/diagrams/flowchart.d2 +42 -0
- package/src/templates/diagrams/sequence.d2 +47 -0
- package/src/templates/docs/content-creation-guide.md +164 -0
- package/src/templates/docs/deployment-guide.md +336 -0
- package/src/templates/docs/visual-generation-guide.md +248 -0
- package/src/templates/docs/wordpress-publishing-guide.md +208 -0
- package/src/templates/infographics/comparison-table.html +347 -0
- package/src/templates/infographics/data-chart.html +268 -0
- package/src/templates/infographics/process-flow.html +365 -0
- /package/src/scripts/{wordpress-health-check.js ā wordpress/wordpress-health-check.js} +0 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installation Detection Utility
|
|
3
|
+
*
|
|
4
|
+
* Detects the current installation state of MyAIDev Method:
|
|
5
|
+
* - Legacy installation (npx-based file copying)
|
|
6
|
+
* - Plugin installation (Claude Code plugin system)
|
|
7
|
+
* - Both (dual installation)
|
|
8
|
+
* - None (not installed)
|
|
9
|
+
*
|
|
10
|
+
* This utility ensures backward compatibility during migration to plugin architecture.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import fs from 'fs-extra';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Installation types enum
|
|
18
|
+
*/
|
|
19
|
+
export const InstallationType = {
|
|
20
|
+
NONE: 'none',
|
|
21
|
+
LEGACY: 'legacy',
|
|
22
|
+
PLUGIN: 'plugin',
|
|
23
|
+
BOTH: 'both'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Detect the current installation state of MyAIDev Method
|
|
28
|
+
*
|
|
29
|
+
* @param {string} projectRoot - The project root directory
|
|
30
|
+
* @returns {Promise<Object>} Installation detection result
|
|
31
|
+
*/
|
|
32
|
+
export async function detectInstallation(projectRoot = process.cwd()) {
|
|
33
|
+
const checks = {
|
|
34
|
+
// Legacy installation indicators
|
|
35
|
+
hasClaudeDir: await fs.pathExists(path.join(projectRoot, '.claude')),
|
|
36
|
+
hasClaudeCommands: await fs.pathExists(path.join(projectRoot, '.claude', 'commands')),
|
|
37
|
+
hasClaudeAgents: await fs.pathExists(path.join(projectRoot, '.claude', 'agents')),
|
|
38
|
+
hasManifest: await fs.pathExists(path.join(projectRoot, '.myaidev-manifest.json')),
|
|
39
|
+
|
|
40
|
+
// Plugin installation indicators
|
|
41
|
+
hasPluginDir: await fs.pathExists(path.join(projectRoot, '.claude-plugin')),
|
|
42
|
+
hasPluginJson: await fs.pathExists(path.join(projectRoot, '.claude-plugin', 'plugin.json')),
|
|
43
|
+
|
|
44
|
+
// Skills-based installation
|
|
45
|
+
hasSkills: await fs.pathExists(path.join(projectRoot, 'skills')),
|
|
46
|
+
|
|
47
|
+
// Check for myaidev-specific files
|
|
48
|
+
hasMyAIDevCommands: false,
|
|
49
|
+
hasMyAIDevAgents: false
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Check for myaidev-specific commands
|
|
53
|
+
if (checks.hasClaudeCommands) {
|
|
54
|
+
const commandsDir = path.join(projectRoot, '.claude', 'commands');
|
|
55
|
+
try {
|
|
56
|
+
const files = await fs.readdir(commandsDir);
|
|
57
|
+
checks.hasMyAIDevCommands = files.some(f => f.startsWith('myai-'));
|
|
58
|
+
} catch (e) {
|
|
59
|
+
// Directory doesn't exist or not readable
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Check for myaidev-specific agents
|
|
64
|
+
if (checks.hasClaudeAgents) {
|
|
65
|
+
const agentsDir = path.join(projectRoot, '.claude', 'agents');
|
|
66
|
+
try {
|
|
67
|
+
const files = await fs.readdir(agentsDir);
|
|
68
|
+
checks.hasMyAIDevAgents = files.some(f =>
|
|
69
|
+
f.includes('content-writer') ||
|
|
70
|
+
f.includes('visual') ||
|
|
71
|
+
f.includes('wordpress')
|
|
72
|
+
);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
// Directory doesn't exist or not readable
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Determine installation type
|
|
79
|
+
const hasLegacy = checks.hasManifest || (checks.hasMyAIDevCommands || checks.hasMyAIDevAgents);
|
|
80
|
+
const hasPlugin = checks.hasPluginJson;
|
|
81
|
+
|
|
82
|
+
let installationType;
|
|
83
|
+
if (hasLegacy && hasPlugin) {
|
|
84
|
+
installationType = InstallationType.BOTH;
|
|
85
|
+
} else if (hasLegacy) {
|
|
86
|
+
installationType = InstallationType.LEGACY;
|
|
87
|
+
} else if (hasPlugin) {
|
|
88
|
+
installationType = InstallationType.PLUGIN;
|
|
89
|
+
} else {
|
|
90
|
+
installationType = InstallationType.NONE;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Get version info if available
|
|
94
|
+
let legacyVersion = null;
|
|
95
|
+
let pluginVersion = null;
|
|
96
|
+
|
|
97
|
+
if (checks.hasManifest) {
|
|
98
|
+
try {
|
|
99
|
+
const manifest = await fs.readJson(path.join(projectRoot, '.myaidev-manifest.json'));
|
|
100
|
+
legacyVersion = manifest.version || '1.0.0';
|
|
101
|
+
} catch (e) {
|
|
102
|
+
// Manifest unreadable
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (checks.hasPluginJson) {
|
|
107
|
+
try {
|
|
108
|
+
const pluginJson = await fs.readJson(path.join(projectRoot, '.claude-plugin', 'plugin.json'));
|
|
109
|
+
pluginVersion = pluginJson.version;
|
|
110
|
+
} catch (e) {
|
|
111
|
+
// Plugin json unreadable
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Get installed workflows from manifest
|
|
116
|
+
let installedWorkflows = [];
|
|
117
|
+
if (checks.hasManifest) {
|
|
118
|
+
try {
|
|
119
|
+
const manifest = await fs.readJson(path.join(projectRoot, '.myaidev-manifest.json'));
|
|
120
|
+
installedWorkflows = manifest.installedWorkflows || [];
|
|
121
|
+
} catch (e) {
|
|
122
|
+
// Manifest unreadable
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
installationType,
|
|
128
|
+
hasLegacy,
|
|
129
|
+
hasPlugin,
|
|
130
|
+
canUpgrade: hasLegacy && !hasPlugin,
|
|
131
|
+
canCoexist: true, // Both installation methods can coexist
|
|
132
|
+
checks,
|
|
133
|
+
versions: {
|
|
134
|
+
legacy: legacyVersion,
|
|
135
|
+
plugin: pluginVersion
|
|
136
|
+
},
|
|
137
|
+
installedWorkflows,
|
|
138
|
+
recommendations: getRecommendations(installationType, checks)
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Get recommendations based on installation state
|
|
144
|
+
*
|
|
145
|
+
* @param {string} installationType - Current installation type
|
|
146
|
+
* @param {Object} checks - Detection checks
|
|
147
|
+
* @returns {string[]} Array of recommendation strings
|
|
148
|
+
*/
|
|
149
|
+
function getRecommendations(installationType, checks) {
|
|
150
|
+
const recommendations = [];
|
|
151
|
+
|
|
152
|
+
switch (installationType) {
|
|
153
|
+
case InstallationType.NONE:
|
|
154
|
+
recommendations.push('Run "npx myaidev-method init --claude" to install via npx');
|
|
155
|
+
recommendations.push('Or use "/plugin install myaidev-method" for plugin installation');
|
|
156
|
+
break;
|
|
157
|
+
|
|
158
|
+
case InstallationType.LEGACY:
|
|
159
|
+
recommendations.push('Legacy installation detected - all existing commands will continue to work');
|
|
160
|
+
recommendations.push('Consider upgrading to plugin installation for automatic updates');
|
|
161
|
+
recommendations.push('Use "/plugin install myaidev-method" to add plugin capabilities');
|
|
162
|
+
break;
|
|
163
|
+
|
|
164
|
+
case InstallationType.PLUGIN:
|
|
165
|
+
recommendations.push('Plugin installation detected - skills are auto-discovered');
|
|
166
|
+
recommendations.push('Use "/myaidev-method:*" commands or legacy "/myai-*" aliases');
|
|
167
|
+
break;
|
|
168
|
+
|
|
169
|
+
case InstallationType.BOTH:
|
|
170
|
+
recommendations.push('Both legacy and plugin installations detected - all features available');
|
|
171
|
+
recommendations.push('You can use both "/myai-*" and "/myaidev-method:*" command formats');
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return recommendations;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Get a human-readable status message for the installation
|
|
180
|
+
*
|
|
181
|
+
* @param {string} projectRoot - The project root directory
|
|
182
|
+
* @returns {Promise<string>} Status message
|
|
183
|
+
*/
|
|
184
|
+
export async function getInstallationStatus(projectRoot = process.cwd()) {
|
|
185
|
+
const detection = await detectInstallation(projectRoot);
|
|
186
|
+
|
|
187
|
+
let status = '\nš¦ MyAIDev Method Installation Status\n';
|
|
188
|
+
status += 'āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n\n';
|
|
189
|
+
|
|
190
|
+
switch (detection.installationType) {
|
|
191
|
+
case InstallationType.NONE:
|
|
192
|
+
status += 'ā Not Installed\n\n';
|
|
193
|
+
break;
|
|
194
|
+
case InstallationType.LEGACY:
|
|
195
|
+
status += 'ā
Legacy Installation (npx)\n';
|
|
196
|
+
if (detection.versions.legacy) {
|
|
197
|
+
status += ` Version: ${detection.versions.legacy}\n`;
|
|
198
|
+
}
|
|
199
|
+
if (detection.installedWorkflows.length > 0) {
|
|
200
|
+
status += ` Workflows: ${detection.installedWorkflows.join(', ')}\n`;
|
|
201
|
+
}
|
|
202
|
+
status += '\n';
|
|
203
|
+
break;
|
|
204
|
+
case InstallationType.PLUGIN:
|
|
205
|
+
status += 'ā
Plugin Installation\n';
|
|
206
|
+
if (detection.versions.plugin) {
|
|
207
|
+
status += ` Version: ${detection.versions.plugin}\n`;
|
|
208
|
+
}
|
|
209
|
+
status += '\n';
|
|
210
|
+
break;
|
|
211
|
+
case InstallationType.BOTH:
|
|
212
|
+
status += 'ā
Dual Installation (Legacy + Plugin)\n';
|
|
213
|
+
if (detection.versions.legacy) {
|
|
214
|
+
status += ` Legacy Version: ${detection.versions.legacy}\n`;
|
|
215
|
+
}
|
|
216
|
+
if (detection.versions.plugin) {
|
|
217
|
+
status += ` Plugin Version: ${detection.versions.plugin}\n`;
|
|
218
|
+
}
|
|
219
|
+
if (detection.installedWorkflows.length > 0) {
|
|
220
|
+
status += ` Workflows: ${detection.installedWorkflows.join(', ')}\n`;
|
|
221
|
+
}
|
|
222
|
+
status += '\n';
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
status += 'š Recommendations:\n';
|
|
227
|
+
for (const rec of detection.recommendations) {
|
|
228
|
+
status += ` ⢠${rec}\n`;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return status;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Check if upgrade from legacy to plugin is available
|
|
236
|
+
*
|
|
237
|
+
* @param {string} projectRoot - The project root directory
|
|
238
|
+
* @returns {Promise<Object>} Upgrade availability info
|
|
239
|
+
*/
|
|
240
|
+
export async function checkUpgradeAvailability(projectRoot = process.cwd()) {
|
|
241
|
+
const detection = await detectInstallation(projectRoot);
|
|
242
|
+
|
|
243
|
+
return {
|
|
244
|
+
canUpgrade: detection.canUpgrade,
|
|
245
|
+
currentType: detection.installationType,
|
|
246
|
+
upgradeBenefits: [
|
|
247
|
+
'Automatic skill discovery',
|
|
248
|
+
'Namespaced commands (/myaidev-method:*)',
|
|
249
|
+
'Plugin marketplace updates',
|
|
250
|
+
'Cross-platform support preparation'
|
|
251
|
+
],
|
|
252
|
+
preservedFeatures: [
|
|
253
|
+
'All existing /myai-* commands',
|
|
254
|
+
'Installed workflows and agents',
|
|
255
|
+
'Configuration and environment variables',
|
|
256
|
+
'.myaidev-manifest.json tracking'
|
|
257
|
+
]
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export default {
|
|
262
|
+
detectInstallation,
|
|
263
|
+
getInstallationStatus,
|
|
264
|
+
checkUpgradeAvailability,
|
|
265
|
+
InstallationType
|
|
266
|
+
};
|