Skip to content

tracking(desktop): ship the session-authoritative WorkHub routing MVP #3492

Description

@ARE404

Goal

Ship a small but usable WorkHub MVP that routes a user's input to existing Sessions, supports clarification and correction, and can create a new ordinary Session for a clear unmatched executable goal or an explicit creation request.

The MVP models work from the Sessions that already exist when WorkHub opens. It remains conservative for ambiguous or weak evidence.

Architectural invariant

Session remains the sole source of truth.

  • WorkHub is a router and a rebuildable projection over existing Sessions.
  • Do not introduce a second Work/WorkHub authority, database, event store, or lifecycle.
  • A user correction or explicit creation request is stronger evidence than an inferred match.
  • Ephemeral UI state is acceptable, but durable product state must be derivable from existing authorities.

Strategy baseline

The delivered routing baseline is R2.3 (wh-r2.3-session-core-evidence).

R2.3 combines session-core routing with a bounded clarification/correction loop. A clear unmatched executable goal may create an ordinary Session; ambiguous or weak matches must not. Slices and PRs are intentionally not one-to-one.

Current delivery status

Delivery slices

Slice 1 — Session-authoritative routing core

  • Build the routing model from existing Sessions when WorkHub opens.
  • Route using explicit Session names, core entities, and bounded recent/previous focus evidence. Names and core entities are delivered; initializing recent/previous focus from pre-existing Sessions remains open.
  • Prefer stronger, more specific evidence such as an exact long Session name.
  • Ask for clarification instead of guessing when evidence is ambiguous or weak.
  • Cover the policy as a pure, versioned module with focused tests.

Slice 2 — Clarification and correction loop

  • Present bounded Session candidates when clarification is needed.
  • Handle first-time natural-language corrections such as “not this one, use that one.” The current complete loop starts from the correction picker.
  • Stop the incorrectly targeted active Session before rerouting through the correction picker.
  • Treat the latest explicit correction as the winner for the current runtime.
  • Do not create a separate durable correction authority.

Slice 3 — New Work as an ordinary Session

  • Allow the user to explicitly request a new Work.
  • Represent the new Work as an ordinary Session.
  • Derive a useful Session title from the request.
  • Never create from ambiguous or weak routing evidence; a clear unmatched executable goal may create an ordinary Session under R2.3.

Slice 4 — Unified Session conversation surface

Slice 5 — Runtime state and input protection

  • Give waiting_for_user precedence over generic running indicators.
  • Prevent a second root turn while a Session is waiting for user input.
  • Preserve the Composer draft when submission is blocked.
  • Delegate ordinary stop/cancel behavior to the targeted Session correctly. Correction-triggered stop is delivered; the ordinary Composer stop path remains open.

Slice 6 — Rebuildable projection enhancements (follow-up)

  • Add a Work filter derived from Sessions.
  • Add an Anchor Rail derived from current routing/session evidence.
  • Verify that neither enhancement becomes a new authority.

Slice 7 — Evaluation and release gate

  • Record the routing strategy version in every evaluation result.
  • Keep a fixed 10-Session snapshot for same-data strategy comparisons.
  • Run the complete Chinese acceptance guide against the fixed snapshot.
  • Separate deterministic routing checks from strict real-model end-to-end results.
  • Require focused tests, the full desktop test suite, typecheck, and production build to pass.
  • Attach or summarize real-model failures separately from routing failures.

Deferred exploration

  • Explore cross-Work coordination using existing Session/relationship authorities.
  • If coordination appears to require a new source of truth, stop and make that a separate architecture decision instead of expanding this MVP implicitly.

Evidence

Merged routing MVP

Reconstruction branch (#3648)

  • Focused WorkHub tests: 57/57 passing.
  • Full desktop test suite: 1349/1349 passing.
  • WorkHub layout + reconstruction E2E: 2/2 passing.
  • Desktop typecheck, production renderer build, lint, format check, and desktop knip pass.

PR organization

Slices and PRs are intentionally not one-to-one. A PR may deliver multiple tightly coupled checklist items when they form one reviewable, usable loop.

Non-goals

  • A new durable Work or WorkHub domain model.
  • Autonomous creation from ambiguous or weak confidence.
  • Full cross-Work dependency planning or coordination.
  • Treating a model response failure as proof that the routing decision was wrong.
  • Reconstructing unbounded Session history or transient clarification UI state in feat(desktop): rebuild WorkHub from Session transcripts #3648.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions