Contributing to WP Kernel
Thank you for your interest in contributing to WP Kernel! This guide will help you get started.
🚀 Quick Start
👉 Development Setup - Complete guide to setting up your development environment.
New contributors should read this first - it covers the critical infrastructure that makes this project work.
Code of Conduct
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
How Can I Contribute?
Reporting Bugs
Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, include:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Environment details (Node version, OS, WordPress version)
- Code samples (if applicable)
- Screenshots (if applicable)
Suggesting Enhancements
Enhancement suggestions are welcome! Please provide:
- Clear use case - What problem does this solve?
- Proposed API - How would it work?
- Alternatives considered - What other approaches exist?
- Breaking changes - Would this affect existing code?
Pull Requests
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
pnpm test
andpnpm e2e
) - Lint your code (
pnpm lint
) - Update CHANGELOG.md in affected packages
- Commit with Conventional Commits format
- Push to your fork
- Open a Pull Request
Development Workflow
Prerequisites
- Node.js: v22.20.0 LTS (use nvm)
- pnpm: v9.12.3 or later
- Docker: For local WordPress environment
- Git: For version control
Initial Setup
# Clone the repository
git clone https://github.com/theGeekist/wp-kernel.git
cd wp-kernel
# Install dependencies
pnpm install
# Start WordPress with seed data
pnpm wp:fresh
# Start watch mode for development
pnpm dev
See Development Setup for detailed instructions.
Common Tasks
See Runbook for detailed instructions on:
- Starting/stopping WordPress
- Running tests
- Building packages
- Seed data management
- Troubleshooting
Coding Standards
See Coding Standards for:
- TypeScript guidelines
- ESLint rules
- Naming conventions
- File structure
- Import/export patterns
Testing
See Testing Guide for:
- Writing unit tests
- Writing E2E tests
- Running tests locally
- Test fixtures and seed data
Versioning
WP Kernel uses manual semantic versioning with fixed versioning across all packages.
Updating Versions
After making changes, update CHANGELOG.md files:
## 0.x.0 [Unreleased]
### Added
- Your feature description
### Fixed
- Bug fix description
Version Bump Guidelines
- One CHANGELOG update per PR (usually)
- Clear descriptions - Users will read these in the changelog
- Correct bump type:
- Major: Breaking changes, event taxonomy changes, slot changes
- Minor: New features, new events/slots (non-breaking)
- Patch: Bug fixes, documentation, internal refactors
Example changeset:
---
'@wpkernel/core': minor
---
Add support for custom cache invalidation strategies in Resources.
Resources can now define custom `shouldInvalidate` functions to control when cache keys are invalidated:
\`\`\`typescript
export const thing = defineResource({
// ...
shouldInvalidate: (action, payload) => {
return action === 'update' && payload.status === 'published';
},
});
\`\`\`
Commit Messages
Use Conventional Commits format:
<type>(<scope>): <subject>
<body>
<footer>
Types
feat
: New featurefix
: Bug fixdocs
: Documentation changesstyle
: Code style changes (formatting, semicolons, etc.)refactor
: Code refactoringtest
: Adding or updating testschore
: Maintenance tasks (deps, configs, etc.)
Examples
feat(resources): add custom cache invalidation strategies
fix(actions): emit events after cache invalidation
docs(guide): add examples for block bindings
test(e2e): add tests for job polling
chore(deps): update @wordpress/scripts to v27
Scope
Use package names or feature areas:
resources
actions
events
bindings
interactivity
jobs
e2e-utils
ui
Pull Request Process
Before Submitting
- [ ] All tests pass (
pnpm test
andpnpm e2e
) - [ ] Code is linted (
pnpm lint
) - [ ] CHANGELOG.md updated in affected packages
- [ ] Documentation updated (if needed)
- [ ] Examples updated (if API changed)
PR Template
When opening a PR, include:
What: Brief description of changes
Why: Problem/use case this solves
How: Implementation approach
Testing: How to test this change
Breaking Changes: Any breaking changes? Migration guide?
Review Process
- CI must pass - All automated checks must be green
- One approval required - From a maintainer
- Changeset required - Unless it's a docs-only change
- Squash merge - PRs are squashed on merge
Release Process
Releases are automated via GitHub Actions:
- Maintainer merges PRs with changesets
- Changesets bot opens a "Version Packages" PR
- Maintainer reviews and merges the version PR
- GitHub Actions publishes to npm automatically
License
By contributing, you agree that your contributions will be licensed under the EUPL-1.2 License.
The European Union Public Licence (EUPL) is a copyleft license with a network use clause, similar to AGPL but designed for European legal systems.
Questions?
- Documentation: https://theGeekist.github.io/wp-kernel/
- Issues: https://github.com/theGeekist/wp-kernel/issues
- Discussions: https://github.com/theGeekist/wp-kernel/discussions
Getting Help
If you need help:
- Check the documentation
- Search existing issues
- Ask in discussions
- Reach out to maintainers
Thank you for contributing! 🎉