One snippet model feeds both renderers
The component registry defines agent and human renderers. The code-snippets design brief14 gives both renderers one snippet model.ΒΆ
The proposed CodeSnippet carries:ΒΆ
- Selected source text and original line numbers.ΒΆ
- Highlighted lines and collapsed gaps.ΒΆ
- Repository, commit, path, and source link.ΒΆ
- Diagnostics.ΒΆ
HTML adds colour, a filename, numbered lines, and a source link. Agent Markdown adds the repository, commit, path, and original line numbers, plus a Markdown code block. Both renderers use the same source facts.ΒΆ
Both views preserve the same source facts. The planned property compares each view with the pinned source9.ΒΆ
Whole-file tokenization7 supplies the tokens. Engine-neutral tokens7 keep renderer input independent of Shiki.ΒΆ
See the glossary for snippet model and renderer parity, the term for views preserving the same source facts.ΒΆ
Sources
- Component registry. Primary source. Agent and human renderers Accessed 2026-10-02.
- Code-snippets design brief. Primary source. Shared CodeSnippet model Accessed 2026-10-02.
Last changed 2026-10-10 in 978dccc. Source on GitHub. Change log.
Linked from
- Agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
Code snippets quote a pinned source β Shipped design brief: pinned Git objects, typed diagnostics, and one build-only snippet model for both views.
- Change log. What changed in the files served here, newest first.
One snippet model feeds both renderers β edited: docs: point live docs, skills and Brain pages at apps/site
- Code snippets quote a pinned source. Shipped design brief: pinned Git objects, typed diagnostics, and one build-only snippet model for both views.
It produces one snippet model for both renderers.
- Engine-neutral tokens keep adapters replaceable. The highlighter port exposes text, roles, and font styles rather than Shiki types.
One snippet model supplies both renderers.ΒΆ
- Full agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
- Rat Stack lore | rat-stack. Short, source-grounded notes on the ideas and decisions behind rat-stack.
Code snippets quote a pinned source β Shipped design brief: pinned Git objects, typed diagnostics, and one build-only snippet model for both views.
- Source change history (log.md). The generated change log as Markdown.
One snippet model feeds both renderers β edited: docs: point live docs, skills and Brain pages at apps/site
- Tokenize the whole file before slicing. Select lines after tokenization so preceding code still guides recognition of multiline strings and comments.
Both renderers consume one snippet model.