core/chat
Shay 2aae25f4e2 feat(runtime): engage discourse planner on cold pack/teaching path
Option 2 of the lane-isolation work.  Mirrors the existing warm-path
hook into the cold-start branch (``gate_decision.fire`` ⇒ stub
response): after ``_maybe_pack_grounded_surface`` succeeds and the
result is pack- or teaching-grounded, build the same DiscoursePlan
and replace ``pack_surface`` with the rendered plan whenever it has
more than one move.

This closes the gap option 1 exposed: cold-start one-shot prompts
("Tell me about truth.", "Describe wisdom.", "Give me an example of
truth.") now produce deterministic multi-clause output without any
priming setup — the planner becomes the spine for grounded surfaces,
not a warm-only sidecar.

Gating discipline preserved:
* Engages only when pack_source_tag in {"pack", "teaching"}.  Cases
  routed to vault, none, or the discovery-signal disclosure are
  untouched.
* BRIEF mode collapses to a single ANCHOR move which renders
  byte-equivalent to the existing pack-grounded composer, so
  flag-off cognition byte-identity is preserved.
* Empty bundles → empty plan → no surface change (planner is total).

A/B on multi_sentence_response (21 cases, public/v1):

  flag off: multi=0.1429, primed_multi=0.0000, conn=0.0769
  flag on : multi=0.5238, primed_multi=0.5000, conn=0.2308

Cold-start lift: multi +38pp, conn +15pp.  Primed metric unchanged
(those cases already engaged the warm hook in step 5).

Sample cold-start surfaces flag-on:
* "Tell me about truth."
  → "Truth is a claim or state grounded by evidence and coherent
    judgment. Furthermore, truth belongs to cognition.truth. In
    turn, truth grounds knowledge."
* "Describe wisdom."
  → "Wisdom is sound judgment informed by knowledge and experience.
    Furthermore, wisdom belongs to cognition.wisdom. In turn,
    wisdom orders judgment."
* "Give me an example of truth."
  → "Truth is a claim or state grounded by evidence and coherent
    judgment. In turn, truth grounds knowledge."  (EXAMPLE mode:
    anchor + relation, no support)

Gates all green:
* flag off: cognition eval byte-identical
  - public 100/100/91.7/100, holdout 100/100/83.3/100
* smoke suite 67/67
* conversational_thread_coherence: 3 unwanted placeholders flag off
  and flag on (no regression)
* 136/136 planner + grounding + intent + lane tests pass
2026-05-19 11:55:12 -07:00
..
__init__.py
__main__.py
anaphora.py feat(adr-0066): session-thread context + opt-in anaphora prefix (Phase 3.1 + 3.2) 2026-05-18 17:01:34 -07:00
cross_pack_grounding.py feat(adr-0067): cross-pack teaching chains — Plan Phase 4 closed 2026-05-18 17:22:43 -07:00
example_surface.py feat(adr-0067): cross-pack teaching chains — Plan Phase 4 closed 2026-05-18 17:22:43 -07:00
narrative_surface.py feat(adr-0067): cross-pack teaching chains — Plan Phase 4 closed 2026-05-18 17:22:43 -07:00
oov_surface.py feat(adr-0066): NARRATIVE + EXAMPLE intents with multi-clause composers (Phase 3.3 + 3.4) 2026-05-18 17:01:55 -07:00
pack_grounding.py feat(packs): seed 323 reviewed glosses across 9 English content packs 2026-05-19 07:34:33 -07:00
pack_resolver.py feat(pack-resolver): gloss resolver with lexicon-residency + dual-checksum hardening 2026-05-19 07:24:36 -07:00
pack_surface_candidate.py feat(pack-grounding): selector-ready gloss wiring via PackSurfaceCandidate 2026-05-19 07:26:46 -07:00
partial_surface.py feat(adr-0065): OOV cliff → five-tier honesty gradient (Phase 2.1 + 2.2) 2026-05-18 16:41:45 -07:00
refusal.py
runtime.py feat(runtime): engage discourse planner on cold pack/teaching path 2026-05-19 11:55:12 -07:00
teaching_grounding.py feat(packs): en_core_relations_v2 — pronouns + role-fillers (Phase 2.4) 2026-05-18 16:42:02 -07:00
telemetry.py feat(adr-0059): correction-pass telemetry emission — backward perturbation auditable 2026-05-18 13:47:48 -07:00
thread_context.py feat(adr-0066): session-thread context + opt-in anaphora prefix (Phase 3.1 + 3.2) 2026-05-18 17:01:34 -07:00
verdicts.py feat(adr-0039): audit completeness — TurnVerdicts bundle, stub TurnEvent, hedge_injected 2026-05-17 21:32:46 -07:00