Add optional Story Format field on stories with validation#41
Merged
Conversation
Adds a "Story Format" field to TOStory: a high-level, objective classification of the narrative medium (not genre). The field is optional and may be omitted. When set, validate() now flags any value outside the permitted vocabulary: film, tv, play, prose, game, opera, nonfiction. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #41 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 25 25
Lines 1607 1616 +9
=========================================
+ Hits 1607 1616 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
paul-sheridan
previously approved these changes
Jun 17, 2026
paul-sheridan
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional Story Format field to stories — a high-level, objective classification of the narrative medium (not genre).
Story_Format = sa("text")field onTOStory(maps to the:: Story Formatfield in.st.txt).validate()flags any value outside the permitted vocabulary.Permitted values
film,tv,stage,prose,gamefilm— cinema releases (movie:ids)tv— episodic broadcast (no-prefix episode ids)stage— live staged works: plays, opera, musicals, ballet (play:ids and the like)prose— writings to read: novels, novellas, short stories, fables (novel:/shortstory:/writing:ids)game— interactive (videogame:ids)Validation
TOImpl.validate_storyformat()yields a warning like:<story>: Unrecognized 'story format' '<value>' (expected one of: ...)wired into the public
ThemeOntology.validate()generator.Tests
tests/data/storyformat.st.txt(valid / invalid / omitted cases).TestValidation::test_storyformat_warning.Version bumped 2.1.3 → 2.2.0 (new public field).
🤖 Generated with Claude Code