Feature/prompt Templates#6
Merged
Merged
Conversation
Add six built-in prompt templates (Homepage, About, Services, Contact, Landing, Portfolio) to AiIntegration::get_prompt_templates(), filterable via the waygate_prompt_templates hook. Add a Quick Template dropdown to the admin form that pre-fills the description textarea on selection. A confirmation prompt fires if the textarea already has content, then resets the select so re-selection still works. Description hint now notes [placeholder] substitution.
Add phpcs.xml to declare WordPress standard and suppress the InvalidClassFileName sniff (WordPress convention uses hyphens in file names for multi-word classes, e.g. class-pattern-lab.php). Fix pre-existing violations across all plugin files: - Add missing file, class, and method doc comments - Convert short array syntax to long form (phpcbf auto-fix) - Fix Yoda condition in Admin::render_page() - Add sanitize_textarea_field() to textarea echo in admin form - Add @Package tag to waygate.php file header Update CLAUDE.md to use the bare `vendor/bin/phpcs` command so phpcs.xml is picked up automatically.
Add five tests for AiIntegration::get_prompt_templates(): - returns an array - has all six expected template keys - each template has non-empty label, description, and prompt fields - filter hook allows third parties to add templates - homepage template prompt contains [industry] placeholder Add remove_all_filters() stub to the test bootstrap so filter teardown in tests works without a full WordPress environment.
All four Phase 1 items are confirmed shipped as of 2026-05-24: feature detection, ability annotations, generic pattern prefix filter, and category filter dropdown in admin UI. Update Implementation Priority to start Phase 2 with prompt templates (now done), followed by REST API, client-side abilities, image generation, and batch page creation.
Track Vibe CLI project configuration (.vibe/) alongside the existing .claude/ tooling. Excluded from Composer archive via composer.json so it does not ship to end users via Packagist.
Update Version header and WAYGATE_VERSION constant in waygate.php. Add .vibe/ to composer.json archive excludes.
Add 0.6.0 release notes covering prompt templates, Quick Template dropdown, waygate_prompt_templates filter, new unit tests, and phpcs.xml. Bump version badge in README and add prompt templates to the feature list.
Pattern_Lab, Abilities_API, AI_Integration replace PatternLab, AbilitiesApi, AiIntegration to comply with WordPress coding standards and unblock WordPress.org submission. Removes the InvalidClassFileName PHPCS exclusion — renamed classes pass cleanly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces prompt template support to the Waygate plugin's AI integration layer and admin interface, releasing as version 0.6.0 with 670 net line additions across 16 files. The feature allows users to select and apply pre-defined prompt templates when generating pages, giving more control over AI output without requiring manual prompt authoring. Alongside the feature work, all PHP classes were renamed to WordPress underscore convention (e.g.,
PatternLab→Pattern_Lab), and aphpcs.xmlconfiguration was added with all resulting coding standard violations resolved. Unit test coverage was extended to validate the new template behavior, and the.vibetooling configuration was committed to the repository to standardize AI-assisted development workflows.Prompt Templates and AI Integration:
class-ai-integration.php, enabling structured prompt variants to be passed into the AI generation pipeline alongside the pattern catalog.class-admin.phpto expose template selection in the page generation form, connecting user-facing template choices to the underlying AI request.Code Quality and Standards:
phpcs.xmlto define project-level PHP CodeSniffer rules, and resolved all pre-existing violations acrossclass-abilities-api.php,class-admin.php,class-ai-integration.php, andclass-pattern-lab.php.Testing and Developer Tooling:
AiIntegrationTest.phpand extendedtests/bootstrap.phpwith additional stubs required by the new template code paths..vibe/config.tomland.vibe/prompts/vibe.mdto version control, establishing a shared baseline for AI-assisted development tooling used within this project.Documentation and Roadmap:
CHANGELOG.mdandREADME.mdto reflect the v0.6.0 release, documenting the prompt template feature and the class renaming refactor.docs/ROADMAP.mdand designated Phase 2 as the active development focus.Files Changed:
CHANGELOG.md(Modified)CLAUDE.md(Modified)README.md(Modified)composer.json(Modified)docs/ROADMAP.md(Modified)includes/class-abilities-api.php(Modified)includes/class-admin.php(Modified)includes/class-ai-integration.php(Modified)includes/class-pattern-lab.php(Modified)tests/Unit/AiIntegrationTest.php(Modified)tests/Unit/PatternLabTest.php(Modified)tests/bootstrap.php(Modified)waygate.php(Modified).vibe/config.toml(Added).vibe/prompts/vibe.md(Added)phpcs.xml(Added)