Planned Media and Accounting architecture migration
- Day: 2026-05-10
- Time: 11:00 to 11:00
- Project: Dev
- Workspace: WP 2: Operational
- Status: In Progress
- Priority: MEDIUM
- Assignee: Matías Nehuen Iglesias
- Tags: Architecture, Migration, Git, Accounting, Media-Monitor, Refactor
Description
Session Goal
Align two parallel modernization efforts: (1) lock in the Media Monitor editorial/enrich architecture around a clearer artifact ladder and bus/index contracts, and (2) define a safe, migration-first refactor path for the accounting backend and repository structure.
Key Activities
- Mapped the enrich subsystem closure onto the editorial pipeline, proposing that raw PromptFlow artifacts be treated as Level 0 while briefs, drafts, and
editorial_latest.[[json]]become the primary contract and decision surfaces. - Defined a staged editorial PR sequence (ED1-ED5) to formalize subsystem boundaries, promote draft buses, surface fallback behavior, and defer runner abstraction until the pipeline contracts are stable.
- Reframed the accounting modernization effort as a migration sequence rather than a clean-architecture rewrite, prioritizing incremental change, navigability, and risk reduction.
- Drafted a layered accounting backend refactor plan with explicit artifact contracts and staged responsibilities across ingest, materialize, metrics, debt, human, and publish layers.
- Added Git/GitHub workflow guidance for initializing or replacing repository history safely, including branch renaming, force-with-lease recovery, remote cleanup, and avoiding accidental commits of generated artifacts.
- Outlined packaging migration steps for accounting refactors (PR-A4 to PR-A7), emphasizing compatibility wrappers, canonical package paths, CLI/output stability, and validation guardrails.
Achievements
- Clarified the stable architectural surfaces for Media Monitor: Level 1 contract buses and Level 2 indexes are now treated as the durable interfaces for the enrich/editorial subsystems.
- Established a concrete editorial migration sequence that preserves current behavior while making fallback and decision points visible.
- Defined a safer accounting refactor strategy that preserves working behavior through incremental packaging and module reorganization.
- Captured practical Git recovery patterns for stale tracking refs and unrelated histories, reducing the risk of repository setup mistakes.
Pending Tasks
- Execute the editorial PR sequence (ED1-ED5) and verify that the new artifact ladder is reflected in docs, runbooks, and publish surfaces.
- Continue the accounting backend migration by implementing the staged package reorganization and compatibility wrappers without breaking CLI or output contracts.
- Validate Git repository state and remote branch history before pushing any canonical branch replacement or force-with-lease recovery.
- Update documentation to reflect the finalized subsystem boundaries, canonical module paths, and fallback policies.
Evidence
- source_file=2026-05-10.sessions.jsonl, line_number=2, event_count=0, session_id=3145ed1a330089001b1057a33b332264682988611abfa8f7e693ec461f52a412
- event_ids: []