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.
Files changed (60) hide show
  1. package/.claude-plugin/plugin.json +251 -0
  2. package/PLUGIN_ARCHITECTURE.md +276 -0
  3. package/README.md +204 -0
  4. package/USER_GUIDE.md +436 -9
  5. package/bin/cli.js +370 -38
  6. package/dist/server/.tsbuildinfo +1 -1
  7. package/extension.json +174 -0
  8. package/hooks/hooks.json +221 -0
  9. package/marketplace.json +179 -0
  10. package/package.json +24 -7
  11. package/skills/content-verifier/SKILL.md +178 -0
  12. package/skills/content-writer/SKILL.md +151 -0
  13. package/skills/coolify-deployer/SKILL.md +207 -0
  14. package/skills/openstack-manager/SKILL.md +213 -0
  15. package/skills/security-auditor/SKILL.md +180 -0
  16. package/skills/security-tester/SKILL.md +171 -0
  17. package/skills/sparc-architect/SKILL.md +146 -0
  18. package/skills/sparc-coder/SKILL.md +136 -0
  19. package/skills/sparc-documenter/SKILL.md +195 -0
  20. package/skills/sparc-reviewer/SKILL.md +179 -0
  21. package/skills/sparc-tester/SKILL.md +156 -0
  22. package/skills/visual-generator/SKILL.md +147 -0
  23. package/skills/wordpress-publisher/SKILL.md +150 -0
  24. package/src/config/workflows.js +28 -44
  25. package/src/lib/ascii-banner.js +214 -0
  26. package/src/lib/config-manager.js +470 -0
  27. package/src/lib/content-coordinator.js +2562 -0
  28. package/src/lib/content-generator.js +427 -0
  29. package/src/lib/html-conversion-utils.js +843 -0
  30. package/src/lib/installation-detector.js +266 -0
  31. package/src/lib/seo-optimizer.js +515 -0
  32. package/src/lib/visual-config-utils.js +1 -1
  33. package/src/lib/visual-generation-utils.js +34 -14
  34. package/src/lib/wordpress-client.js +633 -0
  35. package/src/lib/workflow-installer.js +3 -3
  36. package/src/scripts/generate-visual-cli.js +39 -10
  37. package/src/scripts/html-conversion-cli.js +526 -0
  38. package/src/scripts/init/configure.js +436 -0
  39. package/src/scripts/init/install.js +460 -0
  40. package/src/scripts/ping.js +0 -1
  41. package/src/scripts/utils/file-utils.js +404 -0
  42. package/src/scripts/utils/logger.js +300 -0
  43. package/src/scripts/utils/write-content.js +293 -0
  44. package/src/templates/claude/agents/content-production-coordinator.md +689 -15
  45. package/src/templates/claude/agents/visual-content-generator.md +129 -4
  46. package/src/templates/claude/commands/myai-content-enrichment.md +227 -0
  47. package/src/templates/claude/commands/myai-content-writer.md +48 -37
  48. package/src/templates/claude/commands/myai-convert-html.md +186 -0
  49. package/src/templates/claude/commands/myai-coordinate-content.md +347 -11
  50. package/src/templates/diagrams/architecture.d2 +52 -0
  51. package/src/templates/diagrams/flowchart.d2 +42 -0
  52. package/src/templates/diagrams/sequence.d2 +47 -0
  53. package/src/templates/docs/content-creation-guide.md +164 -0
  54. package/src/templates/docs/deployment-guide.md +336 -0
  55. package/src/templates/docs/visual-generation-guide.md +248 -0
  56. package/src/templates/docs/wordpress-publishing-guide.md +208 -0
  57. package/src/templates/infographics/comparison-table.html +347 -0
  58. package/src/templates/infographics/data-chart.html +268 -0
  59. package/src/templates/infographics/process-flow.html +365 -0
  60. /package/src/scripts/{wordpress-health-check.js → wordpress/wordpress-health-check.js} +0 -0
@@ -0,0 +1,208 @@
1
+ # WordPress Publishing Guide
2
+
3
+ A guide to publishing content to WordPress using the MyAIDev Method.
4
+
5
+ ## Overview
6
+
7
+ The MyAIDev Method integrates directly with WordPress REST API, allowing you to publish content without leaving your development environment.
8
+
9
+ ## Prerequisites
10
+
11
+ - WordPress site with REST API enabled
12
+ - Application Password created for your user
13
+ - MyAIDev Method WordPress workflow installed
14
+
15
+ ## Configuration
16
+
17
+ ### Setting Up Credentials
18
+
19
+ Run the configuration wizard:
20
+
21
+ ```bash
22
+ /myai-configure wordpress
23
+ ```
24
+
25
+ Or manually set environment variables in `.env`:
26
+
27
+ ```env
28
+ WORDPRESS_URL=https://your-site.com
29
+ WORDPRESS_USERNAME=your-username
30
+ WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
31
+ WORDPRESS_DEFAULT_STATUS=draft
32
+ ```
33
+
34
+ ### Creating an Application Password
35
+
36
+ 1. Log into WordPress admin
37
+ 2. Go to Users → Profile
38
+ 3. Scroll to "Application Passwords"
39
+ 4. Enter a name (e.g., "MyAIDev Method")
40
+ 5. Click "Add New Application Password"
41
+ 6. Copy the generated password (spaces are OK)
42
+
43
+ ## Publishing Content
44
+
45
+ ### Basic Publishing
46
+
47
+ ```bash
48
+ /myai-wordpress-publish ./content/my-article.md
49
+ ```
50
+
51
+ ### With Options
52
+
53
+ ```bash
54
+ /myai-wordpress-publish ./content/my-article.md --status publish --categories "Technology,AI"
55
+ ```
56
+
57
+ ### Publishing Options
58
+
59
+ | Option | Description | Default |
60
+ |--------|-------------|---------|
61
+ | `--status` | Post status (draft, publish, pending) | draft |
62
+ | `--categories` | Comma-separated categories | None |
63
+ | `--tags` | Comma-separated tags | None |
64
+ | `--featured-image` | Path to featured image | None |
65
+
66
+ ## Content Format
67
+
68
+ ### Frontmatter
69
+
70
+ The publisher reads YAML frontmatter from your markdown files:
71
+
72
+ ```yaml
73
+ ---
74
+ title: Your Article Title
75
+ description: Meta description for SEO
76
+ date: 2024-01-15
77
+ author: Your Name
78
+ categories:
79
+ - Technology
80
+ - AI
81
+ tags:
82
+ - machine-learning
83
+ - automation
84
+ status: draft
85
+ ---
86
+ ```
87
+
88
+ ### Supported Markdown
89
+
90
+ - Headings (H1-H6)
91
+ - Bold and italic text
92
+ - Links and images
93
+ - Code blocks
94
+ - Bullet and numbered lists
95
+ - Blockquotes
96
+
97
+ ## Batch Publishing
98
+
99
+ ### Using Content Coordinator
100
+
101
+ ```bash
102
+ # Verify and publish all approved content
103
+ /myai-coordinate-content ./content-queue/
104
+ ```
105
+
106
+ ### Workflow
107
+
108
+ 1. Place markdown files in queue directory
109
+ 2. Run coordinator to verify quality
110
+ 3. Approved content publishes automatically
111
+ 4. Reports generated with URLs and status
112
+
113
+ ## Managing Posts
114
+
115
+ ### Search Posts
116
+
117
+ ```javascript
118
+ // Via WordPress client
119
+ const client = new WordPressClient();
120
+ const results = await client.searchPosts('keyword');
121
+ ```
122
+
123
+ ### Update Existing Post
124
+
125
+ ```bash
126
+ /myai-wordpress-publish ./content/updated-article.md --post-id 123
127
+ ```
128
+
129
+ ### Get Categories
130
+
131
+ ```bash
132
+ # List available categories
133
+ /myai-wordpress-publish --list-categories
134
+ ```
135
+
136
+ ## Troubleshooting
137
+
138
+ ### Authentication Failed
139
+
140
+ **Symptoms:** 401 or 403 errors
141
+
142
+ **Solutions:**
143
+ 1. Verify username is correct
144
+ 2. Regenerate Application Password
145
+ 3. Check user has publish permissions
146
+ 4. Ensure REST API is enabled
147
+
148
+ ### Connection Refused
149
+
150
+ **Symptoms:** ECONNREFUSED or timeout
151
+
152
+ **Solutions:**
153
+ 1. Verify site URL is correct
154
+ 2. Check if site is accessible
155
+ 3. Try with/without `www.`
156
+ 4. Check for firewall blocks
157
+
158
+ ### Content Not Publishing
159
+
160
+ **Symptoms:** Draft created but not published
161
+
162
+ **Solutions:**
163
+ 1. Check `--status` flag
164
+ 2. Verify user has publish capability
165
+ 3. Check for required fields (title, content)
166
+
167
+ ## Security Best Practices
168
+
169
+ 1. **Use Application Passwords** - Never use your main password
170
+ 2. **Limit Permissions** - Create a dedicated publishing user
171
+ 3. **Secure Storage** - Keep credentials in `.env` (add to `.gitignore`)
172
+ 4. **Regular Rotation** - Regenerate passwords periodically
173
+ 5. **HTTPS Only** - Always use HTTPS for your WordPress site
174
+
175
+ ## API Reference
176
+
177
+ ### WordPressClient
178
+
179
+ ```javascript
180
+ import { WordPressClient } from 'myaidev-method';
181
+
182
+ const client = new WordPressClient({
183
+ siteUrl: 'https://your-site.com',
184
+ username: 'your-username',
185
+ appPassword: 'your-app-password'
186
+ });
187
+
188
+ // Publish post
189
+ const result = await client.publishPost({
190
+ title: 'My Article',
191
+ content: 'Article content...',
192
+ status: 'draft'
193
+ });
194
+
195
+ // Search posts
196
+ const posts = await client.searchPosts('keyword');
197
+
198
+ // Update post
199
+ await client.updatePost(postId, { title: 'New Title' });
200
+
201
+ // Get categories
202
+ const categories = await client.getCategories();
203
+ ```
204
+
205
+ ## Related Documentation
206
+
207
+ - [Content Creation Guide](content-creation-guide.md)
208
+ - [Visual Generation Guide](visual-generation-guide.md)
@@ -0,0 +1,347 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{title}}</title>
7
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
8
+ <style>
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ body {
16
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
17
+ background: linear-gradient(135deg, {{backgroundColor || '#f8fafc'}} 0%, {{backgroundGradient || '#e2e8f0'}} 100%);
18
+ min-height: 100vh;
19
+ padding: 40px;
20
+ }
21
+
22
+ .container {
23
+ max-width: 900px;
24
+ margin: 0 auto;
25
+ background: white;
26
+ border-radius: 24px;
27
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
28
+ overflow: hidden;
29
+ }
30
+
31
+ .header {
32
+ background: linear-gradient(135deg, {{accentColor || '#3b82f6'}} 0%, {{accentGradient || '#1d4ed8'}} 100%);
33
+ color: white;
34
+ padding: 32px 40px;
35
+ text-align: center;
36
+ }
37
+
38
+ .header h1 {
39
+ font-size: 28px;
40
+ font-weight: 700;
41
+ margin-bottom: 8px;
42
+ }
43
+
44
+ .header .subtitle {
45
+ font-size: 16px;
46
+ opacity: 0.9;
47
+ }
48
+
49
+ .content {
50
+ padding: 40px;
51
+ }
52
+
53
+ .comparison-table {
54
+ width: 100%;
55
+ border-collapse: collapse;
56
+ }
57
+
58
+ .comparison-table thead th {
59
+ padding: 16px 20px;
60
+ text-align: left;
61
+ font-weight: 600;
62
+ font-size: 14px;
63
+ color: #374151;
64
+ border-bottom: 2px solid #e5e7eb;
65
+ }
66
+
67
+ .comparison-table thead th:first-child {
68
+ color: #9ca3af;
69
+ font-weight: 500;
70
+ }
71
+
72
+ .comparison-table thead th.highlight {
73
+ background: linear-gradient(135deg, {{highlightColor || '#3b82f6'}} 0%, {{highlightGradient || '#1d4ed8'}} 100%);
74
+ color: white;
75
+ border-radius: 12px 12px 0 0;
76
+ }
77
+
78
+ .comparison-table tbody tr {
79
+ border-bottom: 1px solid #f1f5f9;
80
+ }
81
+
82
+ .comparison-table tbody tr:last-child {
83
+ border-bottom: none;
84
+ }
85
+
86
+ .comparison-table tbody tr:hover {
87
+ background: #f8fafc;
88
+ }
89
+
90
+ .comparison-table td {
91
+ padding: 16px 20px;
92
+ font-size: 14px;
93
+ color: #4b5563;
94
+ }
95
+
96
+ .comparison-table td:first-child {
97
+ font-weight: 500;
98
+ color: #111827;
99
+ }
100
+
101
+ .comparison-table td.highlight {
102
+ background: #eff6ff;
103
+ }
104
+
105
+ /* Feature Icons */
106
+ .check {
107
+ display: inline-flex;
108
+ align-items: center;
109
+ justify-content: center;
110
+ width: 24px;
111
+ height: 24px;
112
+ background: #10b981;
113
+ color: white;
114
+ border-radius: 50%;
115
+ font-size: 14px;
116
+ }
117
+
118
+ .check::before {
119
+ content: '✓';
120
+ }
121
+
122
+ .cross {
123
+ display: inline-flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ width: 24px;
127
+ height: 24px;
128
+ background: #ef4444;
129
+ color: white;
130
+ border-radius: 50%;
131
+ font-size: 14px;
132
+ }
133
+
134
+ .cross::before {
135
+ content: '✕';
136
+ }
137
+
138
+ .partial {
139
+ display: inline-flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ width: 24px;
143
+ height: 24px;
144
+ background: #f59e0b;
145
+ color: white;
146
+ border-radius: 50%;
147
+ font-size: 14px;
148
+ }
149
+
150
+ .partial::before {
151
+ content: '~';
152
+ }
153
+
154
+ /* Winner Badge */
155
+ .winner-badge {
156
+ display: inline-flex;
157
+ align-items: center;
158
+ gap: 6px;
159
+ background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
160
+ color: white;
161
+ padding: 4px 12px;
162
+ border-radius: 20px;
163
+ font-size: 12px;
164
+ font-weight: 600;
165
+ margin-left: 8px;
166
+ }
167
+
168
+ .winner-badge::before {
169
+ content: '★';
170
+ }
171
+
172
+ /* Cards Layout Alternative */
173
+ .cards-layout {
174
+ display: grid;
175
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
176
+ gap: 24px;
177
+ }
178
+
179
+ .comparison-card {
180
+ background: white;
181
+ border: 2px solid #e5e7eb;
182
+ border-radius: 16px;
183
+ padding: 24px;
184
+ transition: all 0.2s;
185
+ }
186
+
187
+ .comparison-card.featured {
188
+ border-color: {{accentColor || '#3b82f6'}};
189
+ box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
190
+ }
191
+
192
+ .card-header {
193
+ text-align: center;
194
+ padding-bottom: 20px;
195
+ border-bottom: 1px solid #e5e7eb;
196
+ margin-bottom: 20px;
197
+ }
198
+
199
+ .card-title {
200
+ font-size: 18px;
201
+ font-weight: 700;
202
+ color: #111827;
203
+ margin-bottom: 4px;
204
+ }
205
+
206
+ .card-price {
207
+ font-size: 32px;
208
+ font-weight: 700;
209
+ color: {{accentColor || '#3b82f6'}};
210
+ }
211
+
212
+ .card-price-period {
213
+ font-size: 14px;
214
+ color: #6b7280;
215
+ font-weight: 400;
216
+ }
217
+
218
+ .card-features {
219
+ list-style: none;
220
+ }
221
+
222
+ .card-features li {
223
+ display: flex;
224
+ align-items: center;
225
+ gap: 12px;
226
+ padding: 10px 0;
227
+ font-size: 14px;
228
+ color: #4b5563;
229
+ }
230
+
231
+ .feature-icon {
232
+ width: 20px;
233
+ height: 20px;
234
+ display: flex;
235
+ align-items: center;
236
+ justify-content: center;
237
+ border-radius: 50%;
238
+ font-size: 12px;
239
+ flex-shrink: 0;
240
+ }
241
+
242
+ .feature-icon.yes {
243
+ background: #dcfce7;
244
+ color: #16a34a;
245
+ }
246
+
247
+ .feature-icon.yes::before {
248
+ content: '✓';
249
+ }
250
+
251
+ .feature-icon.no {
252
+ background: #fee2e2;
253
+ color: #dc2626;
254
+ }
255
+
256
+ .feature-icon.no::before {
257
+ content: '✕';
258
+ }
259
+
260
+ .footer {
261
+ padding: 24px 40px;
262
+ background: #f8fafc;
263
+ border-top: 1px solid #e5e7eb;
264
+ display: flex;
265
+ justify-content: space-between;
266
+ align-items: center;
267
+ }
268
+
269
+ .note {
270
+ font-size: 13px;
271
+ color: #6b7280;
272
+ }
273
+
274
+ .branding {
275
+ font-size: 12px;
276
+ color: #9ca3af;
277
+ font-weight: 500;
278
+ }
279
+ </style>
280
+ </head>
281
+ <body>
282
+ <div class="container">
283
+ <div class="header">
284
+ <h1>{{title}}</h1>
285
+ {{#subtitle}}<p class="subtitle">{{subtitle}}</p>{{/subtitle}}
286
+ </div>
287
+
288
+ <div class="content">
289
+ {{#layout === 'table'}}
290
+ <table class="comparison-table">
291
+ <thead>
292
+ <tr>
293
+ <th>Feature</th>
294
+ {{#columns}}
295
+ <th class="{{class}}">{{name}}{{#winner}}<span class="winner-badge">Best</span>{{/winner}}</th>
296
+ {{/columns}}
297
+ </tr>
298
+ </thead>
299
+ <tbody>
300
+ {{#rows}}
301
+ <tr>
302
+ <td>{{feature}}</td>
303
+ {{#values}}
304
+ <td class="{{class}}">
305
+ {{#isCheck}}<span class="check"></span>{{/isCheck}}
306
+ {{#isCross}}<span class="cross"></span>{{/isCross}}
307
+ {{#isPartial}}<span class="partial"></span>{{/isPartial}}
308
+ {{#text}}{{text}}{{/text}}
309
+ </td>
310
+ {{/values}}
311
+ </tr>
312
+ {{/rows}}
313
+ </tbody>
314
+ </table>
315
+ {{/layout === 'table'}}
316
+
317
+ {{#layout === 'cards'}}
318
+ <div class="cards-layout">
319
+ {{#cards}}
320
+ <div class="comparison-card {{#featured}}featured{{/featured}}">
321
+ <div class="card-header">
322
+ <div class="card-title">{{name}}</div>
323
+ {{#price}}<div class="card-price">{{price}}<span class="card-price-period">{{period}}</span></div>{{/price}}
324
+ </div>
325
+ <ul class="card-features">
326
+ {{#features}}
327
+ <li>
328
+ <span class="feature-icon {{#included}}yes{{/included}}{{^included}}no{{/included}}"></span>
329
+ {{text}}
330
+ </li>
331
+ {{/features}}
332
+ </ul>
333
+ </div>
334
+ {{/cards}}
335
+ </div>
336
+ {{/layout === 'cards'}}
337
+ </div>
338
+
339
+ {{#note}}
340
+ <div class="footer">
341
+ <span class="note">{{note}}</span>
342
+ {{#branding}}<span class="branding">{{branding}}</span>{{/branding}}
343
+ </div>
344
+ {{/note}}
345
+ </div>
346
+ </body>
347
+ </html>