Agent Onboarding

Every AI coding agent that opens a sitemd project gets taught the full system — file structure, markdown syntax, MCP tools, 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 files Agent opens the project File structure, page format, settings, MCP tools, full syntax reference, writing conventions
MCP tool responses Agent calls sitemd_site_context 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 calls one MCP tool 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 a context file at the project root. sitemd ships three variants — one per agent platform — containing identical information in platform-native formats:

File Agent
CLAUDE.md Claude Code
AGENTS.md Codex, OpenClaw, Cursor, VS Code, etc.
GEMINI.md Gemini CLI

Each file covers:

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

Codex CLI

Codex uses a different discovery mechanism — it reads SKILL.md from the plugin bundle. This file contains the same information in a more compact format: project structure, MCP tools table, first steps workflow, and a syntax reference listing.

The first steps workflow

Every context file begins with the same ordered workflow:

  1. Call 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. Call sitemd_site_context — get a writing brief with site identity, conventions, and full syntax reference
  4. Call sitemd_pages_create — create a page using rich components
  5. Call sitemd_content_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 tool calls. The agent learns the site's name, existing content, title convention, and available syntax before writing anything.

Syntax reference in MCP

The sitemd_site_context tool 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 calls sitemd_site_context, 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 twelve agent skills — structured task definitions that encode multi-step workflows beyond what context files cover. Skills handle content generation, dev server management, deployment, site scaffolding, website cloning, markdown importing, SEO audits, OG image generation, and feedback reporting.

See Agent Skills for the complete reference with usage syntax and behavior for all twelve skills.

Skills ship in two formats for cross-agent compatibility:

Directory Discovery
.claude/skills/ Claude Code
.agents/skills/ Codex CLI, SkillsMP, any SKILL.md scanner

Both directories contain identical skill files. GitHub Copilot discovers skills via .github/skills/ (populated from the same source).

Platform-specific configs

Each agent platform has its own manifest format for plugin/extension discovery. These live in the engine alongside the MCP server:

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

All three platforms use the same MCP server underneath. The manifests differ only in format — the tools, parameters, 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 context file):

On first tool call (sitemd_status):

Before writing (sitemd_site_context):

After writing (sitemd_content_validate):

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