Thank you for your interest in contributing to CTF! We welcome contributions from the community.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please read CODE_OF_CONDUCT.md.
If you find a bug, please open an issue with:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Your environment (OS, Node.js version, etc.)
- Sample data (if applicable)
We welcome suggestions for new features or improvements! Please open an issue with:
- A clear, descriptive title
- Detailed description of the proposed feature
- Use cases and benefits
- Examples (if applicable)
- Fork the repository and create a new branch from
main - Make your changes with clear, descriptive commits
- Add tests for any new functionality
- Ensure all tests pass (
npm test) - Update documentation if needed
- Submit a pull request with a clear description
- Follow the existing code style
- Write clear commit messages
- Keep pull requests focused on a single change
- Update tests and documentation
- Ensure CI passes
# Clone the repository
git clone https://github.com/ctf-format/ctf.git
cd ctf
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Run benchmarks
npm run benchmarkctf-format/
├── packages/
│ ├── ctf-core/ # Core encoder/decoder
│ ├── ctf-cli/ # CLI tool
│ └── ctf-python/ # Python implementation (future)
├── benchmarks/ # Performance benchmarks
├── docs/ # Documentation
└── conformance/ # Cross-implementation tests
- TypeScript for all core code
- ESLint for linting
- Prettier for formatting
- Vitest for testing
- 90%+ test coverage for new code
All contributions must include appropriate tests:
- Unit tests for individual functions
- Integration tests for feature interactions
- Round-trip tests for encode/decode pairs
Run tests:
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # With coverage reportUpdate documentation when:
- Adding new features
- Changing public APIs
- Fixing bugs that affect behavior
- Adding examples
Documentation locations:
README.md- Main overview and quick startSPECIFICATION.md- Format specificationdocs/- Detailed guides and examples- Code comments - For complex logic
Changes to the CTF specification require:
- Discussion in an issue first
- Updating
SPECIFICATION.md - Updating all implementations
- Adding conformance tests
- Updating documentation and examples
Use clear, descriptive commit messages:
Add reference compression for repeated strings
- Implement ReferenceManager class
- Add auto-detection logic
- Update encoder to use references
- Add tests for reference compression
We follow Semantic Versioning:
- MAJOR - Incompatible API changes
- MINOR - New functionality (backward compatible)
- PATCH - Bug fixes (backward compatible)
If you have questions, feel free to:
- Open an issue for discussion
- Join our community discussions
- Reach out to the maintainers
Contributors are recognized in:
- GitHub contributors list
- Release notes
- Project documentation
Thank you for contributing to CTF Format! 🎉