Skip to main content

Module suggestions

Module suggestions 

Source
Expand description

Runtime fact adapters for next_steps[] builders.

The stable command strings, ordering, caps, and read-only contract live in fallow-output. This module keeps the CLI-specific probes: environment toggles, project setup state, git refs, and changed-branch applicability.

Constants§

SETUP_HINT
One-line human setup hint for bare fallow output: the prose counterpart of the setup next-step (agents get the JSON form, humans get this line). Worded as an offer, not a deficiency: zero-config is a supported happy path.

Functions§

audit_changed_applicable
audit-changed: gate only the files the current branch changed. fallow audit auto-detects its base, so no ref needs embedding.
build_combined_next_steps
Aggregated next-steps for bare fallow (combined). Candidates are pushed in priority order, then capped. trace-unused-export leads because it is the highest-value verification path; scope-workspaces is boosted above the trace-clone / complexity tier so big-repo runs that trigger everything still surface the rare monorepo-scoping capability instead of always dropping it under the cap. audit-changed is last (broadly applicable, least specific).
build_dead_code_next_steps
Next-steps for standalone fallow dead-code. offer_setup is the caller’s setup_pointer_applicable result (threaded as a parameter so the builders stay free of env/filesystem probes and deterministic under test).
build_dupes_next_steps
Next-steps for standalone fallow dupes. See build_dead_code_next_steps for the offer_setup parameter contract.
due_impact_digest
Read-and-stamp the due periodic impact digest for the envelope being built. Returns None in CI or when suggestions are disabled, WITHOUT consuming the cadence stamp, so the digest is never burned by a surface that will not show it.
health_next_steps_input
Next-steps for standalone fallow health. See build_dead_code_next_steps for the offer_setup parameter contract.
impact_counts
Real-counter summary fragment shared by the next-step reason and the human one-liner. The output crate owns the impact-report command contract.
impact_digest_line
One-line human counterpart of the impact-report next-step, printed with the run summary on bare fallow.
setup_pointer_applicable
Shared first-contact gate for the setup next-step and the human setup hint on bare fallow: the project has no fallow config (searched up to the repo root, same as config loading), the run is not in CI, and onboarding has not been declined for this project (fallow init --decline).
suggestions_enabled
FALLOW_SUGGESTIONS=off (or 0/false/no/disabled) disables next-steps entirely. Default on. This is the documented escape hatch for CI consumers that snapshot-diff raw --format json output; it reaches the spawned-CLI and MCP surfaces without a CLI flag.
top_combined_next_step
The single highest-priority next-step for the human Next: line, computed from the same candidates and ordering as the combined JSON array so a human and an agent on the same run never see a contradictory top step. The setup pointer is deliberately excluded here (offer_setup: false): humans get the dedicated prose SETUP_HINT line instead, so the Next: slot always shows an analysis follow-up.