@@ -486,3 +486,99 @@ sync-metadata:
486486# Run panic-attacker pre-commit scan
487487assail:
488488 @command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
489+
490+ # ═══════════════════════════════════════════════════════════════════════════════
491+ # ONBOARDING & DIAGNOSTICS
492+ # ═══════════════════════════════════════════════════════════════════════════════
493+
494+ # Check all required toolchain dependencies and report health
495+ doctor:
496+ #!/usr/bin/env bash
497+ echo "═══════════════════════════════════════════════════"
498+ echo " Asdf Tool Plugins Doctor — Toolchain Health Check"
499+ echo "═══════════════════════════════════════════════════"
500+ echo ""
501+ PASS=0; FAIL=0; WARN=0
502+ check() {
503+ local name="$1 " cmd="$2 " min="$3 "
504+ if command -v "$cmd " >/dev/null 2>&1; then
505+ VER=$( " $cmd " --version 2>&1 | head -1)
506+ echo " [OK] $name — $VER "
507+ PASS=$(( PASS + 1 ))
508+ else
509+ echo " [FAIL] $name — not found (need $min +)"
510+ FAIL=$(( FAIL + 1 ))
511+ fi
512+ }
513+ check "just" just "1.25"
514+ check "git" git "2.40"
515+ # Optional tools
516+ if command -v panic-attack >/dev/null 2>&1; then
517+ echo " [OK] panic-attack — available"
518+ PASS=$(( PASS + 1 ))
519+ else
520+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
521+ WARN=$(( WARN + 1 ))
522+ fi
523+ echo ""
524+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
525+ if [ "$FAIL " -gt 0 ]; then
526+ echo " Run 'just heal' to attempt automatic repair."
527+ exit 1
528+ fi
529+ echo " All required tools present."
530+
531+ # Attempt to automatically install missing tools
532+ heal:
533+ #!/usr/bin/env bash
534+ echo "═══════════════════════════════════════════════════"
535+ echo " Asdf Tool Plugins Heal — Automatic Tool Installation"
536+ echo "═══════════════════════════════════════════════════"
537+ echo ""
538+ if ! command -v just >/dev/null 2>&1; then
539+ echo "Installing just..."
540+ cargo install just 2>/dev/null || echo "Install just from https://just.systems"
541+ fi
542+ echo ""
543+ echo "Heal complete. Run 'just doctor' to verify."
544+
545+ # Guided tour of the project structure and key concepts
546+ tour:
547+ #!/usr/bin/env bash
548+ echo "═══════════════════════════════════════════════════"
549+ echo " Asdf Tool Plugins — Guided Tour"
550+ echo "═══════════════════════════════════════════════════"
551+ echo ""
552+ echo '// SPDX-License-Identifier: PMPL-1.0-or-later'
553+ echo ""
554+ echo "Key directories:"
555+ echo " tests/ Test suite"
556+ echo " .github/workflows/ CI/CD workflows"
557+ echo " contractiles/ Must/Trust/Dust contracts"
558+ echo " .machine_readable/ Machine-readable metadata"
559+ echo ""
560+ echo "Quick commands:"
561+ echo " just doctor Check toolchain health"
562+ echo " just heal Fix missing tools"
563+ echo " just help-me Common workflows"
564+ echo " just default List all recipes"
565+ echo ""
566+ echo "Read more: README.adoc, EXPLAINME.adoc"
567+
568+ # Show help for common workflows
569+ help-me:
570+ #!/usr/bin/env bash
571+ echo "═══════════════════════════════════════════════════"
572+ echo " Asdf Tool Plugins — Common Workflows"
573+ echo "═══════════════════════════════════════════════════"
574+ echo ""
575+ echo "FIRST TIME SETUP:"
576+ echo " just doctor Check toolchain"
577+ echo " just heal Fix missing tools"
578+ echo ""
579+ echo "PRE-COMMIT:"
580+ echo " just assail Run panic-attacker scan"
581+ echo ""
582+ echo "LEARN:"
583+ echo " just tour Guided project tour"
584+ echo " just default List all recipes"
0 commit comments