wadachi-spec 0.1.5

Wadachi (轍) frecency-ranking core — the typed-spec triplet (Rust border + authored Lisp spec + interpreter with a mockable Environment). One ranking formula, shared by every consumer (directories, command history) so they cannot drift.
Documentation

wadachi-spec (轍)

The zero-I/O frecency-ranking core shared across the pleme-io fleet — one formula for directories (wadachi), command history (skim-tab), and zoxide imports, so they cannot drift.

Authored as the pleme-io TYPED-SPEC + INTERPRETER TRIPLET:

  • Typed borderFrecencyRankingSpec + DecayKind + RankPhase.
  • Authored Lisp specspecs/frecency.lisp declares the canonical instances (skimtab-parity, zoxide-parity) as data.
  • Interpreterapply(spec, entries, env) walks the phases against a mockable FrecencyEnvironment (the clock is the only side effect → tests are deterministic).
use wadachi_spec::{apply, FrecencyRankingSpec, DirEntry, MockEnvironment};
use chrono::NaiveDate;

let now = NaiveDate::from_ymd_opt(2026, 6, 9).unwrap().and_hms_opt(0, 0, 0).unwrap();
let ranked = apply(
    &FrecencyRankingSpec::skimtab_parity(),
    vec![DirEntry { path: "/code".into(), visits: vec![now], discovered_only: false }],
    &MockEnvironment::at(now),
).unwrap();
assert!((ranked[0].score - 1.0).abs() < 1e-9);

skimtab-parity is Σ 1/(1+age_days) — behavior-identical to skim-tab's historical frecency_score, which makes adopting this crate in skim-tab a behavior-preserving extraction. MIT.