Last updated: 2026-03-02
Thank you for your interest in contributing to VERITAS. This guide will help you get started.
- Rust 1.74+ (
rustuprecommended) - Git
git clone https://github.com/Chesterguan/veritas.git
cd veritas
cargo test --workspace
cargo run -p demo -- run-allIf all 58 tests pass and the demo runs, you're ready to contribute.
crates/
veritas-contracts/ # Shared types, traits, error types
veritas-core/ # Executor — enforces State → Policy → Capability → Audit → Verify → Next State
veritas-policy/ # TOML-driven deny-by-default policy engine
veritas-audit/ # SHA-256 hash-chained append-only audit trail
veritas-verify/ # JSON Schema + semantic rule verification
veritas-ref-healthcare/ # Healthcare reference runtime (5 demo scenarios)
demo/ # CLI demo runner
tui/ # Interactive TUI demo
docs/ # Whitepaper v0.3 + Yellow Paper v0.1 (EN, ZH, JA, FR)
Edit crates/veritas-policy/policies/healthcare.toml:
[[rules]]
id = "your-rule-id"
description = "What this rule does"
action = "the-action"
resource = "the-resource"
required_capabilities = ["needed.capability"]
verdict = "allow" # or "deny", "require-approval"Register a custom rule in your scenario's run_scenario():
verifier.register_rule("rule-name", Box::new(|payload| {
// Return None if valid, Some("error message") if invalid
None
}));- Create
crates/veritas-ref-healthcare/src/scenarios/your_scenario.rs - Implement the
Agenttrait fromveritas-core - Add a
run_scenario()function - Register it in
scenarios/mod.rs - Add a subcommand in
demo/src/main.rs
See docs/README.md for translation guidelines.
- Follow the 10 design principles (see CLAUDE.md)
- Keep the trusted computing base minimal
- Policy evaluation must be fast — microseconds, not milliseconds
- Agent code is untrusted — never bypass the executor pipeline
- All actions must be auditable
- Write tests for new functionality
Use clear, concise commit messages:
Add drug allergy checking scenario
Implements a new healthcare demo scenario that checks patient
allergies against prescribed medications.
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Make your changes
- Run
cargo test --workspace— all tests must pass - Run
cargo clippy --workspace— no warnings - Submit a PR with a clear description
We follow the Contributor Covenant. Be respectful, constructive, and inclusive.
Open an issue or start a discussion on GitHub.