This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
cargo build # Debug build
cargo build --release # Release build
cargo test # Run tests
cargo fmt # Format code
cargo clippy # Lint check
cargo run -- <args> # Run locallyThis is a Rust CLI tool for managing Verilib verification repositories. The codebase is organized into five main modules:
src/main.rs- Entry point with async Tokio runtime. Parses CLI args and dispatches to command handlers.src/cli.rs- Clap-based CLI definitions. Two command groups: repository commands and structure commands.src/commands/- Command implementations (auth, init, deploy, pull, atomize, verify, etc.)src/download/- HTTP client layer for Verilib API interactionssrc/storage/- Credential storage abstraction with platform-specific backends (keyring, file)src/structure/- Verification structure file management, merged from verilib-structure
- All async handlers return
anyhow::Result<()>with?for error propagation - Platform-specific code uses conditional compilation (
#[cfg(target_os = "...")]) - Credential storage uses a factory pattern in
storage/factory.rs - Structure files use YAML frontmatter in
.mdfiles, parsed bystructure/frontmatter.rs
- probe-verus - Required for
create,atomize,specify, andverifycommands. Must be installed and in PATH.
Local project config is stored in .verilib/:
config.json- Repository ID, API URL, structure-root pathstubs.json- Enriched metadata from probe-verus stubifyatoms.json- SCIP atom data from probe-verus atomizestructure/-.mdstub files with YAML frontmattercerts/specs/- Specification certificates
When adding, changing, or removing CLI options or commands, update README.md accordingly.
When adding, changing, or removing features, update tests in tests/ accordingly. Run cargo test to verify.
Releases use cargo-dist. Tag with semver pattern to trigger GitHub Actions:
git tag 0.1.7
git push --tags