.PHONY: help install dev test lint format clean build docs

help:
	@echo "zvec-memory — Local-first vector memory for AI agents"
	@echo ""
	@echo "Available targets:"
	@echo "  install    Install package in development mode"
	@echo "  dev        Install with dev dependencies"
	@echo "  test       Run test suite"
	@echo "  lint       Run linting (ruff)"
	@echo "  format     Format code (ruff)"
	@echo "  typecheck  Run type checking (mypy)"
	@echo "  clean      Remove build artifacts"
	@echo "  build      Build wheel distribution"
	@echo "  docs       Build documentation"
	@echo "  all        Run full CI pipeline (test, lint, typecheck)"

install:
	pip install -e .

dev:
	pip install -e ".[dev]"

test:
	pytest tests/ -v --tb=short

lint:
	ruff check src/ tests/

format:
	ruff check --fix src/ tests/
	ruff format src/ tests/

typecheck:
	mypy src/zvec_memory

clean:
	rm -rf build/ dist/ *.egg-info
	find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
	find . -type f -name "*.pyc" -delete
	find . -type f -name ".coverage" -delete

build: clean
	python -m build

docs:
	@echo "See README.md for documentation"

all: lint typecheck test
