diff --git a/contractile.just b/contractile.just index 8f99137..24ba515 100644 --- a/contractile.just +++ b/contractile.just @@ -71,5 +71,3 @@ trust-no-secrets-committed: # Containerfile base images use pinned digests trust-container-images-pinned: test ! -f Containerfile || grep -q '@sha256:' Containerfile - - diff --git a/Justfile b/justfile similarity index 58% rename from Justfile rename to justfile index 8c62ad7..15fc7bb 100644 --- a/Justfile +++ b/justfile @@ -219,115 +219,4 @@ build-riscv: # 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" - -# ═══════════════════════════════════════════════════════════════════════════════ -# ONBOARDING & DIAGNOSTICS -# ═══════════════════════════════════════════════════════════════════════════════ - -# Check all required toolchain dependencies and report health -doctor: - #!/usr/bin/env bash - echo "═══════════════════════════════════════════════════" - echo " Conative Gating Doctor — Toolchain Health Check" - echo "═══════════════════════════════════════════════════" - echo "" - PASS=0; FAIL=0; WARN=0 - check() { - local name="$1" cmd="$2" min="$3" - if command -v "$cmd" >/dev/null 2>&1; then - VER=$("$cmd" --version 2>&1 | head -1) - echo " [OK] $name — $VER" - PASS=$((PASS + 1)) - else - echo " [FAIL] $name — not found (need $min+)" - FAIL=$((FAIL + 1)) - fi - } - check "just" just "1.25" - check "git" git "2.40" - check "Rust (cargo)" cargo "1.80" - check "Zig" zig "0.13" -# Optional tools -if command -v panic-attack >/dev/null 2>&1; then - echo " [OK] panic-attack — available" - PASS=$((PASS + 1)) -else - echo " [WARN] panic-attack — not found (pre-commit scanner)" - WARN=$((WARN + 1)) -fi - echo "" - echo " Result: $PASS passed, $FAIL failed, $WARN warnings" - if [ "$FAIL" -gt 0 ]; then - echo " Run 'just heal' to attempt automatic repair." - exit 1 - fi - echo " All required tools present." - -# Attempt to automatically install missing tools -heal: - #!/usr/bin/env bash - echo "═══════════════════════════════════════════════════" - echo " Conative Gating Heal — Automatic Tool Installation" - echo "═══════════════════════════════════════════════════" - echo "" -if ! command -v cargo >/dev/null 2>&1; then - echo "Installing Rust via rustup..." - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source "$HOME/.cargo/env" -fi -if ! command -v just >/dev/null 2>&1; then - echo "Installing just..." - cargo install just 2>/dev/null || echo "Install just from https://just.systems" -fi - echo "" - echo "Heal complete. Run 'just doctor' to verify." - -# Guided tour of the project structure and key concepts -tour: - #!/usr/bin/env bash - echo "═══════════════════════════════════════════════════" - echo " Conative Gating — Guided Tour" - echo "═══════════════════════════════════════════════════" - echo "" - echo 'Jonathan D.A. Jewell ' - echo "" - echo "Key directories:" - echo " src/ Source code" - echo " ffi/ Foreign function interface (Zig)" - echo " src/abi/ Idris2 ABI definitions" - echo " docs/ Documentation" - echo " .github/workflows/ CI/CD workflows" - echo " contractiles/ Must/Trust/Dust contracts" - echo " .machine_readable/ Machine-readable metadata" - echo " examples/ Usage examples" - echo "" - echo "Quick commands:" - echo " just doctor Check toolchain health" - echo " just heal Fix missing tools" - echo " just help-me Common workflows" - echo " just default List all recipes" - echo "" - echo "Read more: README.adoc, EXPLAINME.adoc" - -# Show help for common workflows -help-me: - #!/usr/bin/env bash - echo "═══════════════════════════════════════════════════" - echo " Conative Gating — Common Workflows" - echo "═══════════════════════════════════════════════════" - echo "" -echo "FIRST TIME SETUP:" -echo " just doctor Check toolchain" -echo " just heal Fix missing tools" -echo "" - echo "DEVELOPMENT:" - echo " cargo build Build the project" - echo " cargo test Run tests" - echo "" -echo "PRE-COMMIT:" -echo " just assail Run panic-attacker scan" -echo "" -echo "LEARN:" -echo " just tour Guided project tour" -echo " just default List all recipes" + @command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"