Skip to content

Kickoff handoff

priyome (Russian, chess) — a standard method or technique. A common move, plan, or pattern that experienced players recognize and reuse.

This document seeds a future kickoff session. Priyome doesn’t exist yet beyond this folder; it’s an idea worth doing carefully, and that session is where the real design work starts. Read this for context, then we’ll dig in.


A sibling project in the chess workspace, parallel to Motif:

  • Motif ships components for building chess applications (Lichess / Chess.com / TNMP-shaped UIs — panels, full-pane MoveLists, EnginePanels, app-shell-aware components).
  • Priyome ships components for embedding chess as web content — inline diagrams, clickable move references in prose, compact widgets that drop into any HTML document.

The thesis: chess data is a first-class web content type, like images or code snippets, and the library that treats it that way enables an entirely new category of chess-aware content.

Audience extends beyond chess-app developers to anyone embedding chess in documents: bloggers, book authors, educators, course creators, content platforms, static-site authors, anyone writing prose where chess deserves to be interactive rather than just visible.


Why it’s separate from Motif (not a Motif extension)

Section titled “Why it’s separate from Motif (not a Motif extension)”

The two libraries share underlying infrastructure (Tabia for data, Rabbit for board rendering) but have genuinely different theses, audiences, and consumption shapes:

MotifPriyome
ThesisBuild polished chess apps fastMake chess data first-class web content
ConsumerChess app developersAnyone embedding chess in documents
ShapePanel-sized componentsInline-sized components
StateRich, persistent (sessions, routing)Stateless or minimally stateful
Distributionnpm + bundlerProbably CDN-friendly, drop-in script
Polish targetCoherent app experienceFit gracefully into host’s design
Layout assumptionOwns its viewport regionLives inside arbitrary DOM context

Bundling these into one library would force compromises on both sides. Motif’s API would double; Priyome’s components would inherit Motif’s panel-shaped baggage. Separate projects keep each thesis clean.

The workspace already supports this — adding a fourth sibling has roughly zero incremental cost.


Concrete use cases that drove the design discussion:

1. The prep reader. A tool for reading opening books (Avrukh, Kaufman, etc.) where the page is mostly prose with embedded chess content. Hundreds of inline move references per chapter; dozens of diagrams; the reader needs an integrated experience where moves in the text and the viewer’s current position stay in sync.

2. reference-tree. A workspace project for navigating opening reference trees from PDF books. Similar shape: prose with chess-aware annotations, cross-references, position bookmarks.

3. Chess.com-style blog articles, but interconnected. Chess.com solved “embed a game in a blog post” — each widget is a self-contained mini-app. What’s unsolved is making the prose itself chess-aware: clickable move references in surrounding text, position pills that pop out diagrams, scroll-position sync with a primary viewer. The chess content stops being isolated embeds and becomes an interconnected reading experience.

4. Educational content. Courses, lessons, puzzle articles, tutorials — anywhere a teacher or content creator wants chess to be a participatory medium in their writing.

5. Hand-authored HTML pages. A user writing a personal site or blog post adds <priyome-diagram fen="..." /> and gets a working chess diagram without setting up a build pipeline.


Five rough categories emerged. Naming prefix here is illustrative (priyome-) but not committed.

Embeddable in flowing content. The HTML-element analogues for chess data.

  • priyome-diagram — inline static board for a FEN, optional arrows/squares. The <img> for chess positions.
  • priyome-line — inline move sequence as text, each move clickable, hover preview. The code-snippet for chess.
  • priyome-figurine — single-move figurine rendering (replacing “Nf3” with a knight icon + “f3”). Useful for prose-heavy chess writing.
  • priyome-position-pill — tiny clickable badge representing a position; expands to a diagram on click/hover. The <abbr> for chess.

Fit in a sidebar, margin, or inline figure — not a full pane.

  • priyome-mini-viewer — compact game viewer (~300×400px). Board + step controls + move readout, blog-friendly.
  • priyome-position-stepper — fixed board with prev/next buttons walking through a sequence. Teaching diagrams.
  • priyome-puzzle-card — a position + “your move” affordance, embeddable as a card in any layout.

Render nothing themselves; make other components work together.

  • priyome-game-context — wraps a region of the page; child widgets that need shared chess state subscribe to it. Multiple inline diagrams + a viewer + move-refs in prose all coordinate via this container.
  • priyome-position-cursor — virtual cursor tracking “the current position” across many widgets. Updates when the user clicks a move ref, scrolls past an anchor, navigates the board, etc.
  • priyome-line-anchor — declarative chess-content anchor in prose; as the reader scrolls past it, the page-level board updates. Reading-position binder.
  • priyome-move-ref — inline move reference (in prose) that drives its containing game-context. <a href> for chess moves.

For apps where the user creates chess content.

  • priyome-position-editor — drag pieces onto a board to set up a position. No move legality, no engine; pure position authoring.
  • priyome-move-recorder — capture moves as the user makes them.
  • priyome-annotation-input — comment/NAG/arrow input with chess-aware shortcuts.

Provide data; other components consume it.

  • priyome-fen-source — declarative provider of a FEN, referenceable by name.
  • priyome-pgn-source — same for PGNs.
  • priyome-game-library — named collection of games available to the page.

The chess.com comparison (the canonical worked example)

Section titled “The chess.com comparison (the canonical worked example)”

The chess.com blog article we looked at — an article about chess “domination” with embedded Kasparov-vs-Shirov game viewer — is the perfect baseline. It shows the ceiling of the existing approach: a polished, self-contained widget embedded as a block in prose.

What chess.com does:

  • Each chess viewer is a self-contained mini-application
  • Prose around it is plain text
  • Move references in the prose (“17. Rxb7!?”) aren’t clickable; reader has to mentally translate to “scroll up, click forward N times in the widget”
  • Concept words (“blockade”, “exchange sacrifice”) have no inline previews
  • Multiple widgets on the page don’t share state

What Priyome enables:

  • The same article, but every move reference is a priyome-move-ref that navigates the embedded viewer
  • Concept words have priyome-position-pill previews
  • The whole article wraps in a priyome-game-context so widgets coordinate
  • Reading flow is continuous; no widget-context-switching

This isn’t a small UX improvement — it’s a categorical change in what chess writing on the web can be.


Architectural constraints (what makes content primitives different)

Section titled “Architectural constraints (what makes content primitives different)”

Every Priyome component should satisfy three properties that Motif’s panel-shaped components don’t:

  1. Embeddable in any DOM context. Works in a <p>, an <article>, a <table>, a <figcaption>. Doesn’t demand a viewport region; inline- block-friendly. Author can drop it inside any HTML structure.

  2. Stateless or minimally stateful. Reads from external state (via priyome-game-context or its own attributes) and renders. Doesn’t manage sessions; doesn’t persist preferences. Coordination is via parent context, not internal state.

  3. Coordinates via declarative anchors, not imperative wiring. Multiple widgets cooperate by referring to the same game-context, not by the consumer writing event handlers. The author writes HTML; the wiring is the parent containment.

These constraints sound like restrictions but are actually what enable the “drop into any document” property. Motif components break all three; that’s fine for chess apps, fatal for content primitives.


What’s shared with Motif (the workspace foundation)

Section titled “What’s shared with Motif (the workspace foundation)”

Priyome doesn’t reinvent chess logic. It consumes the same foundations:

  • Tabia — chess data layer (PGN parser, Game factory, identity hashing, merge, ReplayEngine). Priyome components are display+coordination shells over Tabia.
  • Rabbit (or chessground, via Tabia’s renderer-adapter contract) — board rendering. Priyome doesn’t render boards itself.
  • Action vocabulary — if Motif establishes a shared action vocabulary (copy, flip, play, etc.), Priyome’s buttons participate in the same protocol. Same <motif-button action="copy"> works in a Priyome viewer.
  • Design tokens (probably) — Priyome components want Motif-flavored defaults but must respect the host page’s design when overridden. Token inheritance with override-friendly cascading.

What’s NOT shared:

  • Motif’s panel-shaped components (they don’t fit Priyome’s context)
  • Motif’s app-shell assumptions (Priyome lives in someone else’s page)
  • Motif’s distribution model (Priyome wants CDN-friendly, no-build use)

These are the design decisions worth nailing carefully:

  1. Tag prefix. priyome-*? p-*? Something more semantically chess-y? Affects every component’s name; worth deliberation.
  2. Distribution model. Pure ESM via CDN? Bundled custom-elements registry? Drop-in <script> tag? Multiple targets? How does a non-developer (bookmark-and-paste user) install this?
  3. Framework target. Vanilla web components? Lit (to match Motif)? Stencil for build-time optimization? Astro components for static-first? Maybe multiple, with a shared core.
  4. Static site generator / MDX integration. What’s the story for embedding in MDX, Astro, Eleventy, Hugo, etc.? Markdown extensions? Shortcodes?
  5. Theming inheritance. How do components inherit from the host page’s CSS while still being recognizably Priyome by default? CSS custom properties with sensible fallbacks?
  6. Minimum v0 surface. Which 4–6 components ship first? My intuition: diagram, mini-viewer, game-context, move-ref. Enough to make the prep-reader and a chess.com-style article possible.
  7. First real consumer. Probably the prep reader. Driving Priyome v0 from its actual needs avoids speculative design.
  8. Naming for the project itself. Is Priyome the keeper-name or a codename? Russian chess term feels right thematically. Final call later.

~/chess/
├── PROMOTE/ ← the stack (this project lives here)
│ ├── Tabia/
│ ├── Motif/
│ ├── Rabbit/
│ ├── Priyome/ ← this project
│ └── OpenFile/
├── TNMP/ ← reference implementation
├── reference-tree/ ← consumer app (will consume Priyome)
└── ...other apps

Independent git history per project (per workspace rules). Priyome consumes Tabia and Rabbit; doesn’t depend on Motif. Apps may consume both Motif and Priyome (a “chess app with embedded teaching content” wants components from both libraries).


  • Not a roadmap (no timelines or commitments)
  • Not a spec (no API definitions, no implementation plans)
  • Not exhaustive (the kickoff session will go far deeper)

It’s a hand-off — enough context to start the kickoff cold, plus the open questions worth pre-thinking before that session.