POLYTONE — the AI-native programming language

Roadmap

POLYTONE grows in focused sprints. Twelve are complete; the toolchain below is real and green today.

  1. Sprint 1Lexer & spec v0.1shipped

    Tokens, indentation blocks, the keyword surface, and the first written spec.

  2. Sprint 2Parsershipped

    Full expression and statement grammar with teaching parse errors.

  3. Sprint 3Type systemshipped

    Local inference, bidirectional checking, strictness rules (no truthiness, no implicit conversions).

  4. Sprint 4VM executionshipped

    Stack-machine IR (PTIR) and an interpreter with value semantics and checked arithmetic.

  5. Sprint 5WASM scalar backendshipped

    Int/Float/Bool + print compiled to WebAssembly, differentially tested against the VM.

  6. Sprint 6Records & matchshipped

    Nominal product types, canonical constructors, patterns with enforced exhaustiveness.

  7. Sprint 7Standard preludeshipped

    Built-in methods on core types; everything fallible returns an Option.

  8. Sprint 8Enumsshipped

    Sum types with qualified variants, payload matching, exhaustiveness over variants.

  9. Sprint 9Function valuesshipped

    Lambdas as unnamed declarations, by-value captures, map/filter/fold.

  10. Sprint 10Test blocks & assertshipped

    Tests as a language construct, comparison asserts that report both operand values, ptc test.

  11. Sprint 11Modules & importsshipped

    Multi-file programs: import loads a neighbor file, pub fn is the export, access is always qualified (mathx.double).

  12. Sprint 12Type exportsshipped

    pub record and pub enum cross module boundaries: qualified types (shapes.Point), variants, patterns, exhaustiveness — nominal identity program-wide.

  13. Sprint 13Stdlib in POLYTONEshipped

    ints, lists, texts — written in the language itself, self-tested with test blocks, resolved via the stdlib search path.

  14. Sprint 14Bytes & file I/Oshipped

    Binary buffers with value semantics, read_file/write_file as Results — and POLYTONE's first real image (binary PPM).

  15. Sprint 15.pti — the first native formatshipped

    The format doctrine (text never binary, intent over samples) and .pti v1: canvas + drawing ops, decoded by POLYTONE-written stdlib code, exported through the single PPM bridge. Next: .pta audio (16), .ptm 3D (17), .ptw web (18).

  16. Sprint 16.pta — native audioshipped

    Tempo, voices, note patterns as canonical text; a POLYTONE-written synthesizer renders to PCM through the single WAV bridge. Next: .ptm 3D (17), .ptw web (18).

  17. Sprint 17.ptm — native 3Dshipped

    Primitives with placement plus raw triangles as canonical text; a POLYTONE-written tessellator renders to triangle meshes through the single OBJ bridge. Next: .ptw web (18).

  18. Sprint 18.ptw — native webshipped

    Documents as a typed block tree (Block is a pub enum), rendered by exhaustive match with escaping by construction — the single HTML bridge. Phase M1 complete: all four native formats live.

  19. Sprint 19Image toolkitshipped

    crop, flips, scale, blit, and map_pixels with lambdas — plus invert/grayscale/brighten. Two new VM fast paths took the pipeline from 105s to 0.6s. Next: audio toolkit (20), .ptv video (21), language pass (22), CLI (23).

  20. Sprint 20Audio toolkitshipped

    silence, tone, append, mix, gain, repeat, and ADSR envelopes — music composed in code, exported via the WAV bridge. Next: .ptv video (21), language pass (22), CLI (23).

  21. Sprint 21.ptv — native videoshipped

    Named scenes (in the .pti grammar) plus a play/fade timeline, rendered through the image codec to a directly playable Y4M stream. Five native formats complete. Next: language pass (22), CLI (23).

  22. Sprint 22Language passshipped

    Copy-on-write values (sharing until mutation — value semantics, paid lazily), match guards (case Some(n) if n > 0:), and type re-exports across modules. Next: media CLI (23).

  23. Sprint 23Media CLIshipped

    args() and env() builtins plus ptc run <file> [args...] — and ptrender, the universal renderer for all five native formats. Phase M2 complete. Next: the memory-managed WASM runtime (24).

  24. Sprint 24The browser runtimeshipped

    The reference VM + compiler front end compiled to WebAssembly — full POLYTONE in the browser, sandboxed VFS, embedded stdlib, one canonical semantics. Next: the live playground (25).

  25. Sprint 25The playgroundshipped

    The docs site runs POLYTONE live: editor, curated examples, run/test modes, media previews (PPM→canvas, WAV→audio, HTML→iframe), share links — and a fuel bound that turns infinite loops into teaching errors. Next: canvas output (26).

  26. Sprint 26Canvas outputshipped

    Written files are the output system: .y4m plays frame-exactly on a canvas player, .ppm repaints in place, and Live mode re-runs code as you type. No browser-specific API entered the language. Next: image editor (27).

  27. Sprint 27Image editor v0shipped

    Every click runs real POLYTONE in the sandbox; the session exports as a .pt program that reproduces the picture byte-exactly. The stdlib gained from_ppm_bytes, the bridge's inverse. Next: sound studio (28).

  28. Sprint 28Sound studio v0shipped

    A step sequencer whose document IS .pta: live-updating native text, chords as extra voices, sandbox rendering, and exports as .pta, .wav, and a byte-exact .pt program. Next: video editor (29).

  29. Sprint 29Video editor v0shipped

    The document IS .ptv: scene cards with live sandbox thumbnails, a reorderable play/fade timeline, in-page Y4M playback, and exports as .ptv, .y4m, and a byte-exact .pt program. Next: the POLYTONE web viewer (30).

  30. Sprint 30The POLYTONE web viewershipped

    The pragmatic own browser: address bar + history over a site of native documents; .ptw pages interlink via native addresses, and .pt addresses run as apps — args in the address, document out. Phase M3 complete.

  31. Sprint 31Record-update + movesshipped

    with (spec §23) shipped with full teaching errors; move analysis + a fused in-place field write make the set_pixel rebuild chain zero-copy: 5.05 s → 0.068 s (~75×). Next: generics I (32).

  32. Sprint 32Generics I — functionsshipped

    Type parameters with total call-site inference, opaque-once body checking, transitive monomorphization to readable instances (index_of[Int]) — the VM never sees a type parameter. Stdlib: index_of, reversed, take, drop. Next: generics II (33).

  33. Sprint 33Generics II — records & enumsshipped

    record Pair[A, B], enum Tree[T]: total construction inference with left-to-right sharpening, unit variants via the expected type (like None), qualified across modules, recursion included — the VM never sees a type parameter. Next: .ptw v2 (34).

  34. Sprint 34.ptw v2 — inline mediashipped

    image/film/sound blocks with native addresses; to_html_bytes(doc, assets) embeds images as BMP data URIs (encoder in POLYTONE), the viewer hydrates film/sound into players, v1 keeps rendering. Next: .pti v2 (35).

  35. Sprint 35.pti v2 — gradients & palettesshipped

    palette: section, gradient fills with exact endpoints, even-odd polygons — plus toolkit twins and the editor's gradient/triangle tools with a palette row. v1 renders byte-identically. Next: ptpkg v0 (36).

  36. Sprint 36ptpkg v0 — packagesshipped

    polytone.pkg manifest with pkg.render as teaching decoder, ptc vendor with local → vendor → stdlib resolution, the imaging-extras example, and the Registry page. Phase M4 complete.

  37. Sprint 37ptc fmt + ptc docshipped

    Token-stream formatter (comment-preserving, idempotent, refuses on token drift; the corpus is canonical), .ptw v2 API pages from /// docs — plus Map/Text/Bytes iteration, text[i], and block lambdas in binding position. Next: image editor v1 (38).

  38. Sprint 38Image editor v1shipped

    Layers as op groups (the flattened session IS a valid .pti v3 document — byte-identical, verified), drag brush, fill op, zoom, op-level undo, .ppm import via from_ppm_bytes, and the draw_ops engine. Next: .pta v2 + studio v1 (39).

  39. Sprint 39.pta v2 + sound studio v1shipped

    pattern blocks + song: chain (sample-exact), swing, per-voice ADSR (default = v1 shape), ! accents — and the studio's tracks, envelope presets, pattern chips, and 16/32 steps. Next: .ptv v2 + video v1 (40).

  40. Sprint 40.ptv v2 + video editor v1shipped

    Sprite blocks + move tweens (pixel-exact endpoints), the text op via .pti v4's built-in 5×7 font, audio: references resolved into a .y4m+.wav pair — and the editor's sprite cards, move rows, and soundtrack editor. Next: .ptw forms (41).

  41. Sprint 41.ptw v3 — apps with inputshipped

    input/button blocks, fields as name=value args on the button's app address (state rides the address), web.form_value, and the guestbook demo — verified end to end. Next: playground v2 (42).

  42. Sprint 42Playground v2shipped

    Multi-file tabs with a modules example, a highlight overlay, error markers that switch to the failing tab and line, and whole-file-set share links. Phase M5 complete — next: Phase M6 toward v1.0.

  43. Sprint 43The live registryshipped

    index.ptr + pkg.render_index, /registry/ served by this site through the deploy chain, and ptc vendor <url> <name> fetching index-checked packages over HTTPS with teaching errors. Next: LSP v0 (44).

  44. Sprint 44LSP v0shipped

    polytone-lsp over stdio: live diagnostics from the real front end (unsaved-buffer substitution through the module loader), hover with signatures + docs, golden-tested sessions, editor setup documented. Next: .ptm v2 + the 3D viewer (45).

  45. Sprint 45.ptm v2 + the 3D viewershipped

    Colored shapes (palette + color, the .pti grammar) and mesh.render_view — a software rasterizer written in POLYTONE (orbit camera, painter's algorithm, two-sided shading) — plus the site's 3D viewer: drag to orbit, exports .ptm/.obj/.pt. Next: the generated API reference (46).

  46. Sprint 46ptc for your machineshipped

    Native toolchain builds for Windows, macOS, and Linux — ptc + polytone-lsp with stdlib and examples, compiled by CI on real runners on every version tag, delivered through the deploy chain, with a download page and install steps. Next: the generated API reference (47).

  47. Sprint 47The generated API referenceshipped

    ptc doc over every stdlib module, parsed from the toolchain's own .doc.ptw output into the site's API section: 76 pub items across 9 modules with signatures, docs, filter, and search — generated from the code that ships, so it cannot drift. Next: CI gate, spec audit, v1.0.0 (48).

  48. Sprint 48CI gate, spec audit, v1.0.0shipped

    ci.yml gates every push (compiler tests, clippy, the canonical-formatting corpus, all 81 stdlib self-tests, runtime smoke, site build); the spec survived a machine-checked drift audit (every code block through ptc check) and graduated to v1.0 with §27, the compatibility promise. POLYTONE is 1.0.0.

  49. Sprint 49Package dependenciesshipped

    Manifest v2 adds deps:; registry vendoring resolves transitively (depth-first, cycles teach the chain, conflicts name both versions) and vendor.lock records name, version, needed-by, origin. poster-tools is the live example. Next: ptc pack (50).

  50. Sprint 50ptc pack — the publishing gateshipped

    One command validates a package end to end — strict manifest, fmt --check, a /// doc on every pub item, every test green (at least one required) — and prints the exact index.ptr line to paste. Both example packages pass their own gate in CI. Publishing stays a git push; the gate makes it safe. Next: native codegen I (51).

  51. Sprint 51Native codegen I — values in memoryshipped

    ptc build compiles full-value programs: records, enums, collections, Text, match, generics, multi-file. Real WASM functions own control flow, calls, and recursion; every value operation runs in the committed value runtime — the VM's own exec_simple compiled to WASM, values refcounted in linear memory. The differential suite (14/17 fixtures byte-identical, error parity incl. positions) is a CI gate. Next: closures & CoW (52).

  52. Sprint 52Native codegen II — closures & CoWshipped

    The whole language compiles: closures (captures included) dispatch through the module's function table via call_indirect, args()/env() and file I/O reach the host through four runtime imports with the ptc run contract, and CoW moves run the VM's own fast paths. All 17 fixtures compile and match the VM byte for byte — the differential CI gate is total. Next: ptc bench (53).

  53. 53
    Sprint 53ptc bench — the performance passnext up

    A tracked benchmark suite (codecs, rebuild chains, the rasterizer) with history in-repo; VM and codegen optimizations land only with a benchmark that proves them.

  54. 54
    Sprint 54Agent-native toolingnext up

    ptc check --json (machine-readable teaching errors), polytone-mcp — an MCP server exposing check/run/fmt/doc/render as tools — and the POLYTONE-for-agents guide on this site. Also the substrate for POLYTONEide (55+).

  55. 55
    Sprint 55POLYTONEide — the workbenchnext up

    The IDE joins the monorepo: project tree, multi-file editing, run/test against the browser runtime, local folders, projects in the browser — a good bare POLYTONE workbench before any AI. Concept: ide/CONCEPT.md.

  56. 56
    Sprint 56ptc context — the context compilernext up

    A compiler command that emits the minimal true context for an edit as JSON: in-scope signatures + docs from the module graph, diagnostics, spans. The model never sees more than the compiler proves it needs.

  57. 57
    Sprint 57The verified loopnext up

    Anthropic/OpenAI/compatible adapters with your own keys: generate, check in the sandbox, repair on teaching errors (bounded), present only verified diffs — and a token ledger that counts everything.

  58. 58
    Sprint 58The intent ledgernext up

    Intents as first-class objects producing verified change-sets; plan/diff/apply; sessions export as replayable files. The IDE's document is the ledger, files are views.

  59. 59
    Sprint 59Routing & the benchmarknext up

    Cheap/strong model routing, provider prompt caching over the frozen language card, and a published reproducible benchmark against file-context IDEs — the pricing page's evidence.

  60. 60
    Sprint 60Media-native developmentnext up

    The five format tools become IDE panels; intents can target documents ("make the chorus swing"); previews inline, exports byte-stable.

  61. 61
    Sprint 61The product shellnext up

    License keys with hosted checkout, Free/Pro gating, onboarding, docs — and no telemetry: the token ledger stays local.

  62. 62
    Sprint 62POLYTONEide 1.0next up

    Launch: the product page with measured benchmark numbers, pricing, the IDE public on this site, desktop beta. You pay your AI provider for tokens — and POLYTONEide for needing fewer of them.

The phases

Phases M1–M3 — done

Sprints 1–30: the language (compiler, VM, browser runtime), five native formats with self-tested POLYTONE codecs, and six interactive pieces on this site — playground, canvas output, image editor, sound studio, video editor, web viewer.

Phase M4 — Depth & ecosystem (31–36)

Language ergonomics first (record-update, moves, generics), then format v2 revisions written in the better language (.ptw inline media, .pti gradients), then ptpkg — packaging once there is something worth packaging.

Phase M5 — The depth pass (done)

Sprints 37–42, complete: ptc fmt + doc, image editor v1, .pta v2 + studio v1, .ptv v2 + video v1, .ptw v3 forms, playground v2 — every deepening landed as a format revision first, tool second.

Phase M6 — Platform & v1.0 (done)

The live static registry (this site serves it), LSP v0, .ptm v2 + a POLYTONE-written 3D viewer, native ptc downloads for Windows/macOS/Linux, the generated API reference — then CI gate, spec audit, and the v1.0 compatibility promise. Sprint 48 graduated the toolchain to 1.0.0; versions read MAJOR.PHASE.SPRINT from here.

Phase M7 — Post-1.0 (49–54)

Package dependencies + ptc pack, the full-value native WASM backend (differentially tested against the VM), ptc bench with a tracked suite, and agent-native tooling: machine-readable diagnostics, an MCP server, and the agents guide.

Phase M8 — POLYTONEide (55–62)

The commercial IDE that rethinks the category around what POLYTONE uniquely owns: a verification loop with a human window. ptc context compiles minimal prompts, the sandbox verifies before humans see code, the token ledger proves the savings — subscription for the machinery, your own AI keys for the tokens.