Runtime semantics
Glue vs keywords, sharing toys, greedy trait, all trait effects, pronouns, mood.
Rules that are easy to miss from grammar alone. For writing stories, see Writing stories.
Story glue vs keywords
| Kind | Examples | Behaviour |
|---|---|---|
| Story glue | is, has, my, the, stash, pile, … | Ignored unless heard |
| Stash slots | first, second, last, … | Heard keywords. Used in stash grammar |
| Control flow | when, if, then, while, bury | Must lead the line (except otherwise when …) |
Inside "quotes" | anything | Printed text only |
Branch grammar: Control flow.
Sharing toys
When dogs share toys (no stash), toys are split with integer division. Any remainder stays with the giver.
Example: labrador has 7 toys and shares with beagle and husky (3 dogs):
| Dog | Toys after share |
|---|---|
| labrador (giver) | 3 (2 + 1 remainder) |
| beagle | 2 |
| husky | 2 |
Stash sharing round-robins items and clears the stash. Grammar: Share, pass, tricks.
Story syntax: her cookie jar holds …, she whimpers as she wants the first biscuit from her cookie jar, her cookie jar is empty.
Greedy trait
Default: after 3 feeds, gulps, or shares in a row, a greedy dog loses 1 treat (food only, not toys). Counter resets after the penalty.
Per-breed defaults live in traits.json. See Traits.
Trait effects (runtime)
| Trait | Effect |
|---|---|
loud | Dog-voiced bark/barks → growl (UPPERCASE); narrator bark unchanged |
lazy | wait sleeps twice as long |
wet | whine / whimper doubled |
fetchy | Same print twice → tail THUMP THUMP — same stick, still the best stick on stdout, then the line again |
chaser | Each loop tick adds +1 toy to that dog's items (same field as squirrels in stories) |
playful | Dog speaks → output reversed before formatting; narrator bark unchanged. Defaults: bearded collie, border collie, flat-coated retriever, Nova Scotia duck toller, papillon, shetland sheepdog |
Mood (all dogs)
Dog speaks (she bark, labrador woof): 0 toys → lowercase even though the verb is bark; loud → uppercase.
Narrator (bark "…", I bark "…"): as written.
Trait assignment grammar: Traits.
Pronouns
Full grammar: Registering and pronouns.
she/her→ last dog described with feminine voice (She is 2.)he/his/him→ last dog described with masculine voice- Introducing another dog (
I have a beagle.) does not rebindshefrom the first
