@@ -99,3 +99,99 @@ clean:
9999# Run panic-attacker pre-commit scan
100100assail :
101101 @ command -v panic-attack >/ dev/ null 2 >&1 && panic-attack assail . || echo " panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
102+
103+ # ═══════════════════════════════════════════════════════════════════════════════
104+ # ONBOARDING & DIAGNOSTICS
105+ # ═══════════════════════════════════════════════════════════════════════════════
106+
107+ # Check all required toolchain dependencies and report health
108+ doctor :
109+ #!/usr/bin/env bash
110+ echo " ═══════════════════════════════════════════════════"
111+ echo " Gitbot Fleet Doctor — Toolchain Health Check"
112+ echo " ═══════════════════════════════════════════════════"
113+ echo " "
114+ PASS=0; FAIL=0; WARN=0
115+ check () {
116+ local name=" $1 " cmd=" $2 " min=" $3 "
117+ if command -v " $cmd " > /dev/null 2>&1 ; then
118+ VER=$( " $cmd " --version 2>&1 | head -1)
119+ echo " [OK] $name — $VER "
120+ PASS=$(( PASS + 1 ))
121+ else
122+ echo " [FAIL] $name — not found (need $min +)"
123+ FAIL=$(( FAIL + 1 ))
124+ fi
125+ }
126+ check " just" just " 1.25"
127+ check " git" git " 2.40"
128+ # Optional tools
129+ if command -v panic-attack >/ dev/ null 2 >&1 ; then
130+ echo " [OK] panic-attack — available"
131+ PASS=$((PASS + 1 ))
132+ else
133+ echo " [WARN] panic-attack — not found (pre-commit scanner)"
134+ WARN=$((WARN + 1 ))
135+ fi
136+ echo " "
137+ echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
138+ if [ " $FAIL" -gt 0 ]; then
139+ echo " Run 'just heal' to attempt automatic repair."
140+ exit 1
141+ fi
142+ echo " All required tools present."
143+
144+ # Attempt to automatically install missing tools
145+ heal :
146+ #!/usr/bin/env bash
147+ echo " ═══════════════════════════════════════════════════"
148+ echo " Gitbot Fleet Heal — Automatic Tool Installation"
149+ echo " ═══════════════════════════════════════════════════"
150+ echo " "
151+ if ! command -v just >/ dev/ null 2 >&1 ; then
152+ echo " Installing just..."
153+ cargo install just 2 >/ dev/ null || echo " Install just from https://just.systems"
154+ fi
155+ echo " "
156+ echo " Heal complete. Run 'just doctor' to verify."
157+
158+ # Guided tour of the project structure and key concepts
159+ tour :
160+ #!/usr/bin/env bash
161+ echo " ═══════════════════════════════════════════════════"
162+ echo " Gitbot Fleet — Guided Tour"
163+ echo " ═══════════════════════════════════════════════════"
164+ echo " "
165+ echo ' // SPDX-License-Identifier: PMPL-1.0-or-later'
166+ echo " "
167+ echo " Key directories:"
168+ echo " docs/ Documentation"
169+ echo " tests/ Test suite"
170+ echo " .github/workflows/ CI/CD workflows"
171+ echo " .machine_readable/ Machine-readable metadata"
172+ echo " "
173+ echo " Quick commands:"
174+ echo " just doctor Check toolchain health"
175+ echo " just heal Fix missing tools"
176+ echo " just help-me Common workflows"
177+ echo " just default List all recipes"
178+ echo " "
179+ echo " Read more: README.adoc, EXPLAINME.adoc"
180+
181+ # Show help for common workflows
182+ help-me :
183+ #!/usr/bin/env bash
184+ echo " ═══════════════════════════════════════════════════"
185+ echo " Gitbot Fleet — Common Workflows"
186+ echo " ═══════════════════════════════════════════════════"
187+ echo " "
188+ echo "FIRST TIME SETUP : "
189+ echo " just doctor Check toolchain"
190+ echo " just heal Fix missing tools"
191+ echo " "
192+ echo "PRE -COMMIT : "
193+ echo " just assail Run panic-attacker scan"
194+ echo " "
195+ echo "LEARN : "
196+ echo " just tour Guided project tour"
197+ echo " just default List all recipes"
0 commit comments