@@ -55,3 +55,105 @@ pre-commit: check
5555# Run panic-attacker pre-commit scan
5656assail :
5757 @ command -v panic-attack >/ dev/ null 2 >&1 && panic-attack assail . || echo " panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
58+
59+ # ═══════════════════════════════════════════════════════════════════════════════
60+ # ONBOARDING & DIAGNOSTICS
61+ # ═══════════════════════════════════════════════════════════════════════════════
62+
63+ # Check all required toolchain dependencies and report health
64+ doctor :
65+ #!/usr/bin/env bash
66+ echo " ═══════════════════════════════════════════════════"
67+ echo " Feedback O Tron Doctor — Toolchain Health Check"
68+ echo " ═══════════════════════════════════════════════════"
69+ echo " "
70+ PASS=0; FAIL=0; WARN=0
71+ check () {
72+ local name=" $1 " cmd=" $2 " min=" $3 "
73+ if command -v " $cmd " > /dev/null 2>&1 ; then
74+ VER=$( " $cmd " --version 2>&1 | head -1)
75+ echo " [OK] $name — $VER "
76+ PASS=$(( PASS + 1 ))
77+ else
78+ echo " [FAIL] $name — not found (need $min +)"
79+ FAIL=$(( FAIL + 1 ))
80+ fi
81+ }
82+ check " just" just " 1.25"
83+ check " git" git " 2.40"
84+ check " Zig" zig " 0.13"
85+ # Optional tools
86+ if command -v panic-attack >/ dev/ null 2 >&1 ; then
87+ echo " [OK] panic-attack — available"
88+ PASS=$((PASS + 1 ))
89+ else
90+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
91+ WARN=$((WARN + 1 ))
92+ fi
93+ echo " "
94+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
95+ if [ " $FAIL" -gt 0 ]; then
96+ echo " Run 'just heal' to attempt automatic repair."
97+ exit 1
98+ fi
99+ echo " All required tools present."
100+
101+ # Attempt to automatically install missing tools
102+ heal :
103+ #!/usr/bin/env bash
104+ echo " ═══════════════════════════════════════════════════"
105+ echo " Feedback O Tron Heal — Automatic Tool Installation"
106+ echo " ═══════════════════════════════════════════════════"
107+ echo " "
108+ if ! command -v just >/ dev/ null 2 >&1 ; then
109+ echo " Installing just..."
110+ cargo install just 2 >/ dev/ null || echo " Install just from https://just.systems"
111+ fi
112+ echo " "
113+ echo " Heal complete. Run 'just doctor' to verify."
114+
115+ # Guided tour of the project structure and key concepts
116+ tour :
117+ #!/usr/bin/env bash
118+ echo " ═══════════════════════════════════════════════════"
119+ echo " Feedback O Tron — Guided Tour"
120+ echo " ═══════════════════════════════════════════════════"
121+ echo " "
122+ echo ' Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>'
123+ echo " "
124+ echo " Key directories:"
125+ echo " src/ Source code"
126+ echo " ffi/ Foreign function interface (Zig)"
127+ echo " src/abi/ Idris2 ABI definitions"
128+ echo " docs/ Documentation"
129+ echo " tests/ Test suite"
130+ echo " .github/workflows/ CI/CD workflows"
131+ echo " contractiles/ Must/Trust/Dust contracts"
132+ echo " .machine_readable/ Machine-readable metadata"
133+ echo " examples/ Usage examples"
134+ echo " "
135+ echo " Quick commands:"
136+ echo " just doctor Check toolchain health"
137+ echo " just heal Fix missing tools"
138+ echo " just help-me Common workflows"
139+ echo " just default List all recipes"
140+ echo " "
141+ echo " Read more: README.adoc, EXPLAINME.adoc"
142+
143+ # Show help for common workflows
144+ help-me :
145+ #!/usr/bin/env bash
146+ echo " ═══════════════════════════════════════════════════"
147+ echo " Feedback O Tron — Common Workflows"
148+ echo " ═══════════════════════════════════════════════════"
149+ echo " "
150+ echo "FIRST TIME SETUP : "
151+ echo " just doctor Check toolchain"
152+ echo " just heal Fix missing tools"
153+ echo " "
154+ echo "PRE -COMMIT : "
155+ echo " just assail Run panic-attacker scan"
156+ echo " "
157+ echo "LEARN : "
158+ echo " just tour Guided project tour"
159+ echo " just default List all recipes"
0 commit comments