Commit History
-
[NOTICKET] feat(knowledge): readable concept keys + key-value lookup (m1, m2, m6, m8)
Rifqi Hafizuddin +1: Claude Opus 5From the 2026-09-08 discussion. `label` now carries a TYPE_SUBJECT key - GLOSSARY_PA - so an agent that meets an unknown term writes the key and hits the row: no scan, no embedding, no model call. Searching a list is O(N), searching a dictionary is O(1), which was the ask. m1 `src/knowledge_extraction/keys.py`. Prefixes come from the `kind` column vocabulary (English, singular) so the system holds one spelling per branch rather than two to keep in sync. Subjects cap at 40 chars, cut on a word boundary. A rule has no canonical surface of its own, so it borrows the term it governs plus a short digest (RULE_PA_C07BE4); asking the model to name it is the option ids.py already rules out, and a model-written rule_id was a real defect here. m2 A key is a LABEL, never an identity. `entity_id` stays the hash an expert's approval hangs on; a key is built from a surface and moves when clustering canonicalises differently. Pinned by a test: one term from two …0ba89b1