This file serves as the single point of truth for AI agents working on the Reliquary project.
- Goal: Physical media preservation — track collections, manage capture/extraction, record provenance.
- Repository:
TwoWells/Reliquaryon GitHub. - License: AGPL-3.0-or-later with commercial license option.
Rust workspace. The library crate produces data. CLI/TUI/web crates own presentation and interaction.
- Edition: Rust 2024.
- Safety:
unsafecode is strictly forbidden (forbid(unsafe_code)). - Error Handling: Use
anyhowfor application logic andthiserrorfor library errors. - Strict Denials: Do NOT use
unwrap(),panic!(),todo!(),unimplemented!(),dbg!(),println!(), oreprintln!(). Use proper error handling and thetracingcrate for logging.expect()is denied in production code but allowed in#[cfg(test)]modules — preferexpect("reason")overanyhowworkarounds in tests. - Assertions: All
assert!(),assert_eq!(), andassert_ne!()calls must include a message explaining what failed. - Imports: No wildcard imports (
use crate::*). - Formatting: Code must be formatted with
rustfmt. - Linting: Must pass
cargo clippywithpedantic,nursery, andcargogroups enabled. Every#[allow(...)]must include areasonstring.
- Format: Conventional Commits (enforced by commit-msg hook).
- Pattern:
type(scope): descriptionortype: description - Types:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert - Breaking changes: append
!before colon, e.g.feat(api)!: remove legacy endpoint - Examples:
feat(aacs): add AACS decryption modulefix(cli): correct VUK hex parsingtest(clpi): add multi-program parser testchore: bump version to 0.2.0
- License Compliance: All new dependencies MUST have permissive licenses (MIT, Apache-2.0, etc.) as specified in
@./deny.toml. Reliquary is dual-licensed under AGPL-3.0-or-later and a commercial license. - Copyright Headers: Every
.rsfile must start with the SPDX header (enforced by pre-commit hook):// SPDX-License-Identifier: AGPL-3.0-or-later // Copyright (C) 2026 Two Wells <contact@twowells.dev> - Documentation: All public APIs must have documentation comments.
- Testing: All new features must include tests.
This is a public repository. Two classes of data must never appear in it — not in code, comments, tests, or commit messages:
- AACS VUKs and disc IDs. These are decryption keys/identifiers. Never hardcode a real VUK (32 hex chars, optionally
0x-prefixed) or disc ID; pass keys at runtime (--vuk) or via a gitignored file. A pre-commit hook blocks VUK-shaped values — for synthetic test vectors use the all-zero placeholder or mark the linevuk-allow. - Real disc / movie titles. They reveal a private physical collection. Use generic descriptors instead — e.g. "a WB Blu-ray title", "a DVD title", "WB animated series". Name test fixtures and comments by what they exercise (codec, structure), not by the source disc.
- First time:
make setup— configures git hooks and checks for required cargo tools. - Required tools: cargo-deny, cargo-machete, cargo-nextest, cargo-semver-checks, cargo-mutants.
- Install tools:
cargo binstall cargo-deny cargo-machete cargo-nextest cargo-semver-checks cargo-mutants
- Check (full):
make check— format, lint, deny, machete, and test in one pass. - Test (all):
make test - Test (filtered):
make test T=<filter> - Test (repeat):
make test T=<filter> N=<count>
- Patch Release:
make release-patch - Minor Release:
make release-minor - Major Release:
make release-major - Custom Version:
make release V=x.y.z
Release runs: check → semver-checks → mutation tests (library crate) → commit → tag.