# =============================================================================
# Knowledge Genome - Makefile v. 0.1.0
# Orchestrates the setup and management of the knowledge base.
# =============================================================================

include config.env
export $(shell sed 's/=.*//' config.env)

.PHONY: setup add-genome status lint clean help

help:
	@echo "Available commands:"
	@echo "  make setup         - Full system initialization"
	@echo "  make add-genome    - Register and scaffold a new genome"
	@echo "  make status        - Check submodule and encryption status"
	@echo "  make lint          - Verify schema, privacy flags, and metadata"

lint:
	@bash scripts/lint-genomes.sh

setup:
	@bash scripts/setup.sh

add-genome:
	@if [ -z "$(NAME)" ] || [ -z "$(DESC)" ]; then \
		echo "Error: NAME and DESC are required."; \
		echo "Usage: make add-genome NAME=my-genome DESC='My description'"; \
		exit 1; \
	fi
	@bash scripts/add-genome.sh "$(NAME)" "$(DESC)"

status:
	@echo "--- Master Status ---"
	@git submodule status
	@echo "--- Encryption Status (First 10 files) ---"
	@git-crypt status | head -n 10
