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    pub use fallow_engine::emit_error;
111}
112
113#[allow(
114    dead_code,
115    unused_imports,
116    reason = "shared CLI library compiles bin-oriented support modules for reuse"
117)]
118mod fix;
119#[allow(
120    dead_code,
121    unused_imports,
122    reason = "shared CLI library compiles bin-oriented support modules for reuse"
123)]
124mod init;
125
126/// Metric and rule definitions for explainable CLI output.
127pub mod explain;
128
129#[allow(
130    dead_code,
131    unused_imports,
132    reason = "shared CLI library compiles bin-oriented support modules for reuse"
133)]
134mod health;
135/// Health / complexity analysis report types.
136#[allow(
137    dead_code,
138    unused_imports,
139    reason = "shared CLI library compiles bin-oriented support modules for reuse"
140)]
141mod license;
142#[allow(
143    dead_code,
144    unused_imports,
145    reason = "shared CLI library compiles bin-oriented support modules for reuse; the findings-present accumulator must be reachable from the lib-compiled analysis modules"
146)]
147mod telemetry;
148
149/// Test-only coverage for the JSON output contract aliases.
150#[cfg(test)]
151mod architecture_boundaries;
152#[cfg(test)]
153pub mod output_envelope;
154pub(crate) mod output_runtime;
155
156/// Cross-platform path classification helpers (POSIX-style root + Windows
157/// drive prefix detection that `Path::is_absolute()` misclassifies).
158#[allow(
159    dead_code,
160    unused_imports,
161    reason = "shared CLI library compiles bin-oriented support modules for reuse; `#[expect]` would be unfulfilled because the bin (not the lib) consumes these symbols"
162)]
163mod path_util;
164
165/// Shared Rayon pool configuration for all embedded analysis entry points.
166pub(crate) mod rayon_pool;
167
168/// Regression detection: baseline comparison and tolerance checking.
169pub mod regression;
170
171/// Process-wide signal handling and scoped child-process registry.
172/// See `signal/mod.rs` for the design rationale.
173pub mod signal;
174
175/// Report formatting utilities for analysis results.
176///
177/// Exposed for snapshot testing of output formats.
178pub mod report;
179
180#[allow(
181    dead_code,
182    unused_imports,
183    reason = "shared CLI library compiles bin-oriented support modules for reuse"
184)]
185pub mod impact;
186#[allow(
187    dead_code,
188    unused_imports,
189    reason = "shared CLI library compiles bin-oriented support modules for reuse"
190)]
191mod runtime_support;
192#[allow(
193    dead_code,
194    unused_imports,
195    reason = "shared CLI library compiles bin-oriented support modules for reuse"
196)]
197pub mod security;
198/// Agent-discoverability task-to-command matrix shared by `init --agents`,
199/// `hooks install --target agent`, the schema manifest, and root `--help`.
200#[allow(
201    dead_code,
202    unused_imports,
203    reason = "shared CLI library compiles bin-oriented support modules for reuse"
204)]
205mod task_matrix;
206#[allow(
207    dead_code,
208    unused_imports,
209    reason = "shared CLI library compiles bin-oriented support modules for reuse"
210)]
211use fallow_engine::validate;
212use fallow_engine::vital_signs;
213
214pub use runtime_support::{AnalysisKind, GroupBy};
215pub(crate) use runtime_support::{
216    ConfigLoadOptions, build_ownership_resolver, load_config_for_analysis,
217};