Term pruner loop
Definition¶
Caretaker background loop that autonomously prunes stale terms from the ubiquitous-language glossary (ADR-0057). On each tick it scans every confidence == "accepted" term in docs/wiki/terms/; for any term whose code_anchor no longer resolves in the live symbol index (built by ubiquitous_language.build_symbol_index), it opens an auto-merging bot PR that flips confidence to deprecated and records a superseded_reason with the broken anchor. The loop makes no LLM calls — detection is purely structural.
Invariants¶
- Kill-switch:
enabled_cb("term_pruner")ANDconfig.term_pruner_enabled— both must be true for work to proceed. - Opens at most one PR per tick, bundling all eligible terms into a single
hydraflow-ul-deprecated-labelled PR. ReviewPhaseskips routing for PRs carryingTERM_PRUNER_PR_LABELso the deprecation PR is not sent through the agent pipeline.- Companion to
TermProposerLoop: together they implement the two-tick grow/prune cycle that keepsmake lint-ulanchor-resolution green without human intervention.