Search Self-Serve Contract

Purpose

Rule (mandatory for page teams)

Priority rollout ownership

Context IDRoute familyPage ownership ruleVerification floor
findings/security/triage, /security/findingsSecurity triage pages own the findings questions and clarifiers.Mocked Playwright journey + shared search regressions
policy/ops/policyPolicy workspace owns the questions and recovery prompts for rules, gates, and exceptions.Mocked Playwright journey + shared search regressions
doctor/ops/operations/doctor, /ops/operations/system-healthDoctor pages own the health-check questions and release-readiness follow-ups.Mocked Playwright journey + live Doctor route pack
timeline/ops/timeline, /audit, /evidence/audit-logTimeline/Audit pages own time-window clarifiers and causal follow-ups.Mocked Playwright journey
releases/releases, /mission-controlRelease-control pages own approval/blocker/next-step questions.Mocked Playwright journey

Page team checklist

  1. Add or update the route entry in SEARCH_CONTEXT_DEFINITIONS.
  2. Define bounded commonQuestions[] and clarifyingQuestions[].
  3. Keep copy operator-facing; do not expose Stella internals or scoring jargon.
  4. Verify the page still works with telemetry disabled or OTLP unset.
  5. Add/update unit coverage for route-specific questions and a Playwright journey for the page family.

Answer-first UX contract

Runtime behavior

Optional telemetry hooks

Gap review workflow

  1. Review repeated search_self_serve_gap and search_self_serve_reformulation events by route family.
  2. Compare them with visible no-result/clarify journeys from Playwright and operator feedback.
  3. Update the page-owned question set or starter chips for the affected route.
  4. Add or tighten a Playwright journey before marking the gap closed.
  5. Record the adjustment in the active sprint Execution Log so the change is traceable.

Source of truth

Testing requirements

  1. Add unit coverage for route-specific questions in ambient-context.service.spec.ts.
  2. Add unit coverage for answer-state rendering in global-search.component.spec.ts.
  3. Add Playwright coverage for:
    • grounded answer
    • clarify guidance rendering
    • answer-to-AdvisoryAI handoff
    • priority-route rollout journeys (findings, policy, doctor, timeline, releases)
  4. Keep route and API behavior mocked/deterministic; no live network dependencies.

Relationship to chip contract