1. Select via Component Router
The agent checks get_component_router ("Use for / Don't use for") so inline confirmations map to ln-confirm while blocking forms map to ln-modal.
Coding assistants break down when synthesizing deeply nested React hooks, Redux slices, and bundler configs across five files. Ashlar lets AI agents resolve user intent directly into schema-validated HTML5 contracts backed by docs-mcp/, per-component .schema.json files, llms.txt, and runtime data-ln-debug verification.
Every Ashlar widget exposes its full state surface as typed data-ln-* attributes and bubbling CustomEvents. An agent never has to invent wrapper state, synchronize effect dependencies, or guess which prop triggers a portal.
Agents query get_component_router, get_markup, and get_attribute before emitting HTML.
Placing data-ln-debug on <body> activates debug-verifier.js (catching broken *-for IDs, *-source stores, and attribute typos) plus ln-ashlar-dev.css visual outlines.
Initial HTML holds complete semantic content, headings, tables, and JSON-LD without JS execution.
| Artifact | Location | Consumer | Purpose |
|---|---|---|---|
| MCP Component Corpus | docs-mcp/components/*.md |
AI Coding Agents via MCP | Canonical markup, events, attributes, and component router |
| JSON Attribute Schemas | components/*/*.schema.json |
Validation & tooling | Strict typed attribute and event contract definitions |
| LLM Context Index | /llms.txt & /llms-full.txt |
ChatGPT, Claude, Perplexity | Markdown architecture index and consolidated site reference |
| Pricing & License Spec | /pricing.md |
Autonomous evaluation agents | Plain-text GPLv3 ($0) and Commercial licensing matrix |
| AI Resource Catalog | /.well-known/ai-catalog.json |
Agent discovery crawlers | Structured index of docs, demos, MCP corpus, and sitemaps |
| IDE Autocomplete | web-types.json & ln-ashlar.html-data.json |
JetBrains & VS Code | Editor completions and hints for data-ln-* attributes |
The agent checks get_component_router ("Use for / Don't use for") so inline confirmations map to ln-confirm while blocking forms map to ln-modal.
get_markup returns the exact semantic HTML5 structure (<dialog class="ln-modal">, <ul data-ln-accordion>) rather than guessed div chains.
get_events and get_attribute confirm exact event names (ln-filter:change) and whether the author or runtime owns each attribute.
With data-ln-debug on <body> in development, ln-debug checks every *-for ID, *-source store, and Levenshtein attribute typo via console warnings, while ln-ashlar-dev.css flags structural HTML issues visually.
See how an AI assistant turns a natural-language UI requirement into deterministic, zero-clipping Ashlar markup verified at runtime.
The developer asks for a filterable table popover without specifying framework boilerplate, portals, or z-index rules.
# Developer prompt to coding assistant:
"Add a searchable Department filter popover for #employees-table
that stays aligned and never clips inside overflow table wrappers."
Instead of inventing React state or custom dropdown JS, the agent resolves exact component roles, attributes, and events from docs-mcp/.
// 1. Discover composition from component router:
get_component_router()
// -> Compose ln-popover (top-layer) + ln-search + ln-filter -> ln-table
// 2. Fetch canonical HTML variants & contracts:
get_markup({ name: "ln-popover" })
get_markup({ name: "ln-search" })
get_markup({ name: "ln-filter", variant: "Composition with Popover" })
get_events({ name: "ln-filter" }) // emits cancelable ln-filter:change
The agent emits pure semantic HTML5. On open, ln-popover promotes the panel to the browser top layer, ln-search filters the list, and ln-filter targets #employees-table by ID.
<button type="button" data-ln-popover-for="dept-filter">Department</button>
<div data-ln-popover id="dept-filter">
<search>
<input type="search" data-ln-search-for="dept-list" placeholder="Filter departments...">
</search>
<ul id="dept-list" data-ln-search="" data-ln-filter="employees-table">
<li><label><input type="checkbox" data-ln-filter-key="department" data-ln-filter-reset checked> All</label></li>
<li><label><input type="checkbox" data-ln-filter-key="department" data-ln-filter-value="engineering"> Engineering</label></li>
<li><label><input type="checkbox" data-ln-filter-key="department" data-ln-filter-value="legal"> Legal</label></li>
</ul>
</div>
Place data-ln-debug on <body> in development to activate debug-verifier.js and ln-ashlar-dev.css (0 bytes in production builds).
<!-- Enable dev diagnostics on <body>; intentional AI typos below: -->
<body data-ln-debug>
<button type="button" data-ln-popover-for="dept-flter">Department</button>
<div data-ln-table-sorce="employees">...</div>
</body>
/* Console diagnostics from ln-debug (plus visual CSS lint outlines via ln-ashlar-dev.css):
[ln-debug] Unresolved ID reference: <button data-ln-popover-for="dept-flter"> targets "#dept-flter",
but no element with id="dept-flter" exists in the document.
[ln-debug] Unknown attribute "data-ln-table-sorce" on <div>. Did you mean "data-ln-table-source"? */
Ashlar ships a structured docs-mcp/ corpus, per-component .schema.json attribute contracts, web-types.json, llms.txt, and runtime data-ln-debug verification so agents emit valid semantic HTML instead of complex JS state trees.
Placing data-ln-debug on <body> activates the dev-only contract verifier and ln-ashlar-dev.css (0 bytes in production builds). It validates *-for ID references, *-source store names, store uniqueness, and misspelled data-ln-* attributes via console warnings and visual CSS lint outlines.
No. Coding agents follow Rule Zero: query the component router, get_markup, get_events, and get_attribute before emitting HTML so attributes match the exact schema.
While static docs-mcp/ markdown and JSON schemas ship free with Ashlar, the Ashlar Premium MCP Server adds live anti-hallucination lookups (who_handles, get_ln_schema), deterministic component and CRUD generators, automated plan/code/doc reviews, and AST architecture graph queries.
Every key page renders complete content in initial HTML with JSON-LD, backed by /llms.txt, /llms-full.txt, /pricing.md, and /.well-known/ai-catalog.json.
Inspect the upstream repository, browse the live component demos, or read the full MCP contracts.