myaidev-method 0.2.5 → 0.2.6
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/USER_GUIDE.md +389 -8
- package/bin/cli.js +161 -70
- package/package.json +1 -1
- package/src/lib/ascii-banner.js +100 -0
- package/src/templates/claude/commands/myai-deploy-dev.md +500 -0
- package/src/templates/claude/commands/myai-deploy-prod.md +837 -0
- package/src/templates/claude/commands/myai-deploy-staging.md +331 -0
- package/src/templates/claude/commands/myai-git-hotfix.md +957 -0
- package/src/templates/claude/commands/myai-git-pr.md +200 -0
- package/src/templates/claude/commands/myai-git-release.md +806 -0
- package/src/templates/claude/commands/myai-git-sync.md +796 -0
- package/src/templates/codex/commands/myai-astro-publish.md +51 -0
- package/src/templates/codex/commands/myai-configure.md +185 -0
- package/src/templates/codex/commands/myai-content-writer.md +73 -0
- package/src/templates/codex/commands/myai-coolify-deploy.md +159 -0
- package/src/templates/codex/commands/myai-deploy-dev.md +379 -0
- package/src/templates/codex/commands/myai-deploy-prod.md +431 -0
- package/src/templates/codex/commands/myai-deploy-staging.md +275 -0
- package/src/templates/codex/commands/myai-dev-architect.md +69 -0
- package/src/templates/codex/commands/myai-dev-code.md +82 -0
- package/src/templates/codex/commands/myai-dev-docs.md +83 -0
- package/src/templates/codex/commands/myai-dev-review.md +85 -0
- package/src/templates/codex/commands/myai-dev-test.md +84 -0
- package/src/templates/codex/commands/myai-docusaurus-publish.md +42 -0
- package/src/templates/codex/commands/myai-git-hotfix.md +512 -0
- package/src/templates/codex/commands/myai-git-pr.md +196 -0
- package/src/templates/codex/commands/myai-git-release.md +516 -0
- package/src/templates/codex/commands/myai-git-sync.md +517 -0
- package/src/templates/codex/commands/myai-mintlify-publish.md +42 -0
- package/src/templates/codex/commands/myai-payloadcms-publish.md +42 -0
- package/src/templates/codex/commands/myai-sparc-workflow.md +185 -0
- package/src/templates/codex/commands/myai-wordpress-admin.md +143 -0
- package/src/templates/codex/commands/myai-wordpress-publish.md +66 -0
- package/src/templates/gemini/commands/myai-astro-publish.toml +76 -0
- package/src/templates/gemini/commands/myai-configure.toml +188 -0
- package/src/templates/gemini/commands/myai-content-writer.toml +76 -0
- package/src/templates/gemini/commands/myai-coolify-deploy.toml +138 -0
- package/src/templates/gemini/commands/myai-deploy-dev.toml +379 -0
- package/src/templates/gemini/commands/myai-deploy-prod.toml +438 -0
- package/src/templates/gemini/commands/myai-deploy-staging.toml +275 -0
- package/src/templates/gemini/commands/myai-dev-architect.toml +64 -0
- package/src/templates/gemini/commands/myai-dev-code.toml +75 -0
- package/src/templates/gemini/commands/myai-dev-docs.toml +76 -0
- package/src/templates/gemini/commands/myai-dev-review.toml +78 -0
- package/src/templates/gemini/commands/myai-dev-test.toml +77 -0
- package/src/templates/gemini/commands/myai-docusaurus-publish.toml +63 -0
- package/src/templates/gemini/commands/myai-git-hotfix.toml +953 -0
- package/src/templates/gemini/commands/myai-git-pr.toml +196 -0
- package/src/templates/gemini/commands/myai-git-release.toml +802 -0
- package/src/templates/gemini/commands/myai-git-sync.toml +792 -0
- package/src/templates/gemini/commands/myai-mintlify-publish.toml +67 -0
- package/src/templates/gemini/commands/myai-payloadcms-publish.toml +59 -0
- package/src/templates/gemini/commands/myai-sparc-workflow.toml +47 -0
- package/src/templates/gemini/commands/myai-wordpress-admin.toml +143 -0
- package/src/templates/gemini/commands/myai-wordpress-publish.toml +77 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# SPARC Development Workflow
|
|
2
|
+
|
|
3
|
+
Execute the complete 5-phase SPARC development workflow using MyAIDev Method's systematic approach: $ARGUMENTS
|
|
4
|
+
|
|
5
|
+
Orchestrates all development agents in sequence: Architecture → Implementation → Testing → Review → Documentation
|
|
6
|
+
|
|
7
|
+
## SPARC Workflow Phases
|
|
8
|
+
|
|
9
|
+
The workflow executes these phases in sequence:
|
|
10
|
+
|
|
11
|
+
### 1. **Specification & Architecture** (`/myai-dev-architect`)
|
|
12
|
+
- Requirements analysis
|
|
13
|
+
- System design with Mermaid diagrams
|
|
14
|
+
- API specifications
|
|
15
|
+
- Data modeling
|
|
16
|
+
- Technology recommendations
|
|
17
|
+
- Security planning
|
|
18
|
+
|
|
19
|
+
**Output**: `.myaidev-method/sparc/architecture.md`
|
|
20
|
+
|
|
21
|
+
### 2. **Pseudocode & Implementation** (`/myai-dev-code`)
|
|
22
|
+
- Feature implementation based on architecture
|
|
23
|
+
- SOLID principles application
|
|
24
|
+
- Security best practices
|
|
25
|
+
- Error handling
|
|
26
|
+
- Inline documentation
|
|
27
|
+
|
|
28
|
+
**Output**: `.myaidev-method/sparc/code-output/`
|
|
29
|
+
|
|
30
|
+
### 3. **Architecture Validation & Testing** (`/myai-dev-test`)
|
|
31
|
+
- Unit test creation
|
|
32
|
+
- Integration test development
|
|
33
|
+
- Coverage analysis (80%+ target)
|
|
34
|
+
- Quality gate validation
|
|
35
|
+
- Test execution
|
|
36
|
+
|
|
37
|
+
**Output**: `.myaidev-method/sparc/test-results/`
|
|
38
|
+
|
|
39
|
+
### 4. **Refinement & Review** (`/myai-dev-review`)
|
|
40
|
+
- Code quality analysis
|
|
41
|
+
- Security audit (OWASP Top 10)
|
|
42
|
+
- Performance review
|
|
43
|
+
- Best practices validation
|
|
44
|
+
- Technical debt assessment
|
|
45
|
+
|
|
46
|
+
**Output**: `.myaidev-method/sparc/review-report.md`
|
|
47
|
+
|
|
48
|
+
### 5. **Completion & Documentation** (`/myai-dev-docs`)
|
|
49
|
+
- API documentation
|
|
50
|
+
- User guides
|
|
51
|
+
- Architecture documentation
|
|
52
|
+
- Code examples
|
|
53
|
+
- Deployment guides
|
|
54
|
+
|
|
55
|
+
**Output**: `.myaidev-method/sparc/documentation/`
|
|
56
|
+
|
|
57
|
+
## What It Does
|
|
58
|
+
|
|
59
|
+
The SPARC workflow orchestrator will:
|
|
60
|
+
1. Initialize `.myaidev-method/sparc/` directory structure
|
|
61
|
+
2. Create task tracking files in `.myaidev-method/tasks/`
|
|
62
|
+
3. Execute each phase sequentially with proper handoffs
|
|
63
|
+
4. Validate phase outputs before proceeding
|
|
64
|
+
5. Generate comprehensive workflow summary
|
|
65
|
+
6. Track progress and results
|
|
66
|
+
7. Handle errors with graceful phase rollback
|
|
67
|
+
8. Produce production-ready deliverables
|
|
68
|
+
|
|
69
|
+
## Directory Structure Created
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
.myaidev-method/
|
|
73
|
+
├── sparc/
|
|
74
|
+
│ ├── architecture.md # Phase 1 output
|
|
75
|
+
│ ├── code-output/ # Phase 2 output
|
|
76
|
+
│ │ ├── src/
|
|
77
|
+
│ │ └── ...
|
|
78
|
+
│ ├── test-results/ # Phase 3 output
|
|
79
|
+
│ │ ├── unit/
|
|
80
|
+
│ │ ├── integration/
|
|
81
|
+
│ │ └── coverage-report.md
|
|
82
|
+
│ ├── review-report.md # Phase 4 output
|
|
83
|
+
│ └── documentation/ # Phase 5 output
|
|
84
|
+
│ ├── api/
|
|
85
|
+
│ ├── user-guide/
|
|
86
|
+
│ └── architecture/
|
|
87
|
+
├── tasks/
|
|
88
|
+
│ └── workflow_[timestamp].json
|
|
89
|
+
└── workflows/
|
|
90
|
+
└── sparc_[timestamp].json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Output
|
|
94
|
+
|
|
95
|
+
Creates a comprehensive workflow summary in `.myaidev-method/workflows/`:
|
|
96
|
+
- Complete workflow execution log
|
|
97
|
+
- Phase-by-phase results
|
|
98
|
+
- Quality metrics and coverage
|
|
99
|
+
- Review findings and recommendations
|
|
100
|
+
- Documentation index
|
|
101
|
+
- Next steps and maintenance guide
|
|
102
|
+
|
|
103
|
+
## Examples
|
|
104
|
+
|
|
105
|
+
### Complete Feature Development
|
|
106
|
+
```bash
|
|
107
|
+
/myai-sparc-workflow "Build JWT-based authentication system with refresh tokens"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Specific Technology Stack
|
|
111
|
+
```bash
|
|
112
|
+
/myai-sparc-workflow "Create e-commerce checkout flow" --tech-stack "react,node,stripe,postgres"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Run Specific Phases
|
|
116
|
+
```bash
|
|
117
|
+
/myai-sparc-workflow "Refactor payment module" --phases "architecture,review,documentation"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Custom Test Framework
|
|
121
|
+
```bash
|
|
122
|
+
/myai-sparc-workflow "Build API endpoints" --test-framework pytest
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Options
|
|
126
|
+
|
|
127
|
+
- Task description (required) - Clear description of the complete feature/system to build
|
|
128
|
+
- `--phases <phases>` - Specific phases to run (comma-separated): architecture,implementation,testing,review,documentation
|
|
129
|
+
- `--tech-stack <stack>` - Technology preferences (e.g., "node,postgres,redis")
|
|
130
|
+
- `--output-dir <path>` - Custom output directory (default: `.myaidev-method/sparc/`)
|
|
131
|
+
- `--test-framework <name>` - Testing framework preference (jest, mocha, pytest, etc.)
|
|
132
|
+
- `--skip-phase <phase>` - Skip specific phase (use with caution)
|
|
133
|
+
|
|
134
|
+
## Workflow Benefits
|
|
135
|
+
|
|
136
|
+
- **Systematic Approach**: No missed steps, comprehensive coverage
|
|
137
|
+
- **Quality Assurance**: Built-in review and testing at every phase
|
|
138
|
+
- **Documentation**: Complete documentation generated automatically
|
|
139
|
+
- **Traceability**: Full workflow history and decision tracking
|
|
140
|
+
- **Best Practices**: SOLID, Clean Code, Security embedded in process
|
|
141
|
+
- **Reproducible**: Consistent results across projects and teams
|
|
142
|
+
|
|
143
|
+
## Integration with MyAIDev Method
|
|
144
|
+
|
|
145
|
+
This command orchestrates the complete MyAIDev Method development workflow:
|
|
146
|
+
- **Methodology**: SPARC (Specification, Pseudocode, Architecture, Refinement, Completion)
|
|
147
|
+
- **Agent Coordination**: Sequential execution with file-based handoffs
|
|
148
|
+
- **Quality Gates**: Validation at each phase transition
|
|
149
|
+
- **Outputs**: Production-ready code with comprehensive documentation
|
|
150
|
+
|
|
151
|
+
## Quality Standards
|
|
152
|
+
|
|
153
|
+
All phases follow MyAIDev Method standards:
|
|
154
|
+
- **Code Quality**: SOLID principles, Clean Code, DRY/KISS/YAGNI
|
|
155
|
+
- **Testing**: 80%+ coverage, integration tests, quality gates
|
|
156
|
+
- **Security**: OWASP Top 10 compliance, input validation, error handling
|
|
157
|
+
- **Documentation**: API docs, user guides, architecture specifications
|
|
158
|
+
- **Performance**: Optimization analysis, scalability planning
|
|
159
|
+
|
|
160
|
+
## Error Handling
|
|
161
|
+
|
|
162
|
+
The workflow includes robust error handling:
|
|
163
|
+
- **Phase Validation**: Verify outputs before proceeding to next phase
|
|
164
|
+
- **Graceful Degradation**: Continue with warnings when possible
|
|
165
|
+
- **Rollback Support**: Restore previous state on critical failures
|
|
166
|
+
- **Error Reports**: Detailed error logs in `.myaidev-method/workflows/`
|
|
167
|
+
- **Manual Override**: Skip or retry phases as needed
|
|
168
|
+
|
|
169
|
+
## Next Steps After Completion
|
|
170
|
+
|
|
171
|
+
1. **Review Outputs**: Examine all generated artifacts in `.myaidev-method/sparc/`
|
|
172
|
+
2. **Address Findings**: Review phase 4 report and address issues
|
|
173
|
+
3. **Integration**: Integrate code into your project structure
|
|
174
|
+
4. **Testing**: Run final integration tests
|
|
175
|
+
5. **Deployment**: Follow deployment guide in documentation
|
|
176
|
+
6. **Maintenance**: Use generated documentation for ongoing development
|
|
177
|
+
|
|
178
|
+
## MyAIDev Method Philosophy
|
|
179
|
+
|
|
180
|
+
The SPARC workflow embodies MyAIDev Method principles:
|
|
181
|
+
- **Specification First**: Clear requirements before implementation
|
|
182
|
+
- **Architecture Planning**: Design before coding
|
|
183
|
+
- **Testing Built-In**: Quality from the start
|
|
184
|
+
- **Continuous Review**: Iterative refinement
|
|
185
|
+
- **Documentation Integral**: Knowledge preservation
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# WordPress Site Administrator
|
|
2
|
+
|
|
3
|
+
Execute WordPress administration operations: $ARGUMENTS
|
|
4
|
+
|
|
5
|
+
Launch the WordPress administrator agent for comprehensive site management, security analysis, and performance optimization.
|
|
6
|
+
|
|
7
|
+
## Available Operations
|
|
8
|
+
|
|
9
|
+
### Security Operations
|
|
10
|
+
- `security-scan` - Comprehensive security assessment and vulnerability check
|
|
11
|
+
- `malware-check` - Scan for malicious code and suspicious files
|
|
12
|
+
- `user-audit` - Review user accounts, roles, and permissions
|
|
13
|
+
- `plugin-security` - Check plugins and themes for known vulnerabilities
|
|
14
|
+
- `ssl-check` - Verify SSL/TLS certificate and security configuration
|
|
15
|
+
- `file-permissions` - Audit file and directory permissions
|
|
16
|
+
|
|
17
|
+
### Performance Operations
|
|
18
|
+
- `speed-test` - Analyze site performance and Core Web Vitals
|
|
19
|
+
- `database-optimize` - Clean and optimize WordPress database
|
|
20
|
+
- `cache-setup` - Configure and optimize caching strategies
|
|
21
|
+
- `image-optimize` - Analyze and optimize media files
|
|
22
|
+
- `resource-monitor` - Check server resource usage and optimization
|
|
23
|
+
|
|
24
|
+
### Health Operations
|
|
25
|
+
- `health-check` - Comprehensive WordPress site health assessment
|
|
26
|
+
- `error-analysis` - Review and analyze error logs
|
|
27
|
+
- `uptime-check` - Monitor site availability and response times
|
|
28
|
+
- `backup-verify` - Validate backup integrity and restore capabilities
|
|
29
|
+
- `update-check` - Check for WordPress, plugin, and theme updates
|
|
30
|
+
|
|
31
|
+
### Administration Operations
|
|
32
|
+
- `user-manage` - User and role management operations
|
|
33
|
+
- `plugin-manage` - Plugin installation, updates, and management
|
|
34
|
+
- `content-cleanup` - Remove spam, unused content, and optimize database
|
|
35
|
+
- `settings-optimize` - Configure optimal WordPress settings
|
|
36
|
+
- `staging-deploy` - Manage staging environment operations
|
|
37
|
+
|
|
38
|
+
## Usage Examples
|
|
39
|
+
|
|
40
|
+
### Security Assessment
|
|
41
|
+
```
|
|
42
|
+
/myai-wordpress-admin security-scan
|
|
43
|
+
/myai-wordpress-admin malware-check
|
|
44
|
+
/myai-wordpress-admin user-audit --role administrator
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Performance Optimization
|
|
48
|
+
```
|
|
49
|
+
/myai-wordpress-admin speed-test --detailed
|
|
50
|
+
/myai-wordpress-admin database-optimize --cleanup-revisions
|
|
51
|
+
/myai-wordpress-admin cache-setup --type redis
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Site Health Monitoring
|
|
55
|
+
```
|
|
56
|
+
/myai-wordpress-admin health-check --comprehensive
|
|
57
|
+
/myai-wordpress-admin error-analysis --last-24h
|
|
58
|
+
/myai-wordpress-admin uptime-check --setup-monitoring
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Administrative Tasks
|
|
62
|
+
```
|
|
63
|
+
/myai-wordpress-admin plugin-manage --update-all --check-security
|
|
64
|
+
/myai-wordpress-admin content-cleanup --remove-spam --optimize-db
|
|
65
|
+
/myai-wordpress-admin settings-optimize --performance-focus
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Process Flow
|
|
69
|
+
|
|
70
|
+
1. **Initialize WordPress Connection**
|
|
71
|
+
- Validate MCP connection to WordPress
|
|
72
|
+
- Check SSH access if configured
|
|
73
|
+
- Verify administrative permissions
|
|
74
|
+
|
|
75
|
+
2. **Execute Operation**
|
|
76
|
+
- Load wordpress-admin agent configuration
|
|
77
|
+
- Parse operation parameters from $ARGUMENTS
|
|
78
|
+
- Execute requested administrative task
|
|
79
|
+
|
|
80
|
+
3. **Security & Safety Checks**
|
|
81
|
+
- Create backups before destructive operations
|
|
82
|
+
- Validate permissions before changes
|
|
83
|
+
- Log all administrative actions
|
|
84
|
+
|
|
85
|
+
4. **Generate Report**
|
|
86
|
+
- Provide detailed findings and analysis
|
|
87
|
+
- Include actionable recommendations
|
|
88
|
+
- Create priority-based action items
|
|
89
|
+
|
|
90
|
+
5. **Follow-up Actions**
|
|
91
|
+
- Suggest monitoring setup
|
|
92
|
+
- Recommend maintenance schedules
|
|
93
|
+
- Provide next steps guidance
|
|
94
|
+
|
|
95
|
+
## Required Environment Variables
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
WORDPRESS_URL=https://your-wordpress-site.com
|
|
99
|
+
WORDPRESS_USERNAME=admin-username
|
|
100
|
+
WORDPRESS_APP_PASSWORD=application-password
|
|
101
|
+
|
|
102
|
+
# Optional SSH access for server-level operations
|
|
103
|
+
SSH_HOST=server-ip-address
|
|
104
|
+
SSH_USERNAME=server-username
|
|
105
|
+
SSH_KEY_PATH=/path/to/private/key
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Safety Features
|
|
109
|
+
|
|
110
|
+
- **Backup Creation**: Automatic backup before major changes
|
|
111
|
+
- **Permission Validation**: Verify admin rights before operations
|
|
112
|
+
- **Staging Support**: Test changes in staging environment first
|
|
113
|
+
- **Rollback Capability**: Provide undo procedures for changes
|
|
114
|
+
- **Audit Logging**: Track all administrative actions
|
|
115
|
+
|
|
116
|
+
## Output Format
|
|
117
|
+
|
|
118
|
+
The agent will provide structured reports with:
|
|
119
|
+
- **Executive Summary**: High-level findings and status
|
|
120
|
+
- **Critical Issues**: Immediate attention required
|
|
121
|
+
- **Warnings**: Items requiring near-term resolution
|
|
122
|
+
- **Recommendations**: Optimization suggestions
|
|
123
|
+
- **Action Items**: Specific tasks with priorities
|
|
124
|
+
- **Technical Details**: Logs, metrics, and detailed analysis
|
|
125
|
+
|
|
126
|
+
## Security Considerations
|
|
127
|
+
|
|
128
|
+
This agent has extensive administrative capabilities. Ensure:
|
|
129
|
+
- Strong authentication credentials
|
|
130
|
+
- Limited access to authorized personnel
|
|
131
|
+
- Regular audit of administrative actions
|
|
132
|
+
- Backup verification before major changes
|
|
133
|
+
- Staging environment testing when possible
|
|
134
|
+
|
|
135
|
+
## Integration Notes
|
|
136
|
+
|
|
137
|
+
- Works with WordPress REST API via MCP
|
|
138
|
+
- Optional SSH integration for server-level access
|
|
139
|
+
- Supports both managed and self-hosted WordPress
|
|
140
|
+
- Compatible with major security and performance plugins
|
|
141
|
+
- Provides recommendations for popular caching solutions
|
|
142
|
+
|
|
143
|
+
Always prioritize site security and stability. When in doubt, create backups and test in staging environments first.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# WordPress Content Publisher
|
|
2
|
+
|
|
3
|
+
Publish the specified markdown file to WordPress: $ARGUMENTS
|
|
4
|
+
|
|
5
|
+
Read and publish the file to WordPress using native tools and the WordPress REST API.
|
|
6
|
+
|
|
7
|
+
## Process
|
|
8
|
+
|
|
9
|
+
1. **Read the markdown file** from the path provided in $ARGUMENTS
|
|
10
|
+
2. **Parse the frontmatter** to extract:
|
|
11
|
+
- title
|
|
12
|
+
- meta_description (use as excerpt)
|
|
13
|
+
- slug
|
|
14
|
+
- tags
|
|
15
|
+
- category
|
|
16
|
+
- use_gutenberg (optional, default: false)
|
|
17
|
+
3. **Load WordPress configuration** from `.env` file:
|
|
18
|
+
- WORDPRESS_URL
|
|
19
|
+
- WORDPRESS_USERNAME
|
|
20
|
+
- WORDPRESS_APP_PASSWORD
|
|
21
|
+
- WORDPRESS_USE_GUTENBERG (optional, default: false)
|
|
22
|
+
4. **Convert content format** if Gutenberg is enabled:
|
|
23
|
+
- If use_gutenberg is true or WORDPRESS_USE_GUTENBERG is true
|
|
24
|
+
- Convert HTML to Gutenberg block format using patterns:
|
|
25
|
+
* `<!-- wp:paragraph --><p>content</p><!-- /wp:paragraph -->`
|
|
26
|
+
* `<!-- wp:heading {"level":2} --><h2>title</h2><!-- /wp:heading -->`
|
|
27
|
+
5. **Create categories and tags** if they don't exist using WordPress REST API
|
|
28
|
+
6. **Publish the post** using curl with Basic Authentication:
|
|
29
|
+
```bash
|
|
30
|
+
curl -X POST "${WORDPRESS_URL}/wp-json/wp/v2/posts" \
|
|
31
|
+
-H "Authorization: Basic $(echo -n "${USERNAME}:${APP_PASSWORD}" | base64)" \
|
|
32
|
+
-H "Content-Type: application/json" \
|
|
33
|
+
-d '{"title":"Post Title","content":"Content","status":"draft"}'
|
|
34
|
+
```
|
|
35
|
+
7. **Report the result** including:
|
|
36
|
+
- Post ID
|
|
37
|
+
- Preview URL
|
|
38
|
+
- Edit URL in WordPress admin
|
|
39
|
+
- Format used (Classic or Gutenberg)
|
|
40
|
+
|
|
41
|
+
## Parameters
|
|
42
|
+
|
|
43
|
+
- File path (required): Path to markdown file
|
|
44
|
+
- --status: draft (default), publish, pending, private
|
|
45
|
+
- --gutenberg: Use Gutenberg block format (default: false)
|
|
46
|
+
- --classic: Force classic editor format (overrides defaults)
|
|
47
|
+
|
|
48
|
+
## Error Handling
|
|
49
|
+
|
|
50
|
+
If WordPress credentials are not configured:
|
|
51
|
+
- Guide user to set up environment variables
|
|
52
|
+
- Provide instructions for creating Application Password
|
|
53
|
+
|
|
54
|
+
If file doesn't exist or isn't readable:
|
|
55
|
+
- Report clear error message
|
|
56
|
+
- Suggest checking file path
|
|
57
|
+
|
|
58
|
+
## Success Response
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
✅ Successfully published to WordPress!
|
|
62
|
+
- Post ID: [id]
|
|
63
|
+
- Status: [draft/published]
|
|
64
|
+
- Preview: [preview_url]
|
|
65
|
+
- Edit: [admin_edit_url]
|
|
66
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
prompt = """
|
|
2
|
+
Publish markdown content to Astro static site with content collections support and git workflow: {{args}}
|
|
3
|
+
|
|
4
|
+
Invoke the Astro publishing agent to transform frontmatter, validate schemas, and deploy via git.
|
|
5
|
+
|
|
6
|
+
## Task
|
|
7
|
+
Add markdown content to Astro site with content collection validation.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
|
|
11
|
+
1. **Read the markdown file** from the path provided
|
|
12
|
+
2. **Transform frontmatter** for Astro compatibility:
|
|
13
|
+
- `date` → `pubDate` (ISO 8601 format)
|
|
14
|
+
- `status: published` → `draft: false`
|
|
15
|
+
- `excerpt` → `description`
|
|
16
|
+
- `image` → `heroImage`
|
|
17
|
+
3. **Validate against content collection schema** (if exists)
|
|
18
|
+
4. **Copy file to appropriate directory**:
|
|
19
|
+
- Content collection: `src/content/[collection]/`
|
|
20
|
+
- Pages: `src/pages/`
|
|
21
|
+
5. **Commit and push** via git workflow
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
When parsing {{args}}, look for:
|
|
26
|
+
- File path (required): Path to markdown file
|
|
27
|
+
- --collection: Target content collection name (default: blog)
|
|
28
|
+
- --pages: Publish to pages directory instead of collections
|
|
29
|
+
- --project: Astro project path (default: current directory)
|
|
30
|
+
- --branch: Git branch name (default: main)
|
|
31
|
+
- --no-push: Commit but don't push
|
|
32
|
+
- --dry-run: Validate without publishing
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
Publish to content collection:
|
|
37
|
+
```
|
|
38
|
+
myai-astro-publish "my-article.md" --collection blog
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Publish to pages:
|
|
42
|
+
```
|
|
43
|
+
myai-astro-publish "about.md" --pages
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Custom project:
|
|
47
|
+
```
|
|
48
|
+
myai-astro-publish "post.md" --project ~/my-site --branch staging
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Frontmatter Transformation
|
|
52
|
+
|
|
53
|
+
Automatically converts common frontmatter fields:
|
|
54
|
+
- `date` → `pubDate` (ISO 8601 format)
|
|
55
|
+
- `status: published` → `draft: false`
|
|
56
|
+
- `status: draft` → `draft: true`
|
|
57
|
+
- `excerpt` → `description`
|
|
58
|
+
- `image` → `heroImage`
|
|
59
|
+
- Preserves all other fields
|
|
60
|
+
|
|
61
|
+
## Prerequisites
|
|
62
|
+
|
|
63
|
+
Requires Astro project with:
|
|
64
|
+
- astro.config.mjs
|
|
65
|
+
- Content collections configured (optional)
|
|
66
|
+
- Git repository initialized
|
|
67
|
+
|
|
68
|
+
## Validation
|
|
69
|
+
|
|
70
|
+
If content collection schema exists:
|
|
71
|
+
1. Load schema from config
|
|
72
|
+
2. Validate frontmatter fields
|
|
73
|
+
3. Check required fields
|
|
74
|
+
4. Verify field types
|
|
75
|
+
5. Report validation errors before publishing
|
|
76
|
+
"""
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
prompt = """
|
|
2
|
+
Configure MyAI Method settings: {{args}}
|
|
3
|
+
|
|
4
|
+
## Available Configurations
|
|
5
|
+
|
|
6
|
+
### wordpress
|
|
7
|
+
Interactive WordPress setup - no manual .env file creation needed!
|
|
8
|
+
|
|
9
|
+
**Process:**
|
|
10
|
+
1. **Collect WordPress site URL**
|
|
11
|
+
- Prompt: "Enter your WordPress site URL (e.g., https://yoursite.com):"
|
|
12
|
+
- Validate URL format and accessibility
|
|
13
|
+
- Test basic connectivity
|
|
14
|
+
|
|
15
|
+
2. **Get WordPress username**
|
|
16
|
+
- Prompt: "Enter your WordPress admin username:"
|
|
17
|
+
- Validate username format
|
|
18
|
+
|
|
19
|
+
3. **Guide through Application Password creation**
|
|
20
|
+
- Show step-by-step instructions:
|
|
21
|
+
* "Go to your WordPress Admin → Users → Your Profile"
|
|
22
|
+
* "Scroll down to 'Application Passwords' section"
|
|
23
|
+
* "Enter a name like 'MyAI Dev Method' and click 'Add New'"
|
|
24
|
+
* "Copy the generated password (it looks like: xxxx xxxx xxxx xxxx)"
|
|
25
|
+
- Prompt: "Paste your Application Password here:"
|
|
26
|
+
- Validate password format
|
|
27
|
+
|
|
28
|
+
4. **Test connection**
|
|
29
|
+
- Verify credentials by making test API call
|
|
30
|
+
- Show success/failure message with troubleshooting tips
|
|
31
|
+
|
|
32
|
+
5. **Save configuration**
|
|
33
|
+
- Create/update `.env` file automatically
|
|
34
|
+
- Set proper file permissions (600)
|
|
35
|
+
- Show confirmation of saved settings
|
|
36
|
+
|
|
37
|
+
6. **Optional SSH setup**
|
|
38
|
+
- Ask: "Do you want to set up SSH for advanced WordPress administration? (y/n)"
|
|
39
|
+
- If yes, prompt for SSH details:
|
|
40
|
+
* SSH host/IP
|
|
41
|
+
* SSH username
|
|
42
|
+
* SSH key path (optional)
|
|
43
|
+
- Test SSH connection if credentials provided
|
|
44
|
+
|
|
45
|
+
**Success message:**
|
|
46
|
+
```
|
|
47
|
+
✅ WordPress integration configured successfully!
|
|
48
|
+
- Site: [URL]
|
|
49
|
+
- User: [username]
|
|
50
|
+
- Connection: ✅ Verified
|
|
51
|
+
- Available commands: myai-wordpress-admin, myai-wordpress-publish
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### defaults
|
|
55
|
+
Configure default content settings:
|
|
56
|
+
- Default word count
|
|
57
|
+
- Default post status
|
|
58
|
+
- Default tone
|
|
59
|
+
- Default audience
|
|
60
|
+
|
|
61
|
+
### agents
|
|
62
|
+
List and manage available agents:
|
|
63
|
+
- **List**: Show all installed agents with descriptions and capabilities
|
|
64
|
+
- **Status**: Check agent configuration validity and tool availability
|
|
65
|
+
- **Edit**: Open agent files for customization
|
|
66
|
+
- **Backup**: Create backups before modifying agents
|
|
67
|
+
- **Restore**: Restore agents from backups
|
|
68
|
+
- **Validate**: Test agent configuration structure
|
|
69
|
+
- **Tools**: Show what tools each agent has access to
|
|
70
|
+
|
|
71
|
+
## WordPress Setup Process
|
|
72
|
+
|
|
73
|
+
When configuring WordPress:
|
|
74
|
+
|
|
75
|
+
1. **Parse arguments** to determine configuration type
|
|
76
|
+
2. **Interactive prompts** for required values
|
|
77
|
+
3. **Validate configuration** and test connectivity
|
|
78
|
+
4. **Save to .env file** with secure permissions
|
|
79
|
+
5. **Confirm successful configuration**
|
|
80
|
+
|
|
81
|
+
## WordPress REST API Integration
|
|
82
|
+
|
|
83
|
+
WordPress integration uses the native WordPress REST API with Application Passwords:
|
|
84
|
+
|
|
85
|
+
1. **Authentication**: HTTP Basic Auth with Application Passwords
|
|
86
|
+
2. **Content Creation**: Direct API calls for publishing
|
|
87
|
+
3. **Gutenberg Support**: Block format conversion when needed
|
|
88
|
+
4. **No Additional Dependencies**: Uses standard REST API endpoints
|
|
89
|
+
|
|
90
|
+
## WordPress Setup Example
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
# User runs the command
|
|
94
|
+
myai-configure wordpress
|
|
95
|
+
|
|
96
|
+
# System prompts and responses:
|
|
97
|
+
? Enter your WordPress site URL: https://myblog.com
|
|
98
|
+
✓ URL format valid, testing connection...
|
|
99
|
+
✓ WordPress site accessible
|
|
100
|
+
|
|
101
|
+
? Enter your WordPress admin username: john_admin
|
|
102
|
+
✓ Username format valid
|
|
103
|
+
|
|
104
|
+
# System shows instructions
|
|
105
|
+
📝 Create Application Password:
|
|
106
|
+
1. Go to https://myblog.com/wp-admin/profile.php
|
|
107
|
+
2. Scroll to "Application Passwords"
|
|
108
|
+
3. Enter name: "MyAI Dev Method"
|
|
109
|
+
4. Click "Add New"
|
|
110
|
+
5. Copy the generated password
|
|
111
|
+
|
|
112
|
+
? Paste your Application Password: abcd efgh ijkl mnop
|
|
113
|
+
✓ Password format valid, testing connection...
|
|
114
|
+
✓ WordPress API connection successful!
|
|
115
|
+
|
|
116
|
+
? Set up SSH for advanced features? (y/n): y
|
|
117
|
+
? SSH host/IP: myblog.com
|
|
118
|
+
? SSH username: john
|
|
119
|
+
? SSH key path (press enter for default): /home/user/.ssh/id_rsa
|
|
120
|
+
✓ SSH connection tested successfully
|
|
121
|
+
|
|
122
|
+
✅ Configuration saved to .env
|
|
123
|
+
✅ File permissions set to 600 (secure)
|
|
124
|
+
|
|
125
|
+
WordPress integration ready! Available commands:
|
|
126
|
+
• myai-wordpress-admin health-check
|
|
127
|
+
• myai-wordpress-publish filename.md
|
|
128
|
+
• myai-content-writer "topic" --publish_to_wordpress true
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Agent Management Examples
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
# List all available agents
|
|
135
|
+
myai-configure agents --list
|
|
136
|
+
|
|
137
|
+
# Show detailed agent status
|
|
138
|
+
myai-configure agents --status
|
|
139
|
+
|
|
140
|
+
# Check specific agent configuration
|
|
141
|
+
myai-configure agents --validate content-writer
|
|
142
|
+
|
|
143
|
+
# Create backup before editing
|
|
144
|
+
myai-configure agents --backup wordpress-admin
|
|
145
|
+
|
|
146
|
+
# Show agent tool permissions
|
|
147
|
+
myai-configure agents --tools wordpress-admin
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Agent Operations
|
|
151
|
+
|
|
152
|
+
### List Operation
|
|
153
|
+
Shows:
|
|
154
|
+
- Agent name and description
|
|
155
|
+
- File location
|
|
156
|
+
- Available tools
|
|
157
|
+
- Last modified date
|
|
158
|
+
- Configuration status (valid/invalid)
|
|
159
|
+
|
|
160
|
+
### Status Operation
|
|
161
|
+
Checks:
|
|
162
|
+
- Configuration validity
|
|
163
|
+
- Required fields presence
|
|
164
|
+
- Tool availability
|
|
165
|
+
- File permissions
|
|
166
|
+
- Syntax errors
|
|
167
|
+
|
|
168
|
+
### Validate Operation
|
|
169
|
+
Performs:
|
|
170
|
+
- Syntax validation
|
|
171
|
+
- Required field verification
|
|
172
|
+
- Tool permission verification
|
|
173
|
+
- Configuration structure analysis
|
|
174
|
+
- Best practice recommendations
|
|
175
|
+
|
|
176
|
+
### Backup/Restore Operations
|
|
177
|
+
- Creates timestamped backups
|
|
178
|
+
- Maintains backup history
|
|
179
|
+
- Safe restoration with confirmation prompts
|
|
180
|
+
- Backup before any modifications
|
|
181
|
+
|
|
182
|
+
## Security
|
|
183
|
+
|
|
184
|
+
- Never display passwords in plain text
|
|
185
|
+
- Use environment variables for sensitive data
|
|
186
|
+
- Validate URLs and credentials before saving
|
|
187
|
+
- Set secure file permissions (600) for .env files
|
|
188
|
+
"""
|