Guidelines for git and GitHub operations in Woodev Framework projects. **CRITICAL: All commits MUST follow Conventional Commits format for automatic CHANGELOG generation.**
Install
npx skillscat add kalbac/woodev-plugin-framework/woodev-framework-git Install via the SkillsCat registry.
Woodev Framework Git Guidelines
When to Use This Skill
ALWAYS invoke this skill when:
- Creating a new branch for a feature/fix
- Writing commit messages (Conventional Commits format required)
- Creating a pull request
- Setting up git repository for the first time
- Preparing a release (VERSION bump in
woodev/class-plugin.php) - Syncing your branch with main/master
DO NOT use this skill for:
- Day-to-day code changes (use
woodev-framework-dev-cycle) - Code review (use
woodev-framework-code-review) - Writing code (use
woodev-framework-backend-dev)
Branch Strategy
Branch Naming
Use descriptive branch names following this pattern:
{type}/{description}Types:
feature/— новые функцииfix/— исправления баговhotfix/— срочные исправления для продакшенаdocs/— документацияrefactor/— рефакторинг кодаchore/— вспомогательные задачи (CI/CD, конфиги)
Examples:
feature/shipping-by-volume
fix/calculation-rounding-error
docs/update-readme
refactor/payment-gateway-classCommit Messages
Conventional Commits Format
All commits MUST follow Conventional Commits format. This is critical because git-cliff uses commit messages to auto-generate CHANGELOG.md.
{type}: {description}
[optional body]
[optional footer]Types:
| Type | Description | CHANGELOG Section |
|---|---|---|
feat: |
Новая функция | ✨ Features |
fix: |
Исправление бага | 🐛 Bug Fixes |
docs: |
Документация | 📝 Documentation |
style: |
Форматирование, отступы (не влияет на логику) | — |
refactor: |
Рефакторинг без изменений функциональности | 🔧 Refactoring |
test: |
Тесты | ✅ Tests |
chore: |
Вспомогательные задачи | ⚙️ Chores |
ci: |
CI/CD изменения | 🚀 CI/CD |
Examples:
feat: add shipping calculation by volume
fix: correct rounding in total calculation
docs: update installation instructions in README
refactor: extract validation logic to separate methodBreaking Changes
Breaking changes require:
- Add
!after type:feat!:,fix!:, etc. - Add
BREAKING CHANGE:footer
Example:
feat!: remove deprecated old_method()
BREAKING CHANGE: old_method() has been removed. Use new_method() instead.This adds ⚠️ BREAKING CHANGE section to CHANGELOG.
Pull Requests
Before Creating PR
- Ensure all changes are committed
- Run linting —
composer phpcs - Run tests —
composer test:unitandcomposer test:integration(если есть тесты) - Update CLAUDE.md — если изменилась архитектура или API
- Update README.md — если изменился пользовательский функционал
- Commits are in Conventional Commits format (for git-cliff)
PR Template
When creating PRs, always use the template from .github/PULL_REQUEST_TEMPLATE.md.
Key sections:
- Submission Review Guidelines: Checkboxes confirming adherence to guidelines
- Changes proposed: Description of changes with bug fix references
- Why this change is needed: Explanation of the problem and solution
- Screenshots: UI changes (if applicable)
- How to test: Step-by-step testing instructions
- Testing done: What testing you've performed
- Checklist: Linting, tests, documentation updates
- Conventional Commits: Commit types used
For bug fixes, reference the PR/commit that introduced the bug:
Bug introduced in PR #XXXXX.Include testing instructions that are detailed enough for a reviewer to verify the change.
PR Review Checklist
Before merging, ensure:
- All linting checks pass
- All tests pass
- Commits follow Conventional Commits format
- Code follows WordPress Coding Standards
- No standalone functions (only class methods)
- All new code has appropriate docblocks
-
@sinceannotations are correct - No breaking changes without deprecation (CRITICAL for framework)
- No changes in
woodev/directory (unless intentional)
Git Commands Reference
Daily Workflow
# Create new branch from main
git checkout main
git pull origin main
git checkout -b feature/my-feature
# Stage and commit changes (Conventional Commits)
git add woodev/path/to/file.php
git commit -m "feat: add new shipping method"
# Push branch
git push -u origin feature/my-featureCreating PR with GitHub CLI
# Create PR with template
gh pr create \
--title "feat: add shipping calculation by volume" \
--body-file ".github/PULL_REQUEST_TEMPLATE.md" \
--base main \
--head feature/shipping-by-volumeSyncing with Main
# Update your branch with latest main
git checkout main
git pull origin main
git checkout feature/my-feature
git rebase main
# Or merge if you prefer
git merge mainVersion Management
Framework Version
VERSION is stored in woodev/class-plugin.php:
class Woodev_Plugin {
const VERSION = '2.0.0'; // ← Update this for releases
}Release Workflow — FULLY AUTOMATIC
No manual tagging or release scripts needed!
Update VERSION in
woodev/class-plugin.php:const VERSION = '2.1.0'; // Bump versionCommit the change:
git commit -m "chore: release version 2.1.0"Push to main:
git push origin mainGitHub Actions automatically:
- Runs tests (PHPCS, PHPStan, Unit, Integration)
- Creates git tag
v2.1.0 - Generates CHANGELOG via
git-cliff - Builds release ZIP
- Publishes GitHub Release
That's it! No manual steps required.
@since Annotations
⚠ NOT the VERSION constant. This section said to read VERSION fromwoodev/class-plugin.php until 2026-09-05; operator decision #409 settled the opposite, and the two
are deliberately separate concepts.
@since= the planned release the change ships in — currently2.0.2.VERSION= the released version (2.0.1). It lags on purpose, because raising it onmain
publishes a release.- The machine-readable authority is
composer.json→extra.woodev.planned-release, andtests/unit/SinceTagCeilingTest.phpgates every@sinceinwoodev/**against it. - Inherited code carries
1.0.0, never an upstream number.
Full rule: docs-internal/AGENT-RULES.md → Rule 5.
Notes
- Never force push to shared branches
- Squash commits before merging if branch has multiple WIP commits
- Delete feature branches after merging
- Keep
mainalways deployable — never break main branch - Conventional Commits required — for automatic CHANGELOG generation
- Breaking an installed-site data contract is release-blocking; an internal API break is allowed on the v2 line (ADR-005)