Thank you for your interest in contributing to CLP!
By participating in this project, you agree to follow our Code of Conduct.
- Node.js >= 18
- pnpm (recommended) or npm
# Clone the repository
git clone https://github.com/yav-ai/clp.git
cd clp
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm testclp/
├── packages/
│ └── clp/ # Core runtime library
│ └── src/
│ ├── engine.ts # Main execution engine
│ ├── runtime.ts # Runtime factory
│ ├── contract.ts # Contract definitions
│ ├── guard.ts # Guard interfaces
│ ├── intent.ts # Intent types
│ ├── transition.ts # Transition types
│ └── log.ts # Audit logging
├── examples/
│ ├── counter/ # Simple counter example
│ ├── flight/ # Flight booking example
│ └── reminder/ # Reminder example
└── ROADMAP.md # Future plans
- Search existing issues first
- Create a new issue with:
- Clear title
- Steps to reproduce
- Expected vs actual behavior
- Environment details
- Check the ROADMAP first
- Open a discussion issue
- Explain the use case and proposed API
- Fork the repo
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Add tests for new functionality
- Ensure tests pass:
npm test - Commit using conventional commits (see below)
- Push and open a PR
We use Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Code style (formatting)refactor: Code refactoringtest: Testschore: Maintenance
Examples:
feat(engine): add support for async transitions
fix(guard): resolve guard evaluation order
docs(readme): update API usage examples
test: add tests for deep state merge
- Use strict mode
- Prefer interfaces over types for public APIs
- Document complex logic with JSDoc
- Aim for 100% coverage on runtime code
- Test edge cases, not just happy paths
- Use descriptive test names
// Good
it("should throw when guard denies access to restricted resource");
// Avoid
it("should work correctly");- Use meaningful variable names
- Keep functions small and focused
- Extract magic numbers into constants
- Maintainer merges PR to main
- Version bump based on conventional commits:
feat→ minor releasefix→ patch releaseBREAKING CHANGE→ major release
- GitHub Actions publishes to npm
- Open a discussion: https://github.com/yav-ai/clp/discussions
- Email: contact@yav.ai
Thank you for helping make CLP better!