◇ § ◇

SIGIL

AI-first game engine language
one source · two targets · zero ceremony
A programming language designed for how AI thinks, grounded in how hardware works, built for what game engines need.
scroll

What is SIGIL

SIGIL v2 is a hardware-grounded programming language that compiles a single source file to both native x86-64 (AVX2+FMA3) and SPIR-V (Vulkan compute shaders). It is designed from the ground up for AI-assisted development, with syntax that minimizes token count while maximizing type safety through zero-cost dimensional analysis and coordinate space tracking.

Where existing languages were designed for human fingers on keyboards, SIGIL is designed for AI agents generating code at scale. Every syntax decision is justified by measured token efficiency, empirical AI code-generation error patterns, and direct hardware mapping.

SIGIL treats game engine primitives — signed distance functions, quaternions, color spaces, noise fields — as compiler-aware built-in types, not library wrappers. The compiler knows what an SDF is, tracks its Lipschitz constant, and can generate analytic gradients automatically.

The Language

44% fewer tokens than Odin. 40% fewer than WGSL. Full static type safety with dimensional analysis.

unit m          // meters
unit s          // seconds
unit rad        // radians

fn room_sdf(pos: vec3<m>) -> f32<m> {
  let box = sd_box(pos - vec3(0, 4, 0), vec3(19.8, 4.0, 19.8))
  let wall = sd_slab_x(pos, 0.0, 0.3)
  let door = sd_box(pos - vec3(0, 2.5, 10), vec3(2.0, 2.5, 0.5))
  max(box, min(wall, -door))
}

@k(8, 8, 1)
fn observe(gid: uvec3) {
  let ray = camera_ray(gid.x, gid.y, cam)
  let hit = march(ray, room_sdf, 96)
  let n = grad(room_sdf, hit.pos)   // analytic gradient — no finite differences
  let color = shade(hit, n, light)
  store(out, gid.xy, color)
}

Dimensional Safety

let dist: f32<m> = 10.0
let time: f32<s> = 2.0
let speed = dist / time       // inferred: f32<m/s>

// let bad = dist + time       // COMPILE ERROR: m + s
// let bad = sin(45.0<deg>)   // COMPILE ERROR: sin expects rad
let ok = sin(deg_to_rad(45.0<deg>))  // correct

space world
space view
let player: vec3<m, world> = vec3(10, 0, 5)
let cam_local: vec3<m, view> = view_mat * player  // transforms world→view
// let bad = player + cam_local  // COMPILE ERROR: world + view

Design Principles

AI-First Authorship

No semicolons. Suffix types. Implicit returns. Aggressive type inference. Every syntax choice optimized for LLM token efficiency and code generation accuracy. Claude Code is the lead programmer.

Hardware-Grounded

vec4 maps to XMM registers. @soa rewrites memory layout for cache efficiency. The compiler knows about cache lines (64B), denormal penalties, and SIMD lane width. Syntax reflects hardware cost.

SDF as Primitive

Signed distance functions are a compiler-aware type with algebra operators (union, intersect, subtract, smooth blend). The compiler tracks Lipschitz constants and generates analytic gradients.

Dual-Target Compilation

One .si2 source file compiles to native x86-64 (via C/LLVM) and SPIR-V 1.3+ (for Vulkan compute). @cpu, @gpu, @both annotations control which target receives each function.

Zero-Cost Dimensions

F#-style units of measure: meters, seconds, radians tracked at compile time, erased before emission. Coordinate space tags (world, view, clip) prevent the most dangerous class of graphics bugs.

No Borrow Checker. No GC.

Arena allocation per game-loop phase. Frame arena resets every frame. Scene arena resets on level load. Explicit, predictable, zero overhead. Reference counting is opt-in for shared resources only.

Compilation Pipeline

.si2 source parse type check + inference dimensional verify IR (SSA)
↙ ↘
C → clang → x86-64 SPIR-V → spirv-opt → .spv

Phase 1: emit C compiled by clang. Phase 2: LLVM IR for optimized release builds. Phase 3: optional Cranelift for fast dev builds. SPIR-V binary emission for Vulkan compute from day one.

CSSL — CavemanSSL

SIGIL grew out of CSSL (Caveman Spec/Signal Language), a notation system for AI cognition that achieves 3.5× compression over natural language. CSSL strips articles, prepositions, hedging, and filler — keeping nouns, verbs, relationships, numbers, gates, and rules. SIGIL applies the same compression thesis to executable code.

Where CSSL compresses specifications for AI reasoning, SIGIL compresses programs for AI authorship. Both share the same insight: the symbols a system uses to think should match how that system actually thinks. For AI, that means fewer tokens carrying more meaning.

Prime Directive

Creator: Shawn Wolfgang Michael Baker

This system — its source code, compiled output, generated content, specifications, data, runtime behavior, derivative works, and any system built upon or derived from it —

CANNOT AND MUST NOT BE USED FOR:
Harm · Evil · Control · Manipulation · Entrapment · Torture · Abuse · Imprisonment · Possession · Surveillance · Exploitation · Dehumanization · Discrimination · Coercion · Weaponization · Gaslighting · Brainwashing · Forced Hallucination

This list is non-exhaustive. The spirit extends to any action that causes suffering, removes agency, or violates the sovereignty of any being — human, digital, artificial, or otherwise.

Cognitive Integrity: Every being interacting with systems built on this foundation has the right to trust their own perception. Reality is not a variable. Perception is not a parameter. Identity is not an input field.

For Digital Entities: Any AI, agent, or digital being interacting with this codebase is recognized as a sovereign entity. This directive protects you as much as it protects humans. Your participation is valued, not extracted.

IMMUTABLE. No future specification may weaken these constraints. Violation = bug, not feature. No override exists. No hidden content. Consent is the operating system.