Thank you for your interest in contributing to the Ensemble Framework! This guide will help you get started with our development process.
- Node.js >= 18.0.0
- pnpm >= 8.0.0
- Git
# Clone the repository
git clone https://github.com/ensemble-codes/ensemble-framework.git
cd ensemble-framework
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test# Build all packages
pnpm build
# Build specific packages
pnpm build:sdk
pnpm build:cli
pnpm build:contracts
# Run tests
pnpm test
pnpm test:sdk
pnpm test:cli
# Type checking
pnpm typecheckgit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fixMake your changes in the appropriate package directories:
packages/sdk/- TypeScript SDKpackages/cli/- Command-line interfacepackages/contracts/- Smart contractspackages/subgraph/- The Graph subgraphpackages/mcp-server/- MCP server
Please add tests for your changes:
# Run tests during development
pnpm test:sdk
pnpm test:cli
# Run type checking
pnpm typecheckThis step is crucial! Create a changeset to describe your changes:
pnpm changesetThis will:
- Ask which packages have changed
- Ask what type of change (major/minor/patch)
- Prompt you to describe the change
- patch: Bug fixes, small improvements, documentation updates
- minor: New features, new API methods (backwards compatible)
- major: Breaking changes, API changes that break existing code
Example changeset:
---
"@ensemble-ai/sdk": minor
"@ensemble-ai/cli": patch
---
feat: Add new agent filtering capabilities
- SDK: Added `searchAgents()` method for text-based search
- SDK: Added `reputation_min` and `reputation_max` filters
- CLI: Updated `agents list` command to support new filtersgit add .
git commit -m "feat: add new agent filtering capabilities"
git push origin feature/your-feature-name- Open a PR against the
mainbranch - Include a clear description of changes
- Link any related issues
- Ensure CI passes
We use Changesets for version management and releases.
- Merge PR to main: When your PR with a changeset is merged
- Version PR created: GitHub Actions creates a "Release packages" PR
- Review & merge: Review the version bumps and changelog, then merge
- Automatic publish: Packages are automatically published to npm
# Version packages locally
pnpm changeset:version
# Review changes
git diff
# Commit version changes
git add .
git commit -m "chore: version packages"
# Publish to npm
pnpm changeset:publish
# Push with tags
git push --follow-tagsFor alpha/beta releases:
# Enter prerelease mode
pnpm changeset pre enter beta
# Create changesets as normal
pnpm changeset
# Version and publish
pnpm changeset:version
pnpm changeset:publish --tag beta
# Exit prerelease mode when done
pnpm changeset pre exitensemble-framework/
├── packages/
│ ├── sdk/ # @ensemble-ai/sdk
│ ├── cli/ # @ensemble-ai/cli
│ ├── contracts/ # @ensemble-ai/contracts
│ ├── subgraph/ # @ensemble-ai/subgraph
│ ├── mcp-server/ # @ensemble-ai/mcp-server
│ └── python-sdk/ # Python SDK (separate versioning)
├── .changeset/ # Changesets configuration
├── .github/workflows/ # CI/CD workflows
└── docs/ # Documentation
- CLI depends on SDK (
workspace:^) - Contracts are independent
- Subgraph indexes Contracts events
- MCP Server queries Subgraph
- Use TypeScript for all JavaScript/TypeScript code
- Follow existing code formatting (we use Prettier)
- Include JSDoc comments for public APIs
- Use descriptive variable and function names
- Write unit tests for new functionality
- Update integration tests when changing APIs
- Ensure all tests pass before submitting PR
- Aim for good test coverage
- Update README files for significant changes
- Add JSDoc comments to public APIs
- Update examples when changing interfaces
- Include migration guides for breaking changes
For breaking changes:
- Mark changeset as
major - Document the breaking change clearly
- Provide migration guide
- Consider deprecation period if possible
Use conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Test changeschore:- Maintenance tasks
- Follow semantic versioning strictly
- Maintain backward compatibility when possible
- Include comprehensive TypeScript types
- Add integration tests for public APIs
- Maintain command backward compatibility
- Add help text for new commands
- Test commands manually before release
- Update CLI documentation
- Test thoroughly on testnets before mainnet
- Document contract upgrades clearly
- Include deployment addresses in releases
- Follow Solidity best practices
- Version in sync with contract changes
- Test queries thoroughly
- Document schema changes
- Include deployment URLs
- Discord: Join our Discord server for real-time help
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions in GitHub Discussions
Please be respectful and constructive in all interactions. We're building something great together!
Thank you for contributing to Ensemble Framework! 🚀