PHPackages                             pressgang-wp/bosun - 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. pressgang-wp/bosun

ActiveWp-cli-package

pressgang-wp/bosun
==================

WP-CLI package that composes AI agent guidelines and skills for PressGang WordPress themes — the bosun pipes the conventions to the crew.

v0.2.0(1mo ago)00MITPHPPHP ^8.3CI passing

Since Jul 4Pushed 1mo agoCompare

[ Source](https://github.com/pressgang-wp/pressgang-bosun)[ Packagist](https://packagist.org/packages/pressgang-wp/bosun)[ RSS](/packages/pressgang-wp-bosun/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

🧭 Bosun
=======

[](#-bosun)

WP-CLI package that composes AI agent guidelines for PressGang WordPress themes.

Aboard ship, the bosun pipes the captain's orders to the crew. Aboard your project, Bosun pipes PressGang's conventions to the AI crew — so every agent that comes aboard already knows the ropes.

🤔 Why
-----

[](#-why)

PressGang's best features are its most hidden: convention-based template routing, context getter manifests, config-driven registration, the Quartermaster fluent query builder, a library of ready-made snippets. By design they leave barely a trace in a child theme's code — wonderful for developers who know the ship, invisible to agents who don't. Left unbriefed, an agent will write stub files, hand-rolled `WP_Query` arrays, and `functions.php` hooks — working code that misses everything that makes PressGang worth sailing.

Bosun is the briefing. Like Laravel Boost for the Laravel ecosystem, it gives agents the context to use the framework *at its best* — composed from what the theme actually has: package versions and source refs from `composer.lock`, feature opt-ins from `config/`. Guidance for a feature only comes aboard when the theme has opted in, so no agent gets told about rigging the ship doesn't carry.

📦 Installation
--------------

[](#-installation)

Install as a global WP-CLI package — one install pipes orders to every theme on the machine:

```
wp package install https://github.com/pressgang-wp/pressgang-bosun.git
```

🚀 Usage
-------

[](#-usage)

From a PressGang project:

```
wp bosun install                # compose CLAUDE.md + AGENTS.md in the active child theme
wp bosun install --agents=claude
wp bosun update                 # recompose (idempotent) — add to composer post-update-cmd
```

That's it — all hands briefed.

When [Capstan](https://github.com/pressgang-wp/pressgang-capstan) can serve MCP, `install` also registers its server in each editor's MCP config (`.mcp.json`, and `.cursor/mcp.json` where Cursor is in use) — owning only its own `mcpServers.pressgang` key and preserving every other, so any MCP editor can call Capstan's introspection live. `--skip-mcp` opts out. See [ADR 0001](docs/adr/0001-mcp-server-layer.md).

Bosun owns a marked region inside each file — everything between `\` and `` — never the whole file. A hand-written `CLAUDE.md`/`AGENTS.md` keeps every byte of its content and gains the region appended at the end; re-runs replace the region in place. The only file Bosun refuses to touch is one whose markers are unbalanced or duplicated (fix them by hand, or pass `--force` to rewrite the file as region-only). Commit the generated files — agents on machines without Bosun still get the briefing — and put customisations in `.ai/guidelines/` or outside the region, never inside it.

🧩 How Fragments Are Sourced
---------------------------

[](#-how-fragments-are-sourced)

Fragments are plain Markdown, mustered in three tiers (later tiers override earlier ones by matching relative path):

1. **📦 Package-shipped** — `vendor/{package}/resources/bosun/guidelines/**.md`. The same shape as Laravel Boost's third-party convention, under Bosun's own namespace — the semantics layered on top (feature gating) are Bosun's, and no PressGang package will ever share a vendor directory with a Laravel app.
2. **⚓ Bosun built-ins** — `resources/guidelines/{slug}/**.md` in this package, covering pressgang, quartermaster, and snippets until those packages ship their own. Feature-gated fragments (e.g. `pressgang/v2/template-routing.md`) come aboard only when the theme's config opts in.
3. **🏠 Theme-local** — `{theme}/.ai/guidelines/**.md` for house rules, or overrides when the path matches an earlier fragment (e.g. `.ai/guidelines/pressgang/core.md`).

The composed document opens with an inventory summary — installed packages with lock refs, and detected opt-ins — so agents reason about the theme's reality, not the ecosystem's newest ideas.

Packages may also ship a machine-readable API index at `docs/api-index.json` (method signatures, the query args they set, links to WordPress docs). Bosun doesn't copy it anywhere — the composed guidelines point agents at the vendor file, the single source of truth. Malformed or oversized indexes are skipped silently.

🗺️ Roadmap
----------

[](#️-roadmap)

- **Phase 1 (you are here)** — guidelines composition; move package guidance in pressgang, quartermaster, and snippets into shipped fragments.
- **Phase 2 (begun)** — skills distribution: packages ship `resources/bosun/skills/{name}/SKILL.md`; Bosun installs detected skills to `.claude/skills/` (override via `.ai/skills/{name}`). Ships the `pressgang-theme-build` skill — the greenfield build workflow. Next: target every configured agent (`.cursor/` alongside `.claude/skills/`), not Claude alone.
- **Phase 3 (done)** — [Capstan](https://github.com/pressgang-wp/pressgang-capstan) shipped its introspection commands (`resolve`, `context --add`, `config dump`, `snippets`, `doctor`) and pressgang's shipped fragments now teach agents to verify with them instead of inferring from source.
- **Phase 4 (done)** — local-first docs index: packages ship a machine-readable `docs/api-index.json`, surfaced in the composed guidelines so agents read signatures from vendor instead of guessing. Capstan now ships one standard generator (`wp capstan make api-index`, from a per-package `api-index.php` manifest); Quartermaster and Muster are on it.
- **Phase 5 (largely shipped — the missing layer)** — a thin MCP server. Capstan ships `wp capstan mcp serve` proxying its introspection, a version-aware `pressgang_docs_search` over the api-indexes, and `pressgang_logs`; Bosun writes the registration into each agent target (`.mcp.json`, `.cursor/mcp.json`) on `install`. This brings PressGang to parity-and-beyond with Laravel Boost and unlocks non-Bash editors (Cursor, Windsurf). Remaining: the observer-backed logs source and the (owner-gated) `pressgang_eval` write tool. See [ADR 0001](docs/adr/0001-mcp-server-layer.md).

🧪 Testing
---------

[](#-testing)

```
composer install
composer test
```

Shipshape and Bristol fashion. ⚓

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

2

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1303610?v=4)[Benedict](/maintainers/benedict-w)[@benedict-w](https://github.com/benedict-w)

---

Top Contributors

[![benedict-w](https://avatars.githubusercontent.com/u/1303610?v=4)](https://github.com/benedict-w "benedict-w (18 commits)")

---

Tags

agentsaiai-codingclaudepressgangwordpress-development

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pressgang-wp-bosun/health.svg)

```
[![Health](https://phpackages.com/badges/pressgang-wp-bosun/health.svg)](https://phpackages.com/packages/pressgang-wp-bosun)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
