← All repositories

reportage

A life-logging app for iPhone

git clone https://code.inqk.net/reportage.git


commit 6d03d6aa4b72fecf494be8ab676aa16ab8a68a80
parent 0c23512a95341ce64dbd90ab341e721b1331a311
Author: Michael Camilleri <[email protected]>
Date:   Tue, 20 Oct 2026 17:02:19 +0900

Store each question's narrative rule with the question

A question's answers were phrased in its narrative by a rule looked up
by question ID. Every question, the defaults included, is about to
become editable, so the rule has to belong to the question rather than
to its ID.

This commit adds a narrativeRule to Question, stored in a new optional
attribute that lightweight migration adds to existing stores. The
default questions get their rules when they're seeded, and Reporter's
built-in questions get the rules of the defaults that ask the same
things when they're imported.

Stores made before rules were stored are filled in once at launch from
the same table. A rule the user clears will be stored blank rather than
missing, so it isn't filled again, and a blank rule shows the answer
beneath the narrative as prompt and answer. Token, place and people
questions keep taking their rule from their kind. The JSON export
carries the rule, and older exports without it still import. The yes/no
rule now holds a phrase for each answer rather than a dictionary keyed
by option, which suits an editor with one field per answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Diffstat

MNotes/Design.md | 110++++++++++++++++++++++++++++++++++++++-----------------------------------------
MReportage.xcodeproj/project.pbxproj | 16++++++++--------
MReportage/ReportageApp.swift | 10++++++----
MReportage/Services/Export/ReportageExport.swift | 4++++
DReportage/Services/Narrative/DisplayRule.swift | 72------------------------------------------------------------------------
RReportage/Services/Narrative/EntryBuilder.swift -> Reportage/Services/Narrative/NarrativeBuilder.swift | 41++++++++++++++++++++++++-----------------
MReportage/Services/ReporterImport/ReporterImportPlan.swift | 1+
MReportage/Views/Home/HomeView.swift | 22+++++++++++-----------
MReportage/Views/Home/ReportSummary.swift | 17+++++++++--------
MReportage/Views/Report/ReportDetails.swift | 2+-
MReportage/Views/Theme/Theme.swift | 4++--
MShared/Models/DefaultQuestions.swift | 1+
AShared/Models/NarrativeRule.swift | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MShared/Models/Question.swift | 6++++--
MShared/Persistence/EntityMapping.swift | 2++
MShared/Persistence/ReportStore.swift | 22++++++++++++++++++++++
MShared/Persistence/ReportageModel.xcdatamodeld/ReportageModel.xcdatamodel/contents | 1+
MTests/Unit/ReportStoreTests.swift | 19+++++++++++++++++++
MTests/Unit/ReportSummaryTests.swift | 73++++++++++++++++++++++++++++++++++++++++++++++---------------------------

19 files changed, 289 insertions(+), 209 deletions(-)

diff --git a/Notes/Design.md b/Notes/Design.md

@@ -36,9 +36,10 @@ how the Reporter archive maps in.
 - CloudKit sync between iPhone and Watch.
 - Lossless import of the full Reporter archive.
 - On-demand JSON export with a documented, versioned format.
-- Written entries: each report reads as a short entry built from its answers,
-  such as 'Not working. Reading at the library, with Sam. Feeling great.' This
-  is what sets Reportage apart from Reporter. See [Entries](#entries).
+- Written narratives: each report reads as a short narrative built from its
+  answers, such as 'Not working. Reading at the library, with Sam. Feeling
+  great.' This is what sets Reportage apart from Reporter. See
+  [Narratives](#narratives).
 
 ### Not in scope yet
 
@@ -88,7 +89,7 @@ The look is called Almanac: ink on paper, like a printed journal.
   secondary text, a hairline rule and one accent (auburn), each with a
   dark-mode value. The dark paper is a slightly warm near-black. Text keeps at
   least 4.5:1 contrast against the paper in both modes.
-- **Type:** New York (the system serif) for what the user wrote: entries,
+- **Type:** New York (the system serif) for what the user wrote: narratives,
   prompts, answers and token names. SF for everything around it. Labels such
   as dates and report kinds use small spaced capitals. Screen titles are the
   serif in a warm ink softer than the text's; 'Reportage.' over the timeline
@@ -101,14 +102,14 @@ The look is called Almanac: ink on paper, like a printed journal.
   open its survey.
 - **Home screen:** reports grouped under day headings, newest first. Each
   shows its own local time (the period beneath on a 12-hour clock, so times
-  fit one column), its kind, its entry, any answers the entry doesn't cover,
-  and a line of context: the city with its region ('Suginami, Tokyo', put
-  together from the locality and region for imported placemarks), the
-  weather, and Health: time asleep on a wake report, and steps so far that
-  day on the rest, with Reporter's step count standing in for a report
-  Health hasn't filled in. Days are grouped in the device's time zone: grouping by each
-  report's own zone would put reports out of order around midnight after a
-  change of zone, which a sectioned fetch can't show. Grouping by a computed
+  fit one column), its kind, its narrative, any answers the narrative doesn't
+  cover, and a line of context: the city with its region ('Suginami, Tokyo',
+  put together from the locality and region for imported placemarks), the
+  weather, and Health: time asleep on a wake report, and steps so far that day
+  on the rest, with Reporter's step count standing in for a report Health
+  hasn't filled in. Days are grouped in the device's time zone: grouping by
+  each report's own zone would put reports out of order around midnight after
+  a change of zone, which a sectioned fetch can't show. Grouping by a computed
   day loads every report the fetch covers, and regroups them all whenever one
   changes, so the list covers the newest 300 reports back to the start of a
   day, and reaches back 500 more each time it's scrolled to its end.
@@ -121,7 +122,7 @@ The look is called Almanac: ink on paper, like a printed journal.
   address in the place's own language is labelled 'Endonymic Address'. The
   map can be panned and zoomed, but not rotated; once moved, a button in its
   corner brings it back to the report's spot. It has no zoom buttons, as maps
-  on iPhone don't. The entry isn't repeated here. Activities and people are
+  on iPhone don't. The narrative isn't repeated here. Activities and people are
   shown as pills, one per token, since an answer can have several: the name
   in the serif on a faint wash of the accent, quieter than the survey's
   ink-filled tokens, which can be tapped where these can't. Measurements are
@@ -159,9 +160,10 @@ the app. A change that needs data rewritten would need a migration of its own.
 | `kind`        | `yesNo`, `choice`, `tokens`, `people`, `location`, `number`, `note`. |
 | `options`     | For `choice`: the fixed answer list.                         |
 | `placeholder` | Optional.                                                    |
+| `narrativeRule` | How answers read in a narrative (see [Drafts](#drafts)). Missing when the kind implies the rule. |
 | `askOn`       | Set of report kinds the question appears in: `random`, `wake`, `bedtime`. |
-| `order`       | Sort order within a survey, one order across all surveys. Entries read in the current order, so reordering a question changes past entries too. |
-| `showsInTimeline` | Whether answers appear in the timeline's entries. Hidden answers are still shown in a report's details. |
+| `order`       | Sort order within a survey, one order across all surveys. Narratives read in the current order, so reordering a question changes past narratives too. |
+| `showsInTimeline` | Whether answers appear in the timeline's narratives. Hidden answers are still shown in a report's details. |
 | `archivedAt`  | Questions are archived, never deleted, so history keeps its meaning. |
 
 Reporter's `questionType` values map as: 0 → `tokens`, 1 → `choice`,
@@ -191,22 +193,17 @@ wake, bedtime), plus those not asked in any. Dragging reorders a question
 among those in the same survey, leaving the rest of the order alone. Opening
 a question sets the surveys it's asked in and whether it shows in the
 timeline. Asking an archived question brings it back in that survey alone.
-Adding, removing and rewording questions come later.
-
-**Built-in and custom questions (planned).** Each question needs a
-[display rule](#drafts) for its answers to read well in an entry. The plan is
-a fixed set of built-in questions whose prompts, options and display rules are
-app text (so they're translated when shown) and which can only be switched on
-or off and moved between surveys, plus custom questions the user writes with
-their own display rule. The built-in set should reuse Reporter's built-in
-question IDs, so imported answers map onto it directly: 7 of the 8 questions
-in the real export are Reporter's own.
-
-Until then, the default questions get their rules from `DisplayRule.builtIn`,
-keyed by ID, and Reporter's seven built-in questions (`default-question-1` to
-`-7`) share the rules of the defaults that ask the same things, so imported
-answers read as entries too. This assumes an ID keeps its meaning: a Reporter
-question the user reworded gets the wrong phrasing.
+Adding, removing and rewording questions are next.
+
+**Editable questions.** Every question is the user's to edit, the defaults
+included: there is no fixed built-in set. Each question stores its own
+[narrative rule](#drafts), so rewording a question or its rule never depends
+on its ID. The default questions get their rules from `NarrativeRule.builtIn`
+when they're seeded, and Reporter's built-in questions (`default-question-1` to
+`-7`) get the rules of the defaults that ask the same things when they're
+imported, so imported answers read as narratives too. Stores made before rules
+were stored are filled in once from the same table; a rule the user clears is
+stored blank, so it isn't filled again.
 
 ### Report
 
@@ -244,7 +241,7 @@ a person or a place. Responses refer to tokens by ID rather than copying their
 text, so editing a token renames it throughout history. Reporter worked the
 same way: it shared one ID between every answer using a token, and renaming
 'Driving' to 'Driving a car', or the old 'Home' after a move, updated every
-past entry.
+past narrative.
 
 | Field         | Notes                                                        |
 |---------------|--------------------------------------------------------------|
@@ -360,7 +357,7 @@ In the survey (`PlacePicker`):
   region, and is matched by name alone, as everything is without a location.
 - **Telling places apart.** Places sharing a name show, beneath the name, the
   locality of the last report that used them. This is shown only in the
-  picker: entries use the place's name alone.
+  picker: narratives use the place's name alone.
 - **The map** shows the report's location, and pins the chosen place, centred
   on it and zoomed out far enough to keep the location in view. It makes way
   for the keyboard while searching.
@@ -399,15 +396,15 @@ Context fields fall into two groups, and this shapes the whole capture design:
   Health samples and historical weather. These are filled in lazily when
   possible, and can be backfilled.
 
-## Entries
+## Narratives
 
-Each report reads as a short written entry, built deterministically from the
-answers. The same answers always read the same way, with nothing invented,
+Each report reads as a short written narrative, built deterministically from
+the answers. The same answers always read the same way, with nothing invented,
 dropped or changed.
 
 ### Drafts
 
-Each question has a `DisplayRule` saying how its answer reads:
+Each question has a `NarrativeRule` saying how its answer reads:
 
 | Rule | Used for | Example |
 |------|----------|---------|
@@ -420,12 +417,12 @@ Each question has a `DisplayRule` saying how its answer reads:
 | Quote | note | "Learned: 'The neighbours are nice people.'" |
 
 Answers read in the questions' current order, so the user decides how
-entries read by reordering questions, and every entry follows, including
-imported ones. Activities, place and people join one clause, placed where
-the first of those answers comes. Other answers are one sentence each. An
-answer to a question with no rule is shown beneath the entry as its prompt
-and answer. Answers to a question not shown in the timeline are left out of
-both.
+narratives read by reordering questions, and every narrative follows,
+including imported ones. Activities, place and people join one clause, placed
+where the first of those answers comes. Other answers are one sentence each.
+An answer to a question with no rule, or a rule left blank, is shown beneath
+the narrative as its prompt and answer. Answers to a question not shown in
+the timeline are left out of both.
 
 Notes are quoted exactly as written and never rewritten: free writing breaks
 templates in ways casing can't fix (several sentences, first person, lists).
@@ -437,7 +434,7 @@ capitalised just at its start, its lowercase form is an ordinary English word
 'Studying Japanese' and 'TV' keep their capitals. People are shown as written,
 and places as below.
 
-Entries are English only for now.
+Narratives are English only for now.
 
 ### Places
 
@@ -465,16 +462,16 @@ over the rules. See [Open Questions](#open-questions).
 
 ### Why not the on-device model
 
-Entries used to be proofread by the on-device model (`SystemLanguageModel`)
+Narratives used to be proofread by the on-device model (`SystemLanguageModel`)
 to add articles and fix casing. It was dropped:
 
-- **Writing entries from scratch** invents details (a kitchen table, a date, a
-  time of night), changes what notes mean, drops answers and assigns people to
-  the wrong activities.
+- **Writing narratives from scratch** invents details (a kitchen table, a
+  date, a time of night), changes what notes mean, drops answers and assigns
+  people to the wrong activities.
 - **Proofreading** was safe only behind placeholders for names and non-ASCII
   words, and a check that every output kept every word. Even then the model
   left text unchanged about three times in ten ('at Home' kept its capital),
-  so entries needed retries, storage, versioning and a 'Writing narrative…'
+  so narratives needed retries, storage, versioning and a 'Writing narrative…'
   state while they were written. By then its only real job was places, which
   the rules above do reliably, at once and the same way every time.
 
@@ -593,7 +590,7 @@ archived or merged tokens still show as chosen. An answer left as it was keeps
 its response exactly, with the prompt it was given under and where a place
 answer was given, and responses to questions that no longer exist are kept.
 A changed answer keeps its original prompt. The report keeps when it was
-completed; its entry is rewritten because its draft changes.
+completed; its narrative is rewritten because its draft changes.
 
 There's one App Intent, `LogPassiveReportIntent`, in `Shared/`. It drives every
 quick-log surface:
@@ -919,7 +916,7 @@ the app as a fresh install has it. Prompt settings are kept.
    tests, JSON export. This proves the model against real data before any UI
    depends on it.
 2. **Logging on iPhone.** Survey UI for every question type, wake, bedtime and
-   manual reports, written entries, passive reports, and live context
+   manual reports, written narratives, passive reports, and live context
    capture (location, device, safe ambient noise).
 3. **Prompts.** Scheduler, notification actions, background refresh.
 4. **Quick logging.** `LogPassiveReportIntent` and the iOS surfaces it drives:
@@ -964,15 +961,14 @@ the app as a fresh install has it. Prompt settings are kept.
 - **Multi-select choice questions.** Reporter stores choice answers as arrays,
   but every answer in the archive has a single value. The survey takes one
   answer for now.
-- **The built-in question set.** Its prompts, options and display rules, and
-  whether the one custom question in the real export joins it. The wording
-  should come from the user rather than being copied from the export.
-- **Display rules for custom questions.** How the user writes one when adding
-  a question.
+- **Narrative rules for added questions.** The editor asks for what each kind
+  needs (phrases for yes and no, a template for a choice, the nouns for a
+  count, a lead-in for a note), and a blank rule shows the answer as prompt
+  and answer.
 - **Place forms.** A field on a place token for how it reads after 'at' ('the
   office', 'my desk'), filled from the [place rules](#places) and winning over
   them. It changes the token record, so it lands with the sync schema.
-- **Entries in other languages.** Entries are English only.
+- **Narratives in other languages.** Narratives are English only.
 - **Vocabulary editing UI.** Renaming and merging are settled in the model
   (see [Token](#token)); how they're presented in the app isn't.
 - **App lock.** Should there be an optional Face ID lock? The data is personal.

diff --git a/Reportage.xcodeproj/project.pbxproj b/Reportage.xcodeproj/project.pbxproj

@@ -57,6 +57,7 @@
 		961848A8D899BC67FA43F475 /* ReportageApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 383FF2C73A8FBAA2AB13D653 /* ReportageApp.swift */; };
 		964408E4D25713F627048C77 /* ModelCodingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C606A9B0EF8D84950B9681B /* ModelCodingTests.swift */; };
 		97BC8348B7F48AF0473691FC /* ReportStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28AD66BC8ED4AEABF6640108 /* ReportStore.swift */; };
+		9DFFA4F1FE8F9201855D5884 /* NarrativeBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8E474C9A749960D3B6A8619 /* NarrativeBuilder.swift */; };
 		9EF3CB3707CD6B5AFFD3B767 /* ReporterArchive.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC1C5F0F722477CDA949F018 /* ReporterArchive.swift */; };
 		9F26886E122721BB3F2AFE7F /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD7CB7E9FF6D01BF4CE8617 /* AboutView.swift */; };
 		9FD499B8FACD1BA034804590 /* QuestionListTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E6B536B922A8468136815CD /* QuestionListTests.swift */; };
@@ -68,7 +69,7 @@
 		B00AC94E13BC9C602179953E /* SurveyModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E382405EE9DBEC8EE616C1D /* SurveyModelTests.swift */; };
 		B454D3067CD611AE55E30A1D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 633FE6CD8111A433CA9BE7EC /* AppDelegate.swift */; };
 		B510BB2C1C11D72DFE15E3C7 /* ReportageExportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB6FF151DCEBC3913131834 /* ReportageExportTests.swift */; };
-		B6A7D4DE1FF9314F459A73CB /* EntryBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E21C29422DA372F6363365 /* EntryBuilder.swift */; };
+		BD1AA0F75635BF9C68DFA12A /* NarrativeRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = E67FAC24A684AA62ED63441A /* NarrativeRule.swift */; };
 		BD8D81CBF8C3DE544BB7540C /* DefaultQuestions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94DB0CA378AEF82B3CB27B67 /* DefaultQuestions.swift */; };
 		BDEB83CDBA9E0B4DB7712491 /* LogPassiveReportIntent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90F9BD4EA70DCB46924CF9B8 /* LogPassiveReportIntent.swift */; };
 		C5D94FEC4507054E6497E85B /* PersistenceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C0B5BB02ECDBE84F5F73FA /* PersistenceController.swift */; };
@@ -76,7 +77,6 @@
 		C87E1C0465FE7B2917F92846 /* PromptSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB87A3E922FA7AE98B93DF1E /* PromptSettings.swift */; };
 		C8E02DEA2119E61D31667FFE /* ReporterImportPlanTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FD562C0C92C1D59881C771E /* ReporterImportPlanTests.swift */; };
 		CFB0A1F9494F1D8919F48CC5 /* ContextCaptureTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3157F7D5E4289B349E92402 /* ContextCaptureTests.swift */; };
-		D0497C9835A2502936591DC1 /* DisplayRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E609FFCB918B4EF9BFCC018 /* DisplayRule.swift */; };
 		D1F2257DDB68439AF352B57D /* PassiveLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46FB42E5DB43201A13D6D141 /* PassiveLog.swift */; };
 		D1FFB84FFDF0F659D8D78AEB /* ReportageWidgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EDD39E85D86AFF45B5672F3 /* ReportageWidgets.swift */; };
 		D3C3046B927DB98443E005C8 /* PlaceDirectory.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBE80E95676BAEB53CE80E0 /* PlaceDirectory.swift */; };
@@ -186,7 +186,6 @@
 		86474CD2E8EC300CD6B37BB2 /* PromptSchedule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromptSchedule.swift; sourceTree = "<group>"; };
 		87545A7909A370C668314DFF /* DiagnosticsSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiagnosticsSection.swift; sourceTree = "<group>"; };
 		878CE0FF7A2598F4197E8E61 /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = "<group>"; };
-		8E609FFCB918B4EF9BFCC018 /* DisplayRule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayRule.swift; sourceTree = "<group>"; };
 		90F9BD4EA70DCB46924CF9B8 /* LogPassiveReportIntent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogPassiveReportIntent.swift; sourceTree = "<group>"; };
 		917C4579342FAC42F6C616FC /* ReporterImporterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReporterImporterTests.swift; sourceTree = "<group>"; };
 		92BFA1E8F26662DCF828DD5C /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = "<group>"; };
@@ -200,7 +199,6 @@
 		A5CC1EB95C82F2D9B0982650 /* HealthFill.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthFill.swift; sourceTree = "<group>"; };
 		A70B6E5B7C07D2CE13E9E771 /* RootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootView.swift; sourceTree = "<group>"; };
 		A7DD8E44D1A1F7789F528BD3 /* EventLogTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventLogTests.swift; sourceTree = "<group>"; };
-		A8E21C29422DA372F6363365 /* EntryBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryBuilder.swift; sourceTree = "<group>"; };
 		A9C326FBA3249ED86912FBF5 /* PromptNotification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromptNotification.swift; sourceTree = "<group>"; };
 		AE6C0A180E8285C11565723B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
 		B007E6BACAA214C7332EF77C /* Question.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Question.swift; sourceTree = "<group>"; };
@@ -223,7 +221,9 @@
 		E1F55B30D0B5E711A28CD0B1 /* HealthCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthCache.swift; sourceTree = "<group>"; };
 		E21F898FF60FC3A6AFCA06E9 /* Reportage Unit Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = "Reportage Unit Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
 		E60426297403B9F8632343D8 /* SchemaMigrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SchemaMigrationTests.swift; sourceTree = "<group>"; };
+		E67FAC24A684AA62ED63441A /* NarrativeRule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NarrativeRule.swift; sourceTree = "<group>"; };
 		E7F1ECC4B803EFFD88FFF52B /* ReportageExport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportageExport.swift; sourceTree = "<group>"; };
+		E8E474C9A749960D3B6A8619 /* NarrativeBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NarrativeBuilder.swift; sourceTree = "<group>"; };
 		EC0EF3DA62941ED76148D5BF /* BackgroundLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundLocation.swift; sourceTree = "<group>"; };
 		EC2D996880DB9C269F0203D5 /* AppleWeather.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleWeather.swift; sourceTree = "<group>"; };
 		F498961A14F24AE6CC37453C /* ReportDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportDetailView.swift; sourceTree = "<group>"; };
@@ -320,6 +320,7 @@
 				1F200EBD30BC12D2313E6C6F /* Context.swift */,
 				94DB0CA378AEF82B3CB27B67 /* DefaultQuestions.swift */,
 				86069F79CD8FA24FC6C26650 /* HealthContext.swift */,
+				E67FAC24A684AA62ED63441A /* NarrativeRule.swift */,
 				B007E6BACAA214C7332EF77C /* Question.swift */,
 				B03734F91822E7F161432075 /* Report.swift */,
 				6024EA06BE24A189D4F7D0E4 /* Response.swift */,
@@ -436,9 +437,8 @@
 		96D6D46E008E39350B203328 /* Narrative */ = {
 			isa = PBXGroup;
 			children = (
-				8E609FFCB918B4EF9BFCC018 /* DisplayRule.swift */,
-				A8E21C29422DA372F6363365 /* EntryBuilder.swift */,
 				A00E589A8387E7A1E348503C /* InlineCasing.swift */,
+				E8E474C9A749960D3B6A8619 /* NarrativeBuilder.swift */,
 				577EC17EF58F65207B7EA15D /* PlacePhrase.swift */,
 			);
 			path = Narrative;
@@ -707,9 +707,7 @@
 				A1FBFB9809DD3FF52BD7E5A7 /* DataSection.swift in Sources */,
 				BD8D81CBF8C3DE544BB7540C /* DefaultQuestions.swift in Sources */,
 				16CDDFE25EBB07C0EA9AC5AA /* DiagnosticsSection.swift in Sources */,
-				D0497C9835A2502936591DC1 /* DisplayRule.swift in Sources */,
 				406D536D7764B3FEB140CAA0 /* EntityMapping.swift in Sources */,
-				B6A7D4DE1FF9314F459A73CB /* EntryBuilder.swift in Sources */,
 				C71E99843CC3D9DE4468B36B /* Environment.swift in Sources */,
 				123470F9E3205890526D3A89 /* EventLog.swift in Sources */,
 				226A38BE6D7171D892EA35B3 /* FirstLaunch.swift in Sources */,
@@ -723,6 +721,8 @@
 				3244B8439B5E4F79FF84C156 /* JSONSlicer.swift in Sources */,
 				6F06CC539C4D17B343A9321C /* LegacyBlob.swift in Sources */,
 				BDEB83CDBA9E0B4DB7712491 /* LogPassiveReportIntent.swift in Sources */,
+				9DFFA4F1FE8F9201855D5884 /* NarrativeBuilder.swift in Sources */,
+				BD1AA0F75635BF9C68DFA12A /* NarrativeRule.swift in Sources */,
 				06BD386D5CA144F8D5053A39 /* NotificationsView.swift in Sources */,
 				D1F2257DDB68439AF352B57D /* PassiveLog.swift in Sources */,
 				C5D94FEC4507054E6497E85B /* PersistenceController.swift in Sources */,

diff --git a/Reportage/ReportageApp.swift b/Reportage/ReportageApp.swift

@@ -16,7 +16,7 @@ struct ReportageApp: App {
                 .environment(appDelegate.inbox)
                 .environment(appDelegate.healthFiller)
                 .tint(Theme.accent)
-                .task { await seedDefaultQuestions() }
+                .task { await prepareQuestions() }
         }
         .onChange(of: scenePhase) { _, phase in
             switch phase {
@@ -41,11 +41,13 @@ struct ReportageApp: App {
         }
     }
 
-    private func seedDefaultQuestions() async {
+    private func prepareQuestions() async {
         do {
-            try await ReportStore(persistence: appDelegate.persistence).seedDefaultQuestionsIfNeeded()
+            let store = ReportStore(persistence: appDelegate.persistence)
+            try await store.seedDefaultQuestionsIfNeeded()
+            try await store.fillMissingNarrativeRules()
         } catch {
-            logger.error("Couldn't add the default questions: \(error)")
+            logger.error("Couldn't add the default questions or their rules: \(error)")
         }
     }
 }

diff --git a/Reportage/Services/Export/ReportageExport.swift b/Reportage/Services/Export/ReportageExport.swift

@@ -98,6 +98,8 @@ struct ExportedQuestion: Codable, Hashable, Sendable {
     var kind: QuestionKind
     var options: [String]?
     var placeholder: String?
+    /// Missing when the question uses the rule its kind implies.
+    var narrativeRule: NarrativeRule?
     /// Survey names: `random`, `wake` and `bedtime`.
     var askOn: [String]
     var order: Int
@@ -117,6 +119,7 @@ struct ExportedQuestion: Codable, Hashable, Sendable {
         kind = question.kind
         options = question.options.isEmpty ? nil : question.options
         placeholder = question.placeholder
+        narrativeRule = question.narrativeRule
         askOn = Self.surveys.filter { question.askOn.contains($0.kind) }.map(\.name)
         order = question.order
         showsInTimeline = question.showsInTimeline
@@ -138,6 +141,7 @@ struct ExportedQuestion: Codable, Hashable, Sendable {
             kind: kind,
             options: options ?? [],
             placeholder: placeholder,
+            narrativeRule: narrativeRule,
             askOn: surveys,
             order: order,
             showsInTimeline: showsInTimeline ?? true,

diff --git a/Reportage/Services/Narrative/DisplayRule.swift b/Reportage/Services/Narrative/DisplayRule.swift

@@ -1,72 +0,0 @@
-import Foundation
-
-/// How a question's answer reads in a report's entry. Questions without a
-/// rule are shown as their prompt and answer instead.
-///
-/// Rules write English. The entry is English-only for now.
-enum DisplayRule: Equatable, Sendable {
-    /// Joins the entry's main clause as what was happening:
-    /// 'Reading and drinking coffee…'.
-    case activities
-    /// Joins the main clause as where: '…at the library'.
-    case place
-    /// Joins the main clause as who with: '…with Sam and Kai'.
-    case people
-    /// A fixed phrase for each stored option: 'Yes' → 'Working'.
-    case phrases([String: String])
-    /// A phrase with the answer in it, where `%@` stands for the answer as it
-    /// reads mid-sentence: 'Feeling %@' → 'Feeling great'.
-    case template(String)
-    /// A count, with the singular and plural noun: '2 coffees'.
-    case count(singular: String, plural: String)
-    /// A note, quoted exactly as written after a lead-in: "Learned: '…'".
-    case quote(lead: String)
-
-    /// The rule for a question. Built-in questions have their own rules;
-    /// token questions of any origin join the main clause; others have none.
-    static func rule(for questionID: String, kind: QuestionKind?) -> DisplayRule? {
-        if let rule = builtIn[questionID] { return rule }
-        switch kind {
-        case .tokens: return .activities
-        case .location: return .place
-        case .people: return .people
-        case .yesNo, .choice, .number, .note, nil: return nil
-        }
-    }
-
-    /// Rules for the default questions, by ID, and for Reporter's built-in
-    /// questions, which ask the same things. Imported answers keep
-    /// Reporter's question IDs.
-    static let builtIn: [String: DisplayRule] = {
-        var rules: [String: DisplayRule] = [
-            "working": .phrases([
-                ResponseValue.yesOption: "Working",
-                ResponseValue.noOption: "Not working",
-            ]),
-            "activity": .activities,
-            "location": .place,
-            "people": .people,
-            "mood": .template("Feeling %@"),
-            "sleep-quality": .template("Slept %@"),
-            "coffee": .count(singular: "coffee", plural: "coffees"),
-            "learned": .quote(lead: "Learned"),
-        ]
-        rules = Dictionary(uniqueKeysWithValues: rules.map { (DefaultQuestions.idPrefix + $0.key, $0.value) })
-        for (reporterID, name) in reporterQuestions {
-            rules[reporterID] = rules[DefaultQuestions.idPrefix + name]
-        }
-        return rules
-    }()
-
-    /// Reporter's built-in questions, by the default question that asks the
-    /// same thing.
-    private static let reporterQuestions = [
-        "default-question-1": "sleep-quality",
-        "default-question-2": "working",
-        "default-question-3": "activity",
-        "default-question-4": "location",
-        "default-question-5": "people",
-        "default-question-6": "coffee",
-        "default-question-7": "learned",
-    ]
-}

diff --git a/Reportage/Services/Narrative/EntryBuilder.swift b/Reportage/Services/Narrative/NarrativeBuilder.swift

@@ -1,6 +1,6 @@
 import Foundation
 
-/// An answer the entry doesn't cover, shown as its question and answer.
+/// An answer the narrative doesn't cover, shown as its question and answer.
 struct AnswerDetail: Equatable, Identifiable, Sendable {
     var id: String { questionID }
     var questionID: String
@@ -8,14 +8,14 @@ struct AnswerDetail: Equatable, Identifiable, Sendable {
     var answer: String
 }
 
-/// Builds entries from answers using each question's `DisplayRule`, in the
-/// questions' current order.
+/// Builds narratives from answers using each question's `NarrativeRule`, in
+/// the questions' current order.
 @MainActor
-enum EntryBuilder {
+enum NarrativeBuilder {
     static func build(
         responses: [Response],
         lookup: SummaryLookup
-    ) -> (entry: String?, details: [AnswerDetail]) {
+    ) -> (narrative: String?, details: [AnswerDetail]) {
         var sentences: [Sentence] = []
         var details: [AnswerDetail] = []
         var activities: [String] = []
@@ -33,10 +33,7 @@ enum EntryBuilder {
         for response in ordered {
             guard let value = response.value, !lookup.hiddenQuestions.contains(response.questionID)
             else { continue }
-            let rule = DisplayRule.rule(
-                for: response.questionID, kind: lookup.questionKinds[response.questionID])
-
-            switch (rule, value) {
+            switch (lookup.questionRules[response.questionID], value) {
             case (.activities, .tokens(let ids)):
                 activities += ids.compactMap { lookup.tokenTexts[$0] }
                 clauseIndex = clauseIndex ?? sentences.count
@@ -46,19 +43,21 @@ enum EntryBuilder {
             case (.place, .place(let answer)):
                 place = place ?? placePhrase(for: answer.tokenID, lookup: lookup)
                 clauseIndex = clauseIndex ?? sentences.count
-            case (.phrases(let phrases), .options(let options)):
-                if let phrase = options.lazy.compactMap({ phrases[$0] }).first {
+            case (.phrases(let yes, let no), .options(let options)):
+                let phrases = [ResponseValue.yesOption: yes, ResponseValue.noOption: no]
+                if let phrase = options.lazy.compactMap({ phrases[$0] }).first(where: { !$0.isBlank }) {
                     sentences.append(Sentence(phrase))
                 } else {
                     details.append(detail(for: response, answer: displayOptions(options)))
                 }
-            case (.template(let template), .options(let options)):
+            case (.template(let format), .options(let options)) where !format.isBlank:
                 let answer = joined(options.map(InlineCasing.inline))
-                sentences.append(Sentence(template.replacingOccurrences(of: "%@", with: answer)))
-            case (.count(let singular, let plural), .number(let number)):
+                sentences.append(Sentence(format.replacingOccurrences(of: "%@", with: answer)))
+            case (.count(let singular, let plural), .number(let number))
+            where !singular.isBlank && !plural.isBlank:
                 let noun = number == 1 ? singular : plural
                 sentences.append(Sentence("\(number.formatted()) \(noun)"))
-            case (.quote(let lead), .text(let note)):
+            case (.quote(let lead), .text(let note)) where !lead.isBlank:
                 let note = note.trimmingCharacters(in: .whitespacesAndNewlines)
                 let ended = note.last.map { ".!?".contains($0) } ?? false
                 sentences.append(Sentence("\(lead): '\(note)'", isEnded: ended))
@@ -72,10 +71,10 @@ enum EntryBuilder {
         }
         guard !sentences.isEmpty else { return (nil, details) }
 
-        let entry = sentences.map { sentence in
+        let narrative = sentences.map { sentence in
             sentence.capitalised + (sentence.isEnded ? "" : ".")
         }
-        return (entry.joined(separator: " "), details)
+        return (narrative.joined(separator: " "), details)
     }
 
     private struct Sentence {
@@ -150,3 +149,11 @@ enum EntryBuilder {
             })
     }
 }
+
+extension String {
+    /// Whether a rule's text is empty once whitespace is trimmed, which
+    /// leaves the answer to be shown as prompt and answer.
+    fileprivate var isBlank: Bool {
+        trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
+    }
+}

diff --git a/Reportage/Services/ReporterImport/ReporterImportPlan.swift b/Reportage/Services/ReporterImport/ReporterImportPlan.swift

@@ -143,6 +143,7 @@ private struct Builder {
                 prompt: reporterQuestion.prompt,
                 kind: kind,
                 placeholder: reporterQuestion.placeholderString,
+                narrativeRule: NarrativeRule.builtIn[reporterQuestion.uniqueIdentifier],
                 askOn: [],
                 order: order,
                 modifiedAt: now

diff --git a/Reportage/Views/Home/HomeView.swift b/Reportage/Views/Home/HomeView.swift

@@ -377,8 +377,8 @@ struct EmptyReports: View {
     }
 }
 
-/// One report: its local time, kind, its entry, its other answers and where
-/// it was.
+/// One report: its local time, kind, its narrative, its other answers and
+/// where it was.
 struct ReportRow: View {
     @ObservedObject var report: ReportEntity
     let describer: ReportDescriber
@@ -389,8 +389,8 @@ struct ReportRow: View {
 
     var body: some View {
         if let health = report.health {
-            // Reading Health again changes the entry but not the report, so
-            // the row watches the entry as well.
+            // Reading Health again changes the narrative but not the report,
+            // so the row watches the narrative as well.
             HealthObserver(health: health) { content }
         } else {
             content
@@ -401,15 +401,15 @@ struct ReportRow: View {
         let summary = describer.summary(of: report)
         let kind = report.kind.flatMap(ReportKind.init)
         // The tops of the time's digits and of the kind label line up,
-        // rather than their baselines, so the small label heads the entry
-        // instead of sitting at the foot of the large digits.
+        // rather than their baselines, so the small label heads the
+        // narrative instead of sitting at the foot of the large digits.
         HStack(alignment: .capTop, spacing: Theme.itemGap) {
             ReportTime(date: report.date, timeZone: report.timeZone)
                 .frame(width: timeWidth, alignment: .leading)
             VStack(alignment: .leading, spacing: 6) {
                 ReportKindLabel(kind: kind, isLogged: isLogged)
                 ReportSummaryText(
-                    entry: summary.entry,
+                    narrative: summary.narrative,
                     details: summary.details,
                     context: summary.context,
                     isLogged: isLogged
@@ -501,19 +501,19 @@ struct ReportKindLabel: View {
 }
 
 struct ReportSummaryText: View {
-    let entry: String?
+    let narrative: String?
     let details: [AnswerDetail]
     let context: String?
     /// A report logged for later has no answers, and doesn't say so.
     let isLogged: Bool
 
-    /// Answers shown beneath the entry before the rest are counted.
+    /// Answers shown beneath the narrative before the rest are counted.
     private static let detailLimit = 2
 
     var body: some View {
         VStack(alignment: .leading, spacing: 4) {
-            if let entry {
-                Text(entry)
+            if let narrative {
+                Text(narrative)
                     .font(Theme.serif(.body))
                     .foregroundStyle(Theme.ink)
             } else if details.isEmpty, !isLogged {

diff --git a/Reportage/Views/Home/ReportSummary.swift b/Reportage/Views/Home/ReportSummary.swift

@@ -10,20 +10,21 @@ struct SummaryLookup: Equatable, Sendable {
     /// Place tokens, by ID, whose text is still the name a place directory
     /// gave them. A merged token's ID is here if its token's is.
     var directoryPlaces: Set<String> = []
-    var questionKinds: [String: QuestionKind] = [:]
-    /// Each question's place in the current order, so entries follow it
+    /// Each question's narrative rule. Questions with no rule are absent.
+    var questionRules: [String: NarrativeRule] = [:]
+    /// Each question's place in the current order, so narratives follow it
     /// rather than the order the report was made in.
     var questionOrder: [String: Int] = [:]
     /// Questions whose answers are left out of the timeline.
     var hiddenQuestions: Set<String> = []
 }
 
-/// A report described for the home screen: its entry, built from the answers
-/// that have display rules, the other answers as question and answer, and a
-/// line of context.
+/// A report described for the home screen: its narrative, built from the
+/// answers that have narrative rules, the other answers as question and
+/// answer, and a line of context.
 @MainActor
 struct ReportSummary: Equatable {
-    var entry: String?
+    var narrative: String?
     var details: [AnswerDetail]
     var context: String?
 
@@ -31,7 +32,7 @@ struct ReportSummary: Equatable {
         responses: [Response], context: Context, health: HealthContext? = nil, kind: ReportKind? = nil,
         lookup: SummaryLookup
     ) {
-        (entry, details) = EntryBuilder.build(responses: responses, lookup: lookup)
+        (narrative, details) = NarrativeBuilder.build(responses: responses, lookup: lookup)
         self.context = Self.contextLine(context, health: health, kind: kind)
     }
 
@@ -109,7 +110,7 @@ extension ReportStore {
             }
             for entity in try context.fetch(QuestionEntity.fetchRequest()) {
                 let question = try entity.question()
-                lookup.questionKinds[question.id] = question.kind
+                lookup.questionRules[question.id] = question.resolvedNarrativeRule
                 lookup.questionOrder[question.id] = question.order
                 if !question.showsInTimeline { lookup.hiddenQuestions.insert(question.id) }
             }

diff --git a/Reportage/Views/Report/ReportDetails.swift b/Reportage/Views/Report/ReportDetails.swift

@@ -45,7 +45,7 @@ struct ReportDetails: Equatable {
                 switch response.value {
                 case nil: .skipped
                 case .tokens(let ids): .tokens(ids.compactMap { lookup.tokenTexts[$0] })
-                case let value?: .text(EntryBuilder.describe(value, lookup: lookup))
+                case let value?: .text(NarrativeBuilder.describe(value, lookup: lookup))
                 }
             return Answer(prompt: response.prompt, value: value)
         }

diff --git a/Reportage/Views/Theme/Theme.swift b/Reportage/Views/Theme/Theme.swift

@@ -8,7 +8,7 @@ enum Theme {
     static let ink = Color(light: 0x1B1C1F, dark: 0xECEBE6)
     /// Secondary text. At least 4.5:1 against `paper` in both modes.
     static let muted = Color(light: 0x605B53, dark: 0xA29C93)
-    /// Hairlines between entries and unfilled progress.
+    /// Hairlines between reports and unfilled progress.
     static let rule = Color(light: 0xDAD2C3, dark: 0x38342E)
     static let accent = Color(light: 0x8E3B22, dark: 0xE39577)
     /// Text and icons drawn on `accent`.
@@ -18,7 +18,7 @@ enum Theme {
     /// Decorative, so it needs only 3:1 against `paper`; it's 4.3:1.
     static let mark = Color(light: 0xC4481A, dark: 0xF2724A)
     /// Screen titles: a warm ink, softer than `ink` so the title doesn't
-    /// outweigh the entries beneath it.
+    /// outweigh the reports beneath it.
     static let titleInk = Color(light: 0x4A433B, dark: 0xC4BDB2)
 
     // MARK: Spacing

diff --git a/Shared/Models/DefaultQuestions.swift b/Shared/Models/DefaultQuestions.swift

@@ -95,6 +95,7 @@ enum DefaultQuestions {
         return questions.enumerated().map { index, question in
             var question = question
             question.order = index
+            question.narrativeRule = NarrativeRule.builtIn[question.id]
             return question
         }
     }

diff --git a/Shared/Models/NarrativeRule.swift b/Shared/Models/NarrativeRule.swift

@@ -0,0 +1,75 @@
+import Foundation
+
+/// How a question's answer reads in a report's narrative. Questions without
+/// a rule are shown as their prompt and answer instead.
+///
+/// Rules write English. The narrative is English-only for now.
+enum NarrativeRule: Hashable, Sendable, Codable {
+    /// Joins the narrative's main clause as what was happening:
+    /// 'Reading and drinking coffee…'.
+    case activities
+    /// Joins the main clause as where: '…at the library'.
+    case place
+    /// Joins the main clause as who with: '…with Sam and Kai'.
+    case people
+    /// A fixed phrase for each answer to a yes/no question: 'Yes' →
+    /// 'Working'. A blank phrase leaves that answer to be shown as prompt
+    /// and answer.
+    case phrases(yes: String, no: String)
+    /// A phrase with the answer in it, where `%@` stands for the answer as it
+    /// reads mid-sentence: 'Feeling %@' → 'Feeling great'.
+    case template(format: String)
+    /// A count, with the singular and plural noun: '2 coffees'.
+    case count(singular: String, plural: String)
+    /// A note, quoted exactly as written after a lead-in: "Learned: '…'".
+    case quote(lead: String)
+
+    /// The rule for a question of `kind` that has none of its own. Token
+    /// questions join the main clause; others have no rule.
+    static func derived(for kind: QuestionKind) -> NarrativeRule? {
+        switch kind {
+        case .tokens: .activities
+        case .location: .place
+        case .people: .people
+        case .yesNo, .choice, .number, .note: nil
+        }
+    }
+
+    /// Rules for the default questions, by ID, and for Reporter's built-in
+    /// questions, which ask the same things. Imported answers keep
+    /// Reporter's question IDs. Questions get these when they're seeded or
+    /// imported; stores made before rules were stored get them once by
+    /// `ReportStore.fillMissingNarrativeRules()`.
+    static let builtIn: [String: NarrativeRule] = {
+        var rules: [String: NarrativeRule] = [
+            "working": .phrases(yes: "Working", no: "Not working"),
+            "mood": .template(format: "Feeling %@"),
+            "sleep-quality": .template(format: "Slept %@"),
+            "coffee": .count(singular: "coffee", plural: "coffees"),
+            "learned": .quote(lead: "Learned"),
+        ]
+        rules = Dictionary(uniqueKeysWithValues: rules.map { (DefaultQuestions.idPrefix + $0.key, $0.value) })
+        for (reporterID, name) in reporterQuestions {
+            rules[reporterID] = rules[DefaultQuestions.idPrefix + name]
+        }
+        return rules
+    }()
+
+    /// Reporter's built-in questions, by the default question that asks the
+    /// same thing. Those that join the main clause get their rule from their
+    /// kind.
+    private static let reporterQuestions = [
+        "default-question-1": "sleep-quality",
+        "default-question-2": "working",
+        "default-question-6": "coffee",
+        "default-question-7": "learned",
+    ]
+}
+
+extension Question {
+    /// How the question's answers read in a narrative: its own rule, or else
+    /// the one its kind implies.
+    var resolvedNarrativeRule: NarrativeRule? {
+        narrativeRule ?? NarrativeRule.derived(for: kind)
+    }
+}

diff --git a/Shared/Models/Question.swift b/Shared/Models/Question.swift

@@ -11,10 +11,12 @@ struct Question: Hashable, Sendable {
     /// The fixed answer list for `choice` questions. Empty for other kinds.
     var options: [String] = []
     var placeholder: String?
+    /// How answers read in a narrative. `nil` uses the rule the kind implies.
+    var narrativeRule: NarrativeRule?
     /// The surveys the question appears in.
     var askOn: SurveyKinds
-    /// Sort order within a survey, and the order its answers read in an
-    /// entry.
+    /// Sort order within a survey, and the order its answers read in a
+    /// narrative.
     var order: Int
     /// Whether the question's answers appear in the timeline. Hidden answers
     /// are still shown in the report's details.

diff --git a/Shared/Persistence/EntityMapping.swift b/Shared/Persistence/EntityMapping.swift

@@ -27,6 +27,7 @@ extension QuestionEntity {
         kind = question.kind.rawValue
         options = question.options.isEmpty ? nil : try ModelCoding.encode(question.options)
         placeholder = question.placeholder
+        narrativeRule = try question.narrativeRule.map { try ModelCoding.encode($0) }
         askOn = question.askOn.rawValue
         order = Int32(question.order)
         showsInTimeline = question.showsInTimeline
@@ -48,6 +49,7 @@ extension QuestionEntity {
             kind: kind,
             options: try options.map { try ModelCoding.decode([String].self, from: $0) } ?? [],
             placeholder: placeholder,
+            narrativeRule: try narrativeRule.map { try ModelCoding.decode(NarrativeRule.self, from: $0) },
             askOn: SurveyKinds(rawValue: askOn),
             order: Int(order),
             showsInTimeline: showsInTimeline,

diff --git a/Shared/Persistence/ReportStore.swift b/Shared/Persistence/ReportStore.swift

@@ -24,6 +24,28 @@ struct ReportStore: Sendable {
         }
     }
 
+    /// Gives the default questions and Reporter's built-in questions their
+    /// rules from `NarrativeRule.builtIn` if they have none, as in stores made
+    /// before questions stored their rules. A rule the user cleared is
+    /// stored blank, so it isn't filled again.
+    func fillMissingNarrativeRules(now: Date = Date()) async throws {
+        let context = persistence.newBackgroundContext()
+        try await context.perform {
+            let request = QuestionEntity.fetchRequest()
+            request.predicate = NSPredicate(
+                format: "narrativeRule == nil AND id IN %@", Array(NarrativeRule.builtIn.keys))
+            let entities = try context.fetch(request)
+            guard !entities.isEmpty else { return }
+            for entity in entities {
+                var question = try entity.question()
+                question.narrativeRule = NarrativeRule.builtIn[question.id]
+                question.modifiedAt = now
+                try entity.update(from: question)
+            }
+            try context.save()
+        }
+    }
+
     /// The questions a report of `kind` asks, in survey order.
     func surveyQuestions(for kind: ReportKind) async throws -> [Question] {
         let survey = SurveyKinds(surveyFor: kind)

diff --git a/Shared/Persistence/ReportageModel.xcdatamodeld/ReportageModel.xcdatamodel/contents b/Shared/Persistence/ReportageModel.xcdatamodeld/ReportageModel.xcdatamodel/contents

@@ -6,6 +6,7 @@
         <attribute name="id" attributeType="String"/>
         <attribute name="kind" attributeType="String"/>
         <attribute name="modifiedAt" attributeType="Date" usesScalarValueType="NO"/>
+        <attribute name="narrativeRule" optional="YES" attributeType="Binary"/>
         <attribute name="options" optional="YES" attributeType="Binary"/>
         <attribute name="order" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
         <attribute name="placeholder" optional="YES" attributeType="String"/>

diff --git a/Tests/Unit/ReportStoreTests.swift b/Tests/Unit/ReportStoreTests.swift

@@ -382,4 +382,23 @@ extension ReportStoreTests {
         #expect(saved.first == questions[0])
         #expect(try await store.surveyQuestions(for: .wake).contains { $0.id == questions[0].id } == false)
     }
+
+    @Test("Narrative rules are stored with questions, and missing built-in rules are filled once")
+    func narrativeRules() async throws {
+        try await store.seedDefaultQuestionsIfNeeded(now: Date(timeIntervalSince1970: 0))
+        var questions = try await store.allQuestions()
+        let mood = try #require(questions.firstIndex { $0.id == DefaultQuestions.idPrefix + "mood" })
+        let working = try #require(questions.firstIndex { $0.id == DefaultQuestions.idPrefix + "working" })
+        #expect(questions[mood].narrativeRule == .template(format: "Feeling %@"))
+
+        // A store from before rules were stored, and a rule the user cleared.
+        questions[mood].narrativeRule = nil
+        questions[working].narrativeRule = .phrases(yes: "", no: "")
+        try await store.save([questions[mood], questions[working]])
+        try await store.fillMissingNarrativeRules()
+
+        let filled = try await store.allQuestions()
+        #expect(filled[mood].narrativeRule == .template(format: "Feeling %@"))
+        #expect(filled[working].narrativeRule == .phrases(yes: "", no: ""))
+    }
 }

diff --git a/Tests/Unit/ReportSummaryTests.swift b/Tests/Unit/ReportSummaryTests.swift

@@ -4,8 +4,8 @@ import Testing
 @testable import Reportage
 
 @MainActor
-@Suite("EntryBuilder")
-struct EntryBuilderTests {
+@Suite("NarrativeBuilder")
+struct NarrativeBuilderTests {
 
     private static let lookup = SummaryLookup(
         tokenTexts: [
@@ -14,50 +14,49 @@ struct EntryBuilderTests {
             "tanaka": "田中さん",
         ],
         directoryPlaces: ["bottle"],
-        questionKinds: [
-            "activity": .tokens, "people": .people, "place": .location, "custom": .yesNo,
-        ]
+        questionRules: NarrativeRule.builtIn.merging(
+            ["activity": .activities, "people": .people, "place": .place], uniquingKeysWith: { $1 })
     )
 
     private static func response(_ questionID: String, _ value: ResponseValue?) -> Response {
         Response(questionID: questionID, prompt: "Prompt \(questionID)?", value: value)
     }
 
-    private static func build(_ responses: [Response]) -> (entry: String?, details: [AnswerDetail]) {
-        EntryBuilder.build(responses: responses, lookup: lookup)
+    private static func build(_ responses: [Response]) -> (narrative: String?, details: [AnswerDetail]) {
+        NarrativeBuilder.build(responses: responses, lookup: lookup)
     }
 
     @Test("Activities, place and people make one clause, with later activities lowercased")
     func mainClause() {
-        let (entry, details) = Self.build([
+        let (narrative, details) = Self.build([
             Self.response("activity", .tokens(["read", "coffee", "netflix"])),
             Self.response("place", .place(PlaceAnswer(tokenID: "library"))),
             Self.response("people", .tokens(["sam", "kai"])),
         ])
-        #expect(entry == "Reading, drinking coffee and watching Netflix at the library, with Sam and Kai.")
+        #expect(narrative == "Reading, drinking coffee and watching Netflix at the library, with Sam and Kai.")
         #expect(details.isEmpty)
     }
 
     @Test("People are shown as written")
     func people() {
-        let entry = Self.build([Self.response("people", .tokens(["sam", "tanaka"]))]).entry
-        #expect(entry == "With Sam and 田中さん.")
+        let narrative = Self.build([Self.response("people", .tokens(["sam", "tanaka"]))]).narrative
+        #expect(narrative == "With Sam and 田中さん.")
     }
 
     @Test("A place from a directory is shown as written, and others are phrased")
     func places() {
-        let home = Self.build([Self.response("place", .place(PlaceAnswer(tokenID: "home")))]).entry
+        let home = Self.build([Self.response("place", .place(PlaceAnswer(tokenID: "home")))]).narrative
         #expect(home == "At home.")
         let bottle = Self.build([
             Self.response("activity", .tokens(["read"])),
             Self.response("place", .place(PlaceAnswer(tokenID: "bottle"))),
-        ]).entry
+        ]).narrative
         #expect(bottle == "Reading at Blue bottle.")
     }
 
     @Test("Built-in rules phrase each kind of answer, in survey order")
     func builtInRules() {
-        let (entry, _) = Self.build([
+        let (narrative, _) = Self.build([
             Self.response("reportage-default-working", .options([ResponseValue.noOption])),
             Self.response("activity", .tokens(["read"])),
             Self.response("reportage-default-mood", .options(["Great"])),
@@ -65,7 +64,7 @@ struct EntryBuilderTests {
             Self.response("reportage-default-learned", .text("The neighbours are nice people.")),
         ])
         #expect(
-            entry
+            narrative
                 == "Not working. Reading. Feeling great. 1 coffee. Learned: 'The neighbours are nice people.'")
     }
 
@@ -73,7 +72,7 @@ struct EntryBuilderTests {
     func currentOrder() {
         var lookup = Self.lookup
         lookup.questionOrder = ["activity": 0, "place": 1, "reportage-default-working": 2]
-        let (entry, _) = EntryBuilder.build(
+        let (narrative, _) = NarrativeBuilder.build(
             responses: [
                 Self.response("reportage-default-working", .options([ResponseValue.yesOption])),
                 Self.response("activity", .tokens(["read"])),
@@ -82,55 +81,75 @@ struct EntryBuilderTests {
             ],
             lookup: lookup)
         // Mood has no order, so it comes last.
-        #expect(entry == "Reading at the library. Working. Feeling good.")
+        #expect(narrative == "Reading at the library. Working. Feeling good.")
     }
 
     @Test("Answers to questions hidden from the timeline are left out")
     func hidden() {
         var lookup = Self.lookup
         lookup.hiddenQuestions = ["reportage-default-working", "custom"]
-        let (entry, details) = EntryBuilder.build(
+        let (narrative, details) = NarrativeBuilder.build(
             responses: [
                 Self.response("reportage-default-working", .options([ResponseValue.yesOption])),
                 Self.response("activity", .tokens(["read"])),
                 Self.response("custom", .options([ResponseValue.yesOption])),
             ],
             lookup: lookup)
-        #expect(entry == "Reading.")
+        #expect(narrative == "Reading.")
         #expect(details.isEmpty)
     }
 
     @Test("Reporter's built-in questions read like the defaults that ask the same things")
     func reporterRules() {
-        let (entry, details) = Self.build([
+        let (narrative, details) = Self.build([
             Self.response("default-question-1", .options(["Poorly"])),
             Self.response("default-question-2", .options([ResponseValue.yesOption])),
             Self.response("default-question-6", .number(2)),
         ])
-        #expect(entry == "Slept poorly. Working. 2 coffees.")
+        #expect(narrative == "Slept poorly. Working. 2 coffees.")
         #expect(details.isEmpty)
     }
 
     @Test("Counts use the plural noun for anything but one")
     func counts() {
-        let entry = Self.build([Self.response("reportage-default-coffee", .number(2))]).entry
-        #expect(entry == "2 coffees.")
+        let narrative = Self.build([Self.response("reportage-default-coffee", .number(2))]).narrative
+        #expect(narrative == "2 coffees.")
     }
 
     @Test("A note without final punctuation gets a full stop after the quotation")
     func unendedNote() {
-        let entry = Self.build([Self.response("reportage-default-learned", .text("Tide tables"))]).entry
-        #expect(entry == "Learned: 'Tide tables'.")
+        let narrative = Self.build([Self.response("reportage-default-learned", .text("Tide tables"))]).narrative
+        #expect(narrative == "Learned: 'Tide tables'.")
+    }
+
+    @Test("A rule left blank lists the answer as question and answer")
+    func blankRules() {
+        var lookup = Self.lookup
+        lookup.questionRules["working"] = .phrases(yes: "Working", no: " ")
+        lookup.questionRules["mood"] = .template(format: "")
+        lookup.questionRules["coffee"] = .count(singular: "coffee", plural: "")
+        lookup.questionRules["learned"] = .quote(lead: "")
+        let (narrative, details) = NarrativeBuilder.build(
+            responses: [
+                Self.response("working", .options([ResponseValue.noOption])),
+                Self.response("mood", .options(["Good"])),
+                Self.response("coffee", .number(2)),
+                Self.response("learned", .text("Tide tables")),
+                Self.response("working", .options([ResponseValue.yesOption])),
+            ],
+            lookup: lookup)
+        #expect(narrative == "Working.")
+        #expect(details.map(\.answer) == ["No", "Good", "2", "Tide tables"])
     }
 
     @Test("Answers without a rule are listed as question and answer")
     func details() {
-        let (entry, details) = Self.build([
+        let (narrative, details) = Self.build([
             Self.response("custom", .options([ResponseValue.yesOption])),
             Self.response("unknown", .number(7)),
             Self.response("activity", nil),
         ])
-        #expect(entry == nil)
+        #expect(narrative == nil)
         #expect(details.map(\.answer) == ["Yes", "7"])
     }
 }