PHPackages                             trk/processwire-boost - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. trk/processwire-boost

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

trk/processwire-boost
=====================

AI context bridge for ProcessWire CMS.

0.1.1(1mo ago)5151MITPHPPHP &gt;=8.2CI passing

Since Mar 10Pushed 1mo agoCompare

[ Source](https://github.com/trk/processwire-boost)[ Packagist](https://packagist.org/packages/trk/processwire-boost)[ Patreon](https://www.patreon.com/ukyo)[ RSS](/packages/trk-processwire-boost/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (2)Versions (12)Used By (0)

 [![PHP 8.3+](https://camo.githubusercontent.com/01e32c87163a6d9ff5b77274456446b5c81505e708587451eda5a563d5f6755b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d3838393242463f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://camo.githubusercontent.com/01e32c87163a6d9ff5b77274456446b5c81505e708587451eda5a563d5f6755b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d3838393242463f7374796c653d666c61742d737175617265266c6f676f3d706870) [![ProcessWire 3.x](https://camo.githubusercontent.com/ca9b87d850be17d786179814f886961d283361bb779beb370d8e89ffd32217b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726f63657373576972652d332e782d6561366131613f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ca9b87d850be17d786179814f886961d283361bb779beb370d8e89ffd32217b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726f63657373576972652d332e782d6561366131613f7374796c653d666c61742d737175617265) [![MIT License](https://camo.githubusercontent.com/152aa2a37725b9fd554b28ff24d270f6071c67927a63e6d635a55c8e188e20c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/152aa2a37725b9fd554b28ff24d270f6071c67927a63e6d635a55c8e188e20c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e3f7374796c653d666c61742d737175617265)

ProcessWire Boost
=================

[](#processwire-boost)

**AI context bridge for ProcessWire CMS/CMF.**

Boost ensures AI coding agents produce expert-level ProcessWire code by providing structured context: guidelines that encode best practices, task playbooks (skills) that teach specific patterns, a schema map for project awareness, and a JSON-RPC (MCP) server for live system access.

This is **not** a CLI tool collection — Boost is a knowledge layer. It sits between your ProcessWire project and the AI agent, ensuring every code suggestion, module scaffold, and schema change follows established conventions.

---

Table of Contents
-----------------

[](#table-of-contents)

- [Why Boost?](#why-boost)
- [How It Works](#how-it-works)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Context Layers](#context-layers)
    - [Guidelines](#guidelines)
    - [Skills (Task Playbooks)](#skills-task-playbooks)
    - [Schema Map](#schema-map)
    - [MCP Server (Live Access)](#mcp-server-live-access)
- [Agent System](#agent-system)
- [Module Integration](#module-integration)
- [Commands](#commands)
- [Configuration](#configuration)
- [Troubleshooting](#troubleshooting)
- [License](#license)

---

Why Boost?
----------

[](#why-boost)

AI agents can write PHP — but writing *correct ProcessWire code* requires deep context:

Without BoostWith BoostAgent guesses API methods, often hallucinatingGuidelines provide verified API patterns with version-specific signaturesAgent uses raw SQL or incorrect selectors`pw-pages` skill teaches operator syntax, sanitization, and performance rulesAgent creates fields/templates manually`pw-migrations` skill guides the agent through safe, versioned schema changesAgent has no idea what templates or fields exist`map.json` provides a complete schema snapshot — no guessingAgent cannot inspect live dataMCP server exposes real-time queries, logs, and module info**Boost turns a general-purpose AI into a ProcessWire specialist.**

How It Works
------------

[](#how-it-works)

### Architecture

[](#architecture)

**Four context layers**, each serving a different purpose:

LayerFormatPurposeWhen Used**Guidelines**Markdown in agent configEncode rules, conventions, API patternsEvery prompt — always-on context**Skills**`SKILL.md` playbooksTeach step-by-step workflowsOn-demand — agent activates when task matches**Schema Map**`map.json`Project-specific templates, fields, rolesCode generation — agent knows what exists**MCP Server**JSON-RPC over stdioLive queries, logs, module infoRuntime — agent inspects real data### Runtime Flow

[](#runtime-flow)

Here is a brief outline of how an AI works under the hood at runtime with these layers:

1. **User asks for a task** (e.g., "Create a migration to add a blog template").
2. **Agent reads Guidelines** (e.g., `AGENTS.md`) for base framework rules &amp; conventions.
3. **Agent activates relevant Skill** (like `pw-migrations`) providing the specific, step-by-step workflow required.
4. **Agent reads Schema Map** (`map.json`) to learn the existing project templates, roles, and fields.
5. **Agent queries MCP Server** (`pw_schema_read` etc.) for live configurations or logs natively inside the processwire environment.
6. **Agent generates the code**, reliably completing the task with full system awareness.

---

Requirements
------------

[](#requirements)

DependencyVersionPHP`>= 8.3`ProcessWire`3.x`[processwire-console](https://github.com/trk/processwire-console)`dev-main` (peer dependency)---

Installation
------------

[](#installation)

```
composer require trk/processwire-boost --dev
```

> **Note:** `processwire-console` provides the `vendor/bin/wire` CLI runner. Boost commands are auto-discovered via Composer `extra` metadata — no manual registration needed.

---

Quick Start
-----------

[](#quick-start)

### 1. Run the Installer

[](#1-run-the-installer)

```
# Interactive mode — prompts for features, agents, and modules
php vendor/bin/wire boost:install

# Flag mode — skip prompts
php vendor/bin/wire boost:install \
  --guidelines --skills --mcp \
  --agents="Cursor,Claude Code,Gemini CLI" \
  --modules="Htmx,FieldtypeAiAssistant"
```

### 2. What Gets Generated

[](#2-what-gets-generated)

```
project-root/
├── AGENTS.md                    # Universal guidelines (Cursor, Codex, Amp, etc.)
├── CLAUDE.md                    # Claude Code specific guidelines
├── GEMINI.md                    # Gemini CLI specific guidelines
├── .mcp.json                    # Claude Code MCP config
├── .cursor/
│   ├── mcp.json                 # Cursor MCP config
│   └── skills/                  # Cursor skill playbooks
│       ├── pw-pages/SKILL.md
│       ├── pw-module-development/SKILL.md
│       └── ...
├── .claude/skills/              # Claude Code skill playbooks
├── .junie/
│   ├── mcp/mcp.json             # Junie MCP config (absolute paths)
│   └── skills/
├── .trae/
│   ├── mcp.json                 # Trae MCP config (${workspaceFolder} paths)
│   └── rules/                   # Trae skill playbooks (YAML frontmatter)
├── .vscode/mcp.json             # GitHub Copilot MCP config
├── .github/skills/              # GitHub Copilot skill playbooks
└── .agents/
    ├── boost.json               # Installation state
    ├── map.json                  # Schema snapshot (templates, fields, roles)
    └── skills/                  # Central skill staging area

```

### 3. Verify

[](#3-verify)

```
# Check installation state
cat .agents/boost.json

# Verify skills were deployed
ls .cursor/skills/

# Test MCP server
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | php vendor/bin/wire boost:mcp
```

---

Context Layers
--------------

[](#context-layers)

### Guidelines

[](#guidelines)

Guidelines are the **always-on context layer** — they are compiled into a single instruction block and embedded in the agent's primary instruction file (e.g., `AGENTS.md`, `CLAUDE.md`).

Every time the agent processes a prompt, it reads these rules. This is where conventions, security patterns, and API usage rules live.

#### What Gets Compiled

[](#what-gets-compiled)

SectionContent**Foundation**System identity, PHP/PW version binding, installed module roster, skill activation menu**Boost**CLI &amp; MCP tool reference, dual MCP integration patterns**PHP**Strict typing, constructor promotion, PHPDoc, enums, array shapes**ProcessWire Core**API variables (`$pages`, `$fields`, `$users`, `$input`, `$config`, `$sanitizer`)**ProcessWire Development**Hook system (`addHookBefore`/`addHookAfter`), module types, namespaces**ProcessWire Security**Input sanitization, RBAC (`hasRole`, `hasPermission`, `editable`), CSRF tokens**ProcessWire Selectors**Query syntax, operators, `limit=`, indexed field priority, `selectorValue()`#### Source Priority

[](#source-priority)

1. **Core** — `resources/boost/guidelines/*.md` (7 files)
2. **Module** — `{module}/.agents/guidelines/*.md` (third-party modules)
3. **Fallback** — `{module}/AGENTS.md` (if no guidelines directory exists)

#### Merge Strategy

[](#merge-strategy)

File StateBehaviorFile has `` tagsReplace content between tags only — your custom instructions are preservedFile exists, no tagsAppend tags after existing contentFile doesn't existCreate from scratch with headerThis means your custom instructions in `CLAUDE.md` or `AGENTS.md` survive across reinstalls.

---

### Skills (Task Playbooks)

[](#skills-task-playbooks)

Skills are **on-demand context** — the agent activates a specific skill when the current task matches its domain. Each skill is a `SKILL.md` file containing a complete workflow guide.

Unlike guidelines (which are always present), skills are loaded only when relevant. This keeps the context window efficient while providing deep expertise when needed.

#### Built-in Skills (23)

[](#built-in-skills-23)

SkillWhat It Teaches the Agent`pw-admin-ui`Building ProcessWire Admin interfaces, Process modules, and Inputfield UIs`pw-brainstorming`Validating architecture decisions before implementation (modules/templates/fields/hooks)`pw-custom-page-classes`Building strongly-typed Page subclasses bound to specific templates`pw-docs-architect`Writing/maintaining module docs, READMEs, architecture guides, CLI references`pw-expert`Correct ProcessWire API usage patterns, console workflows, context-safe access to `$page/$pages/$user``pw-maintenance`Toggling maintenance mode safely (down/up) and managing downtime configuration`pw-migrations`Safe, versioned schema changes and rollbacks (fields/templates/pages)`pw-module-development`Native module architecture: `init()`, `ready()`, config, install/uninstall lifecycle`pw-module-fieldtype-inputfield`Custom database fieldtypes and their corresponding input UI components`pw-module-filevalidator`File upload validation, security normalization, MIME checking`pw-module-markup`Frontend rendering systems using the ProcessWire Markup module pattern`pw-module-process`Admin page pipelines, dashboards, routing, and RBAC within ProcessWire admin`pw-module-textformatter`Textformatter modules to safely transform field output at render time`pw-pages`Selectors + Page lifecycle: find/filter/create/edit/trash/delete, performance patterns`pw-queue`Creating/dispatching/interacting with Queue jobs in ProcessWire`pw-scheduling`Time-based tasks using cron expressions and scheduling wrappers`pw-security-audit`Security audits for modules/hooks/templates: OWASP, sanitization, RBAC, CSRF`pw-seeder`Database seeding patterns using file-based seeders`pw-systematic-debugging`A disciplined approach to diagnosing bugs and unexpected behavior`pw-test`Writing and running Pest tests in ProcessWire projects/modules`pw-url-routing`URL/Path hooks for REST APIs, virtual pages, and custom endpoints`pw-writing-plans`Turning specs into safe implementation plans (ProcessWire-native)`pw-writing-skills`Creating and improving Boost skills (formatting, testing requirements, conventions)#### Module-Provided Skills

[](#module-provided-skills)

Third-party ProcessWire modules can ship their own Boost skills. When selected during `boost:install`, these are merged alongside the built-in skills:

ModuleSkillWhat It Teaches the Agent`Htmx``pw-htmx`HTMX components, swaps, OOB fragments, and state management#### How Skills Guide Agents

[](#how-skills-guide-agents)

When an agent encounters a task like "create a migration to add a blog template", the `pw-migrations` skill activates and provides:

- Correct creation order: Field → Fieldgroup → Template → Page
- Safe rollback order: Page → Template → Fieldgroup → Field
- Pre-flight safety checks (e.g., "don't delete a field that's still attached to templates")
- Working stub selection (`--type=create-template`)

Without this skill, the agent would guess at the API and likely produce unsafe or incorrect migration code.

#### Agent-Specific Formats

[](#agent-specific-formats)

AgentSkill Format**OpenCode**YAML frontmatter (`name`, `description`, `license`, `compatibility`) prepended**Trae**YAML frontmatter wrapping, deployed to `.trae/rules/`**All others**Plain Markdown `SKILL.md` in `{skillName}/SKILL.md` structure---

### Schema Map

[](#schema-map)

The schema map (`map.json`) gives agents **project-specific awareness** without requiring a live database connection.

Generated on every `boost:install` run, it contains:

SectionContent**Templates**Names, IDs, and assigned field lists**Fields**Names, IDs, fieldtype class names, and labels**Modules**Installed modules with titles and versions**Roles**Names, IDs, and assigned permissions**Permissions**Names, IDs, and titlesThis map enables agents to:

- Generate code that references **real template and field names** instead of placeholders
- Avoid creating duplicate fields or templates
- Understand the permission structure before creating access control logic

#### Field Schema Extenders (Optional)

[](#field-schema-extenders-optional)

Boost supports optional field schema extenders so non-core or complex fieldtypes can append additional metadata.

- Generic metadata is appended under `fields.{name}.extra`.
- The extension key `fields` is reserved and promoted to top-level `fields.{name}.fields` for nested field definitions.
- Built-in repeater extender support covers `FieldtypeRepeater` and `FieldtypeFieldsetPage`, adding nested field schema entries (`id`, `type`, `label`) keyed by subfield name.

Discovery paths:

- `site/boost/schema/field-extenders.php`
- `site/modules/*/.agents/schema/field-extenders.php`
- `wire/modules/*/.agents/schema/field-extenders.php`

Each manifest should return an array of extender class names (or instances) implementing `Totoglu\Console\Boost\Schema\FieldSchemaExtender`. Extenders run in discovery order; if multiple extenders return the same key, the later value wins.

```
