rac_engine/lib.rs
1//! decided-engine — experimental Rust port of the decided-core engine
2//! (roadmap:native-engine-spike). The Python tree at `src/` is the frozen
3//! oracle; the binding behavior contract is `rust/PORT-CONTRACT.md`.
4//!
5//! Module map (keep cross-module surface minimal):
6//! - `pycompat`: CPython string/float/round/repr semantics, table-driven
7//! from the packaged `assets/spec/pycompat-tables.json`.
8//! - `pyjson`: the Python `json.dumps`-shaped writer (indent=2 and JSONL).
9//! - `frontmatter`: bounded PyYAML-1.1 SafeLoader subset.
10//! - `markdown`: CommonMark block-boundary tokenizer (headings + inline raw).
11//! - `spec`: artifact specs embedded from the vendored rac-spec registry.
12//! - `walk`: corpus discovery in component-wise sorted-path order.
13//! - `parse`: file -> parsed artifact (frontmatter + sections + fields).
14//! - `classify`: deterministic classification over specs.
15//! - `identity`: artifact identifiers and the id grammar.
16//! - `validate`: structural validation and the finding catalog.
17//! - `relationships`: edge extraction, resolution, validation issues.
18//! - `resolve`: BM25F + RRF search with pinned f64 operation order.
19//! - `gitinfo`: git-derived recency/staleness via the real git CLI.
20//! - `budget`: the ADR-033 per-response character budget and truncation.
21//! - `consent`: the ADR-041/086 sharing-consent record (telemetry.json).
22//! - `telemetry`: Guide telemetry log read-back (ADR-040, mcp-stats).
23//! - `usage`: CLI usage log read-back + consent-gated recorder (ADR-046).
24//! - `sha256`: FIPS 180-4 digest (eval corpus/query-set hashes).
25//! - `skill`: bundled agent skills — registry + embedded-asset install.
26//! - `hook`: bundled git hooks — registry + embedded-asset install.
27//! - `eval`: the ADR-066 grounding retrieval benchmark and gate.
28//! - `portal`: the vendored Portal shell + export-HTML assembly.
29//! - `agent_rules`: the ADR-067 agent-rules projection and drift gate.
30//! - `okf`: the ADR-048 OKF bundle projection (git-derived recency join).
31//! - `revisions`: ADR-043 git-revision materialization (`git archive` + tar).
32//! - `compare`: repository state comparison (watchkeeper's load/compare).
33//! - `intent`: deterministic intent findings over a comparison.
34//! - `watchkeeper`: the watchkeeper report and review verdict.
35//! - `output`: human/JSON/SARIF renderers per command.
36//! - `commands`: CLI command entry points (argv already parsed).
37//! - `cli`: argv parsing and exit codes matching the oracle's argparse
38//! surface (PORT-CONTRACT.d/01).
39
40pub mod pycompat;
41pub mod pyjson;
42pub mod frontmatter;
43pub mod markdown;
44pub mod spec;
45pub mod walk;
46pub mod parse;
47pub mod classify;
48pub mod identity;
49pub mod validate;
50pub mod relationships;
51pub mod diff;
52pub mod inspect;
53pub mod improve;
54pub mod stats;
55pub mod resolve;
56pub mod retrieve;
57pub mod gitinfo;
58pub mod budget;
59pub mod portfolio;
60pub mod index;
61pub mod index_format;
62pub mod derived;
63pub mod index_store;
64pub mod derived_cache;
65pub mod read_model;
66pub mod parallel_build;
67pub mod delta_generation;
68pub mod freshness;
69mod freshness_watch;
70pub mod coverage;
71pub mod review;
72pub mod gate;
73pub mod herald;
74pub mod sentry;
75pub mod doctor;
76pub mod mdhtml;
77pub mod export;
78pub mod portal;
79pub mod agent_rules;
80pub mod okf;
81pub mod consent;
82pub mod telemetry;
83pub mod timing;
84pub mod usage;
85pub mod sha256;
86pub mod skill;
87pub mod hook;
88pub mod eval;
89pub mod scaffold;
90pub mod rename;
91pub mod revisions;
92pub mod compare;
93pub mod intent;
94pub mod watchkeeper;
95pub mod output;
96pub mod commands;
97pub mod cli;