Brand Layer · Technical overview
Architecture
What the system is made of, how a brand becomes sixteen surfaces, an MCP server and tools a browser agent can call, and which files matter when you change something.
- Tools
- 21
- Surfaces
- 16
- Pages
- 15
- Brand files
- 12
01 · Shape
How the whole thing fits together
A brand lives in a folder of Markdown and JSON. One loader parses it into a single typed object. Three consumers project that object: a showcase site for people, sixteen machine-readable surfaces for anything that can fetch a URL, and an MCP server for agents that speak the protocol.
Nothing generates assets. Every tool returns knowledge, and the agent on the other end builds the thing.
02 · Stack
What it is built on
- next^15.5.0
The site and the routes. Nothing is pre-rendered: every response resolves its own origin and re-reads the brand, so one deployment serves whatever the brand says today.
- react^19.1.0
Server-rendered by default. Interactive pieces are the exception, not the rule.
- typescript^5.7.0
Strict. The build type-checks before anything ships.
- @modelcontextprotocol/sdk^1.13.0
The protocol itself: tools, resources and prompts.
- mcp-handler^1.0.2
Puts that server behind one HTTP route and owns the transport.
- zod^3.25.0
The input schema for every tool, which is what a client reads to know how to call it.
- zod-to-json-schema^3.25.2
Turns those same schemas into JSON Schema for the two transports that are not MCP: the plain-HTTP catalog at /api/tool, and the WebMCP tools the page hands to an agent inside the browser.
- gray-matter^4.0.3
Reads the brand: the structured half of each document is the tokens, the written half is the rules.
- fflate^0.8.3
Builds the offline package. It takes an explicit timestamp per file, which is what makes the archive byte-stable and therefore worth hashing.
- tailwindcss^4.1.0
Utilities only. Brand values reach the page as CSS variables, never through a config file.
03 · MCP
The server, and what it exposes
One route handler at /api/[transport]. The path segment picks the transport: /api/mcp is Streamable HTTP, stateless, the one to use. /api/sse is the legacy transport and only completes a round trip when a Redis is attached, so treat it as deprecated.
The server is rebuilt per request against the freshly parsed brand, which is why every tool schema, asset URL and version string reflects the live content and this deployment’s host rather than whatever was true at build time.
04 · Tools
The 21 tools
| Tool | Returns |
|---|---|
| get_skillFirst | The versioned orchestrator skill: the routing guide that maps any task to the right tools. |
| get_intake | Guided mode: each output type's parameters and defaults, the one question worth asking, the report block, and the self-check. |
| get_brand_overview | The first call: identity, the essentials (accent, canvas, the TEXT system with its rule and classes, the light surface, the font, the logo), the section index, the voice with its prohibitions, the critical rule and every surface URL. |
| get_design_spec | Without arguments, the section INDEX with sizes. With `part` or a section id, that slice. The whole ~80 kB document only on request. |
| list_tokens | A category, one token by `ref`, or several by `refs` in a single call. Colour and type payloads carry the rules that govern them. |
| get_component | One component raw, resolved, what changes on a light surface, and a pasteable HTML snippet. No name lists them all. |
| get_section | One prose rule section by id or exact title. |
| search_design | Full-text hits across every loaded content file, each tagged with the tool that serves it. |
| list_assets | Logos, fonts and icons as absolute hotlinkable URLs, plus a pasteable @font-face. |
| get_voice_guide | The writing brief by default: essence, the hard prohibitions, the language rule, personality, principles and a pasteable AI brief. Every other part by name. |
| get_linkedin_playbook | Post types, copy anatomy, hooks, formatting rules, example posts. |
| get_sound_guide | The sound library: every track with an absolute MP3 URL, length, tempo and vocals, the track to use for each job, and the rules (house tempo, what sits under a voice, the sound logo last). |
| list_layouts | The fast index: every layout as one flat row with its example image and SVG source, no canvas and no geometry. |
| get_layout | Without id, the shared canvas and its legends, the call to make once per session. With id, that layout: slots, measured geometry in px, the must list, a reference SVG and the slice of the canvas it uses. |
| list_carousel_recipes | Every carousel recipe: an ordered sequence of layout ids per post type. |
| list_presentation_slides | The 16:9 deck index: every slide type with its intent, density, limits, variants and example images, plus the deck rules. For planning a deck. |
| get_presentation_slide | Without id, the 1920x1080 deck canvas: type scale, spacing, colours, footer, text metrics. With id, that slide type: slots, must list and measured geometry where it exists. |
| list_icons | The fast index: every icon as one flat row with dark and light URLs, or the matching icons with their keywords. |
| get_fallback | The fallback contract: primitives to derive from, and the ordered anti-hallucination protocol. |
| get_chart_palette | The data-viz palette: categorical ramp, sequential ramp, semantic deltas, and the rules. |
| get_agent_rules | The rules of engagement, and rules only: the colour and type rules, the fallback protocol, the voice prohibitions, the value-free starting prompts and the critical rule. The values themselves live in the tools that own them. |
- brand://design.md
The design spec verbatim, frontmatter and all.
- brand://skill.md
The orchestrator skill as a resource, for clients that prefer attaching over calling.
- brand://brand-guide
The long-form identity prose from brand.md.
- brand://llms-full.txt
The whole knowledge base as one file, for upload into a client with no MCP.
- linkedin-carousel
Guided flow: pick a post type, pull its recipe and layouts, draft in the brand voice.
- brand-brief
Guided mode as a slash command: a one-sentence request in, defaults filled, choices reported back.
- on-brand-page
Guided flow: pull tokens and components, then build UI that cannot drift off-brand.
05 · Access
Five ways in
06 · Surfaces
The 16 machine-readable routes
| Route | Type | What it is for |
|---|---|---|
| /llms.txt | text/plain | The index. Lane B1 starts here: what exists, and where to read it. |
| /llms-full.txt | text/plain | Everything in one file. Lane B2 uploads this into a client that cannot reach a URL. |
| /skill.md | text/markdown | The orchestrator skill, same content as get_skill. |
| /intake.mdOptional | text/markdown | Guided mode: the parameters, defaults and report block behind get_intake. |
| /bundle.zip | application/zip | The offline package. Lane C downloads this: the knowledge, the orchestrator skill and every asset file as one folder (audio only where marked offline), streamed so the archive is not capped at a buffered response. |
| /integrity.json | application/json | Size and SHA-256 of every other surface and of the offline package, as served. For the review that happens before a connector is allowed. |
| /design.md | text/markdown | The design spec source, unmodified. |
| /brand.json | application/json | Every token as structured data, refs already resolved. |
| /brand.css | text/css | The tokens as custom properties, a `.bl-{component}` class per component, the `.bl-light` surface scope and the responsive type queries. Hotlink it and the values are live. |
| /snippets.json | application/json | Pasteable component HTML, styled by brand.css. |
| /layouts.jsonOptional | application/json | The slide catalog with absolute asset URLs. |
| /presentations.jsonOptional | application/json | The 16:9 deck catalog: canvas, deck rules and every slide type with slots, geometry and absolute image URLs. |
| /icons.jsonOptional | application/json | The icon library with dark and light URLs. |
| /verbal-identity.mdOptional | text/markdown | The voice source. /voice.md redirects here. |
| /linkedin.mdOptional | text/markdown | The LinkedIn playbook source. |
| /sound.mdOptional | text/markdown | The sound library source: tracks, jobs and rules. The MP3 files themselves live under /brand/sound/. |
07 · Invariants
Rules that hold everywhere
Read-only knowledge, not a generator
Every tool returns brand data. The agent produces the asset. A render pipeline existed early on and was deliberately removed, because a knowledge base that also generates has two ways to be wrong.
Exactly five agent access lanes
Lane A is MCP, entered through get_skill. Lane B1 is /llms.txt for a client that can fetch a URL. Lane B2 is /llms-full.txt uploaded as a file. Lane C is /bundle.zip, the offline package, for a tool that can do neither and for anyone who needs the asset files themselves. Lane D is WebMCP: the page itself registers a subset of the same tools with an agent built into the browser, which is the only lane that asks the reader for no setup at all. One surface per lane, and the orchestration logic lives only in the skill: the package ships that same skill at its root rather than restating it.
Defaults are declared, not guessed
A short request leaves most parameters unset. Guided mode fills them from the brand's own declared defaults, and the agent reports every filled value back to the user. Nothing is decided silently, and the values it fills still resolve against the spec: a default points at an existing token, never at a new one.
The critical rule is authored once
It is one field in the brand, written once. Every surface interpolates it. No route or component restates the prose, so it cannot drift between what an agent reads over MCP and what a human reads on the page.
