Repository navigation
compliance_audit
iso_doc_type: "Policy" iso_viewpoint: "SecurityView" type: "security" title: "Compliance & Audit β Dark Gravity CA/CD Autonomous Factory" description: "ISO 42010 SecurityView / ISO 15289 Policy documentation for Compliance & Audit β Dark Gravity CA/CD Autonomous Factory." tags: ['iso42010', 'okf', 'security_view', 'zero_trust', 'governance'] timestamp: "2026-10-01T14:00:00Z" generated: "agent:okf-professional-documenter" verified: "true" last_verified_commit: "fbdc5848"
Purpose: R&D grant compliance framework documentation covering Hazitek 2026, EU AI Act, and automated telemetry audit trail packaging.
| Regulation | Scope | Factory Compliance |
|---|---|---|
| Hazitek 2026 (SPRI) | Basque Country R&D innovation grant | AST code deltas, compute hours, innovation output metrics |
| EU AI Act Art. 12 | Transparency: logging of AI system operations | Mission event logging, agent action audit trail |
| EU AI Act Art. 14 | Human oversight of high-risk AI systems | 4-Vertex HITL governance mesh, merge prohibition |
The factory automatically generates compliance evidence packets for each autonomous mission:
flowchart TD
MISSION["Autonomous Mission"] --> AST["AST Code Deltas"]
MISSION --> COMPUTE["Compute Core-Hours"]
MISSION --> FINOPS["FinOps Token Logs"]
MISSION --> NHI_CRED["Ed25519 NHI Claims"]
AST --> PACKET["CompliancePacket"]
COMPUTE --> PACKET
FINOPS --> PACKET
NHI_CRED --> PACKET
PACKET --> KAFKA["Kafka: compliance-audit topic"]
PACKET --> S3["S3: Audit Archive"]
PACKET --> EXPORT["Telemetry Export"]
style PACKET fill:#4CAF50,stroke:#2E7D32,color:#fff
// From data-model.md Entity 4
pub struct CompliancePacket {
pub mission_id: String,
pub grant_program: String, // "Hazitek 2026", "SPRI", "EU AI Act Art. 12 & 14"
pub ast_deltas: ASTDeltaSummary, // Lines added, modified, removed
pub compute_hours: ComputeMetrics, // CPU core-hours, RAM, sandbox duration
pub finops_spend: FinOpsRecord, // Token counts, USD equivalent
pub nhi_credential: Ed25519Claim, // Signed verifiable credential
}Every code change is tracked at the AST level:
| Metric | Source | Purpose |
|---|---|---|
| Lines Added | git diff --stat |
Quantify R&D output |
| Lines Modified | git diff --stat |
Track iteration effort |
| Lines Removed | git diff --stat |
Measure refactoring activity |
| Symbols Modified | Tree-sitter AST parse | Track function/struct/trait changes |
| Error Fingerprint | ErrorClassification.error_fingerprint |
Deduplicate remediation attempts |
Sandbox compute usage is tracked for grant reporting:
| Metric | Source | Grant Relevance |
|---|---|---|
| CPU Core-Hours | SandboxConstraint.max_cpu_cores Γ duration |
R&D investment evidence |
| RAM Allocation | SandboxConstraint.max_memory_mb |
Infrastructure cost justification |
| Sandbox Duration | Pod lifecycle timestamps | Compute time accounting |
| gVisor Overhead | Runtime class metrics | Security investment documentation |
LLM token usage is attributed via FinOpsTag virtual headers:
// From factory-core
pub struct FinOpsTag {
pub team: String, // "dark-gravity"
pub epic: String, // "HAZITEK-2026-001"
pub microservice: String, // "factory-mcp-server"
pub environment: String, // "production"
pub cost_center: String, // "r-and-d"
}
// Serialized as HTTP headers:
// x-vtags-team: dark-gravity
// x-vtags-epic: HAZITEK-2026-001
// x-vtags-microservice: factory-mcp-server
// x-vtags-environment: production
// x-vtags-cost-center: r-and-dBudget enforcement via DailyBudgetConfig:
- Max daily budget: $50 USD
- Hardstop threshold: 90% of daily budget
- Velocity alert: > $1.00/min spend rate
Every mission includes a cryptographically signed verifiable credential:
| Field | Description |
|---|---|
| Issuer | Factory NHI Issuer (Ed25519 public key) |
| Subject | Mission ID |
| Claim | Agent name, action type, timestamp |
| Signature | Ed25519 signature over claim payload |
| Encoding | Base64 URL-safe no-pad |
This provides non-repudiable evidence that a specific agent performed a specific action at a specific time β critical for EU AI Act Art. 12 transparency requirements.
Compliance packets are exported in JSON format to Kafka and S3:
{
"mission_id": "550e8400-e29b-41d4-a716-446655440000",
"grant_program": "Hazitek 2026",
"ast_deltas": {
"lines_added": 142,
"lines_modified": 28,
"lines_removed": 15,
"symbols_modified": ["PipelineScopeFilter", "evaluate_github"]
},
"compute_hours": {
"cpu_core_hours": 0.125,
"ram_mb_hours": 3.75,
"sandbox_duration_secs": 1800
},
"finops_spend": {
"prompt_tokens": 15420,
"completion_tokens": 8230,
"total_usd": 0.47
},
"nhi_credential": {
"issuer": "ed25519:pk_abc123...",
"signature": "base64url:sig_xyz789...",
"timestamp": "2026-09-30T12:00:00Z"
}
}Related: HITL Governance Β· Security Architecture Β· Business Context
- Business Context
- Strategic Design
- Tactical Design
- Agent Specifications
- Runtime Sequences
- Infrastructure Adapters
- Mission Data Model
- lib.md
- gitlab_verifier.md
- poller_service.md
- telemetry_export.md
- Agents
- Workflows
- Bridge
- Utils
- lib.md
- github.md
- gitlab.md
- jira.md
- kafka.md
- ziti.md
- vault.md
- r2r.md
- semantica.md
- aethalgard.md
- mcp_client.md
- pipeline_classifier.md
- s3.md
- sentry.md
- security_validator.md
- cursor_store.md
- git_poller.md
- lib.md
- main.md
- protocol.md
- sandbox.md
- scratch.md
- feedback_route.md
- github_webhook.md
- Skills
-
Tools
- mod.md
- bridge.md
- deep_research_tool.md
- execute_code.md
- get_factory_status.md
- index_code.md
- inspect_kafka_topic.md
- launch_sandbox_pod.md
- list_minio_buckets.md
- list_minio_objects.md
- plan_mission.md
- retrieve_context.md
- run_tests.md
- search_jira.md
- security_review.md
- spec_kit_tasks_to_issues.md
- spec_kit_tool.md
- update_mission_status.md