Expand description
Deterministic pattern detector for inbound received text.
Text in, evidence report out. The library performs no I/O. analyze is a
pure function of the input text. It reports pattern occurrences with cited
spans. It attaches no judgment or score. A coupled agent skill interprets
the report.
analyze_bundle is the multi-document entry point. Per-file reports plus
cross-file verbatim-duplication evidence for a set of related documents
(deck variants, shared report copies). Each per-file report is identical
to what analyze returns for that text alone.
Re-exports§
pub use report::BundleFile;pub use report::BundleReport;pub use report::ClassDensity;pub use report::Container;pub use report::CrossFileDuplication;pub use report::CrossFileOccurrence;pub use report::Densities;pub use report::EvidenceReport;pub use report::Finding;pub use report::Stats;
Modules§
- data
- Inbound rule-table loading.
- engine
- Compiled matching engines, following ai-slop’s engine design minus
everything gate-shaped: two global Aho-Corasick automatons split by case
mode, one multi-pattern overlapping hybrid-DFA regex pass with reverse
start recovery, and one codepoint walk serving the Private-Use-Area,
invisible-unicode, and positional typographic-space rules. All engines
compile once per process behind
OnceLock. - report
- Output schema. The report is evidence with cited spans. It carries no
verdict, score, or pass/fail state. The consuming agent interprets it.
Version 0.1.3 added
container,topic_term,stats.densities, and the bundle types. These fields annotate and measure. They never suppress a finding or attach a judgment to one.
Structs§
- Analyze
Options - Caller-supplied reading context. Nothing here changes what fires. The options only label findings and shift the residual density figures, which always print beside the raw ones.
Functions§
- analyze
- Analyze one input text and return the evidence report.
- analyze_
bundle - Analyze a set of related documents:
(path, text)pairs. Each file gets its own fullanalyzereport. On top of them, one cross-file duplication pass (the SD-Q005 shingle machinery with the same order, floor, and cap) reports verbatim runs shared BETWEEN files. Within-file repeats stay in each file’s own SD-Q005 findings and never appear at bundle level. - analyze_
bundle_ with analyze_bundlewith caller-supplied reading context, applied to every per-file report.- analyze_
with analyzewith caller-supplied reading context.analyze(text)is exactlyanalyze_with(text, &AnalyzeOptions::default()).