Skip to content

Design note: scope-aware routing (load the background only when needed)#110

Closed
anth-volk wants to merge 1 commit into
mainfrom
docs/scope-aware-routing
Closed

Design note: scope-aware routing (load the background only when needed)#110
anth-volk wants to merge 1 commit into
mainfrom
docs/scope-aware-routing

Conversation

@anth-volk

Copy link
Copy Markdown
Contributor

Summary

Design note only — no implementation. Adds docs/design/scope-aware-routing.md, a draft for discussion.

It proposes a scope router that decides which background a question needs rather than what to say: every branch still passes the user's real prompt through the model, but only the "needs computation" branch loads the full reference.md + tool schemas. Off-topic, unmodelled, and partial/confirm-first turns get a light-background model call (small system prompt, no reference doc, no tools) instead of a canned string.

Why open it

It's the convergence point for three things already in flight:

Load-bearing idea

The router carries a compact scope descriptor (~a few hundred tokens) instead of the ~20k-token reference doc — and that descriptor is auto-derived from capabilities() at build time (via scripts/build_reference.py) so it can't drift from the engine, with the router failing safe toward the full model whenever it's unsure.

Status

Draft for discussion — I'd like agreement on the shape (router-as-second-model vs. progressive disclosure within one model; where the descriptor lives; how much of #102 collapses into it) before any code. Phasing and open questions are in the doc.

🤖 Generated with Claude Code

Draft design note (no implementation) proposing a scope router that picks
which background tier a question needs — passing the user's prompt through
the model in every case, but loading the full reference.md + tools only on
the "needs computation" branch.

Frames the router as the convergence point for the topic gate (#109), the
scope/refusal contract (#102), and the confirm-first proposal: off-topic,
unmodelled, and partial/confirm-first turns get a light-background model
call (no reference doc, no tools) rather than a canned string. Hinges on a
compact scope descriptor auto-derived from capabilities(), failing safe
toward the full model when uncertain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-uk-chat Ready Ready Preview, Comment Jun 15, 2026 6:55pm

Request Review

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Beta preview has been cleaned up because this PR was closed.

@anth-volk

Copy link
Copy Markdown
Contributor Author

Closing — rather than keep this as a standalone design note, the routing approach is being built directly into #109.

@anth-volk anth-volk closed this Jun 15, 2026
@anth-volk anth-volk deleted the docs/scope-aware-routing branch June 15, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant