Multilingual 1.0 Roadmap¶
This roadmap translates the Multilingual 1.0 vision into repository-shaped implementation phases.
Goal¶
Build Multilingual 1.0 into a multilingual semantic platform with AI-native, multimodal, concurrent, distributed, and reactive capabilities.
Current Starting Point¶
The repository already provides strong leverage:
- data-driven multilingual keyword infrastructure
- shared AST across supported natural languages
- parser and semantic analyzer pipeline
- Python backend
- WAT/WASM backend
- browser-oriented DOM functionality
- a large regression suite
The main limitation is that the core layer is still too thin. The repository
has a CoreIRProgram, but not yet a rich semantic IR that defines the language
independently of backend behavior.
Success Criteria¶
Multilingual 1.0 is successful when:
- the semantic IR is the true language boundary
- structured data and matching are central language features
- AI and multimodal workflows are first-class
- concurrent and parallel execution are expressible as language-level constructs
- multi-agent programs with coordination and shared memory are demonstrable
- reactive web programming is part of the main story
- distribution and observability are expressible without library workarounds
- the transition is test-backed and staged rather than disruptive
Workstreams¶
The roadmap is organized into eight workstreams:
- language definition
- compiler architecture
- type/effect system
- AI and multimodal runtime
- concurrency and parallelism
- distribution, memory, and observability
- reactive UI and web tooling
- ecosystem and developer experience
Phase 1: Define the New Center¶
Goal:
- establish Multilingual 1.0 as a new language direction before major runtime changes
Tasks:
- add a product-level vision document
- publish a Core 1.0 semantic draft
- define a stable list of new semantic pillars
Repository targets:
docs/vision.mddocs/spec/core_1_0.md- future companion specs for
ai,effects,reactive_ui,multimodal,concurrency, anddistribution
Exit criteria:
- contributors can describe Multilingual 1.0 as a language in its own right
- new features can be judged against an explicit 1.0 direction
Phase 2: Introduce a Real Semantic IR¶
Goal:
- make the shared core executable as a semantic layer rather than a thin wrapper
Tasks:
- add semantic IR node types
- add typed declarations for records and unions
- represent mutability explicitly
- represent
option,result, and pattern matching directly in the IR - represent capabilities/effects in the IR
Suggested repository additions:
multilingualprogramming/core/ir_nodes.pymultilingualprogramming/core/types.pymultilingualprogramming/core/effects.pymultilingualprogramming/core/semantic_lowering.pymultilingualprogramming/core/validators.py
Exit criteria:
- AST is lowered into a semantic IR that is meaningfully richer than the parser tree
- backend codegen can consume semantic IR as the primary semantic boundary
Phase 3: Modernize the Core Language¶
Goal:
- ship the first unmistakable Core 1.0 language features
Tasks:
- introduce
fnas the primary function keyword - add
varalongside existingletfor explicit mutability - add
|>pipe operator to the lexer, parser, and AST - add
?error-propagation operator forresult<T, E>functions - add
enumfor tagged union declarations - add record type declarations with
type Name = { ... } - add
option<T>andresult<T, E>as built-in generic types - expand
matchinto a flagship feature with record and union destructuring, guard expressions, and exhaustiveness checking - improve async semantics for backend-neutral lowering
- register all new keywords (
fn,var,enum,observe) in the USM keyword registry for all 17 languages
Suggested parser and resource targets:
multilingualprogramming/parser/parser.pymultilingualprogramming/parser/ast_nodes.pymultilingualprogramming/resources/usm/keywords.jsonmultilingualprogramming/resources/usm/surface_patterns.json
Suggested tests:
tests/core1/test_fn_syntax.pytests/core1/test_pipe_operator.pytests/core1/test_types.pytests/core1/test_pattern_matching.pytests/core1/test_results_options.pytests/core1/test_async_core.py
Exit criteria:
- users can model modern structured state with clear Core 1.0 constructs
fn,|>, and?are usable in all 17 supported surface languages- pattern matching is powerful enough to be a signature feature
Phase 4: Add Capabilities and Effect Checking¶
Goal:
- make external interaction explicit and analyzable
Tasks:
- add capability declarations such as
uses ai,uses dom,uses net - perform semantic checks over effect boundaries
- integrate capability metadata into package and backend planning
Suggested repository targets:
multilingualprogramming/core/effects.pymultilingualprogramming/core/semantic_analyzer.pymultilingualprogramming/runtime/backend_selector.py
Exit criteria:
- effectful operations are visible in semantic analysis
- diagnostics can explain capability violations clearly
Phase 5: AI-Native and Multimodal Runtime¶
Goal:
- make Multilingual distinct in the LLM and multimodal era
Tasks:
AI language constructs¶
- add
promptas a language keyword that produces a string from a model - add
thinkas a block form that returns a structured reasoning result with.conclusionand.tracefields - add
streamas a keyword that returnsstream<string>from a model - add
generateas a typed output keyword constrained by the declared return type - add
embedas a keyword returningvector<float>from a model - add
extractandclassifyas semantic shorthand for structured generation - add
~=semantic match operator backed by embedding distance - add model reference literals:
@model-nameresolves to amodelvalue - register
prompt,think,stream,generate,embed,extract,classify,observein the USM registry for all 17 languages
Agent and tool semantics¶
- add
@agentdecorator with a requiredmodelparameter and automatic tool-loop scaffolding provided by the runtime - add
@tooldecorator with a requireddescriptionparameter; tools are automatically registered for use by agents in scope - add
planas a structured multi-step reasoning primitive for agents
Structured output and retrieval¶
- add schema-constrained generation:
result: Invoice = generate @m: ... - add structured output validation using the declared type at runtime
- add
nearest(vec, index, top_k)as a built-in retrieval primitive - add retrieval-oriented runtime helpers for building RAG pipelines
Multimodal types¶
- add first-class
image,audio,video, anddocumentvalue types - add a
canvasrender target for multimodal output composition - multimodal values should be usable directly in
promptandgenerateexpressions
Suggested repository additions:
multilingualprogramming/runtime/ai_runtime.pymultilingualprogramming/runtime/ai_types.pymultilingualprogramming/runtime/tool_runtime.pymultilingualprogramming/runtime/retrieval_runtime.pymultilingualprogramming/runtime/multimodal_runtime.pymultilingualprogramming/runtime/semantic_match.py
Suggested tests:
tests/core1/test_ai_semantics.pytests/core1/test_prompt_think_stream.pytests/core1/test_agent_tool.pytests/core1/test_semantic_match.pytests/core1/test_multimodal.py
Exit criteria:
- the language can express typed AI workflows natively using language keywords, not library calls
@agent+@toolprograms are demonstrable in at least three surface languages- multimodal pipelines are easy to demonstrate in a few lines of code
~=semantic matching works across human-language input without manual embedding calls
Phase 6: Reactive Web Platform¶
Goal:
- turn existing DOM support into a modern application model
Tasks:
- add
observe varas a reactive mutable binding in the parser and semantic IR - add
on <signal>.changeevent handler syntax - add declarative view composition via
canvasblocks andrenderexpressions - add event handlers as first-class constructs
- support async UI updates driven by
stream<T>values - integrate AI streams with reactive state: a streaming
promptresponse should be bindable directly to a reactive view - preserve low-level DOM access as an escape hatch
Suggested repository additions:
multilingualprogramming/runtime/reactive.pymultilingualprogramming/codegen/ui_lowering.py
Suggested tests:
tests/core1/test_reactive_ui.pytests/core1/test_observe_var.pytests/core1/test_stream_to_view.py
Suggested demos:
examples/reactive_counter.mlexamples/multilingual_dashboard.mlexamples/streaming_chat_fr.mlexamples/semantic_search_ja.ml
Exit criteria:
- the primary web story is no longer raw imperative DOM manipulation
- users can build small interactive applications idiomatically
- a streaming AI response can update a reactive view in a single pipeline expression
Phase 7: Structured Concurrency and Parallelism¶
Goal:
- make concurrent and parallel execution a language-level concern, not a library pattern
Tasks:
- add
par [ expr1, expr2, ... ]as a parallel fan-out expression that produces a tuple of results; all branches run concurrently - add
spawn expras a keyword that starts a concurrent task and returnsfuture<T> - add
channel<T>as a typed first-class value for inter-task communication - add
future<T>as a value type;await futureretrieves the result - implement scope-bounded concurrency: tasks spawned in a block are joined before the block exits; dangling tasks are a semantic error
- add
parandspawnto the USM keyword registry for all 17 languages - lower
partoasyncio.gatheron the Python backend and to structured Promise.all on the browser backend - integrate
parwith AI operations:par [ embed q1, embed q2, embed q3 ]should fan out model calls automatically
Suggested repository additions:
multilingualprogramming/core/ir_nodes.py—IRParExpr,IRSpawnExpr,IRChannelExpr,IRFutureAwaitmultilingualprogramming/runtime/concurrency_runtime.pymultilingualprogramming/codegen/concurrency_lowering.pymultilingualprogramming/resources/usm/keywords.json—par,spawn
Suggested tests:
tests/core1/test_par_operator.pytests/core1/test_spawn_future.pytests/core1/test_channel.pytests/core1/test_parallel_ai.py
Exit criteria:
par [ prompt @m: q1, prompt @m: q2 ]executes both calls concurrentlyspawnreturns afuture<T>that can be awaited independently- scope-bounded concurrency prevents tasks from outliving their scope
- parallel constructs are usable in at least three surface languages
Phase 8: Multi-Agent Coordination¶
Goal:
- make networks of cooperating agents a language-level feature, not an orchestration library
Tasks:
- add
@swarmdecorator that declares a group of agents with shared tools and a named memory store - add inter-agent message passing via typed channels as a standard coordination pattern within a swarm
- add a coordinator pattern: one agent in a swarm can delegate subtasks to others and collect results
- define how agents in a swarm share tools: tools declared inside the swarm block are available to all member agents
- add
planas an agent-level orchestration primitive that returns a structured sequence of subtasks - register
swarmin the USM keyword registry for all 17 languages - demonstrate a swarm of three agents completing a research task in parallel
Suggested repository additions:
multilingualprogramming/core/ir_nodes.py—IRSwarmDeclmultilingualprogramming/runtime/swarm_runtime.pymultilingualprogramming/resources/usm/keywords.json—swarm
Suggested tests:
tests/core1/test_swarm_declaration.pytests/core1/test_agent_delegation.pytests/core1/test_swarm_shared_tools.py
Suggested demos:
examples/research_swarm_en.mlexamples/research_swarm_fr.mlexamples/research_swarm_ja.ml
Exit criteria:
- a
@swarmwith three agents completes a delegated research task - the same swarm program is demonstrable in three surface languages
- agents communicate through typed channels without manual callback wiring
Phase 9: Distribution, Memory, and Observability¶
Goal:
- make distribution and long-running programs expressible at the language level
Tasks:
Placement annotations¶
- add
@local,@edge,@cloudas placement decorators on functions and agents - implement placement-aware dispatch in the runtime backend selector
- ensure semantic identity is preserved regardless of placement
Persistent memory¶
- add
memoryas a named, typed, session-persistent store - support
kb.store(key, value),kb.retrieve(key), andkb.search(query)(embedding-based) - memory stores should survive across program invocations for agent use cases
- add
memoryto the USM keyword registry for all 17 languages
Observability primitives¶
- add
trace exprto capture the model, inputs, outputs, and timing of an AI expression - add
cost exprto return the token or compute cost of an AI expression - add
explain exprto request a natural-language justification of a result - these should compose naturally with
|>andpar
Suggested repository additions:
multilingualprogramming/core/ir_nodes.py—IRPlacementAnnotation,IRMemoryStore,IRTraceExpr,IRCostExpr,IRExplainExprmultilingualprogramming/runtime/memory_runtime.pymultilingualprogramming/runtime/observability_runtime.pymultilingualprogramming/resources/usm/keywords.json—memory,trace,cost,explain
Suggested tests:
tests/core1/test_placement_annotations.pytests/core1/test_memory_store.pytests/core1/test_observability.py
Exit criteria:
@localand@cloudannotated functions dispatch to different backendsmemorystores data that survives across separate program runstraceandcostproduce structured provenance values- observability constructs are usable in at least three surface languages
Phase 10: Tooling and Positioning¶
Goal:
- align the public interface and developer experience with the new language
Tasks:
- add CLI support for semantic IR inspection
- add legacy vs core execution modes
- add
multilingual explainto describe what a program does and what capabilities it requires - add
multilingual costto estimate AI token usage before running - improve playground messaging and examples
- add language-server and diagnostics goals to the roadmap
- reposition examples and docs around AI, multimodal, concurrent, and reactive workflows
Suggested CLI additions:
multilingual irmultilingual explainmultilingual costmultilingual ui-previewmultilingual run --mode legacy|core
Suggested repository targets:
multilingualprogramming/__main__.pydocs/playground.mddocs/demos.md
Exit criteria:
- the project feels like a modern language platform rather than only a transpiler
multilingual explaincan describe any program's capabilities and AI usage in natural language
Recommended Near-Term Deliverables¶
The highest-value next steps are:
- land the 1.0 vision and core spec documents (this phase is complete)
- create semantic IR scaffolding in
multilingualprogramming/core/ - implement
fn,|>,?and register them in the USM for all 17 languages - implement
let/var,enum, records, andresult/option - make pattern matching substantially stronger, add
~=semantic match - define AI runtime abstractions (
prompt,think,stream,embed,@agent,@tool) before any provider-specific integrations - build reactive UI with
observe varon top of existing DOM groundwork - implement
par [ ... ]andspawnfor structured concurrent execution - implement
@swarmfor multi-agent coordination with shared tools - implement
memoryandtraceas observable, persistent language constructs
Flagship Examples for 1.0¶
The first public examples of the new direction should include:
- a reactive counter app (
examples/reactive_counter.ml) - a multilingual tool-using assistant written in three languages showing
identical semantics (
examples/agent_en.ml,examples/agent_fr.ml,examples/agent_ja.ml) - a typed invoice extractor from PDF using
generatewith a declared schema - an image captioning pipeline using multimodal
prompt - a retrieval-based question-answering example using
embedandnearest - a streaming chat UI showing a
streamexpression bound to a reactive view - a semantic intent classifier using
~=across multilingual user input - a parallel document analysis pipeline using
parwith three simultaneous AI operations (examples/parallel_analysis.ml) - a research swarm of three coordinated agents using
@swarm, written in Arabic, showing that multi-agent programs are as portable as single-agent ones (examples/research_swarm_ar.ml) - a long-running personal assistant that uses
memoryto recall user preferences across sessions (examples/persistent_assistant.ml) - an observable AI pipeline using
traceandcostto show provenance and token budgeting (examples/observable_pipeline.ml)
These examples should become the public face of Multilingual 1.0.
The most compelling demo is the agent swarm shown in three languages: it proves the core claim that Multilingual is the only platform where the same multi-agent, parallel, observable program is idiomatic in any human language.