@@ -914,3 +914,112 @@ build-riscv:
914914# Run panic-attacker pre-commit scan
915915assail:
916916 @command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
917+
918+ # ═══════════════════════════════════════════════════════════════════════════════
919+ # ONBOARDING & DIAGNOSTICS
920+ # ═══════════════════════════════════════════════════════════════════════════════
921+
922+ # Check all required toolchain dependencies and report health
923+ doctor:
924+ #!/usr/bin/env bash
925+ echo "═══════════════════════════════════════════════════"
926+ echo " A2Ml Rs Doctor — Toolchain Health Check"
927+ echo "═══════════════════════════════════════════════════"
928+ echo ""
929+ PASS=0; FAIL=0; WARN=0
930+ check() {
931+ local name="$1 " cmd="$2 " min="$3 "
932+ if command -v "$cmd " >/dev/null 2>&1; then
933+ VER=$( " $cmd " --version 2>&1 | head -1)
934+ echo " [OK] $name — $VER "
935+ PASS=$(( PASS + 1 ))
936+ else
937+ echo " [FAIL] $name — not found (need $min +)"
938+ FAIL=$(( FAIL + 1 ))
939+ fi
940+ }
941+ check "just" just "1.25"
942+ check "git" git "2.40"
943+ check "Rust (cargo)" cargo "1.80"
944+ # Optional tools
945+ if command -v panic-attack >/dev/null 2>&1; then
946+ echo " [OK] panic-attack — available"
947+ PASS=$(( PASS + 1 ))
948+ else
949+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
950+ WARN=$(( WARN + 1 ))
951+ fi
952+ echo ""
953+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
954+ if [ "$FAIL " -gt 0 ]; then
955+ echo " Run 'just heal' to attempt automatic repair."
956+ exit 1
957+ fi
958+ echo " All required tools present."
959+
960+ # Attempt to automatically install missing tools
961+ heal:
962+ #!/usr/bin/env bash
963+ echo "═══════════════════════════════════════════════════"
964+ echo " A2Ml Rs Heal — Automatic Tool Installation"
965+ echo "═══════════════════════════════════════════════════"
966+ echo ""
967+ if ! command -v cargo >/dev/null 2>&1; then
968+ echo "Installing Rust via rustup..."
969+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
970+ source "$HOME /.cargo/env"
971+ fi
972+ if ! command -v just >/dev/null 2>&1; then
973+ echo "Installing just..."
974+ cargo install just 2>/dev/null || echo "Install just from https://just.systems"
975+ fi
976+ echo ""
977+ echo "Heal complete. Run 'just doctor' to verify."
978+
979+ # Guided tour of the project structure and key concepts
980+ tour:
981+ #!/usr/bin/env bash
982+ echo "═══════════════════════════════════════════════════"
983+ echo " A2Ml Rs — Guided Tour"
984+ echo "═══════════════════════════════════════════════════"
985+ echo ""
986+ echo '**AI-Assisted Install:** Just tell any AI assistant: +'
987+ echo ""
988+ echo "Key directories:"
989+ echo " src/ Source code"
990+ echo " docs/ Documentation"
991+ echo " tests/ Test suite"
992+ echo " .github/workflows/ CI/CD workflows"
993+ echo " .machine_readable/ Machine-readable metadata"
994+ echo " container/ Container configuration"
995+ echo " examples/ Usage examples"
996+ echo ""
997+ echo "Quick commands:"
998+ echo " just doctor Check toolchain health"
999+ echo " just heal Fix missing tools"
1000+ echo " just help-me Common workflows"
1001+ echo " just default List all recipes"
1002+ echo ""
1003+ echo "Read more: README.adoc, EXPLAINME.adoc"
1004+
1005+ # Show help for common workflows
1006+ help-me:
1007+ #!/usr/bin/env bash
1008+ echo "═══════════════════════════════════════════════════"
1009+ echo " A2Ml Rs — Common Workflows"
1010+ echo "═══════════════════════════════════════════════════"
1011+ echo ""
1012+ echo "FIRST TIME SETUP:"
1013+ echo " just doctor Check toolchain"
1014+ echo " just heal Fix missing tools"
1015+ echo ""
1016+ echo "DEVELOPMENT:"
1017+ echo " cargo build Build the project"
1018+ echo " cargo test Run tests"
1019+ echo ""
1020+ echo "PRE-COMMIT:"
1021+ echo " just assail Run panic-attacker scan"
1022+ echo ""
1023+ echo "LEARN:"
1024+ echo " just tour Guided project tour"
1025+ echo " just default List all recipes"
0 commit comments