Problem
porch done --help does not print help — it EXECUTES porch done: auto-detects the project from cwd, runs checks, prints BUILD COMPLETE, and calls writeStateAndCommit (dist/commands/porch/index.js ~line 345-347), producing a real commit.
Observed 2026-07-26 (shannon workspace): an agent ran porch done --help intending to check syntax before a bookkeeping operation; porch executed, committed a two-line status.yaml change, and (via a second bug, filed separately) landed that commit on the wrong branch of a closed lane, which had to be corrected in a report already delivered to the project owner.
A state-mutating CLI command that runs when asked for its own help text converts the safest possible user action (reading the docs) into an unintended write. --help should be handled before any subcommand side effect, for every subcommand.
Ask
Parse --help/-h at the subcommand level (or globally) before project auto-detection and execution, for all porch subcommands — especially the state-mutating ones (done, approve, run, next).
Problem
porch done --helpdoes not print help — it EXECUTESporch done: auto-detects the project from cwd, runs checks, prints BUILD COMPLETE, and callswriteStateAndCommit(dist/commands/porch/index.js ~line 345-347), producing a real commit.Observed 2026-07-26 (shannon workspace): an agent ran
porch done --helpintending to check syntax before a bookkeeping operation; porch executed, committed a two-line status.yaml change, and (via a second bug, filed separately) landed that commit on the wrong branch of a closed lane, which had to be corrected in a report already delivered to the project owner.A state-mutating CLI command that runs when asked for its own help text converts the safest possible user action (reading the docs) into an unintended write.
--helpshould be handled before any subcommand side effect, for every subcommand.Ask
Parse
--help/-hat the subcommand level (or globally) before project auto-detection and execution, for all porch subcommands — especially the state-mutating ones (done,approve,run,next).