opencode-commands/cli-anything-validate.md
Validate a CLI harness against HARNESS.md standards and best practices.
Target software: $1
Before validating, read ./HARNESS.md (located alongside this command). It is the single source of truth for all validation checks below. Every check in this command maps to a requirement in HARNESS.md.
$1 is the software path or repo URL (required). Either:
/home/user/gimp, ./blender)https://github.com/GNOME/gimp, github.com/blender/blender)If a GitHub URL is provided, clone the repo locally first, then work on the local copy.
The software name is derived from the directory name. The agent locates the CLI harness at /root/cli-anything/<software-name>/agent-harness/.
agent-harness/cli_anything/<software>/ exists (namespace sub-package)cli_anything/ has NO __init__.py (PEP 420 namespace package)<software>/ HAS __init__.py (regular sub-package)core/, utils/, tests/ subdirectories presentsetup.py in agent-harness/ uses find_namespace_packagesREADME.md - Installation and usage guide<software>_cli.py - Main CLI entry pointcore/project.py - Project managementcore/session.py - Undo/redocore/export.py - Rendering/exporttests/TEST.md - Test plan and resultstests/test_core.py - Unit teststests/test_full_e2e.py - E2E tests../<SOFTWARE>.md - Software-specific SOP--json flag for machine-readable output--project flag for project filehandle_error decorator for consistent error handlingproject.py has: create, open, save, info, list_profilessession.py has: Session class with undo/redo/snapshotexport.py has: render function and EXPORT_PRESETSTEST.md has both plan (Part 1) and results (Part 2)test_full_e2e.py has a TestCLISubprocess classTestCLISubprocess uses _resolve_cli("cli-anything-<software>") (no hardcoded paths)_resolve_cli prints which backend is used and supports CLI_ANYTHING_FORCE_INSTALLED_run does NOT set cwd (installed commands work from any directory)README.md has: installation, usage, command reference, examples<SOFTWARE>.md has: architecture analysis, command map, rendering gap assessmentHARNESS.md (should reference plugin's HARNESS.md)setup.py uses find_namespace_packages(include=["cli_anything.*"])cli-anything-<software> conventioncli-anything-<software>=cli_anything.<software>.<software>_cli:maincli_anything/ has NO __init__.py (namespace package rule)cli_anything.<software>.* prefixexcept:)The command generates a detailed report:
CLI Harness Validation Report
Software: gimp
Path: /root/cli-anything/gimp/agent-harness/cli_anything/gimp
Directory Structure (5/5 checks passed)
Required Files (9/9 files present)
CLI Implementation (7/7 standards met)
Core Modules (5/5 standards met)
Test Standards (10/10 standards met)
Documentation (4/4 standards met)
PyPI Packaging (7/7 standards met)
Code Quality (5/5 checks passed)
Overall: PASS (52/52 checks)