Public CLI Remediation Audit

Public CLI Remediation Audit

AIWG-owned capabilities must direct operators and agents through stable `aiwg` commands. Package-manager scripts and internal tool paths are implementation details, not a user interface.

The audit for issue #2067 covered runtime messages under `src/`, Doctor output, the agent CLI reference, and the context/memory firewall operator guide.

ClassificationPolicyCurrent examples
Product capabilityMust use a public AIWG commandContext firewall; optional embeddings, SQLite, graph, webserver, PTY, and terminal features
Base bootstrap/updateDirect package installation may be necessary because AIWG itself is absent or brokenInitial install, channel switch, Doctor base-package recovery
Contributor/release workRepository build scripts are allowed when explicitly identified as source or release maintenanceDevelopment checkout build, release index packaging
Embedded dispatchInternal paths are allowed when generated code needs a deterministic repository-local executable and no operator is instructed to invoke itGenerated Git hooks
External commandUser-selected third-party commands remain literalMCP server executable and completion-criterion examples
AnalogyNon-executable comparisons are allowedDescription of `aiwg run` semantics

Corrections made in this audit:

  • Added `aiwg context-firewall scan` and a plan-first, confirmation-gated

baseline workflow.

  • Routed Doctor and firewall reports to that public command.
  • Routed optional-capability remediation through `aiwg features install`.
  • Added managed feature definitions for graph traversal and terminal parsing.
  • Made optional package consumers resolve the user-owned feature installation,

rather than merely reporting it as installed.

  • Removed the webserver's implicit package mutation; it now fails with a public,

auditable feature-install command.

The executable contract is `test/unit/cli/public-remediation-contract.test.ts`. It scans the owned runtime and operator surfaces on every normal test run. Every remaining internal entrypoint must match a narrow exemption with a classification and rationale; an unclassified occurrence fails the suite.