Commit History
5 days ago
-
[NOTICKET] feat(scope): code-owned conversation scope — focus from value lists, follow-up carry, scope line
Rifqi Hafizuddin +1: Claude Opus 5.5Scope (the site/section/unit an answer covers) becomes state owned by code (src/agents/scope). The planner only plans the question and declares "all X". - values.py: full value lists of small non-PII string columns via read-only GROUP BYs through the query pipeline; per-process cache; complete-only. - engine.py: focus from the objective; the user's words against focus columns; follow-up carry from the router's rewrite (go-home otherwise); negation, quantifiers, unit drill-down, unknown codes, misplaced values; applied before validation (fill gaps, correct the invalid, respect the grounded, keep subset-vs-total); scope line from the filters that ran. - Planner prompt shows no scope state; PlannerService.plan(prepare=...). - TurnScope persisted on AnalysisRecord.scope; read back next turn. - Report anchors scope on the focus; outside-focus answers are comparisons. - Traceability payload: rewritten_query + scope (additive). - refusals: keep the planner's infeasible reason (pr/2…111ef6b