Skip to content

Adopt confirm-or-require-yes for pin/commit/overwrite operations #34

Description

@brownie-ricon

A reusable Bash/CLI pattern was captured from notes#86 work: confirm-or-require-yes.

Pattern summary:

  • declare -y --yes with default=#false;
  • allow an explicit tool-scoped env bypass when appropriate;
  • require a real controlling terminal for interactive confirmation;
  • use gum confirm for the human prompt;
  • fail closed in headless/CI/agent contexts with a clear "re-run with --yes" message;
  • test mutation call sites with visible --yes, and refusal paths with bypass env cleared.

Reference: ricon-family/den notes/confirm-or-require-yes.md.

Suggested first scope for modules:

  • modules update --commit or any mode that writes pins and commits;
  • setup/unlock/init paths that mutate module manifests or encrypted state beyond a no-op refresh;
  • any reset/repair command that can discard local module checkout state.

modules init should probably remain quiet/idempotent when it only clones/syncs expected state; reserve the confirmation for operations that intentionally advance pins, commit, or overwrite local work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions