Compass adds a findings collection, a status global, scan and fix endpoints, and an admin dashboard to Payload. It scans CMS content and coded design tokens against brand rules and flags drift in the admin and on the live site through an overlay component. Each finding offers a fix action that edits the source and re-scans. The Figma connection is simulated, checks are deterministic, and design checks read files from the host app. Requires Payload 3.
Compass — a Payload CMS plugin that continuously checks a site for brand adherence against a brand ontology and a (simulated) Figma design-system agent, flags drift in the admin and on the live site, and can auto-fix it.
Installation
npm i compass-payload-plugin0
Stars
0
Forks
0
Open Issues
4 months ago
Last Updated
0
Weekly Downloads
v
npm Version
Dependencies
00 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 0 |
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
| Oct 30, 2026 | 0 |
| Oct 29, 2026 | 0 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 0 |
| Oct 26, 2026 | 0 |
| Oct 25, 2026 | 0 |
| Oct 24, 2026 | 0 |
| Oct 23, 2026 | 0 |
| Oct 22, 2026 | 0 |
| Oct 21, 2026 | 0 |
| Oct 20, 2026 | 0 |
| Oct 19, 2026 | 0 |
| Oct 18, 2026 | 0 |
| Oct 17, 2026 | 0 |
| Oct 16, 2026 | 0 |
| Oct 15, 2026 | 0 |
| Oct 14, 2026 | 0 |
| Oct 13, 2026 | 0 |
| Oct 12, 2026 | 0 |
| Oct 11, 2026 | 0 |
| Oct 10, 2026 | 0 |
| Oct 9, 2026 | 0 |
| Oct 8, 2026 | 0 |
| Oct 7, 2026 | 0 |
| Oct 6, 2026 | 0 |
| Oct 5, 2026 | 0 |
| Oct 4, 2026 | 0 |
| Oct 3, 2026 | 0 |
| Oct 2, 2026 | 0 |
| Oct 1, 2026 | 0 |
| Sep 30, 2026 | 0 |
| Sep 29, 2026 | 0 |
| Sep 28, 2026 | 0 |
| Sep 27, 2026 | 0 |
| Sep 26, 2026 | 0 |
| Sep 25, 2026 | 0 |
| Sep 24, 2026 | 0 |
| Sep 23, 2026 | 0 |
| Sep 22, 2026 | 0 |
| Sep 21, 2026 | 0 |
| Sep 20, 2026 | 0 |
| Sep 19, 2026 | 0 |
| Sep 18, 2026 | 0 |
| Sep 17, 2026 | 0 |
| Sep 16, 2026 | 0 |
| Sep 15, 2026 | 0 |
| Sep 14, 2026 | 0 |
| Sep 13, 2026 | 0 |
| Sep 12, 2026 | 0 |
| Sep 11, 2026 | 0 |
| Sep 10, 2026 | 0 |
| Sep 9, 2026 | 0 |
| Sep 8, 2026 | 0 |
| Sep 7, 2026 | 0 |
Trends appear after 7 days of data. Daily snapshots have not started yet.
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1305319544-root)<a href="https://payloaddirectory.dev/plugins/1305319544-root"><img src="https://payloaddirectory.dev/badge/1305319544-root.svg" alt="Payload Directory"></a>README
A Payload CMS plugin that keeps a website on brand, continuously.
Compass watches a Payload-powered site and checks it against a brand ontology and a design-system agent (connected over a simulated Figma MCP). When something drifts off brand, it flags it in two places, the Payload admin and directly on the live site, and offers a one-click fix.
It answers two questions a brand owner actually cares about:
Built as the brand-governance layer for the Handled brand-guidelines site. The product name is Compass; the internal plugin id is
brand-guard.
The Compass dashboard — live brand scores ("Marketing on brand?" / "Engineers to spec?"), the design-system agent connection, and every open finding with a one-click fix.

Findings collection — full history of flags with severity, source, and section anchor. Resolve or ignore to dismiss.

Live status — the (simulated) Figma agent connection, spec version, and scores, refreshed by every scan.

flowchart LR
A["Figma agent (MCP, simulated)"] -->|approved tokens, photos, specs| S[Compass scan]
O[Brand ontology rules] --> S
C[CMS content afterChange] --> S
P["Coded site: globals.css + page.tsx"] --> S
S --> F[(brandFindings)]
F --> D[Admin dashboard]
F --> V[On-site flags]
V -->|Submit PR| X[Edit source + re-scan]
X --> S
| Check | Example finding | Fix action |
|---|---|---|
| Voice / lexicon | "cutting-edge" in a headline; an em dash; a hype claim ("#1") | swap for a plain, on-brand word / punctuation |
| Colour token drift | --hd-orange is #ff5a16 in code vs #ff4b16 in Figma | write the Figma value back into the CSS |
| Off-palette colour | a raw hex in the page that is not a brand token | snap to the nearest approved token |
| Off-brand navy | #0e1929 used as a dark surface | replace with Ink #0c0a09 |
| Monospace font | font-mono used anywhere | remove it |
| Off-brand photo | a posed corporate stock photo not in the approved Figma set | remove it from the page |
| Logo lockup | the wordmark and the H-monogram placed side by side | (manual) use the wordmark alone |
Each finding is tagged with a severity, a source (marketing vs engineering), the ontology rule id, expected vs actual, and, where it lives on the page, a section anchor so the on-site flag can point at it.
The overlay pins each flag to the most specific thing it can find, falling back to the section corner:
| Finding | Pins to | How it locates it |
|---|---|---|
| Off-brand photo | the photo tile itself | element whose inline style or img src references the filename |
| Token drift | the swatch representing the token | an element tagged data-brand-token="--hd-orange" (add these to your swatches) |
| Off-brand word | the word, floating just above the line | walks the section's text nodes and builds a DOM Range over the exact match |
| Everything else | the section's top-right corner | the finding's section anchor id |
Compass is a standard Payload plugin: a config-mutating function compass(options) => (config) => config. It adds:
brandFindings collection (history, resolve / ignore) and a brand-sync global (live scores + MCP status);POST /api/brand-guard/scan, POST /api/brand-guard/fix, GET /api/brand-guard/summary, GET /api/brand-guard/findings;afterChange hook on the content collections (the marketing path);onInit (the engineering path);beforeDashboard admin panel;BrandGuardOverlay client component for the on-site flags.The scan is idempotent: each run reconciles findings per scope, so re-scanning creates new drift, keeps what is still broken, deletes what is fixed, and never re-opens something you resolved or ignored.
Every check is deterministic, no API keys, no network, no LLM at scan time:
globals.css and the page source, and diff them against what the simulated Figma agent reports.mock-figma-mcp.ts): it mimics an MCP connect() + callTool() handshake and returns the canonical tokens / approved photo set. Clearly labelled "simulated" in the UI.src/
index.ts Plugin entry: wires collection, global, hooks, endpoints, dashboard, interval
types.ts Finding + option types
brand-rules.ts Ontology-derived rules (tokens, banned terms, approved photos, rule ids)
mock-figma-mcp.ts Simulated Figma agent MCP client
scan-runner.ts Orchestrates checks, reconciles findings, writes the status global
fixer.ts The "agent" fix engine (edits the source of truth)
util.ts Fingerprints + text extraction
checks/
content-check.ts Voice / lexicon heuristics
design-check.ts globals.css tokens vs Figma
page-source-check.ts Per-section scan (anchored): off-palette hex, photos, logo lockup
collections/BrandFindings.ts
globals/BrandSync.ts
endpoints/index.ts scan / fix / summary / findings
admin/BrandDashboard.tsx Admin panel (client component)
client.tsx BrandGuardOverlay: the on-site flags (admin-gated)
// payload.config.ts
import { brandGuardPlugin } from 'compass-payload-plugin'
export default buildConfig({
// ...
plugins: [
brandGuardPlugin({
contentCollections: ['pages', 'posts'], // afterChange content checks
scanIntervalMs: 60_000, // engineering interval scan
}),
],
})
Register the admin panel (via your import map) and mount the overlay on the frontend:
// app/(frontend)/layout.tsx
import { BrandGuardOverlay } from 'compass-payload-plugin/client'
// ...
<BrandGuardOverlay />
| Option | Default | Description |
|---|---|---|
contentCollections | ['pages','posts'] | Collections checked on save |
scanIntervalMs | 60000 | Interval between full scans (0 disables) |
enabled | true | Master switch |
This is a working prototype built for a specific demo, not a general-purpose release:
src/app/(frontend)/globals.css and page.tsx). Generalising these to configurable paths / any collection is the obvious next step.brand-rules.ts are a distilled subset of the full Handled brand ontology.Payload 3, Next.js 16, React 19, TypeScript. No runtime dependencies of its own (Payload and React are peers).
MIT © Daniel Randolph
styles
Manage UnoCSS design sets, shortcuts and design tokens from the Payload admin to generate site and admin CSS
6033/wk37v3
payload plugin widgets
Dashboard widgets for KPI figures, lists and charts that read from your Payload collections
77536/wk2v3 v4
payload theme
shadcn-style redesign of the Payload admin with dashboard, command palette, dark mode and live theme customizer
751.8k/wk36v3
theme management
Theme presets, live preview and WCAG audit for editing site appearance from the Payload admin
73130/wk9v3
payload solid admin bar
WordPress-style admin bar shown in the Payload admin and on the Next.js website for logged-in editors
6596/wk0v3
payload admin theme
shadcn-style admin theme for Payload configured from a global in the admin panel without rebuilds
5324/wk2v3