@@ -162,3 +162,102 @@ full-build: check-proofs build icons lint-ext security-scan build-ext
162162# Run panic-attacker pre-commit scan
163163assail :
164164 @ command -v panic-attack >/ dev/ null 2 >&1 && panic-attack assail . || echo " panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
165+
166+ # ═══════════════════════════════════════════════════════════════════════════════
167+ # ONBOARDING & DIAGNOSTICS
168+ # ═══════════════════════════════════════════════════════════════════════════════
169+
170+ # Check all required toolchain dependencies and report health
171+ doctor :
172+ #!/usr/bin/env bash
173+ echo " ═══════════════════════════════════════════════════"
174+ echo " Fireflag Doctor — Toolchain Health Check"
175+ echo " ═══════════════════════════════════════════════════"
176+ echo " "
177+ PASS=0; FAIL=0; WARN=0
178+ check () {
179+ local name=" $1 " cmd=" $2 " min=" $3 "
180+ if command -v " $cmd " > /dev/null 2>&1 ; then
181+ VER=$( " $cmd " --version 2>&1 | head -1)
182+ echo " [OK] $name — $VER "
183+ PASS=$(( PASS + 1 ))
184+ else
185+ echo " [FAIL] $name — not found (need $min +)"
186+ FAIL=$(( FAIL + 1 ))
187+ fi
188+ }
189+ check " just" just " 1.25"
190+ check " git" git " 2.40"
191+ check " ReScript (resc)" rescript " 12.0"
192+ # Optional tools
193+ if command -v panic-attack >/ dev/ null 2 >&1 ; then
194+ echo " [OK] panic-attack — available"
195+ PASS=$((PASS + 1 ))
196+ else
197+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
198+ WARN=$((WARN + 1 ))
199+ fi
200+ echo " "
201+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
202+ if [ " $FAIL" -gt 0 ]; then
203+ echo " Run 'just heal' to attempt automatic repair."
204+ exit 1
205+ fi
206+ echo " All required tools present."
207+
208+ # Attempt to automatically install missing tools
209+ heal :
210+ #!/usr/bin/env bash
211+ echo " ═══════════════════════════════════════════════════"
212+ echo " Fireflag Heal — Automatic Tool Installation"
213+ echo " ═══════════════════════════════════════════════════"
214+ echo " "
215+ if ! command -v just >/ dev/ null 2 >&1 ; then
216+ echo " Installing just..."
217+ cargo install just 2 >/ dev/ null || echo " Install just from https://just.systems"
218+ fi
219+ echo " "
220+ echo " Heal complete. Run 'just doctor' to verify."
221+
222+ # Guided tour of the project structure and key concepts
223+ tour :
224+ #!/usr/bin/env bash
225+ echo " ═══════════════════════════════════════════════════"
226+ echo " Fireflag — Guided Tour"
227+ echo " ═══════════════════════════════════════════════════"
228+ echo " "
229+ echo ' **Safe Firefox/Gecko flag management for users and developers**'
230+ echo " "
231+ echo " Key directories:"
232+ echo " lib/ Library modules"
233+ echo " docs/ Documentation"
234+ echo " tests/ Test suite"
235+ echo " .github/workflows/ CI/CD workflows"
236+ echo " contractiles/ Must/Trust/Dust contracts"
237+ echo " .machine_readable/ Machine-readable metadata"
238+ echo " "
239+ echo " Quick commands:"
240+ echo " just doctor Check toolchain health"
241+ echo " just heal Fix missing tools"
242+ echo " just help-me Common workflows"
243+ echo " just default List all recipes"
244+ echo " "
245+ echo " Read more: README.adoc, EXPLAINME.adoc"
246+
247+ # Show help for common workflows
248+ help-me :
249+ #!/usr/bin/env bash
250+ echo " ═══════════════════════════════════════════════════"
251+ echo " Fireflag — Common Workflows"
252+ echo " ═══════════════════════════════════════════════════"
253+ echo " "
254+ echo "FIRST TIME SETUP : "
255+ echo " just doctor Check toolchain"
256+ echo " just heal Fix missing tools"
257+ echo " "
258+ echo "PRE -COMMIT : "
259+ echo " just assail Run panic-attacker scan"
260+ echo " "
261+ echo "LEARN : "
262+ echo " just tour Guided project tour"
263+ echo " just default List all recipes"
0 commit comments