This project uses semantic-release with conventional commits and scopes for monorepo versioning. Proper commit formatting is critical for automated releases.
| Commit Format | Effect | Use For |
|---|---|---|
feat(client): |
Client MINOR release | New client features |
fix(client): |
Client PATCH release | Client bug fixes |
feat(mcp): |
MCP MINOR release | New MCP features |
fix(mcp): |
MCP PATCH release | MCP bug fixes |
feat: or fix: |
Client release (default) | Unscoped changes default to client |
feat(client)!: or fix(client)!: |
Client MAJOR release | Breaking changes |
chore:, docs:, test:, etc. |
No release | Non-user-facing changes |
This repository contains two packages:
- katana-openapi-client - Python client library
- katana-mcp-server - Model Context Protocol server
Releases are managed independently using commit scopes.
Triggers release of katana-openapi-client:
# New feature (MINOR version bump: 0.30.0 → 0.31.0)
git commit -m "feat(client): add Products domain helper class"
# Bug fix (PATCH version bump: 0.30.0 → 0.30.1)
git commit -m "fix(client): handle null values in pagination"
# Breaking change (MAJOR version bump: 0.30.0 → 1.0.0)
git commit -m "feat(client)!: redesign authentication interface"Triggers release of katana-mcp-server:
# New feature (MINOR version bump: 0.7.0 → 0.8.0)
git commit -m "feat(mcp): add inventory management tools"
# Bug fix (PATCH version bump: 0.7.0 → 0.7.1)
git commit -m "fix(mcp): correct order status filtering"
# Breaking change (MAJOR version bump: 0.7.0 → 1.0.0)
git commit -m "feat(mcp)!: change tool parameter structure"Commits without a scope default to releasing the client:
# These are equivalent:
git commit -m "feat: add retry mechanism"
git commit -m "feat(client): add retry mechanism"
# Both trigger client release (MINOR bump)These commit types do not trigger releases:
chore: update development dependencies
chore: configure new linting rule
chore: update build scriptsdocs: update README installation instructions
docs: add API usage examples
docs: create ADR for pagination strategytest: add coverage for edge cases
test: fix flaky integration test
test: refactor test fixturesrefactor: simplify error handling logic
refactor: extract common utility functions
refactor: rename internal variables for clarityci: add parallel test execution
ci: update GitHub Actions workflow
ci: configure Dependabotperf: optimize pagination for large datasets
perf: reduce memory usage in clientbuild: update uv to 0.5.0
build: configure package metadata<type>(<scope>): <subject>
[optional body]
[optional footer(s)]
Simple feature:
git commit -m "feat(mcp): add purchase order creation tool"Feature with description:
git commit -m "feat(client): add automatic pagination support
Implements transparent pagination for list endpoints that return
paginated results. Automatically follows next page links until all
results are retrieved.
Closes #42"Breaking change:
git commit -m "feat(client)!: redesign authentication mechanism
BREAKING CHANGE: AuthenticatedClient now requires api_key parameter
instead of using environment variable. Update your code:
Before: client = AuthenticatedClient()
After: client = AuthenticatedClient(api_key='your-key')
Closes #89"The project follows Semantic Versioning: MAJOR.MINOR.PATCH
| Change Type | Scope | Bump | Example |
|---|---|---|---|
| Breaking change | feat!: or fix!: |
MAJOR | 0.30.0 → 1.0.0 |
| New feature | feat: |
MINOR | 0.30.0 → 0.31.0 |
| Bug fix | fix: |
PATCH | 0.30.0 → 0.30.1 |
| Other types | chore:, docs:, etc. |
None | 0.30.0 → 0.30.0 |
Before version 1.0.0, breaking changes still bump MINOR (not MAJOR):
feat!:in 0.x.y → MINOR bump (0.30.0 → 0.31.0)- After 1.0.0 → MAJOR bump (1.0.0 → 2.0.0)
- Use imperative mood - "add feature" not "added feature"
- Keep subject line short - Under 72 characters
- Capitalize subject - "Add feature" not "add feature"
- No period at end - "Add feature" not "Add feature."
- Use body for context - Explain "why" not "what"
- Reference issues - Include "Closes #123" in footer
- Be specific - "fix(mcp): handle null product names" vs "fix(mcp): fix bug"
- Don't mix concerns - One logical change per commit
- Don't use vague messages - Avoid "fix stuff" or "update code"
- Don't forget scope - Be explicit about package (
clientormcp) - Don't break conventions - Follow the format strictly
- Don't commit broken code - Run validation before committing
If a change affects both packages, create separate commits:
# Change affecting client
git commit -m "feat(client): add new pagination parameter"
# Change affecting MCP server
git commit -m "feat(mcp): use new pagination parameter"This ensures:
- Both packages get proper releases
- Clear changelog entries
- Independent versioning
# Client feature
feat(client): add ResilientAsyncTransport for automatic retries
# MCP bug fix
fix(mcp): handle empty inventory list responses correctly
# Breaking change with detailed body
feat(client)!: remove deprecated sync methods
BREAKING CHANGE: Synchronous client methods have been removed.
Use async methods with asyncio.run() instead.
See migration guide in docs/MIGRATION.md
# Documentation
docs: add progressive disclosure guide for agents
# Chore with context
chore: update pre-commit hooks to latest versions# Too vague
fix: fixed bug
# Wrong mood
feat: added new feature
# Missing scope for release
feat: pagination support # Should be feat(client):
# Period at end
feat(mcp): add tool.
# Not capitalized
feat(client): add helper
# Multiple concerns
feat(client): add pagination and fix auth bug # Should be 2 commitsThe project uses semantic-release to validate commit messages automatically in CI.
Check your commit message locally:
# View last commit message
git log -1 --pretty=%B
# Check if it follows conventional commits
# Should match: type(scope): subjectIf you made a mistake:
# Fix the last commit message
git commit --amend -m "feat(client): correct commit message"
# Force push if already pushed (use with caution)
git push --force-with-leaseWhen commits are merged to main:
- semantic-release analyzes commits since last release
- Determines version bump based on commit types
- Generates CHANGELOG.md from commit messages
- Creates git tag with new version
- Publishes packages to PyPI (if configured)
- Creates GitHub release with notes
# View recent releases
gh release list
# View release notes
gh release view v0.31.0
# View all tags
git tag -l- MONOREPO_SEMANTIC_RELEASE.md - Complete monorepo release guide
- Conventional Commits - Official specification
- Semantic Versioning - Versioning specification
Remember:
- 🎯 Use
feat(client):orfeat(mcp):for releases - 🚫 Use
chore:,docs:,test:for non-releases - 💥 Add
!for breaking changes:feat(client)!: - 📝 Write clear, descriptive commit messages
- ✅ Run
uv run poe checkbefore committing
Proper commit formatting enables automated releases and clear changelogs!