@@ -907,3 +907,102 @@ maint-assault:
907907# Run panic-attacker pre-commit scan
908908assail:
909909 @command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
910+
911+ # ═══════════════════════════════════════════════════════════════════════════════
912+ # ONBOARDING & DIAGNOSTICS
913+ # ═══════════════════════════════════════════════════════════════════════════════
914+
915+ # Check all required toolchain dependencies and report health
916+ doctor:
917+ #!/usr/bin/env bash
918+ echo "═══════════════════════════════════════════════════"
919+ echo " A2Ml Validate Action Doctor — Toolchain Health Check"
920+ echo "═══════════════════════════════════════════════════"
921+ echo ""
922+ PASS=0; FAIL=0; WARN=0
923+ check() {
924+ local name="$1 " cmd="$2 " min="$3 "
925+ if command -v "$cmd " >/dev/null 2>&1; then
926+ VER=$( " $cmd " --version 2>&1 | head -1)
927+ echo " [OK] $name — $VER "
928+ PASS=$(( PASS + 1 ))
929+ else
930+ echo " [FAIL] $name — not found (need $min +)"
931+ FAIL=$(( FAIL + 1 ))
932+ fi
933+ }
934+ check "just" just "1.25"
935+ check "git" git "2.40"
936+ # Optional tools
937+ if command -v panic-attack >/dev/null 2>&1; then
938+ echo " [OK] panic-attack — available"
939+ PASS=$(( PASS + 1 ))
940+ else
941+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
942+ WARN=$(( WARN + 1 ))
943+ fi
944+ echo ""
945+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
946+ if [ "$FAIL " -gt 0 ]; then
947+ echo " Run 'just heal' to attempt automatic repair."
948+ exit 1
949+ fi
950+ echo " All required tools present."
951+
952+ # Attempt to automatically install missing tools
953+ heal:
954+ #!/usr/bin/env bash
955+ echo "═══════════════════════════════════════════════════"
956+ echo " A2Ml Validate Action Heal — Automatic Tool Installation"
957+ echo "═══════════════════════════════════════════════════"
958+ echo ""
959+ if ! command -v just >/dev/null 2>&1; then
960+ echo "Installing just..."
961+ cargo install just 2>/dev/null || echo "Install just from https://just.systems"
962+ fi
963+ echo ""
964+ echo "Heal complete. Run 'just doctor' to verify."
965+
966+ # Guided tour of the project structure and key concepts
967+ tour:
968+ #!/usr/bin/env bash
969+ echo "═══════════════════════════════════════════════════"
970+ echo " A2Ml Validate Action — Guided Tour"
971+ echo "═══════════════════════════════════════════════════"
972+ echo ""
973+ echo '**GitHub Action to validate A2ML manifest files in your repository.**'
974+ echo ""
975+ echo "Key directories:"
976+ echo " src/ Source code"
977+ echo " docs/ Documentation"
978+ echo " tests/ Test suite"
979+ echo " .github/workflows/ CI/CD workflows"
980+ echo " .machine_readable/ Machine-readable metadata"
981+ echo " container/ Container configuration"
982+ echo " examples/ Usage examples"
983+ echo ""
984+ echo "Quick commands:"
985+ echo " just doctor Check toolchain health"
986+ echo " just heal Fix missing tools"
987+ echo " just help-me Common workflows"
988+ echo " just default List all recipes"
989+ echo ""
990+ echo "Read more: README.adoc, EXPLAINME.adoc"
991+
992+ # Show help for common workflows
993+ help-me:
994+ #!/usr/bin/env bash
995+ echo "═══════════════════════════════════════════════════"
996+ echo " A2Ml Validate Action — Common Workflows"
997+ echo "═══════════════════════════════════════════════════"
998+ echo ""
999+ echo "FIRST TIME SETUP:"
1000+ echo " just doctor Check toolchain"
1001+ echo " just heal Fix missing tools"
1002+ echo ""
1003+ echo "PRE-COMMIT:"
1004+ echo " just assail Run panic-attacker scan"
1005+ echo ""
1006+ echo "LEARN:"
1007+ echo " just tour Guided project tour"
1008+ echo " just default List all recipes"
0 commit comments