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.
A reusable Bash/CLI pattern was captured from notes#86 work:
confirm-or-require-yes.Pattern summary:
-y --yeswithdefault=#false;gum confirmfor the human prompt;--yes, and refusal paths with bypass env cleared.Reference:
ricon-family/dennotes/confirm-or-require-yes.md.Suggested first scope for modules:
modules update --commitor any mode that writes pins and commits;modules initshould 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.