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,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)
@@ -0,0 +1,248 @@
1
+ # Visual Generation Guide
2
+
3
+ A guide to generating visual content (images, diagrams, videos) with the MyAIDev Method.
4
+
5
+ ## Overview
6
+
7
+ The visual content generation workflow integrates with multiple AI image and video generation services to create professional visuals for your content.
8
+
9
+ ## Prerequisites
10
+
11
+ - Visual workflow installed (`npx myaidev-method visual --claude`)
12
+ - API keys for at least one visual generation service
13
+
14
+ ## Supported Services
15
+
16
+ ### Image Generation
17
+
18
+ | Service | Best For | API Required |
19
+ |---------|----------|--------------|
20
+ | Gemini | General images, diagrams | Google AI API |
21
+ | Imagen | High-quality photographs | Google Cloud |
22
+ | FLUX | Creative, artistic images | Replicate/fal.ai |
23
+
24
+ ### Video Generation
25
+
26
+ | Service | Best For | API Required |
27
+ |---------|----------|--------------|
28
+ | Veo | Professional video content | Google AI API |
29
+
30
+ ## Configuration
31
+
32
+ ### Setting Up API Keys
33
+
34
+ Add to your `.env` file:
35
+
36
+ ```env
37
+ # Google AI (Gemini, Imagen, Veo)
38
+ GOOGLE_AI_API_KEY=your-google-ai-key
39
+
40
+ # Replicate (FLUX)
41
+ REPLICATE_API_TOKEN=your-replicate-token
42
+
43
+ # fal.ai (FLUX alternative)
44
+ FAL_KEY=your-fal-key
45
+ ```
46
+
47
+ ## Generating Images
48
+
49
+ ### Basic Usage
50
+
51
+ ```bash
52
+ /myai-generate-visual "A modern office workspace with natural lighting" --type image
53
+ ```
54
+
55
+ ### With Options
56
+
57
+ ```bash
58
+ /myai-generate-visual "Product photography of a smartphone" \
59
+ --type image \
60
+ --service imagen \
61
+ --aspect-ratio 1:1 \
62
+ --style photorealistic
63
+ ```
64
+
65
+ ### Image Options
66
+
67
+ | Option | Description | Values |
68
+ |--------|-------------|--------|
69
+ | `--service` | Generation service | gemini, imagen, flux |
70
+ | `--aspect-ratio` | Output ratio | 1:1, 16:9, 4:3, 9:16 |
71
+ | `--style` | Visual style | photorealistic, artistic, diagram |
72
+ | `--output` | Output filename | Custom filename |
73
+
74
+ ## Generating Diagrams
75
+
76
+ ### Technical Diagrams
77
+
78
+ ```bash
79
+ /myai-generate-visual "System architecture diagram showing microservices" \
80
+ --type diagram \
81
+ --format mermaid
82
+ ```
83
+
84
+ ### Flowcharts
85
+
86
+ ```bash
87
+ /myai-generate-visual "User authentication flow" \
88
+ --type flowchart \
89
+ --format svg
90
+ ```
91
+
92
+ ### Diagram Types
93
+
94
+ - Architecture diagrams
95
+ - Flowcharts
96
+ - Sequence diagrams
97
+ - Entity relationship diagrams
98
+ - Mind maps
99
+ - Organizational charts
100
+
101
+ ## Generating Videos
102
+
103
+ ### Basic Video
104
+
105
+ ```bash
106
+ /myai-generate-visual "A timelapse of clouds moving across a mountain landscape" \
107
+ --type video \
108
+ --duration 10
109
+ ```
110
+
111
+ ### Video Options
112
+
113
+ | Option | Description | Values |
114
+ |--------|-------------|--------|
115
+ | `--duration` | Video length | 5-60 seconds |
116
+ | `--resolution` | Output quality | 720p, 1080p |
117
+ | `--fps` | Frame rate | 24, 30, 60 |
118
+
119
+ ## Prompt Engineering
120
+
121
+ ### Effective Image Prompts
122
+
123
+ **Good:**
124
+ ```
125
+ Professional headshot of a business executive,
126
+ soft studio lighting, neutral background,
127
+ sharp focus, high resolution
128
+ ```
129
+
130
+ **Less Effective:**
131
+ ```
132
+ Person photo
133
+ ```
134
+
135
+ ### Key Elements
136
+
137
+ 1. **Subject** - What is the main focus?
138
+ 2. **Style** - Photorealistic? Illustration? Diagram?
139
+ 3. **Composition** - Close-up? Wide shot? Angle?
140
+ 4. **Lighting** - Natural? Studio? Dramatic?
141
+ 5. **Quality** - Resolution, detail level
142
+ 6. **Mood** - Professional? Casual? Energetic?
143
+
144
+ ## Integration with Content
145
+
146
+ ### Automatic Image Generation
147
+
148
+ When writing content, request images inline:
149
+
150
+ ```markdown
151
+ ## Introduction
152
+
153
+ [Generate: Hero image showing AI-assisted content creation]
154
+
155
+ The future of content creation...
156
+ ```
157
+
158
+ ### Batch Generation
159
+
160
+ ```bash
161
+ # Generate all images for an article
162
+ /myai-generate-visual --from-content ./content/my-article.md
163
+ ```
164
+
165
+ ## Best Practices
166
+
167
+ ### For Blog Posts
168
+
169
+ - Hero images: 16:9 ratio, high quality
170
+ - In-article images: Relevant, not stock-looking
171
+ - Diagrams: Clear, labeled, consistent style
172
+
173
+ ### For Social Media
174
+
175
+ - Square images (1:1) for Instagram
176
+ - Wide images (16:9) for Twitter/X
177
+ - Vertical (9:16) for Stories/Reels
178
+
179
+ ### For Documentation
180
+
181
+ - Diagrams: SVG or PNG with transparent background
182
+ - Screenshots: Annotated, cropped appropriately
183
+ - Icons: Consistent style throughout
184
+
185
+ ## Troubleshooting
186
+
187
+ ### Generation Failed
188
+
189
+ **Symptoms:** API error or timeout
190
+
191
+ **Solutions:**
192
+ 1. Check API key validity
193
+ 2. Verify service is available
194
+ 3. Simplify prompt
195
+ 4. Try different service
196
+
197
+ ### Poor Quality Output
198
+
199
+ **Symptoms:** Blurry, wrong subject, artifacts
200
+
201
+ **Solutions:**
202
+ 1. Be more specific in prompt
203
+ 2. Add style keywords
204
+ 3. Try different aspect ratio
205
+ 4. Use higher quality service
206
+
207
+ ### Content Policy Violations
208
+
209
+ **Symptoms:** Request rejected
210
+
211
+ **Solutions:**
212
+ 1. Review content policies
213
+ 2. Rephrase prompt
214
+ 3. Avoid restricted content
215
+
216
+ ## API Reference
217
+
218
+ ### VisualGenerator
219
+
220
+ ```javascript
221
+ import { VisualGenerator } from 'myaidev-method';
222
+
223
+ const generator = new VisualGenerator();
224
+
225
+ // Generate image
226
+ const image = await generator.generateImage({
227
+ prompt: 'Description of image',
228
+ service: 'imagen',
229
+ aspectRatio: '16:9'
230
+ });
231
+
232
+ // Generate diagram
233
+ const diagram = await generator.generateDiagram({
234
+ prompt: 'System architecture',
235
+ format: 'mermaid'
236
+ });
237
+
238
+ // Generate video
239
+ const video = await generator.generateVideo({
240
+ prompt: 'Video description',
241
+ duration: 10
242
+ });
243
+ ```
244
+
245
+ ## Related Documentation
246
+
247
+ - [Content Creation Guide](content-creation-guide.md)
248
+ - [WordPress Publishing Guide](wordpress-publishing-guide.md)