Thank you for your interest in contributing to Catalyst! We welcome contributions from the community and are excited to work with you.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
There are many ways to contribute to Catalyst:
- Report bugs - Help us identify and fix issues
- Suggest features - Share ideas for new functionality
- Improve documentation - Make our docs clearer and more comprehensive
- Submit code - Fix bugs or implement new features
- Review pull requests - Help others improve their contributions
- Answer questions - Help other users in Discussions
Before creating a new issue:
- Search existing issues to avoid duplicates
- Use issue templates when available
- Provide clear reproduction steps for bugs
- Include system information:
- Operating System and version
- Node.js version (
node --version) - npm version (
npm --version) - Catalyst version (
catalyst --version)
- Add relevant labels to help categorize the issue
Follow these steps to submit a pull request:
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR-USERNAME/catalyst.git
cd catalyst
git remote add upstream https://github.com/your-org/catalyst.gitgit checkout -b feature/amazing-featureUse descriptive branch names:
feature/add-xyz- New featuresfix/issue-123- Bug fixesdocs/update-readme- Documentationrefactor/cleanup-utils- Code refactoringtest/add-xyz-tests- Adding tests
Follow the comprehensive guide in docs/guides/development.md:
npm install
npm run build
npm test- Write clean, readable code
- Follow the coding standards (see below)
- Add tests for new functionality
- Update documentation as needed
- Keep commits focused and atomic
Run the full test suite:
npm run checkThis runs:
- Type checking (
npm run type-check) - Linting (
npm run lint) - Code formatting check (
npm run format:check) - All tests (
npm test)
Follow the Conventional Commits specification:
git commit -m "feat: add amazing new feature"
git commit -m "fix: resolve issue with X"
git commit -m "docs: update installation guide"
git commit -m "test: add tests for utility functions"
git commit -m "refactor: simplify error handling"
git commit -m "chore: update dependencies"Commit message format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style changes (formatting, etc.)refactor- Code refactoringtest- Adding or updating testschore- Maintenance tasks (dependencies, build config, etc.)perf- Performance improvementsci- CI/CD changes
Examples:
feat(cli): add support for configuration file
Implements YAML-based configuration for the CLI, allowing users
to set default options and customize behavior.
Closes #123
fix(mcp): resolve connection timeout issue
The MCP server connection was timing out due to incorrect
initialization order. This fix ensures proper sequencing.
Fixes #456
git push origin feature/amazing-featureThen create a Pull Request on GitHub:
- Go to your fork on GitHub
- Click "Compare & pull request"
- Fill out the PR template
- Link related issues
- Request review from maintainers
Good PRs:
- Have a clear, descriptive title
- Include a detailed description of changes
- Reference related issues
- Include tests for new functionality
- Update documentation
- Pass all CI checks
- Are focused on a single concern
PR Checklist:
- Code follows project coding standards
- Tests added/updated and passing
- Documentation updated
- Commit messages follow Conventional Commits
- No merge conflicts
- All CI checks passing
- Changes are backwards compatible (or breaking changes documented)
- Use TypeScript strict mode - All code must pass strict type checking
- Avoid
any- Use proper types orunknownwith type guards - Use interfaces for objects - Prefer interfaces over type aliases for object shapes
- Leverage type inference - Don't over-annotate when types can be inferred
- Use const assertions - For readonly data:
as const
We use ESLint and Prettier for consistent code style:
npm run lint # Check for issues
npm run lint:fix # Auto-fix issues
npm run format # Format code
npm run format:check # Check formattingKey conventions:
- Indentation: 2 spaces
- Quotes: Single quotes for strings
- Semicolons: Required
- Line length: 100 characters (soft limit)
- Trailing commas: Always in multi-line objects/arrays
- File naming: Use kebab-case (
my-file.ts) - Class naming: PascalCase (
MyClass) - Function naming: camelCase (
myFunction) - Constants: UPPER_SNAKE_CASE (
MAX_RETRY_COUNT) - One export per file for main functionality (helpers can be co-located)
- Barrel exports: Use
index.tsfiles to re-export from directories
- JSDoc comments for all public functions, classes, and interfaces
- Inline comments for complex logic
- README updates for user-facing changes
- Architecture docs for significant design changes
Example JSDoc:
/**
* Validates a configuration file against the schema.
*
* @param configPath - Path to the configuration file
* @param schema - Zod schema to validate against
* @returns Parsed and validated configuration object
* @throws {ValidationError} If configuration is invalid
*
* @example
* ```typescript
* const config = validateConfig('./catalyst.yaml', configSchema);
* ```
*/
export function validateConfig<T>(
configPath: string,
schema: z.ZodSchema<T>
): T {
// Implementation
}- Aim for >80% coverage on all new code
- 100% coverage for utility functions
- Integration tests for CLI commands
- Unit tests for individual functions and classes
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
describe('FeatureName', () => {
beforeEach(() => {
// Setup
});
afterEach(() => {
// Cleanup
});
describe('functionName', () => {
it('should handle the happy path', () => {
// Arrange
const input = 'test';
// Act
const result = functionName(input);
// Assert
expect(result).toBe('expected');
});
it('should handle edge cases', () => {
// Test edge cases
});
it('should throw on invalid input', () => {
// Test error cases
expect(() => functionName(null)).toThrow();
});
});
});npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # With coverage
npm run test:ui # Interactive UIUpdate documentation when:
- Adding new features
- Changing existing behavior
- Modifying CLI commands or options
- Updating dependencies with breaking changes
- Changing configuration options
Documentation to update:
README.md- User-facing features and installationdocs/guides/development.md- Development workflow changesdocs/architecture/- Architectural decisions and system design- JSDoc comments - Public API documentation
- Inline comments - Complex implementation details
See the comprehensive Development Guide for:
- Prerequisites and installation
- Development workflow
- Testing strategies
- Debugging techniques
- Troubleshooting common issues
catalyst/
├── src/ # Source code
│ ├── cli/ # CLI implementation
│ ├── core/ # Core functionality
│ ├── mcp/ # MCP server management
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── tests/ # Test files
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── fixtures/ # Test fixtures
├── docs/ # Documentation
│ ├── architecture/ # Architecture docs
│ ├── guides/ # User and developer guides
│ ├── prd/ # Product requirements
│ └── stories/ # Development stories
├── templates/ # Project templates
├── mcp-servers/ # Bundled MCP servers
└── bin/ # CLI entry point
Releases are managed by project maintainers:
- Version bump following Semantic Versioning
- Update CHANGELOG.md
- Create release tag
- Publish to npm (when ready)
- Update Homebrew formula
- Documentation Index - All documentation
- Development Guide - Development workflow
- Architecture - System design
- PRD - Product requirements
- Questions: GitHub Discussions
- Bug Reports: GitHub Issues
- Real-time Chat: Discord Server (coming soon)
- @NimbleEngineer21 - Project Lead
Contributors are recognized in:
- Release notes
- CHANGELOG.md
- GitHub contributors page
- Project README
By contributing to Catalyst, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
This is a strong copyleft license that requires:
- Source code availability for derivative works
- Same license for modifications
- Network use triggers distribution requirements
- Patent grant to users
See LICENSE for full details.
Thank you for contributing to Catalyst! 🚀
Your contributions help make AI-powered development accessible to everyone.