From 6b6aa5cb6a18423d932902bed44bd1eeb74fd2b4 Mon Sep 17 00:00:00 2001 From: Sam Gammon Date: Mon, 6 Jul 2026 11:32:12 -0700 Subject: [PATCH 01/10] docs: spec for docs composites cycle 2 (parallelized A+B+C) Co-Authored-By: Claude Opus 4.8 --- ...26-07-06-docs-composites-cycle-2-design.md | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 docs/superpowers/specs/2026-07-06-docs-composites-cycle-2-design.md diff --git a/docs/superpowers/specs/2026-07-06-docs-composites-cycle-2-design.md b/docs/superpowers/specs/2026-07-06-docs-composites-cycle-2-design.md new file mode 100644 index 0000000..d522337 --- /dev/null +++ b/docs/superpowers/specs/2026-07-06-docs-composites-cycle-2-design.md @@ -0,0 +1,134 @@ +# Docs composites — cycle 2 (parallelized) + +Ports the remaining Tier-2 docs composites (groups A + B + C from `COMPONENTS.md`) +from the authoritative `Elide Docs.dc.html` mockup. `CommandPalette` (group D) +stays deferred — it needs the Command-primitive decision (Base UI Combobox vs. +themed cmdk) and gets its own cycle. + +Work is fanned out across parallel Sonnet-5 agents. This document is the shared +contract every agent reads. + +## Scope + +| # | Composite | Mockup source (line refs in `Elide Docs.dc.html`) | +| --- | --- | --- | +| A1 | `AppNav` | NAV, L64–88 (brand + DOCS pill · nav links · search trigger · theme toggle · locale · changelog · install) | +| A2 | `SectionTabs` | SECTION TABS, L90–99 (Start·Runtime·Toolchain·API·Resources + version dot) | +| A3 | `Sidebar` (`SectionSwitcher`, `SidebarGroup`, `SidebarItem`) | SIDEBAR, L102–123 & L667–698 | +| A4 | `TableOfContents` | RIGHT RAIL "On this page", L184–190; FLOATING/MINI TOC L896, L1027 | +| A5 | `MobileNav` | MOBILE, L202–297 (app bar + bottom "Search or ask AI" bar + Sheet drawer) | +| B1 | `CardGrid` + `FeatureCard` | "Start here" cards L236–239; section-landing card grid (2a) | +| B2 | `StatStrip` | 2a compatibility stat strip | +| B3 | `AiActions` | "Use with AI" panel, L191–195 | +| B4 | `CopyCommand` | install one-liner `curl elide.sh \| bash`, L234 | +| C1 | `ApiMethod` + `ParamRow` | 2b node:fs reference, L461–582 | +| C2 | `SupportMatrix` (`DataTable`) | SUPPORT MATRIX, L566 | +| C3 | `StatusBadge` | API status pills — thin wrapper over existing `Badge` status tones | + +## Shared contract (every agent obeys) + +1. **Files, scoped.** Each agent creates **only**: + - `packages/ui/src/components/.tsx` + - `packages/ui/src/stories/.stories.tsx` + - `packages/ui/src/components/.test.tsx` (jsdom unit test) + + Agents **must not** edit `src/index.ts`, `package.json`, `styles.css`, + `turbo.json`, `components.json`, `@elide/tokens`, or anything under + `.github/`. The integrator (main session) wires exports and runs the + aggregate build. `styles.css` already `@source`-globs `./components` and + `./stories`, so no CSS change is needed. + +2. **Theme only from tokens.** Use the CSS variables the mockup uses + (`var(--nav-bg)`, `var(--border)`, `var(--border-strong)`, `var(--fg)`, + `var(--fg-muted)`, `var(--fg-subtle)`, `var(--primary)`, `var(--primary-soft)`, + `var(--bg)`, `var(--bg-elev)`, `var(--bg-elev2)`, `var(--brand)`, `--code-*`, + `--syn-*`). Never hardcode a raw hex from the mockup. The one exception the + mockup itself makes is the **changelog violet** (`#9747ff`) — reuse the + existing `Button` `variant="changelog"` rather than re-inlining it. + Tailwind utility classes map to tokens already (`bg-background`, `text-muted-foreground`, + `border-border`, …); prefer them, and use `style={{}}` with `var(--…)` only + where no utility exists. Follow the idiom already in `callout.tsx` / + `breadcrumbs.tsx` / `page-footer-nav.tsx`. + +3. **Composition over new primitives.** Reuse shipped components — `Button`, + `Badge`, `Tooltip`, `Popover`, `DropdownMenu`, `Sheet`, `NavigationMenu`, + `Separator`, `ScrollArea`, `Breadcrumbs`. Group A also has `Accordion`, + `Select`, and `Avatar` available (pre-generated in Phase 0). Do not add new + npm dependencies; if you think you need one, stop and flag it. + +4. **Icons:** `lucide-react` only. Relative imports (`../lib/utils`, + `./button`) — no `@/` alias. + +5. **Props:** typed, exported `interface`/`type`; sensible defaults; data-driven + (arrays of items) so consumers pass content. Match the variants/props already + listed in `COMPONENTS.md` for the component. Forward `className` and merge with + `cn(...)`. `aria-*`: nav landmarks (`