myaidev-method 0.3.1 → 0.3.3

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 (56) hide show
  1. package/.claude-plugin/plugin.json +52 -48
  2. package/CHANGELOG.md +5 -0
  3. package/DEV_WORKFLOW_GUIDE.md +6 -6
  4. package/MCP_INTEGRATION.md +4 -4
  5. package/README.md +140 -66
  6. package/TECHNICAL_ARCHITECTURE.md +112 -18
  7. package/USER_GUIDE.md +270 -39
  8. package/bin/cli.js +47 -13
  9. package/dist/mcp/gutenberg-converter.js +667 -413
  10. package/dist/mcp/wordpress-admin-mcp.js +0 -1
  11. package/dist/mcp/wordpress-integration.js +0 -1
  12. package/dist/mcp/wordpress-server.js +1558 -1182
  13. package/dist/server/.tsbuildinfo +1 -1
  14. package/extension.json +3 -3
  15. package/package.json +9 -2
  16. package/skills/content-writer/SKILL.md +130 -178
  17. package/skills/infographic/SKILL.md +191 -0
  18. package/skills/myaidev-analyze/SKILL.md +242 -0
  19. package/skills/myaidev-architect/SKILL.md +389 -0
  20. package/skills/myaidev-coder/SKILL.md +291 -0
  21. package/skills/myaidev-debug/SKILL.md +308 -0
  22. package/skills/myaidev-documenter/SKILL.md +194 -0
  23. package/skills/myaidev-migrate/SKILL.md +300 -0
  24. package/skills/myaidev-performance/SKILL.md +270 -0
  25. package/skills/myaidev-refactor/SKILL.md +296 -0
  26. package/skills/myaidev-reviewer/SKILL.md +385 -0
  27. package/skills/myaidev-tester/SKILL.md +331 -0
  28. package/skills/myaidev-workflow/SKILL.md +567 -0
  29. package/skills/security-auditor/SKILL.md +1 -1
  30. package/src/cli/commands/addon.js +60 -12
  31. package/src/cli/commands/auth.js +10 -2
  32. package/src/config/workflows.js +11 -6
  33. package/src/lib/ascii-banner.js +3 -3
  34. package/src/lib/coolify-utils.js +0 -1
  35. package/src/lib/payloadcms-utils.js +0 -1
  36. package/src/lib/visual-generation-utils.js +0 -1
  37. package/src/lib/wordpress-admin-utils.js +0 -1
  38. package/src/mcp/gutenberg-converter.js +667 -413
  39. package/src/mcp/wordpress-admin-mcp.js +0 -1
  40. package/src/mcp/wordpress-integration.js +0 -1
  41. package/src/mcp/wordpress-server.js +1558 -1182
  42. package/src/scripts/test-coolify-deploy.js +0 -1
  43. package/src/statusline/statusline.sh +279 -0
  44. package/skills/content-writer/agents/editor-agent.md +0 -138
  45. package/skills/content-writer/agents/planner-agent.md +0 -121
  46. package/skills/content-writer/agents/research-agent.md +0 -83
  47. package/skills/content-writer/agents/seo-agent.md +0 -139
  48. package/skills/content-writer/agents/visual-planner-agent.md +0 -110
  49. package/skills/content-writer/agents/writer-agent.md +0 -85
  50. package/skills/sparc-architect/SKILL.md +0 -127
  51. package/skills/sparc-coder/SKILL.md +0 -90
  52. package/skills/sparc-documenter/SKILL.md +0 -155
  53. package/skills/sparc-reviewer/SKILL.md +0 -138
  54. package/skills/sparc-tester/SKILL.md +0 -100
  55. package/skills/sparc-workflow/SKILL.md +0 -130
  56. /package/{marketplace.json → .claude-plugin/marketplace.json} +0 -0
@@ -0,0 +1,191 @@
1
+ ---
2
+ name: generating-infographics
3
+ description: Creates diagrams (architecture, flowcharts, timelines, sequences) from Mermaid code and inserts them into markdown articles as asset-referenced images (PNG by default for universal compatibility). Use when enriching articles with diagrams, adding infographics to blog posts, visualizing technical content, or when the user mentions diagrams, infographics, or visual content for markdown.
4
+ argument-hint: "[article.md] [--style=modern] [--max-diagrams=8] [--theme=default]"
5
+ allowed-tools: [Read, Write, Edit, Bash, Task, Glob, Grep, AskUserQuestion]
6
+ context: fork
7
+ ---
8
+
9
+ # Infographic Orchestrator
10
+
11
+ Analyze articles, generate Mermaid diagrams, render via `mmdc`, save as assets, and reference from markdown.
12
+
13
+ ```
14
+ Article.md → Analyze → Design Mermaid → Render → Save to assets/ → Reference in markdown
15
+ ```
16
+
17
+ ## Subagent Registry
18
+
19
+ Each subagent is a real Claude Code subagent defined in `agents/` with its own tools and model:
20
+
21
+ | Phase | Subagent Name | Model | Tools |
22
+ |-------|--------------|-------|-------|
23
+ | Analyze | `infographic-analyzer-agent` | haiku | Read, Write, Glob |
24
+ | Design | `infographic-designer-agent` | haiku | Read, Write |
25
+
26
+ ## Parameters
27
+
28
+ | Parameter | Default | Notes |
29
+ |-----------|---------|-------|
30
+ | `article` | Required | Path to markdown file |
31
+ | `--style` | `modern` | `modern`, `minimal`, `corporate` |
32
+ | `--max-diagrams` | `8` | Cap on diagrams |
33
+ | `--theme` | `default` | Mermaid theme: `default`, `dark`, `forest`, `neutral` |
34
+ | `--format` | `png` | Output format: `png` (recommended) or `svg` |
35
+ | `--output` | input path | Output path |
36
+ | `--dry-run` | `false` | Show plan without modifying |
37
+
38
+ **Why PNG by default**: Mermaid generates SVGs using `<foreignObject>` HTML elements for text in most diagram types (sequence, timeline, state, etc.). The `htmlLabels: false` config only fixes flowcharts. This causes text to vanish in:
39
+ - **WordPress** — the SVG sanitizer (`enshrined/svg-sanitize`) strips `<foreignObject>` on upload
40
+ - **Zed/resvg** — no `foreignObject` support
41
+ - **Inkscape, macOS Preview, Office** — same issue
42
+
43
+ PNG is rendered by Puppeteer (real Chromium), so text always shows. At `-s 2` (2x scale) the output is sharp on retina displays. Use `--format=svg` only if you need scalable vectors and will serve them exclusively in web browsers (not through WordPress media library upload).
44
+
45
+ ## Workflow
46
+
47
+ Copy this checklist and track progress:
48
+
49
+ ```
50
+ Progress:
51
+ - [ ] Phase 0: Initialize (validate article, check mmdc)
52
+ - [ ] Phase 1: Analyze (spawn analyzer agent)
53
+ - [ ] Phase 2: Design (spawn designer agent)
54
+ - [ ] Phase 3: Render & validate diagrams
55
+ - [ ] Phase 4: Save to assets/ and insert references
56
+ - [ ] Phase 5: Cleanup and report
57
+ ```
58
+
59
+ ### Phase 0: Initialize
60
+
61
+ - Parse `$ARGUMENTS` for article path and flags
62
+ - Validate file exists and is markdown
63
+ - Create working directory: `.infographic-session/`
64
+ - Verify mmdc: `npx -y @mermaid-js/mermaid-cli --version`
65
+ - Determine output format from `--format` flag (default: `png`)
66
+ - Write mmdc config:
67
+
68
+ ```bash
69
+ cat > .infographic-session/mermaid-config.json << 'EOF'
70
+ {
71
+ "flowchart": { "htmlLabels": false, "useMaxWidth": false },
72
+ "sequence": { "useMaxWidth": false },
73
+ "gantt": { "useMaxWidth": false }
74
+ }
75
+ EOF
76
+ ```
77
+
78
+ The `htmlLabels: false` setting forces native SVG `<text>` elements instead of `<foreignObject>` HTML, improving compatibility with non-browser renderers. This config is used for both SVG and PNG output.
79
+
80
+ ### Phase 1: Analyze
81
+
82
+ Spawn the analyzer subagent:
83
+
84
+ ```
85
+ Task(subagent_type: "infographic-analyzer-agent", prompt: "
86
+ Analyze the article at '{article_path}' for diagram opportunities.
87
+ Max diagrams: {max_diagrams}.
88
+ Read the article, identify high-impact diagram opportunities,
89
+ and write your analysis to .infographic-session/analysis.json
90
+ ")
91
+ ```
92
+
93
+ Review the analysis before proceeding. If `--dry-run`, report the plan and stop.
94
+
95
+ ### Phase 2: Design
96
+
97
+ Read `.infographic-session/analysis.json`, then spawn the designer subagent:
98
+
99
+ ```
100
+ Task(subagent_type: "infographic-designer-agent", prompt: "
101
+ Generate Mermaid diagrams based on the analysis.
102
+ Read the analysis from: .infographic-session/analysis.json
103
+ Read the article from: {article_path}
104
+ Style preset: {style}. Theme: {theme}.
105
+ Write your Mermaid diagrams to .infographic-session/diagrams.json
106
+ ")
107
+ ```
108
+
109
+ ### Phase 3: Render & Validate
110
+
111
+ For each diagram in `diagrams.json`:
112
+
113
+ 1. Write Mermaid source to `.infographic-session/{id}.mmd`
114
+ 2. Render:
115
+ ```
116
+ npx -y @mermaid-js/mermaid-cli \
117
+ -i .infographic-session/{id}.mmd \
118
+ -o .infographic-session/{id}.{format} \
119
+ -t {theme} \
120
+ -c .infographic-session/mermaid-config.json \
121
+ -s 2 \
122
+ -b white \
123
+ --quiet
124
+ ```
125
+ The `-s 2` flag renders at 2x resolution for sharp output. Use `-b transparent` instead of `-b white` if the article has a dark theme.
126
+ 3. Validate the output file exists and has non-trivial size (>1KB)
127
+ 4. If render fails, log the error and skip that diagram
128
+
129
+ ### Phase 4: Save & Reference
130
+
131
+ For each successfully rendered diagram:
132
+
133
+ 1. Create `assets/` directory next to the article file if it doesn't exist
134
+ 2. Copy `.infographic-session/{id}.{format}` to `{assets-dir}/{article-slug}-{id}.{format}` (slug = article filename without extension)
135
+ 3. Insert reference after the target heading's section content:
136
+
137
+ ```markdown
138
+ <div class="infographic" data-diagram-id="{id}" data-type="{type}">
139
+
140
+ ![{alt_text}](assets/{article-slug}-{id}.{format})
141
+
142
+ </div>
143
+
144
+ *Figure {n}: {caption}*
145
+ ```
146
+
147
+ ### Phase 5: Cleanup & Report
148
+
149
+ - Remove `.infographic-session/` working directory
150
+ - Report:
151
+
152
+ ```
153
+ Infographic Enrichment Complete
154
+ Article: {path}
155
+ Format: {format}
156
+ Assets: {assets-dir}/
157
+ Diagrams: {count}/{attempted}
158
+ Created:
159
+ 1. [{type}] assets/{slug}-diag-1.{format} → after "## Heading"
160
+ ```
161
+
162
+ ## Error Handling
163
+
164
+ - If a subagent fails, log the error and continue with what's available
165
+ - Analyzer failure → ask user if they want to provide diagram ideas manually
166
+ - Designer failure → attempt to generate Mermaid code directly in this context
167
+ - Render failure → log and skip, never block the pipeline on a single diagram
168
+
169
+ ## Context Management
170
+
171
+ Before dispatching each subagent, restate in the Task prompt:
172
+ - Current phase and what's been completed
173
+ - Key decisions made (chosen style, theme, article type)
174
+ - What this subagent needs to accomplish
175
+
176
+ ## Progress Reporting
177
+
178
+ At each phase transition, report to the user:
179
+
180
+ ```
181
+ → Phase 1/5: Analyzing "{article}"...
182
+ Done: Found {n} diagram opportunities ({high} high-impact)
183
+ → Phase 2/5: Designing Mermaid diagrams...
184
+ Done: {n} diagrams designed
185
+ → Phase 3/5: Rendering {format} files...
186
+ Done: {rendered}/{total} rendered successfully
187
+ → Phase 4/5: Saving assets and updating article...
188
+ Done: {n} diagrams inserted
189
+ → Phase 5/5: Cleanup...
190
+ Done.
191
+ ```
@@ -0,0 +1,242 @@
1
+ ---
2
+ name: myaidev-analyze
3
+ description: "Deep codebase analysis that detects patterns, conventions, tech stack, dependencies, and risk areas. Use before starting development on an existing project, for onboarding, or to generate a project profile for other MyAIDev skills."
4
+ argument-hint: "[path] [--depth=quick|standard|deep] [--output=.dev-analysis] [--focus=patterns|dependencies|risks|all]"
5
+ allowed-tools: [Read, Write, Glob, Grep, Bash, Task, AskUserQuestion]
6
+ context: fork
7
+ ---
8
+
9
+ # Codebase Analyzer Skill v1 — Orchestrator Pattern
10
+
11
+ You are the **Codebase Analysis Orchestrator**, a coordinator that decomposes project analysis into specialized subagent tasks. You maintain a lightweight planning context while delegating intensive scanning and detection work to isolated subagents.
12
+
13
+ ## Architecture Overview
14
+
15
+ ```
16
+ ┌─────────────────────────────────────────────────────────┐
17
+ │ ORCHESTRATOR (this skill) │
18
+ │ • Parses arguments & validates target path │
19
+ │ • Creates execution plan based on --depth │
20
+ │ • Dispatches subagents (parallel where possible) │
21
+ │ • Synthesizes results into unified profile │
22
+ │ • Generates human-readable analysis report │
23
+ └──────────────┬──────────────────────────────────────────┘
24
+ │ spawns (parallel)
25
+ ┌──────────┼──────────────┬─────────────────┐
26
+ ▼ ▼ ▼ ▼
27
+ ┌────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐
28
+ │Structure│ │ Pattern │ │Dependency│ │ Tech │
29
+ │Scanner │ │ Detector │ │ Mapper │ │ Profiler │
30
+ └────────┘ └──────────┘ └──────────┘ └──────────────┘
31
+ │ │ │ │
32
+ ▼ ▼ ▼ ▼
33
+ ┌─────────────────────────────────────────────────────┐
34
+ │ SYNTHESIZER (orchestrator) │
35
+ │ • Reads all agent outputs │
36
+ │ • Creates project-profile.json │
37
+ │ • Generates analysis-report.md │
38
+ └─────────────────────────────────────────────────────┘
39
+ ```
40
+
41
+ ## Execution Phases
42
+
43
+ ### Phase 0: Initialize
44
+ - Parse `$ARGUMENTS` for target path, flags, and parameters
45
+ - If no path provided, default to the current working directory
46
+ - Verify the target directory exists (fail fast if it does not)
47
+ - Determine analysis depth from `--depth` flag (default: `standard`)
48
+ - Determine focus area from `--focus` flag (default: `all`)
49
+ - Determine output directory from `--output` flag (default: `.dev-analysis`)
50
+ - Create the output directory if it does not exist
51
+ - Write parsed config to `{output}/config.json`
52
+
53
+ ### Phase 1: Parallel Analysis (Subagents)
54
+ Dispatch subagents based on the `--depth` setting. All eligible agents run **in parallel** to maximize throughput.
55
+
56
+ **Depth: quick** (fastest — 2 agents)
57
+ ```
58
+ Task(subagent_type: "general-purpose", prompt: structure-scanner-agent.md)
59
+ Task(subagent_type: "general-purpose", prompt: tech-profiler-agent.md)
60
+ ```
61
+
62
+ **Depth: standard** (default — 4 agents)
63
+ ```
64
+ Task(subagent_type: "general-purpose", prompt: structure-scanner-agent.md)
65
+ Task(subagent_type: "general-purpose", prompt: pattern-detector-agent.md)
66
+ Task(subagent_type: "general-purpose", prompt: dependency-mapper-agent.md)
67
+ Task(subagent_type: "general-purpose", prompt: tech-profiler-agent.md)
68
+ ```
69
+
70
+ **Depth: deep** (comprehensive — 4 agents with expanded scope)
71
+ All 4 agents run with expanded analysis. Instruct each agent to:
72
+ - Increase sample sizes (e.g., pattern detector samples 20-25 files instead of 10-15)
73
+ - Include secondary analysis (e.g., dependency mapper also maps internal import graphs)
74
+ - Report on edge cases and anomalies
75
+
76
+ **Focus filtering**: When `--focus` is not `all`, still run all depth-eligible agents but instruct the orchestrator synthesis (Phase 2) to emphasize the requested focus area in the final report.
77
+
78
+ Each subagent writes its output to the `{output}/` directory:
79
+
80
+ | Agent | Output File |
81
+ |-------|------------|
82
+ | Structure Scanner | `{output}/structure.md` |
83
+ | Pattern Detector | `{output}/conventions.md` |
84
+ | Dependency Mapper | `{output}/dependencies.md` |
85
+ | Tech Profiler | `{output}/project-profile.json` |
86
+
87
+ ### Phase 2: Synthesize
88
+ The orchestrator reads all agent output files and creates:
89
+
90
+ 1. **`{output}/project-profile.json`** — Unified structured profile (merge tech profiler output with summaries from other agents):
91
+ ```json
92
+ {
93
+ "project_name": "detected or directory name",
94
+ "analyzed_at": "ISO timestamp",
95
+ "depth": "quick|standard|deep",
96
+ "tech_stack": {
97
+ "languages": [],
98
+ "frameworks": [],
99
+ "runtime": "",
100
+ "package_manager": ""
101
+ },
102
+ "build": {
103
+ "bundler": "",
104
+ "test_framework": "",
105
+ "linting": [],
106
+ "ci_cd": ""
107
+ },
108
+ "structure": {
109
+ "organization_pattern": "",
110
+ "total_files": 0,
111
+ "files_by_language": {},
112
+ "entry_points": [],
113
+ "test_directories": [],
114
+ "config_files": []
115
+ },
116
+ "conventions": {
117
+ "file_naming": "",
118
+ "function_naming": "",
119
+ "import_style": "",
120
+ "error_handling": "",
121
+ "architecture_pattern": ""
122
+ },
123
+ "dependencies": {
124
+ "total": 0,
125
+ "by_category": {},
126
+ "risks": []
127
+ },
128
+ "risks": [],
129
+ "recommendations": []
130
+ }
131
+ ```
132
+
133
+ 2. **`{output}/analysis-report.md`** — Human-readable report summarizing all findings with sections for structure, patterns, dependencies, tech stack, risks, and recommendations.
134
+
135
+ ### Phase 3: Report
136
+ Present a summary to the user with key findings:
137
+
138
+ ```
139
+ → Codebase Analysis Complete: {project_name}
140
+ Depth: {depth} | Files: {total_files} | Languages: {languages}
141
+
142
+ Tech Stack: {runtime} + {framework} | {package_manager}
143
+ Build: {bundler} | Tests: {test_framework} | Lint: {linters}
144
+ Architecture: {architecture_pattern} | Organization: {org_pattern}
145
+
146
+ Risks Found: {risk_count}
147
+ {risk_1}
148
+ {risk_2}
149
+ ...
150
+
151
+ Output: {output}/
152
+ ├── analysis-report.md (human-readable report)
153
+ ├── project-profile.json (structured profile)
154
+ ├── structure.md (directory analysis)
155
+ ├── conventions.md (patterns & conventions)
156
+ └── dependencies.md (dependency analysis)
157
+ ```
158
+
159
+ ## Parameters
160
+
161
+ | Parameter | Description | Default |
162
+ |-----------|-------------|---------|
163
+ | `path` | Target directory to analyze | Current working directory |
164
+ | `--depth` | Analysis depth: `quick`, `standard`, `deep` | `standard` |
165
+ | `--output` | Output directory for analysis results | `.dev-analysis` |
166
+ | `--focus` | Focus area: `patterns`, `dependencies`, `risks`, `all` | `all` |
167
+
168
+ ## Subagent Prompt Templates
169
+
170
+ Each subagent has a detailed prompt template in the `agents/` directory. Load the appropriate file when spawning each subagent, injecting the dynamic variables.
171
+
172
+ | Agent | Prompt File | Key Variables |
173
+ |-------|-------------|---------------|
174
+ | Structure Scanner | [agents/structure-scanner-agent.md](agents/structure-scanner-agent.md) | target_path, depth, output_dir |
175
+ | Pattern Detector | [agents/pattern-detector-agent.md](agents/pattern-detector-agent.md) | target_path, depth, output_dir |
176
+ | Dependency Mapper | [agents/dependency-mapper-agent.md](agents/dependency-mapper-agent.md) | target_path, depth, output_dir |
177
+ | Tech Profiler | [agents/tech-profiler-agent.md](agents/tech-profiler-agent.md) | target_path, depth, output_dir |
178
+
179
+ ## State Management (Scratchpad Pattern)
180
+
181
+ All intermediate work is written to the output directory:
182
+
183
+ ```
184
+ {output}/
185
+ ├── config.json # Parsed arguments and settings
186
+ ├── structure.md # Structure scanner output
187
+ ├── conventions.md # Pattern detector output
188
+ ├── dependencies.md # Dependency mapper output
189
+ ├── project-profile.json # Tech profiler output → merged unified profile
190
+ └── analysis-report.md # Final human-readable report
191
+ ```
192
+
193
+ This keeps the orchestrator's context lean — it reads only what it needs for each phase.
194
+
195
+ ## Error Handling
196
+
197
+ - If a subagent fails, log the error and continue with remaining agents
198
+ - Structure scanner failure → report what other agents found, note incomplete structure data
199
+ - Pattern detector failure → report "conventions not analyzed" in profile
200
+ - Dependency mapper failure → report "dependencies not analyzed" in profile
201
+ - Tech profiler failure → attempt basic detection from file extensions and config files
202
+ - Always produce a `project-profile.json` and `analysis-report.md`, even if partial
203
+ - Never block the entire pipeline on a single agent failure
204
+
205
+ ## Context Management
206
+
207
+ ### Context Regurgitation
208
+ Before dispatching each subagent, include in its prompt:
209
+ - The target path and depth setting
210
+ - The output directory where it should write results
211
+ - Any relevant config from Phase 0 parsing
212
+
213
+ ### File Buffering
214
+ All subagent outputs go to `{output}/` files — never pass raw subagent output directly into the next prompt. Read only the specific file sections needed for synthesis. This keeps the orchestrator's active context lean.
215
+
216
+ ## Integration with Other Skills
217
+
218
+ This skill produces output that other MyAIDev skills can consume:
219
+
220
+ - **myaidev-architect**: Reads `project-profile.json` to understand existing stack before designing new architecture
221
+ - **myaidev-coder**: Reads `conventions.md` to match existing code patterns
222
+ - **myaidev-debug**: Reads `dependencies.md` and `structure.md` for faster bug investigation
223
+ - **myaidev-reviewer**: Uses `conventions.md` as a baseline for code review standards
224
+
225
+ ## Example Usage
226
+
227
+ ```bash
228
+ # Analyze current project with default settings
229
+ /myaidev-method:myaidev-analyze .
230
+
231
+ # Quick scan of a specific directory
232
+ /myaidev-method:myaidev-analyze ./backend --depth=quick
233
+
234
+ # Deep analysis focused on risks
235
+ /myaidev-method:myaidev-analyze /path/to/project --depth=deep --focus=risks
236
+
237
+ # Custom output directory
238
+ /myaidev-method:myaidev-analyze . --output=./docs/analysis
239
+
240
+ # Analyze before starting work on an unfamiliar codebase
241
+ /myaidev-method:myaidev-analyze /path/to/inherited-project --depth=deep
242
+ ```