Files
HAL9000 207d65e87e fix(cli): add Invariants and Validations panels to project show rich output
The `agents project show` command now displays Invariants and Validations
panels in its rich output, completing the specification for project display.

Domain model updates:
- Added `invariants: list[str]` and `invariant_actor: str | None` fields to
  NamespacedProject domain model with backward-compatible defaults
- Updated NamespacedProjectModel.to_domain() to parse invariants from JSON
- Fixed from_domain() to preserve actual invariants/invariant_actor data

CLI output enhancements:
- Extracted project show logic into dedicated project_show.py module
- Invariants panel: displays count and list of project-level invariants
  or '(none)' when no invariants are defined
- Validations panel: displays validation attachments for linked resources
- Invariant Actor field displayed when configured

Refactoring:
- Split oversized project.py (654 lines) into modular files under 500 lines:
  * project_show.py - show command and display helpers
  * project_legacy.py - legacy file-filter sub-app preserved
  * project_resource_commands.py - resource link/unlink/delete commands

Database roundtrip fix:
- from_domain() now properly serializes actual invariants_json (was hardcoded
  to empty list) and invariant_actor (was hardcoded to None)

BDD/Behave coverage added:
- Scenario: Create a project with invariants
- Scenario: Project spec dict contains invariants and validations keys
- Scenario: Show project with no invariants displays none
- Scenario: Show project with invariants displays invariant list
- Scenario: Show project with invariant_actor displays actor

ISSUES CLOSED: #9333
2026-06-03 12:16:20 -04:00
..