🚧 ATTENTION: GoMeta’s current docs & Co. are largely written by Claude due to limited resources and to get them done in time for JuliaCon2026.
They are quite comprehensive and mostly correct. However, even I get confused by them and the emphasis is often not where I would put it.
They will be updated gradually. For now, check out the JuliaCon slides here πŸ”—.
Skip to content

Mirrored reference

This page mirrors docs/SYNTAX-AND-SEMANTICS.md from the GoMeta.jl repository at 0.3.0, verbatim. File paths mentioned in it refer to a repository checkout.

GoMeta β€” Syntax & Semantics Reference ​

What this IS β€” the authoritative, verified reference for the GoMeta #~ metaLine syntax and its rendering semantics. What it DOES β€” defines every construct of the language and the rules by which GoMeta decides each line's fate, with every claim cited to a runnable example in this corpus and its captured output. REASONING β€” a metadata language is only as trustworthy as its ground-truth; prose drifts, rendered examples do not, so each rule here points at a file you can re-run and confirm. PURPOSE β€” one place a human author can learn GoMeta exactly, and verify it, before writing or changing a metaLine. (New to a term? Each is defined in the Glossary just below Β§0.)

Verification: every behaviour claim below is cited to the committed corpus in examples/ β€” a runnable input (InFileFolder/) and its committed rendered output (OutFileFolder/). Citations of the form Extended L7 mean line 7 of InFileFolder/file_for_Example_Extended.jl; β†’ Out means the rendered OutFileFolder/ counterpart. Structural claims (which block sits at which depth, what inherited what) are engine-verified: the shipped test suite pins every corpus render byte-for-byte, and run_examples.jl (repository root) re-runs and re-verifies the whole set locally (Β§12).


0. What GoMeta does (the mental model) ​

  • IS β€” GoMeta is an interpretable-metadata engine. A source file (here, .jl) carries ordinary content plus #~ metaLines. GoMeta absorbs the metaLines, evaluates which alterants apply to each piece of content, and a renderer applies the result. GoMeta evaluates; it never executes the file.

  • The pipeline β€” parse (BLS) β†’ absorb (read metaLines) β†’ evaluate (which alterants apply per component) β†’ render (apply Visib).

  • BLS parses a file into a tree of components: File β†’ Block β†’ Line β†’ Segment. A Block is the unit that carries metadata scope; it is typed Meta, Text, or Code.

  • The Visib (visibility) alterant decides each component's fate when rendered: show, hide, or discard.

  • Posture. Several behavioural surfaces are engine-defined at v0 (this reference marks them where they occur, and Β§13 collects them); the committed corpus is normative, and the golden test layer is the oracle β€” where prose and a committed render could ever disagree, the render wins.

Glossary (terms used throughout) ​

  • BLS β€” the Block-Line-Segment parser; it decomposes a source file into the component tree.

  • Component / Block / Line / Segment β€” the tree levels. A Line is one source line; a Segment is a substring within a line (e.g. the meta part vs. the trailing ## comment); a Block is a contiguous run of same-type lines and is the unit that carries metadata scope. Each is typed Meta, Text, or Code (a line is Meta if it starts with a DELIMITED #~ head β€” #~ followed by whitespace, a depth marker, or end of line; Code if it is executable source; Text otherwise. An undelimited #~hide is NOT Meta β€” see the token-delimiter law below).

  • metaBlock β€” a Block of type Meta; the unit that carries metadata scope for alterants. One or more contiguous metaLines form a single metaBlock (Β§3).

  • metaLine β€” a #~-prefixed line carrying metadata (labels + actions).

  • alterant β€” a directive GoMeta applies to a component: the Visib alterant (show/hide/discard), labels, and other engine actions (see Β§10 and Β§13).

  • cell β€” the component a verdict attaches to (a Block, a Line, or a Segment); its cell_handle is that cell's verbatim content bytes.

  • meta-hierarchy / slot β€” the engine's per-depth store of pending alterant actions: one slot per open depth, capacity 7 actions at v0.

  • verdict β€” a final evaluated alterant value for one cell.

  • State-refs β€” built-in predicates that query a BLS component's type/content (isCode, isText, isMeta, containsMeta), used inside conditions to decide whether an alterant applies (Β§6).

  • settribute β€” a component's flag record (its settings/attributes: e.g. depthN, isCode, the Visib verdict), carried per BLS component (componentSettribute in the source) and read by State-refs and the render. The coinage joins settings + attribute.

  • depth β€” a metaBlock's nesting level (1, 2, 3, …), set by tilde-count or a digit (Β§2); v0 supports depths 1 through 8, and the digit 0 addresses the file level β€” #~0 is accepted, not refused: it processes to PROCESS_OK with no diagnostic (the form is outside the committed corpus; the corpus is the reference β€” Β§13). Notation: depthN in backticks is the literal settribute flag; "depth N" in prose is the level; "depth-N" is its adjective form.

  • attachment β€” a content block is attached to the meta above it iff there is no blank line between them; an attached block inherits the open metaBlocks' alterants; a blank line detaches it (no inheritance) (Β§4).

  • metadata scope β€” the set of components that inherit a metaBlock's alterants, governed by depth + attachment.


1. The metaLine β€” anatomy ​

IS β€” a metaLine is a #~-prefixed line with up to three parts: an optional depth marker, the labels and actions, and an optional human comment. Its general shape:

#~[<depth>]  <labels and actions>   ## <human comment, ignored by the meta-parser>

([<depth>] is optional; if omitted, depth defaults to 1.)

  • The leading #~ (plus optional depth marker), followed by whitespace or end of line, identifies it as meta β€” the token-delimiter law below governs the boundary.

  • The middle carries labels (:labelN) and actions (discard{…} / hide{…} / show{…}), processed left to right (see Β§8 rule 4).

  • Anything after a ## on the same line is a human comment β€” the meta-parser ignores it. Cite: Extended L7 #~ discard{ :label2 , isCode} ## This is a comment within a meta Block. β†’ the ## … part has no effect.

MetaLines have three syntax forms β€” the standard metaLine on its own line (#~ / #~N / #~~~); the close-marker #] (Β§4/Β§9); and the inline #~ at the end of a content line (Β§9). Plus one modifier: the inert #~!, which makes a standard metaLine's content not be processed (Β§9).

⚠ Parsing gotcha: inside a single-hash # content line, any #~ token (any form β€” #~, #~N, #~!, #~~~, or an inline #~) and #] are parsed as live inline syntax (Β§9), not prose. To write GoMeta tokens in commentary, QUOTE-GLUE the metaStatement β€” the escape convention: write "#~ hide" with the quote hugging the marker. A quote-glued mention is inert (zero evaluations, byte-identical render): a token is only recognized after whitespace or at line start, so the glued quote blocks dispatch entirely. The one discipline: NO space between the opening quote and the marker β€” " #~ hide" (spaced) fires the inline scanner and refuses loudly. (Double-hash ## comments alone are NOT unconditionally inert: a whitespace-preceded #~ inside one still fires the inline scanner.)

String literals are NOT parsed. GoMeta reads a file as LINES; it never lexes the host language's string syntax. Inside a MULTI-LINE string a whitespace-preceded marker MID-LINE is LIVE β€” a trailing #~ hide comment-marks and #~ discard silently DELETES that line of string content from the share render. (A line BEGINNING with a marker is held by the string fence and stays inert; on a single-line string the closing quote poisons the body and the file refuses loudly.) The escape is the token-delimiter law itself: glue ANY non-whitespace character to the front of the # β€” "#~ hide", '#~ hide', a backtick, a period β€” a front-glued marker is never a token.

(Flavor-scoped bound β€” the :latex flavor (ships at 0.3.0): LaTeX verbatim environments are NOT fences β€” a %~ metaLine inside \begin{verbatim}…\end{verbatim} is LIVE (it mints, and a hide covers the following lines, the \end{verbatim} line included). The front-glue escape applies unchanged.)

THE TOKEN-DELIMITER LAW. Every marker token β€” the #~ family, the ## comment, the #] close, the # text lead β€” requires whitespace or a line boundary on BOTH sides of its head. The delimiter class is Unicode horizontal whitespace (ASCII space and tab, the no-break space, the CJK full-width space, and the rest of the \h class); line-break characters delimit as line boundaries, and zero-width format characters (U+200B and friends) are NOT whitespace and never delimit β€” though note that some characters IN the delimiter class (the no-break space foremost) render indistinguishably from an ordinary space while activating a token: only zero-width characters are guaranteed inert. A shape that fails the after-side β€” something##glued, #~someWord, #]x, ###banner, a bare #x β€” is plain content of its neighbourhood: not meta, not a comment, never refused, and it never splits the block it sits in. This is deliberate: someCharacters##someMoreCharacters is a valid thing to write in a file PRECISELY BECAUSE tokens demand their delimiters. The law gates token recognition only β€” a delimited token with a malformed body still refuses loudly (## is a comment exactly when BOTH sides delimit β€” whitespace or a line boundary before it, whitespace or end-of-line after it; ###-runs are content).

One carve-out from the plain-content rule: the four RESERVED structural-directive comment forms β€” #-, #+, #[, #>-initial, which fire on their prefix (so ordinary #---- dividers and #-> arrows are in the family) β€” are NOT plain content. They are parse-level structure hints held as reserved future GoMeta syntax: a directive-form line can start a new block, and, since 0.2.3, a directive form DIRECTLY adjacent to metadata meets a stable, early refusal instead of the earlier crash (both grains β€” with one measured corner: inside an OPEN multi-line string, #+/#> interior lines remain string content even directly after inline metadata, while the #-/#[ twins refuse; the escapes and the full behavior catalogue live in Public API + error modes Β§3.4). Away from metadata β€” at file start, between code lines, after an interposed content line β€” they behave as render-inert comments.


2. Depth ​

IS β€” every meta-block sits at a depth (1, 2, 3, …), analogous to heading levels (section, subsection). DOES β€” depth is set by the number of tildes, and an explicit digit overrides the count (the multi-tilde-plus-digit form, e.g. #~~3, is outside the v0 corpus; the corpus is the reference β€” Β§13):

WrittenDepthVerified by
#~1Extended L7/L8/L19, Proposal L1/L3
#~22Extended L18/L51, Proposal L9
#~33Extended L34, Proposal L22
#~~~3feature_triple_tilde.jl β€” engine-verified structure: its #~~~ block nests inside the depth-2 chapter (the tree golden pins the NESTING; the depth integer is the documented reading of the tilde count)

(#~2 itself shows the digit setting the depth β€” one tilde, digit 2, β‡’ depth 2. A multi-tilde-plus-differing- digit form, e.g. #~~3, is not exercised here β€” see Β§13.)

The authorable depth WINDOW at v0 is 1–8. In the digit depth form, #~9 and beyond is out-of-window and is a documented guarded edge (the E-06 row of docs/public-api.md Β§3.1: a stable refusal, not a crash) β€” do not author beyond depth 8.

REASONING β€” depth drives the open/close (scope) rules in Β§4 and Β§8, exactly like nesting headings. PURPOSE β€” lets one file express nested metadata regions.


3. Blocks β€” the unit of scope ​

  • Contiguous metaLines are ONE metaBlock β€” the engine-verified structure shows no block break in either depth direction. A later deeper digit is recorded only at the line level: the block's scope depth stays frozen at its first line's depth. Verified: feature_contiguous_metablock.jl (#~ hide{ :label1 } + #~2 :label1 render as one depth-1 block β€” engine-verified structure). A later shallower digit also stays in the SAME structural block; the corpus narrates it as the run's end marker ("This comment ends this meta Block at level 2", Extended L19), and it cancels nothing: Extended L18's labels reach both the attached code block (input L23) and a later text block (input L37), and L19's own hide{:label1} reaches later content too (input L45). Implicit close/supersede happens BETWEEN metaBlocks, not inside a contiguous run (Β§4).

  • A ## comment line between metaLines does not break the block. Cite: Extended L7–L10 are one meta block even though L9 is a ## comment ("The following meta Line within this Block…").

  • A block ends at: a blank line, a content line (type change), a #] close-marker, or a #~!.

  • A blank line after a meta line starts a new block (only Code and Text blocks may contain interior blank lines). Verified end-to-end by feature_contiguous_metablock_blankline.jl: inserting one blank line splits a contiguous meta-block into two and changes the render (Β§8).


4. The two axes β€” CLOSE (scope) and ATTACH (inheritance) are orthogonal ​

These are independent; keep them separate.

CLOSE β€” which meta-blocks are open (a stack by depth):

  • #] closes the innermost open meta-block; outer blocks stay open.

  • An implicit close happens when a following #~P has P ≀ N (the open block's depth) β€” it closes/supersedes (the P = N "sibling" case included); if P > N it nests inside (and inherits). Also closed by a blank line, a #~!, or end-of-file.

  • Verified: feature_explicit_close.jl β€” after #], the level-5 block still inherits the level-2 chapter (D hidden), proving the chapter stayed open (only the innermost level-4 closed). Implicit supersede: Extended L51 (#~2) supersedes the earlier #~3/#~2. (A CONTIGUOUS shallower line is a different case β€” it stays inside the same metaBlock and closes nothing; Β§3.)

Close vs rule lifetime β€” closing a metaBlock (blank line, #], #~!, end-of-file) ends its ATTACHMENT scope for following plain content in some forms, but does not retire alterant rules already absorbed: a standing conditional rule (hide{ :label1 }) is still evaluated against later matching content, and a later deeper metaBlock re-enters the hierarchy so earlier standing rules reach it β€” feature_contiguous_metablock_blankline.jl pins both (its blank line closes that block, yet line A, attached to the (now separate) :label1 block, renders hidden). The eviction side is the sibling rule: an implicit close by a following #~P with P ≀ N retires the superseded block's labels AND its standing rules for everything under the new block β€” a standing rule reaches later content only through DEEPER re-entry, never across a supersession (verified by a section-swap fixture in the development fork, outside this document's Β§11 proof set). #~! does not detach following content as #] does (Β§9). Unpinned shapes: the corpus is the reference (Β§13).

ATTACH β€” what a content block inherits:

  • A content block is attached (inherits the open metaLines' alterants) iff there is no blank line between the last metaLine and the block's first line.

  • A blank line detaches the next block (it inherits nothing). Cite: Extended L12–L16 is a text block that the blank L11 detached, so it does not inherit the L7 meta-block.

  • #] additionally detaches the single line immediately after it. Verified: feature_explicit_close.jl line C (right after #]) is shown (inherits nothing) while the later level-5 block is hidden.

The proof these are orthogonal: in feature_explicit_close.jl, C is shown (attach severed) yet D is hidden (scope resumed) β€” one #], two independent effects.


5. Labels ​

  • IS β€” labels are accumulative tags a metaLine applies to the content in its scope. Label names are validated in BOTH roles against the engine's closed whitelist β€” the corpus-documented set :label1 … :label5 plus, since 0.3.0, a fixed pictograph vocabulary (byte-exact names like :πŸ’‘, :πŸ”₯; the refusal message lists the full accepted set): applying a label from outside the whitelist AND querying one in a condition each refuse with a stable message naming the accepted set (a condition-side label after an already-winning true atom in a ,/|| chain is not queried β€” short-circuit β€” and in a region that carries no labels at all, the query is never consulted and simply evaluates false).

  • Conditional application β€” :labelN{ condition } applies the label only to components satisfying the condition. Cite: Extended L8 #~ :label1{ isText && containsMeta } β€” :label1 reaches only text that contains meta; Proposal L3 #~ :label1{ (isText && containsMeta), isMeta }.

  • Worked contrast β€” conditional label vs conditional action (two different uses of "condition"): :label1{ isText && containsMeta } is a conditional label β€” it decides which components receive :label1. discard{ :label1 } is a conditional action β€” it decides when the discard fires on a :label1-bearing component. In short: a label-condition asks where to apply the label; an action-condition (Β§6) asks when to fire the action.

  • Labels are how conditions (Β§6) and Visib actions (Β§7) select what they act on.


6. Conditions / predicates ​

Conditions guard alterant actions (discard{…}/hide{…}/show{…}) and conditional labels (:labelN{…}).

SECURITY β€” conditions run in GoMeta's own closed interpreter. The {…} body is parsed and evaluated by the engine itself (a bounded grammar over label and state queries) β€” it never reaches Julia's eval in a default-configured run, so a condition cannot execute code or have effects. The explicitly opt-in :full_eval_v1 extension mode is the one documented exception (host evaluation β€” only process trusted input with it loaded). Full posture: the README's SECURITY section and docs/public-api.md Β§3.2.

The operators (all verified against the corpus):

OperatorMeaningVerified by
,ORExtended L7 discard{ :label2 , isCode} β€” discard if :label2 or isCode
&&ANDExtended L8 :label1{ isText && containsMeta }
!NOTExtended L18 show{ !:label5} β€” show only if :label5 is not present
()groupProposal L3 :label1{ (isText && containsMeta), isMeta }

Precedence of un-parenthesized mixed operators (e.g. a && b, c) is engine-defined and not exercised by this corpus β€” do not rely on it; always use explicit () to make intent unambiguous, as Proposal L3 does. (See Β§13.) Tokenization note: keep a space after a grouping ) before the next atom or operator, as the corpus does (Proposal L3) β€” a ) glued directly to a following atom tokenizes engine-defined at v0. (Outside {}, on the metaLine itself, a token glued to a closing )/} refuses β€” docs/public-api.md Β§3.4.)

State-refs read the BLS component's type/content: isCode, isText, isMeta, containsMeta. Verified:

  • isCode β€” the Code block (Extended L20–L32) is discarded by discard{ :label2 , isCode} (L7) specifically because it isCode (it does not itself carry :label2; it carries :label3/:label5 from L18).

  • isText && containsMeta β€” the text block (Extended L35–L49) receives :label1 from :label1{ isText && containsMeta } (L8).

  • isMeta β€” Proposal L3 :label1{ (isText && containsMeta), isMeta }.

(containsText exists as a BLS attribute but is not used as a condition predicate anywhere in this corpus β€” see Β§13.)


7. The Visib alterant and its actions ​

  • IS β€” Visib is the alterant that decides rendering. Its actions are mutually exclusive: show, hide, discard. The default is show.

  • Render outcomes (verified across the whole corpus):

    • show β†’ the line is kept verbatim.

    • hide β†’ the line is kept but prefixed with ## (commented out). Cite: Extended L14 #~ hide β†’ β†’ Out L14 ## # This Line….

    • discard β†’ the line is omitted entirely. Cite: Extended L15 #~ discard β†’ absent from output ("Input line 15 will be missing").

  • A metaLine is itself subject to Visib β€” a metaLine that carries a hidden/discarded label is itself hidden/discarded (e.g. Extended L51 #~2 :label2 is discarded along with its markdown).

  • When a block is hidden, every NON-EMPTY line in it carries the ## marker β€” a single-hash # content line becomes ## #; a double-hash ## comment ALREADY heads with the marker and renders AS-IS (ensure-token β€” no ## ## doubling; dated true-up 2026-08-12 for 0.3.0, superseding the 0.2.3 doubling behavior); an EMPTY line inside the hidden block stays a bare empty line (the marker applies to non-empty lines only). Cite: in the hidden text block of Extended, the # content lines (L35–L38) β†’ ## #, the ## narration (L46–L49) stays ##, and the blank L40 stays blank. (A ## comment is still subject to Visib β€” narration meant to stay visible must live in a block that is not itself hidden. Metadata is ALIVE in the render β€” a stated design property: hide is a VISIBILITY operation, so a hidden metaLine's rendered form ## #~ … re-parses on re-ingestion (at segment grain β€” same liveness, shifted scope) and re-processing a share render re-yields verdicts; DISCARDED metadata is absent from the render and therefore gone. One carve-out: a hidden metaLine that re-ingests as a ## comment INSIDE a live meta block reads as block commentary β€” inert by the same rule that makes ## comments inert between metaLines. Choose discard when metadata must not survive the share.)


8. The semantic model β€” four rules (each verified by render + structure) ​

  1. Contiguous metaLines = one structural block. A later deeper digit is line-level only (scope depth = the first line's; feature_contiguous_metablock.jl); a later shallower digit marks the run's end and cancels nothing β€” L18's labels still reach the attached and later blocks, and L19's own hide action does too (Extended L18–L19; input L23/L37/L45).

  2. Between metaBlocks, P ≀ N closes/supersedes; P > N nests + inherits. (feature_explicit_close.jl; Extended L51.) This is the CLOSE/scope axis; whether a following content block's content inherits is the separate ATTACH axis of Β§4 β€” a blank line detaches it regardless of depth.

  3. A block inherits the open shallower-depth scopes (their labels and standing conditions). (Extended: the code block and the markdown both inherit the file-level L7 rule; the text block inherits L8's :label1 and L19's hide{:label1}.)

  4. Order-of-application β€” left-to-right within a metaLine; a standing condition reaches later blocks. Tokens on a metaLine are processed left-to-right; a condition issued before its label is evaluated with that label not yet applied, so it does not fire on the content attached to that same block β€” but the condition stands, and does fire on later blocks that come to carry the label. Verified two ways:

  • feature_order_of_application.jl β€” discard{:label1} :label1 leaves the block shown (condition before label); swapping to :label1 discard{:label1} discards it.

  • Extended L34 #~3 discard{:label4} :label4 β€” the block L35–L49 is not discarded (label4 not yet applied when the condition was issued); but L39, whose trailing inline #~ re-applies :label4, is discarded β€” the standing discard{:label4} fires there.

A vivid consequence, verified by a pair of committed examples: in feature_contiguous_metablock.jl the same hide{ :label1 } leaves line A shown (A is attached to the same block where the rule preceded the label) yet hides a later block B that inherits :label1. In feature_contiguous_metablock_blankline.jl β€” the sibling fixture whose byte-identical metaLine pair has one blank line inserted between the two metaLines (its narration text differs) β€” both flip (A hidden, B shown), because the blank line splits one block into two and drops :label1 from depth 1 to depth 2. One blank line, two flips, two reasons.


9. Special metaLines ​

  • #~! (inert) β€” the metaLine's content is not processed; it also ends the metaBlock (the next content attaches per Β§4, unless a blank line detaches it). Cite: Extended L10 #~! discard{ isMeta } β€” the discard{isMeta} is not applied (the surrounding meta lines are not discarded), purely because of the !.

  • #] (close-marker) β€” see Β§4 (the two axes). Demonstrated end-to-end in feature_explicit_close.jl.

  • inline #~ β€” a #~ at the end of a content line applies meta to that line. The corpus exercises three inline forms (other inline forms, e.g. inline labels or depth markers, are not exercised β€” see Β§13):

    • #~ hide / #~ discard hide/discard the line (Extended L14/L15, Proposal L7, markdown Proposal L34).

    • #~ show overrides an inherited hide so the line stays visible (Proposal L30 β€” a line inside an otherwise-hidden block that renders shown).

    • a bare trailing #~ re-applies the meta context to the line, which can make a standing condition fire on it (Extended L39, discarded as shown in Β§8 rule 4).


10. Alterant actions and their arguments (v0 forms) ​

IS β€” an alterant ACTION token may carry a parenthesized, comma-split argument list β€” action(arg1, arg2) β€” parsed with the metaLine and handed to the action when it fires. DOES β€” the v0 forms, each engine-verified:

  • Labels (the : action) β€” documented, both forms: repeated one-word labels (#~ :label1 :label2) AND the parenthesized list (#~ :(label1, label2)) are equivalent; each label is checked against the closed whitelist, in both the label-setting and the condition-query roles (an unknown label refuses with a stable message where the query is consulted β€” docs/public-api.md Β§3.4).

  • Id actions (cell / parent / file) β€” EXPERIMENTAL at this release: one integer value argument (#~ cell(7)), Int16 domain. The Id alterant is a v0 placeholder implementation; this syntax may change β€” do not build durable content on it at v0.

  • Visib actions (show / hide / discard) take NO arguments; an empty list (hide()) is accepted as the bare form.

  • Malformed arguments (wrong arity; non-parsable or overflowing values) refuse with the stable message GoMeta apply: invalid arguments … β€” never a raw stack trace.

  • Condition-side atoms ({ cell(7) }-class queries inside {}) route through the closed condition intake instead: non-label arguments meet the typed argument-domain refusal there, and the BARE unqueryable atom is the E-07 pending-mint edge (docs/public-api.md Β§3.2/Β§3.4).


11. Worked examples (the proof set) ​

ExampleProves
file_for_Example_Extended.jldepth 1/2/3; ,/&&/! conditions; #~!; inline #~ hide/#~ discard/#~; blank-line detach; inheritance (file-level rule β†’ code + markdown); order-of-application; implicit close; hide=## / discard=omit / default=show
file_for_Example_Proposal_JuliaCon.jl() grouping; hide{…,isCode}; show{!:label5}; conditional :label1{…}; inline #~ show overriding inherited hide; depth 2/3; markdown hide
feature_explicit_close.jl#] β€” the two axes (close-innermost scope + detach-next line), independent
feature_order_of_application.jltoken order on a metaLine decides whether a condition sees a label
feature_contiguous_metablock.jlcontiguous metaLines = one block (depth = the first line's); cross-block order-of-application
feature_contiguous_metablock_blankline.jlthe contiguous-metablock metaLine pair with one blank line inserted between them β€” flips both content lines (proves blank-line block-splitting; the metaLines are byte-identical across the two fixtures, the surrounding narration is not)
feature_triple_tilde.jl#~~~ = depth 3 (tilde-count), with a depth-3 block nesting in a depth-2 chapter

12. Verify it / extend it ​

Run, from the repository root (after Pkg.instantiate()):

julia --startup-file=no --project=. run_examples.jl

It processes every input in examples/InFileFolder/, writes each rendered output to a scratch folder (printed; pass --out <dir> to keep them somewhere specific), and verifies every render byte-for-byte against the committed examples/OutFileFolder/ reference. To test a hypothesis, copy or edit an input, rerun, and READ the resulting render (an edited input reports as differing from the committed reference β€” that difference is the observed effect). Every rule above cites its committed example.


13. Out of scope / not exercised by this corpus ​

To keep the verified claims honest, these are known but not established here β€” do not assume their behaviour:

  • Alterant actions beyond Visib + labels. The engine's action whitelist also contains head (the Heading action) and cell, file, parent (the Id actions). The Id actions' v0 argument forms are documented in Β§10 (EXPERIMENTAL); their rendering behaviour is not exercised by this corpus and is not documented here.

  • Section-title metaLines (#~2 "Title" β€” a first-token quoted string lowering to the head action, recorded as evaluated head_<level> entries with no render effect): documented with their refusal family in docs/public-api.md Β§2/Β§3.4; not exercised by this corpus.

  • containsText is a BLS component attribute but is not used as a condition predicate in any example (only containsMeta is) β€” treat it as unverified-as-a-predicate.

  • Operator precedence for un-parenthesized mixed conditions (Β§6) β€” use explicit ().

  • Digit-vs-tilde-count conflict. A multi-tilde form carrying a differing digit (e.g. #~~3) is not exercised; #~2/#~3 (one tilde + digit) are.

  • ## and inline #~ in the same # content line β€” their parsing interaction is not exercised.

  • Multi-line detachment after #] β€” #] is verified to detach the immediately-following line; whether it detaches multiple consecutive plain lines is not exercised.

  • Multiple Visib actions in one metaStatement (e.g. discard{…} show) β€” resolved by THE FIRST APPLICABLE VALUE IN SOURCE ORDER: the first value whose condition holds (no condition = holds) wins and the remaining values are skipped without evaluating their conditions. discard{ isCode } show therefore discards code and shows everything else. (The corpus itself does not exercise a same-statement pair whose second value would apply; the first-wins rule above is the contract.)

  • Engine limits β€” metaLines live in comments (#/##), not as executable code. The label whitelist is closed: the corpus-documented :label1..:label5 plus (since 0.3.0) the fixed pictograph vocabulary β€” byte-exact names, no normalization β€” and label names are validated against it in BOTH roles β€” applying a label and querying one in a condition each refuse with the stable GoMeta apply: unknown label … message, which names the accepted set (a condition-side label after an already-winning true atom in a ,/|| chain is not queried β€” short-circuit β€” and in a region that carries no labels at all, the query is never consulted and simply evaluates false). At most 7 actions accumulate per meta-hierarchy slot (exceeding it refuses with a stable message β€” see docs/public-api.md Β§3.4). The authorable depth window is 1–8 in the digit form (Β§2). Custom label names in either role (where the query is consulted β€” docs/public-api.md Β§3.4), and predicates outside the state-ref/action whitelists, are refused.

Status: this is the verified working reference for the v0 subset of the GoMeta language. The language grows by design; the v0 subset forecloses none of it.