๐ The Problem
AI code generators produce outputs at machine speed โ but they can't explain why they made a decision.
For regulated industries (medical devices, aerospace, critical infrastructure), that's disqualifying.
NIST SA-11 and the EU Cyber Resilience Act both require human-in-the-loop
oversight for automated outputs.
Speckl is judgement transport: it bridges the gap between "the AI says X is correct" and
"here is a verifiable chain of evidence proving X is correct." It's the compliance layer for AI-generated code.
โ๏ธ The Pipeline
๐
SpeckDL
Human-authored spec with constraints
โ
๐
Z3 Verify
SMT solver checks invariants
โ
โก
Codegen
TypeScript / Rust from verified spec
โ
๐
Provenance
Immutable trace from spec to code
๐ข Live Demo: RetryHandler
Here's a real Speck for an exponential-backoff retry handler, running through the reference agent.
Step 1 โ SpeckDL Specification
speck RetryHandler {
input: { operation: Operation, maxRetries: Nat, initialDelay: Real }
output: { success: Bool, attemptCount: Nat, totalDelay: Real }
constraint: maxRetries <= 10
constraint: initialDelay > 0
constraint: totalDelay == sum(delays)
constraint: totalDelay <= 30s
constraint: backoff(delay(n)) == delay(n-1) * 2
verify: always(implies(attempt > 1, delay > 0))
verify: always(implies(attemptCount == maxRetries + 1, not success))
derives from FaultHandler
satisfies RESILIENCE-REQ-01
author: Scott Scoble
review: manual
}
Step 2 โ Agent Output (Run Live)
๐งฌ Processing Speck: RetryHandler
Constraints: 8
Verify conditions: 2
โ Task task-1: success โ
โ Z3 result: sat โ
โ All constraints verified โ
โ Task task-2: success โ
โ Generated typescript code (27 lines) โ
โ Interface + constraint guards emitted โ
โ
Result: success | Duration: 1ms
Step 3 โ Generated TypeScript
export interface RetryHandlerInput {
operation: Operation;
maxRetries: number;
initialDelay: number;
maxDelay: number;
}
export type RetryHandlerOutput = {
success: boolean;
finalResult: string;
attemptCount: number;
totalDelay: number;
};
export function retryhandler(input: RetryHandlerInput): RetryHandlerOutput {
throw new Error("RetryHandler: implementation pending DST compilation");
}
Step 4 โ Provenance Graph (Dark Provenance)
speck:RetryHandler โ z3:task-1 verified_by Z3 4.12.5
speck:RetryHandler โ code:task-2 generated_from speckl-codegen
Every derivation is recorded. Every artifact is traceable. This is your compliance audit trail.
๐ค Agent Architecture
โ Orchestrator โ
โ Accepts Specks, decomposes tasks โ
โ โ
โ Team Lead โ โ Team Lead โ
โ Verification โ โ Codegen โ
โ โ
โ Z3 SME โ โ TypeScript SME โ
โ (verify) โ โ (emit) โ
๐ Compliance Mapping
NIST SA-11: Developer Testing and Evaluation โ requires human review of automated outputs
EU Cyber Resilience Act: Reporting obligations from Sept 11, 2026 โ requires SBOM + compliance evidence
FDA Software as Medical Device (SaMD): IEC 62304 โ requires traceability from requirements to code
Speckl maps directly to these requirements:
| Requirement | Speckl Feature |
| Human-in-the-loop review | manual review flag + sign-off provenance |
| SBOM generation | BOM block โ CycloneDX / SPDX export |
| Traceability | Dark Provenance graph โ every derivation recorded |
| Constraint verification | Z3 SMT solver โ mathematical proof of correctness |
๐ Current Status
3
Compilation Targets (PROV-O, CycloneDX, SPDX)