tokmd-gate
Policy evaluation engine for tokmd analysis receipts. Enables CI gating based on code metrics.
Usage
use ;
use Value;
let receipt: Value = from_str?;
let policy = from_file?;
let result = evaluate_policy?;
if !result.passed
Policy File Format
= false
[[]]
= "max_tokens"
= "/derived/totals/tokens"
= "<="
= 500000
= "error"
= "Codebase exceeds token budget"
[[]]
= "min_doc_density"
= "/derived/doc_density/total/ratio"
= ">="
= 0.1
= "warn"
= "Documentation below 10%"
Supported Operators
>,>=,<,<=: Numeric comparisons==,!=: Equality checksin: Value is in a listcontains: String/array contains valueexists: JSON pointer exists
License
MIT OR Apache-2.0