Overview
Nectar is an AI-powered development companion for Pollora. Built on top of Laravel Boost, it provides AI guidelines, agent skills, and a dedicated MCP server that gives AI agents deep context about your Pollora application.
Table of Contents
Section titled “Table of Contents”- Overview
- Installation
- MCP Server
- Available MCP Tools
- AI Guidelines
- Agent Skills
- Upgrade Assistance
- Configuration
- Architecture
Overview
Section titled “Overview”When working with AI coding assistants (Claude Code, Cursor, Windsurf, etc.), the quality of generated code depends heavily on the context available. Nectar bridges this gap by:
- Injecting Pollora-specific guidelines into your AI agent’s context via Laravel Boost
- Providing 8 on-demand skills for domain-specific tasks (post types, themes, hooks, etc.)
- Exposing 10 MCP tools for live introspection of your WordPress and Pollora environment
- Offering upgrade prompts that guide AI agents step-by-step through Pollora major version upgrades
Nectar is a development-only package — it only loads in local and development environments.
Installation
Section titled “Installation”composer require pollora/nectar --devRun Boost to install guidelines and skills:
php artisan boost:installSelect pollora/nectar when prompted, or add it to your boost.json:
{ "packages": ["pollora/nectar"]}Then update:
php artisan boost:updateMCP Server
Section titled “MCP Server”Nectar registers a pollora-nectar MCP server that gives AI agents live access to your WordPress and Pollora environment.
Starting the Server
Section titled “Starting the Server”php artisan nectar:mcpRegistering in Your Project
Section titled “Registering in Your Project”Add it to your .mcp.json for automatic discovery:
{ "mcpServers": { "pollora-nectar": { "command": "php", "args": ["artisan", "nectar:mcp"] } }}For DDEV projects, use the DDEV wrapper:
{ "mcpServers": { "pollora-nectar": { "command": "ddev", "args": ["exec", "php", "artisan", "nectar:mcp"] } }}Available MCP Tools
Section titled “Available MCP Tools”pollora_status
Section titled “pollora_status”Returns the overall framework status: PHP, Laravel, Pollora, and WordPress versions, active theme, discovery cache status, and all installed Pollora packages.
wordpress_info
Section titled “wordpress_info”Returns WordPress information: version, site URL, active/inactive plugins with versions, active theme, parent theme, multisite status, key constants (WP_DEBUG, MULTISITE, etc.), locale, and permalink structure.
post_types_info
Section titled “post_types_info”Lists registered WordPress post types with their full configuration.
| Parameter | Type | Description |
|---|---|---|
filter | string | Filter by post type slug (e.g., "book") |
include_builtin | boolean | Include built-in types (post, page, etc.). Default: false |
Returns: label, singular name, public/queryable status, REST support, archive, supports, taxonomies, rewrite rules, menu icon, and capability type.
taxonomies_info
Section titled “taxonomies_info”Lists registered WordPress taxonomies with their configuration.
| Parameter | Type | Description |
|---|---|---|
filter | string | Filter by taxonomy slug |
include_builtin | boolean | Include built-in taxonomies (category, post_tag). Default: false |
Returns: label, singular name, associated post types, public/hierarchical status, REST support, and rewrite rules.
registered_hooks
Section titled “registered_hooks”Lists hooks discovered via #[Action] and #[Filter] attributes through the Pollora discovery system.
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by "action" or "filter". Omit for both |
Returns: class name, method, hook name, and priority for each discovered hook.
active_theme_info
Section titled “active_theme_info”Returns details about the active Pollora theme: directory structure, service providers, config files, registered Gutenberg blocks, Blade templates, Vite/Tailwind/theme.json status, and the computed theme namespace.
discovered_components
Section titled “discovered_components”Lists all auto-discovered Pollora components from the discovery system, grouped by type.
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by "post_type", "taxonomy", "hook", "schedule", or "rest_route". Omit for all |
Returns a summary with counts and detailed component information including attribute arguments.
wordpress_routes
Section titled “wordpress_routes”Lists all registered routes including Route::wp() WordPress condition routes.
Returns: URI, HTTP methods, route name, middleware, WordPress condition and parameters (for Route::wp() routes), and a summary with total/WordPress/Laravel route counts.
modules_info
Section titled “modules_info”Lists installed Laravel Modules (nwidart) with their name, path, and enabled status. Reports if the module system is not installed.
wp_option
Section titled “wp_option”Reads a WordPress option value by key (read-only).
| Parameter | Type | Description |
|---|---|---|
key | string | Required. The option key (e.g., "blogname", "permalink_structure") |
Returns the option value and whether it exists.
AI Guidelines
Section titled “AI Guidelines”Guidelines are injected automatically into your AI agent’s context when Boost runs. They cover:
- Pollora architecture — Laravel-first routing, Blade templates, DDD structure, auto-discovery
- PHP 8 attributes —
#[PostType],#[Taxonomy],#[Action],#[Filter],#[Schedule],#[WpRestRoute] - WordPress routing —
Route::wp()with template conditions and hierarchy fallback - Blade templating — Sage Directives (
@posts,@title,@content, etc.) - Theme development — Convention-based structure, Vite, Tailwind CSS, Asset facade
- Available Artisan commands — All Pollora-specific commands
Version-specific guidelines (e.g., Pollora 13.x with Laravel 13 and WordPress 6.9) are loaded automatically based on your installed framework version.
Agent Skills
Section titled “Agent Skills”Skills are activated on-demand when working on specific tasks:
| Skill | When It Activates |
|---|---|
pollora-post-types | Creating custom post types with #[PostType] attributes |
pollora-taxonomies | Creating custom taxonomies with #[Taxonomy] attributes |
pollora-theming | Theme development (Blade, Vite, Tailwind, assets, theme.json) |
pollora-hooks | Registering WordPress actions and filters with attributes |
pollora-blocks | Gutenberg block development with JSX/TSX and Tailwind |
pollora-rest-api | REST API endpoints with #[WpRestRoute] |
pollora-scheduling | Scheduled tasks with #[Schedule] and WordPress cron |
pollora-modules | Laravel Modules (nwidart) with auto-discovery integration |
Each skill provides detailed instructions, code examples, and best practices specific to its domain.
Upgrade Assistance
Section titled “Upgrade Assistance”Nectar includes MCP upgrade prompts that guide AI agents through Pollora major version upgrades. Prompts are automatically registered when the current project version matches — no manual activation needed.
Available Upgrade Prompts
Section titled “Available Upgrade Prompts”| Prompt | Available When | What It Covers |
|---|---|---|
upgrade-pollora-v13 | Pollora 12.x detected | Full migration guide from Pollora 12 to 13 |
Pollora 12→13 Upgrade Coverage
Section titled “Pollora 12→13 Upgrade Coverage”The upgrade-pollora-v13 prompt covers all breaking changes and migration steps:
- Loop facade removal (v13.2) — migration to Sage Directives (
@title,@content,@excerpt) - Config-based registration removal (v13.4) — migration from
config/post-types.phpandconfig/taxonomies.phpto#[PostType]and#[Taxonomy]attribute classes @themeBlade directive removal (v13.4) — conflicts with Tailwind CSS v4@themeat-rule- Route model namespace change (v13.4) — from
Domain\ModelstoInfrastructure\Models - CSRF middleware rename (Laravel 13) —
ValidateCsrfTokentoPreventRequestForgerywith WordPress-specific route exclusions - Theme Vite configuration —
@roots/vite-pluginwithwordpressThemeJsonfor font and theme.json resolution - WordPress 7.0 update
- Post-upgrade cleanup — cache clearing, discovery rebuild,
wp transient delete --all
The prompt follows a systematic 6-step process: assess → create safety net → analyze codebase → apply changes → update dependencies → clean up and verify.
Version-Specific Guidelines
Section titled “Version-Specific Guidelines”Nectar provides version-specific guidelines that are loaded automatically based on the installed Pollora version:
12/core.blade.php— Documents features available in v12 (Loop facade,@themedirective, config-based registration) with deprecation notes13/core.blade.php— Documents v13 features (discovery enhancements, template hierarchy, theme API routes, WordPress events)
Configuration
Section titled “Configuration”Publish the configuration file:
php artisan vendor:publish --tag=nectar-configreturn [ // Enable/disable Nectar entirely 'enabled' => env('NECTAR_ENABLED', true),
'mcp' => [ 'tools' => [ // Tool class names to exclude from the MCP server 'exclude' => [], // Additional tool class names to include 'include' => [], ], ],];Disable Nectar via environment variable:
NECTAR_ENABLED=falseArchitecture
Section titled “Architecture”Nectar extends Laravel Boost with three layers:
┌────────────────────────────────────────────────────┐│ Laravel Boost ││ (AI context framework) │└───────────┬──────────────┬──────────────┬──────────┘ │ │ │┌───────────▼──┐ ┌────────▼───────┐ ┌──▼──────────┐│ Guidelines │ │ Skills │ │ MCP Server ││ (Blade) │ │ (Markdown) │ │ (Tools + │├──────────────┤ ├────────────────┤ │ Prompts) ││ core.blade │ │ pollora-hooks │ ├─────────────┤│ 12/core.blade│ │ pollora-blocks │ │ 10 tools ││ 13/core.blade│ │ pollora-theme │ │ 1 upgrade ││ │ │ ...6 more │ │ prompt │└──────────────┘ └────────────────┘ └─────────────┘Key Design Decisions
Section titled “Key Design Decisions”- Read-only tools: All MCP tools are annotated with
#[IsReadOnly]— they never modify your application state - Discovery integration: Hooks and components are retrieved via
DiscoveryManager, ensuring consistency with the framework’s own discovery system - Environment-gated: Nectar only loads in
local/developmentenvironments to avoid any production overhead - WordPress safety: Tools that depend on wp-admin functions (like
get_plugins()) safely load required files before calling them