google/site-infra
Capsem documentation site infrastructure and conventions. Use when writing, editing, or maintaining docs in the docs/ directory (docs.capsem.org), adding new doc pages, updating the sidebar, or working with Astro Starlight. Covers site structure, frontmatter, writing style, sidebar config, release pages, and dev workflow.
npx skills add https://github.com/google/capsem --skill site-infra
The documentation site (docs.capsem.org) uses Astro Starlight (Astro 6 + Tailwind v4). Docs live in docs/src/content/docs/ as markdown/MDX files.
cd docs && pnpm run dev # localhost:4321
cd docs && pnpm run build # Production build
ci.yaml runs the merge-blocking docs-build job under pr-gate. docs.yaml
deploys only on every push to main and smokes https://docs.capsem.org/ plus
/getting-started/. This deploy rail is independent from binary releases,
manual VM asset releases, and the release.capsem.org asset-channel workflow.
Tight and to the point, like a manual. One topic per page. No filler, no marketing language. Tables over prose when listing configs or test cases. Code examples only when they clarify usage. Diagrams in mermaid.
Every doc page must include title and description. Starlight handles lastUpdated from git history automatically. No layout: field -- Starlight provides its own.
---
title: Page Title
description: One-line summary for SEO and sidebar tooltips.
sidebar:
order: 10
---
docs/src/content/docs/
getting-started.md
architecture/
hypervisor.md Hypervisor abstraction, Apple VZ + KVM backends (5 mermaid diagrams)
settings.md Settings grammar, value resolution, presets, IPC, boot injection
build-system.md capsem-builder architecture, TOML configs, Jinja, multi-arch
custom-images.md Corporate image customization guide
settings-schema.md Two-node schema, JSON Schema, Pydantic, cross-language conformance
security/
overview.md Security model overview
network-isolation.md Air-gapped networking, domain policy
virtualization.md VM isolation guarantees
build-verification.md Build reproducibility, checksums
kernel-hardening.md Custom kernel, allnoconfig, minimal attack surface
benchmarks/
results.md Current performance results (boot, disk, CLI, HTTP, snapshots)
debugging/
capsem-doctor.md In-VM diagnostic suite
troubleshooting.md Common issues and solutions
development/
benchmarking.md How to run and extend capsem-bench
getting-started.md Dev environment setup (stub)
skills.md AI agent skills system
releases/
0-8.md through 0-14.md One page per minor version
Configured in docs/astro.config.mjs under starlight({ sidebar: [...] }). Uses autogenerate: { directory: '<category>' } for each section. Page ordering within a section uses sidebar: { order: N } in frontmatter.
docs/src/content/docs/<category>/<topic>.md with frontmatterautogeneratesidebar: { order: N } to control position (lower = higher in list)docs/src/content/docs/docs/astro.config.mjs: { label: 'Category Name', autogenerate: { directory: 'category-slug' } }
docs/src/content/docs/releases/<major>-<minor>.md (hyphens, not dots)sidebar.order = newer = listed first (reverse-chrono)The site uses astro-mermaid for rendering. Use fenced code blocks:
graph LR
A --> B --> C
Read references/astro.md for Astro framework patterns (components, content collections, SSR, CLI). From the official Astro team.
Custom CSS in docs/src/styles/custom.css. Accent colors and fonts. Logo at docs/src/assets/logo.svg.
Source of truth for all icons: graphics/ at the project root.
graphics/
icon/ Brand icon in multiple sizes and variants
icon-mainfile.ai Illustrator source file
22w/ 22px (menu bar)
1x/ 726px (standard)
2x/ 1450px (retina)
3x/ 2176px
4x/ 2900px
1024w/ 1024px (app store, high-res)
Variants: capsem-logo-{black,color,grey,white}.png
tauri/ Pre-built Tauri app icon set
32x32.png, 128x128.png, [email protected]
icon.icns, icon.ico, icon.svg
Site favicons in docs/public/ are generated from graphics/icon/1024w/capsem-logo-color.png. To regenerate:
sips -z 16 16 graphics/icon/1024w/capsem-logo-color.png --out docs/public/favicon-16x16.png
sips -z 32 32 graphics/icon/1024w/capsem-logo-color.png --out docs/public/favicon-32x32.png
sips -z 180 180 graphics/icon/1024w/capsem-logo-color.png --out docs/public/apple-touch-icon.png
sips -z 192 192 graphics/icon/1024w/capsem-logo-color.png --out docs/public/android-chrome-192x192.png
sips -z 512 512 graphics/icon/1024w/capsem-logo-color.png --out docs/public/android-chrome-512x512.png
tmp/build_sprint/custom-images.md -- 443-line draft for the custom images doc. Covers quick start, config reference, CLI reference, manifest, corporate deployment, troubleshooting.
development/getting-started.md is strictly about environment setup: prerequisites, clone, bootstrap, build-assets, codesign, first run. Troubleshooting in this page must be limited to setup failures (doctor, codesign, build-assets OOM/clock, missing assets). Runtime issues (disk full, boot hangs, cross-compile errors, network problems) belong in debugging/troubleshooting.md -- link there instead of duplicating.debugging/troubleshooting.md is the catch-all for runtime issues. New troubleshooting entries go here unless they are specifically about first-time env setup.When features change (settings, CLI flags, MCP tools, security invariants, benchmarks), update the corresponding doc page. When cutting a new minor release, create a new release page. Most pages are still stubs -- fill them in as features stabilize.
Take google/site-infra from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.