diff --git a/manifest.json b/manifest.json index a8d73e9..979b8fe 100644 --- a/manifest.json +++ b/manifest.json @@ -1,17 +1,14 @@ { + "kind": "uapf.package", "id": "lv.tiesibsargs.iesnieguma-izskatisana", "name": "Tiesībsarga biroja iesnieguma izskatīšanas process", - "description": "Algorithmated complaint intake and triage for the Office of the Ombudsman of Latvia. Fetches an incoming iesniegums, redacts PII before AI processing, extracts structured facets, classifies the topic, determines priority, routes to the appropriate department, persists the classification record, and emits a domain event. Human assignment and response drafting remain in the host DMS.", - "version": "0.1.0", + "description": "Algoritmizēta iesnieguma uzņemšana un triāža Tiesībsarga birojam:\nsaņem ienākošo iesniegumu, maskē personas datus, izvelk strukturētus\nfaktus, klasificē tēmu, nosaka prioritāti, maršrutē uz nodaļu, saglabā\nklasifikācijas ierakstu un publicē domēna notikumu.\n\nCilvēka piesaiste un atbildes sagatavošana paliek hosta DMS rokās.\n", "level": 4, - "owners": [ - { - "type": "organisation", - "id": "lv.tiesibsargs", - "contact": "info@tiesibsargs.lv" - } - ], - "lifecycle": "draft", + "version": "1.1.0", + "includes": [], + "dependencies": { + "dev.uapf.semantic-document-analysis": "^1.0.0" + }, "cornerstones": { "bpmn": true, "dmn": true, @@ -21,27 +18,31 @@ "paths": { "bpmn": "bpmn", "dmn": "dmn", + "cmmn": "cmmn", "resources": "resources", - "fixtures": "fixtures", - "tests": "tests", - "docs": "docs" + "metadata": "metadata" }, - "requires_capabilities": [ - "document.fetch@1+", - "ai.redact@1+", - "ai.extract@1+", - "data.write@1+", - "event.emit@1+" + "exposure": { + "mcp": { + "enabled": true, + "runnable": true, + "exposedEntrypoints": [ + "iesnieguma-izskatisana" + ], + "exposedArtifacts": [ + "manifest", + "bpmn", + "dmn", + "docs" + ] + } + }, + "owners": [ + { + "type": "team", + "id": "tiesibsargs-process-office", + "contact": "process-office@tiesibsargs.lv" + } ], - "profiles_supported": [ - "uapf-ip-orchestrated" - ], - "guardrails": "resources/guardrails.yaml", - "legal_basis": [ - "Iesniegumu likums", - "Tiesībsarga likums", - "Administratīvā procesa likums", - "Vispārīgā datu aizsardzības regula (GDPR)" - ], - "eu_ai_act_classification": "Annex III §5(a) and §8(a) — high-risk per the multi-category framing in the AI sandbox application; classification subject to refinement under MIC sandbox testing" -} + "lifecycle": "draft" +} \ No newline at end of file diff --git a/metadata/lifecycle.yaml b/metadata/lifecycle.yaml new file mode 100644 index 0000000..db361a8 --- /dev/null +++ b/metadata/lifecycle.yaml @@ -0,0 +1,21 @@ +kind: uapf.metadata.lifecycle +status: draft +created: '2026-03-15T00:00:00Z' +lastModified: '2026-05-15T20:35:00Z' +changeHistory: +- version: 1.1.0 + date: '2026-05-15' + summary: "Declares dependency on dev.uapf.semantic-document-analysis@^1.0.0 \u2014\ + \ reusable semantic analysis algorithm extracted into its own package per UAPF\ + \ v1.1 09-dependencies \xA79.1." + author: rihards.gailums +- version: 1.0.0 + date: '2026-05-15' + summary: Initial UAPF v1.1 conformant rebuild. Replaces non-conformant v0.1.0 (manifest.json + shape, no mandatory metadata/, no resources/mappings.yaml). + author: rihards.gailums +- version: 0.1.0 + date: '2026-03-15' + summary: Original sandbox prototype with manifest.json. Non-conformant to UAPF v1.1 + SSOT. + author: rihards.gailums diff --git a/metadata/ownership.yaml b/metadata/ownership.yaml new file mode 100644 index 0000000..36edf2f --- /dev/null +++ b/metadata/ownership.yaml @@ -0,0 +1,16 @@ +kind: uapf.metadata.ownership +owners: + - type: team + id: tiesibsargs-process-office + name: Tiesībsarga biroja procesu birojs + contact: process-office@tiesibsargs.lv + role: owner + - type: role + id: role.tiesibsargs-data-protection-officer + name: Datu aizsardzības speciālists + role: reviewer +approvers: + - tiesibsargs-process-office +escalation: + primary: tiesibsargs-process-office + sla_hours: 24 diff --git a/resources/mappings.yaml b/resources/mappings.yaml new file mode 100644 index 0000000..9f78745 --- /dev/null +++ b/resources/mappings.yaml @@ -0,0 +1,129 @@ +kind: uapf.resources.mapping + +# ─── Targets: who/what fulfills the work ───────────────────────── +targets: + - id: system.opendms-document-api + type: system_api + name: OpenDMS document API + description: Hosting DMS that stores the iesniegums and returns its content + metadata. + capabilities: + - capability.document.fetch + - capability.data.write + endpoint: "uapf-host:/api/documents" + authentication: + method: oauth2 + configRef: "host-oauth" + + - id: agent.tiesibsargs-pii-redactor + type: ai_agent + name: PII redaction agent + description: Masks personal data from iesniegums text before downstream AI processing. Enforces GDPR Art. 5 minimisation. + capabilities: + - capability.ai.redact + + - id: agent.tiesibsargs-fact-extractor + type: ai_agent + name: Structured fact extractor + description: Extracts typed facets (mentions_child, ongoing_harm, vulnerable_group, criminal_indication, language, sector) from redacted text. Consumed by the three downstream DMN decisions. + capabilities: + - capability.ai.extract + + - id: system.opendms-event-bus + type: system_api + name: OpenDMS event bus + description: CloudEvents v1.0 receiver. Downstream subscribers consume document.classified.v1 events. + capabilities: + - capability.event.emit + + - id: role.tiesibsargs-iesniegumu-koordinators + type: human_role + name: Iesniegumu koordinators + description: Human reviewer required by EU AI Act Art. 14 when humanValidationStatus is PENDING or REQUIRED. Fallback for low-confidence classifications. + +# ─── Bindings: BPMN/DMN element → target ───────────────────────── +bindings: + + # BPMN service tasks + - source: { type: bpmn.serviceTask, ref: FetchDocument } + targetId: system.opendms-document-api + mode: autonomous + contract: + input: + - { name: documentId, type: string, required: true } + output: + - { name: title, type: string } + - { name: docType, type: string } + - { name: regNumber, type: string } + - { name: text, type: string } + timeout: "30s" + retries: { maxAttempts: 3, backoffMs: 1000 } + requiredCapabilities: [capability.document.fetch] + + - source: { type: bpmn.serviceTask, ref: RedactPii } + targetId: agent.tiesibsargs-pii-redactor + mode: autonomous + contract: + input: + - { name: text, type: string, required: true } + output: + - { name: redactedText, type: string } + - { name: detections, type: array } + timeout: "10s" + requiredCapabilities: [capability.ai.redact] + fallback: + onError: "fail" + onTimeout: "fail" + + - source: { type: bpmn.serviceTask, ref: ExtractFacets } + targetId: agent.tiesibsargs-fact-extractor + mode: autonomous + contract: + input: + - { name: text, type: string, required: true } + output: + - { name: extracted, type: object } + - { name: confidence, type: number } + - { name: modelUsed, type: string } + timeout: "30s" + retries: { maxAttempts: 2, backoffMs: 2000 } + requiredCapabilities: [capability.ai.extract] + fallback: + targetId: role.tiesibsargs-iesniegumu-koordinators + onError: "escalate" + onTimeout: "escalate" + + - source: { type: bpmn.serviceTask, ref: RecordClassification } + targetId: system.opendms-document-api + mode: autonomous + contract: + input: + - { name: documentId, type: string, required: true } + - { name: classification, type: object, required: true } + timeout: "10s" + requiredCapabilities: [capability.data.write] + + - source: { type: bpmn.serviceTask, ref: EmitClassifiedEvent } + targetId: system.opendms-event-bus + mode: autonomous + contract: + input: + - { name: eventType, type: string, required: true } + - { name: payload, type: object, required: true } + timeout: "5s" + requiredCapabilities: [capability.event.emit] + + # BPMN business rule tasks → DMN decisions + - source: { type: dmn.decision, ref: classify-topic } + targetId: agent.tiesibsargs-fact-extractor + mode: autonomous + notes: "DMN evaluation is local to the engine; AI agent supplies the input facets." + + - source: { type: dmn.decision, ref: determine-priority } + targetId: agent.tiesibsargs-fact-extractor + mode: autonomous + notes: "Driven by topic + ongoing_harm + vulnerable_group + mentions_child facets." + + - source: { type: dmn.decision, ref: route-to-department } + targetId: agent.tiesibsargs-fact-extractor + mode: autonomous + notes: "Topic → department mapping. Output is consumed by downstream human workflow." diff --git a/uapf.yaml b/uapf.yaml new file mode 100644 index 0000000..36b1e5e --- /dev/null +++ b/uapf.yaml @@ -0,0 +1,47 @@ +kind: uapf.package +id: lv.tiesibsargs.iesnieguma-izskatisana +name: Tiesībsarga biroja iesnieguma izskatīšanas process +description: 'Algoritmizēta iesnieguma uzņemšana un triāža Tiesībsarga birojam: + + saņem ienākošo iesniegumu, maskē personas datus, izvelk strukturētus + + faktus, klasificē tēmu, nosaka prioritāti, maršrutē uz nodaļu, saglabā + + klasifikācijas ierakstu un publicē domēna notikumu. + + + Cilvēka piesaiste un atbildes sagatavošana paliek hosta DMS rokās. + + ' +level: 4 +version: 1.1.0 +includes: [] +dependencies: + dev.uapf.semantic-document-analysis: ^1.0.0 +cornerstones: + bpmn: true + dmn: true + cmmn: false + resources: true +paths: + bpmn: bpmn + dmn: dmn + cmmn: cmmn + resources: resources + metadata: metadata +exposure: + mcp: + enabled: true + runnable: true + exposedEntrypoints: + - iesnieguma-izskatisana + exposedArtifacts: + - manifest + - bpmn + - dmn + - docs +owners: +- type: team + id: tiesibsargs-process-office + contact: process-office@tiesibsargs.lv +lifecycle: draft