Building a CLI Tool or Script Workflow Prompt
Overview: Workflow prompt for Building a CLI Tool or Script.
SOP Instructions
45 - BUILDING A CLI TOOL OR SCRIPT
I need to build a command-line tool or script for this codebase: [describe the command, inputs, and expected output].
Before writing code, review:
1) existing scripts and CLI entry points,
2) package.json scripts or shell scripts already used,
3) conventions for arguments, flags, and help text,
4) how the project handles logging and errors,
5) whether the script should use the existing internal modules,
6) how it will be run locally, in CI, or in production.
Then produce:
- command name and syntax,
- supported flags and options,
- input/output behavior,
- error handling and exit codes,
- file location and module structure,
- a test plan for the script,
- examples of usage.
Do not write the implementation until the interface is approved.