@iksnerd/blazon 0.2.2 → 0.3.2
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/README.md +7 -6
- package/dist/chunks/{site-builder-CsBH_ocA.js → site-builder-NRN9UNyn.js} +2490 -2406
- package/dist/cli/commands/mcp-check.d.ts +3 -1
- package/dist/cli/commands/mcp-check.d.ts.map +1 -1
- package/dist/cli/commands/mcp.d.ts +2 -1
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/index.js +1153 -1126
- package/dist/core/brand/export.d.ts +3 -1
- package/dist/core/brand/export.d.ts.map +1 -1
- package/dist/core/brand/schema.d.ts +21 -0
- package/dist/core/brand/schema.d.ts.map +1 -1
- package/dist/core/checker/catalogue.d.ts +8 -0
- package/dist/core/checker/catalogue.d.ts.map +1 -1
- package/dist/core/fonts.d.ts +10 -1
- package/dist/core/fonts.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/inputs.d.ts.map +1 -1
- package/dist/core/mcp-config.d.ts +12 -6
- package/dist/core/mcp-config.d.ts.map +1 -1
- package/dist/core/operations/list.d.ts.map +1 -1
- package/dist/index.js +32 -32
- package/dist/types/data.d.ts +10 -0
- package/dist/types/data.d.ts.map +1 -1
- package/dist/ui/assets/index-Biy1hkeq.css +2 -0
- package/dist/ui/assets/{index-CLKH0m9J.js → index-BpdgjM9E.js} +7 -0
- package/dist/ui/index.html +2 -2
- package/mcp/dist/index.js +22748 -0
- package/package.json +7 -4
- package/plugins/blazon.office-template/bin/blazon-blazon.office-template./360/237/224/214 +1 -1
- package/plugins/blazon.platform-tokens/README.md +58 -2
- package/plugins/blazon.platform-tokens/bin/blazon-blazon.platform-tokens./360/237/224/214 +57 -12
- package/plugins/blazon.press-kit/README.md +54 -3
- package/plugins/blazon.press-kit/bin/blazon-blazon.press-kit./360/237/224/214 +247 -49
- package/plugins/blazon.print-book/README.md +6 -0
- package/plugins/shipped.lock +4 -4
- package/template/AGENTS.md +1 -1
- package/template/docs/01-principles.md +1 -1
- package/dist/ui/assets/index-DluSqfla.css +0 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Design tokens, guidelines and brand assets in one repo, compiled into CSS, TypeS
|
|
|
10
10
|
|
|
11
11
|
Brand guidelines usually live in a PDF or a slide deck, and the values developers need are copied out of it by hand. Blazon keeps them in the repo as [DTCG](https://www.designtokens.org/TR/2025.10/format/) (Design Tokens Community Group) token files and Markdown. One build writes the CSS variables, a typed TypeScript module and a static brand book, and `blazon check` fails the build when a token breaks the brand's own rules. It reads the same DTCG files as Style Dictionary and Tokens Studio, and adds the rules, the checks and the book.
|
|
12
12
|
|
|
13
|
-
> **Status: pre-release
|
|
13
|
+
> **Status: pre-release, on npm as `@iksnerd/blazon`.** It is 0.x, so a minor version may break ([versioning](#versioning-and-stability)). The npm package named `blazon` is an unrelated project (a type checker): `npx blazon` in a folder where `@iksnerd/blazon` is not installed runs that one, not this tool. Run it with `npx @iksnerd/blazon <command>`, or install it and run `npx blazon` (the installed program wins) or `./node_modules/.bin/blazon`.
|
|
14
14
|
|
|
15
15
|
Jump to: [Quick start](#quick-start), [Set up with your agent](#set-up-with-your-agent), [Use blazon from your agent (MCP)](#use-blazon-from-your-agent-mcp), [When not to use blazon](#when-not-to-use-blazon), [How it works](#how-it-works), [Plugins](#plugins), [Commands](#commands), [Configuration](#configuration), [Versioning and stability](#versioning-and-stability), [Security](#security), [Documentation](#documentation), [Contributing](#contributing).
|
|
16
16
|
|
|
@@ -61,14 +61,15 @@ run the `fix` it names, and register the server with `blazon mcp --print-config
|
|
|
61
61
|
|
|
62
62
|
## Use blazon from your agent (MCP)
|
|
63
63
|
|
|
64
|
-
A coding agent can ask blazon about the brand as tool calls (`check_brand`, `get_token`, `can_use` and
|
|
64
|
+
A coding agent can ask blazon about the brand as tool calls (`check_brand`, `get_token`, `can_use` and four more, all read-only) instead of reading token files. The server ships inside `@iksnerd/blazon`: `npm install @iksnerd/blazon` gives you its program, `blazon-mcp`, and installs no package for it (it is one file with its libraries bundled in). Print the config for your client and check that it works:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
|
|
68
|
-
blazon mcp --
|
|
69
|
-
blazon mcp --check --brand my-brand # built? finds blazon? answers a real handshake? registered?
|
|
67
|
+
npx blazon mcp --print-config --client claude-code --brand my-brand
|
|
68
|
+
npx blazon mcp --check --brand my-brand # finds the server? finds blazon? answers a real handshake? registered?
|
|
70
69
|
```
|
|
71
70
|
|
|
71
|
+
`--print-config` prints the command that registers it: `node`, the installed server file, `--brand` and `BLAZON_BIN`. To run the server by hand without installing, `npx -y -p @iksnerd/blazon blazon-mcp --brand my-brand` does it (`blazon-mcp --version` names the MCP SDK and zod it carries).
|
|
72
|
+
|
|
72
73
|
`blazon mcp --check` writes no file, prints a `fix` command for each check that fails, and exits 1 when the server is not ready. It starts the server on the brand folder, which compiles it with no plugin; what a brand says reaches your agent as tool results, so use a brand you trust. [Blazon for agents](docs/manual/20-blazon-for-agents.md) has the tools and the clients. For an agent that reads skills, [`skills/blazon/SKILL.md`](skills/blazon/SKILL.md) teaches the loop (check, contrast, MCP tools, what never to edit).
|
|
73
74
|
|
|
74
75
|
## A rule that fails the build
|
|
@@ -126,7 +127,7 @@ The same compile feeds the dev server, so a change to a token, a page or the con
|
|
|
126
127
|
- **Exports the whole brand.** `blazon build` also writes `brand.json`: the tokens with their rules, the pages, the assets and the findings, in one versioned file with a JSON Schema, readable from any language. [`brand.json`](docs/manual/11-brand-json.md)
|
|
127
128
|
- **Builds a brand book that wears the brand.** The viewer takes its colors, typefaces and logo from your tokens. Pages place live content from them: swatches, the type scale, the logo on each background with its clear space, icons, patterns and social formats. It has search, a dark mode, and a Review page listing what `blazon check` found. [Pages](docs/manual/05-pages.md), [assets and icons](docs/manual/06-assets-and-icons.md)
|
|
128
129
|
- **Compares them with a live site.** `blazon drift <url-or-css-file>` reports which tokens that name a `source.cssVar` have changed since.
|
|
129
|
-
- **Answers a coding agent.** The read commands (`blazon get`, `blazon rules`, `blazon can` and the rest) print JSON, and a
|
|
130
|
+
- **Answers a coding agent.** The read commands (`blazon get`, `blazon rules`, `blazon can` and the rest) print JSON, and a read-only server, `blazon-mcp`, offers them as tool calls over the Model Context Protocol. It ships inside the blazon package. [Building a website from a brand](docs/manual/19-building-a-website.md), [Blazon for agents](docs/manual/20-blazon-for-agents.md)
|
|
130
131
|
- **Extends with plugins.** See below.
|
|
131
132
|
|
|
132
133
|
## Plugins
|