Declare layer.yaml, add a Python engine over a local SQLite store, and cover deterministic assessment, the §13 gap register, stance-map inventory, claim guardrails, and the gate-house review path with tests. Assistant: grok Assistant-Session: 01a04ceb-150e-7e80-a542-ec8b1372e164
2 KiB
maturity-engine
Computes, deterministically, how far a thing has progressed against declared criteria and submitted evidence — and keeps the history of that progression.
An Engine (PIP) in the NetKingdom security layer model v0.7. Given the same criteria and the same evidence it returns the same level; that property is what makes it an engine rather than an opinion. It supplies facts a decision consumes as claims. It does not decide.
gate-house judges and proposes. maturity-engine computes and remembers.
It exists because NetKingdom is full of maturity that nothing owns — the Canon's
ASM-0…ASM-6 ladder, the layer model's four conformance states and gap register,
ops-warden's delegated lanes, kings-guard's advisory-until-gaps-close posture,
PEP stance maps parked in the statute, the State Hub's DoX quality debt — and
because gate-house was catalogued as owning conformance review with no engine
to act through, the same defect kings-guard found for containment.
Guardrail: a maturity level must never gate a decision directly, and must
never be compiled into registry content. If a level determines an outcome it
reaches access-engine as an input claim or a versioned policy rule, never by
a consumer branching on a fetched level. Compiled data that determines an
outcome is still deciding.
Scoring: blocked-clean MUST NOT rank below conforming.
Maturity here is graded, evidence-based, open-ended, and revisable — levels can
fall when evidence expires. The closed, binary, replay-proof state machine of an
approval belongs to approval-engine; the two engines are deliberate opposites.
See INTENT.md and SCOPE.md. The claim contract is docs/claim-contract.md.
python3 -m pip install -e ".[dev]" # or: PYTHONPATH=src
make test
make check-layer
PYTHONPATH=src python3 -m maturity_engine bootstrap --at 2026-08-29T12:00:00Z
PYTHONPATH=src python3 -m maturity_engine review --subject kings-guard --at 2026-08-29T12:00:00Z