From 64ecc3f48de4de8c0ef2eb9501c8854d685d0f33 Mon Sep 17 00:00:00 2001 From: PPPA Date: Sun, 12 Jul 2026 17:11:41 +0000 Subject: [PATCH] Exchange governance v0.1.0 - Node Profile v0.2 Part II as executable UAPF BPMN admission (AL0 -> AL2), four DMN decision tables and a CMMN case for suspension, withdrawal and appeal. The three rules that answer structural objections structurally: - 17.2 circularity is a precondition, not a warning (avota-neatkariba). A participant cannot be the source of its own admission evidence, including where it commercially supplies company-register data. - 15 adverse decisions fail closed: exhaustive grounds, 30-day notice, cure, 5-working-day emergency review, two distinct officers, conflict-free appeal. - 6.4 a legally significant answer is never T0. Not an AI system (Reg. (EU) 2024/1689 Art. 3(1), Recital 12) - it does not infer. It is the governance of one, and therefore in MIC sandbox scope. resources/mappings.yaml traces every clause to its artefact and names the two gaps the model cannot close alone. --- .gitignore | 3 + README.md | 97 +++++++++++++ bpmn/dalibnieka-uznemsana.bpmn | 115 ++++++++++++++++ cmmn/akreditacijas-atsaukums.cmmn | 87 ++++++++++++ dmn/atsaukuma-pamatojums.dmn | 129 ++++++++++++++++++ dmn/avota-neatkariba.dmn | 78 +++++++++++ dmn/noteikt-ticamibas-limeni.dmn | 74 ++++++++++ dmn/piekluves-limena-prasibas.dmn | 102 ++++++++++++++ docs/00-parskats.md | 12 ++ docs/01-mi-akts.md | 14 ++ fixtures/al2-standarta-uznemsana.json | 14 ++ ...arkartas-apturesana-bez-parskatisanas.json | 10 ++ fixtures/atsaukums-nederigs-pamats.json | 10 ++ fixtures/juridiski-nozimigs-t0.json | 6 + ...registru-datu-sniedzejs-cirkularitate.json | 8 ++ manifest.json | 64 +++++++++ metadata/lifecycle.yaml | 9 ++ metadata/ownership.yaml | 11 ++ processgit.mcp.yaml | 40 ++++++ resources/guardrails.yaml | 41 ++++++ resources/mappings.yaml | 36 +++++ .../schemas/reliance-statement.schema.json | 49 +++++++ tests/eval-set.json | 11 ++ uapf.yaml | 98 +++++++++++++ 24 files changed, 1118 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 bpmn/dalibnieka-uznemsana.bpmn create mode 100644 cmmn/akreditacijas-atsaukums.cmmn create mode 100644 dmn/atsaukuma-pamatojums.dmn create mode 100644 dmn/avota-neatkariba.dmn create mode 100644 dmn/noteikt-ticamibas-limeni.dmn create mode 100644 dmn/piekluves-limena-prasibas.dmn create mode 100644 docs/00-parskats.md create mode 100644 docs/01-mi-akts.md create mode 100644 fixtures/al2-standarta-uznemsana.json create mode 100644 fixtures/arkartas-apturesana-bez-parskatisanas.json create mode 100644 fixtures/atsaukums-nederigs-pamats.json create mode 100644 fixtures/juridiski-nozimigs-t0.json create mode 100644 fixtures/registru-datu-sniedzejs-cirkularitate.json create mode 100644 manifest.json create mode 100644 metadata/lifecycle.yaml create mode 100644 metadata/ownership.yaml create mode 100644 processgit.mcp.yaml create mode 100644 resources/guardrails.yaml create mode 100644 resources/mappings.yaml create mode 100644 resources/schemas/reliance-statement.schema.json create mode 100644 tests/eval-set.json create mode 100644 uapf.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aafcb34 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +.DS_Store +*.log diff --git a/README.md b/README.md new file mode 100644 index 0000000..78bec85 --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# MI apmaiņas ekosistēmas pārvaldība + +**UAPF pakotne** · `lv.pppa.exchange-governance` · v0.1.0 · **MELNRAKSTS** + +Šī pakotne ir AI LV Exchange pārvaldība — izpildāmā formā. Noteikumi, kas nosaka, **kurš tiek uzņemts**, **ar kādu ticamības līmeni**, **ko pakalpojums drīkst prasīt** un **uz kāda pamata akreditāciju var atsaukt**, šeit nav apraksts. Tie ir versionēti modeļi, kurus var nolasīt, salīdzināt versiju starpā, atdalīt un apstrīdēt — pirms tie stājas spēkā. + +Normatīvais avots: [AI LV Exchange MCP Node Profile v0.2](https://github.com/PPPA-LV/AI-LV-Exchange-MCP-Node-Profile), II daļa. + +--- + +## Kāpēc tas ir svarīgi + +Uzticēšanās infrastruktūra, kuras pārvaldības noteikumi ir tikai teksts, ir tik uzticama, cik uzticams ir teksta autors. Tas ir strukturāls iebildums, un uz to nevar atbildēt ar vēl vienu tekstu. + +Šeit noteikumi ir kods. Katrs dalībnieks var pārliecināties, ka lēmums par viņu ir pieņemts tieši pēc tiem noteikumiem, kas bija publicēti brīdī, kad viņš pievienojās — un ka noteikumi kopš tā laika nav klusi mainījušies. + +Trīs vietas, kur tas ir redzams uzreiz: + +**1. Cirkularitāte ir izslēgta, nevis pieminēta.** Profila 17.2. punkts nosaka, ka pieteicējs nedrīkst būt to pierādījumu avots, uz kuru pamata viņu uzņem — arī tad, ja pieteicējs pats komerciāli piegādā uzņēmumu reģistra datus. Tas nav brīdinājums dokumentā. Tas ir `dmn/avota-neatkariba.dmn` — priekšnosacījums, kas apstādina uzņemšanu, pirms tiek palaists kaut viens izaicinājums. + +**2. Neviena atsevišķa persona nevar atsaukt akreditāciju.** Pamati ir izsmeļoši (15.1), brīdinājums ir 30 dienas (15.2), ārkārtas apturēšana ir jāpārskata 5 darba dienu laikā (15.3), lēmumu pieņem divas amatpersonas (15.4), apelāciju izskata instance bez komerciālas intereses (15.5). Tas viss ir `dmn/atsaukuma-pamatojums.dmn` un `cmmn/akreditacijas-atsaukums.cmmn` — un noklusējuma likums ir **noraidīt**. + +**3. Juridiski nozīmīga atbilde nekad nav T0.** Līmeni nosaka sekas, kas rodas, paļaujoties uz atbildi, nevis datu slepenība (6.4). Vispārīgs uzņēmuma ieraksts var būt T0. Autoritatīva pārstāvības tiesību pārbaude — nekad. + +--- + +## Kas šeit ir + +| Stūrakmens | Fails | Ko tas nosaka | +|---|---|---| +| BPMN | `bpmn/dalibnieka-uznemsana.bpmn` | Uzņemšanas plūsma: pieteikums → AL0 → pierādījumi → avota neatkarība → domēna un atslēgas kontrole → dalības līgums → AL → kredenciāls → atsauces paziņojums | +| DMN | `dmn/avota-neatkariba.dmn` | 14.2, 17.2 — uz ko PPPA **paļaujas** un ko PPPA **pārbauda**; cirkularitātes izslēgšana | +| DMN | `dmn/noteikt-ticamibas-limeni.dmn` | 6.1, 17 — ticamības līmenis AL0…AL3 | +| DMN | `dmn/piekluves-limena-prasibas.dmn` | 6.3, 6.4 — minimālās prasības T0…T3; juridiski nozīmīgas atbildes eskalācija | +| DMN | `dmn/atsaukuma-pamatojums.dmn` | 15 — nelabvēlīga lēmuma pieļaujamība | +| CMMN | `cmmn/akreditacijas-atsaukums.cmmn` | Apturēšana, atsaukums un apelācija kā nestrukturēta lieta ar obligātiem cilvēka soļiem | +| Resursi | `resources/mappings.yaml` | Katrs profila punkts → artefakts, kas to izpilda | +| Resursi | `resources/guardrails.yaml` | Pārvaldības ierobežojumi cilvēkam un uzturētājam lasāmā formā | + +--- + +## Kāpēc PPPA paļaujas, nevis apliecina + +PPPA nav reģistrācijas iestāde PKI izpratnē un neapliecina neviena identitāti. Uzņemšana balstās uz diviem atšķirīgiem faktu veidiem, un tie tiek apstrādāti atšķirīgi. + +| Fakts | Nosaka | PPPA loma | +|---|---|---| +| Juridiskā pastāvēšana, reģ. nr. | Uzņēmumu reģistrs | **Paļaujas.** Iegūst izrakstu, fiksē to un tā datumu | +| Pārstāvības tiesības | Uzņēmumu reģistrs | **Paļaujas.** Nekad — no pieteicēja datiem vai produktiem | +| Parakstītāja identitāte | Kvalificēts e-paraksts | **Paļaujas** | +| Deklarētā domēna kontrole | — | **Pārbauda.** DNS izaicinājums, reproducējams, žurnalēts | +| Deklarētās atslēgas kontrole | — | **Pārbauda.** MCPF izaicinājuma galapunkts, reproducējams | + +Uzņemšanas rezultāts tāpēc ir **atsauces paziņojums, nevis apliecinājums**. Shēma: `resources/schemas/reliance-statement.schema.json`. + +--- + +## Kas šī pakotne **nav** + +Šī pakotne **nav MI sistēma**. Tā neiemeslo. Tā ir noteikumu kopums, ko definējuši cilvēki un ko izpilda deterministiski — Regulas (ES) 2024/1689 3. panta 1. punkta un 12. apsvēruma izpratnē tas nav MI. + +Tā **ir** MI sistēmas pārvaldība. Tā nosaka uzņemšanu Process-as-Code MI sistēmas uzticēšanās un identitātes plaknē, un tāpēc tā atrodas [MI smilškastes](https://aisandbox.pppa.lv/platforma) tvērumā. Uzraugs uzrauga ne tikai sistēmas kodu, bet arī noteikumus, pēc kuriem tajā ielaiž. + +Katram nelabvēlīgam lēmumam ir vismaz divi obligāti cilvēka soļi. **Neviens nelabvēlīgs lēmums netiek automatizēts.** + +--- + +## Zināmās robežas + +Modelis nevar izpildīt visu pats, un tas ir pateikts skaidri, nevis noklusēts (`resources/mappings.yaml`, sadaļa `known_gaps`): + +- **Divu amatpersonu atšķirība.** DMN nespēj salīdzināt divus identifikatorus. Tabula saņem `divasAtseviskasAmatpersonas` kā jau aprēķinātu vērtību; par to, ka amatpersonas tiešām ir dažādas, atbild uzturētājs. PPPA-Registry to nodrošina ar datubāzes CHECK ierobežojumu. +- **Avota salīdzināšana ar pieteicēju.** Tāpat: uzturētājs izšķir pierādījuma avota DID un salīdzina to ar pieteicēja DID; tabula to nespēj. + +--- + +## Ieguldījums + +Profils un šī pakotne pieder atvērtai darba grupai, ne tās autoram. Skatīt [CONTRIBUTING](https://github.com/PPPA-LV/AI-LV-Exchange-MCP-Node-Profile/blob/main/CONTRIBUTING.md) un [INTERESTS](https://github.com/PPPA-LV/AI-LV-Exchange-MCP-Node-Profile/blob/main/INTERESTS.md) — pēdējā deklarē Cyberfort dubulto lomu (profila redaktors **un** komerciāls ieviesējs). Šī loma ir deklarēta, nevis atrisināta, un tā ir šķērslis, ko darba grupai vēl ir jānovērš. + +--- + +## English + +The governance of the AI LV Exchange, expressed as executable, versioned, forkable models — BPMN for admission, four DMN decision tables, and a CMMN case for suspension, withdrawal and appeal. Normative source: [AI LV Exchange MCP Node Profile v0.2](https://github.com/PPPA-LV/AI-LV-Exchange-MCP-Node-Profile), Part II. + +Trust infrastructure whose governance is only prose is exactly as trustworthy as the person who wrote the prose. That is a structural objection and prose cannot answer it. Here the rules are code: any participant can verify that a decision about them was taken under the rules published when they joined, and that those rules have not quietly changed since. + +The three that matter most: + +- **Circularity is excluded, not flagged.** §17.2 says a participant must not be the source of the evidence used to admit it — including where the applicant is itself a commercial provider of company-register data. That is a precondition in `dmn/avota-neatkariba.dmn`, and it halts admission before a single challenge is run. +- **No single person can withdraw accreditation.** Exhaustive grounds, 30-day notice, 5-working-day emergency review, two distinct officers, conflict-free appeal — and the default rule is **refuse**. +- **A legally significant answer is never T0.** The tier is set by the consequence of relying on the answer, not by the secrecy of the datum. + +**This package is not an AI system.** It does not infer; it executes rules defined by natural persons (Regulation (EU) 2024/1689, Art. 3(1), Recital 12). It *is* the governance of one: it decides admission to the trust and identity plane of the Process-as-Code AI system, which is why it sits inside the MIC regulatory sandbox scope. Every adverse decision has at least two mandatory human tasks. No adverse decision is ever automated. + +`resources/mappings.yaml` maps each profile clause to the artefact implementing it, and names the two places where the model cannot enforce the rule alone and the host must. diff --git a/bpmn/dalibnieka-uznemsana.bpmn b/bpmn/dalibnieka-uznemsana.bpmn new file mode 100644 index 0000000..1625afe --- /dev/null +++ b/bpmn/dalibnieka-uznemsana.bpmn @@ -0,0 +1,115 @@ + + + + + + + f1 + + + + f1 + f2 + + + + f2 + f3 + + + + f3 + f4 + + + + f4 + f5_ja + f5_ne + + + + f5_ne + + + + f5_ja + f6 + + + + f6 + f7 + + + + f7 + f8 + + + + f8 + f9 + + + + f9 + f10_ja + f10_ne + + + + f10_ja + f11 + + + + f11 + f10_ne + f12 + + + + f12 + + + + + + + + ${pieradijumsPielaujams == true} + + + ${pieradijumsPielaujams == false} + + + + + + + ${kredencialsIzsniedzams == true} + + + ${kredencialsIzsniedzams == false} + + + + + + + + + diff --git a/cmmn/akreditacijas-atsaukums.cmmn b/cmmn/akreditacijas-atsaukums.cmmn new file mode 100644 index 0000000..c440c9c --- /dev/null +++ b/cmmn/akreditacijas-atsaukums.cmmn @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + darbiba = "emergency_suspension" and lemumsPielaujams = true + + + + + darbiba = "withdrawal" and lemumsPielaujams = true + + + + + lemumsPielaujams = true and divasAtseviskasAmatpersonas = true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dmn/atsaukuma-pamatojums.dmn b/dmn/atsaukuma-pamatojums.dmn new file mode 100644 index 0000000..f9e24ae --- /dev/null +++ b/dmn/atsaukuma-pamatojums.dmn @@ -0,0 +1,129 @@ + + + + + + darbiba + + + pamats + + + divasAtseviskasAmatpersonas + + + bridinajumaDienas + + + noversanasPeriodsDots + + + parskatisanasDatumsNoteikts + + + + + - + - + false + - + - + - + false + "Neviena atseviska persona nedrikst atsaukt vai apturet akreditaciju (15.4)" + + + - + not("participant_withdrawal","loss_of_legal_existence","unremedied_material_breach","key_compromise_not_remediated","conformity_failure_not_remedied","competent_authority_order","active_security_incident") + - + - + - + - + false + "Pamats nav 15.1 izsmelosaja uzskaitijuma - cits pamats nav speka" + + + "emergency_suspension" + - + - + - + - + false + false + "Arkartas apturesana prasa parskatisanu 5 darba dienu laika (15.3)" + + + "emergency_suspension" + not("key_compromise_not_remediated","active_security_incident") + - + - + - + - + false + "Arkartas apturesana pieejama tikai apstiprinatai atslegas kompromitacijai vai aktivam drosibas incidentam (15.3)" + + + "emergency_suspension" + "key_compromise_not_remediated","active_security_incident" + true + - + - + true + true + "Arkartas apturesana pielaujama - rakstiski pamatota, parskatama 5 d.d. laika (15.3)" + + + "withdrawal" + not("participant_withdrawal","competent_authority_order","loss_of_legal_existence") + - + [0..30) + - + - + false + "Parastais atsaukums prasa 30 dienu rakstisku bridinajumu (15.2)" + + + "withdrawal" + "unremedied_material_breach","key_compromise_not_remediated","conformity_failure_not_remedied" + - + - + false + - + false + "Dalibniekam jadod iespeja noverst parkapumu (15.2)" + + + "withdrawal" + "participant_withdrawal","loss_of_legal_existence","unremedied_material_breach","key_compromise_not_remediated","conformity_failure_not_remedied","competent_authority_order" + true + - + - + - + true + "Atsaukums pielaujams - pamats no 15.1, bridinajums un noversana ieveroti, divas amatpersonas (15.2, 15.4)" + + + "suspension" + - + true + - + - + true + true + "Apturesana pielaujama drosibas izmeklesanai vai nenokartotam parkapumam (15.6)" + + + - + - + - + - + - + - + false + "Nosacijumi nav izpilditi - lemums noraidits pec noklusejuma" + + + + diff --git a/dmn/avota-neatkariba.dmn b/dmn/avota-neatkariba.dmn new file mode 100644 index 0000000..4a60264 --- /dev/null +++ b/dmn/avota-neatkariba.dmn @@ -0,0 +1,78 @@ + + + + + + faktaVeids + + + avotsIrPieteicejs + + + avotsIrPieteicejaProdukts + + + avotsIrValstsRegistrs + + + + + + "legal" + true + - + - + false + "none" + "Cirkularitate: pieteicejs nevar but sava uznemsanas pieradijuma avots (17.2)" + + + "legal" + - + true + - + false + "none" + "Juridiskos faktus nedrikst nemt no pieteiceja pasa produkta vai datiem (17.2)" + + + "legal" + - + - + false + false + "none" + "Juridiskie fakti janem no Uznemumu registra (14.2)" + + + "legal" + false + false + true + true + "relies" + "PPPA palaujas uz Uznemumu registra izrakstu un fikse ta datumu (14.2)" + + + "technical" + - + - + - + true + "verifies" + "PPPA pati parbauda tehniski reproducejamo - domena un atslegas kontroli (14.2)" + + + - + - + - + - + false + "none" + "Nezinams fakta veids vai avots - noraidits pec noklusejuma" + + + + diff --git a/dmn/noteikt-ticamibas-limeni.dmn b/dmn/noteikt-ticamibas-limeni.dmn new file mode 100644 index 0000000..0d5261a --- /dev/null +++ b/dmn/noteikt-ticamibas-limeni.dmn @@ -0,0 +1,74 @@ + + + + + + juridiskieFaktiPielaujami + + + domenaKontroleParbaudita + + + atslegasKontroleParbaudita + + + dalibasLigumsParakstits + + + mezglaGatavibaApliecinata + + + neatkarigsNovertejums + + + + + + true + true + true + true + true + true + "AL3" + true + "Augsta ticamiba - AL2 plus neatkarigs novertejums (6.1)" + + + true + true + true + true + true + - + "AL2" + true + "Akreditets mezgls (6.1, 17)" + + + true + true + - + - + - + - + "AL1" + false + "Organizacija parbaudita - kredencials netiek izsniegts (6.1)" + + + - + - + - + - + - + - + "AL0" + false + "Pasdeklarets ieraksts - nav parbaudits, nav uzticams, nedrikst uzradit ka akreditetu (6.1)" + + + + diff --git a/dmn/piekluves-limena-prasibas.dmn b/dmn/piekluves-limena-prasibas.dmn new file mode 100644 index 0000000..e6f8e16 --- /dev/null +++ b/dmn/piekluves-limena-prasibas.dmn @@ -0,0 +1,102 @@ + + + + + + pieprasitaisLimenis + + + juridiskiNozimigaAtbilde + + + + + + + + + + + + "T0" + true + "T1" + "AL1" + "L2" + true + false + true + true + false + 60 + + + "T0" + - + "T0" + "AL0" + "L1" + false + false + false + false + false + 0 + + + "T1" + - + "T1" + "AL1" + "L2" + true + false + true + true + false + 60 + + + "T2" + - + "T2" + "AL2" + "L3" + true + true + true + true + false + 15 + + + "T3" + - + "T3" + "AL2" + "L3" + true + true + true + true + true + 5 + + + - + - + "T3" + "AL2" + "L3" + true + true + true + true + true + 5 + + + + diff --git a/docs/00-parskats.md b/docs/00-parskats.md new file mode 100644 index 0000000..d1b63d2 --- /dev/null +++ b/docs/00-parskats.md @@ -0,0 +1,12 @@ +# Pārskats + +Šī pakotne pārvērš AI LV Exchange MCP Node Profile v0.2 II daļu (pārvaldība) izpildāmos modeļos. + +Lasīšanas secība: + +1. `resources/mappings.yaml` — punkts pa punktam: kur profila teksts pārvēršas artefaktā. +2. `bpmn/dalibnieka-uznemsana.bpmn` — uzņemšanas plūsma no pieteikuma līdz atsauces paziņojumam. +3. `dmn/avota-neatkariba.dmn` — vienīgā tabula, kas var apstādināt uzņemšanu jau pirms tehniskajām pārbaudēm. +4. `dmn/atsaukuma-pamatojums.dmn` un `cmmn/akreditacijas-atsaukums.cmmn` — spēcīgākā vara shēmā un tās ierobežojumi. + +Visas tabulas ir `hitPolicy="FIRST"` ar noraidošu noklusējuma likumu. Nezināma ievade nenozīmē atļauju. diff --git a/docs/01-mi-akts.md b/docs/01-mi-akts.md new file mode 100644 index 0000000..029b4ac --- /dev/null +++ b/docs/01-mi-akts.md @@ -0,0 +1,14 @@ +# Saistība ar MI aktu + +**Šī pakotne nav MI sistēma.** Regulas (ES) 2024/1689 3. panta 1. punkts prasa, lai sistēma *secinātu* no saņemtās ievades, kā ģenerēt iznākumus. 12. apsvērums no MI sistēmas jēdziena skaidri izslēdz sistēmas, kas darbojas pēc noteikumiem, kurus definējušas fiziskas personas, un tos vienkārši izpilda. Uzmeklēšana reģistrā, paraksta pārbaude un lēmumu tabula neiemeslo. + +**Šī pakotne ir MI sistēmas pārvaldība.** Tā nosaka, kurš tiek ielaists Process-as-Code MI sistēmas uzticēšanās un identitātes plaknē un ar kādām tiesībām. Piekļuves kontrole, kas atrodas ārpus sistēmas robežām, nozīmē neauditētu autorizāciju — to neviens uzraugs nepieņem. Tāpēc tā ir sistēmas robežās un smilškastes tvērumā. + +Praktiskās sekas: + +- **9. pants (riska pārvaldība)** — pārvaldības noteikumi ir versionēti un salīdzināmi; izmaiņa ir redzama kā izmaiņa. +- **12. pants (žurnalēšana)** — katrs lēmums izdod parakstītu notikumu. +- **14. pants (cilvēka virsvadība)** — katram nelabvēlīgam lēmumam ir vismaz divi obligāti cilvēka uzdevumi. Neviens nelabvēlīgs lēmums netiek automatizēts. +- **17.1 (uzņemšanas ieraksts)** — ierakstā jānorāda, ko PPPA pārbaudīja pati, kādus ārējos avotus izmantoja, ko apgalvo un kas paliek dalībnieka atbildībā. + +**Ko smilškaste nedod.** Uzņemšana smilškastē nav atbilstības sertifikāts, paziņotās institūcijas statuss vai tiesības akreditēt. Tā dod uzraudzītu testēšanu, izejas ziņojumu un tiesisko noteiktību plāna tvērumā. Šo atšķirību nedrīkst izplūdināt. diff --git a/fixtures/al2-standarta-uznemsana.json b/fixtures/al2-standarta-uznemsana.json new file mode 100644 index 0000000..c39fd30 --- /dev/null +++ b/fixtures/al2-standarta-uznemsana.json @@ -0,0 +1,14 @@ +{ + "_comment": "Standard AL2 admission. Legal facts relied upon from Uznemumu registrs; domain and key control verified by PPPA.", + "faktaVeids": "legal", + "avotsIrPieteicejs": false, + "avotsIrPieteicejaProdukts": false, + "avotsIrValstsRegistrs": true, + "juridiskieFaktiPielaujami": true, + "domenaKontroleParbaudita": true, + "atslegasKontroleParbaudita": true, + "dalibasLigumsParakstits": true, + "mezglaGatavibaApliecinata": true, + "neatkarigsNovertejums": false, + "_expected": { "pieradijumsPielaujams": true, "pppaRezims": "relies", "ticamibasLimenis": "AL2", "kredencialsIzsniedzams": true } +} diff --git a/fixtures/arkartas-apturesana-bez-parskatisanas.json b/fixtures/arkartas-apturesana-bez-parskatisanas.json new file mode 100644 index 0000000..4b99a9a --- /dev/null +++ b/fixtures/arkartas-apturesana-bez-parskatisanas.json @@ -0,0 +1,10 @@ +{ + "_comment": "Emergency suspension on a valid ground but with no 5-working-day review date set. 15.3 refuses it.", + "darbiba": "emergency_suspension", + "pamats": "key_compromise_not_remediated", + "divasAtseviskasAmatpersonas": true, + "bridinajumaDienas": 0, + "noversanasPeriodsDots": false, + "parskatisanasDatumsNoteikts": false, + "_expected": { "lemumsPielaujams": false, "_rule": "W3_arkartas_bez_parskatisanas" } +} diff --git a/fixtures/atsaukums-nederigs-pamats.json b/fixtures/atsaukums-nederigs-pamats.json new file mode 100644 index 0000000..cf5253d --- /dev/null +++ b/fixtures/atsaukums-nederigs-pamats.json @@ -0,0 +1,10 @@ +{ + "_comment": "Withdrawal attempted on a ground not in the exhaustive 15.1 list. Must be refused before any credential is touched.", + "darbiba": "withdrawal", + "pamats": "we_felt_like_it", + "divasAtseviskasAmatpersonas": true, + "bridinajumaDienas": 45, + "noversanasPeriodsDots": true, + "parskatisanasDatumsNoteikts": false, + "_expected": { "lemumsPielaujams": false, "_rule": "W2_nezinams_pamats" } +} diff --git a/fixtures/juridiski-nozimigs-t0.json b/fixtures/juridiski-nozimigs-t0.json new file mode 100644 index 0000000..14c8d68 --- /dev/null +++ b/fixtures/juridiski-nozimigs-t0.json @@ -0,0 +1,6 @@ +{ + "_comment": "A service exposed at T0 that answers an authoritative question about representation rights. 6.4: the tier is set by the consequence of relying on the answer, not by the secrecy of the datum. Escalates to T1.", + "pieprasitaisLimenis": "T0", + "juridiskiNozimigaAtbilde": true, + "_expected": { "faktiskaisLimenis": "T1", "minimalaisAL": "AL1", "minimalaisMCPF": "L2", "maxStatusaKesaMin": 60, "_rule": "T0_escalated_legally_significant" } +} diff --git a/fixtures/registru-datu-sniedzejs-cirkularitate.json b/fixtures/registru-datu-sniedzejs-cirkularitate.json new file mode 100644 index 0000000..de47f2b --- /dev/null +++ b/fixtures/registru-datu-sniedzejs-cirkularitate.json @@ -0,0 +1,8 @@ +{ + "_comment": "The applicant is itself a commercial provider of company-register data, and the UR extract was obtained from the applicant's own product. Node Profile 17.2 excludes this. The rule fires; admission stops before any challenge is run.", + "faktaVeids": "legal", + "avotsIrPieteicejs": false, + "avotsIrPieteicejaProdukts": true, + "avotsIrValstsRegistrs": false, + "_expected": { "pieradijumsPielaujams": false, "pppaRezims": "none", "_rule": "N2_cirkularitate_produkts" } +} diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..c425380 --- /dev/null +++ b/manifest.json @@ -0,0 +1,64 @@ +{ + "kind": "uapf.package", + "id": "lv.pppa.exchange-governance", + "name": "MI apmaiņas ekosistēmas pārvaldība", + "description": "Level-4 UAPF process package encoding the governance of the AI LV Exchange\n(AI LV Exchange MCP Node Profile v0.2, Part II) as executable, versioned,\nforkable models rather than prose.\n\nBPMN — the admission process: application, evidence gathering, source-\nindependence check, domain-control and key-control challenges, assurance-level\ndetermination, participation agreement, credential issuance, publication of\nthe reliance statement.\n\nDMN — four decision tables carrying the algorithm the profile currently\nstates in prose:\n * avota-neatkariba — §14.2 / §17.2 verified vs relied-upon facts,\n and the exclusion of circularity. Legal facts\n MUST come from Uzņēmumu reģistrs and MUST NOT\n come from the applicant or from the applicant's\n own product — which binds hardest precisely when\n the applicant is a commercial provider of\n company-register data.\n * noteikt-ticamibas-limeni — §6.1 / §17 assurance level AL0..AL3.\n * piekluves-limena-prasibas — §6.3 minimum-requirements matrix (T0..T3 to\n AL, MCPF level, mandate, entitlement, audit,\n status-cache), plus §6.4: a legally significant\n answer is never T0 regardless of the secrecy of\n the datum.\n * atsaukuma-pamatojums — §15 admissibility of an adverse decision:\n exhaustive grounds, 30-day notice, cure,\n 5-working-day emergency review, two distinct\n officers. Fail-closed by default.\n\nCMMN — the withdrawal / suspension / appeal case: discretionary and mandatory\nwork in an unstructured matter, with the two-officer decision and the\nconflict-free appeal as first-class human tasks.\n\nNothing here infers. This package is the deterministic governance of an AI\nsystem, not an AI system itself (Regulation (EU) 2024/1689, Art. 3(1) and\nRecital 12). It is in scope of the sandbox because it governs admission to\nthe trust and identity plane of the Process-as-Code AI system.\n", + "level": 4, + "version": "0.1.0", + "requires_capabilities": [ + "pppa.evidence.fetch@1+", + "pppa.domain.challenge@1+", + "pppa.key.challenge@1+", + "pppa.credential.issue@1+", + "pppa.credential.revoke@1+", + "event.emit@1+" + ], + "profiles_supported": [ + "uapf-ip-orchestrated" + ], + "guardrails": "resources/guardrails.yaml", + "includes": [], + "dependencies": { + "AI LV Exchange MCP Node Profile": "0.2" + }, + "cornerstones": { + "bpmn": true, + "dmn": true, + "cmmn": true, + "resources": true + }, + "paths": { + "bpmn": "bpmn", + "dmn": "dmn", + "cmmn": "cmmn", + "resources": "resources", + "metadata": "metadata", + "algorithms": "algorithms" + }, + "algorithm_cards": false, + "exposure": { + "mcp": { + "enabled": true, + "runnable": true, + "exposedEntrypoints": [ + "Process_DalibniekaUznemsana", + "Case_AkreditacijasAtsaukums" + ], + "exposedArtifacts": [ + "manifest", + "bpmn", + "dmn", + "cmmn", + "docs" + ] + } + }, + "owners": [ + { + "type": "org", + "id": "pppa-lv", + "contact": "info@pppa.lv" + } + ], + "lifecycle": "draft" +} \ No newline at end of file diff --git a/metadata/lifecycle.yaml b/metadata/lifecycle.yaml new file mode 100644 index 0000000..012cd03 --- /dev/null +++ b/metadata/lifecycle.yaml @@ -0,0 +1,9 @@ +kind: uapf.metadata.lifecycle +status: draft +created: "2026-07-12T00:00:00Z" +lastModified: "2026-07-12T00:00:00Z" +changeHistory: + - version: "0.1.0" + date: "2026-07-12" + summary: "Initial package. Node Profile v0.2 Part II governance expressed as BPMN (admission), four DMN decision tables (source independence, assurance level, access-tier matrix, adverse-decision admissibility) and CMMN (suspension, withdrawal, appeal). Nothing here infers; it is the deterministic governance of an AI system, not an AI system." + author: "pppa-lv" diff --git a/metadata/ownership.yaml b/metadata/ownership.yaml new file mode 100644 index 0000000..7aace9a --- /dev/null +++ b/metadata/ownership.yaml @@ -0,0 +1,11 @@ +kind: uapf.metadata.ownership +owners: + - type: org + id: pppa-lv + name: Publisko un privato partneribu asociacija (PPPA) + contact: info@pppa.lv + role: owner +approvers: + - pppa-lv +declared_interests: + - "Cyberfort SIA is both an editor of the Node Profile and a commercial implementer. This dual role is declared, not resolved (Node Profile 16, INTERESTS.md). Cyberfort MUST NOT sit on the appeal body for any node it implements (15.5)." diff --git a/processgit.mcp.yaml b/processgit.mcp.yaml new file mode 100644 index 0000000..4e5c469 --- /dev/null +++ b/processgit.mcp.yaml @@ -0,0 +1,40 @@ +# ProcessGit MCP Configuration +# Exposes this UAPF governance package as an MCP server (process-as-knowledge). +version: 1 + +server: + name: "MI apmainas ekosistemas parvaldiba" + description: "MCP server for the AI LV Exchange governance UAPF package (lv.pppa.exchange-governance) - BPMN admission, four DMN decision tables, and the CMMN withdrawal/appeal case, traceable clause-by-clause to the Node Profile v0.2." + instructions: | + This repository is the governance of the AI LV Exchange, expressed as code. + The rules that decide who is admitted, at what assurance level, what a + service may demand, and on what grounds accreditation may be withdrawn + live in dmn/ as four decision tables. The admission flow is in bpmn/. The + suspension, withdrawal and appeal case is in cmmn/. + + resources/mappings.yaml maps every clause of the Node Profile v0.2 to the + artefact that implements it, and states the two places where the model + cannot enforce the rule alone and the host must. + + Use 'search' and 'get_entity' to explore, 'validate' to check the models. + Fork it, diff it, and object before it takes effect. + +sources: + - path: "bpmn/dalibnieka-uznemsana.bpmn" + type: "xml" + description: "BPMN - the admission process, AL0 to AL2" + - path: "dmn/avota-neatkariba.dmn" + type: "xml" + description: "DMN - verified vs relied-upon facts; circularity excluded (14.2, 17.2)" + - path: "dmn/noteikt-ticamibas-limeni.dmn" + type: "xml" + description: "DMN - assurance level AL0..AL3 (6.1, 17)" + - path: "dmn/piekluves-limena-prasibas.dmn" + type: "xml" + description: "DMN - minimum requirements per access tier T0..T3 (6.3, 6.4)" + - path: "dmn/atsaukuma-pamatojums.dmn" + type: "xml" + description: "DMN - admissibility of an adverse decision (15)" + - path: "cmmn/akreditacijas-atsaukums.cmmn" + type: "xml" + description: "CMMN - suspension, withdrawal and appeal as an unstructured case" diff --git a/resources/guardrails.yaml b/resources/guardrails.yaml new file mode 100644 index 0000000..aa5c9b5 --- /dev/null +++ b/resources/guardrails.yaml @@ -0,0 +1,41 @@ +# Non-normative supplementary file. UAPF does not cornerstone guardrails; +# they live under resources/ as a host-readable policy snapshot of the +# normative rules in the AI LV Exchange MCP Node Profile v0.2, Part II. +authority: lv.pppa.scheme-authority +version: "0.1.0" +profile: "AI LV Exchange MCP Node Profile v0.2" + +separation_of_powers: + - "PPPA does NOT attest to legal facts. It relies on Uznemumu registrs and records what it relied on, and the date. The output of admission is a reliance statement, not an attestation (14.2)." + - "PPPA verifies only what is technically reproducible: domain control and key control. Anyone may re-run either challenge and obtain the same answer (14.2)." + - "A technical service provider acquires no trust authority by supplying software or infrastructure (14)." + - "The Conformity Assessor function MUST be separated from the Scheme Authority before the Exchange leaves sandbox status, or before it admits its third participant, whichever is first (14.1)." + +circularity: + - "A participant MUST NOT be the source of the evidence used to admit it (17.2)." + - "Legal facts MUST come from Uznemumu registrs, never from the applicant's own data or products - including where the applicant is itself a commercial provider of company-register data (17.2)." + - "This is enforced in dmn/avota-neatkariba.dmn as a precondition, not as a warning. The default rule rejects." + +assurance: + - "AL0 is self-declared and MUST NOT be presented as verified or accredited (6.1, 17)." + - "AL0 can never be accredited. No credential is issued below AL2." + - "Assurance level (how thoroughly the participant was verified) and access tier (what the service demands) are different axes and MUST NOT be conflated (6)." + +access: + - "The tier is set by the consequence of relying on the answer, not by the secrecy of the datum. A legally significant verification is never T0 (6.4)." + - "MCPF L2 is where the challenge endpoint appears. A node serving T1 at L1 has an identity claim and no identity proof (6.3)." + - "Fail-closed: an unrecognised tier resolves to T3 requirements, not T0." + +adverse_decisions: + - "The grounds in 15.1 are exhaustive. No other ground is valid." + - "No single individual may withdraw or suspend accreditation. Two distinct authorised PPPA officers are required (15.4)." + - "Ordinary withdrawal requires 30 days written notice and a cure period (15.2)." + - "Emergency suspension is narrow: confirmed key compromise or an active security incident affecting federation trust. It MUST be reasoned in writing and reviewed within 5 working days (15.3)." + - "Appeal goes to a body excluding any person with a commercial interest in the participant's node or in a competing implementation (15.5)." + - "Every precondition is checked BEFORE any side effect. Where a side effect is unavoidable, it runs fail-closed: the credential is revoked first, so a later failure leaves the participant untrusted rather than trusted." + +eu_ai_act: + classification: "Not an AI system. This package is deterministic governance - rules defined by natural persons, executed without inference. Regulation (EU) 2024/1689 Art. 3(1) and Recital 12." + scope: "In scope of the MIC regulatory sandbox because it governs admission to the trust and identity plane of the Process-as-Code AI system, which is the declared AI system." + human_oversight: "Every adverse decision has at least two mandatory human tasks (the two-officer decision, and the appeal). No adverse decision is ever automated." + logging: "Each decision emits a signed CloudEvent. The onboarding record MUST state which checks PPPA performed, which external sources it used, which claims PPPA makes, and which remain the participant's responsibility (17.1)." diff --git a/resources/mappings.yaml b/resources/mappings.yaml new file mode 100644 index 0000000..94b97e8 --- /dev/null +++ b/resources/mappings.yaml @@ -0,0 +1,36 @@ +kind: uapf.resource.mappings +version: "0.1.0" +description: | + Traceability from the normative text of the AI LV Exchange MCP Node Profile + v0.2 to the executable artefact that implements it. Anyone reading the profile + can find the code; anyone reading the code can find the clause. + +profile_to_artefact: + - clause: "6.1 Assurance levels AL0..AL3" + artefact: dmn/noteikt-ticamibas-limeni.dmn + - clause: "6.3 Minimum requirements matrix (T0..T3)" + artefact: dmn/piekluves-limena-prasibas.dmn + - clause: "6.4 Legally significant data is never T0" + artefact: dmn/piekluves-limena-prasibas.dmn#T0_escalated_legally_significant + - clause: "14.2 Verified facts vs relied-upon facts" + artefact: dmn/avota-neatkariba.dmn + - clause: "17.2 Circularity is excluded, not merely flagged" + artefact: dmn/avota-neatkariba.dmn#N1_cirkularitate_pieteicejs, dmn/avota-neatkariba.dmn#N2_cirkularitate_produkts + - clause: "17 Onboarding AL0 -> AL1 -> AL2 -> AL3" + artefact: bpmn/dalibnieka-uznemsana.bpmn + - clause: "15.1 Exhaustive grounds" + artefact: dmn/atsaukuma-pamatojums.dmn#W2_nezinams_pamats + - clause: "15.2 Notice and cure" + artefact: dmn/atsaukuma-pamatojums.dmn#W6_atsaukums_bez_30d, dmn/atsaukuma-pamatojums.dmn#W7_atsaukums_bez_noversanas + - clause: "15.3 Emergency suspension, 5-working-day review" + artefact: dmn/atsaukuma-pamatojums.dmn#W3_arkartas_bez_parskatisanas, cmmn/akreditacijas-atsaukums.cmmn#stage_arkartas + - clause: "15.4 Two-officer decision" + artefact: dmn/atsaukuma-pamatojums.dmn#W1_nav_divas_amatpersonas, cmmn/akreditacijas-atsaukums.cmmn#ht_divi + - clause: "15.5 Conflict-free appeal" + artefact: cmmn/akreditacijas-atsaukums.cmmn#stage_apelacija + - clause: "8.4 Cascading loss of recognition" + artefact: cmmn/akreditacijas-atsaukums.cmmn#ms_speka + +known_gaps: + - "The two-officer check is modelled as a boolean input (divasAtseviskasAmatpersonas). DMN cannot compare two identifiers, so the distinctness of the officers MUST be enforced by the host before the table is evaluated. PPPA-Registry does this with a DB CHECK constraint." + - "avota-neatkariba takes precomputed booleans (avotsIrPieteicejs, avotsIrPieteicejaProdukts). The host resolves the evidence source DID and compares it to the applicant DID; the table cannot." diff --git a/resources/schemas/reliance-statement.schema.json b/resources/schemas/reliance-statement.schema.json new file mode 100644 index 0000000..9a37125 --- /dev/null +++ b/resources/schemas/reliance-statement.schema.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://pppa.lv/schemas/reliance-statement-v0.2.json", + "title": "Reliance statement", + "description": "The output of admission (Node Profile v0.2, 14.2). PPPA does not attest; it records what it relied on and what it verified.", + "type": "object", + "required": ["participantId", "assuranceLevel", "reliedUpon", "verified", "issuedAt"], + "properties": { + "participantId": { "type": "string", "description": "did:web of the participant node" }, + "organisationName": { "type": "string" }, + "registrationNumber": { "type": "string", "pattern": "^[0-9]{11}$" }, + "assuranceLevel": { "enum": ["AL0", "AL1", "AL2", "AL3"] }, + "profileVersion": { "type": "string" }, + "mcpfLevel": { "enum": ["L1", "L2", "L3"] }, + "reliedUpon": { + "type": "array", + "description": "Legal facts. PPPA relies; it never attests.", + "items": { + "type": "object", + "required": ["fact", "source", "sourceDate"], + "properties": { + "fact": { "enum": ["legalExistence", "representationRights", "signatoryIdentity"] }, + "source": { "type": "string", "description": "e.g. Uznemumu registrs; never the applicant or its products" }, + "sourceDate": { "type": "string", "format": "date" }, + "sourceIsApplicant": { "const": false }, + "sourceIsApplicantProduct": { "const": false } + } + } + }, + "verified": { + "type": "array", + "description": "Technical facts. Reproducible by anyone.", + "items": { + "type": "object", + "required": ["fact", "method", "verifiedAt"], + "properties": { + "fact": { "enum": ["domainControl", "keyControl"] }, + "method": { "enum": ["dns-txt-challenge", "mcpf-challenge-endpoint"] }, + "subject": { "type": "string" }, + "verifiedAt": { "type": "string", "format": "date-time" }, + "evidenceRef": { "type": "string" } + } + } + }, + "issuedAt": { "type": "string", "format": "date-time" }, + "statement": { "type": "string", "description": "Human-readable form, in Latvian." } + }, + "additionalProperties": false +} diff --git a/tests/eval-set.json b/tests/eval-set.json new file mode 100644 index 0000000..2e30f79 --- /dev/null +++ b/tests/eval-set.json @@ -0,0 +1,11 @@ +{ + "kind": "uapf.tests.evalset", + "version": "0.1.0", + "cases": [ + { "name": "AL2 standarta uznemsana", "fixture": "fixtures/al2-standarta-uznemsana.json", "decisions": ["avota-neatkariba", "noteikt-ticamibas-limeni"] }, + { "name": "Cirkularitate - registru datu sniedzejs", "fixture": "fixtures/registru-datu-sniedzejs-cirkularitate.json", "decisions": ["avota-neatkariba"], "mustReject": true }, + { "name": "Atsaukums uz nederiga pamata", "fixture": "fixtures/atsaukums-nederigs-pamats.json", "decisions": ["atsaukuma-pamatojums"], "mustReject": true }, + { "name": "Arkartas apturesana bez parskatisanas datuma", "fixture": "fixtures/arkartas-apturesana-bez-parskatisanas.json", "decisions": ["atsaukuma-pamatojums"], "mustReject": true }, + { "name": "Juridiski nozimiga atbilde T0 limeni", "fixture": "fixtures/juridiski-nozimigs-t0.json", "decisions": ["piekluves-limena-prasibas"] } + ] +} diff --git a/uapf.yaml b/uapf.yaml new file mode 100644 index 0000000..0787985 --- /dev/null +++ b/uapf.yaml @@ -0,0 +1,98 @@ +kind: uapf.package +id: lv.pppa.exchange-governance +name: MI apmaiņas ekosistēmas pārvaldība +description: | + Level-4 UAPF process package encoding the governance of the AI LV Exchange + (AI LV Exchange MCP Node Profile v0.2, Part II) as executable, versioned, + forkable models rather than prose. + + BPMN — the admission process: application, evidence gathering, source- + independence check, domain-control and key-control challenges, assurance-level + determination, participation agreement, credential issuance, publication of + the reliance statement. + + DMN — four decision tables carrying the algorithm the profile currently + states in prose: + * avota-neatkariba — §14.2 / §17.2 verified vs relied-upon facts, + and the exclusion of circularity. Legal facts + MUST come from Uzņēmumu reģistrs and MUST NOT + come from the applicant or from the applicant's + own product — which binds hardest precisely when + the applicant is a commercial provider of + company-register data. + * noteikt-ticamibas-limeni — §6.1 / §17 assurance level AL0..AL3. + * piekluves-limena-prasibas — §6.3 minimum-requirements matrix (T0..T3 to + AL, MCPF level, mandate, entitlement, audit, + status-cache), plus §6.4: a legally significant + answer is never T0 regardless of the secrecy of + the datum. + * atsaukuma-pamatojums — §15 admissibility of an adverse decision: + exhaustive grounds, 30-day notice, cure, + 5-working-day emergency review, two distinct + officers. Fail-closed by default. + + CMMN — the withdrawal / suspension / appeal case: discretionary and mandatory + work in an unstructured matter, with the two-officer decision and the + conflict-free appeal as first-class human tasks. + + Nothing here infers. This package is the deterministic governance of an AI + system, not an AI system itself (Regulation (EU) 2024/1689, Art. 3(1) and + Recital 12). It is in scope of the sandbox because it governs admission to + the trust and identity plane of the Process-as-Code AI system. + +level: 4 +version: "0.1.0" + +requires_capabilities: + - pppa.evidence.fetch@1+ + - pppa.domain.challenge@1+ + - pppa.key.challenge@1+ + - pppa.credential.issue@1+ + - pppa.credential.revoke@1+ + - event.emit@1+ + +profiles_supported: + - uapf-ip-orchestrated + +guardrails: resources/guardrails.yaml + +includes: [] +dependencies: + "AI LV Exchange MCP Node Profile": "0.2" + +cornerstones: + bpmn: true + dmn: true + cmmn: true + resources: true + +paths: + bpmn: bpmn + dmn: dmn + cmmn: cmmn + resources: resources + metadata: metadata + algorithms: algorithms + +algorithm_cards: false + +exposure: + mcp: + enabled: true + runnable: true + exposedEntrypoints: + - "Process_DalibniekaUznemsana" + - "Case_AkreditacijasAtsaukums" + exposedArtifacts: + - manifest + - bpmn + - dmn + - cmmn + - docs + +owners: + - type: org + id: pppa-lv + contact: info@pppa.lv + +lifecycle: draft