stemedb/Makefile
jordan a776744889 Initial project setup with Claude Code monorepo structure
- Rust workspace with stemedb-core crate
- Full .claude/ configuration (agents, skills, commands, guides)
- ai-lookup/ for token-efficient fact storage
- Quality gates: clippy, fmt, jscpd duplication detection
- Pre-commit hook with 5-phase quality checks
- CLAUDE.md router and CODING_GUIDELINES.md standards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 10:56:26 -07:00

69 lines
1.6 KiB
Makefile

# Makefile for StemeDB
.PHONY: all build dev quality install clean test help
# Default target
all: build
## --- Development ---
# Build the project (dev profile)
build:
cargo build
# Run the project
dev:
cargo run -p stemedb-core
# Run tests
test:
cargo test --workspace
## --- Quality & Verification ---
# Run all quality checks (formatting, linting, duplication, tests)
quality: fmt-check lint duplication test
@echo "✅ Quality checks passed!"
# Check for code duplication
duplication:
@echo "Checking for code duplication..."
@jscpd ./crates --format rust --min-lines 5 --min-tokens 50 || true
# Check formatting without changing files
fmt-check:
cargo fmt --all -- --check
# Run clippy (linter)
lint:
cargo clippy --workspace --all-targets --all-features -- -D warnings
# Fix formatting automatically
fmt:
cargo fmt --all
## --- Installation ---
# Install dependencies (Rust toolchain, etc - assumed cargo exists)
install:
@echo "Ensuring rust toolchain is up to date..."
rustup update stable
@echo "Installing helpful tools..."
# cargo install cargo-watch # Optional but recommended
## --- Utilities ---
clean:
cargo clean
help:
@echo "Available commands:"
@echo " make build - Build the workspace"
@echo " make dev - Run the core binary"
@echo " make test - Run unit tests"
@echo " make quality - Run format check, clippy, duplication, tests"
@echo " make fmt - Auto-format code"
@echo " make lint - Run clippy linter"
@echo " make duplication - Check for code duplication (jscpd)"
@echo " make install - Setup environment"