Skip to content

Theme passthrough (--theme) and theming docs — closes #3 - #5

Merged
YuniqueUnic merged 2 commits into
mainfrom
feat/theme-passthrough-3
Sep 24, 2026
Merged

YuniqueUnic merged 2 commits into
mainfrom
feat/theme-passthrough-3

Conversation

@YuniqueUnic

Copy link
Copy Markdown
Owner

Summary

Closes #3. The engine has had theme customization since the v1 API, but the skill neither passed a stylesheet through nor documented it. Now:

  • All three ask scripts (ask.py / ask.sh / ask.ps1) accept --theme CSS and forward it as --web-theme, probed exactly like --timeout — an older engine notes it on stderr and the ask proceeds unthemed rather than failing.
  • SKILL.md documents the real mechanism (the issue proposed --css-file with --ui-* tokens; the actual flag is --web-theme and the tokens are the --color-* / --radius-* design tokens from globals.css), links schemaui's examples/themes/midnight.css as the copy-me example, shows how an external design system maps onto the tokens (one commented rule per mapping), and covers --frontend DIR + the REST contract for fully custom frontends.
  • Prompt block carries the short version for AGENTS.md users.
  • READMEs mention the theming surface and the new script flag.

Test plan

  • New unit tests: --web-theme rides before the greedy -o; dropped for engines without the flag; no flag without a stylesheet
  • New e2e: a themed session serves the stylesheet (marker + token assertions) at /api/v1/theme.css and the round-trip completes
  • Full suite: 31 passed, 3 skipped
  • deno fmt --check clean

…ntends

Closes #3. The engine has shipped theme customization since the v1 API —
`--web-theme` serves a stylesheet at /api/v1/theme.css layered over the
design tokens, and `--frontend DIR` hosts a replacement index.html — but
the skill neither passed a theme through nor documented any of it, which
is what the issue meant by "no documented path".

All three ask scripts gain `--theme CSS`, probed the same way as
`--timeout`: a build without the flag notes it on stderr and the ask
proceeds unthemed instead of failing. SKILL.md documents the real
mechanism (the issue proposed `--css-file` and `--ui-*` tokens; the
actual flag is `--web-theme` and the tokens are the `--color-*` /
`--radius-*` design tokens from globals.css), points at schemaui's
midnight.css example to copy, explains how an external design system
maps onto the tokens one commented rule at a time, and covers
`--frontend` against the REST contract for the rare case CSS can't
express the request. The prompt block carries the short version.
…ntends

Closes #3. The engine has shipped theme customization since the v1 API —
`--web-theme` serves a stylesheet at /api/v1/theme.css layered over the
design tokens, and `--frontend DIR` hosts a replacement index.html — but
the skill neither passed a theme through nor documented any of it, which
is what the issue meant by "no documented path".

All three ask scripts gain `--theme CSS`, probed the same way as
`--timeout`: a build without the flag notes it on stderr and the ask
proceeds unthemed instead of failing. SKILL.md documents the real
mechanism (the issue proposed `--css-file` and `--ui-*` tokens; the
actual flag is `--web-theme` and the tokens are the `--color-*` /
`--radius-*` design tokens from globals.css), points at schemaui's
midnight.css example to copy, explains how an external design system
maps onto the tokens one commented rule at a time, and covers
`--frontend` against the REST contract for the rare case CSS can't
express the request. The prompt block carries the short version.
@YuniqueUnic
YuniqueUnic merged commit 7a1dc48 into main Sep 24, 2026
4 checks passed
@YuniqueUnic
YuniqueUnic deleted the feat/theme-passthrough-3 branch September 24, 2026 07:14
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.

[Feat] Add prompt section for schemaui Web UI theme customization

1 participant