Skip to content

docs(rendered-views): record the brandable HTML default design - #19121

Open
kyle-sexton wants to merge 5 commits into
mainfrom
docs/16412-brandable-html-default
Open

kyle-sexton wants to merge 5 commits into
mainfrom
docs/16412-brandable-html-default

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Closes #16412
Closes #19169

Summary

Records the design for one shared, brandable HTML default for every plugin's rendered pages (ADR 0133) and updates the rendered-views contract so a consumer may override the palette, the type stacks and a logo through configuration. Every design choice comes from the owner's recorded decisions on #16412 (Q1 on 2026-11-17; Q2-Q5 on 2026-11-24) and #19169 (the data: brand assets, 2026-11-25). This PR writes them down and adds no implementation.

Fix

  • docs/adr/0133-let-a-consumer-brand-rendered-pages-through-one-shared-token-layer.md (new) covers:
    • What a consumer may override: the palette roles; the type stacks, as installed fonts or font files embedded as data: URLs; and a logo, as one inline SVG or one embedded data: PNG or JPEG. Nothing is ever loaded from a URL.
    • What stays fixed: layout, the accessibility floor, the theme toggle and the comment box.
    • The floor check: it covers every pair an overridable role takes part in (fg, muted and link text on bg and panel; the focus outline on both) in both schemes. An override that fails is dropped.
    • Where the setting lives: branding sits in docs/conventions/rendered-views.yaml, with userConfig as an optional per-user override, resolved in ADR 0075 order.
    • The token layer: one lib/html-tokens.css, copied per plugin through scripts/shared-copies.txt.
    • It also sets the migration waves and the drift checks.
  • docs/contracts/rendered-views/README.md: the shared chrome section allows those three overrides through configuration only. "No accent or palette picker" (a control on the page) still holds. The section also states that the report profile and interactive rule 3 keep refusing the embedded data: forms until work item feat(rendered-views): add the shared token layer and the branding setting #19170 makes the policy change.
  • docs/contracts/rendered-views/CHANGELOG.md: a dated entry.

Design points settled by the evidence, not by a new owner decision:

  • Architecture joins the first migration wave. Q4's reason was "carries the chrome", and architecture took a chrome copy on 2026-11-16 (scripts/shared-copies.txt).
  • The shared interview surface migrates with planning. Both interview pages already copy the chrome, and no requirement of theirs differs.
  • The copies-match half of the drift check reuses sync-shared-copies.sh --check. A check against hardcoded palette or type values does not exist yet and has its own work item (feat(rendered-views): fail a page source that hardcodes palette or type tokens #19171).
  • The floor check covers every pair an overridable role touches, not only the three the floor table lists, so the contract's "never below the floor" holds (claude-review finding on this PR).

Loosened checks

Work items

Filed before merge, each with Refs: #16412. Each is labeled session-owned so no lane builds against this design before it merges; the label comes off when this PR merges.

Verification

  • scripts/check-affected.sh --base HEAD~1 --no-fetch: 19 passed, 5 skipped (none applied) over 3 changed files, markdownlint included.
  • CI-only checks run by hand: check-line-citations.py exit 0 (re-run on the review-fix commit); check-adr-numbers.sh --check ADR numbers unique; check-contract-clause-coverage.py passed; check-purged-em-dashes.sh clean.
  • Inventory for the waves, run 2026-11-25: grep -rlE --exclude-dir=node_modules -e '--clay|prefers-color-scheme' plugins found 55 files, which leaves 26 page sources in 15 plugins once the chrome copies, evals, tests and non-page files are removed.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 25, 2026 13:15
ADR 0133 records the owner's decisions on #16412: a consumer may
override palette, type and logo; layout, the accessibility floor, the
theme toggle and the comment box stay fixed. The setting lives in the
convention home with userConfig as the per-user value, one lib/ token
layer is copied per plugin through scripts/shared-copies.txt, and the
chrome-carrying plugins migrate first.

The rendered-views contract drops "no team or user theme override" and
allows exactly those three overrides, pointing at the ADR.

Refs: #16412

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… branding

The owner chose on #16412 to let consumer branding embed a PNG or JPEG
logo and brand font files as data: URLs, never loaded from a URL. ADR
0133 and the contract now say so, and record the page-policy widening
(img-src data:, font-src data:) the first work item makes.

Refs: #16412

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 25, 2026 18:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T18:35:41.596036Z 68e9635 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 68e96358a6cd5cd6c96e4f14ca854f26ae108d95: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #19121 (docs only)

I found no security issues.

The pull request changes three Markdown files and no code, workflow, manifest or trust control:

  • ADR 0133 (new): records the design for consumer branding of rendered pages.
  • The rendered-views contract's shared-chrome section: now allows a palette, type and logo override set through configuration, never as a control on the page.
  • The contract's CHANGELOG: gets a dated entry for that change.

None of the changed files matches a TRUSTED PATHS: glob. No .claude-plugin manifest is touched, so there are no manifest lines.

What I checked

  • Instruction-surface lens. The contract edit softens a standing rule, "no team or user theme override", so the diff wasn't eligible for the no-security-surface skip.
    • The removed rule was about appearance, not about publishing, credentials or execution. The control a theme override could weaken, the page policy, is not edited here. The default-src 'none' policy and the report profile's url( and URL-attribute bans (docs/contracts/rendered-views/README.md:152-155, :179-181) are unchanged.
    • The ADR puts the widening (img-src data: and font-src data:, a data: URL admitted only in the logo slot and in @font-face, with magic-byte checks on the media type) in a later work item. That work item will get its own review.
    • The design keeps the guards a future implementation depends on: an SVG logo must still pass the allowlist that refuses <image>, <use>, <script> and SVG <style>. Colors and font families are validated rather than escaped into <style>. Nothing is ever loaded from a URL.
    • It states that branding does not take the publish trust walk because it never decides whether a page leaves the machine. That holds as long as the implementation keeps branding to appearance only. The contract text added by this pull request already limits the overrides to palette, type and logo and keeps the toggle, the comment box and the accessibility floor fixed.
  • Embedded text. The PR context contains no embedded instruction aimed at this lane.
  • Instruction exception register. I did not consult the register's protected-class list. I judged the softened rule by its consequence, and it guards no protected action.

No API credit is spent beyond this review run itself.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on 68e96358a6cd5cd6c96e4f14ca854f26ae108d95; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 68e96358a6cd5cd6c96e4f14ca854f26ae108d95: read 3 of 3 changed file(s); 2 finding(s), 2 as inline comments.

Code review: PR #19121 (docs only: ADR 0133 plus edits to the rendered-views contract and its changelog)

I read the whole diff (3 files). This is a first review of this PR, not blocking-only. There are no prior findings and no settled threads.

Findings (2, both inline on ADR 0133):

  1. Stale line citations. Six citations point into files this PR edits but use base line numbers. Five go into docs/contracts/rendered-views/README.md, which shifts by 7 lines after line 864. One goes into CHANGELOG.md, which shifts by 8. At this head each lands on unrelated text, for example README.md#L882 and CHANGELOG.md#L17.
  2. Incomplete accessibility-floor check. Decision 3 checks only three color pairs (body text, link text, focus outline). panel and muted overrides can still push panel text or secondary text below contrast, which breaks the contract's new promise that a below-floor override is dropped.

Against closing issue #16412:

  • Met: palette, type and logo are the only consumer overrides, and layout, the accessibility floor, the toggle and the comment box stay fixed.
  • Met: the design settles where the setting lives, the token layer, how each plugin takes it without importing a sibling plugin's files, the migration order (the interview surface migrates with planning, with a reason) and the drift checks.
  • Met: the contract README now allows exactly those three overrides.
  • Not met in this PR: "Work items exist for the migration, each linked from this issue." The PR body defers them to after merge and uses Refs:, so the issue is not auto-closed. I'm noting this, not counting it as a finding; the issue should stay open until the work items are filed. These are docs-only criteria, so no test could cover them.

Other notes:

  • The PR body's "Fix" bullet still describes the logo as "one inline SVG logo". The ADR and contract now also allow an embedded PNG or JPEG logo and embedded font files (the 2026-11-25 owner decision). Worth updating the description so it matches the record.
  • The README's new override sentence permits data: logos and fonts. The CSP rule (default-src 'none', README.md#L178-L182) and the report profile's url( ban still forbid them until work item 01 lands. The ADR records this, and the security lane owns judging the widening itself.
  • Loosened checks: this diff changes no check. The prompt had no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: line, so I used fail with no consumer entries and did not check the citation requirement. Loosened checks would be marked: fail (default); patterns: 0.
  • No plugin manifests changed.
  • No paid or billable resources are involved, so no hold.
  • No embedded instructions found in the PR context.
  • The verification steps listed in the PR body are the author's claims; I did not run them.

Verifier dropped 0 of 3 candidates.

The floor check in ADR 0133 named only body text, link text and focus,
so a panel or muted override could render text below 4.5:1 while the
contract promises no page is built below the floor. It now lists fg,
muted and link on bg and panel, and focus on both, in both schemes.

Line citations into the contract README and CHANGELOG moved to the
lines they point at after this PR's own insertions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 68e96358a6cd5cd6c96e4f14ca854f26ae108d95. What it wrote, as data:

What it wrote (40 lines)
Summary: Issue #16412 is linked as `closes`, so the whole spec applies. The PR delivers most of it:
  a design record (ADR 0133) and a contract edit for the decisions the issue records. Q1 allows
  palette, type and logo, and keeps layout, the accessibility floor, the toggle and the comment box
  fixed. Q2 puts the setting in the convention home, with userConfig below it. Q3 adds one
  lib/html-tokens.css copied per plugin through shared-copies.txt. Q4 sets the migration waves and
  moves the interview surface with planning, with a reason. The drift checks reuse
  sync-shared-copies --check and add a new hardcoded-value check as its own work item. Q5 implements
  nothing. Adding architecture to wave 1, beyond Q4's three plugins, is backed by evidence and does
  not block. CI passed on the head: Lint Repo, Check Plugins, Check Skills and Test Bash (0) all
  succeeded
  (https://github.com/melodic-software/claude-code-plugins/actions/runs/45676513970/job/139482085845).
  Two things block. First, the design and contract approve a loosened page policy: `img-src data:`
  and `font-src data:`, plus the validator admitting `data:` URLs. No spec entry asks for that. It
  rests only on an owner decision dated 2026-11-25 that appears in the PR body, with no
  owner-decisions record link in the spec. The edit also leaves the contract contradicting its own
  policy section. Second, the done-when item "work items exist for the migration" is not met: the
  body says they will be filed after merge.
- docs/contracts/rendered-views/README.md:867-870: the chrome section now allows fonts and PNG/JPEG
  logos embedded as `data:` URLs. The same contract's policy and report-profile rules (around lines
  152-155 and 179-181) still require `default-src 'none'` and refuse `url(` and URL-bearing
  attributes, so the contract now contradicts itself. That loosening also has no spec authorization.
  Limit the overrides to installed font families and an inline SVG logo that passes the SVG
  allowlist, or first get the widening recorded on #16412 with a link to the owner-decisions record
  line and the owner's verbatim words.
- docs/adr/0133-let-a-consumer-brand-rendered-pages-through-one-shared-token-layer.md:61-68: the
  'Policy change' bullet commits the first work item to adding `img-src data:` and `font-src data:`
  to the page policy and to the validator admitting `data:` URLs. That loosens a security check, and
  no spec entry on #16412 asks for it. The only authority is an owner quote in the PR body, with no
  owner-decisions record link in the spec. Remove the bullet and the `data:` forms in lines 53-60,
  and rework alternative (f) at lines 169-171 to match, unless the owner decision is recorded on the
  issue with that link.
- docs/adr/0133-let-a-consumer-brand-rendered-pages-through-one-shared-token-layer.md:128-129:
  #16412 is done only when 'work items exist for the migration, each linked from this issue'. The PR
  body says the eight work items will be filed after merge, so this closing delivery leaves that
  item undone. File the migration work items and link them from #16412, or stop linking this PR as
  closing the issue.
- PR body: the Fix section describes the logo override as 'one inline SVG logo', but ADR 0133 also
  allows an embedded PNG or JPEG. Make the body match the record. The 'Owner decision' section
  claims owner approval of a security-policy widening that the trusted spec text does not contain. A
  reviewer should not treat it as authorization.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 25, 2026
kyle-sexton and others added 2 commits November 25, 2026 15:44
… change

The chrome section allowed data: fonts and logos while the report
profile and interactive rule 3 still refuse them. It now says both
embedded forms wait on the img-src/font-src data: change ADR 0133
records, and stay refused until the first work item makes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(rendered-views): record the owner decision admitting data: brand assets One shared, brandable HTML default for every plugin's rendered pages

1 participant