ADR 0008: Publish only the approved source attribution, as front matter
- Status: Accepted
- Date: 2026-10-25
- Decision issue: #158
- Parent story: #144
- Builds on: ADR 0004, ADR 0007
Context#
ADR 0007 keeps each shared publication in a private record that never reaches the build. A reader of the finished work still needs to see what prompted it: the original source and the guiding question. That must work in the native page, Admin preview, feeds, and portable exports without leaking participants, invitations, drafts, or other collaboration state.
Decision#
- The public attribution is the guiding question plus the first source's title, link, and type
(
Public source attributionin CONTEXT.md). Source IDs, provenance, creator, publisher, date, ISBN, later sources, and every participant, contribution, approval, and policy field stay private. Later sources are not published until a story defines how. - It travels on the resulting Post as four flat front matter keys:
guidingQuestion,sharedSourceTitle,sharedSourceUrl,sharedSourceType. The Post stays the canonical public work; no new store, API, or output path exists, so preview, build, feeds, and exports cannot disagree.SharedAttribution::from_recordbuilds the approved subset andfront_matter_lineswrites it, so the later publish operation (#169) has one seam. - Values are validated on load, not trusted: the link must be absolute HTTP(S) with no
credentials (the record's own normalisation), the type one of the five known kinds, text one
line within the record's byte limits without control or bidi characters. A violation fails
the post load with a message naming the key, so a failed or tampered value publishes nothing.
from_recorddrops a link that is no longer a safe public address and keeps the title. - The source is always rendered as a plain link, never an embed. Supported providers (YouTube,
CodePen) therefore need no fallback, and an unsupported provider degrades to the same link.
Native, portable HTML, Markdown, and text show identical values; the portable projection
lists the question, title, and link as required semantic facts, so a representation that
loses one fails instead of exporting silently. Markdown escapes
<and&as well, so an untrusted title cannot become raw HTML in an export. llms-full.txtlists the same two lines per post. Drafts remain excluded from every public output; authenticated preview reads the same Post.
Consequences#
- Posts without these keys render byte-for-byte as before.
- Embedding the source video, several public sources, and per-destination policies are deliberately left to later work; each can extend the keys without changing existing posts.
- The record is not read at build time, so editing or deleting it never changes published output.