@dedesfr/prompter 0.8.7 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/cli/index.js +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +57 -5
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
- package/skills/design-md/README.md +34 -0
- package/skills/design-md/SKILL.md +172 -0
- package/skills/design-md/examples/DESIGN.md +154 -0
- package/skills/doc-builder/SKILL.md +115 -0
- package/skills/doc-builder/references/ui-patterns.md +394 -0
- package/skills/document-translator/SKILL.md +58 -0
- package/skills/enhance-prompt/README.md +34 -0
- package/skills/enhance-prompt/SKILL.md +204 -0
- package/skills/enhance-prompt/references/KEYWORDS.md +114 -0
- package/skills/feature-planner/SKILL.md +305 -0
- package/skills/feature-planner/assets/implementation-plan-template.md +85 -0
- package/skills/gamma-builder/SKILL.md +134 -0
- package/skills/ui-ux-pro/SKILL.md +224 -233
- package/src/cli/index.ts +1 -1
- package/src/commands/init.ts +63 -5
- package/docs/product-spec.md +0 -151
- package/docs/tasks.md +0 -3
- package/skills/skill-creator/LICENSE.txt +0 -202
- package/skills/skill-creator/SKILL.md +0 -485
- package/skills/skill-creator/agents/analyzer.md +0 -274
- package/skills/skill-creator/agents/comparator.md +0 -202
- package/skills/skill-creator/agents/grader.md +0 -223
- package/skills/skill-creator/assets/eval_review.html +0 -146
- package/skills/skill-creator/eval-viewer/generate_review.py +0 -471
- package/skills/skill-creator/eval-viewer/viewer.html +0 -1325
- package/skills/skill-creator/references/schemas.md +0 -430
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
- package/skills/skill-creator/scripts/generate_report.py +0 -326
- package/skills/skill-creator/scripts/improve_description.py +0 -247
- package/skills/skill-creator/scripts/package_skill.py +0 -136
- package/skills/skill-creator/scripts/quick_validate.py +0 -103
- package/skills/skill-creator/scripts/run_eval.py +0 -310
- package/skills/skill-creator/scripts/run_loop.py +0 -328
- package/skills/skill-creator/scripts/utils.py +0 -47
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Design System: Furniture Collections List
|
|
2
|
+
**Project ID:** 13534454087919359824
|
|
3
|
+
|
|
4
|
+
## 1. Visual Theme & Atmosphere
|
|
5
|
+
|
|
6
|
+
The Furniture Collections List embodies a **sophisticated, minimalist sanctuary** that marries the pristine simplicity of Scandinavian design with the refined visual language of luxury editorial presentation. The interface feels **spacious and tranquil**, prioritizing breathing room and visual clarity above all else. The design philosophy is gallery-like and photography-first, allowing each furniture piece to command attention as an individual art object.
|
|
7
|
+
|
|
8
|
+
The overall mood is **airy yet grounded**, creating an aspirational aesthetic that remains approachable and welcoming. The interface feels **utilitarian in its restraint** but elegant in its execution, with every element serving a clear purpose while maintaining visual sophistication. The atmosphere evokes the serene ambiance of a high-end furniture showroom where customers can browse thoughtfully without visual overwhelm.
|
|
9
|
+
|
|
10
|
+
**Key Characteristics:**
|
|
11
|
+
- Expansive whitespace creating generous breathing room between elements
|
|
12
|
+
- Clean, architectural grid system with structured content blocks
|
|
13
|
+
- Photography-first presentation with minimal UI interference
|
|
14
|
+
- Whisper-soft visual hierarchy that guides without shouting
|
|
15
|
+
- Refined, understated interactive elements
|
|
16
|
+
- Professional yet inviting editorial tone
|
|
17
|
+
|
|
18
|
+
## 2. Color Palette & Roles
|
|
19
|
+
|
|
20
|
+
### Primary Foundation
|
|
21
|
+
- **Warm Barely-There Cream** (#FCFAFA) – Primary background color. Creates an almost imperceptible warmth that feels more inviting than pure white, serving as the serene canvas for the entire experience.
|
|
22
|
+
- **Crisp Very Light Gray** (#F5F5F5) – Secondary surface color used for card backgrounds and content areas. Provides subtle visual separation while maintaining the airy, ethereal quality.
|
|
23
|
+
|
|
24
|
+
### Accent & Interactive
|
|
25
|
+
- **Deep Muted Teal-Navy** (#294056) – The sole vibrant accent in the palette. Used exclusively for primary call-to-action buttons (e.g., "Shop Now", "View all products"), active navigation links, selected filter states, and subtle interaction highlights. This sophisticated anchor color creates visual focus points without disrupting the serene neutral foundation.
|
|
26
|
+
|
|
27
|
+
### Typography & Text Hierarchy
|
|
28
|
+
- **Charcoal Near-Black** (#2C2C2C) – Primary text color for headlines and product names. Provides strong readable contrast while being softer and more refined than pure black.
|
|
29
|
+
- **Soft Warm Gray** (#6B6B6B) – Secondary text used for body copy, product descriptions, and supporting metadata. Creates clear typographic hierarchy without harsh contrast.
|
|
30
|
+
- **Ultra-Soft Silver Gray** (#E0E0E0) – Tertiary color for borders, dividers, and subtle structural elements. Creates separation so gentle it's almost imperceptible.
|
|
31
|
+
|
|
32
|
+
### Functional States (Reserved for system feedback)
|
|
33
|
+
- **Success Moss** (#10B981) – Stock availability, confirmation states, positive indicators
|
|
34
|
+
- **Alert Terracotta** (#EF4444) – Low stock warnings, error states, critical alerts
|
|
35
|
+
- **Informational Slate** (#64748B) – Neutral system messages, informational callouts
|
|
36
|
+
|
|
37
|
+
## 3. Typography Rules
|
|
38
|
+
|
|
39
|
+
**Primary Font Family:** Manrope
|
|
40
|
+
**Character:** Modern, geometric sans-serif with gentle humanist warmth. Slightly rounded letterforms that feel contemporary yet approachable.
|
|
41
|
+
|
|
42
|
+
### Hierarchy & Weights
|
|
43
|
+
- **Display Headlines (H1):** Semi-bold weight (600), generous letter-spacing (0.02em for elegance), 2.75-3.5rem size. Used sparingly for hero sections and major page titles.
|
|
44
|
+
- **Section Headers (H2):** Semi-bold weight (600), subtle letter-spacing (0.01em), 2-2.5rem size. Establishes clear content zones and featured collections.
|
|
45
|
+
- **Subsection Headers (H3):** Medium weight (500), normal letter-spacing, 1.5-1.75rem size. Product names and category labels.
|
|
46
|
+
- **Body Text:** Regular weight (400), relaxed line-height (1.7), 1rem size. Descriptions and supporting content prioritize comfortable readability.
|
|
47
|
+
- **Small Text/Meta:** Regular weight (400), slightly tighter line-height (1.5), 0.875rem size. Prices, availability, and metadata remain legible but visually recessive.
|
|
48
|
+
- **CTA Buttons:** Medium weight (500), subtle letter-spacing (0.01em), 1rem size. Balanced presence without visual aggression.
|
|
49
|
+
|
|
50
|
+
### Spacing Principles
|
|
51
|
+
- Headers use slightly expanded letter-spacing for refined elegance
|
|
52
|
+
- Body text maintains generous line-height (1.7) for effortless reading
|
|
53
|
+
- Consistent vertical rhythm with 2-3rem between related text blocks
|
|
54
|
+
- Large margins (4-6rem) between major sections to reinforce spaciousness
|
|
55
|
+
|
|
56
|
+
## 4. Component Stylings
|
|
57
|
+
|
|
58
|
+
### Buttons
|
|
59
|
+
- **Shape:** Subtly rounded corners (8px/0.5rem radius) – approachable and modern without appearing playful or childish
|
|
60
|
+
- **Primary CTA:** Deep Muted Teal-Navy (#294056) background with pure white text, comfortable padding (0.875rem vertical, 2rem horizontal)
|
|
61
|
+
- **Hover State:** Subtle darkening to deeper navy, smooth 250ms ease-in-out transition
|
|
62
|
+
- **Focus State:** Soft outer glow in the primary color for keyboard navigation accessibility
|
|
63
|
+
- **Secondary CTA (if needed):** Outlined style with Deep Muted Teal-Navy border, transparent background, hover fills with whisper-soft teal tint
|
|
64
|
+
|
|
65
|
+
### Cards & Product Containers
|
|
66
|
+
- **Corner Style:** Gently rounded corners (12px/0.75rem radius) creating soft, refined edges
|
|
67
|
+
- **Background:** Alternates between Warm Barely-There Cream and Crisp Very Light Gray based on layering needs
|
|
68
|
+
- **Shadow Strategy:** Flat by default. On hover, whisper-soft diffused shadow appears (`0 2px 8px rgba(0,0,0,0.06)`) creating subtle depth
|
|
69
|
+
- **Border:** Optional hairline border (1px) in Ultra-Soft Silver Gray for delicate definition when shadows aren't present
|
|
70
|
+
- **Internal Padding:** Generous 2-2.5rem creating comfortable breathing room for content
|
|
71
|
+
- **Image Treatment:** Full-bleed at the top of cards, square or 4:3 ratio, seamless edge-to-edge presentation
|
|
72
|
+
|
|
73
|
+
### Navigation
|
|
74
|
+
- **Style:** Clean horizontal layout with generous spacing (2-3rem) between menu items
|
|
75
|
+
- **Typography:** Medium weight (500), subtle uppercase, expanded letter-spacing (0.06em) for refined sophistication
|
|
76
|
+
- **Default State:** Charcoal Near-Black text
|
|
77
|
+
- **Active/Hover State:** Smooth 200ms color transition to Deep Muted Teal-Navy
|
|
78
|
+
- **Active Indicator:** Thin underline (2px) in Deep Muted Teal-Navy appearing below current section
|
|
79
|
+
- **Mobile:** Converts to elegant hamburger menu with sliding drawer
|
|
80
|
+
|
|
81
|
+
### Inputs & Forms
|
|
82
|
+
- **Stroke Style:** Refined 1px border in Soft Warm Gray
|
|
83
|
+
- **Background:** Warm Barely-There Cream with transition to Crisp Very Light Gray on focus
|
|
84
|
+
- **Corner Style:** Matching button roundness (8px/0.5rem) for visual consistency
|
|
85
|
+
- **Focus State:** Border color shifts to Deep Muted Teal-Navy with subtle outer glow
|
|
86
|
+
- **Padding:** Comfortable 0.875rem vertical, 1.25rem horizontal for touch-friendly targets
|
|
87
|
+
- **Placeholder Text:** Ultra-Soft Silver Gray, elegant and unobtrusive
|
|
88
|
+
|
|
89
|
+
### Product Cards (Specific Pattern)
|
|
90
|
+
- **Image Area:** Square (1:1) or landscape (4:3) ratio filling card width completely
|
|
91
|
+
- **Content Stack:** Product name (H3), brief descriptor, material/finish, price
|
|
92
|
+
- **Price Display:** Emphasized with semi-bold weight (600) in Charcoal Near-Black
|
|
93
|
+
- **Hover Behavior:** Gentle lift effect (translateY -4px) combined with enhanced shadow
|
|
94
|
+
- **Spacing:** Consistent 1.5rem internal padding below image
|
|
95
|
+
|
|
96
|
+
## 5. Layout Principles
|
|
97
|
+
|
|
98
|
+
### Grid & Structure
|
|
99
|
+
- **Max Content Width:** 1440px for optimal readability and visual balance on large displays
|
|
100
|
+
- **Grid System:** Responsive 12-column grid with fluid gutters (24px mobile, 32px desktop)
|
|
101
|
+
- **Product Grid:** 4 columns on large desktop, 3 on desktop, 2 on tablet, 1 on mobile
|
|
102
|
+
- **Breakpoints:**
|
|
103
|
+
- Mobile: <768px
|
|
104
|
+
- Tablet: 768-1024px
|
|
105
|
+
- Desktop: 1024-1440px
|
|
106
|
+
- Large Desktop: >1440px
|
|
107
|
+
|
|
108
|
+
### Whitespace Strategy (Critical to the Design)
|
|
109
|
+
- **Base Unit:** 8px for micro-spacing, 16px for component spacing
|
|
110
|
+
- **Vertical Rhythm:** Consistent 2rem (32px) base unit between related elements
|
|
111
|
+
- **Section Margins:** Generous 5-8rem (80-128px) between major sections creating dramatic breathing room
|
|
112
|
+
- **Edge Padding:** 1.5rem (24px) mobile, 3rem (48px) tablet/desktop for comfortable framing
|
|
113
|
+
- **Hero Sections:** Extra-generous top/bottom padding (8-12rem) for impactful presentation
|
|
114
|
+
|
|
115
|
+
### Alignment & Visual Balance
|
|
116
|
+
- **Text Alignment:** Left-aligned for body and navigation (optimal readability), centered for hero headlines and featured content
|
|
117
|
+
- **Image to Text Ratio:** Heavily weighted toward imagery (70-30 split) reinforcing photography-first philosophy
|
|
118
|
+
- **Asymmetric Balance:** Large hero images offset by compact, refined text blocks
|
|
119
|
+
- **Visual Weight Distribution:** Strategic use of whitespace to draw eyes to hero products and primary CTAs
|
|
120
|
+
- **Reading Flow:** Clear top-to-bottom, left-to-right pattern with intentional focal points
|
|
121
|
+
|
|
122
|
+
### Responsive Behavior & Touch
|
|
123
|
+
- **Mobile-First Foundation:** Core experience designed and perfected for smallest screens first
|
|
124
|
+
- **Progressive Enhancement:** Additional columns, imagery, and details added gracefully at larger breakpoints
|
|
125
|
+
- **Touch Targets:** Minimum 44x44px for all interactive elements (WCAG AAA compliant)
|
|
126
|
+
- **Image Optimization:** Responsive images with appropriate resolutions for each breakpoint, lazy-loading for performance
|
|
127
|
+
- **Collapsing Strategy:** Navigation collapses to hamburger, grid reduces columns, padding scales proportionally
|
|
128
|
+
|
|
129
|
+
## 6. Design System Notes for Stitch Generation
|
|
130
|
+
|
|
131
|
+
When creating new screens for this project using Stitch, reference these specific instructions:
|
|
132
|
+
|
|
133
|
+
### Language to Use
|
|
134
|
+
- **Atmosphere:** "Sophisticated minimalist sanctuary with gallery-like spaciousness"
|
|
135
|
+
- **Button Shapes:** "Subtly rounded corners" (not "rounded-md" or "8px")
|
|
136
|
+
- **Shadows:** "Whisper-soft diffused shadows on hover" (not "shadow-sm")
|
|
137
|
+
- **Spacing:** "Generous breathing room" and "expansive whitespace"
|
|
138
|
+
|
|
139
|
+
### Color References
|
|
140
|
+
Always use the descriptive names with hex codes:
|
|
141
|
+
- Primary CTA: "Deep Muted Teal-Navy (#294056)"
|
|
142
|
+
- Backgrounds: "Warm Barely-There Cream (#FCFAFA)" or "Crisp Very Light Gray (#F5F5F5)"
|
|
143
|
+
- Text: "Charcoal Near-Black (#2C2C2C)" or "Soft Warm Gray (#6B6B6B)"
|
|
144
|
+
|
|
145
|
+
### Component Prompts
|
|
146
|
+
- "Create a product card with gently rounded corners, full-bleed square product image, and whisper-soft shadow on hover"
|
|
147
|
+
- "Design a primary call-to-action button in Deep Muted Teal-Navy (#294056) with subtle rounded corners and comfortable padding"
|
|
148
|
+
- "Add a navigation bar with generous spacing between items, using medium-weight Manrope with subtle uppercase and expanded letter-spacing"
|
|
149
|
+
|
|
150
|
+
### Incremental Iteration
|
|
151
|
+
When refining existing screens:
|
|
152
|
+
1. Focus on ONE component at a time (e.g., "Update the product grid cards")
|
|
153
|
+
2. Be specific about what to change (e.g., "Increase the internal padding of product cards from 1.5rem to 2rem")
|
|
154
|
+
3. Reference this design system language consistently
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: doc-builder
|
|
3
|
+
description: Generate interactive system flowchart documentation pages with Mermaid.js diagrams. Use this skill whenever the user asks to create documentation, document architecture, generate flowcharts, visualize system flows, or create technical diagrams for any scope — a single page, feature, module, or entire project/repo. Also use when the user says things like "create documentation for ...", "document this module", "generate system diagrams", or "visualize the architecture".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# System Flowcharts Generator
|
|
7
|
+
|
|
8
|
+
Generate interactive, self-contained HTML documentation pages with Mermaid.js flowchart diagrams. The pages follow a Mintlify-inspired design system with a sidebar, top navbar, module cards, and lazy-rendered diagrams.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- User asks to document a system, module, feature, or entire repo
|
|
13
|
+
- User wants flowcharts, architecture diagrams, or system visualizations
|
|
14
|
+
- User says "create documentation", "document the flows", "generate diagrams", etc.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### 1. Determine Scope and Output Strategy
|
|
19
|
+
|
|
20
|
+
Ask the user (or infer from context) what they want documented. Then, after exploring the codebase, **recommend** whether to use a single file or multiple files — but let the user decide.
|
|
21
|
+
|
|
22
|
+
When making your recommendation, consider:
|
|
23
|
+
- **Number of flows/sections**: A feature with 3 flows fits comfortably in one file. A module with 12+ flows gets unwieldy.
|
|
24
|
+
- **Content density**: If each flow has detailed diagrams and step timelines, even a few flows can make a single page very long.
|
|
25
|
+
- **Navigability**: A single file with sidebar sections is simpler to share and browse. Multiple files are easier to maintain and load faster individually.
|
|
26
|
+
|
|
27
|
+
Present your recommendation like: "This module has 8 major flows — I'd suggest splitting into separate pages per domain area with an index page, but I can also put it all in one file if you prefer. What do you think?"
|
|
28
|
+
|
|
29
|
+
For multi-file output, create an `index.html` that links to each module's page. Each module page is fully self-contained (all CSS/JS inline).
|
|
30
|
+
|
|
31
|
+
### 2. Explore the Codebase
|
|
32
|
+
|
|
33
|
+
Investigate the target scope to understand:
|
|
34
|
+
- System architecture and module boundaries
|
|
35
|
+
- Data flows and request lifecycles
|
|
36
|
+
- Key processes, workflows, and decision points
|
|
37
|
+
- External integrations and dependencies
|
|
38
|
+
- Error handling paths
|
|
39
|
+
|
|
40
|
+
### 3. Identify Flowchart Content
|
|
41
|
+
|
|
42
|
+
For each section/module, identify:
|
|
43
|
+
- **Overview**: What the module does, its key components (rendered as module cards)
|
|
44
|
+
- **Flows**: The major workflows worth diagramming (each becomes a sidebar section with a Mermaid flowchart)
|
|
45
|
+
- **Steps**: Key process steps (rendered as timeline flow steps)
|
|
46
|
+
|
|
47
|
+
### 4. Generate the HTML
|
|
48
|
+
|
|
49
|
+
Read the full design system spec from `references/ui-patterns.md` in this skill's directory. Follow it exactly — all design tokens, components, typography, responsive breakpoints, and JavaScript behavior.
|
|
50
|
+
|
|
51
|
+
Key requirements:
|
|
52
|
+
- Single self-contained HTML file per page (all CSS and JS inline)
|
|
53
|
+
- Google Fonts loaded via `<link>` tag (Inter + Geist Mono)
|
|
54
|
+
- Mermaid.js loaded via CDN
|
|
55
|
+
- Left sidebar navigation with sections for Overview + each flow
|
|
56
|
+
- Lazy Mermaid rendering (diagrams render only when their tab is activated)
|
|
57
|
+
- Tab switching updates breadcrumbs and scrolls to top
|
|
58
|
+
- Scroll animations via IntersectionObserver
|
|
59
|
+
- Mobile responsive (sidebar collapses below 1024px)
|
|
60
|
+
|
|
61
|
+
### 5. Output Location
|
|
62
|
+
|
|
63
|
+
Save output to `docs/` directory by default:
|
|
64
|
+
- Single scope: `docs/flowcharts.html` or `docs/<name>-flowcharts.html`
|
|
65
|
+
- Multi-file: `docs/flowcharts/index.html` + `docs/flowcharts/<module>.html`
|
|
66
|
+
|
|
67
|
+
Ask the user if they want a different location.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Mermaid Diagram Conventions
|
|
72
|
+
|
|
73
|
+
Use consistent node styling to communicate meaning:
|
|
74
|
+
|
|
75
|
+
| Color | Meaning | Mermaid Style |
|
|
76
|
+
|-------|---------|---------------|
|
|
77
|
+
| Cyan (`#06B6D4`) | Start/Entry point | `style A fill:#06B6D4,color:#fff` |
|
|
78
|
+
| Green (`#18E299`) | System process | `style B fill:#18E299,color:#0F172A` |
|
|
79
|
+
| Amber (`#F59E0B`) | Approval/Decision requiring human input | `style C fill:#F59E0B,color:#0F172A` |
|
|
80
|
+
| Red (`#EF4444`) | Error/Rejection | `style D fill:#EF4444,color:#fff` |
|
|
81
|
+
| White (`#ffffff`) | Standard process step | (default, no override needed) |
|
|
82
|
+
|
|
83
|
+
Always include a legend after each diagram explaining the color conventions used.
|
|
84
|
+
|
|
85
|
+
## Mermaid Tips
|
|
86
|
+
|
|
87
|
+
- Use `flowchart TD` (top-down) for most flows
|
|
88
|
+
- Use descriptive node labels in quotes: `A["User Submits Form"]`
|
|
89
|
+
- Use edge labels for conditions: `C -->|"Valid"| D`
|
|
90
|
+
- Keep diagrams focused — if a flow has more than ~15 nodes, split into sub-flows
|
|
91
|
+
- Use subgraphs to group related steps: `subgraph "Authentication" ... end`
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Index Page (Multi-file Output)
|
|
96
|
+
|
|
97
|
+
When generating multiple module pages, create an `index.html` that:
|
|
98
|
+
- Uses the same design system (topbar, styling)
|
|
99
|
+
- Shows a grid of module cards (one per module page)
|
|
100
|
+
- Each card links to the module's HTML file
|
|
101
|
+
- Includes a brief project overview at the top
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Design System Reference
|
|
106
|
+
|
|
107
|
+
The complete UI pattern specification is bundled at `references/ui-patterns.md`. Read it before generating any HTML. It contains:
|
|
108
|
+
- All design tokens (colors, spacing, dimensions)
|
|
109
|
+
- Typography specs (Inter + Geist Mono)
|
|
110
|
+
- Component HTML/CSS patterns (topbar, sidebar, flowchart containers, module cards, flow steps, badges, legends)
|
|
111
|
+
- Mermaid.js configuration block
|
|
112
|
+
- JavaScript for tab switching, lazy rendering, scroll animations
|
|
113
|
+
- Responsive breakpoints
|
|
114
|
+
|
|
115
|
+
Follow the spec precisely — do not improvise styles or deviate from the documented patterns.
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
# System Flowcharts - UI Pattern Documentation
|
|
2
|
+
|
|
3
|
+
> Reusable pattern for generating interactive system flowchart documentation pages.
|
|
4
|
+
> Mintlify-inspired Classic Light theme, featuring a left sidebar, top navbar, and Mermaid.js diagrams.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Design Tokens](#design-tokens)
|
|
11
|
+
- [Typography](#typography)
|
|
12
|
+
- [Page Structure](#page-structure)
|
|
13
|
+
- [Components](#components)
|
|
14
|
+
- [Top Navigation Bar](#top-navigation-bar)
|
|
15
|
+
- [Left Sidebar](#left-sidebar)
|
|
16
|
+
- [Main Content Area](#main-content-area)
|
|
17
|
+
- [Flowchart Container](#flowchart-container)
|
|
18
|
+
- [Mermaid Diagram](#mermaid-diagram)
|
|
19
|
+
- [Module Cards Grid](#module-cards-grid)
|
|
20
|
+
- [Flow Steps (Timeline)](#flow-steps-timeline)
|
|
21
|
+
- [Badges](#badges)
|
|
22
|
+
- [Legend](#legend)
|
|
23
|
+
- [Mermaid Configuration](#mermaid-configuration)
|
|
24
|
+
- [JavaScript Behavior](#javascript-behavior)
|
|
25
|
+
- [Responsive Breakpoints](#responsive-breakpoints)
|
|
26
|
+
- [Usage Template](#usage-template)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Design Tokens
|
|
31
|
+
|
|
32
|
+
### Color Palette
|
|
33
|
+
|
|
34
|
+
| Token | Value | Usage |
|
|
35
|
+
| -------------------- | ------------------------------ | ------------------------ |
|
|
36
|
+
| `--color-primary` | `#0F172A` | Slate 900 - Dark text |
|
|
37
|
+
| `--color-brand` | `#18E299` | Primary brand green |
|
|
38
|
+
| `--color-brand-light`| `#d4fae8` | Light brand background |
|
|
39
|
+
| `--color-brand-deep` | `#0fa76e` | Deep brand accent text |
|
|
40
|
+
| `--color-white` | `#ffffff` | Main content background |
|
|
41
|
+
| `--color-warning` | `#F59E0B` | Amber - Warnings |
|
|
42
|
+
| `--color-error` | `#EF4444` | Red - Errors/Rejections |
|
|
43
|
+
| `--color-info` | `#3B82F6` | Blue - Standard Process |
|
|
44
|
+
| `--color-gray-50` | `#F9FAFB` | Standard light background|
|
|
45
|
+
| `--color-gray-100` | `#F3F4F6` | Subtle hover background |
|
|
46
|
+
| `--color-gray-500` | `#6B7280` | Secondary text (slate) |
|
|
47
|
+
| `--color-gray-700` | `#374151` | Primary body text |
|
|
48
|
+
| `--color-gray-900` | `#111827` | Headings and strong text |
|
|
49
|
+
| `--color-border` | `#E5E7EB` | Standard borders |
|
|
50
|
+
| `--color-border-medium`| `#D1D5DB` | Hover borders |
|
|
51
|
+
|
|
52
|
+
### Core Layout Dimensions
|
|
53
|
+
|
|
54
|
+
| Token | Value | Usage |
|
|
55
|
+
| ------------------------ | -------- | -------------------------- |
|
|
56
|
+
| `--sidebar-width` | `260px` | Width of left sidebar |
|
|
57
|
+
| `--header-height` | `60px` | Height of top sticky nav |
|
|
58
|
+
| `--content-max-width` | `880px` | Max width of reading pane |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Typography
|
|
63
|
+
|
|
64
|
+
### Fonts
|
|
65
|
+
|
|
66
|
+
| Font | Weight | Usage |
|
|
67
|
+
| ---------------- | ------------------ | ---------------------------------- |
|
|
68
|
+
| **Inter** | 400, 500, 600, 700 | Body, headings, main UI elements |
|
|
69
|
+
| **Geist Mono** | 400, 500, 600 | Code, tags, badges, step numbers |
|
|
70
|
+
|
|
71
|
+
### Google Fonts Import
|
|
72
|
+
|
|
73
|
+
```html
|
|
74
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Page Structure
|
|
80
|
+
|
|
81
|
+
The layout follows a two-column documentation structure:
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<body>
|
|
85
|
+
<div class="layout">
|
|
86
|
+
<header class="topbar">
|
|
87
|
+
<!-- Logo and Breadcrumbs -->
|
|
88
|
+
</header>
|
|
89
|
+
|
|
90
|
+
<div class="layout-body">
|
|
91
|
+
<aside class="sidebar">
|
|
92
|
+
<!-- Sidebar Navigation Links -->
|
|
93
|
+
</aside>
|
|
94
|
+
|
|
95
|
+
<main class="main-content">
|
|
96
|
+
<div class="content-container">
|
|
97
|
+
<!-- Page Header (Title, Subtitle, Summary Pills) -->
|
|
98
|
+
<!-- Flowchart Containers per section -->
|
|
99
|
+
</div>
|
|
100
|
+
</main>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</body>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Components
|
|
109
|
+
|
|
110
|
+
### Top Navigation Bar
|
|
111
|
+
|
|
112
|
+
Sticky header with branding and dynamic breadcrumbs.
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<header class="topbar">
|
|
116
|
+
<div class="topbar-logo">
|
|
117
|
+
<svg>...</svg> Docs Logo
|
|
118
|
+
</div>
|
|
119
|
+
<div class="topbar-breadcrumbs">
|
|
120
|
+
<!-- Breadcrumb items -->
|
|
121
|
+
<span class="active" id="breadcrumb-current">Current Section</span>
|
|
122
|
+
</div>
|
|
123
|
+
</header>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Key styles:**
|
|
127
|
+
- `position: fixed`, `height: 60px`
|
|
128
|
+
- Background: `rgba(255, 255, 255, 0.85)` with `backdrop-filter: blur(12px)`
|
|
129
|
+
- Border bottom: `1px solid var(--color-border)`
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### Left Sidebar
|
|
134
|
+
|
|
135
|
+
Fixed navigation menu replacing traditional horizontal tabs.
|
|
136
|
+
|
|
137
|
+
```html
|
|
138
|
+
<aside class="sidebar">
|
|
139
|
+
<div class="sidebar-group">
|
|
140
|
+
<div class="sidebar-group-title">Category Name</div>
|
|
141
|
+
<nav class="sidebar-nav">
|
|
142
|
+
<button class="sidebar-link active" data-tab="overview">
|
|
143
|
+
<span>Overview</span>
|
|
144
|
+
</button>
|
|
145
|
+
<button class="sidebar-link" data-tab="section-1">
|
|
146
|
+
<span>Section 1</span>
|
|
147
|
+
</button>
|
|
148
|
+
</nav>
|
|
149
|
+
</div>
|
|
150
|
+
</aside>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Key styles:**
|
|
154
|
+
- Fixed below topbar, width `260px`
|
|
155
|
+
- Background: `var(--color-gray-50)`
|
|
156
|
+
- Links (`.sidebar-link`): Clean layout with `font-size: 0.875rem`
|
|
157
|
+
- Active State: Background `var(--color-brand-light)`, text `var(--color-brand-deep)`
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### Main Content Area
|
|
162
|
+
|
|
163
|
+
Responsive container for readability.
|
|
164
|
+
|
|
165
|
+
```html
|
|
166
|
+
<main class="main-content">
|
|
167
|
+
<div class="content-container">
|
|
168
|
+
<div class="page-header">
|
|
169
|
+
<div class="eyebrow">Category</div>
|
|
170
|
+
<h1>Main Document Title</h1>
|
|
171
|
+
<p class="subtitle">Document description</p>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</main>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Key styles:**
|
|
178
|
+
- Margin-left matches sidebar width (`260px`)
|
|
179
|
+
- Content max-width constrained to `880px`
|
|
180
|
+
- `padding: 3rem 2rem 5rem` for generous vertical whitespace
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### Flowchart Container
|
|
185
|
+
|
|
186
|
+
Wrapper that shows/hides content based on active sidebar link.
|
|
187
|
+
|
|
188
|
+
```html
|
|
189
|
+
<section class="flowchart-container" id="tab-id">
|
|
190
|
+
<!-- Content for this section -->
|
|
191
|
+
</section>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Key styles:**
|
|
195
|
+
- `display: none` by default, `display: block` when `.active`
|
|
196
|
+
- Fast entry animation: `fadeIn 0.4s ease` (opacity + translate)
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
### Mermaid Diagram
|
|
201
|
+
|
|
202
|
+
Container for Mermaid.js rendered flowcharts.
|
|
203
|
+
|
|
204
|
+
```html
|
|
205
|
+
<div class="mermaid-container">
|
|
206
|
+
<h3>Diagram Title</h3>
|
|
207
|
+
<p class="mermaid-caption">Diagram explanation text.</p>
|
|
208
|
+
<pre class="mermaid">
|
|
209
|
+
flowchart TD
|
|
210
|
+
A["Start"] --> B["Process"]
|
|
211
|
+
B --> C{"Decision"}
|
|
212
|
+
C -->|Yes| D["Success"]
|
|
213
|
+
C -->|No| E["Handle Error"]
|
|
214
|
+
</pre>
|
|
215
|
+
</div>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Container styles:**
|
|
219
|
+
- Border: `1px solid var(--color-border)`
|
|
220
|
+
- Border radius: `12px`
|
|
221
|
+
- `overflow-x: auto` allows wide diagrams to scroll horizontally inside the container.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### Module Cards Grid
|
|
226
|
+
|
|
227
|
+
Overview cards for system modules/features.
|
|
228
|
+
|
|
229
|
+
```html
|
|
230
|
+
<div class="modules-grid">
|
|
231
|
+
<article class="module-card">
|
|
232
|
+
<h3>Module Name</h3>
|
|
233
|
+
<p>Short description of the module.</p>
|
|
234
|
+
<div class="badge-row">
|
|
235
|
+
<span class="badge badge-module">Label</span>
|
|
236
|
+
</div>
|
|
237
|
+
</article>
|
|
238
|
+
</div>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Key styles:**
|
|
242
|
+
- Grid: `repeat(auto-fill, minmax(320px, 1fr))`
|
|
243
|
+
- Pure white background, subtle `1px solid var(--color-border)` borders
|
|
244
|
+
- Hover effect: elevates shadow and darkens border to `--color-border-medium`
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
### Flow Steps (Timeline)
|
|
249
|
+
|
|
250
|
+
Vertical timeline with connected step cards.
|
|
251
|
+
|
|
252
|
+
```html
|
|
253
|
+
<div class="flow-section">
|
|
254
|
+
<h3>Timeline Title</h3>
|
|
255
|
+
<div class="flow-grid">
|
|
256
|
+
<article class="flow-step">
|
|
257
|
+
<span class="dot"></span>
|
|
258
|
+
<h4>Step Title</h4>
|
|
259
|
+
<p>Description</p>
|
|
260
|
+
</article>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Key styles:**
|
|
266
|
+
- Timeline line: `::before` on `.flow-grid` (2px wide, gray-200)
|
|
267
|
+
- Connection dot: rendered via `.dot` element (16px circle, white center, brand green border)
|
|
268
|
+
- Steps inherit hover-elevation styles from `.module-card`
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### Badges
|
|
273
|
+
|
|
274
|
+
Inline status indicators.
|
|
275
|
+
|
|
276
|
+
```html
|
|
277
|
+
<span class="badge badge-module">MODULE</span>
|
|
278
|
+
<span class="badge badge-status">DEFAULT</span>
|
|
279
|
+
<span class="badge badge-warning">WARNING</span>
|
|
280
|
+
<span class="badge badge-error">ERROR</span>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
| Class | Background | Text Color |
|
|
284
|
+
| ---------------- | ---------------------- | ------------------- |
|
|
285
|
+
| `.badge-module` | `var(--brand-light)` | `var(--brand-deep)` |
|
|
286
|
+
| `.badge-status` | `var(--gray-100)` | `var(--gray-700)` |
|
|
287
|
+
| `.badge-warning` | `#FEF3C7` (Amber 100) | `#D97706` (Amber 600)|
|
|
288
|
+
| `.badge-error` | `#FEE2E2` (Red 100) | `#DC2626` (Red 600) |
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### Legend
|
|
293
|
+
|
|
294
|
+
Contextual legend placed after diagrams.
|
|
295
|
+
|
|
296
|
+
```html
|
|
297
|
+
<div class="legend">
|
|
298
|
+
<h3>Legend</h3>
|
|
299
|
+
<div class="legend-items">
|
|
300
|
+
<div class="legend-item"><div class="legend-icon is-user"></div><span>User Action</span></div>
|
|
301
|
+
<div class="legend-item"><div class="legend-icon is-system"></div><span>System Process</span></div>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Icon borders:**
|
|
307
|
+
- User: Brand Green
|
|
308
|
+
- System: Slate 900
|
|
309
|
+
- Warning: Amber
|
|
310
|
+
- Process: Blue
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Mermaid Configuration
|
|
315
|
+
|
|
316
|
+
The design applies custom light-mode variables directly via the `mermaid.initialize` block to harmonize with the UI:
|
|
317
|
+
|
|
318
|
+
```javascript
|
|
319
|
+
mermaid.initialize({
|
|
320
|
+
startOnLoad: false,
|
|
321
|
+
theme: 'base',
|
|
322
|
+
themeVariables: {
|
|
323
|
+
darkMode: false,
|
|
324
|
+
background: '#F9FAFB',
|
|
325
|
+
mainBkg: '#ffffff',
|
|
326
|
+
primaryColor: '#111827',
|
|
327
|
+
primaryTextColor: '#374151',
|
|
328
|
+
primaryBorderColor: '#18E299',
|
|
329
|
+
lineColor: '#1f2937',
|
|
330
|
+
secondaryColor: '#F3F4F6',
|
|
331
|
+
tertiaryColor: '#E5E7EB',
|
|
332
|
+
fontFamily: 'Inter, system-ui, sans-serif',
|
|
333
|
+
fontSize: '13px',
|
|
334
|
+
edgeLabelBackground: '#ffffff',
|
|
335
|
+
clusterBkg: '#F9FAFB',
|
|
336
|
+
clusterBorder: '#E5E7EB'
|
|
337
|
+
},
|
|
338
|
+
flowchart: {
|
|
339
|
+
useMaxWidth: true,
|
|
340
|
+
htmlLabels: true,
|
|
341
|
+
curve: 'basis',
|
|
342
|
+
padding: 24,
|
|
343
|
+
wrappingWidth: 200
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## JavaScript Behavior
|
|
351
|
+
|
|
352
|
+
### Navigation & Breadcrumbs
|
|
353
|
+
|
|
354
|
+
Clicking a `.sidebar-link` sets active classes on the link and matching `.flowchart-container`. It also extracts the link text and updates `#breadcrumb-current`, scrolling the user back to the top of the content area.
|
|
355
|
+
|
|
356
|
+
### Mermaid Lazy Rendering
|
|
357
|
+
|
|
358
|
+
Diagrams render only when their corresponding section is activated:
|
|
359
|
+
|
|
360
|
+
```javascript
|
|
361
|
+
const renderTab = async (tabId) => {
|
|
362
|
+
if (renderedTabs.has(tabId)) return;
|
|
363
|
+
const container = document.getElementById(tabId);
|
|
364
|
+
if (!container) return;
|
|
365
|
+
|
|
366
|
+
const diagrams = container.querySelectorAll('.mermaid');
|
|
367
|
+
if (!diagrams.length) {
|
|
368
|
+
renderedTabs.add(tabId);
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
if (document.fonts?.ready) await document.fonts.ready;
|
|
373
|
+
await mermaid.run({ querySelector: `#${tabId} .mermaid` });
|
|
374
|
+
renderedTabs.add(tabId);
|
|
375
|
+
};
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Scroll Animations
|
|
379
|
+
|
|
380
|
+
`.animate-on-scroll` elements fade and slide up automatically via `IntersectionObserver`.
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Responsive Breakpoints
|
|
385
|
+
|
|
386
|
+
### Tablets & Mobile (`max-width: 1024px`)
|
|
387
|
+
|
|
388
|
+
The dual-pane UI gracefully collapses:
|
|
389
|
+
|
|
390
|
+
| Component | Change |
|
|
391
|
+
| ---------------- | --------------------------------------------- |
|
|
392
|
+
| Sidebar | Hidden (`display: none`) |
|
|
393
|
+
| Main Content | `margin-left: 0`, full width, reduced padding |
|
|
394
|
+
| Topbar Logo | Returns to intrinsic width |
|