This was generated by AI during triage.
From architecture review candidate #2 (recommendation: Worth exploring). Captured for triage; not yet specced to agent-ready.
Problem
Roughly 20% of the messages, reactions, and notifications modules is the same like / message / message-like CRUD re-typed per entity, expanded ~7× rather than compressed into a module. The pattern is documented in CLAUDE.md as a convention but has never been made into a deep module.
Proposed solution
On top of the EntityRegistry (#6, now landed), add generic helpers parameterized by entity type — e.g. likeRecord(type, id), listMessages(type, …), notifyEngagement(type, event) — each resolving specifics through the registry rather than a per-type branch.
Benefits
- ~1500 loc across the three modules → ~600. Depth rises: small interface, lots of behavior behind it.
- Tests target the generic helper once instead of 7 near-identical paths.
Relationships
From architecture review candidate #2 (recommendation: Worth exploring). Captured for triage; not yet specced to agent-ready.
Problem
Roughly 20% of the
messages,reactions, andnotificationsmodules is the same like / message / message-like CRUD re-typed per entity, expanded ~7× rather than compressed into a module. The pattern is documented in CLAUDE.md as a convention but has never been made into a deep module.Proposed solution
On top of the EntityRegistry (#6, now landed), add generic helpers parameterized by entity type — e.g.
likeRecord(type, id),listMessages(type, …),notifyEngagement(type, event)— each resolving specifics through the registry rather than a per-type branch.Benefits
Relationships
main, so this is the natural next chain.