cosmoes.org

thym.cosmoes.org · specification · v0 · one line per section

Thym 0: the MacroCOSM language, its compiler and its runtime

Version 0 of the language, written 2026-11-01 for enough 0.5.0

Outline

  1. Contents — every section of this specification, in order
  2. How to read this — the rule words, the family of words, and what a block promises
  3. 1 Provenance and the name — where Thym comes from, how it is said, and who keeps it
  4. 1.1 Lineage — MacroCOSM OES 0.0.1 gave enough one grammar for volumes of items
  5. 1.2 The name — Thym is said THIGH-m
  6. 1.3 Stewardship — The owner of enough keeps this specification
  7. 2 The model on one page — programs compose moves over typed values; a compiler plans; a runtime runs and traces
  8. 3 The design rules — seven rules every choice in this document answers to
  9. 4 Programs: the language — the file, its blocks, its heads and statements, and the grammar in full
  10. 4.1 The file — A program file has the extension .thym
  11. 4.2 Blocks — A file holds four kinds of top-level block, each closed by end
  12. 4.3 Heads — A head is a line at the start of a block, before any statement
  13. 4.4 Statements — Statements, in Programs: the language
  14. 4.5 Expressions and modifiers — An expression is a move call, a name, a literal, a field read
  15. 4.6 Literals — Literals, in Programs: the language
  16. 4.7 Keywords — Every keyword is a FEED headword or a form of one
  17. 4.8 The grammar in full — MOVENAME is a name that a manifest or a move block declares
  18. 5 Values and types — documents typed by density, each carrying what it was made from
  19. 5.1 The types — The nine meaning types are text fabula short atem item volume morph graph package
  20. 5.2 Densities and what fits where — The four densities, text, fabula, short and atem, are types
  21. 5.3 Provenance — Every meaning value a move makes carries the move, its inputs' digests, the run
  22. 5.4 Bindings — let binds a name once, in the block where it appears
  23. 6 Moves — the primitives: a signature, an asks flag, a contract, and the MiniCOSM that owns each
  24. 6.1 What a move is — A move is one step, a transcoding or a transcognition, with four parts: a signature
  25. 6.2 Who declares what — Section 17.6 gives the moves: block that declares them
  26. 6.3 The standard moves of version 0 — Each contract below is the contract: list of the move's declaration
  27. 6.4 Signatures in the manifest — A move's declaration is one mapping in a moves: list (section 17.6)
  28. 7 Contracts and the six laws — named checks on a move's output, six of which every implementation keeps
  29. 7.1 What a contract is — A contract is a list of named checks that must hold on a move's output…
  30. 7.2 The six laws — The six laws, in Contracts and the six laws
  31. 7.3 The named checks — The named checks, in Contracts and the six laws
  32. 7.4 assert — An assert line adds a check of the program's own
  33. 8 Control flow, bindings, user moves, use — one choice, one loop, one output; moves that call moves; files that lend their moves
  34. 8.1 Choice and loop — if … then … else … end chooses
  35. 8.2 Three ways out — give gives the block's value, and every path of a block that gives must reach…
  36. 8.3 User moves — A move block is a named program with parameters
  37. 8.4 use — A use line stands outside every block, usually just after the version line
  38. 9 Errors: compile, plan, run — three kinds at three times, each refusing whole, each with the line
  39. 10 Programs as documents — a program enumerated into items, read at three densities, compiled back byte for byte
  40. 11 The compiler — seven stages, each refusing whole, ending in items and a plan a person can inspect
  41. 11.1 The stages — The nodes of a plan come in evaluation order
  42. 11.2 The package — enough/thym/ is one Python package
  43. 11.3 The command line — Every command reads ENOUGH_THYM_ROOT (default ~/enough/thym/) for where runs live
  44. 12 The runtime — a plan walked in order; the model as a contracted coprocessor; every run traced and replayable
  45. 12.1 Execution — run takes a plan and the program it was made from
  46. 12.2 The coprocessor — One interface; three implementations in enough; any number elsewhere
  47. 12.3 Traces — A run writes one thym/1 volume of kind trace
  48. 12.4 Replay — run --replay <run-id> runs that run's plan with the ReplayCoprocessor
  49. 12.5 Budgets and the 16 GB rule — A plan carries the largest prompt it will build
  50. 12.6 Portability — No Python-only semantics
  51. 13 The null morph, the ten scales, morphs — the plainest telling as the reference, and a morph as a measured departure from it
  52. 13.1 The null morph — The null morph is Thym's reference telling of a fabula
  53. 13.2 The ten scales — Each scale is an integer from 1 to 5
  54. 13.3 Measurement — Ratios are per hundred or per thousand words, compared as integers
  55. 13.4 Holomorph and isomorph — A holomorph is measure t against null of f
  56. 13.5 Morph blocks and morph items — A morph may be declared by hand in a program file, one scale per line
  57. 14 Readings — someone else's fabula told in your morph: local, labelled, never the source
  58. 15 Packages — the self-contained export of a text, in a folder, in one file, or encrypted
  59. 15.1 Folder form — <name>.thym/ (a folder; a program is a file of the same suffix, <name>.thym…
  60. 15.2 The catalog — The catalog, in Packages
  61. 15.3 Single-file and encrypted forms — package lands the single-file form, with the folder form <name>.thym/ beside it
  62. 15.4 The laws of a package — The author's text is the package's telling as told
  63. 16 Context — the volume a text lives in, and the occasion it is read on
  64. 16.1 Surrounding context — The surrounding context is the volume a text sits in
  65. 16.2 Occasional context — The occasional context is just-in-time
  66. 17 The thym/1 MiniCOSM and the moves: block — the MiniCOSM that holds programs, morphs, contexts, plans, traces and packages; and how any MiniCOSM declares moves
  67. 17.1 The catalog — A thym/1 volume is one file
  68. 17.2 The modules and their kinds — Kinds are unique across the modules, as in every MiniCOSM
  69. 17.3 Ids and the fields of each kind — <module>:<kind>/<slug>, with the slug grammar of doc/1
  70. 17.4 Checks — The envelope checks the generic reader runs, and six of thym/1's own, which enough/thym runs
  71. 17.5 Renderers — program (the file compiled back; lens {kind: short, order: told}), plan
  72. 17.6 The moves: block — Any MiniCOSM's manifest may carry a moves: list
  73. 18 Projections: the dial as a program — an isotype is a holotype transcoded by a program whose contracts are the target schema's rules
  74. 19 Agent-free — with the agent off, only deterministic plans run, and scaffolds stand in where they are honest
  75. 20 Conformance — what a compiler and a runtime must do, and the suite that shows it
  76. 20.1 A compiler must — A compiler must, in Conformance
  77. 20.2 A runtime must — A runtime must, in Conformance
  78. 20.3 The suite — tests/fixtures/thym/ in enough-dev, portable as a folder together with tests/fixtures/cosm/, MacroCOSM's own corpus
  79. 20.4 Where the reference wins — The reference landed on 2026-11-01 and passed checkpoint A
  80. 21 Decisions in this version — the decisions version 0 settled, one numbered line each
  81. 22 Open questions and roadmap — what version 0 leaves for the round, and what waits for a later version
  82. Colophon — Written 2026-11-01 for enough 0.5.0, version 0 of the language

Glossary

a company (Comprise)
a company (Comprise), called holotype in the files — defined in How to read this
a person (Ascribe)
a person (Ascribe), called holograph in the files — defined in How to read this
compile
a parse error (parse); a version line that is not thym 0 (version) — defined in §9 Errors: compile, plan, run
holomorph
measure t against null of f, for a person's text t with fabula f — defined in §13.4 Holomorph and isomorph
isomorph
a holomorph the owner chose to share — defined in §13.4 Holomorph and isomorph
null morph
Thym's reference telling of a fabula — defined in §13.1 The null morph
occasional context
just-in-time: why this text, for whom, in what medium, at what moment, under what constraints — defined in §16.2 Occasional context
plan
a model-backed node while agent-free (agent-free, section 19); a prompt the machine's model cannot hold — defined in §9 Errors: compile, plan, run
reading
read f with m in c: a telling of a fabula in the reader's morph — defined in §14 Readings
run
a model-backed output that still fails its contract after narrow repair and its budget… — defined in §9 Errors: compile, plan, run
surrounding context
the volume a text sits in — defined in §16.1 Surrounding context
Thym
said THIGH-m: thigh with an m on the end, after Fukuyama's thymos — defined in §1.2 The name