Discovery: group gateway Router command surfaces into sub-modules #1779

Open
opened 2026-11-02 14:32:57 +00:00 by sam · 0 comments
Owner

From the 2026-08 architecture review (recommendation: worth exploring).

What is wrong: internal/gateway's Router accumulates every feature's consumer-side interface as a public field (~25 exported fields, 52 methods, 15+ tiny per-file interfaces across 38 files). A new chat command means a new field, a new seam declaration, and a new nil branch in Route.

Wanted: command surfaces grouped into sub-modules (sessions, tasks, slash commands), each owning one interface and its files; Router keeps routing and composes them.

Done when:

  • each sub-module has one interface and its own files; Router no longer grows a field per command
  • slash/session/task command behaviour is unchanged over the chat contract
  • task check green
From the 2026-08 architecture review (recommendation: worth exploring). **What is wrong:** `internal/gateway`'s `Router` accumulates every feature's consumer-side interface as a public field (~25 exported fields, 52 methods, 15+ tiny per-file interfaces across 38 files). A new chat command means a new field, a new seam declaration, and a new nil branch in `Route`. **Wanted:** command surfaces grouped into sub-modules (sessions, tasks, slash commands), each owning one interface and its files; `Router` keeps routing and composes them. **Done when:** - each sub-module has one interface and its own files; Router no longer grows a field per command - slash/session/task command behaviour is unchanged over the chat contract - `task check` green
sam added the discovery label 2026-11-02 14:53:55 +00:00
sam added the medium label 2026-11-14 14:45:43 +00:00
sam added the deferred label 2026-11-15 17:26:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1779