Sharpee
Chord / Vocabulary & Text / define phrase

define phrase

define phrase gives a phrase key one or more or-separated variants and a strategy for choosing between them, closing with end phrase. The strategy is the same five-name set as select <strategy>, because it is the same machinery: select chooses between statement bodies, define phrase chooses between texts.

define phrase parrot-chatter, randomly
  Polly wants a cracker!
or
  SQUAWK! Pretty bird! Pretty bird!
or
  Pieces of eight! Pieces of eight!
end phrase

Each variant is a prose block, the only form phrase text takes; the old same-line quoted and bare forms were removed. Blank lines inside a variant are paragraph breaks, and {br} still forces a hard line break.

A phrase header may carry a trailing while <condition> gate. This is mainly for description-marker phrases: the gate decides whether the fragment appears at all, live at render time. Here a keeper line only splices into the aviary description while the zookeeper is actually present:

define phrase keeper-note, cycling while the zookeeper is here
  where a keeper is refilling the feeders
or
  where a keeper is chalking today's talks on a board
end phrase

Fragments spliced into prose are written bare, with no leading separator and no trailing full stop. The platform owns the join: a marker mid- sentence joins with a comma, a marker after a sentence joins with a space. Writing the separator yourself earns a diagnostic.

The verbatim modifier (mutually exclusive with the strategies) exempts a phrase's text from whitespace collapse, preserving its exact line structure and relative indentation, for signs, verse, and ASCII where the layout is the point:

define phrase plaque-text, verbatim
  MACAWS OF THE AMERICAS
    donated by the Willowbrook Trust
  Please do not tap the glass
end phrase

A verbatim phrase can be spoken by a phrase statement but cannot splice at a description marker (analysis.verbatim-marker): its whole point is preserved line structure, which a mid-sentence splice would break.

A phrase key is a single kebab-case word; dots are illegal (ADR-254). To override the platform's own text for a standard action, a story uses an override message <alias> block (ADR-255), where the alias is the action name and message name in kebab-case, joined by a hyphen (taking-fixed-in-place). Every standard-action message has such an alias (the stdlib reference catalogs them entry by entry); an override message block replaces the platform default story-wide, for every entity, every time that moment renders:

override message taking-fixed-in-place
  It will not budge, and neither will anything else bolted to this place.
end override

Now every fixed-in-place refusal in the story speaks this line instead of the standard one. The per-entity routes still sit on top: an on clause's own refusal or a per-entity override speaks for its one entity, and the story-wide override message sets the default underneath them.

Everywhere a phrase key appears — refuse and refuse when, must … otherwise refuse, per-entity phrase headers, define phrases entries, and the blocked and deadly exit keys — the key is a single kebab-case word (dots are illegal, ADR-254). Overriding a standard-action message is done only through override message (ADR-255), never by naming a dotted id at one of these sites.