Repository navigation
Open
Description
What problem does this solve?
Owner decision (2026-11-19, this thread): the gateway's routing model has three tiers, and #969 only covers the explicit-mention tier. Two gaps:
- Messages without a mention need a defined destination: a default (fallback) session answers them.
- The default session must be able to SUGGEST escalation, never spawn silently. When its answer would benefit from a specialist ("this is a pricing question — open @pricing?"), the suggestion is offered to the owner for approval. The owner called this property essential (HITL).
- A message mentioning several personas (@A @b @C) should fold into ONE discuss run — participants take turns, read earlier contributions, converge — instead of N independent sessions answering blindly in parallel (the original feat(gateway): mention-to-profile routing — @persona routes to its profile session, dynamic roster #969 AC, amended by owner decision).
The economics behind the design (docs/orchestration.md): multi-agent topologies beat single agents on research evals but cost ~15× tokens; token-matched studies (EMNLP 2026) show gains vanish. So idle listening panels and silent auto-spawn are explicitly out.
Proposed solution
Gateway-side contract; no tole-core change expected (discuss engine, profiles, approvals all ship today):
- Fallback session: no mention → the configured default profile session answers; replies land in the origin chat (feat(gateway): mention-to-profile routing — @persona routes to its profile session, dynamic roster #969 reply path). One durable session, same memory semantics (feat(serve): choose a profile per session on create and resume (#740) #885).
- Escalation suggestions (HITL only): the default session may propose an escalation as TEXT — a structured suggestion (persona handle(s), why, the tested composition preset where one exists, estimated budget). A client renders it as a one-tap action. No session opens, no persona tokens are spent, until the owner accepts. Dismissing is free and logged.
- Multi-mention fold: @A @b @C in one message (or an accepted multi-persona suggestion) starts ONE discuss run with those participants under one contract (question + criteria + participants + budget). The discuss engine provides turns, reading order, sanitizer and ledger; the [PLAN] discussion engines: parallel fan-out/fan-in + standalone sanitizer + web-search budget per participant #902 parallel engine stays opt-in for brainstorm and is NOT required by this issue.
- Transparency notice: every routing decision (mention, fold, accepted suggestion, fallback) prints one line: route taken, session new/resumed, memory entries, budget remaining.
- Anti-nag: at most one open suggestion per conversation; suggestions rate-limited and logged so the default session cannot push repeatedly.
- Tested presets as first-class suggestions: the verified compositions (strategy 8–10/500k/r3, technical 5/400k/r2, UI 6, GTM 8, pricing 7, security 5) are offered as menu items, not invented per time.
Alternatives considered
- Auto-spawn on detected intent (no approval): rejected — the owner's explicit requirement; non-deterministic cost, weak auditability, against tole's approval philosophy.
- Always-listening persona panel (speak when relevant): rejected — every listening persona spends a full turn deciding to stay silent; pure idle cost, and gains don't survive token matching.
- Keep feat(gateway): mention-to-profile routing — @persona routes to its profile session, dynamic roster #969's N-independent-sessions behavior for multi-mention: rejected by owner 2026-11-19 — answers don't see each other, no convergence, higher total cost than one discuss run.
- Observer seats (light-tier personas that speak only when contract criteria hit): noted as a possible follow-up to [PLAN] discussion engines: parallel fan-out/fan-in + standalone sanitizer + web-search budget per participant #902, deliberately NOT in this issue.
Acceptance criteria
- A message with no mention reaches the default session; its reply lands in the origin chat; the fallback is named in the transparency notice.
- An escalation suggestion is text-only until accepted: no persona session, no persona tokens, no tool grants before the owner's one-tap acceptance; dismissal is logged.
- The suggestion payload carries handle(s), rationale, a preset name where one applies, and a budget estimate; the estimate is shown before acceptance.
- A multi-persona message (or accepted multi-persona suggestion) produces exactly ONE discuss run; participants, contract and budget match the suggestion/mention set; the ledger records the folded run.
- The transparency notice prints on every routing decision; no routing happens without a visible line.
- At most one open suggestion per conversation; a dismissed suggestion is not re-proposed for the same topic in the same conversation.
- Presets are config data (not model-invented); adding a preset needs no gateway code change (dynamic roster consistent with feat(gateway): mention-to-profile routing — @persona routes to its profile session, dynamic roster #969).
- Gateway README documents the fallback + suggestion protocol; doctor output lists the default profile and available presets.
Parent: #910. Related: #969 (mention routing — amended), #902 (discussion engines), #885 (profiles + memory_room), #962/#911 (reply + approval surfacing).
Metadata
Metadata
Assignees
Labels
No labels
Activity