@aitrien/motifspec 1.13.3 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +27 -2
- package/dist/codex.css +5 -5
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +2 -2
- package/dist/tokens.json +2 -2
- package/docs/components/site-header.md +4 -5
- package/package.json +9 -2
- package/tokens/color.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of MotifSpec (named brand-codex until 1.10.0), newest first. Entries before 1.10.0 keep the names they were released under. Versions follow the rules in `CONVENTIONS.md`: renaming or removing a semantic token is major, adding tokens, components or icons is minor, and changing a value or fixing a description is a patch. `npm run build` fails if the version in `package.json` has no entry here.
|
|
4
4
|
|
|
5
|
+
## [1.14.1] - 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Site nav: the current page's pill has no fill. It is outlined with a `color.border.strong` hairline (inset, so the pill keeps its size), with `color.text.primary` text, instead of the `color.surface.highlight` fill and `color.accent.border` outline. The outline is 3.23:1 on `color.surface.base` in light and 4.21:1 in dark, above the 3:1 target. On hover it takes the same wash as the other links. `site-header.md` is updated.
|
|
9
|
+
- `color.surface.highlight`'s description: text selection and `<mark>` only, since the nav no longer uses it.
|
|
10
|
+
|
|
11
|
+
## [1.14.0] - 2026-10-28
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- The MotifSpec MCP server, at `https://mcp.motifspec.com/mcp`, for any AI assistant that supports remote MCP servers. Read-only, no sign-in. Five tools:
|
|
15
|
+
- `get_rules`: the README's rules and what the checker enforces.
|
|
16
|
+
- `find_tokens`: semantic tokens matching a query, with usage rule, CSS property, light and dark values, and the surfaces a colour may sit on.
|
|
17
|
+
- `get_component`: a component's doc with its Hugo partial and Markdown form, or the list.
|
|
18
|
+
- `get_doc`: `docs/hugo.md` or `docs/templates.md`.
|
|
19
|
+
- `check`: the rule checker on a piece of markup, Markdown or CSS.
|
|
20
|
+
|
|
21
|
+
It answers from this release's own files and tells assistants which version it serves. Built with the official MCP SDK (stateless Streamable HTTP, JSON responses).
|
|
22
|
+
- Hosting: AWS Lambda behind an API Gateway HTTP API on the custom domain, rate-limited, defined in `infra/mcp.yml`. The release workflow bundles the server (`npm run mcp:bundle`, about 260 KB), tests the bundle, deploys it with a role GitHub assumes through OIDC (no stored AWS key; only main can use it, and it can only replace the function's code), and checks the live server reports the new version.
|
|
23
|
+
- `npm run test:mcp`, run in CI on the source and on the bundle: calls every tool through the Lambda handler.
|
|
24
|
+
- README: "Using it from an AI assistant", with how to connect Claude, Claude Code, VS Code and others.
|
|
25
|
+
|
|
26
|
+
The npm package is unchanged apart from the version: the server's SDK, zod and esbuild are dev dependencies, and `mcp/` and `infra/` aren't in the package.
|
|
27
|
+
|
|
5
28
|
## [1.13.3] - 2026-10-27
|
|
6
29
|
|
|
7
30
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MotifSpec
|
|
2
2
|
|
|
3
|
-
Liam Marshall's design system: the single source of truth for aitrien.com and every project after it. Tokens are [DTCG](https://www.designtokens.org/) JSON, components are documented rules with markup to copy,
|
|
3
|
+
Liam Marshall's design system: the single source of truth for aitrien.com and every project after it. The showcase is at [motifspec.com](https://motifspec.com). Tokens are [DTCG](https://www.designtokens.org/) JSON, components are documented rules with markup to copy, one checker holds every project that uses it to those rules, and an MCP server gives AI assistants all three.
|
|
4
4
|
|
|
5
5
|
## Principles
|
|
6
6
|
|
|
@@ -50,6 +50,8 @@ js/codex.js Theme toggle, copy buttons, tooltip dismissal, TOC docking a
|
|
|
50
50
|
js/theme-init.js One-line <head> snippet that applies a stored theme before first paint
|
|
51
51
|
js/plate.js Contour survey generator for the backdrop and the specimen plate: draws the static contours at build time and animates them in the browser
|
|
52
52
|
showcase/ Source of the system's showcase page
|
|
53
|
+
mcp/ The MCP server (server.mjs), its Lambda handler, bundle step and tests
|
|
54
|
+
infra/mcp.yml The server's AWS stack and deploy role (CloudFormation, applied by hand)
|
|
53
55
|
hugo.toml, go.mod Hugo module definition and its mounts
|
|
54
56
|
dist/ Generated: tokens.css, components in codex.css, chroma.css, fonts.css, icons.svg (sprite), tokens.json, tokens.js (ES module export), codex.js and theme-init.js (behaviour), backdrop.html, plate.html and plate.js (backdrop and specimen plate), contrast.md, showcase.html (fragment for publishing), showcase.standalone.html (open locally)
|
|
55
57
|
```
|
|
@@ -63,6 +65,8 @@ npm run audit # prove dist/showcase.html and the shipped scripts have no raw
|
|
|
63
65
|
npm run release:check # what merging this would release, and whether that release is valid
|
|
64
66
|
npm run pack:check # the npm package has every file the README and package.json promise
|
|
65
67
|
npm run check -- <dir> # check a project that uses MotifSpec (see below)
|
|
68
|
+
npm run test:mcp # call every MCP tool through the Lambda handler
|
|
69
|
+
npm run mcp:bundle # build/mcp.zip, the server's Lambda package
|
|
66
70
|
```
|
|
67
71
|
|
|
68
72
|
`scripts/check.mjs` is the one rule checker: this repo's audit runs it on `layouts/` and the component docs' markup, and projects run it from the version they pin. It checks a project's `layouts/` and `content/` against the release it comes from, and fails on:
|
|
@@ -75,7 +79,7 @@ npm run check -- <dir> # check a project that uses MotifSpec (see below)
|
|
|
75
79
|
|
|
76
80
|
Releases are automatic; `CONVENTIONS.md` (Versioning) says how.
|
|
77
81
|
|
|
78
|
-
Node 20 or later
|
|
82
|
+
Node 20 or later. The package has no dependencies; the MCP server's are dev dependencies, bundled into its deployment.
|
|
79
83
|
|
|
80
84
|
## Using it in Hugo
|
|
81
85
|
|
|
@@ -109,6 +113,27 @@ npx motifspec-check . --dirs src
|
|
|
109
113
|
|
|
110
114
|
It reads `.html`, `.jsx`, `.tsx`, `.vue`, `.svelte`, `.astro`, `.md` and `.mdx` (both `class` and `className`), and skips `node_modules`, `dist` and `build`. Its stylesheet rule applies here too: a project using MotifSpec has no CSS of its own.
|
|
111
115
|
|
|
116
|
+
## Using it from an AI assistant
|
|
117
|
+
|
|
118
|
+
The MCP server at `https://mcp.motifspec.com/mcp` serves the latest release to any assistant that supports remote MCP servers. It needs no sign-in and only reads.
|
|
119
|
+
|
|
120
|
+
| Tool | What it returns |
|
|
121
|
+
|---|---|
|
|
122
|
+
| `get_rules` | The rules above, and what the checker enforces |
|
|
123
|
+
| `find_tokens` | Semantic tokens matching a query: CSS property, usage rule, light and dark values, the surfaces a colour may sit on |
|
|
124
|
+
| `get_component` | A component's doc (markup, do and don't, accessibility), with its Hugo partial and Markdown form; without a name, the list |
|
|
125
|
+
| `get_doc` | `docs/hugo.md` or `docs/templates.md` |
|
|
126
|
+
| `check` | The checker's problems in a piece of markup, Markdown or CSS |
|
|
127
|
+
|
|
128
|
+
To connect it:
|
|
129
|
+
|
|
130
|
+
- **Claude (web, desktop):** Customize → Connectors → Add custom connector, with the URL above and "No sign in".
|
|
131
|
+
- **Claude Code:** `claude mcp add --transport http motifspec https://mcp.motifspec.com/mcp`, or a project `.mcp.json`.
|
|
132
|
+
- **VS Code:** add it to `.vscode/mcp.json` with `"type": "http"` and the URL.
|
|
133
|
+
- **Others:** add a remote MCP server by URL.
|
|
134
|
+
|
|
135
|
+
It serves the latest release. A project pinned to an older version can be offered something its version doesn't have yet; its own checker, at its pinned version, catches that.
|
|
136
|
+
|
|
112
137
|
## The identity in brief
|
|
113
138
|
|
|
114
139
|
| | |
|
package/dist/codex.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
|
|
3
3
|
@font-face { font-family: "Yarndings 12"; src: url("../fonts/yarndings-12-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
|
|
4
4
|
|
|
5
|
-
/* MotifSpec 1.
|
|
5
|
+
/* MotifSpec 1.14.1 — generated from tokens/*.json. Do not edit.
|
|
6
6
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
7
7
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
8
8
|
:root {
|
|
@@ -584,11 +584,11 @@ p, li, dd, figcaption { text-wrap: pretty; }
|
|
|
584
584
|
}
|
|
585
585
|
/* Hover only where there is a pointer that hovers: on touch screens :hover sticks after a tap. */
|
|
586
586
|
@media (hover: hover) { .cx-nav a:hover { color: var(--cx-color-text-primary); background: var(--_wash); } }
|
|
587
|
-
/* The current section is
|
|
588
|
-
|
|
587
|
+
/* The current section is outlined, not underlined or filled: a strong hairline (3:1 on the surface) in primary text.
|
|
588
|
+
Inset, so the pill keeps its size. */
|
|
589
589
|
.cx-nav a[aria-current="page"] {
|
|
590
|
-
color: var(--cx-color-text-primary);
|
|
591
|
-
box-shadow: inset 0 0 0 var(--cx-border-width-hairline) var(--cx-color-
|
|
590
|
+
color: var(--cx-color-text-primary);
|
|
591
|
+
box-shadow: inset 0 0 0 var(--cx-border-width-hairline) var(--cx-color-border-strong);
|
|
592
592
|
}
|
|
593
593
|
/* Theme toggle: an icon-only pill (a circle) that shows the action, with a tooltip. */
|
|
594
594
|
.cx-theme-toggle {
|
package/dist/tokens.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* MotifSpec 1.
|
|
1
|
+
/* MotifSpec 1.14.1 — generated from tokens/*.json. Do not edit.
|
|
2
2
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
3
3
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
4
4
|
:root {
|
package/dist/tokens.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by npm run build. Do not edit.
|
|
2
|
-
export const version = "1.
|
|
2
|
+
export const version = "1.14.1";
|
|
3
3
|
export const changelog = "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md";
|
|
4
4
|
export const tokens = [
|
|
5
5
|
{
|
|
@@ -566,7 +566,7 @@ export const tokens = [
|
|
|
566
566
|
"referencesDark": "primitive.color.sap.800",
|
|
567
567
|
"value": "#d8f9df",
|
|
568
568
|
"valueDark": "#01441f",
|
|
569
|
-
"description": "Text selection
|
|
569
|
+
"description": "Text selection and <mark>. Never for large areas or decoration."
|
|
570
570
|
},
|
|
571
571
|
{
|
|
572
572
|
"name": "color.text.primary",
|
package/dist/tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.14.1",
|
|
3
3
|
"changelog": "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md",
|
|
4
4
|
"tokens": [
|
|
5
5
|
{
|
|
@@ -566,7 +566,7 @@
|
|
|
566
566
|
"referencesDark": "primitive.color.sap.800",
|
|
567
567
|
"value": "#d8f9df",
|
|
568
568
|
"valueDark": "#01441f",
|
|
569
|
-
"description": "Text selection
|
|
569
|
+
"description": "Text selection and <mark>. Never for large areas or decoration."
|
|
570
570
|
},
|
|
571
571
|
{
|
|
572
572
|
"name": "color.text.primary",
|
|
@@ -5,12 +5,11 @@ tokens:
|
|
|
5
5
|
- border.focus.offset
|
|
6
6
|
- border.focus.width
|
|
7
7
|
- border.width.hairline
|
|
8
|
-
- color.accent.border
|
|
9
8
|
- color.accent.fill.rest
|
|
9
|
+
- color.border.strong
|
|
10
10
|
- color.border.subtle
|
|
11
11
|
- color.focus.ring
|
|
12
12
|
- color.surface.base
|
|
13
|
-
- color.surface.highlight
|
|
14
13
|
- color.text.muted
|
|
15
14
|
- color.text.on-accent
|
|
16
15
|
- color.text.primary
|
|
@@ -103,7 +102,7 @@ Copy the snippet as it is: the build fails if this doc and `js/theme-init.js` di
|
|
|
103
102
|
|
|
104
103
|
## Do
|
|
105
104
|
|
|
106
|
-
- Mark the current section with `aria-current="page"`, including on child pages (a post marks Writing). It gets a `color.
|
|
105
|
+
- Mark the current section with `aria-current="page"`, including on child pages (a post marks Writing). It gets a `color.border.strong` hairline inside its edge and `color.text.primary` text: no fill and no underline.
|
|
107
106
|
- Nav items are pills (`radius.pill`), the same shape as the pause control and the theme toggle, so every header control reads as one set.
|
|
108
107
|
- When the nav and controls wrap below the wordmark, `dist/codex.js` sets `data-wrapped` on the header: the nav moves to the start of its row and is offset by its pills' padding, so the link text lines up with the wordmark and the page text, while the controls stay at the end. Without the script the row stays right-aligned.
|
|
109
108
|
- Every header control rests in `color.text.secondary` and shares one hover, shown only where the pointer can hover (`@media (hover: hover)`), so it never sticks after a tap: `color.text.primary` text on a wash of `color.text.primary` at `color.wash.hover`. A solid `color.surface.hover` would all but match the frost.
|
|
@@ -129,5 +128,5 @@ Copy the snippet as it is: the build fails if this doc and `js/theme-init.js` di
|
|
|
129
128
|
- Nav links, the pause control and the toggle are 44px (`size.target.touch`); the pause control and the toggle are pills with equal sides, so they render as circles.
|
|
130
129
|
- The pause control is a native checkbox named "Pause background animation" (checked means paused), focusable by keyboard, with its focus ring on the round control.
|
|
131
130
|
- The toggle's `aria-label` is its action ("Switch to light theme"); the visible tooltip repeats it and is `aria-hidden`. Escape hides the tooltip without moving the pointer (see `tooltip.md`).
|
|
132
|
-
- `aria-current` carries the current state for assistive tech; the
|
|
133
|
-
- Pairs: `color.text.secondary` and `color.text.primary` on `color.surface.base` (7:1); `color.
|
|
131
|
+
- `aria-current` carries the current state for assistive tech; the outline is the visual cue.
|
|
132
|
+
- Pairs: `color.text.secondary` and `color.text.primary` on `color.surface.base` (7:1); `color.border.strong` on `color.surface.base` (current outline, 3:1). On a backdrop page the frost is measured as `color.surface.base`; the contour lines beneath it are not part of the check.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aitrien/motifspec",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "Liam Marshall's design system: DTCG tokens, component rules, generated CSS, Hugo templates and a rule checker.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -60,9 +60,16 @@
|
|
|
60
60
|
"audit": "node scripts/audit.mjs",
|
|
61
61
|
"check": "node scripts/check.mjs",
|
|
62
62
|
"release:check": "node scripts/release.mjs",
|
|
63
|
-
"pack:check": "node scripts/pack-check.mjs"
|
|
63
|
+
"pack:check": "node scripts/pack-check.mjs",
|
|
64
|
+
"test:mcp": "node --test mcp/test.mjs",
|
|
65
|
+
"mcp:bundle": "node mcp/build.mjs"
|
|
64
66
|
},
|
|
65
67
|
"engines": {
|
|
66
68
|
"node": ">=20"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
72
|
+
"esbuild": "0.28.2",
|
|
73
|
+
"zod": "4.6.7"
|
|
67
74
|
}
|
|
68
75
|
}
|
package/tokens/color.json
CHANGED
|
@@ -917,7 +917,7 @@
|
|
|
917
917
|
},
|
|
918
918
|
"highlight": {
|
|
919
919
|
"$value": "{primitive.color.sap.100}",
|
|
920
|
-
"$description": "Text selection
|
|
920
|
+
"$description": "Text selection and <mark>. Never for large areas or decoration.",
|
|
921
921
|
"$extensions": {
|
|
922
922
|
"codex.modes": {
|
|
923
923
|
"dark": "{primitive.color.sap.800}"
|