Expand description
Shared types for fallow codebase intelligence.
This crate contains type definitions used across multiple fallow crates (core, CLI, LSP). It has no analysis logic, only data structures.
User documentation for fallow is on fallow.tools.
Modules§
- atomic_
file - Atomic cache-file replacement, shared by the extraction cache and the graph cache so concurrent fallow processes never interleave a write. Atomic replacement of a cache file.
- audit_
cache - Typed audit cache-key inputs. Typed audit cache-key inputs.
- cache_
rejection - Why a persisted cache was refused, shared by the extraction cache, the
graph cache, the perf table, and
fallow doctor. Why a persisted cache was not reused. - catalog_
source - Classification of the source file of a package manager catalog finding. Classification of the source file of a package manager catalog finding.
- churn
- Shared churn output contracts. Shared churn output contracts.
- cloud
- Cross-surface strings for the cloud runtime-coverage path, shared by the
CLI’s cloud
coveragecommands and the MCP cloud tools. Cross-surface strings for the cloud runtime-coverage path. - command_
surfaces - One row per analysis subcommand: its JSON kinds and the surfaces that must know about it. Drift tests across the workspace read this table. One row per analysis subcommand: the JSON kinds it writes and the surfaces that must know about it.
- complexity_
contribution - Per-construct complexity increments behind the complexity scores. Per-construct complexity increments that explain the cyclomatic and cognitive scores of a function.
- discover
- File discovery types: discovered files, file IDs, and entry points. File discovery types: discovered files, file IDs, and entry points.
- duplicates
- Shared duplicate-code output contracts. Shared duplicate-code output contracts.
- envelope
- JSON-output envelope and utility types:
SchemaVersion,ToolVersion,ElapsedMs,AuditIntroduced, plus the sharedMeta,BaselineDeltas,BaselineMatch,RegressionResult,EntryPoints, andCheckSummaryshapes referenced by every per-command envelope. The structs are always compiled (the JSON emission layer constructs them at runtime); theschemars::JsonSchemaderive is gated per-struct on theschemafeature. Typed envelope and utility-shape structs for the JSON output contract. - envelope_
sites - Where a fact sits on each JSON envelope shape, shared by the surfaces that read a saved envelope back rather than holding the run’s typed state. Where a fact sits on each JSON envelope shape, for the surfaces that read an envelope back rather than holding the run’s typed state.
- extract
- Module extraction types: exports, imports, re-exports, and member info. Module extraction types.
- flag_
retirement - Flag retirement report types.
- guard
- Guard output contracts for pre-edit architecture-rule lookup. Guard report contracts for pre-edit architecture guidance.
- identity
- Stable finding identity: the shared FNV-1a 64 hash and dead-code
finding_idvalues. Stable public identity for findings. - issue_
meta - Shared issue-type contract metadata used by CLI, LSP, MCP, and suppression helpers. Shared issue-type contract metadata.
- levenshtein
- Levenshtein distance and closest-match policy for typo suggestions. Levenshtein-distance helpers for typo detection.
- mcp_
manifest - Machine-readable manifest of the fallow MCP server’s tools, shared by
fallow schemaand the telemetry tool-name allowlist; kept in sync with the live tool router by a drift test incrates/mcp. Machine-readable manifest of the tools exposed by the fallow MCP server. - output
- JSON-output augmentation types:
IssueActionenum + variants. Schema-side counterpart of the augmentations the JSON layer adds to each dead-code finding. The structs are always compiled (typed dead-code wrappers inoutput_dead_codeconsume them at runtime); theschemars::JsonSchemaderive is gated per-struct on theschemafeature. Types that describe fallow’s JSON output contract. - output_
dead_ code - Typed envelope wrappers for the simple 1:1 dead-code findings
(
UnusedFile,PrivateTypeLeak,UnresolvedImport,CircularDependency,BoundaryViolation). Each wrapper flattens the bare finding via#[serde(flatten)]and creates a typedactionsarray at construction. Theintroducedfield defaults toNone. The audit pass inserts it into the JSON output. Each wrapper derivesschemars::JsonSchemaonly withschema. Typed envelope wrappers for the simple 1:1 dead-code findings whose actions are entirely determined by the wrapper type (no per-instance discriminants beyond what the bare finding already exposes). - output_
format - Shared output-format selector used by CLI, config, output, and API layers.
- output_
health - Per-action types attached to health findings, hotspots, refactoring
targets, and coverage-gap entries. Separated from the generic
IssueActiontree in theoutputmodule so the health-specific variants live in a dedicated module. The structs are always compiled (the JSON emission layer constructs them through typed wrappers such asoutput_health::UntestedFileAction); theschemars::JsonSchemaderive is gated per-struct on theschemafeature. Per-action types attached to each health finding by the JSON output layer. - path_
guard - Refuse cache writes through a symlink that leaves the project. Refuse writes through a symlink that leaves a trusted directory.
- path_
util - Cross-platform path classification helpers. Cross-platform path classification helpers.
- pipeline_
spans - The
--performancespan tree and the process-level clock. The--performancespan tree and the process-level clock. - results
- Analysis result types: unused files, exports, dependencies, and members. Analysis result types for all issue categories.
- security_
sinks - Security sink names shared by the extractor and the sink catalogue.
- security_
stable_ id - The line-free input of the stable id of a security finding. The line-free input of the stable id of a security finding.
- semantic
- Shared TypeScript semantic identity, provenance, API surface, impact, and public-signature coupling contracts. Shared contracts for opt-in TypeScript semantic analysis.
- serde_
path - Custom serde serializers for cross-platform path output.
Custom serde serializers for
PathBuf,Option<PathBuf>, andVec<PathBuf>that always output forward slashes, regardless of platform. This ensures consistent JSON/SARIF output on Windows. - shared_
state - Optional architecture shared-state facts and inventory. Opt-in syntactic shared-state inventory, independent of counted findings.
- similar_
code - Transient source-extraction contracts for provider-backed similar-code analysis. Shared transient extraction types for similar-code candidate generation.
- source_
fingerprint - Shared source-file freshness metadata used by cache invalidation. Shared source-file fingerprint inputs for cache invalidation.
- sourced
- Values with the cause of their value: the input layer, the scope, and the flag, variable, config key or default that gave the value. Values that record their cause.
- suppress
- Inline suppression comment types and issue kind definitions. Inline suppression comment types and issue kind definitions.
- task_
matrix - Agent task-to-command matrix rows shared by
fallow schema, theinit --agentstemplate, the agent hook block, root--help, and thefallow://task-matrixMCP resource. Data only; the CLI owns rendering. Single source of truth for the agent-discoverability task-to-command matrix (R2/R3). One const slice drives every render surface: thefallow schemamanifest (task_matrix), theinit --agentsAGENTS.md template, thehooks install --target agentmanaged block, the root--helpcheat sheet, and thefallow://task-matrixMCP resource. Thescripts/generate-agent-docs.mjsgenerator renders the same table into SKILL.md from the schema-serialized form, so the Markdown surfaces stay consistent without duplicating the rows. - trace
- Trace output contracts shared by core, engine, CLI, API, and MCP. Shared trace output contracts for analysis and integration surfaces.
- trace_
chain - Symbol-level trace-chain output contracts. Symbol-level call-chain output contracts.
- trace_
error - Stack-trace frame resolution output contracts (
fallow trace-error). Stack-trace frame resolution contract forfallow trace-error. - trace_
usage - Per-specifier dependency usage contracts (
fallow trace --dependency). Per-specifier usage of a dependency: theusageobject offallow trace --dependency <package>. - workspace
- Workspace and source-discovery diagnostic data types
(
WorkspaceDiagnostic,WorkspaceDiagnosticKind). Re-exported byfallow-configfor back-compat; embedded directly byfallow-outputsoworkspace_diagnostics[]keeps its typed JSON schema. Theschemars::JsonSchemaderive is gated on theschemafeature. Workspace and source-discovery diagnostic data types.
Constants§
- ANALYSIS_
DIAGNOSTIC_ LOG_ TARGET - The
tracingtarget of a warning that repeats a fact the JSON envelope carries, or that describes the quality of the analysis inputs.