opencode-commands/cli-anything-refine.md
Refine an existing CLI harness to improve coverage of the software's functions and usage patterns.
Target software: $1 Focus area: $2
Before refining, read ./HARNESS.md (located alongside this command). All new commands and tests must follow the same standards as the original build. HARNESS.md is the single source of truth for architecture, patterns, and quality requirements.
$1 is the software path (required). Local path to the software source code (e.g., /home/user/gimp, ./blender). Must be the same source tree used during the original build.
Note: Only local paths are accepted. If you need to work from a GitHub repo, clone it first with /cli-anything, then refine.
$2 is the focus area (optional). A natural-language description of the functionality area to focus on. When provided, skip broad gap analysis and instead target the specified capability area.
Examples:
"vid-in-vid and picture-in-picture features""all batch processing and scripting filters""particle systems and physics simulation""path boolean operations and clipping"When focus is provided:
This command is used after a CLI harness has already been built with /cli-anything. It analyzes gaps between the software's full capabilities and what the current CLI covers, then iteratively expands coverage. If a focus is given, the agent narrows its analysis and implementation to that specific functionality area.
<software>_cli.py) and all core modules{ function_name: covered | not_covered }--json output supporthandle_errorcore/ or utils/test_core.pytest_full_e2e.pyREADME.md with new commands and usage examplesTEST.md with new test results<SOFTWARE>.md) with new coverage notes