""" TD Lang — Domain-specific language for Time Dilation project. Compiles .td files into Python code that calls td_fuse. Write simple scripts instead of complex Python. Architecture: td_lang/ ├── __init__.py <- This file ├── __main__.py <- Entry point for python -m td_lang ├── grammar.py <- Lark grammar + parse tree transformer ├── ast_nodes.py <- Dataclass AST nodes for each command ├── compiler.py <- AST -> Python code generation ├── executor.py <- Run compiled code, track lineage ├── cli.py <- Command-line interface ├── errors.py <- Custom exceptions └── examples/ ├── demo_merge.td <- Basic merge example ├── demo_heal.td <- Merge + heal example ├── demo_full.td <- Full pipeline with gates + budget ├── demo_loop.td <- Self-improvement loop example ├── demo_phase3.td <- Fork/edit/prune/reset example └── demo_phase4.td <- Contracts + snapshot + report example Phase 1: load, merge, heal, eval, commit Phase 2: diagnose, synth, train, debate Phase 3: fork, reset, prune, edit Phase 4: snapshot, report, data_contract, reward_contract Phase 5: CLI polish, --version, info command, --verbose Phase 6: fuse, absorb (easy merge) Phase 7: repeat, if/else (loop control) Phase 8: setup, on_error, notify, save (autopilot) Phase 9: schedule (time-based execution) Phase 10: download, log, compare, verify (toolbox) Phase 11: vote, prompt, distill, rollback (intelligence) Phase 12: curriculum, star, best_of, exploit (RL & fine-tuning) Phase 13: arena (real RL with memory, curiosity, anti-lying, cross-check) Engine upgrades: QLoRA training, self-contained eval, model-generated synth problems Mega diagnose: self-diagnosis + domain profiling + layer speed testing Designed from interviews test_14 (10 commands) and test_17 (ForgeSpec 2.0). """ from .grammar import parse_td_file, parse_td_string # noqa: F401 from .compiler import compile_program # noqa: F401 from .executor import TDExecutor, check_td_file, compile_td_file, run_td_file # noqa: F401 __version__ = "0.2.0" __author__ = "Milan (TD Project)" __all__ = [ "parse_td_file", "parse_td_string", "compile_program", "TDExecutor", "check_td_file", "compile_td_file", "run_td_file", "__version__", "__author__", ]