set shell := ["bash", "-lc"]

default: qa

fmt:
    cargo fmt --manifest-path Cargo.toml

fmt-check:
    cargo fmt --check --manifest-path Cargo.toml

clippy:
    cargo clippy --manifest-path Cargo.toml --all-targets --all-features -- -D warnings

test:
    cargo test --manifest-path Cargo.toml

doc:
    cargo doc --manifest-path Cargo.toml --no-deps

traceability:
    cargo run --manifest-path Cargo.toml --bin dsfb-traceability

traceability-check:
    cargo run --manifest-path Cargo.toml --bin dsfb-traceability -- --check

timing-report:
    cargo run --manifest-path Cargo.toml --bin dsfb-timing-determinism

demo-public-dataset:
    cargo run --manifest-path Cargo.toml --bin dsfb-public-dataset-demo -- --phase all

supply-chain:
    cargo deny check
    cargo audit

proof-step:
    if command -v cargo-kani >/dev/null 2>&1; then cargo kani --manifest-path Cargo.toml --harness proof_trust_scalar_in_unit_interval && cargo kani --manifest-path Cargo.toml --harness proof_trust_scalar_not_nan && cargo kani --manifest-path Cargo.toml --harness proof_grammar_reason_enum_is_closed; else echo "cargo-kani unavailable; proof harnesses remain under proofs/kani for explicit execution"; fi

smoke:
    cargo run --manifest-path Cargo.toml -- --all --output-dir /tmp/dsfb-semiotics-engine-smoke

qa: fmt-check clippy test doc traceability-check timing-report proof-step
