LLM & agent authoring
How generated authoring instructions keep schemas, docs, prompts, and validation aligned.
The block definitions that validate content also generate instructions for whatever writes it. That is the core idea: schemas, docs, and prompts come from one registry, so they do not drift apart.
This page explains the model. To install the agent files, see LLM-agent integration.
One registry, two audiences
const guide = registry.toAuthoringGuide({
audience: 'llm', // or 'human'
includeExamples: true,
})The human audience is readable block documentation. The LLM audience adds operational ground rules before the block list:
- write regular Markdown by default; use blocks only when they improve scanning or structure
- never invent block names; only documented blocks exist
- follow each block's syntax exactly
- close every
:::blockwith a line containing only::: - validate generated content and fix diagnostics rather than bypassing them
Each block contributes its description, content shape, use/avoid rules, a
verified example, and a per-prop reference: every prop's name, type (enum
values spelled out), required or optional, default, and .describe() text.
That last part makes "never guess props" realistic. Optional props that an
example does not use are still discoverable.
Custom blocks registered by your project are included automatically.
Generated output is disposable
Generated guides are not the source of truth. The registry is. Regenerate the guide whenever an agent, docs page, or prompt needs current instructions:
contentbit instructions --audience llm --out content-blocks-guide.md
contentbit docs --out docs/blocks.mdThe installed AGENTS.md block and Claude Code skills follow the same pattern:
they ask the CLI for current instructions at runtime instead of carrying copied
schemas.
Validation closes the loop
Generation is only useful when output is checked:
contentbit validate "content/**/*.md"Diagnostics use source positions, stable codes, and fix hints an LLM can act on:
recipes/dough.md:31:1 error CB_CHILD_COUNT
:::tabs needs at least 2 children, found 1.That means an agent does not need a private mental model of the schema. It can read the live guide, write content, run validation, and feed diagnostics back into the next edit until the document is clean.
For existing content, contentbit doctor adds a repair
order across validation, links, and content health. contentbit stats
adds raw measurements an agent can use as context.
Custom registries
Point CLI commands at a registry module when your project adds blocks:
contentbit validate "content/**/*.md" --registry ./blocks/registry.ts
contentbit instructions --audience llm --registry ./blocks/registry.tsThe generic pack loads first by default, then your registry adds project blocks.
Pass --no-generic-blocks only when your registry intentionally owns the full
block set.
Boundaries
Generated instructions help agents write valid structured Markdown. They do not decide your editorial strategy, verify facts, or replace human review. Pair the contentbit loop with whatever content, product, and compliance checks your team already needs.
For command details, see the CLI reference.