Skip to main content

fallow_cli/
lib.rs

1#![expect(
2    clippy::print_stdout,
3    clippy::print_stderr,
4    reason = "CLI binary produces intentional terminal output"
5)]
6#![cfg_attr(
7    test,
8    allow(
9        clippy::unwrap_used,
10        clippy::expect_used,
11        reason = "tests use unwrap and expect to keep fixture setup concise"
12    )
13)]
14
15#[allow(
16    dead_code,
17    unused_imports,
18    reason = "shared CLI library compiles bin-oriented support modules for reuse"
19)]
20mod api;
21#[allow(
22    dead_code,
23    unused_imports,
24    reason = "shared CLI library compiles bin-oriented support modules for reuse"
25)]
26pub mod audit;
27/// `fallow audit --brief` (alias `fallow review`): deterministic, always-exit-0
28/// rendering mode layered over the audit analysis. Public so the schema-emit
29/// binary can derive the `ReviewBriefOutput` envelope.
30#[allow(
31    dead_code,
32    unused_imports,
33    reason = "shared CLI library compiles bin-oriented support modules for reuse"
34)]
35pub mod audit_brief;
36/// Decision-surface extractor (stage 6 / 6.G): the apex of the review brief.
37/// Public so the schema-emit binary can derive the `DecisionSurface` types.
38#[allow(
39    dead_code,
40    unused_imports,
41    reason = "shared CLI library compiles bin-oriented support modules for reuse"
42)]
43pub mod audit_decision_surface;
44/// Weighted focus map (stage 4): the composite attention score per review unit
45/// plus the no-skip labels, confidence flags, and escape hatch. Public so the
46/// schema-emit binary can derive the `FocusMap` types.
47#[allow(
48    dead_code,
49    unused_imports,
50    reason = "shared CLI library compiles bin-oriented support modules for reuse"
51)]
52pub mod audit_focus;
53/// Agent-contract loop (the codiff pattern, graph-extended): the walkthrough
54/// guide (digest + schema + graph-snapshot pin) and the `--walkthrough-file`
55/// post-validation against the live graph. Public so the schema-emit binary can
56/// derive the guide + validation envelopes.
57#[allow(
58    dead_code,
59    unused_imports,
60    reason = "shared CLI library compiles bin-oriented support modules for reuse"
61)]
62pub mod audit_walkthrough;
63#[allow(
64    dead_code,
65    unused_imports,
66    reason = "shared CLI library compiles bin-oriented support modules for reuse"
67)]
68mod base_worktree;
69#[allow(
70    dead_code,
71    unused_imports,
72    reason = "shared CLI library compiles bin-oriented support modules for reuse"
73)]
74pub mod walkthrough_state;
75#[allow(
76    dead_code,
77    unused_imports,
78    reason = "shared CLI library compiles bin-oriented support modules for reuse"
79)]
80use fallow_engine::baseline;
81#[allow(
82    dead_code,
83    unused_imports,
84    reason = "shared CLI library compiles bin-oriented support modules for reuse"
85)]
86mod cache_notice;
87#[allow(
88    dead_code,
89    unused_imports,
90    reason = "shared CLI library compiles bin-oriented support modules for reuse"
91)]
92mod check;
93/// CODEOWNERS file parser and ownership lookup.
94pub use fallow_engine::codeowners;
95#[allow(
96    dead_code,
97    unused_imports,
98    reason = "shared CLI library compiles bin-oriented support modules for reuse"
99)]
100mod combined;
101#[allow(
102    dead_code,
103    unused_imports,
104    reason = "shared CLI library compiles bin-oriented support modules for reuse"
105)]
106mod dupes;
107
108/// Structured error output for CLI and JSON formats.
109pub mod error;
110
111#[allow(
112    dead_code,
113    unused_imports,
114    reason = "shared CLI library compiles bin-oriented support modules for reuse"
115)]
116mod fix;
117#[allow(
118    dead_code,
119    unused_imports,
120    reason = "shared CLI library compiles bin-oriented support modules for reuse"
121)]
122mod init;
123
124#[allow(
125    dead_code,
126    unused_imports,
127    reason = "shared CLI library compiles bin-oriented support modules for reuse"
128)]
129mod onboarding;
130
131/// Metric and rule definitions for explainable CLI output.
132pub mod explain;
133
134#[allow(
135    dead_code,
136    unused_imports,
137    reason = "shared CLI library compiles bin-oriented support modules for reuse"
138)]
139mod health;
140/// Health / complexity analysis report types.
141#[allow(
142    dead_code,
143    unused_imports,
144    reason = "shared CLI library compiles bin-oriented support modules for reuse"
145)]
146mod license;
147#[allow(
148    dead_code,
149    unused_imports,
150    reason = "shared CLI library compiles bin-oriented support modules for reuse; the findings-present accumulator must be reachable from the lib-compiled analysis modules"
151)]
152mod telemetry;
153
154/// Test-only coverage for the JSON output contract aliases.
155#[cfg(test)]
156mod architecture_boundaries;
157#[cfg(test)]
158pub mod output_envelope;
159pub(crate) mod output_runtime;
160
161/// Cross-platform path classification helpers (POSIX-style root + Windows
162/// drive prefix detection that `Path::is_absolute()` misclassifies).
163#[allow(
164    dead_code,
165    unused_imports,
166    reason = "shared CLI library compiles bin-oriented support modules for reuse; `#[expect]` would be unfulfilled because the bin (not the lib) consumes these symbols"
167)]
168mod path_util;
169
170/// Shared Rayon pool configuration for all embedded analysis entry points.
171pub(crate) mod rayon_pool;
172
173/// Regression detection: baseline comparison and tolerance checking.
174pub mod regression;
175
176/// Process-wide signal handling and scoped child-process registry.
177/// See `signal/mod.rs` for the design rationale.
178pub mod signal;
179
180/// Report formatting utilities for analysis results.
181///
182/// Exposed for snapshot testing of output formats.
183pub mod report;
184
185#[allow(
186    dead_code,
187    unused_imports,
188    reason = "shared CLI library compiles bin-oriented support modules for reuse"
189)]
190pub mod impact;
191#[allow(
192    dead_code,
193    unused_imports,
194    reason = "shared CLI library compiles bin-oriented support modules for reuse"
195)]
196mod runtime_support;
197#[allow(
198    dead_code,
199    unused_imports,
200    reason = "shared CLI library compiles bin-oriented support modules for reuse"
201)]
202pub mod security;
203/// Agent-discoverability task-to-command matrix shared by `init --agents`,
204/// `hooks install --target agent`, the schema manifest, and root `--help`.
205#[allow(
206    dead_code,
207    unused_imports,
208    reason = "shared CLI library compiles bin-oriented support modules for reuse"
209)]
210mod task_matrix;
211#[allow(
212    dead_code,
213    unused_imports,
214    reason = "shared CLI library compiles bin-oriented support modules for reuse"
215)]
216use fallow_engine::validate;
217use fallow_engine::vital_signs;
218
219pub use runtime_support::{AnalysisKind, GroupBy};
220pub(crate) use runtime_support::{
221    ConfigLoadOptions, build_ownership_resolver, load_config_for_analysis,
222};