aicx 0.6.6

Operator CLI + MCP server: canonical corpus first, optional semantic index second (Claude Code, Codex, Gemini)
Documentation
#!/bin/sh
set -e

REPO_ROOT=$(git rev-parse --show-toplevel)
cd "$REPO_ROOT"

echo "=== Pre-commit (fast checks) ==="

STAGED_RS=$(git diff --cached --name-only --diff-filter=ACM | grep '\.rs$' || true)

if [ -n "$STAGED_RS" ]; then
  echo "Running cargo fmt (auto-fix)..."
  cargo fmt --all

  echo "$STAGED_RS" | xargs -I {} git add "{}" 2>/dev/null || true

  echo "Running cargo check..."
  cargo check --quiet || {
    echo "Compilation errors. Fix before committing."
    exit 1
  }
fi

echo "Pre-commit checks passed."