Documentation
¶
Overview ¶
Package plan implements the read-only "cascade plan" command. It renders, as a per-file unified diff, what "cascade generate-workflow" would change in the committed workflow and action files, writing nothing. plan is the human-facing preview counterpart to "cascade verify": where verify is a pass/fail CI gate, plan shows the actual diff and is purely informational, always exiting 0 on success. It reuses the same side-effect-free producer, generate.Plan.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand creates the plan command, a read-only preview that renders, as a per-file unified diff, what generate-workflow would change in the committed workflow and action files.
func Run ¶
Run renders a per-file unified diff of every file the manifest would generate against the bytes committed on disk and writes nothing. A planned file that is absent on disk is rendered as a whole-file add (every line an addition); a planned file whose bytes differ is rendered as a unified hunk; a byte-identical planned file is skipped.
Run always returns nil on success regardless of whether any diff exists: the preview is informational, not a gate. It returns a plain error only for an operational failure (the manifest is missing or invalid, or a planned file cannot be read for a reason other than not existing), which cmd/cascade/main.go maps to exit code 1.
Run is read-only: it reads the manifest, the reusable-workflow stubs the generators inspect, and the committed files, and writes nothing.