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