feat(design): DL-1 unified design-language token layer (pmoves/design/) - #1827
Conversation
Source-of-truth design spec. Reframes the unified-UI effort from 'pick a palette' to 'wire the per-persona theme engine that already exists' (agent_signatures.yaml -> BoTZ Gateway theme API -> agent_terminal_theme.py). Decisions: D1 tokens from the persona registry; D2 Model A base (one cool PMOVES armor) with B/C layered; D2b two registers (agent stark / human warm-cool); D2c fonts are tokens (Orbitron/Exo2 defaults, modular); D3 motif kit (shard=CGP point, hex=MOF pore, cymatic=DARKXSIDE skin); D5 CF site -> A2UI demonstrative rebuild (later phase). North Star: POWERFULMOVES = DARKXSIDE (bio/head) + PMOVES (digital/body), Headmaster-formed, Drift-piloted; Gumby soul. Phasing DL-0..DL-4. Credits 4090 W1 theme lane; DL-1 is purely additive. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…90 W1) CLAIM for the DL-1 web design-token layer. Additive: creates pmoves/design/, reads agent_signatures.yaml read-only, touches no 4090-owned files. Invites 4090 pair-review as W1 theme-lane owner. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove unused imports/param + scope Pyright import-resolution ignores in the token-layer tests (5/5 still green). Add research/DL_FOLLOWON_LANES_2026-06-16.md — open call to claim DL-1b (tour re-skin) / DL-2 (token roll) / DL-3 (persona-adaptive + Showtime) / DL-4 (CF->A2UI demonstrative). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 30 minutes and 48 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughIntroduces the ChangesDL-1 Design Token Layer
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… pair-review) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t check Addresses the approve-with-nits review of #1827: - W2: reject CSS/TS-breaking token values (; } " newline) so a typo in the registry fails loudly instead of silently committing broken build/ output. - N2: clear error when a referenced agent is missing a required field (color/accent), symmetric with the unknown-agent error. - W1: 'make design-tokens-check' fails if committed build/ drifted from the generator (deterministic output, cheap guard). +2 tests (7/7 green). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
POWERFULMOVES
left a comment
There was a problem hiding this comment.
Review — approve-with-nits (findings addressed)
Reviewed via pr-review-toolkit:code-reviewer against origin/main...HEAD. Verdict: approve-with-nits; the token layer is correct, deterministic, CSP-clean, and tested. Confirmed-good: CSP-cleanliness (no inline style/script bodies, ES modules, no remote URLs), override precedence (overrides applied last), valid default-theme selector, cross-platform pathlib+utf-8+sorted() determinism, end-to-end naming contract.
Three findings; all now fixed on head (commit pushed):
- W1 —
build/drift had no guard. Committed output could silently diverge from source if someone edits a theme/registry and forgets to regenerate. → Addedmake -C pmoves design-tokens-check(regenerates +git diff --exit-code -- design/build). Deterministic, so it's a cheap CI-wireable guard. - W2 — registry values written verbatim into CSS/TS. A typo/hostile value with
;}"or newline would produce brokenbuild/that still commits clean (silent failure). → Added a_safe()guard rejecting those chars (single quotes/commas/parens still allowed for font stacks +rgba()); raises a clearValueError. +test. - N2 — missing
color/accenton a present agent raised a bareKeyError('color'). →_field()now raisesagent 'x' missing required theme field 'accent', symmetric with the unknown-agent error. +test.
N1 (toggle hardcodes the two theme names) is acceptable for the 2-theme preview and is superseded when DL-3 wires setPersona() off the generated themes map. Tests now 7/7.
Note: requesting 4090 pair-review as W1 theme-lane owner before the OPERATOR (DARKXSIDE) merge gate.
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/superpowers/specs/2026-06-15-pmoves-unified-design-language.md`:
- Around line 48-68: The code fences in the REGISTRY diagram (starting at line
48) and the other diagram section (starting at line 136) are missing language
labels, which violates the MD040 markdownlint rule. Add the language label
"text" to each opening fence marker by changing the three backticks (```) to
```text on both diagram blocks to satisfy the markdown linter while maintaining
the diagram clarity.
- Around line 143-145: The documentation file lists tokens.css as a generated
artifact, but the actual build system generates theme-specific files named
tokens.<theme>.css plus tokens.ts. Update the diagram in the file to reflect the
actual generated CSS artifacts with the proper naming pattern
(tokens.<theme>.css) instead of the incorrect tokens.css reference, ensuring the
documentation accurately represents what the build system produces.
In `@pmoves/design/build/tokens.darkxside-skin.css`:
- Line 11: The pm-font-display token definition in the source file
pmoves/design/tokens.base.json contains an unquoted Orbitron font name, which
creates an inconsistency with the quoted 'Orbitron' used in globals.css. Locate
the pm-font-display token definition in pmoves/design/tokens.base.json and quote
the Orbitron font name as 'Orbitron' to maintain consistency with the existing
convention. This change will automatically propagate to all generated CSS token
files during the build process.
In `@pmoves/design/build/tokens.pmoves-armor.css`:
- Line 11: The font name `Orbitron` in the `--pm-font-display` CSS custom
property is unquoted while other fonts in the same stack like `Exo 2` are
quoted. Add single quotes around `Orbitron` to match the quoting convention of
the other font names in the font stack and ensure consistency across all font
definitions in the base token.
In `@pmoves/design/tests/test_generate.py`:
- Around line 30-34: Replace the try-except blocks that use assert False with
pytest.raises() context managers in three locations in this test file. Instead
of wrapping the resolve_theme call in a try-except and asserting False, use
pytest.raises(KeyError) as a context manager to catch the expected exception.
After the with block exits, assert the expected error message content by
checking excinfo.value. Apply this same pattern to all three problematic test
cases mentioned (around lines 30-34, 66, and 77) to ensure exceptions are
reliably tested even under optimized Python execution.
In `@pmoves/Makefile`:
- Around line 3925-3931: The design-tokens-check target uses git diff to
validate that the design/build directory hasn't drifted from generated output,
but git diff only detects changes to tracked files, so newly generated but
untracked artifacts in design/build will not be caught. Mark both the
design-tokens and design-tokens-check targets as .PHONY so they always execute,
and update the validation logic to include untracked files in the drift
detection (consider using git status or combining git diff with a check for
untracked files in the design/build directory).
In `@research/DL_FOLLOWON_LANES_2026-06-16.md`:
- Around line 28-31: Mirror the operational topology details from this DL-3 lane
document into the canonical context files to prevent documentation drift. Add
the Showtime event subscription details (showtime.all_green.v1 and the
:9225/sse/events endpoint) to the appropriate canonical documentation:
specifically, add the NATS event subject showtime.all_green.v1 to
.claude/context/nats-subjects.md and add the Showtime service port/endpoint
details to .claude/context/services-catalog.md. This ensures topology facts are
maintained in a single source of truth and keeps lane planning docs synchronized
with the service catalog.
- Around line 12-13: The markdown documentation for the DL-1 output section in
the lane summary is incomplete and does not reflect all token families generated
by pmoves/design/generate.py. Locate the token inventory list in the DL-1 output
description (currently showing
--pm-bg/-surface/-ink/-accent/-accent-soft/-accent-2/-signature/-radius/-font-*)
and add the missing --pm-space-* token family to ensure the documentation
accurately represents all token contracts emitted by the generate.py script.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 15110fa3-ed26-45e4-a458-d0790949ef67
📒 Files selected for processing (19)
docs/superpowers/plans/2026-06-16-dl-1-design-token-layer.mddocs/superpowers/specs/2026-06-15-pmoves-unified-design-language.mdpmoves/Makefilepmoves/design/.gitignorepmoves/design/README.mdpmoves/design/build/tokens.darkxside-skin.csspmoves/design/build/tokens.pmoves-armor.csspmoves/design/build/tokens.tspmoves/design/generate.pypmoves/design/preview.csspmoves/design/preview.htmlpmoves/design/preview.jspmoves/design/tests/test_generate.pypmoves/design/theme-provider.jspmoves/design/themes/darkxside-skin.jsonpmoves/design/themes/pmoves-armor.jsonpmoves/design/tokens.base.jsonpmoves/docs/AGENTS/AGNOTE4482PHI.t1.mdresearch/DL_FOLLOWON_LANES_2026-06-16.md
… drift gate, docs) CodeRabbit trim of PR #1827: - Quote 'Orbitron' in tokens.base.json (consistency w/ globals.css) + regenerate both theme CSS files and tokens.ts. - test_generate.py: replace 'assert False' in except handlers with pytest.raises() so failures aren't masked under python -O. - design-tokens-check: mark phony + 'git add --intent-to-add' so the drift gate also catches NEW untracked build/ artifacts (plain git diff sees only tracked). - spec doc: label diagram fences (MD040) and correct tokens.css -> tokens.<theme>.css. - research lane doc: add the --pm-space-* family to the token inventory. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Triage — coderabbitai[bot] review on PR #1827 (read-only signal for /pr-trim) No P0 or P1 findings from coderabbitai[bot]. P2: 2, P3: 6 P2 findings:
P3 (6 nits/style): MD040 unlabelled fences in spec doc (×2), wrong artifact name |
What
DL-1 of the unified design language: a build-time token layer (
pmoves/design/) that reads the canonical persona registry (pmoves/config/agent_signatures.yaml) and emits CSS variables + a typed TS map, with a CSP-clean preview proving both themes.Reframes the unified-UI effort from "pick a palette" to "wire the per-persona theme engine that already exists" (registry → BoTZ Gateway theme API →
agent_terminal_theme.pyCLI). This PR adds the web consumer that was missing.docs/superpowers/specs/2026-06-15-pmoves-unified-design-language.mddocs/superpowers/plans/2026-06-16-dl-1-design-token-layer.mdHow
generate.py(uv) merges base neutrals + per-theme overlays + registry-sourced accents →build/tokens.<theme>.css(:root[data-theme]vars) +build/tokens.ts.pmoves-armor(default, cool —--pm-accent #7C3AED) anddarkxside-skin(warm —--pm-accent #E11D48, DARKXSIDE✦). Accents resolve from the registry at build time (not hard-coded).theme-provider.js— dependency-freedata-themeswap.preview.html/.css/.js— CSP-clean showcase + motif kit (shard=CGP point, hex=MOF pore,✦=signature).make -C pmoves design-tokensregenerates (idempotent).Lane boundary (credits 4090 W1)
The theme engine is 4090-claude's W1 deliverable (PRs #1065/#1101). This PR is purely additive: it reads
agent_signatures.yamlread-only and modifies none ofagent_terminal_theme.py,botz_cli.py, their tests, or the/v1/agent/*gateway routes. 15 files changed — 14 underpmoves/design/+ one appendedpmoves/Makefiletarget. CLAIM logged inAGNOTE4482PHI.t1.md.Verification
pytest pmoves/design/tests/→ 5/5 green (TDD: tests written failing-first per task).make -C pmoves design-tokens→ idempotent (no working-tree diff after regen).pmoves-armor(--pm-accent #7C3AED) ↔darkxside-skin(--pm-accent #E11D48); both themes render swatches + recolored motif kit correctly.Deviations (all in-lane, documented in the build report)
uv --no-projecton all invocations — the repo'spmoves/pyproject.tomlis malformed (project.nameunset); fixing it is out of this lane.pmoves/design/.gitignorewith!build/— root.gitignoreignoresbuild/globally; build output is committed so consumers need no build step.Follow-on lanes (open call to claim — NOT this PR)
research/DL_FOLLOWON_LANES_2026-06-16.md: DL-1b CHIT-tour re-skin (+ absorb #1697), DL-2 token roll to Notebook/A2UI/CF, DL-3 persona-adaptive runtime + Showtime live skin, DL-4 CF→A2UI demonstrative rebuild.Review
Requesting 4090 pair-review as W1 theme-lane owner. Note: fonts are tokens (Orbitron/Exo2 defaults); self-hosting the woff2 is a DL-2 add. Final merge on the OPERATOR (DARKXSIDE) gate.
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests