Skip to content

Commit 5363fc9

Browse files
hyperpolymathclaude
andcommitted
chore: standardise verisimdb justfile (hook-generated)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 71dfada commit 5363fc9

1 file changed

Lines changed: 153 additions & 0 deletions

File tree

verisimdb/Justfile

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,156 @@ clean:
168168
cargo clean
169169
cd elixir-orchestration && mix clean 2>/dev/null || true
170170
@echo "Cleaned."
171+
172+
# Run panic-attacker pre-commit scan
173+
assail:
174+
@command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
175+
176+
# ── Onboarding ────────────────────────────────────────────────
177+
178+
# Check all required tools are installed
179+
doctor:
180+
#!/usr/bin/env bash
181+
set -euo pipefail
182+
ok=0; fail=0
183+
check() {
184+
if "$@" >/dev/null 2>&1; then
185+
echo " [ok] $1"
186+
((ok++))
187+
else
188+
echo " [MISSING] $1 — $2"
189+
((fail++))
190+
fi
191+
}
192+
echo "=== VeriSimDB Doctor ==="
193+
check rustc --version "install via asdf: asdf install rust nightly"
194+
check cargo --version "comes with Rust"
195+
check rustup --version "https://rustup.rs"
196+
check pkg-config --version "sudo dnf install pkg-config"
197+
if pkg-config --exists openssl 2>/dev/null; then
198+
echo " [ok] openssl-devel (pkg-config)"
199+
((ok++))
200+
else
201+
echo " [MISSING] openssl-devel — sudo dnf install openssl-devel"
202+
((fail++))
203+
fi
204+
check elixir --version "asdf install elixir 1.17.3-otp-27"
205+
check mix --version "comes with Elixir"
206+
check erl -version "asdf install erlang 27.2"
207+
check zig version "asdf install zig 0.14.0"
208+
check just --version "cargo install just"
209+
check podman --version "sudo dnf install podman (optional, for containers)"
210+
if command -v idris2 >/dev/null 2>&1; then
211+
echo " [ok] idris2 (optional — ABI layer)"
212+
((ok++))
213+
else
214+
echo " [info] idris2 not found (optional — only for ABI definitions)"
215+
fi
216+
echo ""
217+
echo "Result: $ok passed, $fail failed"
218+
if [ "$fail" -gt 0 ]; then
219+
echo "Fix the MISSING items above, then re-run: just doctor"
220+
exit 1
221+
else
222+
echo "All prerequisites satisfied."
223+
fi
224+
225+
# Auto-install missing tools where possible
226+
heal:
227+
#!/usr/bin/env bash
228+
set -euo pipefail
229+
echo "=== VeriSimDB Heal ==="
230+
if ! command -v rustc &>/dev/null; then
231+
echo "Installing Rust via asdf..."
232+
asdf install rust nightly || echo "Try: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
233+
fi
234+
if ! command -v just &>/dev/null; then
235+
echo "Installing just..."
236+
cargo install just
237+
fi
238+
if ! command -v elixir &>/dev/null; then
239+
echo "Installing Elixir via asdf..."
240+
asdf install elixir 1.17.3-otp-27 || echo "Try: asdf plugin add elixir && asdf install elixir 1.17.3-otp-27"
241+
fi
242+
if ! command -v zig &>/dev/null; then
243+
echo "Installing Zig via asdf..."
244+
asdf install zig 0.14.0 || echo "Try: asdf plugin add zig && asdf install zig 0.14.0"
245+
fi
246+
if ! pkg-config --exists openssl 2>/dev/null; then
247+
echo "openssl-devel missing — run: sudo dnf install openssl-devel"
248+
fi
249+
if ! command -v podman &>/dev/null; then
250+
echo "Podman missing — run: sudo dnf install podman podman-compose"
251+
fi
252+
echo ""
253+
echo "Re-run 'just doctor' to verify."
254+
255+
# Guided tour of the codebase
256+
tour:
257+
#!/usr/bin/env bash
258+
set -euo pipefail
259+
echo "=== VeriSimDB Tour ==="
260+
echo ""
261+
echo "1. ARCHITECTURE"
262+
echo " Rust core (rust-core/) provides 10 modality crates:"
263+
echo " graph, vector, tensor, semantic, document, temporal,"
264+
echo " provenance, spatial, octad, drift, normalizer, api"
265+
echo " Elixir OTP (elixir-orchestration/) coordinates them."
266+
echo ""
267+
echo "2. BUILD & RUN"
268+
echo " just build Build Rust release"
269+
echo " just build-elixir Build Elixir layer"
270+
echo " just serve Start API on :8080"
271+
echo ""
272+
echo "3. THE OCTAD"
273+
echo " Every entity is stored across 8 modalities simultaneously."
274+
echo " Drift between them is detected and self-healed."
275+
echo ""
276+
echo "4. QUERY LANGUAGE"
277+
echo " VQL (VeriSim Query Language) — NOT SQL."
278+
echo " See docs/ and playground/ for examples."
279+
echo ""
280+
echo "5. FEDERATION"
281+
echo " 10 adapters (MongoDB, Redis, Neo4j, ClickHouse, SurrealDB,"
282+
echo " SQLite, DuckDB, VectorDB, InfluxDB, ObjectStorage)."
283+
echo " 6 client SDKs (Rust, V, Elixir, ReScript, Julia, Gleam)."
284+
echo ""
285+
echo "6. CONTAINERS"
286+
echo " just container-build Build with Podman"
287+
echo " just container-run Run on :8080"
288+
echo ""
289+
echo "7. KEY FILES"
290+
echo " Cargo.toml Workspace definition"
291+
echo " elixir-orchestration/ OTP layer"
292+
echo " connectors/ Federation + SDKs"
293+
echo " container/ Containerfile + compose"
294+
echo " .claude/CLAUDE.md Full AI context"
295+
echo ""
296+
echo "Run 'just' to see all available recipes."
297+
298+
# What to do when things go wrong
299+
help-me:
300+
#!/usr/bin/env bash
301+
echo "=== VeriSimDB Help ==="
302+
echo ""
303+
echo "BUILD FAILS:"
304+
echo " 'openssl' errors -> sudo dnf install openssl-devel"
305+
echo " 'protoc' errors -> Proto code is pre-generated, check Cargo features"
306+
echo " 'oxrocksdb' errors -> Eliminated; if seen, run: cargo clean && just build"
307+
echo " Elixir errors -> cd elixir-orchestration && mix deps.get"
308+
echo ""
309+
echo "RUNTIME ISSUES:"
310+
echo " Port 8080 in use -> Change port: VERISIM_PORT=8081 just serve"
311+
echo " 'connection refused'-> Is the Rust API running? just serve"
312+
echo " Drift not detected -> Check thresholds in config/config.exs"
313+
echo ""
314+
echo "TESTING:"
315+
echo " Integration tests need the test-infra stack running:"
316+
echo " cd connectors/test-infra && podman-compose up -d"
317+
echo " Then: just test-integration"
318+
echo ""
319+
echo "STILL STUCK?"
320+
echo " 1. just doctor (check prerequisites)"
321+
echo " 2. just heal (auto-install what's missing)"
322+
echo " 3. cargo clean && just build (fresh build)"
323+
echo " 4. Read .claude/CLAUDE.md for full context"

0 commit comments

Comments
 (0)