Expand description
Gap analysis & capability logic (§24, legal_logic.md) — anti-deficit / RPL.
Computes what is present versus what is lacking by set difference over capabilities —
the engine for Recognition of Prior Learning (RPL) and the “Peace-Infrastructure” deployment
strategy (deploy to the computed gap, not by assumption). Experiential/traditional
knowledge counts as held when an authoritative skos:closeMatch links it to the required
formal capability. Zero-heap (caller-supplied out).
Constants§
- MAX_
CAP_ NODES - Bound on capability nodes in one pathfinding query.
Functions§
- capability_
gap - The computable gap: the
requiredcapabilities that are NOT held (directly or by recognised equivalence), written toout. Returns the count.Gap = Req \ Holds. - estimate_
capability - Bayesian estimate of
P(holds capability | related achievements): a posterior from apriorand the fraction ofrelatedachievements that arepresent. Returns the prior unchanged if there is no related evidence.P = prior·L / (prior·L + (1−prior)·(1−L)),L = present/total. - learning_
path_ cost - Shortest-cost educational path to acquire
goalfrom theheldcapabilities, over a prerequisite graphedges = (from, to, cost)(“fromfromyou can learntoatcost”). Returns the minimum total cost, orNoneifgoalis unreachable. Bounded Dijkstra (A* with an admissible zero heuristic over a non-negative-cost graph); zero-heap (fixed arrays).nodesenumerates the capability ids (the index space, ≤MAX_CAP_NODES). - meets_
competency_ level - RPL competency level: a held competency at
held_levelsatisfies arequired_levelrequirement iff it is at least as high (e.g. AQF/EQF level mapping). - requirements_
met - Are all requirements met (the gap is empty)?