Implement two foundational infrastructure pieces for the Morrowind integration:
1. Perception/Command Protocol (Issue #859):
- Formal spec document with JSON schemas, API contracts, versioning strategy
- Engine-agnostic design following the Falsework Rule
- Pydantic v2 models (PerceptionOutput, CommandInput) for runtime validation
2. SQLite Command Log + Training Pipeline (Issue #855):
- SQLAlchemy model for command_log table with full indexing
- CommandLogger class with log_command(), query(), export_training_data()
- TrainingExporter with chat-completion, episode, and instruction formats
- Storage management (rotation/archival) utilities
- Alembic migration for the new table
Includes 39 passing tests covering schema validation, logging, querying, and export.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>