@@ -451,3 +451,105 @@ edit:
451451# Run panic-attacker pre-commit scan
452452assail:
453453 @command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
454+
455+ # ═══════════════════════════════════════════════════════════════════════════════
456+ # ONBOARDING & DIAGNOSTICS
457+ # ═══════════════════════════════════════════════════════════════════════════════
458+
459+ # Check all required toolchain dependencies and report health
460+ doctor:
461+ #!/usr/bin/env bash
462+ echo "═══════════════════════════════════════════════════"
463+ echo " Explicit Trust Plane Doctor — Toolchain Health Check"
464+ echo "═══════════════════════════════════════════════════"
465+ echo ""
466+ PASS=0; FAIL=0; WARN=0
467+ check() {
468+ local name="$1" cmd="$2" min="$3"
469+ if command -v "$cmd" >/dev/null 2>&1; then
470+ VER=$("$cmd" --version 2>&1 | head -1)
471+ echo " [OK] $name — $VER"
472+ PASS=$((PASS + 1))
473+ else
474+ echo " [FAIL] $name — not found (need $min+)"
475+ FAIL=$((FAIL + 1))
476+ fi
477+ }
478+ check "just" just "1.25"
479+ check "git" git "2.40"
480+ check "Zig" zig "0.13"
481+ # Optional tools
482+ if command -v panic-attack >/dev/null 2>&1; then
483+ echo " [OK] panic-attack — available"
484+ PASS=$((PASS + 1))
485+ else
486+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
487+ WARN=$((WARN + 1))
488+ fi
489+ echo ""
490+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
491+ if [ "$FAIL" -gt 0 ]; then
492+ echo " Run 'just heal' to attempt automatic repair."
493+ exit 1
494+ fi
495+ echo " All required tools present."
496+
497+ # Attempt to automatically install missing tools
498+ heal:
499+ #!/usr/bin/env bash
500+ echo "═══════════════════════════════════════════════════"
501+ echo " Explicit Trust Plane Heal — Automatic Tool Installation"
502+ echo "═══════════════════════════════════════════════════"
503+ echo ""
504+ if ! command -v just >/dev/null 2>&1; then
505+ echo "Installing just..."
506+ cargo install just 2>/dev/null || echo "Install just from https://just.systems"
507+ fi
508+ echo ""
509+ echo "Heal complete. Run 'just doctor' to verify."
510+
511+ # Guided tour of the project structure and key concepts
512+ tour:
513+ #!/usr/bin/env bash
514+ echo "═══════════════════════════════════════════════════"
515+ echo " Explicit Trust Plane — Guided Tour"
516+ echo "═══════════════════════════════════════════════════"
517+ echo ""
518+ echo '// SPDX-License-Identifier: PMPL-1.0-or-later'
519+ echo ""
520+ echo "Key directories:"
521+ echo " src/ Source code"
522+ echo " ffi/ Foreign function interface (Zig)"
523+ echo " src/abi/ Idris2 ABI definitions"
524+ echo " docs/ Documentation"
525+ echo " tests/ Test suite"
526+ echo " .github/workflows/ CI/CD workflows"
527+ echo " contractiles/ Must/Trust/Dust contracts"
528+ echo " .machine_readable/ Machine-readable metadata"
529+ echo " examples/ Usage examples"
530+ echo ""
531+ echo "Quick commands:"
532+ echo " just doctor Check toolchain health"
533+ echo " just heal Fix missing tools"
534+ echo " just help-me Common workflows"
535+ echo " just default List all recipes"
536+ echo ""
537+ echo "Read more: README.adoc, EXPLAINME.adoc"
538+
539+ # Show help for common workflows
540+ help-me:
541+ #!/usr/bin/env bash
542+ echo "═══════════════════════════════════════════════════"
543+ echo " Explicit Trust Plane — Common Workflows"
544+ echo "═══════════════════════════════════════════════════"
545+ echo ""
546+ echo "FIRST TIME SETUP:"
547+ echo " just doctor Check toolchain"
548+ echo " just heal Fix missing tools"
549+ echo ""
550+ echo "PRE-COMMIT:"
551+ echo " just assail Run panic-attacker scan"
552+ echo ""
553+ echo "LEARN:"
554+ echo " just tour Guided project tour"
555+ echo " just default List all recipes"
0 commit comments