orchestrata_ultimate.factory.amendment
Reference › orchestrata_ultimate › factory › amendment
SPEC-033 amendment-direction differential classifier (B16, ADR-0009/0020/0021).
The amendment package decides whether a change to the Prolog governance rulebase tightens or loosens it (SPEC-033 row B16, ADR-0009, ADR-0020, ADR-0021). The answer decides who must approve: only a tightening change may proceed on the amending quorum alone, while loosening and undetermined changes go to a human. The result is fail-closed in one direction.
The parts are: models (the Direction enum, ClauseChange and DirectionVerdict); syntactic (a clause parser and differ that proves tightening or loosening from clause shape); coupling (import-edge closure and boundary-change detection); and classify, the entry point. Control flows from classify_amendment to the syntactic diff first. Only a syntactic tightening verdict is provisional, and the ledger screen or the coupling signal can downgrade it to undetermined; neither can promote a verdict. The command-line entry point is scripts.factory_amend. Start with classify and read the monotonicity argument at the top of syntactic. The narrative is on the factory page.
5 modules, 830 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
SPEC-033 amendment-direction differential classifier (B16, ADR-0009/0020/0021). | 28 |
classify |
The ADR-0020 fail-closed cascade: syntactic first, else the human. | 153 |
coupling |
ADR-0021 coupling accounting: transitive closure + boundary-change detection. | 217 |
models |
Data model for the SPEC-033 amendment-direction classifier (B16). | 91 |
syntactic |
The decidable fragment of amendment-direction classification (ADR-0020 step 1). | 341 |