Contributing
RegelRecht is open source and welcomes contributions. This page covers the workflow.
Branching model
The project uses GitFlow:
main- production, always deployablefeature/*- new featuresfix/*- bug fixesdocs/*- documentation changes
Create your branch from main, open a PR back to main.
Commit conventions
Commits follow Conventional Commits:
type(scope): descriptionTypes: feat, fix, docs, style, test, chore, refactor
Subject line should be 72 characters or less and explain why, not what.
Pre-commit hooks
The repository uses pre-commit hooks that run automatically on each commit:
- Trailing whitespace removal
- End-of-file fixer
- YAML linting
- Rust formatting (
just format) - Rust linting (
just lint) - Schema validation on corpus files (
just validate)
Install them after cloning:
bash
pre-commit installDo not bypass hooks with --no-verify. If a hook fails, fix the underlying problem.
Pull request process
- Create a feature branch and push your changes
- Open a PR - CI runs all relevant checks automatically
- A preview deployment is created (see Deployment)
- Get a code review
- Merge to main - production deploys automatically
Code review
Reviewers check for:
- Legal faithfulness - does the
machine_readablesection match the law text? - Cross-law reference correctness - do
sourceblocks point to the right regulations and outputs? - Test coverage - are there BDD scenarios, especially for edge cases?
- Schema compliance - does
just validatepass?
Design decisions (RFCs)
Changes to the law format, engine architecture, or cross-cutting patterns require an RFC. See the RFC process for details.
Use the template at docs/rfcs/template.md to draft your RFC, then open a PR for discussion.
Further reading
- Getting Started - set up your development environment
- Testing - how to write and run tests
- Adding a Law - step-by-step guide for new laws