Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9b4d465
fix(site-tokens): use live action colours and pick passing defaults
ZaredRogers Nov 9, 2026
e961b12
chore(site-tokens): say which dependencies and browser the scripts need
ZaredRogers Nov 9, 2026
c3bbbf2
Merge branch 'fix/git-2761-site-tokens-font-roles' into fix/git-2762-…
ZaredRogers Nov 9, 2026
428e308
Merge branch 'fix/git-2762-site-tokens-action-colours' into chore/git…
ZaredRogers Nov 9, 2026
3c49606
Merge branch 'fix/git-2761-site-tokens-font-roles' into fix/git-2762-…
ZaredRogers Nov 9, 2026
8797c04
Merge branch 'fix/git-2762-site-tokens-action-colours' into chore/git…
ZaredRogers Nov 9, 2026
033c0da
Merge branch 'fix/git-2761-site-tokens-font-roles' into fix/git-2762-…
ZaredRogers Nov 9, 2026
08d7183
Merge branch 'fix/git-2762-site-tokens-action-colours' into chore/git…
ZaredRogers Nov 9, 2026
414a8fd
Merge branch 'fix/git-2761-site-tokens-font-roles' into fix/git-2762-…
ZaredRogers Nov 9, 2026
f8d5b1b
chore(changelog): drop the entry a stack merge duplicated
ZaredRogers Nov 9, 2026
41f0d48
Merge branch 'fix/git-2762-site-tokens-action-colours' into chore/git…
ZaredRogers Nov 9, 2026
a6264f4
fix(site-tokens): record redirects and skip pages that land on one al…
ZaredRogers Nov 9, 2026
cca79c4
fix(site-tokens): pair each action's text with the buttons that have …
ZaredRogers Nov 9, 2026
c682720
Merge branch 'fix/git-2761-site-tokens-font-roles' into fix/git-2762-…
ZaredRogers Nov 9, 2026
555af8b
Merge branch 'fix/git-2762-site-tokens-action-colours' into chore/git…
ZaredRogers Nov 9, 2026
feba001
Merge branch 'chore/git-2763-site-tokens-setup-notes' into fix/git-27…
ZaredRogers Nov 9, 2026
3dd352b
Merge branch 'fix/git-2767-site-tokens-crawl-redirects' into fix/git-…
ZaredRogers Nov 9, 2026
6d3c3f6
fix(site-tokens): keep mobile spacing values in order up the ladder
ZaredRogers Nov 9, 2026
94a2ba4
Merge branch 'fix/git-2761-site-tokens-font-roles' into fix/git-2762-…
ZaredRogers Nov 9, 2026
dc7f47c
Merge branch 'fix/git-2762-site-tokens-action-colours' into chore/git…
ZaredRogers Nov 9, 2026
8b0a557
Merge branch 'chore/git-2763-site-tokens-setup-notes' into fix/git-27…
ZaredRogers Nov 9, 2026
95f7deb
Merge branch 'fix/git-2767-site-tokens-crawl-redirects' into fix/git-…
ZaredRogers Nov 9, 2026
69490d7
Merge branch 'fix/git-2765-site-tokens-action-text-pairing' into fix/…
ZaredRogers Nov 9, 2026
3c594db
Merge branch 'fix/git-2761-site-tokens-font-roles' into fix/git-2762-…
ZaredRogers Nov 9, 2026
8971bd6
Merge branch 'fix/git-2762-site-tokens-action-colours' into chore/git…
ZaredRogers Nov 9, 2026
98a7cb7
Merge branch 'chore/git-2763-site-tokens-setup-notes' into fix/git-27…
ZaredRogers Nov 9, 2026
cadb225
Merge branch 'fix/git-2765-site-tokens-action-text-pairing' into fix/…
ZaredRogers Nov 9, 2026
b72c8e8
Merge branch 'fix/git-2767-site-tokens-crawl-redirects' into fix/git-…
ZaredRogers Nov 9, 2026
2fc479d
fix(figma-tokens): start font stacks with the clean family name
ZaredRogers Nov 10, 2026
79aa6e7
fix(figma-tokens): keep the declared system stack for a generic family
ZaredRogers Nov 10, 2026
ce00aa6
fix(figma-tokens): map content and wide width to settings.layout
ZaredRogers Nov 10, 2026
5fc2814
fix(site-tokens): export the palette ramps in the LightSpeed order
ZaredRogers Nov 10, 2026
39aab34
fix(orphaned-refs): skip dependency folders and check border-radius p…
ZaredRogers Nov 10, 2026
c377002
refactor(orphaned-refs): convert the scan script and its tests to Typ…
ZaredRogers Nov 10, 2026
6ac7772
Merge pull request #4037 from lightspeedwp/fix/git-2774-orphaned-refs…
ZaredRogers Nov 11, 2026
f2c273a
Merge pull request #4035 from lightspeedwp/fix/git-2773-site-tokens-p…
ZaredRogers Nov 11, 2026
958d605
Merge pull request #4034 from lightspeedwp/fix/git-2772-figma-tokens-…
ZaredRogers Nov 11, 2026
5b77b17
Merge pull request #4033 from lightspeedwp/fix/git-2771-figma-tokens-…
ZaredRogers Nov 11, 2026
0083328
Merge pull request #4032 from lightspeedwp/fix/git-2770-figma-tokens-…
ZaredRogers Nov 11, 2026
4f42458
Merge pull request #4024 from lightspeedwp/fix/git-2766-site-tokens-s…
ZaredRogers Nov 11, 2026
20f0fc4
Merge pull request #4023 from lightspeedwp/fix/git-2765-site-tokens-a…
ZaredRogers Nov 11, 2026
5a4edf8
Merge pull request #4022 from lightspeedwp/fix/git-2767-site-tokens-c…
ZaredRogers Nov 11, 2026
99826cf
Merge pull request #4016 from lightspeedwp/chore/git-2763-site-tokens…
ZaredRogers Nov 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **Site Skills Setup Notes** — `site-to-design-tokens` and `site-to-figma-components` now say to run `npm ci` and, if the browser fails to launch, `npx puppeteer browsers install chrome` (npm 11 skips Puppeteer's download). `figma-to-block-theme` notes the `npm ci` step. ([#4009](https://github.com/lightspeedwp/.github/issues/4009))
- **Label inventory token** — The organisation label inventory now needs its own dedicated token, refuses the GitHub Actions token and fails when private repositories are missing. (#3734)
- **Private Repositories Stay Out Of Public Reports** — The label inventory and the weekly drift report now count private repositories without naming them or listing their labels. Detail goes to a private repository when one is set. (#3734)
- **Dependabot Merge Queue Fixed** — Dependabot pull requests no longer fail the Mergify queue check, because the queue now tests each pull request in place. ([PR #3817](https://github.com/lightspeedwp/.github/pull/3817))
Expand Down Expand Up @@ -114,6 +115,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- **Orphaned Refs Scan Scope** — `theme-orphaned-refs` skips dependency, build and agent folders (with `--exclude` for more), checks `border-radius` presets, suggests the nearest step for numeric ladders, and is now TypeScript with Jest tests (`find-orphaned-presets.ts`). ([GIT-2774](https://linear.app/lightspeedwp/issue/GIT-2774))
- **Site Tokens Palette Order** — `site-to-design-tokens` exports the colour ramps in the LightSpeed order (neutral, primary, brand, cta), so the theme palette follows the convention. ([GIT-2773](https://linear.app/lightspeedwp/issue/GIT-2773))
- **Figma Tokens Layout Widths** — `figma-to-block-theme` maps the content and wide width variables to `settings.layout` in px, instead of unitless values in `settings.custom.layout`, so the theme gets the design's widths. ([GIT-2772](https://linear.app/lightspeedwp/issue/GIT-2772))
- **Figma Tokens Monospace Stack** — `figma-to-block-theme` keeps the declared system stack for a generic family such as Monospace, and falls back to `monospace` for the monospace role, instead of writing `Monospace, sans-serif`. ([GIT-2771](https://linear.app/lightspeedwp/issue/GIT-2771))
- **Figma Tokens Font Stacks** — `figma-to-block-theme` starts each font stack with the clean family name and keeps the declared fallbacks, instead of the live site's own `@font-face` name, so the stack matches the theme's `fontFace` entries. ([GIT-2770](https://linear.app/lightspeedwp/issue/GIT-2770))
- **Site Tokens Spacing Minimums** — `site-to-design-tokens` keeps mobile spacing values in order up the ladder, raising a step that would shrink below the one before and listing it for the reviewer. ([GIT-2766](https://linear.app/lightspeedwp/issue/GIT-2766))
- **Site Tokens Action Text** — `site-to-design-tokens` takes each action's text colour from the buttons that have its fill, so text and fill are a pair the site really shows. ([GIT-2765](https://linear.app/lightspeedwp/issue/GIT-2765))
- **Site Tokens Crawl Redirects** — `site-to-design-tokens` records where each page landed, warns about redirects, and leaves out pages that land on one already captured. ([GIT-2767](https://linear.app/lightspeedwp/issue/GIT-2767))
- **Site Tokens Action Colours** — `site-to-design-tokens` uses the live button colour for action backgrounds (hover one step darker) and moves defaults that fail contrast to the nearest passing step, recording each move in the report. ([#4008](https://github.com/lightspeedwp/.github/issues/4008))
- **Site Tokens Font Roles** — `site-to-design-tokens` cleans font names (`argesta_displayregular` becomes Argesta Display), keeps the exact CSS stack, and outputs the `heading`, `body` and `monospace` roles (plus `accent` only when the site uses a third font), marking each as live or default. `figma-to-block-theme` uses the stack. ([#4007](https://github.com/lightspeedwp/.github/issues/4007))
- **Site Tokens Content Width** — `site-to-design-tokens` measures the content width from running text, one vote per page with blog posts first, takes a `--layout` override, and flags widths under 480px or near the wide width. ([#4006](https://github.com/lightspeedwp/.github/issues/4006))
- **Site Tokens Spacing Ladder** — `site-to-design-tokens` fills the whole spacing ladder from `5` by shifting values down before it drops one, so 11 distinct values all get a step. ([#4005](https://github.com/lightspeedwp/.github/issues/4005))
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@
"test:js": "jest --config .jest.config.cjs --coverage --forceExit --detectOpenHandles",
"test:figma-to-block-theme": "jest --config skills/figma-to-block-theme/scripts/jest.config.cjs",
"test:site-to-design-tokens": "jest --config skills/site-to-design-tokens/scripts/jest.config.cjs",
"test:theme-orphaned-refs": "jest --config skills/theme-orphaned-refs/scripts/jest.config.cjs",
"test:theme-orphaned-refs": "jest --config skills/theme-orphaned-refs/scripts/jest.config.cjs",
"test:site-to-figma-components": "jest --config skills/site-to-figma-components/scripts/jest.config.cjs",
"test:agent-spec-validation": "node .github/scripts/__tests__/validate-agent-specs.test.js",
"test:index-generator": "node .github/scripts/__tests__/generate-agent-index.test.js",
Expand Down
4 changes: 4 additions & 0 deletions skills/figma-to-block-theme/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ This skill holds only the Figma-to-WordPress mapping and LightSpeed conventions.

If a companion skill is not installed, say so and stop rather than calling Figma tools directly.

## Before you start

The scripts are TypeScript run with `tsx` from the `.github` repository checkout. Run `npm ci` there first. This skill does not use a browser, so it needs no Puppeteer download.

## Step 0: Build the theme profile

Never assume paths. Read [references/theme-profile.md](references/theme-profile.md) and record:
Expand Down
4 changes: 4 additions & 0 deletions skills/figma-to-block-theme/references/tokens-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ Use `--min-viewport` and `--max-viewport` only when the design's frames differ f
- Replace `settings.spacing.spacingSizes`, and set `defaultSpacingSizes: false`. Core's default sizes use the slugs `20` to `80`, and when they are on they override theme sizes with the same slugs, so the theme's values never reach the page. Keep `units`, `padding`, `margin` and `blockGap`.
- Compare the count with the mapper's `counts.spacing`.
- Slugs used in `styles` and patterns (`var:preset|spacing|<slug>`) must still exist. `theme-orphaned-refs` checks this.

## Layout widths

Variables whose code syntax is `--wp--custom--layout--content-size` or `--wp--custom--layout--wide-size` (the form `site-to-design-tokens` writes), or core's `--wp--style--global--content-size` and `--wide-size`, go to `settings.layout.contentSize` and `wideSize`, not to `settings.custom`. Numbers become px (`848` gives `"848px"`), and a string keeps its unit. Compare the widths with the theme's current `settings.layout` in the plan, and note `counts.layout` in the report.
5 changes: 3 additions & 2 deletions skills/figma-to-block-theme/references/tokens-typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ After replacing the sizes, update every reference in `styles`, `styles.blocks`,
Variables whose code syntax is `--wp--preset--font-family--<slug>` (`heading`, `body`, `monospace`, and `accent` only when the site has a third font) become `{ slug, name, fontFamily }`:

- `name` is the font name (for example "Nunito Sans"), not the slug.
- If the variable description holds a `CSS stack: <stack>` line (written by `site-to-design-tokens`) and its first family is the font named by the value, `fontFamily` is that exact stack.
- Otherwise `fontFamily` quotes names that contain spaces and adds a fallback: `sans-serif` by default, or `--font-fallback serif` for serif families. Confirm the fallback with the user.
- If the variable description holds a `CSS stack: <stack>` line (written by `site-to-design-tokens`) and its first family is the font named by the value, `fontFamily` is the font name followed by that stack's fallbacks. The first family is the live site's own `@font-face` name (for example `argesta_displayregular, serif` gives `"Argesta Display", serif`), which the theme's `fontFace` entries won't declare.
- A generic family name such as "Monospace" names no font of its own, so its declared stack is kept as it is (for example `ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace`).
- Otherwise `fontFamily` quotes names that contain spaces and adds a fallback: `monospace` for the `monospace` role, otherwise `sans-serif` by default, or `--font-fallback serif` for serif families. Confirm the fallback with the user.

### Font files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ describe('FigmaVariablesMapper', () => {
);
});

it('keeps the exact CSS stack declared in a font variable description', () => {
it('keeps the fallbacks of the CSS stack declared in a font variable description', () => {
const font = (value: string, description?: string) =>
new FigmaVariablesMapper().map({
collections: [
Expand All @@ -415,13 +415,48 @@ describe('FigmaVariablesMapper', () => {
(mapped.theme.settings as Json).typography.fontFamilies[0].fontFamily;
const description = 'Headings (live). CSS stack: moret, Georgia, serif';

expect(stack(font('Moret', description))).toBe('moret, Georgia, serif');
// The live @font-face name gives way to the clean family name.
expect(stack(font('Moret', description))).toBe('Moret, Georgia, serif');
expect(
stack(font('Argesta Display', 'Body text (live). CSS stack: argesta_displayregular, serif'))
).toBe('"Argesta Display", serif');
expect(stack(font('Moret', 'CSS stack: moret'))).toBe('Moret');
// A stack for another font is ignored.
expect(stack(font('Lora', description))).toBe('Lora, sans-serif');
expect(stack(font('Moret'))).toBe('Moret, sans-serif');
expect(stack(font('Moret', 'Headings only'))).toBe('Moret, sans-serif');
});

it('keeps the system stack of a generic family such as Monospace', () => {
const family = (slug: string, value: string, description?: string) =>
(
new FigmaVariablesMapper().map({
collections: [
{
name: 'Typography',
modes: [{ id: 'm', name: 'Value' }],
variables: [
{
id: slug,
name: `Font-Families/${value}`,
type: 'STRING',
codeSyntax: { WEB: `var(--wp--preset--font-family--${slug})` },
description,
valuesByMode: { m: value },
},
],
},
],
} as never).theme.settings as Json
).typography.fontFamilies[0].fontFamily;
const system = 'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace';

expect(family('monospace', 'Monospace', `Code (default). CSS stack: ${system}`)).toBe(system);
// With no declared stack, a generic name is the stack, and a named mono font falls back to monospace.
expect(family('monospace', 'Monospace')).toBe('monospace');
expect(family('monospace', 'Fira Code')).toBe('"Fira Code", monospace');
});

it('writes only the font roles that exist, with no accent when there is none', () => {
const role = (slug: string, value: string) => ({
id: slug,
Expand Down Expand Up @@ -519,6 +554,56 @@ describe('FigmaVariablesMapper', () => {
);
});

it('maps content and wide width to settings.layout in px', () => {
const width = (id: string, syntax: string, value: unknown, type = 'FLOAT') => ({
id,
name: `Desktop/${id}`,
type,
codeSyntax: { WEB: `var(${syntax})` },
valuesByMode: { m: value },
});
const layout = (...variables: ReturnType<typeof width>[]) =>
new FigmaVariablesMapper().map({
collections: [{ name: 'Theme - Layout', modes: [{ id: 'm', name: 'Mode 1' }], variables }],
} as never);

// The form site-to-design-tokens writes.
const custom = layout(
width('content', '--wp--custom--layout--content-size', 848),
width('wide', '--wp--custom--layout--wide-size', 1232)
);
expect((custom.theme.settings as Json).layout).toEqual({
contentSize: '848px',
wideSize: '1232px',
});
expect((custom.theme.settings as Json).custom).toBeUndefined();
expect(custom.report.counts.layout).toBe(2);

// Core's own variable names, and string values with and without a unit.
const core = layout(
width('content', '--wp--style--global--content-size', '48rem', 'STRING'),
width('wide', '--wp--style--global--wide-size', '1200', 'STRING')
);
expect((core.theme.settings as Json).layout).toEqual({
contentSize: '48rem',
wideSize: '1200px',
});

// A layout width that isn't a length is reported, not written.
const bad = layout(width('content', '--wp--custom--layout--content-size', true, 'BOOLEAN'));
expect((bad.theme.settings as Json).layout).toBeUndefined();
expect(bad.report.warnings.join('\n')).toContain('"Desktop/content" is BOOLEAN');

// A custom value that aliases a width refers to core's variable.
const alias = layout(width('content', '--wp--custom--layout--content-size', 848), {
...width('gutter', '--wp--custom--max-text', 0),
valuesByMode: { m: { type: 'VARIABLE_ALIAS', id: 'content' } },
});
expect((alias.theme.settings as Json).custom['max-text']).toBe(
'var(--wp--style--global--content-size)'
);
});

it('gives custom lengths a unit and refuses unsafe or clashing paths', () => {
const variable = (id: string, syntax: string, value: number) => ({
id,
Expand Down
Loading
Loading