Agent Onboarding

Every AI coding agent that opens a sitemd project gets taught the full system — file structure, markdown syntax, CLI commands, and writing conventions — without reading documentation pages or source code. The onboarding happens through three layers that activate automatically.

How it works

sitemd delivers context through three channels, each reaching agents at a different point:

Layer When it fires What it teaches
Context file Agent opens the project File structure, page format, settings, CLI commands, full syntax reference, writing conventions
CLI responses Agent runs sitemd status --json Site identity, existing pages, title conventions, copy-pasteable syntax examples for every component
Page comment blocks Agent reads any .md file Inline syntax cheat sheet in every page's frontmatter

An agent that reads the context file and runs one CLI command has everything it needs to create pages with buttons, cards, galleries, embeds, modals, and forms — without ever visiting a docs page.

Context files

When an agent opens a sitemd project, it reads site.md at the project root. This single file covers:

The context file is self-contained. An agent that reads only this file can create correct sitemd pages with rich components.

The first steps workflow

The context file begins with the same ordered workflow:

  1. Run sitemd status — understand the project state (page count, auth, deploy config, available actions)
  2. List pages by reading the pages/ directory — see existing content with titles, slugs, and group membership
  3. Run sitemd status --json — get a writing brief with site identity, conventions, and full syntax reference
  4. Run sitemd pages create — create a page using rich components
  5. Run sitemd validate — check the result against quality rules

This sequence takes an agent from "never heard of sitemd" to "created and validated a page" in five steps. The agent learns the site's name, existing content, title convention, and available syntax before writing anything.

Syntax reference

The sitemd status --json command returns a syntax field containing structured examples for every markdown component. Each entry has three parts:

Field Purpose
pattern The syntax pattern to follow
example Copy-pasteable markdown ready to use in a page
notes Modifiers, options, and edge cases

The syntax reference covers 13 components:

Component Example syntax
Buttons button: Get Started: /docs +outline
Cards card: Title / card-text: / card-image: / card-link:
Embeds embed: https://youtube.com/watch?v=...
Images <a class="img-expand" data-lightbox href="/url"><img src="/url" alt="alt" loading="lazy" style="max-width:400px;border-radius:50%;aspect-ratio:1;object-fit:cover"></a>
Image rows image-row: with indented ![alt](url) lines
Galleries gallery: with indented ![alt](url) lines
Tooltips <span class="tooltip" tabindex="0" aria-describedby="tt-1"><span class="tooltip-trigger">visible text</span><span class="tooltip-content" role="tooltip" id="tt-1">tooltip content</span></span>
Modals modal: id with indented content
Inline anchors {#custom-id}
Link modifiers [text](url+newtab)
Forms form: with indented YAML
Gated sections gated: type1, type2 ... /gated
Dynamic data data: source / data-display: cards

The syntax is returned every time an agent runs sitemd status --json, right before writing. The agent gets exact patterns at the moment it needs them.

Page comment blocks

Every .md file in a sitemd project contains a syntax cheat sheet in its frontmatter comments:

---
# How to write in sitemd:
# Buttons: button: Label: /slug (see docs/buttons-and-links)
# Cards: card: Title, card-text: Text, card-image: URL, card-link: Label: /slug
# Embeds: embed: URL (YouTube, Vimeo, Spotify, CodePen, tweets, any URL)
# Gallery: gallery: with indented ![alt](url) lines (grid + lightbox)
# ...
#
title: My Page
---

This block is auto-injected by the build system on the first build. It serves two audiences:

The comment block is regenerated if deleted, keeping the reference in sync with the current engine version.

Skills

sitemd ships a single consolidated skill at .claude/skills/sitemd/ that encodes multi-step workflows for content generation, dev server management, deployment, site scaffolding, website cloning, markdown importing, SEO audits, OG image generation, release management, and feedback reporting.

See Agent Skills for the complete reference.

Platform-specific configs

Each agent platform has its own manifest format for plugin/extension discovery:

Platform Manifest Purpose
Claude Code .claude-plugin/plugin.json Plugin metadata and marketplace listing
Gemini CLI gemini-extension.json Extension manifest at repo root

All platforms use the same sitemd CLI underneath. The manifests differ only in format — the commands and responses are identical across agents.

What agents learn and when

Here is the full sequence of what an agent knows at each stage:

On project open (reads site.md):

On first command (sitemd status):

Before writing (sitemd status --json):

After writing (sitemd validate):

The agent never needs to read source code, visit documentation, or ask the user how things work. The system teaches itself.