Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
php: ['8.3', '8.4']

steps:
- uses: actions/checkout@v4
Expand All @@ -29,3 +29,6 @@ jobs:

- name: Lint PHP files
run: find . -name "*.php" -not -path "*/vendor/*" -exec php -l {} \;

- name: Run tests
run: vendor/bin/phpunit --configuration phpunit.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/vendor/
/node_modules/
/.phpunit.cache/
.phpunit.result.cache
/tests/phpunit/tmp/

*.log
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to Waygate will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.0] - 2026-05-24

### Added
- Feature detection: `AiIntegration::is_text_generation_supported()` hides the AI generation form and updates the status badge when no configured provider supports text generation
- Ability annotations: `readonly` on `elayne/list-patterns` and `idempotent` on `elayne/create-page` for clearer REST API semantics
- Generic pattern prefix support via `waygate_pattern_prefixes` filter — plugin now works with any block theme, not just Elayne
- Category filter dropdown in the admin pattern catalog, with server-side filtering and a clear link
- PHPUnit 11 test infrastructure (`phpunit.xml`, `tests/bootstrap.php`) with 10 unit tests covering `PatternLab` prefix filtering and `AiIntegration` feature detection
- PHPUnit test step added to CI workflow

### Changed
- Minimum PHP requirement raised to **8.3+** (aligns with WordPress recommended version)
- Minimum WordPress requirement raised to **7.0+** (required for AI Client and Abilities API)
- Admin pattern catalog heading updated to show filtered count vs. total
- Category display in pattern table strips namespace prefix generically (works with any theme namespace)
- Error message for missing valid patterns is no longer Elayne-specific
- `composer.lock` now tracked for reproducible installs; platform pinned to PHP 8.3

## [0.3.2] - 2026-05-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Waygate is a standalone WordPress plugin that provides AI-powered pattern page b

- **Package:** `imagewize/waygate` on Packagist
- **Namespace:** `Imagewize\Waygate`
- **Requires:** PHP 8.0+, WordPress 6.5+
- **Requires:** PHP 8.3+, WordPress 7.0+

## Commands

Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# Waygate

**AI-Powered Pattern Page Builder for the Elayne Block Theme**
**AI-Powered Pattern Page Builder for Block Themes**

Waygate lets you assemble WordPress pages from [Elayne](https://github.com/imagewize/elayne) block patterns — manually or via a natural-language AI prompt powered by the WordPress AI Client (WordPress 7.0+).
Waygate lets you assemble WordPress pages from block patterns — manually or via a natural-language AI prompt powered by the WordPress AI Client (WordPress 7.0+). Works with any block theme; [Elayne](https://github.com/imagewize/elayne) is the primary supported theme.

> **Beta** — v0.2.0. Use on staging/development sites; not yet recommended for production.
> **Beta** — v0.4.0. Use on staging/development sites; not yet recommended for production.

---

## Features

- **Pattern catalog** — Browse all registered Elayne patterns with slug, title, and categories
- **Pattern catalog** — Browse registered block patterns with slug, title, and categories; filter by category
- **AI page generation** — Describe the page you want; the AI picks patterns and creates a draft
- **Feature detection** — AI form is hidden automatically when no provider supports text generation
- **Abilities API** — Exposes `elayne/list-patterns` and `elayne/create-page` abilities for WP 7.0+
- **Multi-provider** — Works with Mistral, Claude, OpenAI, or Gemini via WP AI Client
- **Any block theme** — Default prefix is `elayne/`; extend via the `waygate_pattern_prefixes` filter

---

## Requirements

| Requirement | Version |
|---|---|
| PHP | 8.0+ |
| WordPress | 6.5+ |
| Elayne theme | Recommended |
| WordPress AI Client | 7.0+ (optional, for AI features) |
| PHP | 8.3+ |
| WordPress | 7.0+ |
| Block theme | Any; Elayne recommended |
| WordPress AI Client | 7.0+ (required for AI features) |

---

Expand Down Expand Up @@ -64,7 +66,7 @@ Then add `MISTRAL_API_KEY=your_key` to your site `.env`.
## Usage

1. Go to **Tools → Waygate** in the WordPress admin
2. Browse registered Elayne patterns in the catalog
2. Browse registered patterns in the catalog; use the category dropdown to filter
3. Optionally type a page description and click **Generate Page** to create an AI-assembled draft
4. Open the draft in the block editor, adjust as needed, and publish

Expand All @@ -87,6 +89,7 @@ When WordPress 7.0's Abilities API is available, Waygate registers two abilities
git clone https://github.com/imagewize/waygate.git
cd waygate
composer install
vendor/bin/phpunit --configuration phpunit.xml
```

---
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=8.3",
"composer/installers": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5 || ^10.0",
"phpunit/phpunit": "^11.0",
"wp-coding-standards/wpcs": "^3.0",
"squizlabs/php_codesniffer": "^3.8"
},
Expand All @@ -37,6 +37,9 @@
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "8.3.0"
}
}
}
Loading
Loading