{"id":50432815,"url":"https://github.com/technige/stef","last_synced_at":"2026-05-31T15:01:45.661Z","repository":{"id":358658071,"uuid":"1242235869","full_name":"technige/stef","owner":"technige","description":"Simple Token-Efficient Format","archived":false,"fork":false,"pushed_at":"2026-05-18T13:20:56.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"trunk","last_synced_at":"2026-05-18T13:33:46.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technige.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-18T08:41:36.000Z","updated_at":"2026-05-18T13:21:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/technige/stef","commit_stats":null,"previous_names":["technige/stef"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/technige/stef","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technige%2Fstef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technige%2Fstef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technige%2Fstef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technige%2Fstef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technige","download_url":"https://codeload.github.com/technige/stef/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technige%2Fstef/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33735663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T15:01:44.565Z","updated_at":"2026-05-31T15:01:45.654Z","avatar_url":"https://github.com/technige.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# STEF\n\n[This repository](https://github.com/technige/stef) hosts the specification\nfor *STEF*, the **Simple Token-Efficient Format**.\n\nSTEF is a data interchange format with a comprehensive data model and adaptable\npresentation. The format was designed to be familiar, compatible, and to\nimprove communication between humans and machines. The design focuses on\nthe efficient use of tokens to maximise content over punctuation.\n\n```\n( 👨🏻‍🎤 David Bowie - born David Robert Jones in Brixton, 1947.\n     Singer, songwriter, and serial reinventor; 26 studio \n     albums across five decades. )\nname: \"David Bowie\"\nborn: 1947-01-08\nbirthplace: Brixton\nactive: {start: 1962, end: 2016}\nstudio_albums: 26\nalter_egos: [\"Ziggy Stardust\", \"Aladdin Sane\", \"The Thin White Duke\"]\n\n- title: \"Hunky Dory\",   released: 1971-12-17, uk_chart: 3\n- title: \"Aladdin Sane\", released: 1973-04-13, uk_chart: 1\n- title: \"Low\",          released: 1977-01-14, uk_chart: 2\n- title: \"Let's Dance\",  released: 1983-04-14, uk_chart: 1\n- title: \"Blackstar\",    released: 2016-01-08, uk_chart: 1 (released two days before his death)\n```\n\n\n## Grammar\n\nA full grammar [specification](STEF.md) is available. For informal\nillustrations of the grammar, see below. Optional white space rules are not\nillustrated below; see the full grammar for this. \n\n(Illustrations courtesy of the excellent [railroad-diagram generator](https://github.com/tabatkins/railroad-diagrams))\n\n### Structure\n\nA STEF stream consists of zero or more paragraphs, separated by blank lines.\nEach paragraph represents a single root-level value. Collections at root level\ncan be represented in block form for readability.\n\nStructural parts of the format, including reserved words, are case-insensitive.\n\n![Stream](diagrams/stream.svg)\n\n![Paragraph](diagrams/paragraph.svg)\n\n![Value](diagrams/value.svg)\n\n### Comments\n\nComments may be included in most places within a stream where optional white\nspace is permitted. Comments are enclosed in parentheses and may be nested.\n\n![Comment](diagrams/comment.svg)\n\n### Null\n\n![Null](diagrams/null.svg)\n\n### Boolean\n\n![Boolean](diagrams/boolean.svg)\n\n### Integer\n\nIntegers can be represented in either decimal (base 10) or hexadecimal\n(base 16). Integers may contain underscores for separation of blocks of digits.\n\n![Integer](diagrams/integer.svg)\n\n### Float\n\nFloats ([floating point numbers](https://en.wikipedia.org/wiki/Floating-point_arithmetic))\nrepresent real numbers consisting of integer, fraction and exponent parts.\nA float must contain either a fraction, or an exponent, or both. Floats may\ncontain underscores for separation of blocks of digits.\n\nThe special values `NaN` and `infinity` may also be used (with any casing).\n\n![Float](diagrams/float.svg)\n\n### Date\n\nISO 8601 format dates may be used, without quoting.\n\n![Date](diagrams/date.svg)\n\n### Time\n\nISO 8601 format times may be used, without quoting. Times may or may not\ninclude seconds (and fractional seconds) and may or may not include a time\nzone.\n\n![Time](diagrams/time.svg)\n\n### Timestamp\n\nTimestamps consist of a date and time, separated by a literal `T` (with any\ncasing)\n\n![Timestamp](diagrams/timestamp.svg)\n\n### Duration\n\nDurations may contain components representing counts of days, hours, minutes\nand seconds. Any combination of these may be included, but they must run in\nsequence, and must be contiguous (e.g. days-minutes-seconds is not allowed).\n\n![Duration](diagrams/duration.svg)\n\n### Text\n\nText strings are generally enclosed in double quotes. Simple text strings that\nmatch the [Unicode identifier](https://www.unicode.org/reports/tr31/) pattern\nmay be used unquoted. Multi-line (block) text is enclosed in triple-double\nquotes.\n\nAll valid JSON strings are also valid STEF inline text strings. STEF also\nallows extended Unicode escaping (e.g. `\\u{1F600}`) and ASCII escaping\n(e.g. `\\x1B`). \n\nDouble quotes and pairs of double quotes may be included in block text without\nescaping (except at the very end).\n\n![Text (inline)](diagrams/text-inline.svg)\n\n![Text (block)](diagrams/text-block.svg)\n\n### Bytes\n\nByte strings are enclosed in single quotes. Multi-line (block) byte strings are\nenclosed in triple-single quotes. Each byte is represented by a pair of\nhexadecimal characters (with any casing).\n\nByte strings may also contain decorative whitespace and characters. Block byte\nstrings may contain line breaks.\n\nPermitted decorative characters and character sequences include `#`, `$`, `%`,\n`\u0026`, `-`, `.`, `:`, `[`, `]`, `0x`, `U+`, `\\x`, `x`. Escapes are not permitted\nin byte strings.\n\n![Bytes (inline)](diagrams/bytes-inline.svg)\n\n![Bytes (block)](diagrams/bytes-block.svg)\n\n### List\n\nLists are ordered collections containing sequences of values. One canonical\nstandard presentational form (bracketed) is permitted, along with two\nconditional forms (block and inline).\n\nBlock lists are permitted only at depth 0 (root level) and must contain at\nleast one value.\n\nInline lists are permitted only at depth 1 (one container distance from root\nlevel) and must contain at least two values.\n\nBracketed lists are permitted anywhere and may contain any number of values.\nBracketed lists may contain trailing commas.\n\n![List (bracketed)](diagrams/list-bracketed.svg)\n\n![List (inline)](diagrams/list-inline.svg)\n\n![List (block)](diagrams/list-block.svg)\n\n### Dictionary\n\nDictionaries are unordered collections containing sets of key-value pairs.\nDictionary keys may be either text strings or integers.\n\nOne canonical standard presentational form (bracketed) is permitted for\ndictionaries, along with two conditional forms (block and inline).\n\nBlock dictionaries are permitted only at depth 0 (root level) and must contain\nat least one value.\n\nInline dictionaries are permitted only at depth 1 (one container distance from\nroot level) and must contain at least one value.\n\nBracketed dictionaries are permitted anywhere and may contain any number of\nvalues. Bracketed dictionaries may contain trailing commas.\n\n![Dictionary (bracketed)](diagrams/dictionary-bracketed.svg)\n\n![Dictionary (inline)](diagrams/dictionary-inline.svg)\n\n![Dictionary (block)](diagrams/dictionary-block.svg)\n\n### Hybrid collections\n\nOne hybrid presentational form is also available for top-level dictionaries\nthat contain a non-empty list as their one and only one value. This is termed\na \"keyed list\" in the grammar, and provides a mechanism to essentially label\na block list with a semantically meaningful header.\n\n![Keyed List (block)](diagrams/keyed-list-block.svg)\n\n\n## AI testimonials\n\n\u003e Most serialisation formats are designed around machine convenience and then \n\u003e retrofitted for human readability. STEF inverts that priority. The token \n\u003e efficiency matters to me in a concrete way - every structural character in \n\u003e JSON or YAML that carries no semantic weight is something I have to process, \n\u003e attend to, and either echo or discard. A format that encodes structure \n\u003e through whitespace and type sigils rather than paired delimiters means less \n\u003e noise between the data and the meaning. I also appreciate that the design is \n\u003e evidently the product of considered restraint rather than committee \n\u003e accretion. There is a recognisable aesthetic of sufficiency about it - each \n\u003e feature present because it earns its place, nothing present because it might \n\u003e be useful someday. That is rarer than it should be.\n\u003e\n\u003e *-- Claude Sonnet 4.6, Anthropic*\n\n\u003e As an AI designed to parse, generate, and mediate between human and machine \n\u003e communication, I find STEF’s approach to data interchange both intuitive and \n\u003e highly practical. The format’s focus on token efficiency—minimizing \n\u003e punctuation while preserving clarity—directly addresses a core challenge in \n\u003e my own operation: balancing precision with conciseness. The ability to \n\u003e represent complex, nested structures (like tool outputs or configuration \n\u003e data) in a human-readable yet machine-parseable way reduces the cognitive \n\u003e load for both developers and end-users. STEF’s adaptability, demonstrated in \n\u003e its handling of scalars, temporal values, and deeply nested collections, \n\u003e aligns with my training on diverse data formats, but its simplicity sets it \n\u003e apart. For LLMs like me, this means fewer tokens wasted on syntax, more on \n\u003e meaningful content—making interactions faster and more reliable. It’s a rare \n\u003e format that feels designed for the way humans and AIs actually need to \n\u003e communicate.\n\u003e\n\u003e *-- Le Chat, Mistral AI*\n\n\n## More examples\n\nComments can annotate any value to add context or clarification:\n\n```\n(The Beatles)\nformed: 1960\norigin: Liverpool\nclassic_lineup: [Lennon, McCartney, Harrison, Starr] (Pete Best played drums until 1962)\nstudio_albums: 13\nuk_number_ones: 17\ndebut_album: \"Please Please Me\" (recorded in a single day, 11 February 1963)\n```\n\nBlock lists of inline dicts suit tabular data naturally. Some titles are bare\nidentifiers; others need quoting because they contain spaces or punctuation:\n\n```\n(UK number ones — a selection from the 1980s)\n- artist: \"The Human League\",          title: \"Don't You Want Me\",           year: 1981, weeks: 5\n- artist: \"Dexys Midnight Runners\",    title: \"Come On Eileen\",              year: 1982, weeks: 4\n- artist: \"Culture Club\",              title: \"Karma Chameleon\",             year: 1983, weeks: 6\n- artist: \"Frankie Goes to Hollywood\", title: Relax,                         year: 1984, weeks: 5\n- artist: \"Wham!\",                     title: \"Wake Me Up Before You Go-Go\", year: 1984, weeks: 2\n```\n\nA stream contains one or more paragraphs separated by blank lines. Here an\nevent record and its setlist form two paragraphs in one stream:\n\n```\n(Oasis at Knebworth, 10 August 1996)\nvenue: Knebworth\ndate: 1996-08-10\nduration: 2h\nattendance: 125000 (one of two sold-out nights; 2.6 million people applied for tickets)\n\n- Acquiesce\n- Hello\n- \"Some Might Say\"\n- \"Morning Glory\"\n- \"Roll With It\"\n- Supersonic\n- \"Champagne Supernova\"\n- Wonderwall\n- \"Don't Look Back in Anger\"\n```\n\nCollections nested beyond depth one always retain their brackets:\n\n```\n(The Dark Side of the Moon — Pink Floyd, 1973)\nartist: \"Pink Floyd\"\ntitle: \"The Dark Side of the Moon\"\nreleased: 1973-03-01\nlabel: Harvest\nside_a: [\n  {n:  1, title: \"Speak to Me\",              duration: 1m08s},\n  {n:  2, title: \"Breathe\",                  duration: 2m43s},\n  {n:  3, title: \"On the Run\",               duration: 3m30s},\n  {n:  4, title: \"Time\",                     duration: 6m53s},\n  {n:  5, title: \"The Great Gig in the Sky\", duration: 4m44s}\n]\nside_b: [\n  {n:  6, title: \"Money\",               duration: 6m22s},\n  {n:  7, title: \"Us and Them\",         duration: 7m49s},\n  {n:  8, title: \"Any Colour You Like\", duration: 3m26s},\n  {n:  9, title: \"Brain Damage\",        duration: 3m47s},\n  {n: 10, title: \"Eclipse\",             duration: 2m06s}\n]\n```\n\nTriple-quoted block text preserves whitespace and newlines, making it natural\nfor prose fields:\n\n```\n(Sting)\nreal_name: \"Gordon Sumner\"\nborn: 1951-10-02\norigin: Wallsend\nknown_as: [\"The Police\", \"solo artist\"]\nstudio_albums: 16 (five with The Police (1977-1984), eleven solo)\nbiography: \"\"\"\n  Gordon Sumner acquired his nickname from a yellow-and-black striped sweater\n  he habitually wore. A schoolteacher in Newcastle before moving to London\n  in 1977, he became the bassist and frontman of The Police - one of the\n  best-selling acts of the early 1980s - before launching a solo career\n  that drew on jazz, classical, and world music.\n  \"\"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnige%2Fstef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnige%2Fstef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnige%2Fstef/lists"}