Skip to main content

Before You Start

  1. Create an issue first (if one doesn’t exist) - Discuss the change with the maintainers
  2. Fork the repository and create a feature branch from dev (the default development branch; main is reserved for releases). Target dev when opening your PR.
  3. Set up your development environment using these instructions
  4. Run tests locally to ensure everything works

Commit Message Format

All commits should follow a standardized format. For each package/directory you modify, include a separate commit message line describing the change in that package.

Format

Types

  • feat - New feature
  • fix - Bug fix
  • refactor - Code refactoring (no feature change, no bug fix)
  • docs - Documentation changes
  • test - Test changes
  • chore - Build, dependencies, tooling changes
  • perf - Performance improvements

Examples

Single Package Change:
Multiple Packages: If your change affects multiple packages, include the package name or affected module in the description:
Provider-Specific Changes:
Multiple Commits for Multiple Packages: If you’re making significant changes to multiple packages, consider separate commits:

All Packages Modified Should Be Listed

When creating a commit, always mention which packages/components are affected:
Use a structured format that makes it easy to understand at a glance what changed and where.

Maintaining Changelogs

For each package you modify, update the corresponding changelog.md file with your changes. Changelog entries are used to generate release notes and communicate changes to users.

Changelog File Locations

Each package that receives updates should have a changelog.md file:
  • core/changelog.md - Core package changes
  • framework/changelog.md - Framework changes
  • transports/changelog.md - Transport layer changes
  • plugins/{plugin-name}/changelog.md - Specific plugin changes

Changelog Entry Format

Each changelog entry follows this exact format:
Required Components:
  • Type: One of feat, fix, refactor, docs, test, chore, or perf
  • Description: Clear, concise description (under 100 characters)
  • Author: Your GitHub profile link (recommended)

Change Types Reference

Changelog Examples

Good Examples:
Poor Examples (avoid):

How to Add Changelog Entries

  1. Edit the changelog.md file in the affected package
  2. Add new entry at the TOP of the file (most recent first)
  3. Follow the exact format: [type]: description [@name](https://github.com/user)
  4. Include your author link (optional but recommended)
Example: Before and After Before:
After (with new entry at top):

Multiple Package Changes

When your PR affects multiple packages, add entries to each package’s changelog.md: Example Multi-Package Changelog: core/changelog.md:
transports/changelog.md:
plugins/governance/changelog.md:

What to Include in Changelog

Do include:
  • Bug fixes that affect users
  • New features
  • Breaking changes
  • Performance improvements
  • Significant refactoring
  • Documentation improvements
Don’t include:
  • Internal code cleanup with no user impact
  • Typo fixes in comments only
  • Build system changes (unless significant)
  • Minor test-only changes

Changelog Best Practices

  1. Add entries at the TOP of the changelog.md file (most recent first)
  2. One entry per logical change - Don’t combine unrelated changes
  3. Keep descriptions concise - Under 100 characters
  4. Use consistent format - [type]: description
  5. Include your GitHub link - Helps recognize contributors
  6. Update all affected package changelogs - Don’t forget secondary packages
  7. Add changelog entry with your commit - Don’t wait until the end

Format Consistency Rules

DO’s:
  • ✅ Use square brackets: [feat]
  • ✅ Use colon separator: [feat]:
  • ✅ Start with lowercase (unless proper noun)
  • ✅ Be specific and concise
  • ✅ Include GitHub profile link
  • ✅ Add new entries at the top
DON’Ts:
  • ❌ Don’t use parentheses: (feat) or braces {feat}
  • ❌ Don’t use multiple spaces
  • ❌ Don’t mix formats in the same file
  • ❌ Don’t add entries at the bottom
  • ❌ Don’t use vague descriptions

Complete PR Example with Changelogs

If your PR adds retry logic to multiple packages:

Changelog Review Checklist

Before submitting a PR, verify:
  • All packages modified have changelog entries
  • Format is correct: [type]: description [@name](https://github.com/user)
  • Entries are added at TOP of the file
  • Author GitHub link is included
  • Description is clear and concise (under 100 chars)
  • Type is one of: feat, fix, refactor, docs, test, chore, perf
  • Entries are added with the commit (not after)

Pull Request Title

Keep PR titles concise and descriptive, following the same pattern:
Examples:
  • [feat]: Add rate limiting to governance plugin
  • [fix]: Resolve deadlock in MCP retry logic
  • [refactor]: Simplify model caching mechanism
  • [docs]: Update contribution guidelines for commit messages

Pull Request Description

Use the following template for your PR description:

Best Practices

1. Keep PRs Focused

  • One feature or fix per PR when possible
  • If multiple related changes, group them logically by package
  • Avoid mixing refactoring with feature changes

2. Commit Messages Matter

Bad:
Good:
Bad:
Good:

3. Include All Affected Packages

Always explicitly list which packages/directories are modified:

4. Test Thoroughly

Before opening a PR:

5. Small, Reviewable PRs

  • Aim for <400 lines changed per PR
  • If larger, break into logical commits
  • Each commit should be independently reviewable

6. Update Documentation

  • Update relevant .mdx files in /docs
  • Add comments for complex logic
  • Update README.md if behavior changes

Code Review Checklist

Before requesting review, ensure: ✅ All commits follow [type]: description format ✅ All affected packages are explicitly mentioned ✅ No merge conflicts ✅ All tests pass (make test-all) ✅ Code is properly formatted (make fmt) ✅ No linting issues (make lint) ✅ Documentation is updated ✅ PR description is clear and complete

During Code Review

  • Respond to feedback promptly
  • Push new commits for requested changes (don’t force-push to avoid confusion)
  • Mark conversations as resolved when addressed
  • Ask for clarification if feedback is unclear

Merging

Once approved:
  • The maintainer will handle the merge
  • Your commits will be preserved in the history
  • Ensure your branch is up-to-date with dev before final approval

Common Pitfalls to Avoid

  1. Vague commit messages - Always be specific about what changed
  2. Missing package information - Always list affected packages
  3. Mixing concerns - Keep commits focused
  4. Not running tests - Test locally before opening PR
  5. Large PRs - Break into smaller, reviewable chunks
  6. Not updating docs - If behavior changes, update documentation

Examples of Good Commits

Example 1: Provider Fix

Example 2: Plugin Development

Example 3: Core Refactoring

Need Help?