@@ -51,3 +51,113 @@ install:
5151# Run panic-attacker pre-commit scan
5252assail :
5353 @ command -v panic-attack >/ dev/ null 2 >&1 && panic-attack assail . || echo " panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
54+
55+ # ═══════════════════════════════════════════════════════════════════════════════
56+ # ONBOARDING & DIAGNOSTICS
57+ # ═══════════════════════════════════════════════════════════════════════════════
58+
59+ # Check all required toolchain dependencies and report health
60+ doctor :
61+ #!/usr/bin/env bash
62+ echo " ═══════════════════════════════════════════════════"
63+ echo " Ephapaxiser Doctor — Toolchain Health Check"
64+ echo " ═══════════════════════════════════════════════════"
65+ echo " "
66+ PASS=0; FAIL=0; WARN=0
67+ check() {
68+ local name=" $1" cmd=" $2" min=" $3"
69+ if command -v " $cmd" >/ dev/ null 2 >&1 ; then
70+ VER=$(" $cmd" --version 2 >&1 | head -1)
71+ echo " [OK] $name — $VER"
72+ PASS=$((PASS + 1 ))
73+ else
74+ echo " [FAIL] $name — not found (need $min+)"
75+ FAIL=$((FAIL + 1 ))
76+ fi
77+ }
78+ check " just" just " 1.25"
79+ check " git" git " 2.40"
80+ check " Rust (cargo)" cargo " 1.80"
81+ # Optional tools
82+ if command -v panic-attack >/ dev/ null 2 >&1 ; then
83+ echo " [OK] panic-attack — available"
84+ PASS=$((PASS + 1 ))
85+ else
86+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
87+ WARN=$((WARN + 1 ))
88+ fi
89+ echo " "
90+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
91+ if [ " $FAIL" -gt 0 ]; then
92+ echo " Run 'just heal' to attempt automatic repair."
93+ exit 1
94+ fi
95+ echo " All required tools present."
96+
97+ # Attempt to automatically install missing tools
98+ heal :
99+ #!/usr/bin/env bash
100+ echo " ═══════════════════════════════════════════════════"
101+ echo " Ephapaxiser Heal — Automatic Tool Installation"
102+ echo " ═══════════════════════════════════════════════════"
103+ echo " "
104+ if ! command -v cargo >/ dev/ null 2 >&1 ; then
105+ echo " Installing Rust via rustup..."
106+ curl --proto ' =https' --tlsv1.2 -sSf https:// sh.rustup.rs | sh -s -- -y
107+ source " $HOME/.cargo/env"
108+ fi
109+ if ! command -v just >/ dev/ null 2 >&1 ; then
110+ echo " Installing just..."
111+ cargo install just 2 >/ dev/ null || echo " Install just from https://just.systems"
112+ fi
113+ echo " "
114+ echo " Heal complete. Run 'just doctor' to verify."
115+
116+ # Guided tour of the project structure and key concepts
117+ tour :
118+ #!/usr/bin/env bash
119+ echo " ═══════════════════════════════════════════════════"
120+ echo " Ephapaxiser — Guided Tour"
121+ echo " ═══════════════════════════════════════════════════"
122+ echo " "
123+ echo ' // SPDX-License-Identifier: PMPL-1.0-or-later'
124+ echo " "
125+ echo " Key directories:"
126+ echo " src/ Source code"
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 " .machine_readable/ Machine-readable metadata"
132+ echo " container/ Container configuration"
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 " Ephapaxiser — 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 " DEVELOPMENT:"
155+ echo " cargo build Build the project"
156+ echo " cargo test Run tests"
157+ echo " "
158+ echo "PRE -COMMIT : "
159+ echo " just assail Run panic-attacker scan"
160+ echo " "
161+ echo "LEARN : "
162+ echo " just tour Guided project tour"
163+ echo " just default List all recipes"
0 commit comments