myaidev-method 0.2.23 → 0.2.24

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 (29) hide show
  1. package/bin/cli.js +55 -2
  2. package/dist/server/.tsbuildinfo +1 -1
  3. package/package.json +6 -1
  4. package/src/config/workflows.js +28 -44
  5. package/src/lib/config-manager.js +470 -0
  6. package/src/lib/content-generator.js +427 -0
  7. package/src/lib/html-conversion-utils.js +843 -0
  8. package/src/lib/seo-optimizer.js +515 -0
  9. package/src/lib/wordpress-client.js +633 -0
  10. package/src/lib/workflow-installer.js +3 -3
  11. package/src/scripts/html-conversion-cli.js +526 -0
  12. package/src/scripts/init/configure.js +436 -0
  13. package/src/scripts/init/install.js +460 -0
  14. package/src/scripts/utils/file-utils.js +404 -0
  15. package/src/scripts/utils/logger.js +300 -0
  16. package/src/scripts/utils/write-content.js +293 -0
  17. package/src/templates/claude/agents/visual-content-generator.md +129 -4
  18. package/src/templates/claude/commands/myai-convert-html.md +186 -0
  19. package/src/templates/diagrams/architecture.d2 +52 -0
  20. package/src/templates/diagrams/flowchart.d2 +42 -0
  21. package/src/templates/diagrams/sequence.d2 +47 -0
  22. package/src/templates/docs/content-creation-guide.md +164 -0
  23. package/src/templates/docs/deployment-guide.md +336 -0
  24. package/src/templates/docs/visual-generation-guide.md +248 -0
  25. package/src/templates/docs/wordpress-publishing-guide.md +208 -0
  26. package/src/templates/infographics/comparison-table.html +347 -0
  27. package/src/templates/infographics/data-chart.html +268 -0
  28. package/src/templates/infographics/process-flow.html +365 -0
  29. /package/src/scripts/{wordpress-health-check.js → wordpress/wordpress-health-check.js} +0 -0
@@ -0,0 +1,42 @@
1
+ # Flowchart Template
2
+ # Variables: {{title}}, {{direction}}, {{nodes}}, {{edges}}
3
+ # Shapes: rectangle, diamond (decision), oval, parallelogram, cylinder
4
+
5
+ direction: {{direction || 'down'}}
6
+
7
+ # Title
8
+ {{#title}}
9
+ title: {{title}} {
10
+ near: top-center
11
+ shape: text
12
+ style: {
13
+ font-size: 24
14
+ bold: true
15
+ }
16
+ }
17
+ {{/title}}
18
+
19
+ # Node definitions
20
+ {{#nodes}}
21
+ {{id}}: {{label}} {
22
+ shape: {{shape || 'rectangle'}}
23
+ {{#style}}
24
+ style: {
25
+ {{#fill}}fill: "{{fill}}"{{/fill}}
26
+ {{#stroke}}stroke: "{{stroke}}"{{/stroke}}
27
+ {{#fontColor}}font-color: "{{fontColor}}"{{/fontColor}}
28
+ }
29
+ {{/style}}
30
+ }
31
+ {{/nodes}}
32
+
33
+ # Edges/Connections
34
+ {{#edges}}
35
+ {{from}} -> {{to}}{{#label}}: {{label}}{{/label}} {
36
+ {{#style}}
37
+ style: {
38
+ {{#stroke}}stroke: "{{stroke}}"{{/stroke}}
39
+ }
40
+ {{/style}}
41
+ }
42
+ {{/edges}}
@@ -0,0 +1,47 @@
1
+ # Sequence Diagram Template
2
+ # Variables: {{title}}, {{actors}}, {{messages}}
3
+
4
+ shape: sequence_diagram
5
+
6
+ # Title
7
+ {{#title}}
8
+ title: {{title}} {
9
+ near: top-center
10
+ shape: text
11
+ style: {
12
+ font-size: 24
13
+ bold: true
14
+ }
15
+ }
16
+ {{/title}}
17
+
18
+ # Actor definitions
19
+ {{#actors}}
20
+ {{id}}: {{label}} {
21
+ {{#shape}}shape: {{shape}}{{/shape}}
22
+ {{#style}}
23
+ style: {
24
+ {{#fill}}fill: "{{fill}}"{{/fill}}
25
+ }
26
+ {{/style}}
27
+ }
28
+ {{/actors}}
29
+
30
+ # Messages/Interactions
31
+ {{#messages}}
32
+ {{from}} -> {{to}}: {{label}} {
33
+ {{#style}}
34
+ style: {
35
+ {{#stroke}}stroke: "{{stroke}}"{{/stroke}}
36
+ {{#strokeDash}}stroke-dash: {{strokeDash}}{{/strokeDash}}
37
+ }
38
+ {{/style}}
39
+ }
40
+ {{#response}}
41
+ {{to}} -> {{from}}: {{response}} {
42
+ style: {
43
+ stroke-dash: 3
44
+ }
45
+ }
46
+ {{/response}}
47
+ {{/messages}}
@@ -0,0 +1,164 @@
1
+ # Content Creation Guide
2
+
3
+ A comprehensive guide to creating SEO-optimized content with the MyAIDev Method.
4
+
5
+ ## Overview
6
+
7
+ The MyAIDev Method content creation workflow helps you produce high-quality, SEO-optimized content efficiently. This guide covers the entire process from topic selection to publication.
8
+
9
+ ## Getting Started
10
+
11
+ ### Prerequisites
12
+
13
+ - MyAIDev Method installed (`npx myaidev-method init --claude`)
14
+ - Content workflow enabled (`npx myaidev-method content --claude`)
15
+ - (Optional) WordPress credentials configured for publishing
16
+
17
+ ### Quick Start
18
+
19
+ 1. **Generate content specification:**
20
+ ```bash
21
+ /myai-content-writer "Your Topic Here" --type blog-post
22
+ ```
23
+
24
+ 2. **Review and edit the generated content**
25
+
26
+ 3. **Verify content quality:**
27
+ ```bash
28
+ /myai-coordinate-content ./content/
29
+ ```
30
+
31
+ 4. **Publish to WordPress:**
32
+ ```bash
33
+ /myai-wordpress-publish ./content/your-article.md
34
+ ```
35
+
36
+ ## Content Types
37
+
38
+ ### Blog Post
39
+ - Standard article format
40
+ - 1500+ words recommended
41
+ - Sections: Introduction, Main Content, Conclusion, Call-to-Action
42
+
43
+ ### Tutorial
44
+ - Step-by-step instructional content
45
+ - 2000+ words recommended
46
+ - Sections: Overview, Prerequisites, Steps, Troubleshooting, Conclusion
47
+
48
+ ### How-To Guide
49
+ - Problem-solving focused
50
+ - 1200+ words recommended
51
+ - Sections: Introduction, Requirements, Step-by-Step, Tips, Summary
52
+
53
+ ### Listicle
54
+ - List-based article
55
+ - 1800+ words recommended
56
+ - Sections: Introduction, List Items, Summary
57
+
58
+ ### Product Review
59
+ - Evaluation content
60
+ - 1500+ words recommended
61
+ - Sections: Overview, Features, Pros/Cons, Verdict, Alternatives
62
+
63
+ ### Comparison
64
+ - Side-by-side analysis
65
+ - 2500+ words recommended
66
+ - Sections: Introduction, Criteria, Comparison Table, Detailed Analysis, Recommendation
67
+
68
+ ## Writing Tones
69
+
70
+ | Tone | Description | Best For |
71
+ |------|-------------|----------|
72
+ | Professional | Formal vocabulary, no contractions | B2B, corporate content |
73
+ | Conversational | Accessible, uses contractions | B2C, lifestyle content |
74
+ | Technical | Specialized vocabulary | Developer docs, specs |
75
+ | Casual | Informal, friendly | Social media, blogs |
76
+ | Authoritative | Expert, confident | Thought leadership |
77
+
78
+ ## SEO Best Practices
79
+
80
+ ### Title Optimization
81
+ - Keep titles between 30-60 characters
82
+ - Include primary keyword near the beginning
83
+ - Use power words (Ultimate, Complete, Essential, Proven)
84
+
85
+ ### Meta Description
86
+ - 120-160 characters
87
+ - Include primary keyword
88
+ - Compelling call-to-action
89
+
90
+ ### Content Structure
91
+ - Use H2 and H3 headings strategically
92
+ - Include keywords in at least one heading
93
+ - Break up text with bullet points and numbered lists
94
+
95
+ ### Keyword Usage
96
+ - Target 0.5-2.5% keyword density
97
+ - Include primary keyword in first paragraph
98
+ - Use keyword variations naturally throughout
99
+
100
+ ## Content Verification
101
+
102
+ The content verification process checks:
103
+
104
+ 1. **Knowledge Redundancy** - Is the content unique?
105
+ 2. **AI Detection** - Does it read naturally?
106
+ 3. **Quality Assessment** - Structure, depth, accuracy
107
+
108
+ ### Redundancy Scores
109
+
110
+ | Score | Meaning | Action |
111
+ |-------|---------|--------|
112
+ | High | Very similar to existing content | Rewrite substantially |
113
+ | Medium | Some overlap with existing content | Add unique insights |
114
+ | Low | Mostly original | Minor tweaks |
115
+ | Minimal | Highly original | Ready to publish |
116
+
117
+ ## Workflow Integration
118
+
119
+ ### Standard Workflow
120
+
121
+ ```
122
+ 1. Topic Research → Content Specification
123
+ 2. Content Generation → Draft
124
+ 3. Content Verification → Quality Check
125
+ 4. Revision (if needed) → Final Draft
126
+ 5. Publishing → Live Content
127
+ ```
128
+
129
+ ### Batch Processing
130
+
131
+ For multiple articles:
132
+
133
+ ```bash
134
+ # Verify all content in directory
135
+ /myai-coordinate-content ./content-queue/ --dry-run
136
+
137
+ # Publish approved content
138
+ /myai-coordinate-content ./content-queue/ --force
139
+ ```
140
+
141
+ ## Troubleshooting
142
+
143
+ ### Common Issues
144
+
145
+ **Content too short:**
146
+ - Expand sections with more detail
147
+ - Add examples and case studies
148
+ - Include FAQs section
149
+
150
+ **Low SEO score:**
151
+ - Check keyword placement
152
+ - Add more headings
153
+ - Include internal/external links
154
+
155
+ **High redundancy:**
156
+ - Add unique perspective or data
157
+ - Include personal experiences
158
+ - Reference recent developments
159
+
160
+ ## Related Documentation
161
+
162
+ - [WordPress Publishing Guide](wordpress-publishing-guide.md)
163
+ - [Visual Generation Guide](visual-generation-guide.md)
164
+ - [Deployment Guide](deployment-guide.md)
@@ -0,0 +1,336 @@
1
+ # Deployment Guide
2
+
3
+ A guide to deploying and managing MyAIDev Method workflows in various environments.
4
+
5
+ ## Overview
6
+
7
+ This guide covers installing, configuring, and maintaining MyAIDev Method in development and production environments.
8
+
9
+ ## Installation Methods
10
+
11
+ ### Quick Install (Recommended)
12
+
13
+ ```bash
14
+ # Install and initialize in one step
15
+ npx myaidev-method@latest init --claude
16
+
17
+ # Add specific workflow
18
+ npx myaidev-method@latest content --claude
19
+ ```
20
+
21
+ ### Global Install
22
+
23
+ ```bash
24
+ # Install globally
25
+ npm install -g myaidev-method
26
+
27
+ # Initialize project
28
+ myaidev-method init --claude
29
+ ```
30
+
31
+ ### Project Dependency
32
+
33
+ ```bash
34
+ # Add to project
35
+ npm install myaidev-method
36
+
37
+ # Run via npx
38
+ npx myaidev-method init --claude
39
+ ```
40
+
41
+ ## Workflow Installation
42
+
43
+ ### Available Workflows
44
+
45
+ | Workflow | Purpose | Dependencies |
46
+ |----------|---------|--------------|
47
+ | `core` | Base configuration | None |
48
+ | `content` | Content creation | core |
49
+ | `visual` | Image/video generation | core |
50
+ | `publish-wordpress` | WordPress publishing | core |
51
+ | `development` | Dev tools | core |
52
+ | `security-pentest` | Penetration testing | core |
53
+ | `security-audit` | Security auditing | core |
54
+
55
+ ### Installing Multiple Workflows
56
+
57
+ ```bash
58
+ # Install several workflows
59
+ npx myaidev-method content --claude
60
+ npx myaidev-method visual --claude
61
+ npx myaidev-method publish-wordpress --claude
62
+ ```
63
+
64
+ ### Interactive Installation
65
+
66
+ ```bash
67
+ # Choose workflows interactively
68
+ npx myaidev-method install --interactive
69
+ ```
70
+
71
+ ## Configuration
72
+
73
+ ### Environment Variables
74
+
75
+ Create a `.env` file in your project root:
76
+
77
+ ```env
78
+ # General Settings
79
+ CLI_TYPE=claude
80
+ LOG_LEVEL=INFO
81
+
82
+ # Content Settings
83
+ DEFAULT_WORD_COUNT=1500
84
+ DEFAULT_TONE=professional
85
+ CONTENT_OUTPUT_DIR=./content
86
+
87
+ # WordPress Settings
88
+ WORDPRESS_URL=https://your-site.com
89
+ WORDPRESS_USERNAME=your-username
90
+ WORDPRESS_APP_PASSWORD=your-app-password
91
+ WORDPRESS_DEFAULT_STATUS=draft
92
+
93
+ # OpenStack Settings (if using)
94
+ OS_AUTH_URL=https://your-openstack.com/v3
95
+ OS_USERNAME=your-username
96
+ OS_PASSWORD=your-password
97
+ OS_PROJECT_NAME=your-project
98
+
99
+ # Visual Generation (if using)
100
+ GOOGLE_AI_API_KEY=your-key
101
+ REPLICATE_API_TOKEN=your-token
102
+ ```
103
+
104
+ ### Configuration Wizard
105
+
106
+ ```bash
107
+ # Run interactive configuration
108
+ /myai-configure
109
+ ```
110
+
111
+ ### Per-Workflow Configuration
112
+
113
+ Configuration files are stored in `.claude/config/`:
114
+
115
+ ```
116
+ .claude/
117
+ ├── config/
118
+ │ ├── wordpress.json
119
+ │ ├── openstack.json
120
+ │ └── content.json
121
+ ├── agents/
122
+ └── commands/
123
+ ```
124
+
125
+ ## Directory Structure
126
+
127
+ After installation, your project will have:
128
+
129
+ ```
130
+ your-project/
131
+ ├── .claude/
132
+ │ ├── CLAUDE.md # Project instructions
133
+ │ ├── agents/ # AI agent definitions
134
+ │ │ ├── content-writer.md
135
+ │ │ ├── wordpress-admin.md
136
+ │ │ └── ...
137
+ │ ├── commands/ # Slash commands
138
+ │ │ ├── myai-content-writer.md
139
+ │ │ ├── myai-wordpress-publish.md
140
+ │ │ └── ...
141
+ │ └── config/ # Configuration files
142
+ ├── .env # Environment variables
143
+ └── content/ # Generated content
144
+ ```
145
+
146
+ ## CLI Type Support
147
+
148
+ ### Claude Code (Default)
149
+
150
+ ```bash
151
+ npx myaidev-method init --claude
152
+ ```
153
+
154
+ Files installed to `.claude/` directory.
155
+
156
+ ### Gemini CLI
157
+
158
+ ```bash
159
+ npx myaidev-method init --gemini
160
+ ```
161
+
162
+ Files installed to `.gemini/` directory.
163
+
164
+ ### Codex CLI
165
+
166
+ ```bash
167
+ npx myaidev-method init --codex
168
+ ```
169
+
170
+ Files installed to `.codex/` directory.
171
+
172
+ ## Updating
173
+
174
+ ### Update Package
175
+
176
+ ```bash
177
+ # Update to latest version
178
+ npm update myaidev-method
179
+
180
+ # Or reinstall
181
+ npx myaidev-method@latest init --claude
182
+ ```
183
+
184
+ ### Update Workflows
185
+
186
+ ```bash
187
+ # Reinstall with force to update agents/commands
188
+ npx myaidev-method content --claude --force
189
+ ```
190
+
191
+ ## Team Deployment
192
+
193
+ ### Shared Configuration
194
+
195
+ 1. Commit `.claude/` directory to git
196
+ 2. Add `.env` to `.gitignore`
197
+ 3. Create `.env.example` template
198
+
199
+ ### Team Setup
200
+
201
+ ```bash
202
+ # Clone project
203
+ git clone your-repo
204
+
205
+ # Install dependencies
206
+ npm install
207
+
208
+ # Copy environment template
209
+ cp .env.example .env
210
+
211
+ # Configure credentials
212
+ /myai-configure
213
+ ```
214
+
215
+ ## CI/CD Integration
216
+
217
+ ### GitHub Actions Example
218
+
219
+ ```yaml
220
+ name: Content Publishing
221
+
222
+ on:
223
+ push:
224
+ paths:
225
+ - 'content/**'
226
+
227
+ jobs:
228
+ publish:
229
+ runs-on: ubuntu-latest
230
+ steps:
231
+ - uses: actions/checkout@v4
232
+
233
+ - name: Setup Node.js
234
+ uses: actions/setup-node@v4
235
+ with:
236
+ node-version: '20'
237
+
238
+ - name: Install dependencies
239
+ run: npm install
240
+
241
+ - name: Publish content
242
+ env:
243
+ WORDPRESS_URL: ${{ secrets.WORDPRESS_URL }}
244
+ WORDPRESS_USERNAME: ${{ secrets.WORDPRESS_USERNAME }}
245
+ WORDPRESS_APP_PASSWORD: ${{ secrets.WORDPRESS_APP_PASSWORD }}
246
+ run: npx myaidev-method publish-batch ./content/
247
+ ```
248
+
249
+ ## Troubleshooting
250
+
251
+ ### Common Issues
252
+
253
+ **Command not found:**
254
+ ```bash
255
+ # Ensure Claude Code is active
256
+ # Commands run inside Claude Code, not terminal
257
+ ```
258
+
259
+ **Missing credentials:**
260
+ ```bash
261
+ # Check .env file exists
262
+ cat .env
263
+
264
+ # Reconfigure
265
+ /myai-configure
266
+ ```
267
+
268
+ **Workflow not working:**
269
+ ```bash
270
+ # Reinstall workflow
271
+ npx myaidev-method content --claude --force
272
+ ```
273
+
274
+ ### Debug Mode
275
+
276
+ ```bash
277
+ # Enable verbose logging
278
+ LOG_LEVEL=DEBUG /myai-content-writer "Topic"
279
+ ```
280
+
281
+ ### Health Check
282
+
283
+ ```bash
284
+ # WordPress connection
285
+ /myai-configure wordpress
286
+ # Then test connection option
287
+
288
+ # OpenStack connection
289
+ /myai-configure openstack
290
+ # Then verify credentials
291
+ ```
292
+
293
+ ## Security Considerations
294
+
295
+ ### Credential Management
296
+
297
+ 1. **Never commit credentials** - Use `.env` and `.gitignore`
298
+ 2. **Use application passwords** - Not main passwords
299
+ 3. **Rotate regularly** - Update credentials periodically
300
+ 4. **Limit permissions** - Use least-privilege accounts
301
+
302
+ ### Secure Deployment
303
+
304
+ ```bash
305
+ # Set restrictive permissions
306
+ chmod 600 .env
307
+
308
+ # Verify gitignore
309
+ grep ".env" .gitignore
310
+ ```
311
+
312
+ ## Uninstalling
313
+
314
+ ### Remove from Project
315
+
316
+ ```bash
317
+ # Remove .claude directory
318
+ rm -rf .claude/
319
+
320
+ # Remove from package.json
321
+ npm uninstall myaidev-method
322
+ ```
323
+
324
+ ### Selective Removal
325
+
326
+ ```bash
327
+ # Remove specific workflow components
328
+ rm .claude/agents/content-writer.md
329
+ rm .claude/commands/myai-content-writer.md
330
+ ```
331
+
332
+ ## Related Documentation
333
+
334
+ - [Content Creation Guide](content-creation-guide.md)
335
+ - [WordPress Publishing Guide](wordpress-publishing-guide.md)
336
+ - [Visual Generation Guide](visual-generation-guide.md)