We welcome contributions to ZeroGraph TypeScript! This document provides guidelines for contributing to the project.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/zero-graph.git - Install dependencies:
npm install - Create a feature branch:
git checkout -b feature/your-feature-name
- Node.js 16 or higher
- npm or yarn
npm run buildnpm testnpm run lintnpm run format@u0z/zero-graph/
├── src/ # Core framework source code
├── examples/ # Usage examples
├── docs/ # Documentation
├── tests/ # Test files
└── dist/ # Built files (generated)
- Use TypeScript for all code
- Follow the existing code style
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Keep functions small and focused
- Write tests for new features
- Ensure all tests pass before submitting
- Aim for good test coverage
- Use descriptive test names
- Update documentation for new features
- Include examples in documentation
- Keep README.md up to date
- Add JSDoc comments for public APIs
- Create a feature branch from
main - Make your changes following the code style
- Add tests for new functionality
- Update documentation as needed
- Run tests and ensure they pass
- Submit a pull request with a clear description
## Description
Brief description of the changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tests added/updated
- [ ] All tests pass
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or properly documented)- Use strict TypeScript settings
- Provide proper type annotations
- Avoid
anytype when possible - Use interfaces for object types
- Follow the prep/exec/post pattern
- Keep nodes focused on single responsibility
- Implement proper error handling
- Use meaningful action names
- Design clear flow graphs
- Handle all possible paths
- Use descriptive action names
- Avoid deep nesting
When adding new examples:
- Create a new directory under
examples/ - Include a comprehensive README.md
- Add proper TypeScript types
- Include error handling
- Add to the examples overview
When updating documentation:
- Keep it clear and concise
- Include code examples
- Update table of contents
- Test all code examples
Use clear, descriptive commit messages:
feat: add AsyncParallelBatchNode for concurrent processing
fix: resolve memory leak in Flow orchestration
docs: update README with installation instructions
test: add unit tests for BatchNode
- Use the bug report template
- Include minimal reproduction case
- Provide environment details
- Include error messages/stack traces
- Use the feature request template
- Explain the use case
- Provide examples if possible
- Consider backward compatibility
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Follow the project's code of conduct
- Check the documentation
- Search existing issues
- Create a new issue
By contributing, you agree that your contributions will be licensed under the MIT License.