Skip to content

Commit d54dc5a

Browse files
committed
Add section on Aristo to CONTRIBUTING.md
1 parent 72e8778 commit d54dc5a

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,30 @@ And launch an Antithesis test run with:
413413
scripts/antithesis/launch.sh
414414
```
415415

416+
## Annotating intent with Aristo
417+
418+
Turso uses [Aristo](https://github.com/aretta-ai/aristo) to capture design intent that the code alone doesn't spell out — invariants a refactor could silently break — as `#[aristo::intent("...")]` annotations attached to the code. They're optional; reach for one only when a property is invisible from the signature and not already guarded by a test. For example, on the WAL trait in `core/storage/wal.rs`:
419+
420+
```rust
421+
#[aristo::intent(
422+
"An append-only log that records page-level changes before they are \
423+
applied to the database, so a system crash can be recovered by \
424+
replaying the log.",
425+
verify = "neural",
426+
id = "wal_records_changes_before_apply",
427+
)]
428+
pub trait Wal: Debug + Send + Sync { ... }
429+
```
430+
431+
The macros are a workspace dependency, so annotated code builds normally. To author and lint annotations, install the CLI:
432+
433+
```console
434+
cargo install aristo-cli # provides the `aristo` command
435+
aristo lint # lint annotation prose (also runs in CI on every PR)
436+
```
437+
438+
To machine-check annotations, run `/aristo-neural-verify` in Claude Code.
439+
416440
## Adding Third Party Dependencies
417441

418442
When you want to add third party dependencies, please follow these steps:

0 commit comments

Comments
 (0)