myaidev-method 0.2.19 → 0.2.23

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 (57) hide show
  1. package/CHANGELOG.md +123 -5
  2. package/README.md +205 -13
  3. package/TECHNICAL_ARCHITECTURE.md +64 -2
  4. package/USER_GUIDE.md +453 -48
  5. package/bin/cli.js +187 -2
  6. package/content-rules.example.md +80 -0
  7. package/dist/mcp/mcp-config.json +138 -1
  8. package/dist/mcp/mcp-launcher.js +237 -0
  9. package/dist/mcp/openstack-server.js +1607 -0
  10. package/dist/server/.tsbuildinfo +1 -1
  11. package/dist/server/auth/layers.d.ts +1 -1
  12. package/dist/server/auth/services/AuthService.d.ts +1 -1
  13. package/dist/server/auth/services/TokenService.js.map +1 -1
  14. package/dist/server/auth/services/example.d.ts +5 -5
  15. package/package.json +17 -17
  16. package/src/config/workflows.js +532 -0
  17. package/src/index.js +21 -8
  18. package/src/lib/payloadcms-utils.js +206 -0
  19. package/src/lib/update-manager.js +2 -1
  20. package/src/lib/visual-config-utils.js +321 -295
  21. package/src/lib/visual-generation-utils.js +1080 -740
  22. package/src/lib/workflow-installer.js +512 -0
  23. package/src/libs/security/authorization-checker.js +606 -0
  24. package/src/mcp/openstack-server.js +1607 -0
  25. package/src/scripts/configure-wordpress-mcp.js +8 -3
  26. package/src/scripts/generate-visual-cli.js +365 -235
  27. package/src/scripts/openstack-setup.sh +110 -0
  28. package/src/scripts/ping.js +250 -0
  29. package/src/scripts/security/environment-detect.js +425 -0
  30. package/src/scripts/wordpress/publish-to-wordpress.js +165 -0
  31. package/src/server/auth/services/TokenService.ts +1 -1
  32. package/src/templates/claude/agents/content-rules-setup.md +657 -0
  33. package/src/templates/claude/agents/content-writer.md +328 -1
  34. package/src/templates/claude/agents/openstack-vm-manager.md +281 -0
  35. package/src/templates/claude/agents/osint-researcher.md +1075 -0
  36. package/src/templates/claude/agents/penetration-tester.md +908 -0
  37. package/src/templates/claude/agents/security-auditor.md +244 -0
  38. package/src/templates/claude/agents/security-setup.md +1094 -0
  39. package/src/templates/claude/agents/visual-content-generator.md +182 -4
  40. package/src/templates/claude/agents/webapp-security-tester.md +581 -0
  41. package/src/templates/claude/commands/myai-configure.md +85 -1
  42. package/src/templates/claude/commands/myai-content-rules-setup.md +204 -0
  43. package/src/templates/claude/commands/myai-openstack.md +229 -0
  44. package/src/templates/claude/commands/sc:security-exploit.md +464 -0
  45. package/src/templates/claude/commands/sc:security-recon.md +281 -0
  46. package/src/templates/claude/commands/sc:security-report.md +756 -0
  47. package/src/templates/claude/commands/sc:security-scan.md +441 -0
  48. package/src/templates/claude/commands/sc:security-setup.md +501 -0
  49. package/src/templates/codex/commands/myai-content-rules-setup.md +85 -0
  50. package/src/templates/gemini/commands/myai-content-rules-setup.toml +57 -0
  51. package/.claude/mcp/sparc-orchestrator-server.js +0 -607
  52. package/.claude/mcp/wordpress-server.js +0 -1277
  53. package/src/agents/content-writer-prompt.md +0 -164
  54. package/src/agents/content-writer.json +0 -70
  55. package/src/templates/claude/mcp_config.json +0 -30
  56. package/src/templates/claude/slash_commands.json +0 -166
  57. package/src/templates/scripts/configure-wordpress-mcp.js +0 -181
@@ -0,0 +1,204 @@
1
+ ---
2
+ name: myai-content-rules-setup
3
+ description: Interactive setup wizard for configuring content generation rules, brand voice, and style guidelines
4
+ usage: /myai-content-rules-setup [options]
5
+ arguments:
6
+ - name: --quick
7
+ description: Run quick setup with only essential questions
8
+ required: false
9
+ - name: --update
10
+ description: Update existing content-rules.md file
11
+ required: false
12
+ - name: --import
13
+ description: Import from existing style guide document
14
+ required: false
15
+ - name: --preview
16
+ description: Preview current content rules
17
+ required: false
18
+ ---
19
+
20
+ # Content Rules Setup Command
21
+
22
+ ## Purpose
23
+
24
+ Launch an interactive Q&A wizard to create or update your `content-rules.md` file, which controls how the content-writer agent generates content for your brand.
25
+
26
+ ## Usage
27
+
28
+ ### Full Interactive Setup
29
+ ```bash
30
+ /myai-content-rules-setup
31
+ ```
32
+ Runs the complete setup wizard with all 29 questions covering:
33
+ - Brand identity & voice
34
+ - Target audience
35
+ - Writing style guidelines
36
+ - Content formatting
37
+ - SEO requirements
38
+ - Topics & boundaries
39
+ - Visual content preferences
40
+ - Prohibited words
41
+
42
+ ### Quick Setup Mode
43
+ ```bash
44
+ /myai-content-rules-setup --quick
45
+ ```
46
+ Asks only 5 essential questions:
47
+ 1. Brand name and description
48
+ 2. Target audience and expertise level
49
+ 3. Voice/tone preference
50
+ 4. Main content topics
51
+ 5. Words/topics to avoid
52
+
53
+ Uses smart defaults for all other settings.
54
+
55
+ ### Update Existing Rules
56
+ ```bash
57
+ /myai-content-rules-setup --update
58
+ ```
59
+ Reads your existing `content-rules.md` and lets you:
60
+ - Modify specific sections
61
+ - Add new rules
62
+ - Remove outdated rules
63
+ - Keep unchanged sections intact
64
+
65
+ ### Import from Style Guide
66
+ ```bash
67
+ /myai-content-rules-setup --import path/to/style-guide.pdf
68
+ ```
69
+ Analyzes an existing brand style guide and:
70
+ - Extracts brand voice and tone
71
+ - Identifies formatting preferences
72
+ - Pre-fills setup questions
73
+ - Asks for confirmation/adjustments
74
+
75
+ ### Preview Current Rules
76
+ ```bash
77
+ /myai-content-rules-setup --preview
78
+ ```
79
+ Displays a summary of your current content-rules.md settings.
80
+
81
+ ## Output
82
+
83
+ Creates or updates `content-rules.md` in your project root:
84
+
85
+ ```
86
+ ./content-rules.md
87
+ ```
88
+
89
+ ## Example Session
90
+
91
+ ```
92
+ User: /myai-content-rules-setup --quick
93
+
94
+ Agent: 👋 Quick Content Rules Setup
95
+
96
+ I'll ask 5 essential questions to create your content-rules.md.
97
+
98
+ Q1: What is your brand name and what do you do?
99
+ Example: "Acme Auth - We build authentication APIs for developers"
100
+
101
+ User: DevTools Pro - We create productivity tools for software engineers
102
+
103
+ Agent: Q2: Who is your audience and their expertise level?
104
+ a) Beginner developers
105
+ b) Intermediate developers
106
+ c) Senior/advanced developers
107
+ d) Mixed technical levels
108
+
109
+ User: c
110
+
111
+ Agent: Q3: How should your content sound?
112
+ a) Professional & formal
113
+ b) Professional & friendly
114
+ c) Conversational & casual
115
+ d) Technical & direct
116
+
117
+ User: d
118
+
119
+ Agent: Q4: List your 3 main content topics:
120
+
121
+ User: CLI tools, developer workflows, code automation
122
+
123
+ Agent: Q5: Any words or topics to avoid? (or type "none")
124
+
125
+ User: marketing jargon, "game-changing", "revolutionary"
126
+
127
+ Agent: ✅ Creating content-rules.md...
128
+
129
+ 📋 Summary:
130
+ - Brand: DevTools Pro
131
+ - Audience: Senior developers
132
+ - Voice: Technical & direct
133
+ - Topics: CLI tools, workflows, automation
134
+ - Banned: marketing jargon, game-changing, revolutionary
135
+
136
+ ✅ Generated content-rules.md
137
+
138
+ Your content-writer agent will now use these rules.
139
+ Run /myai-content-rules-setup to access all settings.
140
+ ```
141
+
142
+ ## Integration
143
+
144
+ ### With content-writer Agent
145
+ The content-writer automatically applies rules from content-rules.md:
146
+
147
+ ```bash
148
+ /myai-content-writer "How to build a CLI tool" --word_count 1500
149
+ # Applies your brand voice, style, and formatting rules
150
+ ```
151
+
152
+ ### With visual-content-generator Agent
153
+ Visual preferences are passed to image generation:
154
+
155
+ ```bash
156
+ /myai-generate-visual "Developer workflow diagram"
157
+ # Uses your visual style preferences from content-rules.md
158
+ ```
159
+
160
+ ## Sections Configured
161
+
162
+ | Section | What It Controls |
163
+ |---------|------------------|
164
+ | Brand Voice | Tone, personality, writing style |
165
+ | Audience | Technical level, goals, pain points |
166
+ | Formatting | Headings, lists, paragraphs, code blocks |
167
+ | SEO | Keywords, meta descriptions, CTAs |
168
+ | Topics | Focus areas, competitor handling |
169
+ | Visuals | Image style, infographic preferences |
170
+ | Prohibited | Banned words and phrases |
171
+
172
+ ## Tips
173
+
174
+ 1. **Start with --quick**: Get started fast, refine later
175
+ 2. **Provide examples**: Real content samples help capture your voice
176
+ 3. **Update regularly**: Run --update as your brand evolves
177
+ 4. **Team consistency**: Commit content-rules.md to version control
178
+ 5. **Test output**: Generate a sample article to verify rules work
179
+
180
+ ## Related Commands
181
+
182
+ - `/myai-content-writer` - Generate content using your rules
183
+ - `/myai-generate-visual` - Generate visuals matching your style
184
+ - `/myai-coordinate-content` - Batch content production
185
+
186
+ ## Troubleshooting
187
+
188
+ ### Rules not being applied?
189
+ 1. Verify content-rules.md exists in project root
190
+ 2. Check file is valid markdown
191
+ 3. Run `/myai-content-rules-setup --preview` to verify
192
+
193
+ ### Want to start over?
194
+ ```bash
195
+ rm content-rules.md
196
+ /myai-content-rules-setup
197
+ ```
198
+
199
+ ### Need more customization?
200
+ Run full setup instead of --quick:
201
+ ```bash
202
+ /myai-content-rules-setup
203
+ # Accesses all 29 configuration options
204
+ ```
@@ -0,0 +1,229 @@
1
+ ---
2
+ name: myai-openstack
3
+ description: Manage OpenStack VMs - create, list, delete, start, stop virtual machines
4
+ ---
5
+
6
+ Manage OpenStack virtual machines and infrastructure based on the command: $ARGUMENTS
7
+
8
+ ## Command Syntax
9
+
10
+ ```
11
+ /myai-openstack <action> [options]
12
+ ```
13
+
14
+ ## Available Actions
15
+
16
+ ### VM Operations
17
+ - **create** - Create a new VM
18
+ - **list** - List all VMs
19
+ - **show <name>** - Show VM details
20
+ - **delete <name>** - Delete a VM
21
+ - **start <name>** - Start a stopped VM
22
+ - **stop <name>** - Stop a running VM
23
+ - **reboot <name>** - Reboot a VM
24
+ - **console <name>** - Get console URL
25
+
26
+ ### Resource Discovery
27
+ - **images** - List available images
28
+ - **flavors** - List available flavors (sizes)
29
+ - **networks** - List available networks
30
+ - **keypairs** - List SSH keypairs
31
+ - **security-groups** - List security groups
32
+
33
+ ### Network Operations
34
+ - **floating-ips** - List floating IPs
35
+ - **floating-ip create <network>** - Create floating IP
36
+ - **floating-ip add <server> <ip>** - Add floating IP to server
37
+
38
+ ### Storage Operations
39
+ - **volumes** - List volumes
40
+ - **volume create <name> <size>** - Create volume
41
+ - **volume attach <server> <volume>** - Attach volume to server
42
+
43
+ ### Cloud-Init Operations
44
+ - **cloud-init info** - Show configured cloud-init defaults
45
+ - **cloud-init fetch** - Fetch and preview cloud-init from URL/file/default
46
+ - **cloud-init preview** - Preview the default cloud-init configuration
47
+
48
+ ### System Operations
49
+ - **health** - Check OpenStack connectivity
50
+ - **history** - Show operation history
51
+
52
+ ## Examples
53
+
54
+ ### Create a VM (basic)
55
+ ```
56
+ /myai-openstack create myvm --image "Ubuntu 24.04" --flavor m1.small --keypair mykey
57
+ ```
58
+
59
+ ### Create a VM with default cloud-init
60
+ ```
61
+ /myai-openstack create myvm --image "Ubuntu 24.04" --flavor m1.small --keypair mykey --use-default-cloud-init
62
+ ```
63
+
64
+ ### Create a VM with custom cloud-init URL
65
+ ```
66
+ /myai-openstack create myvm --image "Ubuntu 24.04" --flavor m1.small --cloud-init-url "https://gist.github.com/user/abc123"
67
+ ```
68
+
69
+ ### Create a VM with cloud-init file
70
+ ```
71
+ /myai-openstack create myvm --image "Ubuntu 24.04" --flavor m1.small --cloud-init-file "./my-cloud-init.yaml"
72
+ ```
73
+
74
+ ### List all VMs
75
+ ```
76
+ /myai-openstack list
77
+ ```
78
+
79
+ ### Show VM details
80
+ ```
81
+ /myai-openstack show myvm
82
+ ```
83
+
84
+ ### Start/Stop/Reboot
85
+ ```
86
+ /myai-openstack start myvm
87
+ /myai-openstack stop myvm
88
+ /myai-openstack reboot myvm
89
+ ```
90
+
91
+ ### Delete a VM
92
+ ```
93
+ /myai-openstack delete myvm
94
+ ```
95
+
96
+ ### Check available resources
97
+ ```
98
+ /myai-openstack images
99
+ /myai-openstack flavors
100
+ /myai-openstack networks
101
+ ```
102
+
103
+ ### Assign floating IP
104
+ ```
105
+ /myai-openstack floating-ip create external-network
106
+ /myai-openstack floating-ip add myvm 203.0.113.10
107
+ ```
108
+
109
+ ## Process
110
+
111
+ 1. Parse $ARGUMENTS to determine the action and parameters
112
+ 2. Validate OpenStack credentials are configured
113
+ 3. Run health check if needed
114
+ 4. Execute the requested operation using the openstack-vm-manager agent
115
+ 5. Report results with clear formatting
116
+
117
+ ## Prerequisites
118
+
119
+ Before using OpenStack commands, configure credentials:
120
+ ```
121
+ /myai-configure openstack
122
+ ```
123
+
124
+ This sets up:
125
+ - OS_AUTH_URL
126
+ - OS_USERNAME
127
+ - OS_PASSWORD
128
+ - OS_PROJECT_ID
129
+ - OS_REGION_NAME
130
+
131
+ ## Create VM Workflow
132
+
133
+ When user runs `create`:
134
+
135
+ 1. **Validate Parameters**
136
+ - Check required: name, image, flavor
137
+ - Validate optional: network, keypair, security_groups
138
+
139
+ 2. **Discovery** (if not specified)
140
+ - List images if image not specified
141
+ - List flavors if flavor not specified
142
+ - List networks if network not specified
143
+ - List keypairs if keypair not specified
144
+
145
+ 3. **Create Server**
146
+ - Use os_server_create with validated parameters
147
+ - Wait for server to become ACTIVE
148
+ - Report creation progress
149
+
150
+ 4. **Post-Creation**
151
+ - Get server details
152
+ - Report IP addresses
153
+ - Provide SSH connection instructions
154
+
155
+ ## Cloud-Init Configuration
156
+
157
+ Cloud-init allows automatic provisioning of VMs with packages, users, and scripts.
158
+
159
+ ### Sources (in priority order)
160
+ 1. **Inline content** (`--user-data`): Direct YAML content
161
+ 2. **URL** (`--cloud-init-url`): Fetch from any URL (GitHub Gist supported)
162
+ 3. **File** (`--cloud-init-file`): Local file path
163
+ 4. **Default** (`--use-default-cloud-init`): Uses `CLOUD_INIT` from `.env`
164
+
165
+ ### Environment Variable
166
+ Set in `.env`:
167
+ ```
168
+ CLOUD_INIT=https://gist.github.com/username/gist-id
169
+ ```
170
+
171
+ ### Preview Cloud-Init
172
+ ```
173
+ /myai-openstack cloud-init info # Show configured defaults
174
+ /myai-openstack cloud-init preview # Preview default cloud-init content
175
+ ```
176
+
177
+ ### Example Cloud-Init
178
+ ```yaml
179
+ #cloud-config
180
+ package_update: true
181
+ packages:
182
+ - docker.io
183
+ - nodejs
184
+ users:
185
+ - name: developer
186
+ groups: [sudo, docker]
187
+ ssh_authorized_keys:
188
+ - ssh-rsa AAAA... your-key
189
+ runcmd:
190
+ - systemctl enable docker
191
+ ```
192
+
193
+ ## Quick Start Guide
194
+
195
+ 1. Configure OpenStack: `/myai-configure openstack`
196
+ 2. Check connectivity: `/myai-openstack health`
197
+ 3. Find resources: `/myai-openstack images` and `/myai-openstack flavors`
198
+ 4. Preview cloud-init: `/myai-openstack cloud-init info`
199
+ 5. Create VM: `/myai-openstack create test-vm --image <image> --flavor <flavor> --use-default-cloud-init`
200
+ 6. Connect: SSH to the IP address provided
201
+
202
+ ## Error Handling
203
+
204
+ ### Not Configured
205
+ ```
206
+ OpenStack credentials not configured.
207
+ Run: /myai-configure openstack
208
+ ```
209
+
210
+ ### Authentication Failed
211
+ ```
212
+ Authentication failed. Check your credentials.
213
+ Verify password and project ID are correct.
214
+ ```
215
+
216
+ ### Resource Not Found
217
+ ```
218
+ Image/Flavor/Network not found.
219
+ Run: /myai-openstack images (or flavors/networks) to see available options.
220
+ ```
221
+
222
+ ## Integration
223
+
224
+ This command uses the `openstack-vm-manager` agent which leverages:
225
+ - OpenStack MCP server for API operations
226
+ - Cloud-init for VM initialization
227
+ - Session tracking for operation history
228
+
229
+ Spawn the openstack-vm-manager agent to handle the requested operation.