Search by

pollora / nectar

pollora

AI-powered development context for Pollora — guidelines, skills, and MCP tools for AI agents.

Package info

github.com/Pollora/nectar

pkg:composer/pollora/nectar

Statistics

Installs: 37

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.5.0 2026-10-07 20:38 UTC

README

Nectar: AI development context for Pollora

Latest Stable Version Total Downloads CI License

Nectar gives AI coding agents the context they need to write correct Pollora code. Built on Laravel Boost, it adds Pollora guidelines, on-demand agent skills and an MCP server that reads your live WordPress and Pollora environment. Your agent stops guessing at register_post_type() calls and uses the framework's attributes, routes and commands instead.

Part of Pollora, the Laravel framework for WordPress. Install it as a dev dependency in any Pollora project.

Installation

Requires PHP 8.3+, Laravel 12.x or 13.x, Pollora Framework 12.x or 13.x and Laravel Boost 2.x.

composer require pollora/nectar --dev

Then run Boost to install guidelines and skills:

php artisan boost:install

Select pollora/nectar when prompted for third-party packages, or add it manually to boost.json:

{
    "packages": ["pollora/nectar"]
}

Then update:

php artisan boost:update

What it provides

Feature Description
AI Guidelines Pollora architecture, PHP attributes, WordPress routing, Blade theming — injected into your agent's context via Boost
12 Agent Skills On-demand knowledge for post types, taxonomies, typed meta, roles, theming, hooks, blocks and Block Bindings, REST API and AJAX, scheduling, modules, and abilities
10 MCP Tools Live introspection of your WordPress & Pollora environment directly from your AI agent
Upgrade Prompts Step-by-step MCP prompts for upgrading between Pollora versions (12 → 13, 13.x → 13.32 and later)

MCP Server

Nectar registers a pollora-nectar MCP server that gives AI agents live access to your WordPress and Pollora environment.

Starting the server

php artisan nectar:mcp

Or register it in your .mcp.json:

{
    "mcpServers": {
        "pollora-nectar": {
            "command": "php",
            "args": ["artisan", "nectar:mcp"]
        }
    }
}

Available MCP Tools

Tool Description
pollora_status PHP, Laravel, Pollora & WordPress versions, active theme, discovery cache status
wordpress_info WordPress version, plugins, theme, multisite status, constants, locale
post_types_info All registered custom post types with supports, taxonomies, and configuration
taxonomies_info All registered taxonomies with associated post types
registered_hooks Hooks discovered via #[Action] and #[Filter] attributes
active_theme_info Theme structure, service providers, config files, Vite/Tailwind status, blocks
discovered_components All auto-discovered components grouped by type (post types, taxonomies, hooks, schedules, REST routes)
wordpress_routes All routes including Route::wp() with WordPress conditions and middleware
modules_info Installed Laravel Modules with status
wp_option Read any WordPress option by key

AI Guidelines

Guidelines are loaded automatically when Boost runs. They cover:

  • Pollora architecture (Laravel + WordPress bridge)
  • PHP 8 attributes (#[PostType], #[Taxonomy], #[Action], #[Filter], #[Schedule], #[WpRestRoute])
  • WordPress routing with Route::wp() and template hierarchy
  • Blade templating with Sage Directives
  • Theme development conventions
  • Available Artisan commands

Agent Skills

Skills are activated on-demand when working on specific tasks:

Skill When it activates
pollora-post-types Creating custom post types with attributes
pollora-taxonomies Creating custom taxonomies
pollora-theming Theme development (Blade, Vite, Tailwind, assets)
pollora-hooks Registering WordPress actions & filters
pollora-blocks Gutenberg blocks with JSX, Blade rendering & Tailwind
pollora-rest-api REST API endpoints with #[WpRestRoute], AJAX handlers with #[Ajax]
pollora-scheduling Scheduled tasks with #[Schedule]
pollora-abilities WordPress Abilities API with #[Ability] and the Ability facade
pollora-typed-meta Post, term, user and comment meta as typed properties with #[Meta], Meta::of(), pollora:meta:audit
pollora-roles Capabilities through Laravel's Gate, roles declared with #[Role], #[ModifyRole], #[CapabilitySet], pollora:roles:*
pollora-block-bindings #[BlockBinding] sources, pollora/post-meta and the other sources for core blocks, bindable Blade blocks
pollora-modules Laravel Modules with auto-discovery

Upgrade Assistance

Nectar provides MCP upgrade prompts that guide AI agents through Pollora version upgrades. Prompts are automatically registered when the current project version matches.

Prompt Available when Covers
upgrade-pollora-v13 Pollora 12.x detected Loop facade removal, config registration removal, CSRF middleware rename, Vite theme.json setup, WordPress 7.0, and more
upgrade-pollora-v13-32 Pollora 13.x before 13.32 detected Dependencies and composer-patches 2, renamed commands, extracted Hook/Option/Ajax packages, Loop/Query removal, blocks in resources/views/blocks, skeleton files (routes/web.php, cache table, .htaccess), theme.json from @theme

The upgrade prompt includes:

  • Step-by-step process (assess → safety net → analyze → apply → update deps → clean up)
  • All breaking changes with search patterns and before/after code examples
  • Theme build pipeline updates (@roots/vite-plugin, wordpressThemeJson)
  • Post-upgrade cleanup (wp transient delete --all)

Configuration

Publish the config file:

php artisan vendor:publish --tag=nectar-config
// config/nectar.php
return [
    'enabled' => env('NECTAR_ENABLED', true),

    'mcp' => [
        'tools' => [
            'exclude' => [],   // Tool class names to exclude
            'include' => [],   // Additional tool class names to include
        ],
    ],
];

Documentation

The full guide is on pollora.dev/nectar/overview.

Testing

composer test

Runs Pint, PHPStan and the Pest suite.

Contributing

Contributions are welcome: see the contributing guide. Report security issues privately, as described in the security policy.

License

Nectar is open-source software licensed under the MIT license. © RuBee group