Implements the agents invariant remove CLI command with full specification compliance. The command allows users to remove invariants from agents with a confirmation prompt displaying the invariant ID before removal. The implementation includes support for format options (JSON/YAML) and a --yes flag to bypass confirmation.
The invariant remove command:
- Soft-deletes an invariant by ID via InvariantService.remove_invariant()
- Displays confirmation prompt before removal (bypassable with --yes/-y)
- Outputs the removed invariant ID on success
- Shows clear error message for unknown invariant IDs (NotFoundError)
- Supports --format flag for JSON and YAML output
Full BDD test coverage in features/invariant_cli_new_coverage.feature and Robot Framework integration tests in robot/invariant_cli.robot verify all acceptance criteria from issue #8530.
ISSUES CLOSED: #8530