1 Download Updated 2 weeks ago
ollama run mladen-gertner/slavkokernel-v8
Deterministic reporting. Governance-first summaries.
Every output is both human-readable and machine-readable in a single JSON payload.
S.L.A.V.K.O.™ treats every AI decision as a governance event. The Kernel translates that decision into a format that satisfies auditors, executives, and developers alike.
| Feature | Description |
|---|---|
| Dual-Output | Markdown for people, JSON for machines |
| Deterministic formatting | Identical indentation, ordering, and wording |
| Audit-chain extension | Adds its own audit ID to the global chain |
| Governance summaries | Maps each rule to compliance outcome |
| Plug-in extensible | Add new presentation styles without touching core code |
git clone https://github.com/FormatDisc/slavko-kernel cd slavko-kernel pip install -e .
### Dependencies
python>=3.11
jinja2>=3.1.0
pydantic>=2.0.0
markdown>=3.5.0
## 🚀 Quick Start
python
from slavko_kernel import Kernel
import json
kernel = Kernel()
payload = {
"summary": "Content review completed successfully",
"details": {
"risk_score": 45,
"compliance_pass": True,
"rule_breakdown": {
"KeywordRiskRule": 45,
"ContrastUXRule": 0,
"PolicyRule": 0
}
},
"verdict": "PASS",
"confidence": 0.92
}
report_md, report_json = kernel.render(payload)
print(report_md)
print(json.dumps(report_json, indent=2))
## 📚 Usage Examples
### Compliance Audit
python
from slavko_kernel import Kernel
kernel = Kernel()
compliance_output = {
"summary": "Document complies with all regulatory requirements",
"details": {
"risk_score": 15,
"compliance_pass": True,
"rule_breakdown": {
"GDPR_Compliance": 10,
"HIPAA_Compliance": 5
}
},
"verdict": "PASS",
"confidence": 0.95
}
report_md, report_json = kernel.render(compliance_output)
print(report_md)
### UX Review
```python
ux_output = {
"summary": "UI meets accessibility standards with minor improvements needed",
"details": {
"risk_score": 25,
"compliance_pass": True,
"rule_breakdown": {
"ContrastUXRule": 25,
"WCAG_Compliance": 0
}
},
"verdict": "PASS",
"confidence": 0.88
}
report_md, report_json = kernel.render(ux_output)
print(report_md)
## Governance Summary
### Verdict
<PASS|FAIL|WARN>
### Risk Assessment
- **Overall Risk Score**: X/100
- **Risk Level**: <Low|Medium|High|Critical>
### Rules Applied
- **RuleName1** → `score: X`
- **RuleName2** → `score: Y`
### Compliance Status
<Compliant|Non-Compliant|Partial>
### Action Items
- **If PASS**: No action required
- **If FAIL**: Remediate according to the `recommendations` field
- **If WARN**: Review and address within SLA
### Audit Trail
- **Audit ID**: `audit-kernel-XXXXXXXX`
- **Timestamp**: ISO-8601
- **Chain**: [audit-shell-XXX, audit-fusion-XXX, audit-score-XXX, audit-kernel-XXX]
Kernel__init__(self, template_dir: str = None)Initialize the Kernel with optional custom templates.
kernel = Kernel(template_dir="custom_templates/")
render(self, payload: dict) -> Tuple[str, dict]Render the input payload into Markdown and JSON outputs.
report_md, report_json = kernel.render(payload)
set_template(self, name: str, content: str)kernel.set_template("governance", """
## Custom Report
{{ payload.summary }}
""")
from slavko_kernel import Kernel
executive_template = """
# Executive Summary
{{ payload.summary }}
## Risk Score: {{ payload.details.risk_score }}/100
{% if payload.verdict == "PASS" %}
✅ Approved
{% elif payload.verdict == "FAIL" %}
❌ Rejected
{% else %}
⚠️ Review Required
{% endif %}
"""
kernel = Kernel()
kernel.set_template("executive", executive_template)
report_md, report_json = kernel.render(payload, template="executive")
{
"slavko_version": "1.0",
"component": "Kernel",
"timestamp": "2025-01-15T10:30:00Z",
"audit_id": "audit-kernel-8f3e2a1b7c9d",
"audit_stage": "kernel",
"audit_chain": [
"audit-shell-abc123",
"audit-fusion-def456",
"audit-score-ghi789",
"audit-kernel-8f3e2a1b7c9d"
],
"input": { ... },
"output": { ... },
"meta": {
"deterministic": true,
"pipeline_stage": "kernel",
"runtime_ms": 1.5
}
}
| Metric | Value |
|---|---|
| Latency | < 2 ms |
| Memory | < 5 MB |
| Throughput | > 10,000 ops/sec |
| CPU Usage | Negligible |
pytest tests/test_kernel.py -v
pytest tests/integration/test_kernel_integration.py -v
pytest tests/performance/test_kernel_performance.py -v
Company: Formatdisc – Computer Programming & Advanced Software Systems
Founder & System Architect: Mladen Gertner
Website: https://formatdisc.hr
Email: mladen@formatdisc.hr
Phone: +385 91 542 1014
Location: Zagreb, Croatia
OIB: 18915075854
GitHub: https://github.com/FormatDisc
LinkedIn: https://linkedin.com/company/formatdisc
Built with S.L.A.V.K.O.™ – Deterministic AI. Sovereign Control.