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 directory
flags: { 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
- Status returned to coordinator
Reference Files
- Templates:
references/templates/design_guidelines_template.md
- Questions:
references/questions_frontend.md (Q43-Q45)
Version: 1.1.0 (Added NO_CODE, Stack Adaptation, Format Priority rules)
Last Updated: 2025-01-12
1---2name: ln-114-frontend-docs-creator3description: Creates design_guidelines.md for frontend projects. L3 Worker invoked CONDITIONALLY when hasFrontend detected.4---5
6# Frontend Documentation Creator
7
8L3 Worker that creates design_guidelines.md. CONDITIONAL - only invoked when project has frontend.
9
10## Purpose & Scope
11- Creates design_guidelines.md (if hasFrontend)
12- Receives Context Store from ln-110-project-docs-coordinator
13- WCAG 2.1 Level AA accessibility compliance
14- Design system documentation
15- Never gathers context itself; uses coordinator input
16
17## Invocation (who/when)
18- **ln-110-project-docs-coordinator:** CONDITIONALLY invoked when:
19 - `hasFrontend=true` (react, vue, angular, svelte detected)
20- Never called directly by users
21
22## Inputs
23From coordinator:
24- `contextStore`: Context Store with frontend-specific data
25 - DESIGN_SYSTEM (Material-UI, Ant Design, custom)
26 - COLOR_PALETTE (primary, secondary, accent)
27 - TYPOGRAPHY (font families, sizes, weights)
28 - COMPONENT_LIBRARY (detected components)
29- `targetDir`: Project root directory
30- `flags`: { hasFrontend }
31
32## Documents Created (1, conditional)
33
34| File | Condition | Questions | Auto-Discovery |
35|------|-----------|-----------|----------------|
36| docs/project/design_guidelines.md | hasFrontend | Q43-Q45 | Low |
37
38## Workflow
39
40### Phase 1: Check Conditions
411. Parse flags from coordinator
422. If `!hasFrontend`: return early with empty result
43
44### Phase 2: Create Document
451. Check if file exists (idempotent)
462. If exists: skip with log
473. If not exists:
48 - Copy template
49 - Replace placeholders with Context Store values
50 - Populate design system section
51 - Mark `[TBD: X]` for missing data
52
53### Phase 3: Self-Validate
541. Check SCOPE tag
552. Validate sections:
56 - Design System (component library)
57 - Typography (font families, sizes)
58 - Colors (hex codes, semantic colors)
593. Check WCAG 2.1 references
604. Check Maintenance section
61
62### Phase 4: Return Status
63```json
64{
65 "created": ["docs/project/design_guidelines.md"],
66 "skipped": [],
67 "tbd_count": 1,
68 "validation": "OK"
69}
70```
71
72## Critical Notes
73
74### Core Rules
75- **Conditional:** Skip entirely if no frontend detected
76- **WCAG compliance:** Document must reference accessibility standards
77- **Design tokens:** Extract from CSS variables, tailwind config, or theme files
78- **Idempotent:** Never overwrite existing files
79
80### NO_CODE_EXAMPLES Rule (MANDATORY)
81Design guidelines document **visual standards**, NOT code:
82- **FORBIDDEN:** CSS code blocks, component implementations
83- **ALLOWED:** Tables (colors, typography), design tokens, Figma links
84- **INSTEAD OF CODE:** "See [Component Library](link)" or "See src/components/Button.tsx"
85
86### Stack Adaptation Rule (MANDATORY)
87- Link to correct component library docs (MUI for React, Vuetify for Vue)
88- Reference framework-specific patterns (React hooks, Vue composition API)
89- Never mix stack references (no React examples in Vue project)
90
91### Format Priority (MANDATORY)
92Tables (colors, typography, spacing) > Lists (component inventory) > Text
93
94## Definition of Done
95- Condition checked (hasFrontend)
96- Document created if applicable
97- Design system, typography, colors documented
98- WCAG references included
99- Status returned to coordinator
100
101## Reference Files
102- Templates: `references/templates/design_guidelines_template.md`
103- Questions: `references/questions_frontend.md` (Q43-Q45)
104
105---
106**Version:** 1.1.0 (Added NO_CODE, Stack Adaptation, Format Priority rules)
107**Last Updated:** 2025-01-12