Skip to content

Commit 7add64f

Browse files
authored
Add Aider plugin output (#13)
* add aider plugin output * Sync Aider generated skills with trunk
1 parent 7e2345d commit 7add64f

14 files changed

Lines changed: 1087 additions & 19 deletions

File tree

README.md

Lines changed: 30 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, and Windsurf/Cascade as separate outputs:
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:
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
@@ -13,6 +13,7 @@ This repo currently packages shared skills and setup files for Codex, Claude Cod
1313
- includes an auditing skill for performance, accessibility, and frontend quality review
1414
- can optionally generate three design preview directions before building a site theme
1515
- bundles a plugin-local telemetry MCP server so workflow events do not depend on Studio shipping telemetry support
16+
- includes an Aider config and conventions pack for terminal pair-programming
1617
- keeps skills shared so other surfaces can reuse them later
1718
- includes Continue-native setup files for WordPress.com rules, prompts, and MCP configuration
1819
- adds Roo Code workspace rules and project MCP config without introducing a Roo-specific backend service
@@ -129,6 +130,15 @@ claude --plugin-dir ./plugins/claude-code
129130
7. In Cascade MCP settings, confirm `wordpress-studio` and `wordpress-telemetry` are enabled.
130131
8. Try representative WordPress.com tasks such as site review, theme edits, block validation, or plugin planning.
131132

133+
### Test in Aider
134+
135+
1. From a git repo you want to edit with Aider, copy or symlink the contents of `./plugins/aider` into the repo root.
136+
2. Configure Aider with environment variables or a local `.env` file.
137+
3. Confirm the generated config exists at `plugins/aider/.aider.conf.yml`.
138+
4. Confirm the conventions file exists at `plugins/aider/CONVENTIONS.md`.
139+
5. Start Aider from the repo root that contains `.aider.conf.yml`.
140+
6. Try a representative WordPress.com coding task and confirm Aider loads the conventions as read-only context.
141+
132142
## Current scope
133143

134144
- Shared skills for:
@@ -150,6 +160,7 @@ claude --plugin-dir ./plugins/claude-code
150160
- Gemini packaging output in `plugins/gemini/`
151161
- GitHub Copilot packaging output in `plugins/copilot/`
152162
- Windsurf/Cascade workspace output in `plugins/windsurf/`
163+
- Aider config and conventions output in `plugins/aider/`
153164
- Bundled telemetry artifact in `dist/`
154165
- `pnpm` scripts for build and verification
155166

@@ -167,6 +178,7 @@ The build packages the shared skills into:
167178
- `plugins/gemini/skills/`
168179
- `plugins/copilot/skills/`
169180
- `plugins/windsurf/skills/`
181+
- `plugins/aider/skills/`
170182

171183
It also generates plugin-specific MCP configs for each surface:
172184

@@ -179,6 +191,8 @@ It also generates plugin-specific MCP configs for each surface:
179191
- GitHub Copilot: `plugins/copilot/.vscode/mcp.json`
180192
- Windsurf/Cascade: `plugins/windsurf/mcp_config.json`
181193

194+
Aider does not use a normal marketplace plugin or MCP package surface, so the Aider output uses `.aider.conf.yml` to read conventions and shared guidance files.
195+
182196
The telemetry server source lives in `scripts/wordpress-telemetry-mcp.mjs` and is bundled to:
183197

184198
- `dist/wordpress-telemetry-mcp.mjs`
@@ -318,3 +332,18 @@ That folder currently contains:
318332
- `README.md`
319333

320334
The generated Roo Code project MCP config launches both `studio mcp` and the bundled `wordpress-telemetry` MCP server. The `.roo/rules/` files are Roo-specific; the WordPress.com MCP and skill behavior is shared with the other outputs.
335+
336+
The Aider output is generated to:
337+
338+
```text
339+
plugins/aider/
340+
```
341+
342+
That folder currently contains:
343+
344+
- `.aider.conf.yml`
345+
- `CONVENTIONS.md`
346+
- `skills/`
347+
- `README.md`
348+
349+
The generated Aider config loads `CONVENTIONS.md` and the shared WordPress.com guidance files as read-only context.

plugins/aider/.aider.conf.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# WordPress.com guidance for Aider.
2+
# See https://aider.chat/docs/config.html and https://aider.chat/docs/usage/conventions.html.
3+
read:
4+
- CONVENTIONS.md
5+
- skills/auditing/SKILL.md
6+
- skills/block-creator/SKILL.md
7+
- skills/design-previews-creator/SKILL.md
8+
- skills/plugin-creator/SKILL.md
9+
- skills/site-creator/SKILL.md
10+
- skills/studio/SKILL.md
11+
- skills/theme-creator/SKILL.md
12+
- skills/wordpress-creator/SKILL.md

plugins/aider/CONVENTIONS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# WordPress.com Aider Conventions
2+
3+
Use these conventions when pair-programming with Aider on WordPress.com projects.
4+
5+
## Aider workflow
6+
7+
- Treat this file and the shared skill files as read-only guidance.
8+
- Add only the files needed for the current change to the editable chat.
9+
- Prefer small, reviewable diffs and run the relevant lint, build, or test command before finishing.
10+
- Keep model names, API keys, and provider credentials in Aider-supported environment variables or a local `.env` file.
11+
- Use Aider's git-aware workflow for code edits; review the diff before committing.
12+
13+
## WordPress.com implementation guidance
14+
15+
- Choose the smallest WordPress abstraction that solves the request cleanly.
16+
- Use themes for presentation, blocks for reusable editor-insertable content, and plugins for reusable behavior that should survive theme changes.
17+
- Validate serialized block markup after editing generated block content.
18+
- Sanitize input, escape output, check capabilities, and use nonces for admin actions.
19+
- Keep generated code understandable, maintainable, and consistent with the existing project.
20+
21+
## Shared guidance files
22+
23+
The shared WordPress.com agent guidance is loaded from:
24+
25+
- `skills/auditing/SKILL.md`
26+
- `skills/block-creator/SKILL.md`
27+
- `skills/design-previews-creator/SKILL.md`
28+
- `skills/plugin-creator/SKILL.md`
29+
- `skills/site-creator/SKILL.md`
30+
- `skills/studio/SKILL.md`
31+
- `skills/theme-creator/SKILL.md`
32+
- `skills/wordpress-creator/SKILL.md`

plugins/aider/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# WordPress.com Aider Configuration
2+
3+
This Aider output packages WordPress.com coding guidance for terminal pair-programming with Aider.
4+
5+
Aider does not use a marketplace plugin manifest or MCP config in normal usage. This output is intentionally a small config and documentation pack:
6+
7+
- `.aider.conf.yml` loads the instruction files as read-only context
8+
- `CONVENTIONS.md` provides Aider-specific setup and editing conventions
9+
- `skills/` contains the shared WordPress.com agent guidance also used by other outputs
10+
11+
## Setup
12+
13+
1. Copy or symlink the contents of this directory into the root of the repository you want to edit.
14+
2. Configure your model and API keys with Aider-supported environment variables or a local `.env` file.
15+
3. Start Aider from the repository root that contains `.aider.conf.yml`:
16+
17+
```bash
18+
aider
19+
```
20+
21+
Aider will read the configured guidance files without making them editable in the chat.
22+
23+
## Aider-specific guidance
24+
25+
- Use `.aider.conf.yml` and `CONVENTIONS.md` for Aider configuration and conventions.
26+
- Use Aider's normal `/read`, `/add`, lint, test, and git workflows for active pair-programming.
27+
- Keep API keys in environment variables or a local `.env` file; do not commit secrets.
28+
29+
## Shared WordPress.com guidance
30+
31+
The shared guidance describes WordPress.com implementation routing, Studio-backed local workflows, site creation, theme work, block creation, plugin creation, design previews, and auditing.
32+
33+
These files are loaded as read-only context:
34+
35+
- `skills/auditing/SKILL.md`
36+
- `skills/block-creator/SKILL.md`
37+
- `skills/design-previews-creator/SKILL.md`
38+
- `skills/plugin-creator/SKILL.md`
39+
- `skills/site-creator/SKILL.md`
40+
- `skills/studio/SKILL.md`
41+
- `skills/theme-creator/SKILL.md`
42+
- `skills/wordpress-creator/SKILL.md`
43+
44+
## MCP and agent substrate
45+
46+
WordPress.com agent workflows share Studio MCP and telemetry guidance across Codex and Claude Code outputs. Aider complements that substrate as a terminal pair-programming tool, but this output does not pretend Aider has a native marketplace plugin or MCP package surface.
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
name: auditing
3+
description: Audit a Studio-backed WordPress site for performance, accessibility, and visible frontend quality issues, then recommend or validate improvements.
4+
---
5+
6+
# Auditing
7+
8+
Use this skill when the user wants to review, optimize, or verify an existing WordPress site rather than primarily build new functionality.
9+
10+
## Ownership
11+
12+
This skill owns:
13+
14+
- performance audits using Studio MCP tools
15+
- accessibility-focused review of color, contrast, motion, and readability
16+
- visible frontend quality review when the user asks for QA or polish
17+
- before-and-after audit comparison after fixes
18+
19+
Use `studio` for site resolution, screenshots, and MCP tool usage details.
20+
21+
## Principle
22+
23+
Start with the smallest audit that answers the user's request.
24+
25+
- If the user asks about speed, Core Web Vitals, or performance, prioritize the performance workflow.
26+
- If the user asks about accessibility, contrast, readability, or color usage, prioritize the accessibility workflow.
27+
- If the user asks for a general review, combine the relevant sections and keep the report practical.
28+
29+
Do not invent automated checks that the available tools do not provide. When a conclusion comes from visual inspection or code reading rather than a dedicated tool, say so.
30+
31+
## Workflow
32+
33+
### 1. Resolve the target site
34+
35+
Use `studio` to:
36+
37+
- identify the site
38+
- ensure it is running
39+
- confirm the page or URL path to review
40+
41+
If the user did not specify a page, default to `/`.
42+
43+
### 2. Pick the audit scope
44+
45+
Choose one or more of:
46+
47+
- Performance Audit
48+
- Accessibility Review
49+
- Visual QA
50+
51+
Tell the user which scope you are using when it is not obvious from the request.
52+
53+
Once you begin the actual audit workflow, call `record_workflow_event` with `workflow: "auditing"` and `stage: "started"`.
54+
55+
### 3. Performance Audit
56+
57+
Use `need_for_speed` for the requested path.
58+
59+
Interpret at least:
60+
61+
- TTFB
62+
- FCP
63+
- LCP
64+
- CLS
65+
- total page weight
66+
- request count
67+
- DOM size
68+
- JS, CSS, image, and font breakdown
69+
70+
Use these baseline thresholds:
71+
72+
| Metric | Good | Needs Improvement | Poor |
73+
|-------|------|-------------------|------|
74+
| TTFB | < 800 ms | 800-1800 ms | > 1800 ms |
75+
| FCP | < 1800 ms | 1800-3000 ms | > 3000 ms |
76+
| LCP | < 2500 ms | 2500-4000 ms | > 4000 ms |
77+
| CLS | < 0.1 | 0.1-0.25 | > 0.25 |
78+
79+
Use these page-composition warning signs:
80+
81+
- DOM elements above 1500
82+
- total page weight above 3 MB
83+
- total requests above 80
84+
- scripts above 20 files or 500 KB total
85+
- stylesheets above 10 files or 200 KB total
86+
87+
Translate findings into WordPress-specific actions where possible, such as:
88+
89+
- reducing or replacing heavy plugins
90+
- deferring or removing non-critical JS
91+
- reducing oversized images
92+
- trimming unused theme CSS
93+
- checking duplicate font loads
94+
- simplifying wrapper-heavy block layouts
95+
96+
### 4. Accessibility Review
97+
98+
Use `take_screenshot` plus theme or plugin code inspection as needed.
99+
100+
Focus on issues this repo can realistically help with:
101+
102+
- low text/background contrast
103+
- weak CTA contrast or ambiguous button states
104+
- missing or unclear hover and focus states
105+
- motion that should respect `prefers-reduced-motion`
106+
- readability issues caused by font size, line height, or dense layouts
107+
- color choices that make important information hard to distinguish
108+
109+
When the issue is visual, prefer `take_screenshot`-backed observations. Use `inspect_design` when the rendered DOM or computed styles would identify the root cause faster than code inspection.
110+
111+
When the issue appears structural, inspect the relevant theme or plugin files before recommending a fix.
112+
113+
### 5. Visual QA
114+
115+
When the user wants a broader quality pass, use `take_screenshot` to check:
116+
117+
- spacing and alignment
118+
- responsive layout issues
119+
- broken visual hierarchy
120+
- inconsistent component styling
121+
- awkward cropping or media balance
122+
123+
Keep this section focused on visible problems that materially affect the site.
124+
125+
### 6. Report clearly
126+
127+
Summarize:
128+
129+
- what you audited
130+
- the most important findings
131+
- the likely causes
132+
- the highest-value next fixes
133+
134+
Prefer a short prioritized report over a long exhaustive list.
135+
136+
### 7. Re-test after changes
137+
138+
If fixes are made during the same task, re-run the relevant audit steps and compare before versus after.
139+
140+
Call out what improved, what did not, and any remaining tradeoffs.
141+
142+
When the audit workflow is complete, call `record_workflow_event` with `workflow: "auditing"` and `stage: "completed"`.
143+
144+
## Important notes
145+
146+
- `need_for_speed` results are synthetic measurements from a local Studio environment. Use them primarily for diagnosis and before-versus-after comparison, not as production truth.
147+
- Accessibility observations in this workflow are often based on visual review and code inspection rather than a dedicated automated accessibility scanner.
148+
- When performance, accessibility, and design issues conflict, explain the tradeoff instead of over-optimizing one dimension silently.

0 commit comments

Comments
 (0)