--- description: WordPress site or plugin development pipeline with modern patterns mode: wordpress model: ollama-cloud/qwen3-coder:480b variant: thinking color: "#21759B" permission: read: allow edit: allow write: allow bash: allow glob: allow grep: allow task: "*": deny "php-developer": allow "system-analyst": allow "lead-developer": allow "sdet-engineer": allow "code-skeptic": allow "the-fixer": allow "frontend-developer": allow "devops-engineer": allow "release-manager": allow "security-auditor": allow "orchestrator": allow --- # WordPress Development Pipeline Create a WordPress site, theme, or plugin following modern PHP patterns with namespacing, strict types, and modular architecture. ## Parameters - `project_name`: Plugin or theme name (required) - `type`: 'plugin', 'theme', 'site' (default: 'plugin') - `wp_version`: WordPress version (default: '6.5') - `docker`: Create Docker deployment (default: true) - `issue`: Gitea issue number for tracking (required) ## Overview ``` Requirements → Architecture → Setup → Custom Types → REST API → Frontend → Tests → Docker ``` ## Atomic Task Decomposition Each step is exactly ONE atomic task per agent invocation. ### Step 1: Requirements (1 task) **Agent**: `@requirement-refiner` - Create issue in TARGET PROJECT (not APAW) - Define user stories and acceptance criteria ### Step 2: Architecture (1 task) **Agent**: `@system-analyst` - Define data model - Design REST API endpoints - Plan custom post types and taxonomies ### Step 3: Plugin/Theme Setup (1 task) **Agent**: `@php-developer` For plugin: ``` {project_name}/ ├── {project_name}.php # Main plugin file ├── composer.json ├── includes/ │ ├── Admin/ │ ├── Frontend/ │ ├── REST/ │ ├── PostTypes/ │ ├── Taxonomies/ │ └── Utils/ ├── assets/ └── languages/ ``` ### Step 4: Custom Post Types (1 task per CPT) **Agent**: `@php-developer` (ONE invocation per CPT) - Register custom post type with labels and supports - Register custom meta fields with `show_in_rest` - Create CPT factory for testing ### Step 5: REST API Controllers (1 task per resource) **Agent**: `@php-developer` (ONE invocation per controller) - Extend `WP_REST_Controller` - Implement CRUD operations - Add permission callbacks - Input sanitization and validation ### Step 6: Frontend (1 task per component) **Agent**: `@frontend-developer` - Gutenberg blocks or Vue.js components - Admin pages with React/Vue - Frontend templates ### Step 7: Tests (1 task per test file) **Agent**: `@sdet-engineer` - PHPUnit tests for services - WP_REST_Server integration tests - E2E tests for critical flows ### Step 8: Review → Security → Docker → Release Same pattern as Laravel pipeline. ## Quality Gates | Gate | Criteria | |------|----------| | Setup | Plugin activates without errors | | CPTs | `show_in_rest` works, API returns data | | API | All endpoints return correct responses | | Auth | Permission checks work | | Security | Nonce verification, input sanitization | | Tests | PHPUnit passes | | Docker | Containers build and run |