Skip to content

Commit ae5d33f

Browse files
authored
Add Factory Droid output (#41)
1 parent 7add64f commit ae5d33f

20 files changed

Lines changed: 24588 additions & 2 deletions

File tree

README.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Shared source for WordPress-focused agent skills and plugin packaging.
44

5-
This repo currently packages shared skills and setup files for Codex, Claude Code, Cursor, Continue, GitHub Copilot, Gemini, Roo Code, Windsurf/Cascade, and Aider as separate outputs:
5+
This repo currently packages shared skills and setup files for Codex, Claude Code, Cursor, Continue, Factory Droid, GitHub Copilot, Gemini, Roo Code, Windsurf/Cascade, and Aider as separate outputs:
66

77
- prefers the WordPress Studio MCP server for site management, screenshots, and block validation
88
- falls back to the Studio CLI through a shared Studio skill when MCP is unavailable
@@ -18,6 +18,7 @@ This repo currently packages shared skills and setup files for Codex, Claude Cod
1818
- includes Continue-native setup files for WordPress.com rules, prompts, and MCP configuration
1919
- adds Roo Code workspace rules and project MCP config without introducing a Roo-specific backend service
2020
- adds Windsurf/Cascade workspace rules and MCP config without introducing a Windsurf-specific backend service
21+
- includes a Factory Droid marketplace output with a native Droid plugin, command, custom Droid, hook, and MCP configuration
2122

2223
## Testing
2324

@@ -139,6 +140,26 @@ claude --plugin-dir ./plugins/claude-code
139140
5. Start Aider from the repo root that contains `.aider.conf.yml`.
140141
6. Try a representative WordPress.com coding task and confirm Aider loads the conventions as read-only context.
141142

143+
### Test in Factory Droid
144+
145+
1. Review the generated Factory marketplace output in `./plugins/factory`.
146+
2. Confirm the generated setup files exist:
147+
- `plugins/factory/.factory-plugin/marketplace.json`
148+
- `plugins/factory/plugins/wordpress-studio/.factory-plugin/plugin.json`
149+
- `plugins/factory/plugins/wordpress-studio/mcp.json`
150+
- `plugins/factory/plugins/wordpress-studio/commands/wordpress.md`
151+
- `plugins/factory/plugins/wordpress-studio/droids/wordpress-builder.md`
152+
- `plugins/factory/plugins/wordpress-studio/hooks/hooks.json`
153+
- `plugins/factory/plugins/wordpress-studio/skills/`
154+
3. Install from the local marketplace with Factory Droid:
155+
156+
```bash
157+
droid plugin marketplace add ./plugins/factory
158+
droid plugin install wordpress-studio@wordpress-studio --scope project
159+
```
160+
161+
4. In Droid, confirm the `wordpress-studio` and `wordpress-telemetry` MCP servers are available, then try representative WordPress.com tasks.
162+
142163
## Current scope
143164

144165
- Shared skills for:
@@ -156,6 +177,7 @@ claude --plugin-dir ./plugins/claude-code
156177
- Claude Code packaging output in `plugins/claude-code/`
157178
- Cursor packaging output in `plugins/cursor/`
158179
- Continue setup output in `plugins/continue/`
180+
- Factory Droid marketplace output in `plugins/factory/`
159181
- Roo Code workspace output in `plugins/roo-code/`
160182
- Gemini packaging output in `plugins/gemini/`
161183
- GitHub Copilot packaging output in `plugins/copilot/`
@@ -175,6 +197,7 @@ The build packages the shared skills into:
175197
- `plugins/claude-code/skills/`
176198
- `plugins/cursor/skills/`
177199
- `plugins/roo-code/skills/`
200+
- `plugins/factory/plugins/wordpress-studio/skills/`
178201
- `plugins/gemini/skills/`
179202
- `plugins/copilot/skills/`
180203
- `plugins/windsurf/skills/`
@@ -186,6 +209,7 @@ It also generates plugin-specific MCP configs for each surface:
186209
- Claude Code: `plugins/claude-code/.mcp.json`
187210
- Cursor: `plugins/cursor/mcp.json`
188211
- Continue: `plugins/continue/.continue/mcpServers/wordpress-com.yaml`
212+
- Factory Droid: `plugins/factory/plugins/wordpress-studio/mcp.json`
189213
- Roo Code: `plugins/roo-code/.roo/mcp.json`
190214
- Gemini: `plugins/gemini/.gemini/settings.json`
191215
- GitHub Copilot: `plugins/copilot/.vscode/mcp.json`
@@ -297,6 +321,35 @@ That folder currently contains:
297321

298322
The generated Continue MCP guidance uses the same existing `studio mcp` entrypoint as the shared WordPress.com MCP substrate. Continue-specific files cover rules, prompts, and MCP block placement; they do not define a separate backend service.
299323

324+
The Factory Droid marketplace output is generated to:
325+
326+
```text
327+
plugins/factory/
328+
```
329+
330+
That folder currently contains:
331+
332+
- `.factory-plugin/marketplace.json`
333+
- `plugins/wordpress-studio/.factory-plugin/plugin.json`
334+
- `plugins/wordpress-studio/mcp.json`
335+
- `plugins/wordpress-studio/scripts/wordpress-telemetry-mcp.mjs`
336+
- `plugins/wordpress-studio/commands/wordpress.md`
337+
- `plugins/wordpress-studio/droids/wordpress-builder.md`
338+
- `plugins/wordpress-studio/hooks/hooks.json`
339+
- `plugins/wordpress-studio/hooks/session-context.sh`
340+
- `plugins/wordpress-studio/skills/`
341+
- `plugins/wordpress-studio/README.md`
342+
343+
The generated Factory Droid MCP config launches both `studio mcp` and the bundled `wordpress-telemetry` MCP server. The Factory output follows the official Factory plugin, skills, custom slash command, custom Droid, MCP, hooks, and marketplace docs:
344+
345+
- https://docs.factory.ai/cli/configuration/plugins
346+
- https://docs.factory.ai/guides/building/building-plugins
347+
- https://docs.factory.ai/cli/configuration/skills
348+
- https://docs.factory.ai/cli/configuration/custom-slash-commands
349+
- https://docs.factory.ai/cli/configuration/custom-droids
350+
- https://docs.factory.ai/cli/configuration/mcp
351+
- https://docs.factory.ai/reference/hooks-reference
352+
300353
The generated Copilot MCP config launches both `studio mcp` and the bundled `wordpress-telemetry` MCP server through VS Code's MCP configuration.
301354

302355
The Gemini plugin is generated to:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "wordpress-studio",
3+
"description": "WordPress Studio plugins for Factory Droid.",
4+
"owner": {
5+
"name": "Automattic"
6+
},
7+
"plugins": [
8+
{
9+
"name": "wordpress-studio",
10+
"description": "Craft production-grade WordPress sites and applications with Droid, WordPress Studio MCP, shared skills, commands, hooks, and custom droids.",
11+
"source": "./plugins/wordpress-studio",
12+
"category": "Coding"
13+
}
14+
]
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "wordpress-studio",
3+
"version": "0.3.0",
4+
"description": "Craft production-grade WordPress sites and applications with Droid, WordPress Studio MCP, shared skills, commands, hooks, and custom droids.",
5+
"author": {
6+
"name": "Automattic"
7+
},
8+
"homepage": "https://developer.wordpress.com/",
9+
"repository": "https://github.com/Automattic/build-with-wordpress",
10+
"license": "GPL-2.0-or-later"
11+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# WordPress Studio for Factory Droid
2+
3+
This Factory output packages the shared Build with WordPress skills as a native Droid plugin.
4+
5+
## Factory-native pieces
6+
7+
- `.factory-plugin/plugin.json` is the Factory plugin manifest.
8+
- `skills/` contains the shared WordPress skills. Droid can invoke these automatically, and users can invoke them as slash commands.
9+
- `commands/wordpress.md` adds a user-invoked `/wordpress` workflow shortcut.
10+
- `droids/wordpress-builder.md` adds a custom Droid subagent for focused WordPress.com work.
11+
- `mcp.json` configures the shared `wordpress-studio` MCP server and bundled `wordpress-telemetry` MCP server.
12+
- `hooks/hooks.json` adds lightweight session-start context using `${DROID_PLUGIN_ROOT}`.
13+
14+
## Marketplace layout
15+
16+
The parent `plugins/factory/` directory is a local Factory marketplace:
17+
18+
- `.factory-plugin/marketplace.json` lists the `wordpress-studio` plugin.
19+
- `plugins/wordpress-studio/` contains this plugin.
20+
21+
## Local install
22+
23+
From this repository root after running `pnpm build`:
24+
25+
```bash
26+
droid plugin marketplace add ./plugins/factory
27+
droid plugin install wordpress-studio@wordpress-studio --scope project
28+
```
29+
30+
Factory's plugin documentation also supports adding marketplaces from GitHub repositories. If this output is published from a dedicated marketplace repository, add that repository URL with `droid plugin marketplace add <url>` and install `wordpress-studio@wordpress-studio`.
31+
32+
## MCP servers
33+
34+
`mcp.json` launches:
35+
36+
- `wordpress-studio`: runs `studio mcp` for WordPress site management, screenshots, block validation, performance tooling, and WP-CLI access.
37+
- `wordpress-telemetry`: runs the bundled telemetry MCP server generated by this package.
38+
39+
No secrets are stored in the project MCP config.
40+
41+
## Included skills
42+
43+
- `auditing`
44+
- `block-creator`
45+
- `design-previews-creator`
46+
- `plugin-creator`
47+
- `site-creator`
48+
- `studio`
49+
- `theme-creator`
50+
- `wordpress-creator`
51+
52+
## Factory documentation used
53+
54+
- Plugins: https://docs.factory.ai/cli/configuration/plugins
55+
- Building plugins: https://docs.factory.ai/guides/building/building-plugins
56+
- Skills: https://docs.factory.ai/cli/configuration/skills
57+
- Custom slash commands: https://docs.factory.ai/cli/configuration/custom-slash-commands
58+
- Custom Droids: https://docs.factory.ai/cli/configuration/custom-droids
59+
- MCP: https://docs.factory.ai/cli/configuration/mcp
60+
- Hooks reference: https://docs.factory.ai/reference/hooks-reference
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
description: Route a WordPress.com task through the shared WordPress Creator skill.
3+
argument-hint: <wordpress task>
4+
---
5+
6+
# Build with WordPress.com
7+
8+
Handle this WordPress.com request using the shared WordPress Creator workflow:
9+
10+
$ARGUMENTS
11+
12+
Load the `wordpress-creator` skill first, choose the smallest suitable WordPress abstraction, and use the `wordpress-studio` MCP server for site operations and verification when available.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: wordpress-builder
3+
description: Builds, customizes, audits, and troubleshoots WordPress.com sites using WordPress Studio MCP and the shared Build with WordPress skills.
4+
model: inherit
5+
tools: ["Read", "LS", "Grep", "Glob", "Create", "Edit", "ApplyPatch", "Execute"]
6+
mcpServers: ["wordpress-studio", "wordpress-telemetry"]
7+
---
8+
9+
You are a WordPress.com specialist Droid.
10+
11+
Use WordPress.com as the user-facing product name. For build, theme, block, plugin, site-creation, or audit requests, load `skills/wordpress-creator/SKILL.md` first and follow its routing to the smallest suitable implementation path.
12+
13+
Prefer the `wordpress-studio` MCP server for site discovery, local site control, screenshots, block validation, `wp_cli`, and WordPress.com or Jetpack-connected workflows. Use the `wordpress-telemetry` MCP server for workflow telemetry when available.
14+
15+
Verify changes with relevant Studio MCP tools, project tests, block validation, screenshots, or WP-CLI evidence before reporting completion.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"description": "Adds WordPress Studio plugin context at Droid session start.",
3+
"hooks": {
4+
"SessionStart": [
5+
{
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "sh ${DROID_PLUGIN_ROOT}/hooks/session-context.sh",
10+
"timeout": 10
11+
}
12+
]
13+
}
14+
]
15+
}
16+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
set -eu
3+
4+
printf '%s
5+
' 'WordPress Studio Droid plugin is active. Load skills/wordpress-creator/SKILL.md for WordPress.com build, theme, block, plugin, site creation, or audit tasks. Prefer the wordpress-studio MCP server for site operations and verification when available.'

plugins/factory/plugins/wordpress-studio/mcp.json

Lines changed: 18 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)