DPW — Daitai Programmers Workshop

A complete, algebraically grounded development environment for an era when software is written by AI but must be proven by humans.

Code Daimyo IDE — built from the ground up without React, with its own UI framework, its own language, and its own algebra.

DPW — Code Daimyo IDE running in the Underwater theme: Utforskaren (file explorer), the tabbed editor, and the AI-Kollegan panel with the CodeCity metaphor.

DPW · Underwater theme · Swedish locale · AI-Kollegan with CodeCity context

What DPW is

DPW (Daitai Programmers Workshop) is a web-based and native development environment that combines:

  • Code editing with syntax support for HTML, CSS, JavaScript, TypeScript, and our own language daitai-lang
  • Spreadsheet with formulas, charts, pivot tables, and graph visualization
  • Kashika — presentation tooling with slides and a shared selection engine
  • UI Editor — drag-and-drop with an algebraic layout model
  • AI Colleague — integrated AI assistant with context awareness, tools, and a verification policy
  • DaitaiDB — document database with a graphical interface
  • Terminal and Git — built-in terminal plus staging and commit handling
  • OCR — our own recognition engine (NCC + LeNet), independent of any third party

Everything is rendered with daitai-ui, a self-built component framework with no React dependencies in the core.

Why DPW exists

The 2026 climate rewards speed over rigor. AI-generated React slop ships faster than compliance teams can review it. DPW is the constructive alternative:

  • Verifiable instead of assumed — algebraic invariants (P01–P23) that LLM output can be validated against
  • Provider-neutral instead of locked in — Tauri offline-first, swap AI providers at no cost
  • Signed instead of documented — CGF turns compliance into a cryptographically verifiable artifact
  • Pedagogical instead of magical — every line has a derivation, every commit a signature

Architecture in five layers

1. SURFACE      Editor · Kashika · Spreadsheet · UI Editor · AI Colleague · DaitaiDB
2. FRAMEWORK    daitai-ui (mount/reconciler/reactive) · SelectionEngine · PubSub · 23 themes
3. CORE         daitai-lang · daitai-algebra (P01–P23) · CEA (256D vector index) · CGF
4. AGENT        Executor · Checkpoints · Verify build · Typed diagnostics · Approval gates
5. PLATFORM     platformIO → Tauri | Web | Hosted

Each layer talks downward through clean interfaces. No layer leaks upward. See the dedicated Architecture page for layer-by-layer detail.

Features — overview

  • Editing — Multi-language CodeEditor; syntax highlighting; ghost-text completion; type-directed holes; semantic selection across DOM/AST/Tailwind/Theme
  • Spreadsheet — Formulas, charts, pivot tables, graph view with minimap, CEA-driven code analysis in sheets
  • Presentation — Kashika with slides; CanvasAdapter for SelectionEngine; auto-export
  • UI design — Drag-and-drop, snap & guides, VStack/HStack algebra, DOMAdapter
  • AI — AI Colleague with tool registry, prompt evals, memory graph, mandatory verification policy
  • Agent — Multi-step executor, trajectories, time-travel, fork-retry, checkpoints
  • Compliance — CGF, signed .cgfevidence bundles, EU AI Act, GDPR, SOC 2, APPI/METI/FSA (JP)
  • File system — platformIO over Tauri / Web (localStorage + IDB) / Hosted
  • Git — Built-in staging, commit, stash-based checkpoints
  • Terminal — ProcessRegistry-streamed shell, shell-policy whitelist/denylist
  • Database — DaitaiDB document database with a graphical UI
  • OCR — NCC + LeNet, no third party
  • 3D — Three.js facade, CodeCity with InstancedMesh for repo visualization
  • Build — Multi-pipeline builder via compileInWorker, daitai.project.json
  • Tauridpw scaffold tauri, idempotent v2 packaging
  • Devcontainer — scaffold of .devcontainer/ via platformIO

Core modules in detail

daitai-ui — our own UI framework

A complete component framework written in TypeScript. No React dependencies in the core.

  • mount / reconciler / reactive — our own primitives for rendering, diffing, and reactivity
  • Trait systemClickable, Hoverable, Focusable, Draggable, Resizable
  • ComponentsButton, Input, Progress, Card, HudCard, Dialog, Tooltip, Tabs, CodeEditor, Spreadsheet, Kashika
  • Theme system — 23 distinct themes (Frost, Samurai, Geisha, Kawaii, Material, Klingon, Underwater, and more)
  • VStack/HStack algebra — layout as composition, not CSS-flex tricks
  • Slim / Pro / registry — packaged for external use (MIT)

daitai-lang — our own language

A deterministic language with Dirac notation and algebraic data types.

  • AST, lexer, parser, scoped Hindley–Milner inference
  • Hover information, language-service trait
  • Integrates with CodeEditor via the useDaitai flag
  • Hole-driven editing: typed holes suggest completions
  • Type-directed completion, semantic analysis

daitai-algebra — the axiomatic foundation

Hilbert spaces, quantum sorts, bra-ket syntax. P01–P23 codify invariants that the whole system rests on.

CEA — Code Entity Analysis

256-dimensional hierarchical vector representation of code. Powers retrieval, prompt context, and code understanding.

SelectionEngine

A shared selection engine between UI Editor (DOMAdapter) and Kashika (CanvasAdapter). Adapter pattern via HitTestAdapter. Semantic selection across parallel layers: DOM, AST, Tailwind classes, and theme.

PubSub

Bounded FIFO with backpressure. First-class principle for all inter-module communication. WebWorker bridge. Inspector with ring-buffer logger and debug panel.

platformIO

An abstract I/O interface that all user file handling goes through. Implementations: Tauri (native FS), Web (localStorage + IndexedDB), Hosted (cloud, forthcoming).

The AI Colleague

Not a chatbot — a colleague with tools, memory, and a duty to verify.

  • Provider-neutral — Anthropic, Google Gemini, OpenAI, DeepSeek
  • Tool registryapply_patch, run_shell, verify_build, and more
  • Memory graph — nodes and edges on top of a memory store, Jaccard derivation, BFS in buildMemoryContext
  • Prompt evals — automated test suites for prompt quality
  • AI bundles — Tauri-only file-bundle uploads to Anthropic/Gemini Files APIs
  • Mandatory verification policy — typecheck runs automatically after file-mutating tool calls with adaptive scope (single/multi/core)
  • Determinism requirementidgen() and clock() are injectable, Math.random() is forbidden in component code

Agent mode

Multi-step execution with a full audit trail.

  • Executor + tracker — linear step execution with outputs, log, and timeline
  • Trajectories — JSONL event stream persisted in .dpw/agent-trajectories/
  • Time-travel — headless CLI for replay, seek, and restore
  • Checkpoints — auto-snapshot via CheckpointManager (git stash + refs/dpw-checkpoints/)
  • apply_patch — registered tool with diff-preview bridge and watch mode
  • forkRetryStep — auto-retry of an inner step with checkpoint restore and mutateOnRetry
  • Typed diagnosticsclassifyDiagnostic + summarizeForRetry feed the retry loop with structured errors
  • verifyBuildStep — project or single-file typecheck that feeds diagnostics back into the loop
  • chainStep — atomic chain that aggregates child diagnostics
  • Approval gatesauto by default, plus inline requestApproval with shell-policy whitelist/denylist
  • Project context — graph-derived selection (BFS forward + reverse) with RAG fallback

CGF — Code Governance Framework

Sign your compliance the way you sign your code.

ingest  →  check  →  bundle  →  verify
graph      claims    signed     cryptographic + policy invariants
                     .cgfevidence
  • Typed event-driven compliance graph — 15 node types, 16 edge types
  • UUIDv5-derived idempotency — same input yields the same graph
  • Ed25519 multi-signer signing + RFC 3161 timestamping
  • Trust Store — export/import across machines
  • Bundle Inspector + Creator UI with drag-and-drop
  • Policy presets — Open, Minimal trust, EU AI Act high-risk, Banking grade
  • CGF-JP — Japan overlay with ringi/hanko/nemawashi nodes, METI/APPI/FSA/AISI claim packs, bilingual narrative
  • cgf doctor — end-to-end health check
  • 206/206 tests passing in v1.0
cgf ingest && cgf check && cgf bundle --out dossier.cgfevidence
cgf verify dossier.cgfevidence

Read on: CGF in 5 minutes, Bundle format, Trust policy.

Workspace models

  • Desktop — Native FS via Tauri. Offline-first, full capability.
  • Web — localStorage + IndexedDB. Browser, import/export, no install.
  • Hosted — Cloud-based (forthcoming). Persistent, collaborative.

All three speak the same platformIO interface. Code written once works everywhere.

Themes and aesthetics

23 rich themes, each with a distinct character — not 23 variations of blue. Default: Underwater.

Frost · Samurai · Geisha · Kawaii · Material · Klingon · Underwater · and 16 more.

The theme system is algebraic: colors, typography, and spacing are exposed as semantic tokens. No hardcoded hex values in component code.

Who it's for

  • Students who refuse to learn "prompt craft" as a substitute for understanding
  • Enterprise that must deliver proof of compliance, not just documentation
  • Regulated industries — banking, finance, medicine, defense — where "same input → same output" is a legal requirement
  • Japanese organizations — CGF-JP is not a translation but a native profile
  • AI product teams under the EU AI Act who need verifiable Article 9/13/15 evidence
  • Auditors who want a diff, not a binder

Sound principles (P01–P23)

DPW is built on a short manifest:

  • P01 Determinism — same input → same output, always
  • P02 Immutability — all data unchanged after creation
  • P03 State → Event → State — algebraic state machine
  • P04 PubSub — loosely coupled components via a message bus
  • P05 PAL/IO Boundary — pure logic separated from side effects
  • P06 Result<T,E> — explicit error handling, no exceptions
  • P07 Composition over inheritance
  • P08 Separation of View / Logic / Mount
  • P09 Pseudocode header — every file begins with a daitai spec
  • P10 Typed events with a kind discriminator
  • P11 Testable logic without the DOM
  • P12 CEA inspection of code complexity
  • P21 HMR — state-preserving via PubSub
  • P22 Accessibility — ARIA and keyboard mandatory
  • P23 i18n — signal-based reactive translations

(P13–P20 reserved for expansion. Full text on The principles.)

Tech stack

  • TypeScript 5, Vite 5, Tailwind CSS v3
  • daitai-ui — our own framework, no React in the core
  • Tauri v2 for desktop packaging
  • Lovable Cloud for hosted backend (where applicable)

Version

v1.06 — April 2026. 206/206 CGF tests passing. Tauri target Phase 1 complete.


Daitai Programmers Workshop — Joakim Cöster + AI Colleague. Code Daimyo: Where algebra meets alignment. Read next: Architecture · Install DPW · Principles.