Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Storylines

The same site, told two ways, and counted: which words bring people in, and how their cases go, learned from counts alone, with no one tracked.

Anywhere content says something to a person, it may say it in several ways by giving a list instead of one string:

name: Want to help out in the neighbourhood?
description:
  - The work day, the spring fair and the committees need more hands. Say what you can do.
  - The neighbours do most things themselves. Sign up here for whatever you fancy.
alternatives:
  - name: [Join in, Sign me up]
    consequence: [[Send], [Count me in]]

Each index is a storyline. A visitor is given one at their first request, kept in a cookie (portal_storyline) for a year, and reads that storyline on every page, in every button and in every mail the site sends them about their case. A single string is every storyline.

The rules

  • Same length everywhere. Every list of texts in the content has the site’s arity, so a storyline never has a hole in it. The lint refuses a list of another length and names it.
  • What varies is what a person reads: name, description, label, placeholder, title, a mail’s subject and body, a list’s empty line, consequence and encouragements (those two as lists of lists).
  • What the machine reads never varies: a field’s name (the stored key), a select’s options (the stored values), states, groups, paths, buckets.
  • One storyline per site, not per page. That is what makes it a storyline rather than a scatter of variants: a warm front door leads to a warm form and a warm mail.
  • A signed-in person keeps the storyline they had as a visitor.
  • A site that tells one storyline sets no cookie.

What is counted

Every record and every answer event carries the storyline it came from (storyline on Answer and on every row of the answers outbox). The mail a case gets tells the same storyline, so a person who read the warm front door is not thanked in the plain voice.

GET /report gives the counts, per bucket, per storyline, per state:

{ "storylines": 2,
  "buckets": { "requests": { "0": { "open": 3, "solved": 9 },
                             "1": { "open": 5, "solved": 14 } } } }

Storylines are assigned evenly, so those numbers are the comparison: which words brought more people to send, and how their cases went. No record, field, address or time leaves the site. The trainer reads this (bratac report) next to what its personas scored offline, and the plan’s tones are where the storylines are written.

Framings, and how they are rolled out

A wording of one option is a framing, and it has an id: f and the first twelve hex digits of the sha256 of the card as the visitor reads it, heading, description, button, sections and all (card::framing_id, the same text the trainer’s visitors and learn are shown). The id follows the text, not the slot: the same card has the same id on any page, at any storyline index and in any commit, and a one-character edit is a new framing. So a count, an offline score and a live outcome join by wording even when the lists are reordered, padded or rolled back. The trainer, learn and the search box’s counts (the card it ranked first) name wordings by it; records and /report still count by storyline index.

New framings reach a live site append-only:

  • Storyline 0 is never rewritten. It is the live text, and what the machine reads beside the words (the needs’ via, the access policy, icons) is built from it. A new framing takes an index at or above the site’s current arity.
  • Arity stays equal by padding with the live text. A need with fewer new framings than the others repeats its live card in the spare indices; the repeats have the live card’s framing id, so their counts merge with it rather than look like a new wording.
  • A visitor keeps their storyline. A cookie naming an index the site still tells is kept; only one at or above the new arity is drawn again, evenly, as at a first visit.
  • Rolling back is a rebuild at arity 1, with the live words alone: every visitor reads storyline 0 again, and the records already made keep the index and the framing they came from, so nothing counted is lost. Retiring one losing framing among several is replacing its texts with the winner’s at the same index: same arity, nobody re-drawn, the two ids’ counts merge from then on.
  • Never reorder the lists and never edit a live index in place; either silently changes what an index meant for everyone already holding it.

Which framings are worth adding is decided offline, by how well each routes the people it is for and leaves the others alone, never by which a judge prefers (Learning). Nothing about the visitor picks their storyline.