wordpress-agent-kit 0.2.2 → 0.3.0

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/kit-learnings.md DELETED
@@ -1,192 +0,0 @@
1
- # WordPress Agent Kit - Installation & Usage Learnings
2
-
3
- **Package:** `wordpress-agent-kit@0.2.1` (published on npm)
4
- **Author:** Kyle Brodeur
5
- **Repo:** https://github.com/kylebrodeur/wordpress-agent-kit
6
-
7
- ---
8
-
9
- ## Quick Start (What Actually Works)
10
-
11
- ### For Pi (Recommended)
12
- ```bash
13
- pnpm dlx wordpress-agent-kit@latest install --platform pi
14
- ```
15
- - Installs skills to `.pi/agent/skills/` (17 skills)
16
- - Non-interactive, no TTY needed
17
- - Works in headless/CI environments
18
-
19
- ### For Other Platforms
20
- ```bash
21
- # GitHub Copilot / VS Code
22
- pnpm dlx wordpress-agent-kit@latest install --platform github
23
-
24
- # Cursor IDE
25
- pnpm dlx wordpress-agent-kit@latest install --platform cursor
26
-
27
- # Generic agent format
28
- pnpm dlx wordpress-agent-kit@latest install --platform agent
29
-
30
- # Claude (interactive - requires TTY)
31
- pnpm dlx wordpress-agent-kit@latest install --platform claude
32
- ```
33
-
34
- ---
35
-
36
- ## What DOESN'T Work (Common Pitfalls)
37
-
38
- ### `setup` command requires TTY
39
- ```bash
40
- pnpm dlx wordpress-agent-kit@latest setup # FAILS in non-interactive shells
41
- ```
42
- **Error:** `ERR_TTY_INIT_FAILED: uv_tty_init returned EINVAL (invalid argument)`
43
-
44
- The `setup` command uses `@clack/prompts` for interactive prompts, which requires a real TTY. It fails in:
45
- - CI/CD pipelines
46
- - Docker containers without `-it`
47
- - Non-interactive SSH sessions
48
- - Most AI agent execution environments
49
-
50
- **Workaround:** Use `install --platform <platform>` instead.
51
-
52
- ---
53
-
54
- ## Platform Comparison
55
-
56
- | Platform | Target Dir | Interactive? | Best For |
57
- |----------|------------|--------------|----------|
58
- | `pi` | `.pi/agent/skills/` | ❌ No | **Pi Coding Agent** (this project) |
59
- | `github` | `.github/skills/` | ❌ No | GitHub Copilot, VS Code |
60
- | `cursor` | `.cursor/skills/` | ❌ No | Cursor IDE |
61
- | `agent` | `.agent/skills/` | ❌ No | Generic `.agent` workflows |
62
- | `claude` | `.claude/skills/` | ✅ Yes | Claude Code (interactive only) |
63
-
64
- ---
65
-
66
- ## Skills Installed (17 Total)
67
-
68
- All synced from `WordPress/agent-skills` trunk:
69
-
70
- 1. `wp-abilities-api` - Abilities API registration & consumption
71
- 2. `wp-abilities-audit` - Audit plugin REST surface for Abilities
72
- 3. `wp-abilities-verify` - Verify Abilities registrations
73
- 4. `wp-block-development` - Gutenberg blocks: block.json, attributes, rendering
74
- 5. `wp-block-themes` - Block themes: theme.json, templates, patterns
75
- 6. `wp-interactivity-api` - data-wp-* directives & stores
76
- 7. `wp-performance` - Profiling, caching, DB optimization
77
- 8. `wp-phpstan` - PHPStan config for WordPress
78
- 9. `wp-playground` - WordPress Playground for instant environments
79
- 10. `wp-plugin-development` - Plugin architecture, hooks, Settings API, security
80
- 11. `wp-plugin-directory-guidelines` - WP Plugin Directory requirements
81
- 12. `wp-project-triage` - Auto-detect project type, tooling, versions
82
- 13. `wp-rest-api` - REST API routes, schema, auth, response shaping
83
- 14. `wp-wpcli-and-ops` - WP-CLI commands, automation, multisite
84
- 15. `wpds` - WordPress Design System
85
- 16. `blueprint` - Playground Blueprints for declarative setup
86
- 17. `wordpress-router` - Classifies WP repos, routes to right workflow
87
-
88
- ---
89
-
90
- ## Verification Commands
91
-
92
- After installation, verify everything works:
93
-
94
- ```bash
95
- # 1. Check skills installed
96
- ls -la .pi/agent/skills/
97
-
98
- # 2. Run project triage (detects WP project type)
99
- node .pi/agent/skills/wp-project-triage/scripts/detect_wp_project.mjs
100
-
101
- # 3. Run design-system tests (if applicable)
102
- cd design-system && pnpm test && pnpm run typecheck
103
-
104
- # 4. PHP syntax check
105
- find wpaos wpaos-blocks -name '*.php' -exec php -l {} \;
106
- ```
107
-
108
- ---
109
-
110
- ## Key Files & Locations
111
-
112
- ```
113
- wordpress-agent-kit/
114
- ├── package.json # Package definition (name: wordpress-agent-kit)
115
- ├── src/
116
- │ ├── cli.ts # Main CLI entry
117
- │ ├── commands/
118
- │ │ ├── install.ts # Non-interactive install (USE THIS)
119
- │ │ ├── setup.ts # Interactive setup (NEEDS TTY)
120
- │ │ ├── sync-skills.ts # Pulls from WordPress/agent-skills
121
- │ │ └── playground.ts # Local WP Playground
122
- │ └── utils/
123
- │ └── platforms.ts # Platform definitions (pi, github, cursor, agent, claude)
124
- ├── dist/bundles/ # Pre-built tarballs (legacy method)
125
- └── vendor/wp-agent-skills/ # Synced upstream skills (gitignored)
126
- ```
127
-
128
- ---
129
-
130
- ## Syncing Latest Upstream Skills
131
-
132
- The kit bundles skills at release time. To get latest:
133
-
134
- ```bash
135
- # From kit repo (if contributing)
136
- pnpm sync:skills
137
- pnpm build:bundles
138
-
139
- # Or just reinstall (pulls latest from npm)
140
- pnpm dlx wordpress-agent-kit@latest install --platform pi --force
141
- ```
142
-
143
- ---
144
-
145
- ## Integration with This Project (wp-agent-os)
146
-
147
- ### AGENTS.md References
148
- The project's `AGENTS.md` still references `.github/skills/` but we use `.pi/agent/skills/`. The skills are the same - just different install locations.
149
-
150
- ### wp-abilities-api Verification
151
- Verified that `wpaos/includes/abilities.php` uses correct arg keys per the skill:
152
- - `label`, `description`, `category`, `input_schema`, `output_schema`
153
- - `permission_callback`, `execute_callback`, `meta`
154
- - `meta.show_in_rest: true`, `meta.mcp.public: true`
155
-
156
- ### CI/CD Usage
157
- ```yaml
158
- # GitHub Actions example
159
- - name: Install WordPress Agent Kit
160
- run: pnpm dlx wordpress-agent-kit@latest install --platform github
161
- ```
162
-
163
- ---
164
-
165
- ## Troubleshooting
166
-
167
- ### "Command not found" / 404 on npm
168
- - Package name is `wordpress-agent-kit` (NOT `wp-agent-kit`)
169
- - Published to npm as `kylebrodeur` scope would be `@kylebrodeur/wordpress-agent-kit` but it's unscoped
170
-
171
- ### Skills not showing up
172
- - Check install location matches your agent's config (`.pi/agent/skills/` for Pi)
173
- - Run with `--force` to overwrite existing
174
-
175
- ### Old placeholder skills remain
176
- - Delete old skill directories before reinstall:
177
- ```bash
178
- rm -rf .claude/skills .github/skills .cursor/skills .agent/skills
179
- pnpm dlx wordpress-agent-kit@latest install --platform pi
180
- ```
181
-
182
- ---
183
-
184
- ## Summary: Recommended Workflow for This Project
185
-
186
- ```bash
187
- # One-liner for clean install in any environment
188
- rm -rf .claude/skills .github/skills .cursor/skills .agent/skills .pi/agent/skills && \
189
- pnpm dlx wordpress-agent-kit@latest install --platform pi
190
- ```
191
-
192
- Then the skills live in `.pi/agent/skills/` and are available to Pi automatically.