# Install / sync dependencies
sync:
    uv sync --all-extras

# Build the CLI tool (ai-forge)
build:
    uv build

# Output all project targets (CLAUDE.md, settings.json, hooks)
output:
    uv run python -m ai_forge dev build --all-targets --output output/CLAUDE.md

# Validate all targets
validate:
    uv run python -m ai_forge dev validate output/CLAUDE.md

# Run tests
test:
    uv run pytest -q

# Format code
format:
    uv run ruff format -q --line-length 88 --target-version py312

# Lint code
lint:
    uv run ruff check -q --fix

# Type check code
typecheck:
    uv run mypy src/ai_forge

# Run evals using Claude Code SDK
run-evals: output
    uv run python run_evals.py

# Run all quality checks (format, lint, typecheck)
check: format lint typecheck

# Run complete CI pipeline (check + test + build + validate)
ci: check test build-all validate

# Build all targets (package + output)
build-all: build output

# Full release pipeline (ci + clean)
release: ci clean
    @echo "✅ Release pipeline completed successfully"

# Format check (CI mode)
format-check:
    uv run ruff format --check --line-length 88 --target-version py312

# Test with coverage
test-cov:
    uv run pytest --cov=ai_forge

# Clean up python cache, build artifacts, and test artifacts
clean:
    find . -type d -name __pycache__ -exec rm -rf {} +
    find . -type d -name "*.egg-info" -exec rm -rf {} +
    find . -type f -name "*.pyc" -delete
    find . -type f -name "*.pyo" -delete
    find . -type f -name "*.pyd" -delete
    rm -f coverage.xml
    rm -rf build dist htmlcov .pytest_cache .coverage .coverage.* .mypy_cache .ruff_cache .ruff_cache.* output/*.md output/.claude
