Context Governance Framework

A lifecycle for the knowledge feeding an LLM: candidate-only builds meant to keep automated jobs off live, a contract gate that blocks silent shrinkage and lost facts (answer scoring advisory), manual reversible promotion, pinned versions, one-click rollback.

Built after unattended automation shrank a production index overnight, and tightened after a later run gutted it. Includes the uncomfortable finding that the governance layer was built but inert — every field present, the authority ranking a no-op — because provenance was never populated.

Context engineering · AI governance · Human-in-the-loop · Audited rollback

Python · PostgreSQL · Cloud Run · scheduled jobs

A release pipeline for knowledge, as designedCandidate, versioned, never what users see, checked, into the gate, which blocks silent shrinkage and blocks lost facts, with answer scoring beside the gate as advisory; a check fails leads to nothing promoted; checked leads to a person promotes, manual, reversible, beside a pinned known-good version for one-click rollback; then production, watched, staleness caught, gaps healed; healed context goes back through the same gate. The design. In my own system, not every part of it was enforced.The design. In my own system, not every part of it was enforced.Answer scoringbeside the gate ·advisoryCandidateversioned · neverwhat users seecheckedGateblocks silentshrinkageblocks lost factscheckedA personpromotesmanual ·reversibleProduction,watchedstaleness caught ·gaps healeda check failsNothingpromotedone-click rollbackPinnedknown-goodversionhealed context goes back through the same gate A release pipeline for knowledge, as designedCandidate, versioned, never what users see, checked, into the gate, which blocks silent shrinkage and blocks lost facts, with answer scoring beside the gate as advisory; a check fails leads to nothing promoted; checked leads to a person promotes, manual, reversible, beside a pinned known-good version for one-click rollback; then production, watched, staleness caught, gaps healed; healed context goes back through the same gate. The design. In my own system, not every part of it was enforced.The design. In my own system,not every part of it was enforced.Candidateversioned · never what users seecheckedGateblocks silentshrinkageblocks lost factsAnswerscoringbeside the gate ·advisorya check failsNothingpromotedcheckedA personpromotesmanual ·reversiblePinnedknown-goodversionone-clickrollbackProduction, watchedstaleness caught · gaps healedhealed context goes back throughthe same gate
Treating the information a model reads the way you treat code: a versioned candidate, a gate that blocks silent shrinkage and lost facts while answer scoring runs beside it as advice, a person who promotes, a pinned known-good version for one-click rollback, and healed context sent back through the same gate. That's the design; in my own system, not every part of it was enforced.

Related

What I build