Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build a production-quality Bash CLI tool (a deployment helper, a project scaffolder, an ops automation script). Requirements: (1) a clean header with 'set -euo pipefail' and a usage/help function; (2) ARGUMENT PARSING with 'getopts' (flags + options) and sensible defaults; (3) robust ERROR HANDLING — meaningful exit codes, and a 'trap' that cleans up temp files (made with 'mktemp') on EXIT and on interrupt; (4) FUNCTIONS with 'local' variables (returning status via 'return', data via echo/'$(...)'); (5) IDEMPOTENCY and logging to stderr; (6) PORTABILITY awareness (document bash-vs-POSIX-sh assumptions); and (7) it must be ShellCheck-clean and, ideally, have a couple of 'bats' tests. Document usage and the safety choices.
Strict-mode header + usage; getopts parsing with defaults; functions with local vars (return=status, echo=data).
Meaningful exit codes; trap-based cleanup of mktemp temp files on EXIT/interrupt; idempotent; logs to stderr.
ShellCheck-clean; bats tests (or a credible test plan); bash-vs-POSIX assumptions documented.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A robust, portable CLI tool in Bash ## Goal Build a production-quality Bash CLI tool (a deployment helper, a project scaffolder, an ops automation script). Requirements: (1) a clean header with 'set -euo pipefail' and a usage/help function; (2) ARGUMENT PARSING with 'getopts' (flags + options) and sensible defaults; (3) robust ERROR HANDLING — meaningful exit codes, and a 'trap' that cleans up temp files (made with 'mktemp') on EXIT and on interrupt; (4) FUNCTIONS with 'local' variables (returning status via 'return', data via echo/'$(...)'); (5) IDEMPOTENCY and logging to stderr; (6) PORTABILITY awareness (document bash-vs-POSIX-sh assumptions); and (7) it must be ShellCheck-clean and, ideally, have a couple of 'bats' tests. Document usage and the safety choices. ## Acceptance criteria - [ ] Structure & args: Strict-mode header + usage; getopts parsing with defaults; functions with local vars (return=status, echo=data). - [ ] Robustness: Meaningful exit codes; trap-based cleanup of mktemp temp files on EXIT/interrupt; idempotent; logs to stderr. - [ ] Quality & portability: ShellCheck-clean; bats tests (or a credible test plan); bash-vs-POSIX assumptions documented. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.