news / engineering
the first eight weeks of khaos.machine

the first eight weeks of khaos.machine

five repos stood up in eight weeks, in an order the commits prove was deliberate: spec before engine, packaging before analysis toolchain, product shell last.

five timestamped repos along a vertical axis — spec, engine, toolchain, packaging, product shell — with amber accent markers at each milestone on a dark background

the handoff order between five repos tells the architectural argument. spec ships first because every downstream component needs something to parse. the engine consumes the spec the same afternoon. packaging precedes the analysis toolchain because delivery is upstream of features when the intent is that users actually receive what gets built. the analysis engine slots in once a delivery plane exists. the product shell is last — the daemon that makes the menu bar app believe the whole stack is one thing.

that sequence ran from 2025-12-28 to 2026-02-26. eight weeks. the commits are timestamped.

KSPD — 2025-12-28 13:55 EST

940b47d is the initial commit of the KSPD repository. the Khaos Screenplay Project Document format: a structured, file-system-native project layout for screenplays that a parser can write and four independent Go services can consume without coordination.

twelve minutes of commits follow. 86cbc04 introduces RFC 0001 — the canonical format rationale. 4f8d5a4 through dca2d61 land the five core schemas: info, story, layout, events-line, and index. 42d7211 through e233e96 add the WFL schemas: event, signal, analysis-run, snapshot, and feedback-state-index. that is a complete read-write contract for both the document layer and the workflow layer, committed inside a single afternoon.

two later commits are worth noting for what they reveal about design intent. c2ad020 and 32cf749 add iCloud sync and Handoff compatibility. these are not server-side concerns. the format is being designed for user devices — a laptop that syncs to a phone, a phone that hands off to a Mac. the spec is not a CI artifact; it is the file format a working screenwriter carries around.

within 24 hours, d5e63cc and ce6b41c add a Docusaurus documentation site. the spec gets a public face before the first engine commit lands in any other repo.

khaos-wfl — 2025-12-28 14:32 EST

thirty-seven minutes after the KSPD initial commit, 5e136e8 opens the khaos-wfl repository. this is not incidental proximity. the WFL schemas committed in KSPD twelve minutes earlier are the contract that khaos-wfl was already designed to consume.

8776296 and roughly fifty commits across the next ninety minutes stand up: a project loader, a story graph engine, scope computation, a rule engine, signals lifecycle management, and validate, snapshot, and export commands. the same afternoon KSPD’s schemas were written, a working engine was consuming them.

on 2025-12-29, c75fb79 and a885400 land RFC 0002 — FDX import — extending the format’s ingestion surface. the spec and the engine are growing in parallel, written by the same hand on the same clock.

the engineering argument here is that the spec-engine gap was zero days. there is no period where a format document existed without an implementation. the Reflex DAG engine consumed KSPD as its native substrate from the first commit.

khaos-tools — 2026-02-07, six weeks later

the toolchain arrives six weeks after the engine. c217a21e is a monorepo dump: Phases 1 through 6 in a single commit — base library, iOS Swift bindings, Android Kotlin bindings, mobile memory optimization, a unified CLI restructure, a CI/CD pipeline, and install guides. the version moves from v0.1.1 to v0.2.0 the same day.

the gap is not an accident. the toolchain requires a stable format to parse. KSPD spent six weeks accumulating RFC rationale and schema extensions before khaos-tools committed to parsing it.

38327be3 and c20330de on 2026-02-08 land Phase 4: LLM provider integration and character detection. v0.3.0 ships. the next day, dbcc4e5a through 0d233dcf run a systematic eight-model bake-off — mistral-nemo, gpt-4o-mini, ministral, gpt-oss, nemotron-3-nano, qwen3, and two others — the first structured provider comparison in the codebase. these are not speculative benchmarks; they are commits against real screenplay inputs with comparison output.

1894497e through dcf4b122 on 2026-02-11 introduce a schema-aware scene analyzer, a cross-scene ScreenplayAnalyzer, and analysis persistence in graph storage. v0.4.0 ships. the parser now writes to a story graph that multiple consumers can query.

khaos-foundation — 2026-01-28, before the toolchain

the packaging plane predates the analysis toolchain by ten days in commit history and by logical necessity. 0337e1f through e1dd23a on 2026-01-28 produce the first signed .pkg: build scripts, a staging directory that lands binaries in /usr/local/bin, and a GitHub release step. that is the day khaos.machine becomes something a user installs.

ff76312 and f395308 on 2026-02-15 add the multi-binary pivot: Linux .deb and .rpm support via nfpm, landing the same morning. the same day, 6306a3a (issue #1) shifts the installer from “ship binaries” to “manage daemons” — LaunchAgent and systemd lifecycle for khaos-wfl on both platforms.

25a2bb8 on 2026-02-19 stands up S3 and CloudFront. preview.khaosmachine.com is the first public CDN surface for the platform.

the ordering argument: if packaging had landed after khaos-tools, there would have been a period where an analysis engine existed but no delivery mechanism. the inverse was true — the installer was operational before the analysis engine shipped. users could install a running daemon before the LLM analysis pipeline was present.

khaos-manager — 2026-02-24 to 2026-02-26

321bdb1 opens the khaos-manager repository on 2026-02-24. twenty-five commits over approximately three hours produce khaosd: a REST API with parity to the analysis and project surface, embedded SPA serving via go:embed, SSE for project and dashboard state, git integration, console logging, a WFL bridge, a LaunchAgent-based macOS auto-start, an update-check endpoint pointing to preview.khaosmachine.com, DMG packaging, and goreleaser configuration.

the same day, 1303239, 22524f3, 948da05, 40d57b5, and 511a35d land the Khaos Machine.app menu bar application: Swift, Package.swift as the Xcode entry point, entitlements, signed builds, login item registration, and Sparkle update integration.

d0bfbab on 2026-02-26 rebrandsthe copy from Khaos Studio to Khaos Inc. in the menu bar. it is the first ship cycle of the integrated product under its final identity.

khaosd is the piece that makes the stack appear coherent to the menu bar. it speaks to khaos-tools via subprocess — never linked as a library, consistent with the onion architecture constraint that appears in the workspace CLAUDE.md: “khaos-manager never imports khaos-tools as a Go library — shells out to CLI.” it speaks to khaos-wfl via a StreamClient. the embedded GUI apps talk to khaosd’s REST API on a dynamic local port. none of these components share a process; khaosd is the coordination layer, not the execution layer.

the pattern

the handoff sequence reads cleanly from the commits: a format spec commits before an engine because the engine needs something to read. the engine commits the same afternoon because the spec author is also the engine author and the schemas are already stable. packaging commits before the analysis toolchain because the intent is delivery — a user who cannot install the platform cannot benefit from the analysis pipeline. the analysis toolchain commits once the delivery plane exists. the product shell is the final piece because it requires all four prior layers: a format to display, an engine to manage, a toolchain to invoke, a packaging layer that already deposited the right binaries at /usr/local/bin.

the thirty-seven-minute gap between KSPD and khaos-wfl is not a curiosity — it is the evidence that the spec and the engine were designed together and committed in dependency order. the ten-day gap between khaos-foundation and khaos-tools is the evidence that the delivery concern ranked above the analysis concern in the build order.

the log is still being written. this is just where it started.