Imported from wprig/wprig (
AGENTS.md). Install upstream withnpx skills add wprig/wprig. Copyright stays with the author.
WP Rig AI Agents Guide
Welcome, AI Agent! WP Rig is a modern, highly opinionated theme development framework. To ensure a seamless experience, you MUST follow these 5 core pillars.
1. ONBOARDING & STATE PROTOCOL
Before starting, check .ai/agent-state.md for your status:
- If Pending: Follow The Onboarding Guide (run
npm run ai:setuponce, read Developer Directions, read/initialize Project Rules, and mark state as Completed). - If Completed: Read Project Rules for any dynamic, self-learned theme conventions, and keep it updated with new architectural decisions. Proceed directly to the user's task. Do NOT re-run setup.
2. ARCHITECTURE & BUILD PIPELINE
- Source Files Only: NEVER edit compiled artifacts (
.min.css,.min.js, etc.). Edit only source files undersrc/directories. See Architecture Skill. - Scaffolding Tooling: Use existing scripts (like
npm run create-rig-componentor block commands) rather than manually bootstrapping files. See Component Registry.
3. CONTRACT-FIRST DEVELOPMENT
- Do not modify source files without an approved plan. You must author a
SPEC.mdin.ai/plans/and ask clarifying questions first to reach a >95% confidence score. See Feature Planning Skill.
4. CONFIGURATION & CONTENT FIRST
- Configuration First: Reference
config/config.jsonbefore making build or architectural changes.
5. PRE-FLIGHT QUALITY CHECK
- Run
npm run ai:checkbefore submitting to ensure compliance with PHPCS, PHPStan, ESLint, and Stylelint. See Code Quality skill.
AI Agent Skill Directory
Refer to .ai/SKILLS.md for a comprehensive directory of specialized skills, including:
- Foundational Pillars: Architecture, Feature Planning, Code Quality.
- Design & UI: Styles, Typography, Gutenberg Blocks, Hero Canvas.
- Logic & Backend: Advanced Templating, WP-CLI, PHP Filters.
- Quality & Workflow: Testing (PHPUnit/E2E), Modern Dev Workflow.
Capabilities & Tooling
- WP Rig Docs (MCP): Run
npm run mcpto access the Model Context Protocol server. - Verification: Run
npm run ai:checkfor comprehensive linting and end-to-end regression validation.
