Skip to content

Route a source's content to the layout that fits it - #9

Merged
davertor merged 1 commit into
mainfrom
feat/genres
Sep 9, 2026
Merged

davertor merged 1 commit into
mainfrom
feat/genres

Conversation

@davertor

@davertor davertor commented Sep 9, 2026

Copy link
Copy Markdown
Owner

TLDR: A note's layout now comes from what the source is, not from one fixed shape. A comparison of tools renders as a field guide with a matrix and a card per entry; a dish renders as a recipe card; everything else stays the annotated offprint.

  • A genre is a body contract plus a template. SKILL.md Step 3 classifies the source after reading it — top to bottom, first row that fits — and reads that genre's contract, which replaces ## Sections and nothing else. When the call is not obvious it stays offprint: a wrong genre is worse than the plain one. --genre or a request in words overrides it.
  • fieldguide — for several things of one kind on shared axes. Full-bleed masthead, a cost matrix, a <section class="entry"> per thing with the same facets, and up to three picks. Contract in genres/fieldguide.md.
  • recipe — a ticket of facts lifted into the masthead, the ingredients pinned in a rail beside the method, numbered steps carrying their time and setting. A video recipe's steps link to the minute. Contract in genres/recipe.md.
  • One template per genre, resolving video vs article inside — only the masthead differs (poster or byline kicker), so notes.py reads a genre note back with the same parser and retag.py finds the same anchor.
  • kind and genre are separate axes. kind (video/article) still comes from --video-id; genre is declared as data-genre on <html>, absent meaning offprint — so every note written before this parses as one. The gallery labels the genre beside the kind and makes it searchable; Markdown export carries it in the frontmatter.
  • The genre templates consume the palette tokens and hard-code no colour, so every theme works in every layout.
  • Contracts forbid <article> inside the body: the parser ends the note at the first </article>, which would have silently truncated a field guide after its first entry.

Builds on #8.

A note's genre is the shape of its content, picked from what the source is
rather than from a preference: an argument stays the annotated offprint, a
catalogue of things becomes a field guide with a matrix and a card per entry,
and a dish becomes a recipe card. Each genre is one body contract the agent
writes to and one template that renders it; the theme stays orthogonal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@davertor
davertor merged commit c930232 into main Sep 9, 2026
1 check passed
@davertor
davertor deleted the feat/genres branch September 9, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant