ln-114-frontend-docs-creator
Scannednpx machina-cli add skill levnikolaevich/claude-code-skills/ln-114-frontend-docs-creator --openclawPaths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
Frontend Documentation Creator
L3 Worker that creates design_guidelines.md. CONDITIONAL - only invoked when project has frontend.
Purpose & Scope
- Creates design_guidelines.md (if hasFrontend)
- Receives Context Store from ln-110-project-docs-coordinator
- WCAG 2.1 Level AA accessibility compliance
- Design system documentation
- Never gathers context itself; uses coordinator input
Invocation (who/when)
- ln-110-project-docs-coordinator: CONDITIONALLY invoked when:
hasFrontend=true(react, vue, angular, svelte detected)
- Never called directly by users
Inputs
From coordinator:
contextStore: Context Store with frontend-specific data- DESIGN_SYSTEM (Material-UI, Ant Design, custom)
- COLOR_PALETTE (primary, secondary, accent)
- TYPOGRAPHY (font families, sizes, weights)
- COMPONENT_LIBRARY (detected components)
targetDir: Project root directoryflags: { hasFrontend }
Documents Created (1, conditional)
| File | Condition | Questions | Auto-Discovery |
|---|---|---|---|
| docs/project/design_guidelines.md | hasFrontend | Q43-Q45 | Low |
Workflow
Phase 1: Check Conditions
- Parse flags from coordinator
- If
!hasFrontend: return early with empty result
Phase 2: Create Document
- Check if file exists (idempotent)
- If exists: skip with log
- If not exists:
- Copy template
- Replace placeholders with Context Store values
- Populate design system section
- Mark
[TBD: X]for missing data
Phase 3: Self-Validate
- Check SCOPE tag
- Validate sections:
- Design System (component library)
- Typography (font families, sizes)
- Colors (hex codes, semantic colors)
- Check WCAG 2.1 references
- Check Maintenance section
Phase 4: Return Status
{
"created": ["docs/project/design_guidelines.md"],
"skipped": [],
"tbd_count": 1,
"validation": "OK"
}
Critical Notes
Core Rules
- Conditional: Skip entirely if no frontend detected
- WCAG compliance: Document must reference accessibility standards
- Design tokens: Extract from CSS variables, tailwind config, or theme files
- Idempotent: Never overwrite existing files
NO_CODE_EXAMPLES Rule (MANDATORY)
Design guidelines document visual standards, NOT code:
- FORBIDDEN: CSS code blocks, component implementations
- ALLOWED: Tables (colors, typography), design tokens, Figma links
- INSTEAD OF CODE: "See Component Library" or "See src/components/Button.tsx"
Stack Adaptation Rule (MANDATORY)
- Link to correct component library docs (MUI for React, Vuetify for Vue)
- Reference framework-specific patterns (React hooks, Vue composition API)
- Never mix stack references (no React examples in Vue project)
Format Priority (MANDATORY)
Tables (colors, typography, spacing) > Lists (component inventory) > Text
Definition of Done
- Condition checked (hasFrontend)
- Document created if applicable
- Design system, typography, colors documented
- WCAG references included
- Actuality verified: all document facts match current code (paths, functions, APIs, configs exist and are accurate)
- Status returned to coordinator
Reference Files
- Templates:
references/templates/design_guidelines_template.md - Questions:
references/questions_frontend.md(Q43-Q45)
Version: 1.1.0 Last Updated: 2025-01-12
Source
git clone https://github.com/levnikolaevich/claude-code-skills/blob/master/ln-114-frontend-docs-creator/SKILL.mdView on GitHub Overview
Generates docs/project/design_guidelines.md for frontend projects when a frontend is detected. It enforces WCAG 2.1 AA accessibility and documents the design system using data provided by the coordinator.
How This Skill Works
The skill receives contextStore, targetDir, and flags from the ln-110-project-docs-coordinator. If hasFrontend is false, it returns an empty result; if true, it copies the design_guidelines template, fills placeholders with DESIGN_SYSTEM, COLOR_PALETTE, TYPOGRAPHY, and COMPONENT_LIBRARY values, and validates the Design System, Typography, Colors, and WCAG references before reporting status.
When to Use It
- When the project hasFrontend=true and a frontend framework (React, Vue, Angular, Svelte) is detected.
- When you need formal design guidelines documenting the active design system.
- When WCAG 2.1 AA accessibility references must be included in frontend docs.
- When ensuring idempotent creation so an existing design_guidelines.md is not overwritten.
- When coordinating content via the ln-110-project-docs-coordinator to populate context-based values.
Quick Start
- Step 1: Verify hasFrontend via the coordinator.
- Step 2: Run the ln-114-frontend-docs-creator to generate docs/project/design_guidelines.md.
- Step 3: Validate the document against WCAG references and design token sections; adjust as needed.
Best Practices
- Only invoke ln-114-frontend-docs-creator after hasFrontend is confirmed.
- Populate placeholders with values from the Context Store (DESIGN_SYSTEM, COLOR_PALETTE, TYPOGRAPHY, COMPONENT_LIBRARY).
- Keep the document idempotent; do not overwrite existing docs.
- Ensure WCAG references and Design System sections are complete; reference the correct stack docs (MUI for React, Vuetify for Vue) and avoid cross-stack mixing.
- Follow the Template guidance: use tables for colors/typography, not code blocks.
Example Use Cases
- React project with Material-UI design tokens and color palette.
- Vue project using Vuetify with a custom color and typography scale.
- Angular app with a shared design system and component library.
- Svelte app documenting design guidelines for accessibility.
- Project migration example where design_guidelines.md is created from the template and filled with context store values.