Spec-first multi-agent development system — an open standard for defining, verifying, and generating software from formal specifications, powered by Dark Provenance.
Find a file
tef-engine 8f78ceac28 fix(rust): replace now() TODO stub with real SystemTime::now() call
The Rust generator emitted '0u64 /* TODO: use std::time::SystemTime */'
for now() calls. Replace with the real expression:
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_secs()

Resolves the TODO in compiler/src/generators/rust.ts:544.
2026-07-19 01:26:26 -07:00
.forgejo/workflows Simplify deploy workflow: direct git clone instead of actions/checkout 2026-04-29 17:16:41 -07:00
compiler fix(rust): replace now() TODO stub with real SystemTime::now() call 2026-07-19 01:26:26 -07:00
demo Rewrite demo page for current product + add demo link to landing page 2026-05-08 17:09:31 -07:00
docs docs: SQLite research + blog post for Prove SQLite project 2026-05-10 00:49:15 -07:00
examples feat: add PromptOptimizer spec and functional runtime 2026-05-13 21:14:55 -07:00
landing Add SEO attribution: author meta tag, JSON-LD structured data, 'Created by Scott Scoble' branding 2026-05-23 18:14:32 -07:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 fix: test path resolution — use __dirname instead of process.cwd() (cycle 74) 2026-06-29 19:09:47 -07:00
out TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
out_fresh fix(z3): preserve implies args, multi-level field access, len(), nil, distinct operator 2026-06-29 17:31:31 -07:00
reference-agent Merge branch 'feature/z3-backend' (Z3 backend + KRaft spec) 2026-05-09 22:34:40 -07:00
scripts tools: add validate-all.sh — CI-style batch compiler validation 2026-05-08 11:12:25 -07:00
speckdl Merge v0.2-DP into SPEC.md — unified v0.2 spec 2026-04-29 15:05:26 -07:00
test-output fix: test path resolution — use __dirname instead of process.cwd() (cycle 74) 2026-06-29 19:09:47 -07:00
.gitignore refactor: remove WAT/WASM generator (superseded by IR→Rust→WASM path) 2026-05-09 22:03:20 -07:00
bench-rust.mjs TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
bench-rust.sh TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
fix-z3-again.py TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
LICENSE Initial commit: Speckl project scaffold 2026-04-28 01:20:22 -07:00
README.md Merge branch 'feature/z3-backend' (Z3 backend + KRaft spec) 2026-05-09 22:34:40 -07:00
typescript TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00

Speckl

A judgement transport utility for AI-generated specifications. Fulfills NIST SA-11 (human-in-the-loop for automated outputs).

Speckl is a specification language (SpeckDL) with a compiler that produces runnable software — TypeScript and provenance artifacts (PROV-O, CycloneDX, SPDX) — from a single source of truth. Write what your system should do. Prove it. Ship it.

The Core Insight

AI generates code at machine speed. Humans own specifications. SpeckDL is the shared space where both can work.

  • Human-judgeable — SpeckDL is declarative enough that a person can inspect a spec and say "yes, this captures my intent." The compiled output is opaque; the spec is not.
  • AI-writable — SpeckDL's constrained grammar and declarative semantics are tractable for LLMs to produce and reason about. Agents draft. Humans review. Both operate on the same semantic layer.
  • Compiled, not generated — The SpeckDL compiler is deterministic. No LLMs in the compilation path. Same spec, same output — always.

What Speckl Does Now

Speckl is a working compiler that turns formal specifications into multiple target representations:

.speckdl spec ──→ TypeScript             ← typed, importable classes
              ├── PROV-O (RDF)           ← W3C provenance standard
              ├── CycloneDX SBOM         ← OWASP software bill of materials
              └── SPDX SBOM              ← Linux Foundation SBOM standard

State Machine Compilation (inspired by TLA+)

spec ToggleSwitch {
  state: Status = Off
  enum Status = On | Off

  init: {
    Status = Off
  }

  action FlipSwitch {
    require: true
    if Status == On {
      Status = Off
    } else {
      Status = On
    }
  }
}

This compiles to a runnable TypeScript class with verified state transitions + guards.

Provenance Embedded at Compile Time

Every compilation embeds a complete provenance record — PROV-O RDF traces the spec → code derivation, CycloneDX and SPDX SBOMs capture the software supply chain. When an auditor asks "where did this behavior come from?", you query the graph, not Jira.

Real-World Examples

The compiler has been validated against:

Example Source Status
ToggleSwitch SpeckDL tutorial ✅ All artifacts
AccountLedger Banking ledger with debit/credit ✅ All artifacts
TwoPhaseCommit TLA+ port ✅ All artifacts
Paxos TLA+ port ✅ All artifacts
Raft TLA+ port ✅ All artifacts
TigerBeetleLedger Naive TigerBeetle core ✅ All artifacts (3 TS type errors in progress)

Getting Started

git clone https://os.scoble.me/forgejo/sscoble/speckl
cd speckl/compiler
npm install

# Compile an example
node dist/index.js ../examples/ToggleSwitch.speck -o out/switch
ls out/switch/
# ToggleSwitch.ts  ToggleSwitch.prov-o.jsonld
# ToggleSwitch.cyclonedx.json  ToggleSwitch.spdx.json

Key Documents

  • Whitepaper v2 — Complete: 8 sections, ~19,000 words. Covers the spec-code gap, SpeckDL language, compiler architecture, embedded provenance, consensus protocols, compliance applications, related work, and roadmap.
  • Speckl by Example — Guided tutorial from ToggleSwitch through Raft, with TLA+ comparison table.
  • Distribution Strategy — Prioritized roadmap: Show HN → arXiv → blog → consulting pipeline. Conference landscape for 2026-2027.
  • Strategy Ladder — Open standard → Consulting → Developer Tool/SaaS → Compliance API.
  • SpeckDL Spec — Language definition v0.2.
  • State Machine Extension — state/init/action keywords, Set/Map/List types.

Strategy Ladder

Phase Focus Status
A — Open Standard SpeckDL language, compiler, whitepaper, examples ✅ Complete (compiler working, whitepaper done)
B — Consulting Hands-on engagements with regulated-industry teams 📋 One-pager drafted, awaiting review
C — Developer Tool/SaaS Self-serve spec validation, provenance browser 🔮 Future
D — Compliance API Enterprise audit reports, traceability matrices 🔮 Future

Validation Status

  • Compiler: 41/41 tests passing (TypeScript codegen)
  • TypeScript: Type-safe compilation from specs
  • TLA+ Trilogy: TwoPhaseCommit, Paxos, Raft all compile
  • Compiler Self-Spec: speckl-compile.speckdl defines the Speckl compiler in SpeckDL — generates all artifacts (known TypeScript errors tracked in engineering#9)

Known Issues

The rewriteExpr function in the TypeScript generator applies spurious this.state. prefixes to function parameters in guard expressions. Tracked in marcus/engineering#9. Parser also drops precondition:/postcondition: blocks on some action bodies.

Contributing

Speckl is open source under the MIT license. Contributions welcome:

  • Language design — refine SpeckDL syntax and semantics
  • Compiler development — TypeScript/Node.js, help fix open issues
  • Formal methods — verify the compilation pipeline, add TLA+ examples
  • Compliance expertise — validate regulatory models (NIST, IEC 62304, DO-178C)
  • Documentation — tutorials, guides, case studies

Open an issue or submit a pull request.

License

MIT © Scott Scoble / Greybeard Holdings, LLC

Mirrors