Skip to content

First use case#1

Merged
svcho merged 2 commits intomainfrom
scaffold-monorepo
Apr 23, 2026
Merged

First use case#1
svcho merged 2 commits intomainfrom
scaffold-monorepo

Conversation

@svcho
Copy link
Copy Markdown
Owner

@svcho svcho commented Apr 23, 2026

No description provided.

svcho and others added 2 commits April 23, 2026 13:44
…ce steps

Closes three gaps identified before KB content authoring:

- Scenarios carry structured `tips[]` (warning / hint / common_mistake) with
  bilingual text. Tips flow through ChecklistStep.tips verbatim — the system
  prompt forbids paraphrasing.
- Scenarios carry optional `online_booking_url`, `online_service_url`, and
  `appointment_phone` fields. These render as CTA buttons; URLs are lint-checked
  against the allowlist and never synthesised by the LLM.
- Sequence steps accept `{ scenario_id, applies_if, applies_unless, note? }` in
  addition to bare IDs. Filtering runs deterministically in the Worker via
  `filterSequenceSteps`; the LLM never evaluates conditions. Situation tags come
  from the closed SITUATION_TAGS.md vocabulary, cross-checked against the Zod
  enum by `pnpm lint:content`.

Frontend adds a SituationTags chip toggle that posts `situation_tags` on every
query. ChecklistStep card now renders tips and CTA buttons.

Docs updated across PRD §8.2/§8.4/§8.10, TDD §5.4/§6/§12.3/§15, README, and
CLAUDE.md non-negotiables. 8 new vitest cases cover the sequence filter.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Query now returns deterministic checklist only — retrieval + rerank +
metadata assembly, no Claude call. Frontend shows a cycling thinking-words
spinner while the request is in flight, then a concrete "I don't have that
answer yet" card when cosine falls below the relevance floor. That no-coverage
path auto-submits the original query (with explicit consent named in the
privacy notice) to KV under feedback:<response_id> with a 180-day TTL, so
missing topics surface for curation instead of being silently served an
unrelated scenario.

Also seed the first KB scenario (Meldezettel) and drop the rerank absolute
floor — bge-reranker-base outputs are uncalibrated and keyword-biased, so
using them as a gate blocked real paraphrases while letting keyword
false-positives through.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@svcho svcho merged commit f14b024 into main Apr 23, 2026
0 of 2 checks passed
@svcho svcho deleted the scaffold-monorepo branch April 23, 2026 12:48
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