Dual-Representation Message Invariant

Description

Architectural invariant enforced by the Three-Stage Message Pipeline: CLI-specific fields (uuid, timestamp, progress) must never reach the API, and API-format fields (role, content) must be populated without re-deriving them from the CLI representation. Implemented by embedding an APICompatibleMessage field inside CliMessage so the API payload can be extracted unchanged.

Key claims

Relations

Sources

src-20260423-542f02260352