@@ -664,3 +664,107 @@ edit:
664664# Run panic-attacker pre-commit scan
665665assail:
666666 @command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
667+
668+ # ═══════════════════════════════════════════════════════════════════════════════
669+ # ONBOARDING & DIAGNOSTICS
670+ # ═══════════════════════════════════════════════════════════════════════════════
671+
672+ # Check all required toolchain dependencies and report health
673+ doctor:
674+ #!/usr/bin/env bash
675+ echo "═══════════════════════════════════════════════════"
676+ echo " Investigativejournalist.Jl Doctor — Toolchain Health Check"
677+ echo "═══════════════════════════════════════════════════"
678+ echo ""
679+ PASS=0; FAIL=0; WARN=0
680+ check() {
681+ local name="$1 " cmd="$2 " min="$3 "
682+ if command -v "$cmd " >/dev/null 2>&1; then
683+ VER=$( " $cmd " --version 2>&1 | head -1)
684+ echo " [OK] $name — $VER "
685+ PASS=$(( PASS + 1 ))
686+ else
687+ echo " [FAIL] $name — not found (need $min +)"
688+ FAIL=$(( FAIL + 1 ))
689+ fi
690+ }
691+ check "just" just "1.25"
692+ check "git" git "2.40"
693+ check "Zig" zig "0.13"
694+ check "Julia" julia "1.10"
695+ # Optional tools
696+ if command -v panic-attack >/dev/null 2>&1; then
697+ echo " [OK] panic-attack — available"
698+ PASS=$(( PASS + 1 ))
699+ else
700+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
701+ WARN=$(( WARN + 1 ))
702+ fi
703+ echo ""
704+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
705+ if [ "$FAIL " -gt 0 ]; then
706+ echo " Run 'just heal' to attempt automatic repair."
707+ exit 1
708+ fi
709+ echo " All required tools present."
710+
711+ # Attempt to automatically install missing tools
712+ heal:
713+ #!/usr/bin/env bash
714+ echo "═══════════════════════════════════════════════════"
715+ echo " Investigativejournalist.Jl Heal — Automatic Tool Installation"
716+ echo "═══════════════════════════════════════════════════"
717+ echo ""
718+ if ! command -v just >/dev/null 2>&1; then
719+ echo "Installing just..."
720+ cargo install just 2>/dev/null || echo "Install just from https://just.systems"
721+ fi
722+ echo ""
723+ echo "Heal complete. Run 'just doctor' to verify."
724+
725+ # Guided tour of the project structure and key concepts
726+ tour:
727+ #!/usr/bin/env bash
728+ echo "═══════════════════════════════════════════════════"
729+ echo " Investigativejournalist.Jl — Guided Tour"
730+ echo "═══════════════════════════════════════════════════"
731+ echo ""
732+ echo '// SPDX-License-Identifier: PMPL-1.0-or-later'
733+ echo ""
734+ echo "Key directories:"
735+ echo " src/ Source code"
736+ echo " ffi/ Foreign function interface (Zig)"
737+ echo " src/abi/ Idris2 ABI definitions"
738+ echo " docs/ Documentation"
739+ echo " tests/ Test suite"
740+ echo " test/ Test suite"
741+ echo " .github/workflows/ CI/CD workflows"
742+ echo " contractiles/ Must/Trust/Dust contracts"
743+ echo " .machine_readable/ Machine-readable metadata"
744+ echo " examples/ Usage examples"
745+ echo ""
746+ echo "Quick commands:"
747+ echo " just doctor Check toolchain health"
748+ echo " just heal Fix missing tools"
749+ echo " just help-me Common workflows"
750+ echo " just default List all recipes"
751+ echo ""
752+ echo "Read more: README.adoc, EXPLAINME.adoc"
753+
754+ # Show help for common workflows
755+ help-me:
756+ #!/usr/bin/env bash
757+ echo "═══════════════════════════════════════════════════"
758+ echo " Investigativejournalist.Jl — Common Workflows"
759+ echo "═══════════════════════════════════════════════════"
760+ echo ""
761+ echo "FIRST TIME SETUP:"
762+ echo " just doctor Check toolchain"
763+ echo " just heal Fix missing tools"
764+ echo ""
765+ echo "PRE-COMMIT:"
766+ echo " just assail Run panic-attacker scan"
767+ echo ""
768+ echo "LEARN:"
769+ echo " just tour Guided project tour"
770+ echo " just default List all recipes"
0 commit comments