# SPDX-License-Identifier: MPL-2.0 # verisimiser — Augment any database with VeriSimDB octad capabilities # Default: build and test import? "contractile.just" default: build test # Build release binary build: cargo build --release # Run all tests test: cargo test # Run clippy lints lint: cargo clippy -- -D warnings # Format code fmt: cargo fmt # Check formatting without modifying fmt-check: cargo fmt -- --check # Build documentation doc: cargo doc --no-deps --open # Clean build artifacts clean: cargo clean # Run the CLI run *ARGS: cargo run -- {{ARGS}} # Full quality check (lint + test + fmt-check) quality: fmt-check lint test @echo "All quality checks passed" # Install locally install: cargo install --path . # Run panic-attacker pre-commit scan assail: @command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker" # --- Domain-Specific Recipes (verisimiser) --- # # (Reserved.) Recipes for clap subcommands like `augment`, `check-octad`, # and `migrate` were removed per ADR-0003: they wrapped subcommands that # don't exist in src/main.rs (the real subcommands are `init`, `generate`, # `start`, `drift`, `provenance`, `history`, `status`, `octad`). # Re-add wrappers here when their underlying subcommands ship. # Verify that every `just ` in the docs is actually defined here. # Guards against template leftovers (just setup / e2e / check-error-codes). doc-recipes: ./scripts/check-doc-recipes.sh # Run contractile checks (informational only — not required by CI per ADR-0008) contractile-check: @echo "Running contractile validation..." @test -f .machine_readable/contractiles/must/Mustfile.a2ml && echo "Mustfile: OK" || echo "Mustfile: MISSING" @test -f .machine_readable/contractiles/trust/Trustfile.a2ml && echo "Trustfile: OK" || echo "Trustfile: MISSING" @test -f .machine_readable/contractiles/dust/Dustfile.a2ml && echo "Dustfile: OK" || echo "Dustfile: MISSING" @test -f .machine_readable/contractiles/intend/Intendfile.a2ml && echo "Intendfile: OK" || echo "Intendfile: MISSING" # RSR compliance check rsr-check: quality contractile-check @echo "RSR compliance check complete" # Self-diagnostic — checks dependencies, permissions, paths doctor: @echo "Running diagnostics for verisimiser..." @echo "Checking required tools..." @command -v just >/dev/null 2>&1 && echo " [OK] just" || echo " [FAIL] just not found" @command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found" @echo "Checking for hardcoded paths..." @grep -rn '$HOME\|$ECLIPSE_DIR' --include='*.rs' --include='*.ex' --include='*.res' --include='*.gleam' --include='*.sh' . 2>/dev/null | head -5 || echo " [OK] No hardcoded paths" @echo "Diagnostics complete." # Auto-repair common issues heal: @echo "Attempting auto-repair for verisimiser..." @echo "Fixing permissions..." @find . -name "*.sh" -exec chmod +x {} \; 2>/dev/null || true @echo "Cleaning stale caches..." @rm -rf .cache/stale 2>/dev/null || true @echo "Repair complete." # Guided tour of key features tour: @echo "=== verisimiser Tour ===" @echo "" @echo "1. Project structure:" @ls -la @echo "" @echo "2. Available commands: just --list" @echo "" @echo "3. Read README.adoc for full overview" @echo "4. Read EXPLAINME.adoc for architecture decisions" @echo "5. Run 'just doctor' to check your setup" @echo "" @echo "Tour complete! Try 'just --list' to see all available commands." # Open feedback channel with diagnostic context help-me: @echo "=== verisimiser Help ===" @echo "Platform: $(uname -s) $(uname -m)" @echo "Shell: $SHELL" @echo "" @echo "To report an issue:" @echo " https://github.com/hyperpolymath/verisimiser/issues/new" @echo "" @echo "Include the output of 'just doctor' in your report." # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line) crg-grade: @grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \ [ -z "$$grade" ] && grade="X"; \ echo "$$grade" # Generate a shields.io badge markdown for the current CRG grade # Looks for '**Current Grade:** X' in READINESS.md; falls back to X crg-badge: @grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \ [ -z "$$grade" ] && grade="X"; \ case "$$grade" in \ A) color="brightgreen" ;; B) color="green" ;; C) color="yellow" ;; \ D) color="orange" ;; E) color="red" ;; F) color="critical" ;; \ *) color="lightgrey" ;; esac; \ echo "[![CRG $$grade](https://img.shields.io/badge/CRG-$$grade-$$color?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)" # Install dev dependencies (invoked by the devcontainer postCreateCommand). # Installs the pinned Zig FFI toolchain, then warms the Cargo cache. deps: ./scripts/install-zig.sh cargo fetch