MCP SERVER
YAML page specs in, Confluence storage-format XHTML out. Pure functions — no API calls, no side effects.
| Tool | Purpose | Returns |
|---|---|---|
| compile | Compile a YAML page spec into Confluence storage-format XHTML. Accepts inline YAML or file path. Writes to disk or returns inline. | XHTML string + diagram manifest |
| decompile | Reverse-engineer Confluence XHTML back into a YAML page spec. Classifies blocks, detects color scheme. | YAML page spec |
| spec_lint | Visual rhythm analysis on YAML specs — 20 checks covering prose density, section variety, color intent, layout monotony, and migration warnings. | Issue list with severity and block index |
| lint | Validate XHTML structure — 13 checks for tag balance, macro attributes, column consistency, encoding corruption, WCAG AA contrast. | Issue list with severity and line numbers |
| hero | Full-width thesis block with category eyebrow, large title, body text, and accent border on dark background. | XHTML fragment |
| table | Structured data table with headers, alternating row colors, column alignment, and scheme-aware header coloring. | XHTML fragment |
| flow_chain | Colored badge pills connected by arrows. Supports dual-scheme accent steps and auto-color assignment. | XHTML fragment |
| section_label | Full-width divider label — centered small-caps text on a surface-aware background bar. | XHTML fragment |
| badge | Inline colored status pills. Scheme auto-assigns colors; per-item overrides supported. | XHTML fragment (inline) |
| heading | h2 or h3 with optional Confluence anchor macro for in-page linking. | XHTML fragment |
| toc | Table of contents with anchor links, indent levels, and scheme-aware surface background. | XHTML fragment |
| info_box | Confluence structured macro box — note, info, warning, or tip with rich-text body. | XHTML fragment |
| divider | Lightweight horizontal rule. Configurable color, weight, and margin. | XHTML fragment |
| swatch_strip | Horizontal color swatch strip for palette visualization. Hue mode or custom cells. | XHTML fragment |
| scheme_compare | Render identical content across multiple color schemes for visual comparison. One call replaces N×3 fragment calls. | XHTML fragment |
| extract_sections | Identify structural sections in XHTML — labels, headings, card rows, tables, macros — with line ranges. | Section list with types and ranges |
| inject_styles | Bulk-apply CSS properties to XHTML elements by tag name. Merges into existing inline styles. | Transformed XHTML |
| convert | Format conversion between markdown, HTML, and Confluence storage format. Pure library, no LLM. | Converted content |
A YAML page spec declares blocks, scheme, density, and separation. The compiler walks each block, resolves colors from chromata, generates Confluence storage-format XHTML with inline styles, and returns a diagram manifest for any embedded SVGs. The spec is the source of truth — XHTML is a disposable build artifact.
Given raw Confluence XHTML, the decompiler classifies every DOM region into typed blocks — hero, cards, prose, flow_chain, table, heading, section_label, info_box, divider, badge. It detects the color scheme by reverse-mapping RGB values to palette shades. The output is a valid YAML spec ready for editing and recompilation.
The round-trip is the core design constraint. Every block type the compiler emits must be recognizable by the decompiler. This forces structural discipline — no ad-hoc HTML, no one-off styling. If the decompiler can't classify it, the compiler shouldn't produce it.
Structural validation of compiled output. Tag balance, macro attribute correctness, column width sums, empty style attributes, missing font-family declarations, inherited color leaks, implicit font-weight, WCAG AA color contrast, double-encoded entities, U+FFFD replacement characters, and background ownership without !important on child text colors.
Visual rhythm analysis before compilation. Prose density ratios, section variety scoring, block type diversity, color intent validation, thin card detection, stubby flow chains, missing opening blocks, frame gaps, anemic sections, section balance, layout monotony, deprecated knob migration, caption stacking, section density, scheme fragmentation, identical consecutive blocks, diagram scheme consistency, and title field hygiene.
Two lint passes, two concerns. The spec lint catches design problems while the YAML is still editable. The XHTML lint catches rendering defects after compilation. Run both — a page can have perfect structure and broken encoding.
Every color in compiled XHTML comes from chromata's OKLCH palette. Scheme resolution, shade lookups, semantic role mapping, and color function distribution all flow through chromata at compile time.
The wiki server imports compile, decompile, and DOM operations directly as library modules. wiki_publish_file compiles specs internally. wiki_edit_page uses the operations engine. wiki_retheme_page uses the scheme-swap core.
The gutenberg build pipeline uses the same compile function to render YAML specs into standalone HTML pages. Same spec format, different output target — Cloudflare Pages instead of Confluence.
This page was compiled from a YAML spec by the server it describes.