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