You've already forked AI-Sandb-Evaluation
Import UAPF package
moved files
This commit is contained in:
13
README.md
13
README.md
@@ -36,7 +36,11 @@ enterprise/
|
|||||||
processes/L4/vdaa.mi.sandbox.atlase/ # L4 — izpildāmā pakotne
|
processes/L4/vdaa.mi.sandbox.atlase/ # L4 — izpildāmā pakotne
|
||||||
uapf.yaml # UAPF manifests (kind: uapf.package)
|
uapf.yaml # UAPF manifests (kind: uapf.package)
|
||||||
agent.chat.yaml # ProcessGit AI čata konfigurācija
|
agent.chat.yaml # ProcessGit AI čata konfigurācija
|
||||||
processgit.viewer.json # Pielāgota GUI deklarācija
|
examples/
|
||||||
|
processgit.viewer.json # Pielāgota GUI deklarācija (co-located)
|
||||||
|
komisija-vertesana.html # Interaktīvs vērtēšanas panelis
|
||||||
|
candidate-input.example.json # Piemēra iesnieguma dati
|
||||||
|
expected-output.example.json # Sagaidāmais rezultāts (ar AI novērtējumu)
|
||||||
|
|
||||||
bpmn/
|
bpmn/
|
||||||
mi-sandbox-atlase.bpmn.xml # Galvenais process
|
mi-sandbox-atlase.bpmn.xml # Galvenais process
|
||||||
@@ -59,13 +63,6 @@ processes/L4/vdaa.mi.sandbox.atlase/ # L4 — izpildāmā pakotne
|
|||||||
ownership.yaml # Īpašnieki un pārskatīšana
|
ownership.yaml # Īpašnieki un pārskatīšana
|
||||||
lifecycle.yaml # Dzīves cikla statuss un ierobežojumi
|
lifecycle.yaml # Dzīves cikla statuss un ierobežojumi
|
||||||
|
|
||||||
examples/
|
|
||||||
candidate-input.example.json # Piemēra iesnieguma dati
|
|
||||||
expected-output.example.json # Sagaidāmais rezultāts (ar AI novērtējumu)
|
|
||||||
|
|
||||||
viewer/
|
|
||||||
komisija-vertesana.html # Interaktīvs vērtēšanas panelis
|
|
||||||
|
|
||||||
docs/
|
docs/
|
||||||
source-reference.md # Nolikuma punktu kartējums uz artefaktiem
|
source-reference.md # Nolikuma punktu kartējums uz artefaktiem
|
||||||
CHANGELOG.md # Izmaiņu žurnāls
|
CHANGELOG.md # Izmaiņu žurnāls
|
||||||
|
|||||||
@@ -0,0 +1,511 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="lv">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>MI Sandbox — Komisijas vērtēšanas panelis</title>
|
||||||
|
<style>
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
|
||||||
|
:root {
|
||||||
|
--bg: #0f1117; --surface: #1a1d27; --surface2: #232733; --surface3: #2d3140;
|
||||||
|
--border: #363b4d; --text: #e8eaf0; --text2: #9ca3b8; --text3: #6b7394;
|
||||||
|
--accent: #6366f1; --accent2: #818cf8; --green: #22c55e; --green-bg: rgba(34,197,94,0.1);
|
||||||
|
--red: #ef4444; --red-bg: rgba(239,68,68,0.1); --amber: #f59e0b; --amber-bg: rgba(245,158,11,0.1);
|
||||||
|
--blue: #3b82f6; --blue-bg: rgba(59,130,246,0.1);
|
||||||
|
--radius: 8px; --radius-lg: 12px;
|
||||||
|
}
|
||||||
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
|
||||||
|
.app { max-width: 960px; margin: 0 auto; padding: 20px; }
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
.header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
|
||||||
|
.header-icon { font-size: 28px; }
|
||||||
|
.header h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
|
||||||
|
.header .badge { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px; background: var(--accent); color: white; margin-left: 8px; }
|
||||||
|
.header .sub { font-size: 13px; color: var(--text2); margin-top: 2px; }
|
||||||
|
|
||||||
|
/* Tabs */
|
||||||
|
.tabs { display: flex; gap: 2px; margin-bottom: 20px; background: var(--surface); border-radius: var(--radius); padding: 3px; }
|
||||||
|
.tab { flex: 1; padding: 8px 12px; text-align: center; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 6px; color: var(--text2); transition: all 0.15s; }
|
||||||
|
.tab:hover { color: var(--text); background: var(--surface2); }
|
||||||
|
.tab.active { background: var(--accent); color: white; }
|
||||||
|
|
||||||
|
/* Panels */
|
||||||
|
.panel { display: none; }
|
||||||
|
.panel.active { display: block; }
|
||||||
|
|
||||||
|
/* Cards */
|
||||||
|
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; }
|
||||||
|
.card-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text2); margin-bottom: 12px; }
|
||||||
|
|
||||||
|
/* Eligibility form */
|
||||||
|
.check-grid { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
|
||||||
|
.check-label { font-size: 13px; color: var(--text); }
|
||||||
|
.check-ref { font-size: 11px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }
|
||||||
|
.toggle { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--surface3); cursor: pointer; position: relative; transition: background 0.2s; }
|
||||||
|
.toggle:checked { background: var(--green); }
|
||||||
|
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform 0.2s; }
|
||||||
|
.toggle:checked::after { transform: translateX(16px); }
|
||||||
|
|
||||||
|
/* Scoring */
|
||||||
|
.criteria-table { width: 100%; border-collapse: collapse; }
|
||||||
|
.criteria-table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
|
||||||
|
.criteria-table td { padding: 10px 6px; font-size: 13px; border-bottom: 1px solid rgba(54,59,77,0.5); }
|
||||||
|
.criteria-table .nr { font-family: 'JetBrains Mono', monospace; color: var(--text3); width: 30px; }
|
||||||
|
.criteria-table .weight { font-family: 'JetBrains Mono', monospace; color: var(--accent2); width: 50px; text-align: center; }
|
||||||
|
.criteria-table .score { font-family: 'JetBrains Mono', monospace; font-weight: 600; width: 60px; text-align: right; }
|
||||||
|
|
||||||
|
.rating-input { width: 52px; padding: 5px 8px; font-size: 14px; font-family: 'JetBrains Mono', monospace; font-weight: 600; text-align: center; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); outline: none; }
|
||||||
|
.rating-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,0.2); }
|
||||||
|
.rating-input.invalid { border-color: var(--red); }
|
||||||
|
|
||||||
|
select.jurisdiction { padding: 5px 8px; font-size: 13px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); outline: none; }
|
||||||
|
select.jurisdiction:focus { border-color: var(--accent); }
|
||||||
|
|
||||||
|
.trl-input { width: 52px; padding: 5px 8px; font-size: 14px; font-family: 'JetBrains Mono', monospace; font-weight: 600; text-align: center; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); outline: none; }
|
||||||
|
|
||||||
|
/* Total */
|
||||||
|
.total-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--surface2); border-radius: var(--radius); margin-top: 12px; }
|
||||||
|
.total-label { font-size: 14px; font-weight: 600; }
|
||||||
|
.total-score { font-size: 28px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
|
||||||
|
.total-score.high { color: var(--green); }
|
||||||
|
.total-score.mid { color: var(--amber); }
|
||||||
|
.total-score.low { color: var(--red); }
|
||||||
|
|
||||||
|
/* Tiebreak */
|
||||||
|
.tiebreak { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
|
||||||
|
.tiebreak-chip { font-size: 12px; font-family: 'JetBrains Mono', monospace; padding: 4px 10px; border-radius: 20px; background: var(--surface3); color: var(--text2); }
|
||||||
|
.tiebreak-chip .val { font-weight: 600; color: var(--accent2); }
|
||||||
|
|
||||||
|
/* Status badges */
|
||||||
|
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
|
||||||
|
.status.eligible { background: var(--green-bg); color: var(--green); }
|
||||||
|
.status.fix { background: var(--amber-bg); color: var(--amber); }
|
||||||
|
.status.reject { background: var(--red-bg); color: var(--red); }
|
||||||
|
|
||||||
|
/* Progress bar */
|
||||||
|
.progress-track { width: 100%; height: 8px; background: var(--surface3); border-radius: 4px; overflow: hidden; margin-top: 8px; }
|
||||||
|
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease, background 0.4s ease; }
|
||||||
|
|
||||||
|
/* Guardrails panel */
|
||||||
|
.rule-card { padding: 10px 12px; background: var(--surface2); border-radius: var(--radius); margin-bottom: 8px; border-left: 3px solid var(--accent); }
|
||||||
|
.rule-id { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--accent2); margin-bottom: 4px; }
|
||||||
|
.rule-text { font-size: 13px; color: var(--text); }
|
||||||
|
.rule-enforcement { font-size: 11px; color: var(--red); font-weight: 600; margin-top: 4px; }
|
||||||
|
|
||||||
|
/* AI output preview */
|
||||||
|
.ai-output { background: var(--surface2); border-radius: var(--radius); padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.6; color: var(--text2); white-space: pre-wrap; max-height: 400px; overflow-y: auto; }
|
||||||
|
.ai-disclaimer { margin-top: 12px; padding: 10px; background: var(--amber-bg); border-radius: var(--radius); font-size: 12px; color: var(--amber); }
|
||||||
|
|
||||||
|
/* Audit */
|
||||||
|
.audit-event { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 12px; }
|
||||||
|
.audit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
|
||||||
|
.audit-dot.ai { background: var(--amber); }
|
||||||
|
.audit-ts { font-family: 'JetBrains Mono', monospace; color: var(--text3); min-width: 140px; }
|
||||||
|
.audit-name { color: var(--text); }
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
.btn { padding: 8px 16px; font-size: 13px; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
|
||||||
|
.btn-primary { background: var(--accent); color: white; }
|
||||||
|
.btn-primary:hover { background: var(--accent2); }
|
||||||
|
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
|
||||||
|
.btn-ghost:hover { color: var(--text); background: var(--surface2); }
|
||||||
|
|
||||||
|
.actions { display: flex; gap: 8px; margin-top: 16px; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="app">
|
||||||
|
<div class="header">
|
||||||
|
<span class="header-icon">🏛️</span>
|
||||||
|
<div>
|
||||||
|
<h1>MI Sandbox Atlase <span class="badge">DEMO</span></h1>
|
||||||
|
<div class="sub">Komisijas vērtēšanas panelis — Nolikuma process kā UAPF/ProcessGit</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tabs">
|
||||||
|
<div class="tab active" data-panel="eligibility">Atbilstība</div>
|
||||||
|
<div class="tab" data-panel="scoring">Vērtēšana</div>
|
||||||
|
<div class="tab" data-panel="ai-agent">AI Aģents</div>
|
||||||
|
<div class="tab" data-panel="guardrails">Guardrails</div>
|
||||||
|
<div class="tab" data-panel="audit">Audits</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ===== PANEL: ELIGIBILITY ===== -->
|
||||||
|
<div class="panel active" id="panel-eligibility">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">Formālā atbilstība (DMN: 01-atbilstiba-un-izsledzosie)</div>
|
||||||
|
<div class="check-grid">
|
||||||
|
<div><span class="check-label">Juridiska persona</span> <span class="check-ref">6.1.p.</span></div>
|
||||||
|
<input type="checkbox" class="toggle" id="ck_legal" checked>
|
||||||
|
|
||||||
|
<div><span class="check-label">Jurisdikcija</span> <span class="check-ref">6.1.p.</span></div>
|
||||||
|
<select class="jurisdiction" id="sel_jurisdiction">
|
||||||
|
<option value="LV" selected>LV — Latvija</option>
|
||||||
|
<option value="EU">EU — ES dalībvalsts</option>
|
||||||
|
<option value="EEA">EEA — EEZ valsts</option>
|
||||||
|
<option value="CH">CH — Šveice</option>
|
||||||
|
<option value="OTHER">Cita (neatbilst)</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<div><span class="check-label">Iesniegts termiņā</span> <span class="check-ref">7., 8.p.</span></div>
|
||||||
|
<input type="checkbox" class="toggle" id="ck_time" checked>
|
||||||
|
|
||||||
|
<div><span class="check-label">Dokumenti latviešu valodā</span> <span class="check-ref">10.p.</span></div>
|
||||||
|
<input type="checkbox" class="toggle" id="ck_latvian" checked>
|
||||||
|
|
||||||
|
<div><span class="check-label">Drošs e-paraksts ar laika zīmogu</span> <span class="check-ref">7.p.</span></div>
|
||||||
|
<input type="checkbox" class="toggle" id="ck_esign" checked>
|
||||||
|
|
||||||
|
<div><span class="check-label">NAV aizliegtā MI prakse</span> <span class="check-ref">6.2.p., Regula 5.p.</span></div>
|
||||||
|
<input type="checkbox" class="toggle" id="ck_notforbidden" checked>
|
||||||
|
|
||||||
|
<div><span class="check-label">NAV izslēdzošie nosacījumi (Likuma 8.p.3.d.)</span> <span class="check-ref">6.3.p.</span></div>
|
||||||
|
<input type="checkbox" class="toggle" id="ck_noexclusion" checked>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 16px;">
|
||||||
|
<strong style="font-size:13px;">Rezultāts:</strong>
|
||||||
|
<span id="elig-result" class="status eligible">✓ ELIGIBLE</span>
|
||||||
|
<span id="elig-reason" style="font-size:12px; color:var(--text2); margin-left:8px;"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ===== PANEL: SCORING ===== -->
|
||||||
|
<div class="panel" id="panel-scoring">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">TRL līmeņa kartējums (DMN: 03-trl-vertejums)</div>
|
||||||
|
<div style="display:flex; align-items:center; gap:12px;">
|
||||||
|
<span style="font-size:13px;">TRL līmenis:</span>
|
||||||
|
<input type="number" class="trl-input" id="trl_level" min="1" max="9" value="7">
|
||||||
|
<span style="font-size:13px;">→ Vērtējums:</span>
|
||||||
|
<span id="trl_score" style="font-family:'JetBrains Mono'; font-weight:700; font-size:18px; color:var(--accent2);">4</span>
|
||||||
|
<span id="trl_label" style="font-size:12px; color:var(--text2);"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">Kritēriju vērtējumi (DMN: 02-vertesanas-punkti)</div>
|
||||||
|
<table class="criteria-table">
|
||||||
|
<thead>
|
||||||
|
<tr><th>Nr.</th><th>Kritērijs</th><th>Svars</th><th>0–5</th><th>Punkti</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="nr">1</td>
|
||||||
|
<td>Inovitāte un tirgus nepilnību novēršana</td>
|
||||||
|
<td class="weight">20</td>
|
||||||
|
<td><input type="number" class="rating-input" data-crit="1" data-weight="20" min="0" max="5" value="4"></td>
|
||||||
|
<td class="score" id="sc1">16.0</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="nr">2</td>
|
||||||
|
<td>Ieguldījums digitālās transformācijas mērķos</td>
|
||||||
|
<td class="weight">15</td>
|
||||||
|
<td><input type="number" class="rating-input" data-crit="2" data-weight="15" min="0" max="5" value="4"></td>
|
||||||
|
<td class="score" id="sc2">12.0</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="nr">3</td>
|
||||||
|
<td>Tehniskā gatavība un resursu nodrošinājums</td>
|
||||||
|
<td class="weight">30</td>
|
||||||
|
<td><input type="number" class="rating-input" data-crit="3" data-weight="30" min="0" max="5" value="5"></td>
|
||||||
|
<td class="score" id="sc3">30.0</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="nr">4</td>
|
||||||
|
<td>Augsta riska MI sistēmas kvalifikācija</td>
|
||||||
|
<td class="weight">10</td>
|
||||||
|
<td><input type="number" class="rating-input" data-crit="4" data-weight="10" min="0" max="5" value="4"></td>
|
||||||
|
<td class="score" id="sc4">8.0</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="nr">5</td>
|
||||||
|
<td>Regulatīvās vides pamatojums</td>
|
||||||
|
<td class="weight">25</td>
|
||||||
|
<td><input type="number" class="rating-input" data-crit="5" data-weight="25" min="0" max="5" value="5"></td>
|
||||||
|
<td class="score" id="sc5">25.0</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="total-bar">
|
||||||
|
<div>
|
||||||
|
<div class="total-label">Kopējais rezultāts</div>
|
||||||
|
<div class="tiebreak" id="tiebreak">
|
||||||
|
<span class="tiebreak-chip">Kr.3: <span class="val" id="tb3">30.0</span></span>
|
||||||
|
<span class="tiebreak-chip">Kr.5: <span class="val" id="tb5">25.0</span></span>
|
||||||
|
<span class="tiebreak-chip">Kr.1: <span class="val" id="tb1">16.0</span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="total-score high" id="total-score">91.0</div>
|
||||||
|
</div>
|
||||||
|
<div class="progress-track">
|
||||||
|
<div class="progress-fill" id="progress-fill" style="width:91%; background:var(--green);"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ===== PANEL: AI AGENT ===== -->
|
||||||
|
<div class="panel" id="panel-ai-agent">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">AI aģenta iepriekšējais novērtējums (demo)</div>
|
||||||
|
<p style="font-size:13px; color:var(--text2); margin-bottom:12px;">
|
||||||
|
AI aģents analizē iesnieguma datus un sniedz strukturētu ieteikumu komisijai.
|
||||||
|
Šis ir <strong>asistēts režīms</strong> — galīgais lēmums vienmēr ir komisijas.
|
||||||
|
</p>
|
||||||
|
<div class="actions" style="margin-bottom:12px;">
|
||||||
|
<button class="btn btn-primary" id="btn-run-ai">▶ Palaist AI novērtējumu</button>
|
||||||
|
<button class="btn btn-ghost" id="btn-clear-ai">Notīrīt</button>
|
||||||
|
</div>
|
||||||
|
<div class="ai-output" id="ai-output">Nospied "Palaist AI novērtējumu", lai redzētu rezultātu...</div>
|
||||||
|
<div class="ai-disclaimer">
|
||||||
|
⚠ Šis ir AI aģenta ieteikums. Galīgais lēmums ir komisijas kompetencē (Nolikuma 20.p.).
|
||||||
|
AI nedrīkst mainīt komisijas piešķirtos vērtējumus (guardrails: NO_SCORE_OVERRIDE).
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ===== PANEL: GUARDRAILS ===== -->
|
||||||
|
<div class="panel" id="panel-guardrails">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">AI novērtēšanas ierobežojumi (guardrails/ai-evaluation-rules.yaml)</div>
|
||||||
|
<div class="rule-card">
|
||||||
|
<div class="rule-id">HUMAN_FINAL_DECISION</div>
|
||||||
|
<div class="rule-text">AI aģenta izvade ir tikai ieteikums. Galīgais lēmums vienmēr ir komisijas.</div>
|
||||||
|
<div class="rule-enforcement">enforcement: HARD — Nolikuma 20.p.</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-card">
|
||||||
|
<div class="rule-id">TRANSPARENCY</div>
|
||||||
|
<div class="rule-text">Katrs AI izvades elements ietver pamatojumu un atsauci uz nolikuma punktu.</div>
|
||||||
|
<div class="rule-enforcement">enforcement: HARD</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-card">
|
||||||
|
<div class="rule-id">NO_SCORE_OVERRIDE</div>
|
||||||
|
<div class="rule-text">AI nedrīkst mainīt komisijas piešķirtos 0–5 vērtējumus. AI var tikai ieteikt.</div>
|
||||||
|
<div class="rule-enforcement">enforcement: HARD</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-card">
|
||||||
|
<div class="rule-id">AUDIT_TRAIL</div>
|
||||||
|
<div class="rule-text">Katra AI aģenta darbība tiek reģistrēta audita žurnālā ar laika zīmogu.</div>
|
||||||
|
<div class="rule-enforcement">enforcement: HARD</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">EU AI Act atbilstība</div>
|
||||||
|
<div class="rule-card" style="border-left-color: var(--blue);">
|
||||||
|
<div class="rule-id">Regulas 3.p.1.pk. — MI sistēmas definīcija</div>
|
||||||
|
<div class="rule-text">AI aģents secina no iesnieguma datiem, kā ģenerēt novērtējuma ieteikumus.</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-card" style="border-left-color: var(--blue);">
|
||||||
|
<div class="rule-id">Regulas 14.p. — Cilvēka uzraudzība</div>
|
||||||
|
<div class="rule-text">Komisija pārbauda katru AI ieteikumu pirms lēmuma pieņemšanas.</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-card" style="border-left-color: var(--blue);">
|
||||||
|
<div class="rule-id">Regulas 13.p. — Pārredzamība</div>
|
||||||
|
<div class="rule-text">Pamatojums un atsauces pieejamas katrā AI izvades elementā.</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-card" style="border-left-color: var(--blue);">
|
||||||
|
<div class="rule-id">Regulas 10.p. — Datu pārvaldība</div>
|
||||||
|
<div class="rule-text">Tikai iesnieguma dati — nav ārējie avoti.</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">Aizliegtās darbības</div>
|
||||||
|
<ul style="font-size:13px; color:var(--text); padding-left:20px; list-style: none;">
|
||||||
|
<li style="margin-bottom:6px;">🚫 Piešķirt galīgo punktu skaitu</li>
|
||||||
|
<li style="margin-bottom:6px;">🚫 Mainīt komisijas vērtējumus</li>
|
||||||
|
<li style="margin-bottom:6px;">🚫 Pieņemt lēmumu par apstiprināšanu/noraidīšanu</li>
|
||||||
|
<li style="margin-bottom:6px;">🚫 Salīdzināt konkrētus iesniedzējus savā starpā</li>
|
||||||
|
<li style="margin-bottom:6px;">🚫 Izmantot ārējos datus ārpus iesnieguma</li>
|
||||||
|
<li>🚫 Sazināties tieši ar iesniedzēju</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ===== PANEL: AUDIT ===== -->
|
||||||
|
<div class="panel" id="panel-audit">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">Audita notikumu žurnāls (demo)</div>
|
||||||
|
<div id="audit-log"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// ===== Tab switching =====
|
||||||
|
document.querySelectorAll('.tab').forEach(tab => {
|
||||||
|
tab.addEventListener('click', () => {
|
||||||
|
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
|
||||||
|
document.querySelectorAll('.panel').forEach(p => p.classList.remove('active'));
|
||||||
|
tab.classList.add('active');
|
||||||
|
document.getElementById('panel-' + tab.dataset.panel).classList.add('active');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// ===== TRL Mapping (mirrors DMN 03) =====
|
||||||
|
const TRL_MAP = {
|
||||||
|
1:{s:0,l:"Pamatprincipu novērojumi"},2:{s:0,l:"Formulēta koncepcija"},
|
||||||
|
3:{s:2,l:"Koncepcijas eksperimentālā pārbaude"},4:{s:2,l:"Validācija laboratorijā"},
|
||||||
|
5:{s:3,l:"Validācija mākslīgi radītā vidē"},6:{s:4,l:"Demonstrācija mākslīgi radītā vidē"},
|
||||||
|
7:{s:4,l:"Prototipa demonstrācija reālā vidē"},8:{s:5,l:"Sistēma pabeigta un pārbaudīta"},
|
||||||
|
9:{s:5,l:"Sekmīga ekspluatācija"}
|
||||||
|
};
|
||||||
|
|
||||||
|
function updateTRL() {
|
||||||
|
const lvl = parseInt(document.getElementById('trl_level').value) || 1;
|
||||||
|
const map = TRL_MAP[Math.min(9, Math.max(1, lvl))] || TRL_MAP[1];
|
||||||
|
document.getElementById('trl_score').textContent = map.s;
|
||||||
|
document.getElementById('trl_label').textContent = '— ' + map.l;
|
||||||
|
}
|
||||||
|
document.getElementById('trl_level').addEventListener('input', updateTRL);
|
||||||
|
updateTRL();
|
||||||
|
|
||||||
|
// ===== Eligibility (mirrors DMN 01) =====
|
||||||
|
function checkEligibility() {
|
||||||
|
const legal = document.getElementById('ck_legal').checked;
|
||||||
|
const jur = document.getElementById('sel_jurisdiction').value;
|
||||||
|
const time = document.getElementById('ck_time').checked;
|
||||||
|
const lat = document.getElementById('ck_latvian').checked;
|
||||||
|
const esign = document.getElementById('ck_esign').checked;
|
||||||
|
const notForbidden = document.getElementById('ck_notforbidden').checked;
|
||||||
|
const noExcl = document.getElementById('ck_noexclusion').checked;
|
||||||
|
|
||||||
|
const el = document.getElementById('elig-result');
|
||||||
|
const re = document.getElementById('elig-reason');
|
||||||
|
|
||||||
|
if (!legal) { el.className='status reject'; el.textContent='✗ REJECT'; re.textContent='Iesniedzējs nav juridiska persona (6.1.p.)'; return; }
|
||||||
|
if (jur === 'OTHER') { el.className='status reject'; el.textContent='✗ REJECT'; re.textContent='Jurisdikcija nav LV/ES/EEZ/CH (6.1.p.)'; return; }
|
||||||
|
if (!time) { el.className='status reject'; el.textContent='✗ REJECT'; re.textContent='Iesniegums nav saņemts termiņā (7., 8.p.)'; return; }
|
||||||
|
if (!notForbidden) { el.className='status reject'; el.textContent='✗ REJECT'; re.textContent='MI sistēma ir aizliegtā prakse (6.2.p.)'; return; }
|
||||||
|
if (!noExcl) { el.className='status reject'; el.textContent='✗ REJECT'; re.textContent='Izslēdzošie nosacījumi (6.3.p.)'; return; }
|
||||||
|
if (!lat) { el.className='status fix'; el.textContent='⚠ FIX_OR_REJECT'; re.textContent='Dokumenti nav latviešu valodā (10., 12.p.)'; return; }
|
||||||
|
if (!esign) { el.className='status fix'; el.textContent='⚠ FIX_OR_REJECT'; re.textContent='Trūkst e-paraksta/laika zīmoga (7., 12.p.)'; return; }
|
||||||
|
el.className='status eligible'; el.textContent='✓ ELIGIBLE'; re.textContent='Atbilst visām prasībām — virzīt uz vērtēšanu (13.p.)';
|
||||||
|
}
|
||||||
|
document.querySelectorAll('#panel-eligibility .toggle, #panel-eligibility select').forEach(el => el.addEventListener('change', checkEligibility));
|
||||||
|
checkEligibility();
|
||||||
|
|
||||||
|
// ===== Scoring (mirrors DMN 02) =====
|
||||||
|
function recalcScores() {
|
||||||
|
let total = 0;
|
||||||
|
const scores = {};
|
||||||
|
document.querySelectorAll('.rating-input').forEach(inp => {
|
||||||
|
const crit = inp.dataset.crit;
|
||||||
|
const weight = parseInt(inp.dataset.weight);
|
||||||
|
let rating = parseFloat(inp.value);
|
||||||
|
if (isNaN(rating) || rating < 0 || rating > 5) { inp.classList.add('invalid'); rating = 0; } else { inp.classList.remove('invalid'); }
|
||||||
|
const score = weight * (rating / 5);
|
||||||
|
scores[crit] = score;
|
||||||
|
document.getElementById('sc' + crit).textContent = score.toFixed(1);
|
||||||
|
total += score;
|
||||||
|
});
|
||||||
|
|
||||||
|
const totalEl = document.getElementById('total-score');
|
||||||
|
totalEl.textContent = total.toFixed(1);
|
||||||
|
totalEl.className = 'total-score ' + (total >= 70 ? 'high' : total >= 40 ? 'mid' : 'low');
|
||||||
|
|
||||||
|
const fill = document.getElementById('progress-fill');
|
||||||
|
fill.style.width = total + '%';
|
||||||
|
fill.style.background = total >= 70 ? 'var(--green)' : total >= 40 ? 'var(--amber)' : 'var(--red)';
|
||||||
|
|
||||||
|
document.getElementById('tb3').textContent = (scores['3'] || 0).toFixed(1);
|
||||||
|
document.getElementById('tb5').textContent = (scores['5'] || 0).toFixed(1);
|
||||||
|
document.getElementById('tb1').textContent = (scores['1'] || 0).toFixed(1);
|
||||||
|
}
|
||||||
|
document.querySelectorAll('.rating-input').forEach(inp => inp.addEventListener('input', recalcScores));
|
||||||
|
recalcScores();
|
||||||
|
|
||||||
|
// ===== AI Agent demo =====
|
||||||
|
document.getElementById('btn-run-ai').addEventListener('click', () => {
|
||||||
|
const out = document.getElementById('ai-output');
|
||||||
|
const ratings = {};
|
||||||
|
document.querySelectorAll('.rating-input').forEach(inp => {
|
||||||
|
ratings[inp.dataset.crit] = parseFloat(inp.value) || 0;
|
||||||
|
});
|
||||||
|
const trl = parseInt(document.getElementById('trl_level').value) || 1;
|
||||||
|
const trlMap = TRL_MAP[Math.min(9, Math.max(1, trl))];
|
||||||
|
|
||||||
|
const reasoning = [];
|
||||||
|
if (ratings['3'] >= 4) reasoning.push({criterion:"Tehniskā gatavība", observation:"TRL"+trl+" → vērtējums "+trlMap.s+"/5. "+trlMap.l+". Atbilst enkuram "+(trlMap.s>=4?"4/5":"3/5")+".", nolikumaRef:"1.piel. Kr.3; 2.piel."});
|
||||||
|
if (ratings['5'] >= 4) reasoning.push({criterion:"Regulatīvās vides pamatojums", observation:"Augsts vērtējums ("+ratings['5']+"/5) norāda uz skaidru nepieciešamību pēc strukturētas testēšanas.", nolikumaRef:"1.piel. Kr.5"});
|
||||||
|
if (ratings['1'] >= 4) reasoning.push({criterion:"Inovitāte", observation:"Vērtējums "+ratings['1']+"/5 norāda uz inovatīvu risinājumu ar tirgus nepilnību novēršanu.", nolikumaRef:"1.piel. Kr.1"});
|
||||||
|
if (ratings['4'] >= 3) reasoning.push({criterion:"Augsta riska MI", observation:"Kvalificējas kā augsta riska MI sistēma — regulatīvā vide sniedz pievienoto vērtību.", nolikumaRef:"1.piel. Kr.4"});
|
||||||
|
|
||||||
|
const total = Object.entries(ratings).reduce((s,[c,r]) => s + [20,15,30,10,25][c-1]*(r/5), 0);
|
||||||
|
const confidence = Math.min(0.95, Math.max(0.1, total / 110));
|
||||||
|
const rec = total >= 70 ? "RECOMMEND_APPROVE" : total >= 40 ? "RECOMMEND_REVIEW" : "RECOMMEND_REJECT";
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
recommendation: rec,
|
||||||
|
confidence: parseFloat(confidence.toFixed(2)),
|
||||||
|
reasoning: reasoning,
|
||||||
|
flags: total < 60 ? ["Kopējais rezultāts zem 60 — ieteicams papildu pārskatīšana"] : [],
|
||||||
|
disclaimers: ["Šis ir AI aģenta ieteikums. Galīgais lēmums ir komisijas kompetencē."]
|
||||||
|
};
|
||||||
|
|
||||||
|
out.textContent = JSON.stringify(result, null, 2);
|
||||||
|
addAuditEvent('ai-pre-assessment-run', true);
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('btn-clear-ai').addEventListener('click', () => {
|
||||||
|
document.getElementById('ai-output').textContent = 'Nospied "Palaist AI novērtējumu", lai redzētu rezultātu...';
|
||||||
|
});
|
||||||
|
|
||||||
|
// ===== Audit log =====
|
||||||
|
const auditEvents = [
|
||||||
|
{event:'application-received', ts:'2026-03-15T10:00:00Z', ai:false},
|
||||||
|
{event:'eligibility-evaluated', ts:'2026-03-15T10:01:00Z', ai:false},
|
||||||
|
{event:'sent-to-authorities', ts:'2026-03-18T09:00:00Z', ai:false},
|
||||||
|
{event:'opinions-received', ts:'2026-04-10T15:30:00Z', ai:false},
|
||||||
|
{event:'commission-scores-entered', ts:'2026-04-12T14:00:00Z', ai:false},
|
||||||
|
{event:'scores-calculated', ts:'2026-04-12T14:01:00Z', ai:false},
|
||||||
|
{event:'decision-prepared', ts:'2026-04-14T10:00:00Z', ai:false},
|
||||||
|
{event:'decision-issued', ts:'2026-04-14T11:00:00Z', ai:false}
|
||||||
|
];
|
||||||
|
|
||||||
|
function addAuditEvent(name, ai) {
|
||||||
|
auditEvents.splice(auditEvents.length - 3, 0, {event: name, ts: new Date().toISOString(), ai: !!ai});
|
||||||
|
renderAudit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderAudit() {
|
||||||
|
const el = document.getElementById('audit-log');
|
||||||
|
el.innerHTML = auditEvents.map(e =>
|
||||||
|
'<div class="audit-event">' +
|
||||||
|
'<div class="audit-dot' + (e.ai ? ' ai' : '') + '"></div>' +
|
||||||
|
'<span class="audit-ts">' + e.ts.replace('T',' ').substring(0,19) + '</span>' +
|
||||||
|
'<span class="audit-name">' + e.event + (e.ai ? ' 🤖' : '') + '</span>' +
|
||||||
|
'</div>'
|
||||||
|
).join('');
|
||||||
|
}
|
||||||
|
renderAudit();
|
||||||
|
|
||||||
|
// ===== PGV Protocol (ProcessGit Viewer integration) =====
|
||||||
|
window.addEventListener('message', function(e) {
|
||||||
|
if (e.data && e.data.type === 'PGV_INIT') {
|
||||||
|
console.log('PGV_INIT received:', e.data.payload);
|
||||||
|
}
|
||||||
|
if (e.data && e.data.type === 'PGV_SAVE_CLICKED') {
|
||||||
|
const data = collectFormData();
|
||||||
|
window.parent.postMessage({type:'PGV_REQUEST_SAVE', path:'examples/candidate-input.example.json', content: JSON.stringify(data, null, 2), summary:'Updated evaluation data'}, '*');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.parent.postMessage({type:'PGV_READY'}, '*');
|
||||||
|
|
||||||
|
function collectFormData() {
|
||||||
|
const ratings = {};
|
||||||
|
document.querySelectorAll('.rating-input').forEach(inp => { ratings['c'+inp.dataset.crit] = parseFloat(inp.value) || 0; });
|
||||||
|
return {
|
||||||
|
applicationId: "DEMO-001",
|
||||||
|
applicant: {isLegalEntity: document.getElementById('ck_legal').checked, jurisdiction: document.getElementById('sel_jurisdiction').value},
|
||||||
|
submission: {submittedInTime: document.getElementById('ck_time').checked, documentsInLatvian: document.getElementById('ck_latvian').checked, hasQualifiedESignatureAndTimestamp: document.getElementById('ck_esign').checked},
|
||||||
|
aiSystem: {isForbiddenAIPractice: !document.getElementById('ck_notforbidden').checked, trlLevel: parseInt(document.getElementById('trl_level').value) || 7},
|
||||||
|
commissionRatings: {innovationRating: ratings.c1, transformationRating: ratings.c2, readinessRating: ratings.c3, highRiskRating: ratings.c4, regulatoryNeedRating: ratings.c5}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"viewers": [
|
||||||
|
{
|
||||||
|
"id": "komisija-vertesana",
|
||||||
|
"primary_pattern": "candidate-input.example.json",
|
||||||
|
"type": "html",
|
||||||
|
"entry": "komisija-vertesana.html",
|
||||||
|
"edit_allow": [
|
||||||
|
"candidate-input.example.json"
|
||||||
|
],
|
||||||
|
"targets": {
|
||||||
|
"dmn_eligibility": "../dmn/01-atbilstiba-un-izsledzosie.dmn.xml",
|
||||||
|
"dmn_scoring": "../dmn/02-vertesanas-punkti.dmn.xml",
|
||||||
|
"dmn_trl": "../dmn/03-trl-vertejums.dmn.xml",
|
||||||
|
"mappings": "../resources/mappings.yaml",
|
||||||
|
"guardrails": "../guardrails/ai-evaluation-rules.yaml",
|
||||||
|
"expected_output": "expected-output.example.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user