koala-core 1.0.4

Shared types, invariant evaluator, and primitives for the koala framework.
Documentation
use crate::invariant::{Category, Context, Invariant, Outcome};

pub struct ClaudeMdExists;

impl Invariant for ClaudeMdExists {
    fn id(&self) -> &'static str {
        "docs.claude-md-exists"
    }
    fn category(&self) -> Category {
        Category::Docs
    }
    fn intent(&self) -> &'static str {
        "Repository root contains CLAUDE.md (the project boot card for AI agents)."
    }
    fn adr(&self) -> Option<&'static str> {
        Some("ADR-0013")
    }

    fn evaluate(&self, ctx: &Context) -> Outcome {
        if ctx.root().join("CLAUDE.md").exists() {
            Outcome::pass()
        } else {
            Outcome::fail_repro("CLAUDE.md missing at repository root", "ls CLAUDE.md")
        }
    }
}