Knowledge · Intermediate · runnable fixture source
Answer against a named knowledge snapshot
Trace a deterministic answer to approved rule versions, then inspect how citations change after review and publication.
@lssm-tech/example.policy-safe-knowledge-assistant · Orchestrator and integration source inspected · evidence as of 2026-10-27
Source context
Orchestrator and integration source inspected · b67c376f
Pinned source links require repository access; publication and anonymous package availability were not checked for this example.
A deterministic assistant searches a named curated snapshot. The integration fixture publishes an initial rule version, creates and reviews a change, publishes a second snapshot, and checks that the new answer cites that snapshot.
What you will learn
- Bind an answer to locale, jurisdiction, scope, and a specific knowledge snapshot.
- Keep citations connected to versioned source records.
- Refuse when the request envelope, scope, or citation conditions are not met.
AN INTERACTIVE READING MAP
Walk through this example.
Step through the maintained source review, inspect its evidence boundaries, or assemble an adaptation packet.
SOURCE WALKTHROUGH
Read the operation in its authored order
01 / IN FOCUS
Validate the request envelope
The orchestrator checks the request envelope before searching. An invalid envelope returns a refused answer with a reason code.
1 / 4
0 points in your packet
Walk through the source
- Validate the request envelope. The orchestrator checks the request envelope before searching. An invalid envelope returns a refused answer with a reason code.
- Search one snapshot. The caller supplies kbSearch. The orchestrator uses the snapshot ID and jurisdiction from the validated envelope and derives citations from the returned rule-version IDs.
- Enforce scope and citations. Scope and citation checks can replace the draft with an escalation or blocked answer. The answer builder is deterministic and makes no LLM calls.
- Review and publish a change. The integration test uses in-memory KB and pipeline handlers, approves updated rule material, publishes a new snapshot, and asserts that a subsequent answer cites it.
What this review establishes
- The inspected answer builder uses explicit snapshot, jurisdiction, and scope inputs.
- The integration fixture asserts citation changes after a reviewed publication path.
- The example can be inspected without a model provider.
Not established
- Legal or regulatory correctness of the sample rules.
- A guarantee against hallucinations for an arbitrary model integration.
- Production knowledge quality, expert identity, or access controls supplied by a host application.
Before adapting
- Access to the inspected source repository and a checkout at the cited revision.
- The repository's Bun workspace dependencies and required generated package exports. These instructions were inspected; the examples were not executed in this review.
Adapt the pattern
- Supply curated sources and preserve their version identifiers.
- Define the request envelope and refusal conditions before connecting a model.
- Test stale snapshots, missing citations, and publication transitions with your own content.
- declaredStability
- beta
- registry
- Registered
- inlinePreview
- Registered
- execution
- Not rerun
- production
- Not assessed