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
fallowoutput: the prose counterpart of thesetupnext-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 auditauto-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-exportleads because it is the highest-value verification path;scope-workspacesis 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-changedis last (broadly applicable, least specific). - build_
dead_ code_ next_ steps - Next-steps for standalone
fallow dead-code.offer_setupis the caller’ssetup_pointer_applicableresult (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. Seebuild_dead_code_next_stepsfor theoffer_setupparameter contract. - due_
impact_ digest - Read-and-stamp the due periodic impact digest for the envelope being built.
Returns
Nonein 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. Seebuild_dead_code_next_stepsfor theoffer_setupparameter contract. - impact_
counts - Real-counter summary fragment shared by the next-step reason and the human
one-liner. The output crate owns the
impact-reportcommand contract. - impact_
digest_ line - One-line human counterpart of the
impact-reportnext-step, printed with the run summary on barefallow. - setup_
pointer_ applicable - Shared first-contact gate for the
setupnext-step and the human setup hint on barefallow: 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(or0/false/no/disabled) disables next-steps entirely. Default on. This is the documented escape hatch for CI consumers that snapshot-diff raw--format jsonoutput; 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. Thesetuppointer is deliberately excluded here (offer_setup: false): humans get the dedicated proseSETUP_HINTline instead, so theNext:slot always shows an analysis follow-up.