Tya Roadmap

ROADMAP.md is the single source of truth for current TODO, TASK, and roadmap planning.

Pre-v0.1 planning documents and self-host migration notes are archived under docs/archive/pre-v0.1/. They are historical references, not current language or implementation authority.

Self-Host Invariant

The Tya-written compiler fixed point is a maintained invariant. Later language, runtime, CLI, stdlib, and documentation work must not regress selfhost/v01/compiler.tya.

Required evidence:

go test ./tests -run TestSelfhostV01Scripts -count=1

This gate proves that the Tya-written compiler can compile itself to stable stage-2/stage-3 C output, and that the self-hosted stage-2 compiler can compile and run representative programs through the maintained surface.

Current Direction

Tya is implemented as a small compile-to-C language. The latest released specification is v0.23. Frozen release documents live under docs/vX.Y.Z/ and docs/vX.Y/; the latest editable specification, API, stdlib, and naming documents live directly under docs/.

Tya uses semantic versioning. Specification changes happen at the minor version level, such as v0.23 and v0.24. Patch releases such as v0.23.1 must not change language or standard-library semantics.

Latest editable documentation:

  1. docs/SPEC.md
  2. docs/API.md
  3. docs/STDLIB.md
  4. docs/NAMING.md

The reference implementation is:

Go lexer
Go parser
Go AST
Go checker
Go C emitter
C runtime
specification tests

Go interpreter behavior, ASTMODE, and legacy archived node-string experiments are not specification authority. The maintained selfhost/v01/compiler.tya fixed point must not regress.

Implementation Tooling Policy

The compiler implementation should stay hand-written:

Go lexer
Go parser
Go AST
Go checker
Go C emitter

Do not add a parser generator or large grammar framework. In particular, avoid introducing Participle, goyacc, Pigeon, ANTLR, or Tree-sitter as compiler front-end authority. They may be useful references or future editor tooling, but the active compiler path should remain explicit Go code.

After the Go implementation reaches a complete lexer, parser, AST, checker, and C emitter for the current specification, continue self-host work in the same component order:

Tya lexer
Tya parser
Tya AST
Tya checker
Tya C emitter

Each Tya component must preserve the self-host fixed point before moving to the next component.

Use small test-support dependencies where they make the specification easier to verify:

github.com/google/go-cmp/cmp
github.com/rogpeppe/go-internal/testscript

Use go-cmp for readable token, AST, diagnostic, and generated-output diffs. Use testscript for CLI-level specification tests, especially tya run, tya build, expected stdout/stderr, and negative examples.

Current Roadmap

Verification Reference

Default verification:

go test ./... -count=1

Focused verification should prefer tests for the touched lexer, parser, checker, C emitter, runtime, examples, stdlib, or docs. The self-host fixed-point gate is part of the maintained project invariant and must stay green.