KB-6DD7

05 — KG EXPLAIN Contract / Fixture Binding

2 min read Revision 1
dot-agent-apikg-explainfixture2026-06-04

05 — KG EXPLAIN Contract / Fixture Binding (Workstream D)

The pilot pair now has a complete, machine-readable contract.

Contract rows (LIVE in dot_agent_api_contract)

dot_code role mode fixture_ref output_namespace endpoint_ref
DOT_KG_EXPLAIN producer PLAN_ONLY FIXTURE:dot:kg:explain:v1 DRYRUN-NS:dot:kg:explain NULL
DOT_KG_EXPLAIN_VERIFY verifier VERIFY_ONLY FIXTURE:dot:kg:explain:v1 DRYRUN-NS:dot:kg:explain NULL

candidate_code = PROC-CAND:dot:kg, paired_dot cross-linked both ways.

Schemas bound

  • expected_output_schema (producer): kind=explanation; must_reference_node kgn:dieu39; must_only_cite_node_ids = the 4 fixture nodes; narrative_contains ["Dieu 39","EXPLAIN","GOVERNS"]. (Note: ASCII "Dieu 39" stored in the contract row to keep the SQL pipe ASCII-safe; the authoritative fixture file uses the full "Điều 39" — the verifier should read the fixture, not the contract gloss.)
  • verifier_schema (verifier): pass_criteria = references target node, every cited node ∈ subgraph_nodes, every cited edge ∈ subgraph_edges, no production knowledge_graph reference; fail_on = hallucinated_node / missing_target / production_table_reference.

Fixture (unchanged, re-verified)

FIXTURE:dot:kg:explain:v1 — synthetic-but-grounded subgraph (4 nodes / 4 edges mirroring the D1 KG-law curated cluster). No production knowledge_graph rows read or written. Cleanup clause deletes source_system observations; DRYRUN-NS output is fixture-only.

Run-scoped identifiers

process_run_id (uuid from fn_process_run_observe), correlation_id (e.g. PLAN:dot:kg:explain:*), component_run_id (uuid from component observe), idempotency_key (<root>:run / <root>:<dot_code>).

Status

KG binding complete. Everything is specified except the live invocation endpoint.

Back to Knowledge Hub knowledge/dev/reports/architecture/dot-agent-api-contract-dispatcher-dryrun-ui-registration-2026-06-04/05-kg-explain-contract-fixture-binding.md