kalbac

woodev-framework-backend-dev

Add or modify Woodev Framework backend PHP code following project conventions. Use when creating new classes, methods, hooks, or modifying existing backend code. **CRITICAL: internal APIs break cleanly on the v2 line (no @deprecated shims); installed-site data contracts — option keys, hook names, IDs, slugs, meta keys — never break (ADR-005).**

kalbac 1 Updated 1mo ago

Resources

6
GitHub

Install

npx skillscat add kalbac/woodev-plugin-framework/woodev-framework-backend-dev

Install via the SkillsCat registry.

SKILL.md

Woodev Framework Backend Development

This skill provides guidance for developing Woodev Framework backend PHP code according to project standards and conventions.

When to Use This Skill

ALWAYS invoke this skill before:

  • Creating new PHP classes
  • Modifying existing backend PHP code
  • Adding hooks or filters
  • Writing PHP unit tests (invoke before creating *Test.php files)
  • Adding deprecation notices

DO NOT use this skill for:

  • Running tests (use woodev-framework-dev-cycle)
  • Git operations (use woodev-framework-git)
  • Code review (use woodev-framework-code-review)

Instructions

Follow Woodev Framework project conventions when adding or modifying backend PHP code:

  1. Creating new code structures: See file-entities.md for conventions on creating classes and organizing files.
  2. Naming conventions: See code-entities.md for naming methods, variables, and parameters
  3. Coding style: See coding-conventions.md for general coding standards and best practices
  4. Working with hooks: See hooks.md for hook callback conventions and documentation
  5. Dependency injection: See dependency-injection.md for DI container usage
  6. Data integrity: See data-integrity.md for ensuring data integrity when performing CRUD operations
  7. Testing: See ../woodev-framework-dev-cycle/testing-guide.md for Brain Monkey/Mockery patterns and test writing conventions

Key Principles

  • Always follow WordPress Coding Standards
  • Use class methods instead of standalone functions
  • Use PSR-4 autoloading with Woodev\Framework namespace for new code
  • Legacy code remains without namespace (Woodev_Plugin, Woodev_Plugin_Bootstrap)
  • Write comprehensive unit tests for new functionality
  • Run linting and tests before committing changes
  • Apply the clean-break policy: internal APIs may break cleanly (no shims); installed-site data contracts — option keys, hook names, IDs, slugs, meta keys — never break. docs-internal/AGENT-RULES.md → Rule 0

Version Information

To determine the current framework version number for @since annotations:

  • Read the VERSION constant in woodev/class-plugin.php
  • Example: If const VERSION = '2.0.0', use @since 2.0.0