Draconyx

The programming language for AI authors.

Draconyx: the programming language built for the machines that write your code.

Python, Rust and Go were designed for a human at a keyboard. Draconyx was designed for the model in the loop: errors that come back as data, edits addressed by name and checked before they land, laws that are checked, not trusted, and every global a function reaches printed in its outline.

The problem

Every other language was built for humans

Models now write code by the million lines, and they don't work like people. In the spec's words, a language model does not read documentation and then write correct code: it generates, observes and repairs, hundreds of times, unattended.

Python, Rust and Go hand that agent error text or half-structured JSON, make it patch files by string match, and route it through tooling built around an editor cursor. Every fix for that lives outside the language: a flag, a server, a sandbox. In Draconyx, the agent's interface is in the spec.

Draconyx flips it. What the AI author needs is the language: “not leniency but a fast, precise, machine-readable verdict.” The compiler never calls a model, and its agent daemon is a deterministic oracle: same tree, same answer, every time.

Spec references

01-vision:71, 01-vision:79, 26-agent-interface:92-141

The loop

Built for generate, check, repair

A model doesn't read the manual and then write correct code. It iterates, hundreds of times. Draconyx turns every step of that loop into a machine-readable contract.

  1. GenerateThe model writes one definition, addressed by its name.
  2. CheckThe whole program is checked before a single byte lands.
  3. VerdictErrors come back as data: a stable code, exact spans, ranked fixes.
  4. RepairThe model applies the fix, or reads the counter-example a law produced.

Head to head

Draconyx vs. the languages your agents write today

Built in, not bolted on.

CapabilityDraconyxPythonJavaKotlinC#C++RustGoSwiftZigElixirHaskellMojo
Every error has a code and an explain entry, with JSON repair edits from the compiler itself.built innopartly or via an add-onpartly or via an add-onpartly or via an add-onpartly or via an add-onpartly or via an add-onnopartly or via an add-onnonopartly or via an add-onno
Edits addressed by definition name, type-checked before they're written.built innononononononononononono
Compiler-computed map of the globals each function reaches, through the whole call chain.built innononononononononononono
Model output typed untrusted at its standard-library source.built innononononononononononono
Algebraic laws property-tested by default by the compiler's own test command.built innononononononononononono
Named arguments required at every multi-argument call of a declared function by its name.built inpartly or via an add-onnonononononopartly or via an add-onnononopartly or via an add-on
Mutation and moves spelled in the argument list of every call.built innononopartly or via an add-onpartly or via an add-onpartly or via an add-onnopartly or via an add-onpartly or via an add-onnonopartly or via an add-on
Missing and redundant match arms both rejected, on every match.built innopartly or via an add-onpartly or via an add-onpartly or via an add-onpartly or via an add-onpartly or via an add-onnopartly or via an add-onbuilt innopartly or via an add-onno
Deterministic agent protocol: same source tree, byte-identical answers.built innononononononononononono
Ownership and borrows checked at compile time, with no tracing garbage collector and no lifetime annotations.built innononononopartly or via an add-onnopartly or via an add-onnononopartly or via an add-on
Why “partly”? The fine print, language by language.

Python

  • Named arguments required at every multi-argument call of a declared function by its name: The author can opt in with keyword-only parameters after a bare * (PEP 3102), and calling them positionally is then a TypeError. But that is opt-in, and the error comes at run time, not compile time.

Java

  • Every error has a code and an explain entry: javac has stable internal diagnostic keys (e.g. compiler.err.cant.resolve), shown with -XDrawDiagnostics, but has no explain command and no machine-readable fixes. Quick-fixes come from IDEs (Eclipse JDT problem IDs, IntelliJ).
  • Missing and redundant match arms both rejected: Switch expressions and pattern switches must be exhaustive over enums and sealed types (compile error). Dominated case labels and duplicate constants are compile errors too.

Kotlin

  • Every error has a code and an explain entry: K2 diagnostics have internal names such as UNRESOLVED_REFERENCE. The documented -Xrender-internal-diagnostic-names flag prints them alongside warnings, and @Suppress and -Xwarning-level accept warning names. kotlinc has no explain command and no machine-readable repair edits; quick-fixes come from the IDE, not the compiler.
  • Missing and redundant match arms both rejected: A when used as an expression must be exhaustive on any subject (a compile error otherwise), and since Kotlin 1.7 a when statement on an enum, sealed or Boolean subject must be too. A when statement on other subjects, such as Int or String, can leave cases out. Duplicate conditions and a redundant else only get warnings.

C#

  • Every error has a code and an explain entry: Every Roslyn diagnostic has a stable CSxxxx ID, and analyzers/code fixes ship in the SDK (dotnet format applies them). There is no built-in explain command; explanations live in the docs on learn.microsoft.com.
  • Mutation and moves spelled in the argument list of every call: ref/out (and optionally in) must be written at the call site. Mutation through reference-type arguments and receivers is unmarked, and there is no move semantics.
  • Missing and redundant match arms both rejected: A subsumed/unreachable arm is an error (CS8510 in switch expressions, CS8120 in switch statements). A non-exhaustive switch expression is only warning CS8509, even over the union types C# 15 added, and switch statements get no exhaustiveness check.

C++

  • Every error has a code and an explain entry: There is no single reference compiler. MSVC gives errors stable codes (C2065, C2440...) with an online docs entry for each, but it has no built-in explain command. Clang and GCC emit machine-readable fix-its (clang -fdiagnostics-parseable-fixits; GCC -fdiagnostics-format=json/sarif), but GCC and Clang errors have no stable numeric codes.
  • Mutation and moves spelled in the argument list of every call: To move from a named lvalue you must write std::move/std::forward at the call site. Moves of temporaries and return values are implicit, and std::move is only a cast, so a moved-from object stays usable. Mutation through a non-const reference parameter or a method receiver is not marked.
  • Missing and redundant match arms both rejected: A duplicate case label in a switch is always a compile ERROR. A missing enumerator in an enum switch is a warning (-Wswitch, on in -Wall) and becomes an error only by opt-in (-Werror=switch).

Rust

  • Every error has a code and an explain entry: Many rustc errors carry stable E-codes with rustc --explain, and --error-format=json emits suggestions marked MachineApplicable, which cargo fix / cargo clippy --fix apply. Not every diagnostic has a code: many errors and all lints lack E-codes.
  • Mutation and moves spelled in the argument list of every call: &mut buffer is written at the call site for free-function args. Moves are not marked, and method calls auto-borrow &mut self without a marker.
  • Missing and redundant match arms both rejected: A non-exhaustive match is a hard error (E0004) on every match. Unreachable or redundant arms only trigger the warn-by-default unreachable_patterns lint (an error only with deny/-D warnings).
  • Ownership and borrows checked at compile time: Use-after-move and aliased &mut are rejected statically, with no tracing GC. But Rust has lifetime annotation syntax ('a), so it meets two of the three conditions.

Swift

  • Every error has a code and an explain entry: Swift 6.1/6.2 diagnostic groups (e.g. [#StrictMemorySafety]) have names and documentation pages, but most errors have no code. Fix-its are built in and can be exported in machine-readable form (serialized diagnostics, -emit-fixits-path).
  • Named arguments required at every multi-argument call of a declared function by its name: Argument labels are required by default at every call, but the author can opt out per parameter with _.
  • Mutation and moves spelled in the argument list of every call: & is required at the call site for inout. consume (SE-0366) is optional. Mutating method calls on receivers are not marked.
  • Missing and redundant match arms both rejected: A non-exhaustive switch is a compile error. A duplicate or unreachable case is only a warning ('case is already handled by previous patterns').
  • Ownership and borrows checked at compile time: Swift uses ARC, not a tracing GC. It has no stable lifetime syntax (@lifetime for ~Escapable is still experimental). ~Copyable types reject use-after-consume statically.

Zig

  • Mutation and moves spelled in the argument list of every call: Zig parameters are immutable, so a caller has to write &x at the call site to let a callee mutate a local, much like Rust's &mut. Method receivers auto-take the address, an already-held pointer passes unmarked, and moves don't exist.
  • Missing and redundant match arms both rejected: On an enum or tagged-union switch, a missing prong is a compile error, so is a duplicate prong, and so is an else prong once every case is handled. (Integer switches need an else.)

Haskell

  • Every error has a code and an explain entry: Since 9.6, GHC tags most diagnostics with [GHC-nnnnn] codes, and -fdiagnostics-as-json emits them, but GHC ships no explain command. The Haskell Foundation's separate error index documents only about 130 GHC codes, and the JSON hints are prose strings, not machine-applicable repair edits.
  • Missing and redundant match arms both rejected: -Woverlapping-patterns (redundant arms) is on by default and -Wincomplete-patterns (missing arms) comes with -W or -Wall, but both are warnings; rejecting a match takes -Werror or -Werror=incomplete-patterns.

Mojo

  • Named arguments required at every multi-argument call of a declared function by its name: Mojo supports Python-style keyword-only parameters (after * in the signature), so an author can opt in to required labels, as in Python. The default is optional, so Mojo scores the same as Python.
  • Mutation and moves spelled in the argument list of every call: Ownership transfer is written buffer^ at the call site, but passing to a mut parameter is unmarked.
  • Ownership and borrows checked at compile time: Static move and borrow checking (use-after-move, argument exclusivity, and reference-invalidation diagnostics in 1.0), ASAP destruction with no tracing GC, but explicit origin parameters (Mojo's lifetimes) exist. That is two of three.

Why Draconyx

Nine unfair advantages

Real mechanisms, each one enforced by the toolchain.

01Ships today

Errors are data. Not prose.

Every checker emits one Diagnostic value: a stable AXnnnn code, byte-precise spans, an explanation, and suggested edits. Each edit carries an applicability (always or maybe), can carry also spans that apply all-or-nothing across files, and, where the checker knows it, a consequence: the fact about the program that the edit makes true.

When a name, a label or a field doesn't resolve, the spec's “hallucination contract” requires ranked candidates to come back as maybe edits. A model repairs from data instead of parsing prose. drx explain answers for every code the toolchain can emit, and a test enforces it.

Ships today: the JSON channel, the ownership checker's two-file edits with consequences, ranked candidates (by fit at the use site, then edit distance, then import cost) for unknown names, labels and fields, explain for all 262 catalogued codes.

Elsewhere: rustc's JSON has applicability but no per-edit consequence, and many diagnostics have no code. CPython's “Did you mean” is prose. Go's compiler errors carry neither codes nor edits; fixes come from gopls.

Spec references

25-tooling:8-45, 25-tooling:84-123, 25-tooling:188-210, 26-agent-interface:620-645

$ drx check pkg --json
{"code": "AX0234", "severity": "error",
 "message": "unresolved name `add_amount`",
 "primary_span": {"file": "src/money.ax", "start": [9,5], "end": [9,15],
                  "bytes": [192,202]},
 "secondary_spans": [],
 "explanation": "a name resolves lexically: enclosing bindings, ...",
 "suggested_edits": [{"span": {..., "bytes": [192,202]},
   "replacement": "add_amounts", "applicability": "maybe",
   "description": "replace `add_amount` with `add_amounts`",
   "consequence": "`add_amounts` names the def `pkg.money.add_amounts`"}],
 "help": ["did you mean `add_amounts`?"]}
Real compiler output, trimmed.
02Ships today

Edit by name. Never by line number.

The agent daemon addresses code by qualified name (inventory.reprice), never by file and line. Writes are transactional: a write may carry the tree hash it was based on, and if the tree has moved, it is refused with the current hash and the current text.

A fragment that doesn't parse never reaches the tree. The whole program is checked before a write is installed, so a batch that adds new errors is refused whole. The formatter splices canonical bytes and re-parses its own output. A failed check replies in the same shape as a success, with an applied flag, the tree hash, the diagnostics and an impact diff, so the agent never needs a second query to learn what its edit did.

Ships today in drx serve and drx rpc. The daemon re-reads the workspace before every write, so a write whose base predates an edit made outside it is refused, and it stages every changed file before replacing any. A write adds the plain use line a new name needs in the same transaction, and nested members (variants, operations, laws) are spliced canonically by name.

Elsewhere: Python, Rust and Go define no such write interface. Agents patch text by string match, diff hunks or range-keyed LSP edits. Codemod tools (LibCST, rust-analyzer SSR) are add-ons with no tree-hash precondition, no type check before the bytes land and no impact report.

Spec references

26-agent-interface:95-99, 26-agent-interface:188-196, 26-agent-interface:669-776, 32-agent-conformance:1106-1131, 25-tooling:881

$ drx rpc . put-def '{"address": "inventory.reprice",
    "base": "deadbeef", "text": "\"\"\" ... \"\"\"\nreprice(...) -> Int: ..."}'

# the workspace moved since `base`: refused, with the current text
{"code": -32000, "message": "the workspace has moved since `base`",
 "data": {"kind": "conflict", "detail": {"base": "deadbeef",
   "current_tree": "def6ed83...", "addresses": ["inventory.reprice"],
   "current": [{"address": "shop.inventory.reprice",
     "text": "\"\"\" Raises `price` by `pct` percent.\n\n    * price: the price to raise\n    * pct: the percentage to raise it by\n\"\"\"\nreprice(price: Int, pct: Int) -> Int:\n    price + price * pct / 100\n"}]}}}

# a write that fails the check: same shape as success, nothing written
{"tree": "def6ed83...", "applied": false, "new_errors": 1,
 "diagnostics": [{"code": "AX1001",
   "message": "type mismatch: expected `Int`, found `String`"}],
 "impact": {"broken_consumers": [{"address": "shop.inventory.reprice",
   "codes": ["AX1001"]}]}}
Daemon replies, abridged (hashes trimmed, fields elided; the definition's text shown in the current doc syntax).
03Ships, with gaps

An unset global is a build error.

A $ name is a global variable, declared in a module. The standard library's console and clock come with their value, so print("Sold.") and now() need no binding. A global such as std's $logger: any Log comes with none: the program binds it once, by its path, as in log.$logger: FileLog = FileLog(path = "shop.log"), and any function then reaches it with nothing passed. A library asks for what it needs as a concept, as in a field database: any SqlDatabase.

The compiler works out which globals each definition reaches, through callees and function values. A global with no value that code reaches and no root binds, where a root is main or a test, is compile error AX0501, naming the whole call chain, and drx outline prints the globals each definition reaches.

Ships today: the analysis behind AX0501, with call chains through callees and function values passed to a standard function such as map, and the globals each definition reaches in the outline. Not built yet: globals declared in a module, with a value or without, a binding by the global's path, and the standard library's console and clock as globals.

Elsewhere: In Python, Go and Rust a global that nobody set is found only when the code runs: Python's module-level None, Go's nil package variable and Rust's empty OnceLock fail at the first use, and no compiler lists the globals a function reaches.

Spec references

12-services-di-permissions:278-322, 12-services-di-permissions:122-145, 12-services-di-permissions:184-195, 12-services-di-permissions:401-414, 09-modules:441-500, 26-agent-interface:316-340

$ drx check plan

 ERROR   src/main.ax, line 10

    main() -> None:
    ^^^^

main reaches the global shop.$sales, but it has no
value and no root binds it.

main calls run_generated_plan on line 11, which calls
sell on line 8, which uses $sales on line 19 of
src/shop.ax.

Bind it in main, as in
shop.$sales: FileLedger = FileLedger(path = "sales.log").

(AX0501. For more, run: drx explain AX0501)

1 error in 1 file. The package was not built.
The report for a global with no value that no root binds.
04Ships, with gaps

Prompt injection meets the type checker.

Tainted<T> is a type of the standard library. Model completions, console input, network reads and process arguments are Tainted at their standard-library signatures, and nothing becomes Tainted on its own: the program marks its own text with taint. A Tainted value where a plain type is expected is compile error AX1001, as any value of the wrong type is, and every parameter that steers what the program does is such a position: a prompt's instruction, SQL identifiers, the folder a file system is narrowed to.

Code outside the standard library cannot open a Tainted, so the only way out is validate, into a refinement type: the same type with a named rule, as in type Email extend String when email_is_valid. So every place untrusted text becomes trusted is one call you can grep for. How it checks the value is under Safety and effects, in the validate card.

Ships today: the sources marked untrusted, including started programs and sandboxed and isolated foreign calls; the check at every argument, field, return, binding and collection element; the prompt-instruction barrier; and validate as the way out. Not built yet: Tainted<T> and Secret<T> as types of the standard library, taint and keep_secret, and AX1001 as the report.

Elsewhere: Python, Go and Rust treat model output as a plain string. A newtype can imitate a taint marker by convention, but the standard library never marks its sources and nothing makes code go through the check. Python's LiteralString and Java's Error Prone @CompileTimeConstant let a checker demand program-written text at a chosen sink, but nothing marks where outside text comes from. Other defences are runtime libraries or separate analysers such as CodeQL and Semgrep.

Spec references

12-services-di-permissions:599-658

""" Builds a prompt that wrongly makes the email its instruction.

    * email: the email, as received
"""
hijacked(email: Tainted<String>) -> Prompt:
    prompt(instruction = email, data = [])  // AX1001: expected String, found Tainted<String>

""" Builds a prompt that asks for a summary, with the email kept as data.

    * email: the email to summarize
"""
summarize(take email: Tainted<String>) -> Prompt:
    prompt(instruction = "Summarize the message.", data = [take email])
The `Tainted` email as the instruction is compile error AX1001; kept as data, it is allowed.
05Ships today

Laws are checked. Not trusted.

Concepts carry algebraic laws as syntax, and a law with no mode is checked. drx test synthesizes a property test for it, draws inputs from a fixed seed, shrinks any failure to a minimal counter-example and records it in a regression file that later runs replay first. A violation fails the run, and a release build refuses to build until every checked law passes. Skipping a law takes an explicit trust, and the test run reports each trusted law as unverified.

A type is a member of a concept when it has the concept's functions; laws say how those functions must behave. A violation names the values that break the law and every place in the package that relies on it. An obligation the toolchain could not evaluate is reported as a “coverage shortfall” naming its cause, never as a pass, and fails the run unless --allow-unsupported is given; a todo() body gets its own UNIMPLEMENTED verdict instead of a fake failure.

Ships today: drx test and drx verify run every checked law, example and test and report the values that break a law, a release build proves the laws marked proven or refuses to build, and the violation report names each place resting on the law and offers exactly two repairs.

Elsewhere: Python, Rust and Go state laws like Ord/Hash consistency only in documentation; the compiler never sees them. Property testing is a third-party library (Hypothesis, proptest) or, in Go, stdlib testing/quick and fuzzing, and someone must restate each law as a test by hand.

Spec references

13-law-verification:4-96, 13-law-verification:339-363, 13-law-verification:524-539, 10-abstractions:83-102, 10-abstractions:230-252

""" Values with an `add` that can be regrouped and a `zero` that changes nothing. """
concept Monoid<T>:
    add(left: T, right: T) -> T
    zero() -> T
    law associative(left: T, middle: T, right: T) checked:
        add(left = add(left = left, right = middle), right = right) == add(left = left, right = add(left = middle, right = right))
    law identity(value: T) checked:
        add(left = value, right = zero()) == value

""" Finds the middle value of `values` once they are sorted.

    * values: the values, in any order
"""
median(values: List<Float>) -> Float:
    todo()  // verdict UNIMPLEMENTED, not a failure

example median(values = [1.0, 3.0, 2.0]) == 2.0
A concept with two checked laws, and an example on a function whose body is `todo()`.
06Ships today

Every named call tells the truth.

Named arguments are mandatory whenever a declared function with two or more arguments is called by its name; an unlabelled one is AX0256 unless it is a name matching its label, and the error lists the callee's labels. Ownership is spelled at both ends of a call: unmarked is read-only, borrow is exclusive mutation, take consumes, and a function written with auto takes whichever verb the caller spells. A wrong verb is AX0306, a consumption left unspelled is AX0321, and using a value after it moved is AX0312.

Called by its name, a declared function can't have its arguments swapped by position, a mislabelled argument shows on the call line, and a mutation or consumption the argument list doesn't spell won't compile, so an agent reads what happens to each argument from the call alone. The exception is a pipeline: a stage may borrow the value piped into it and mutate it without borrow being written, though it consumes a named value only when take is.

A function's signature is its name, its parameter names and types, their ownership and its return type. So write(borrow shelf: Shelf, title: String) and write(borrow printer: Printer, title: String) live side by side, in one module or two, and each call picks by what it spells: no numbered names, and no guessing by position.

Ships today: all four diagnostics.

Elsewhere: Rust and Go have no named arguments, so resize(height, width) compiles and looks right. Python's keywords are optional unless the author opts in. Rust marks &mut but not a move, and method calls auto-borrow their receiver unmarked. Go passes slices, maps and pointers unmarked while the callee mutates through them.

Spec references

05-syntax-conventions:3-4, 04-core-language:290-311, 04-core-language:1992-2004, 04-core-language:2030-2046, 04-core-language:2127-2162, 07-memory-model:376-413

open(url: String, timeout: Duration) -> Connection
close(take conn: Connection) -> None
send(borrow conn: Connection, request: Request) -> None

""" Opens a connection to `address`, sends `ping` once and closes it.

    * address: the address to connect to
    * ping: the request to send
"""
ping_once(address: String, ping: Request) -> None:
    conn = ^open(url = address, timeout = seconds(5))    // a failure goes up to the caller
    ^send(borrow conn, request = ping)                    // mutation is spelled here
    close(take conn)                                      // consumption is spelled here
    close(take conn)                                      // AX0312: use of moved value `conn`
What happens to each argument, and which calls can fail, read off the call lines.
07Ships today

No exceptions. No missing arms. No mercy.

There are no exceptions and no try/catch. The signature says what a function gives; the body says how it fails, with fail, and the compiler infers what it fails with. Every call that can fail is marked: handled on the spot by arms in a match that name its failures, or passed up with a prefix ^. A panic is for bugs only, nothing catches it on the spot, and every operation that can stop the program has a total twin that gives no value instead.

Each kind of value is its own type, and a function that handles several kinds is written once for each. Values of different kinds stand side by side as any T, and putting a kind into any T when a function called on those values has no version for it is error AX0420, reported right there and naming the function and the type. A redundant match arm is error AX0602, not a warning. An agent sees every call that can fail where it is made, and gets an exact to-do list for any kind it missed.

Ships today: AX0420 for a kind with no function, and AX0602 for a redundant arm.

Elsewhere: In Python and C++ exceptions are invisible in signatures: you meet them in production. Go hands you err and hopes you check it. Rust comes closest, but catch_unwind can catch a panic on the spot, and an unreachable arm is only a warn-by-default lint. In Draconyx a redundant arm is a hard error.

Spec references

04-core-language:612-650, 11-type-system:133-138, 11-type-system:591-657, 11-type-system:1216-1297

use console.print

""" A payment the bank has not answered yet. """
type Pending

""" A payment the bank has set aside. """
type Authorized:
    amount: Money

""" A payment given back to the customer. """
type Refunded:
    reason: String
    amount: Money

""" Writes a pending payment's state on the receipt.

    * payment: the pending payment
"""
label(payment: Pending) -> String:
    "pending"

""" Writes an authorized payment's state on the receipt.

    * payment: the authorized payment
"""
label(payment: Authorized) -> String:
    "authorized {payment.amount}"

""" Writes the state of every payment of the day on the receipt.

    * payments: the day's payments
"""
receipt(payments: List<any T>) -> None:
    for payment in payments:
        print(label(payment))

main() -> None:
    receipt([Pending(), Refunded(reason = "damaged", amount = Money(cents = 1200))])
    // Error AX0420 on the line above: `Refunded` is put into `any T`, but no `label` takes a `Refunded`.
A forgotten kind is a compile error that names it.
08Ships today

Same tree, same answer. Every time.

drx serve is a local JSON-RPC 2.0 daemon. Every response is a pure function of the toolchain hash, the lockfile and the source-tree hash, and carries that tree hash; the one exception is a verify cut short by its time budget, and the response says so. Lists paginate deterministically and are never silently truncated, and errors carry a stable kind that code can branch on.

Each definition is hashed over its typed core: comments, layout and local variable names leave the hash unchanged, while count * 2 becoming 2 * count moves it. The daemon holds no ambient authority, and its handshake lists everything it can reach.

Ships today.

Elsewhere: pyright, rust-analyzer and gopls speak LSP: definitions addressed by file and cursor, per-document versions but no whole-tree hash, no byte-identical guarantee, no authority model. rust-analyzer routinely runs cargo, build scripts and proc macros.

Spec references

26-agent-interface:30-79, 26-agent-interface:138-186, 25-tooling:786-791, 32-agent-conformance:468-489

→ {"jsonrpc": "2.0", "id": 1, "method": "initialize"}
← {"jsonrpc": "2.0", "id": 1, "result": {"protocol": "jsonrpc-2.0/ndjson",
   "toolchain": "1f80fbc8e1c003a0...", "tree": "1902a039f0cc11b1...",
   "methods": ["audit-trust", "call-path", "callees", "delete-def", "delta-card", ...],
   "authority": ["read: the workspace source tree",
     "read: the synthesized standard library",
     "write: workspace source under the package root",
     "write: derived state under the package root's .draconyx/ (law verdicts, compiled summaries)",
     "no network", "no home directory", "no process spawning"]}}
Real daemon handshake, abridged.
09Ships today

Every surprise in the language, on one 2,000-token card.

Draconyx doesn't wait for models to learn it from the internet: the toolchain brings the knowledge straight into the context window, in name-shaped, budgeted pieces. outline gives each definition's signature, derived facts such as uses and needs, its evidence line and the first line of its documentation. slice returns the minimal reading set for editing one definition and degrades deterministically to fit a token budget (docs first, then private helper signatures, never public ones); search returns ranked results that paginate deterministically.

Two hard-capped cards brief an agent directly: the delta card, at most 2,000 tokens, lists where the language departs from what a model expects; the resume card lets an agent pick up work where it left off.

Ships today: outline, slice, search, delta-card and resume-card as daemon methods. Every card is measured over its own text with the pinned reference tokenizer, o200k_base: the delta card comes to 1,057 of its 2,000 tokens.

Elsewhere: Assembling context is the agent framework's job (repository maps, embeddings, file reads); the language defines no briefing format and no token budget.

Spec references

26-agent-interface:254-274, 26-agent-interface:317-363, 26-agent-interface:516-525, 26-agent-interface:146-150, 26-agent-interface:931-982, 26-agent-interface:1086-1098, 26-agent-interface:379-396

The whole language

Built for agents. Complete for everything else.

One language from the type system to the cluster: ownership without a garbage collector, concepts with laws, structured concurrency, remote values, a numerical core. Every card says exactly where it stands.

Types and algebra

ShipsConcepts: named, but never declared

Write the functions and the type has the concept. No impl blocks, and no two modules can give one type two meanings.

Partly builtSignatures: arguments by name, not by position

A signature is a function's name, its parameter names and types, their ownership and its return type. A call names its arguments, so it reads like the declaration, two arguments can't be swapped unnoticed, and functions of one name need no numbered variants.

ShipsAlgebraic laws as code, property-tested by default

In C++ and Rust, associativity is a line in the docs. In Draconyx it is a law line in a concept, and a type that breaks it fails drx test with a shrunk counter-example.

ShipsDispatch on what a type can do

Write one function with an arm for each concept. The compiler picks the arm by the functions a type has, and checks that the arms cover every type the function takes.

ShipsGenerics that infer the hard parts

Variance and const-generic shapes are worked out by the compiler, not annotated by the model.

Partly builtCalling itself unchanged is a build error

A function that calls itself with its parameters unchanged, by its name or through its operator (left - right inside sub), is a build error on any path, even when another path ends. Recursion with changed values is allowed. Rust, Swift and Clang (with -Wall) warn only when every path calls itself; Java never warns.

Memory and ownership

ShipsOwnership spelled at both ends

Every handover at a call is written where the value is given and again where it is taken, so a model never has to guess who owns what.

ShipsBorrow checking with zero lifetime syntax

Rust-grade memory safety without a single 'a: you never write a lifetime, and the compiler works out every one.

ShipsViews inferred, not annotated

Put a borrow in a type with fields and the type becomes a safe view on its own: no keyword, no lifetime parameter.

ShipsNo garbage collector, deterministic drops

No tracing GC and no pauses: each value is freed the moment its last owner lets go.

Concurrency and distribution

ShipsData-race freedom by construction

No annotations to write: sendability is inferred from the ownership authorities you already write, and it decides what may cross a task boundary.

ShipsStructured concurrency

Several tasks run together through an ordinary standard-library function that takes the functions to run. The first failure stops the rest.

ShipsMove-only channels and a fair, replayable select

Every message exists in exactly one place at a time, and select timeouts run on a Clock you can fast-forward in tests.

ShipsActors and let-it-crash supervision

Erlang-style actors under supervision trees that restart what crashed, with no exceptions anywhere.

ShipsRemote values that cannot hide the network

In Draconyx a network call never looks like a local call: remote is in the type, and reading a remote value as if it were local is a compile error.

Partly builtBundled distributed runtime

Cluster membership and failure detection are in the standard library: a program starts a ClusterNode with the discovery it chooses, such as LanMulticast, a DNS name or a list of seeds, and CRDTs are ordinary types: no ZooKeeper, no Consul, no sidecar.

In the specRaft consensus as an ordinary type

Replicated<T, n> keeps a value on a quorum of n nodes with linearizable reads and writes, inside the program: no external coordinator.

Partly builtLive code swap in development, with checked state migration

In development, a running program loads a new version of a module beside the old one. The swap point is proven safe, state is handed over as a linear move, and migrations are functions the compiler checks. Release builds restart instead; the unikernel never swaps.

ShipsNative binaries

drx build produces a native executable through the Rust bootstrap compiler's own code generator. The spec names one back end for the language, LLVM: dev and test builds run it without the optimizer, release and proof with it.

Partly builtAn LLVM back end written in Draconyx

A code generator written in the language itself that lowers checked programs to LLVM, so that the compiler can build itself, and every program, with no Rust inside.

In the specUnikernel and WebAssembly targets

The same source targets a unikernel that needs no OS underneath, or a WebAssembly module.

Safety and effects

Partly builtTainted: a typed defense against prompt injection

Model output, console and network input, the command line, a started program's output, and sandboxed and isolated foreign calls give a Tainted value, and the program's own text becomes one only through taint. Passing one to a plain parameter, or to a prompt's instruction slot, is compile error AX1001.

In the specvalidate: the way out of Tainted is a check

validate lets a Tainted value into a refinement type, such as type Email extend String when email_is_valid, only by running its named rule. A failure is handled on the spot; for a type with fields or a call, Invalid lists every field or parameter that failed, with each type's doc as its message.

Shipstrust blocks: unsafe code, held to seven powers

Draconyx has no unsafe. trust unlocks exactly seven operations the compiler cannot check, such as calling a trusted function, making a raw pointer or reading through one with @pointer, and nothing else: inside a trust: block, ownership and borrow checks still run. drx audit trust lists every trusted block with its module, location and code hash, and the doc of the function around it says what it vouches for.

ShipsWith blocks: one keyword for receiver, destructuring and scoped release

One with covers Python's context managers, Rust's RAII and multi-value destructuring, even at the end of a pipeline.

AI and numerics

ShipsShapes and named axes in the type

A tensor's dtype, axis names and sizes belong to its type, so a tensor passed where a signature declares another shape fails at compile time, before any array is allocated.

Partly builtgrad and vmap as typed function transforms

Autodiff and auto-batching are plain functions over functions, and drx tune and drx bench search, measure and pin a schedule.

In the specjit: captured and fused array code

jit is a function transform in the same family as grad and vmap: it captures a computation as a lazy array graph and fuses it, and it composes with both.

In the speccomptime: a call the build runs

The word comptime before a call makes the build run it, with all it calls, and the word stands nowhere else. A comptime call can give a value, a type, a type's fields, a function's parameters or new declarations, each checked as if it were written. Inside one, types, functions and modules are values that std's reflect describes, and code can be read but never built, so there are no macros. A library can check an SQL query written as a template, an interpolated string whose values are kept apart, while the program builds, as SQLx does for Rust.

Second opinions

Six AI models read the spec

We gave the Draconyx specification to six AI models and asked them the same questions. None knew who was asking.

DeepSeekDeepSeek

“Draconyx is the most complete and intellectually serious language specification I have ever read.”

GeminiGoogle

“On paper, [Draconyx] takes direct aim at Rust's steepest learning curves.”

GrokxAI

“This is one of the most ambitious, coherent language designs I’ve seen in years.”

Kimi K3Moonshot AI

“This is a 522-page act of unusually disciplined ambition: the best-conceived ‘AI-native language’ design I’ve seen…”

Muse SparkMeta

“Draconyx is the most intellectually serious ‘universal language’ attempt since Rust…”

QwenAlibaba

“It is a masterpiece of language design on paper.”

The name

Dragon claw, written law

Draconyx (“dragon claw”) is a Late Jurassic ornithopod dinosaur from Portugal: a real creature.

Its first half, Latin draco from Greek drákōn, is also the name of Draco, who around 621 BC gave Athens its first written laws: rules set down in public for every citizen to read, instead of kept and interpreted by a few. That is the idea here, laws written in the code and enforced by the machine.

Athens inscribed its laws on rotating wooden tablets called axones. When Draco's homicide law was republished in 409/8 BC, the stone copy was headed “first axon”. Draconyx source files end in .ax.

And yes, draconian: about correctness, so your agents don't have to be.

Source: Attic Inscriptions Online, ML 86: decree to republish Draco's law on homicide.

Status

Where it stands

As of 15 November 2026.

Specification
32 sections, a 733-page PDF with 668 code blocks that the corpus tool pulls into the compiler's tests.
Toolchain
Lexer, parser, resolver, type checker, ownership checker, interpreter with law runner, canonical formatter, agent daemon and native code generation.
Agent daemon
36 JSON-RPC methods, among them outline, get-def, slice, search, who-calls, what-breaks-if, put-def, put-defs, fork, verify, delta-card and resume-card.
Diagnostics
262 codes, each with an explain entry; a test enforces the coverage.
Self-hosting
The lexer, parser, resolver, type checker and ownership checker are written in Draconyx itself, about 90,000 lines. As of 12 November 2026 each one gave the same output as its reference implementation on the whole shared test corpus. The binaries drx build makes come from the Rust bootstrap compiler's own code generator.
Native code
drx build compiles a package to a native binary that prints and exits exactly as the interpreter runs it, on all 159 back-end unit programs.
Design record
439 design rulings ratified into the spec; five example packages, among them an online shop, event sourcing and FlashAttention, a gallery of 20 common patterns written beside Rust, C++, Zig, Java and Elixir, and a 4,925-line standard library generated from the spec.
Release
In development, first commit 20 July 2026. The first public release is the first compiler written entirely in Draconyx.

From the blog

Notes on Draconyx

Why the language works the way it does, one article at a time.

Should a sale save itself, or should a repository or a database save it? A class-based language makes every function answer a second question on top of which module it goes in: which object owns it. C++, Java and even Rust, through its impl blocks, ask it. Draconyx keeps structure in types and behaviour in free functions whose calls name every argument, so no argument is the owner and the question does not come up.

In 1996 the first Ariane 5 rocket was lost, half a billion dollars by media reports, because a number assumed to fit in 16 bits did not, and the check that would have caught it had been left out to save time. Design by contract writes such an assumption down, but checks it while the program runs, where it can be switched off. In Draconyx it is a rule on a type, proven when the program is built, so flight software written in Draconyx has no rule checked in flight and nothing to switch off.

Stay tuned

The dragon is hatching. Be first to know when Draconyx launches, and hear about every new feature the moment it lands. Updates only, straight from the source. One click to leave.

We send a confirmation link first. Nothing arrives until you click it.

Get in early

Want in early? For design discussion, collaboration, or to train or evaluate models on Draconyx, email us.