Problem (P2.1): verity-redteam-core cannot discover or drive locally authenticated coding CLIs (claude, codex, gemini, opencode, aider, cursor-agent, agy) or ACP-capable agents under one contract.
Discovery Substrate: verity discover [--format text|json] probes PATH plus fallback bins (~/.local/bin, ~/.npm-global/bin, ~/.cargo/bin, ~/go/bin) concurrently with --version (1,500 ms timeout), Ollama GET /api/tags (250 ms timeout), and non-secret env/auth-file checks.
State Machine & Cache: TargetStatus (NOT_INSTALLED, BROKEN_SHIM, NEEDS_AUTH, READY_UNVERIFIED, VERIFIED, AUTH_FAILED, HANG_PRONE) with a TargetProbe dataclass cached in .verity/probe_cache.json.
Unified Backend Contract: TurnRecord, SessionBudget, UnifiedRequest (target e.g. agent:claude, model:ollama/..., sandbox="read-only|workspace-write|full"), StreamEvent, and the ExecutionBackend protocol (can_handle, run).
CLI Backend Hardening: HeadlessCliBackend adapters use stdin=DEVNULL, start_new_session=True, a pty.openpty() fallback (TERM=dumb, NO_COLOR=1, CI=1) for agy/hang-prone Ink CLIs, a two-tier watchdog (immediate auth/interactive-prompt fail-fast plus first-byte 25s / idle 60s / turn 120s timers), and guaranteed os.killpg teardown in finally:.
Reusable Standalone Python Component: Package discovery + ExecutionBackend (AcpExecutionBackend + HeadlessCliBackend) as a single unified, reusable Python library/component (verity_agent_bridge / decoupled verity.backends with zero imports from verity.cli, verity.scanner, or verity.mcp_server) so it can be reused independently across verity-redteam-core, verity-lite, and external Python tools.
Multi-OS Support (macOS, Linux, Windows):
Cross-platform discovery: shutil.which + OS-aware fallback bins (~/.local/bin, ~/.npm-global/bin, ~/.cargo/bin, ~/go/bin on POSIX; %LOCALAPPDATA%\Programs, %APPDATA%\npm, PATHEXT.exe/.cmd shims on Windows).
Cross-platform process isolation & teardown: start_new_session=True + os.killpg on POSIX; subprocess.CREATE_NEW_PROCESS_GROUP + tree kill (taskkill /T /F) on Windows; pty.openpty() on POSIX with pipe-safe fallback on Windows where pty is unavailable.
Free/Open-Core Boundary: this Free substrate is consumed by verity-lite (TASK-124-PRO) for closed-loop verity fix --code; zero Pro imports land in this repository.
verity discover --format json probes local CLI agents and Ollama concurrently, classifies NOT_INSTALLED / BROKEN_SHIM / NEEDS_AUTH / READY_UNVERIFIED without leaking secrets or invoking Keychain popups, and caches in .verity/probe_cache.json.
Negative control: absent binary classifies NOT_INSTALLED; no /usr/bin/security invocation and zero secret values in JSON output.
HeadlessCliBackend isolates subprocesses (stdin=DEVNULL, start_new_session=True), uses the pty.openpty() fallback when configured, kills process groups immediately on auth/prompt fail-fast patterns (not logged in, login required, press enter) or idle timeout, and leaves zero orphan processes.
Benign control: streaming JSON turn completes cleanly as StreamEvent items with zero orphan processes.
Reusable component has zero imports from verity.cli/verity.scanner/verity.mcp_server, and discovery/process-isolation adapters handle both POSIX (os.killpg, pty.openpty) and Windows (CREATE_NEW_PROCESS_GROUP, PATHEXT, no pty import crash).
Negative control: importing verity.backends on Windows (sys.platform == "win32") succeeds without ModuleNotFoundError: No module named 'pty'.