import type { DesignSkill } from "./design-skill.js"; export const docsPage: DesignSkill = { name: "docs-page", scenario: "engineering", description: "Documentation page — left sidebar nav (sticky), scrollable article body, right table of contents. Three-column layout with grouped navigation links, code blocks, callouts, and proper RTL support.", outputKind: "html", workflow: `# Docs Page Skill Produce a single, three-column documentation page in one HTML file. ## Phase 1 — Pre-flight 1. Read the active design system. Use the body type token for prose; the mono token for code; respect line-height and max-width rules. 2. Pick a concrete topic from the brief — the page should look like real docs, not a generic wireframe. Concrete API names, command examples, plausible parameters. ## Phase 2 — Three-column layout \`\`\`css .docs-layout { display: grid; grid-template-columns: 260px minmax(0, 720px) 200px; gap: 0; min-height: 100vh; } /* Left sidebar — sticky nav */ .docs-nav { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 32px 24px; border-right: 1px solid var(--border); background: var(--bg); } .docs-nav-group { margin-bottom: 24px; } .docs-nav-group-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; padding: 0 8px; } .docs-nav-link { display: block; padding: 6px 8px; border-radius: 6px; font-size: 14px; color: var(--muted); text-decoration: none; } .docs-nav-link:hover { color: var(--fg); background: var(--surface); } .docs-nav-link.active { color: var(--fg); background: var(--surface); border-left: 2px solid var(--accent); margin-left: -2px; } /* Article body */ .docs-article { padding: 48px 64px; max-width: 720px; } /* Right TOC — sticky */ .docs-toc { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 32px 16px; border-left: 1px solid var(--border); font-size: 13px; } .docs-toc-title { font-weight: 600; margin-bottom: 12px; } .docs-toc a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; } .docs-toc a:hover, .docs-toc a.active { color: var(--accent); } \`\`\` ## Phase 3 — Article Components ### Code blocks \`\`\`css pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px 24px; overflow-x: auto; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; margin: 24px 0; } code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface); padding: 2px 6px; border-radius: 4px; } pre code { background: none; padding: 0; } \`\`\` ### Callout boxes \`\`\`css .callout { border-left: 4px solid var(--accent); background: color-mix(in oklab, var(--accent) 5%, var(--bg)); padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 24px 0; font-size: 14px; } .callout.warning { border-color: var(--warn, #f59e0b); background: color-mix(in oklab, var(--warn, #f59e0b) 5%, var(--bg)); } .callout-title { font-weight: 600; margin-bottom: 4px; } \`\`\` ### Typography \`\`\`css .docs-article h1 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 8px; } .docs-article h2 { font-size: 24px; font-weight: 600; line-height: 1.3; margin-top: 48px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); } .docs-article h3 { font-size: 18px; font-weight: 600; margin-top: 32px; margin-bottom: 8px; } .docs-article p { font-size: 16px; line-height: 1.7; margin: 12px 0; color: var(--fg); } \`\`\` ## Phase 4 — Content Rules - Navigation: 3-5 groups of 4-8 links each - Article: H1, lede paragraph, H2 sections, code blocks, callouts (note/warning), inline links, lists - TOC: "On this page" with H2 anchors, current section highlighted on scroll - Concrete content: specific API names, command examples, plausible parameters — not placeholders - Respect RTL: layout expressed on the inline axis so it flips correctly under dir="rtl"`, };