lifeloop-cli 0.1.1

Provider-neutral lifecycle abstraction and normalizer for AI harnesses
Documentation
.PHONY: fmt fmt-check clippy test build verify wire-check lockfile-check commit bump-schema

fmt:
	bash scripts/fmt.sh

fmt-check:
	bash scripts/fmt.sh --check

clippy:
	cargo clippy --workspace --all-targets --all-features -- -D warnings

test:
	cargo test --workspace --all-targets --all-features

build:
	cargo build --workspace --all-targets --all-features

wire-check:
	bash scripts/check-wire-contract.sh

lockfile-check:
	bash scripts/check-lockfile.sh

verify: fmt-check clippy test build

commit:
	@if [ -z "$(MSG)" ] || [ -z "$(PATHS)" ]; then \
		echo 'usage: make commit MSG="<message>" PATHS="<path> [<path>...]"' >&2; exit 2; \
	fi
	@# `set -f` keeps PATHS from being shell-globbed before printf sees
	@# it; printf delivers each path on its own line over stdin, where
	@# scripts/commit.sh enforces the bulk-add guard at the same layer
	@# that performs the commit (see commit.sh for full rationale).
	set -f && printf '%s\n' $(PATHS) | bash scripts/commit.sh -m "$(MSG)"

bump-schema:
	@if [ -z "$(VERSION)" ] || [ -z "$(REASON)" ]; then \
		echo 'usage: make bump-schema VERSION=<new> REASON="<why>"' >&2; exit 2; \
	fi
	cargo run --quiet --bin lifeloop-bump-schema -- "$(VERSION)" "$(REASON)"