docs: Information-level typography + semantic colors + AI anti-patterns
- Typography v1 (chapter 3):
- Restructured from heading levels (H1-H6) to information levels
- Display, Section Title, Panel Title, Data Heading, Body, UI Label,
Metadata, Caption, Code/Numeric
- Each with: token, weight, usage, frequency
- Accessibility mapping to HTML heading elements
- Rationale: enterprise users scan for information, not headings
- Color System (chapter 4):
- Semantic Foundation: split into Neutral Semantic and Status Semantic
- Status tokens: success/warning/danger/info with surface/border/text
- Brand Palette rule: brand != status, never mix identity and meaning
- Map Layer Palette: restructured by layer (Base Surface, Terrain,
Water, Road Network, etc.)
- DESIGN_ANTI_PATTERNS.md:
- Restructured into 5 categories: visual, code, interaction, content,
AI-specific
- AI anti-patterns: AP-017 to AP-021 (inheritance check, hardcoded
values, token lifecycle, multiple icon libraries, document hierarchy)
- Total: 21 anti-patterns
Rationale: Function-based typography maps to mental models. Semantic
status colors prevent brand/status confusion. Layer-based map palette
enables theme swapping.
This commit is contained in:
@@ -24,6 +24,50 @@ This document lists patterns that are **explicitly forbidden** in the Landvex de
|
||||
|
||||
---
|
||||
|
||||
## AI-Specific Anti-Patterns
|
||||
|
||||
### AP-017: AI-Created Components Without Inheritance Check
|
||||
|
||||
**Forbidden:** AI agents creating new components without checking existing specifications and inheritance tree.
|
||||
|
||||
**Why:** Duplication, inconsistency, bloat.
|
||||
|
||||
**Rule:** AI must search the component library (Tier 1–3) and verify no existing component can be extended before proposing anything new.
|
||||
|
||||
### AP-018: AI-Hardcoded Values
|
||||
|
||||
**Forbidden:** AI agents proposing hardcoded colors, spacing, or dimensions.
|
||||
|
||||
**Why:** Violates Token Philosophy, creates technical debt.
|
||||
|
||||
**Rule:** AI must always reference existing tokens or propose new ones through the Design Review Gate.
|
||||
|
||||
### AP-019: AI-Skipping Token Lifecycle
|
||||
|
||||
**Forbidden:** AI agents introducing tokens directly as Stable.
|
||||
|
||||
**Why:** Bypasses governance, risks breaking changes.
|
||||
|
||||
**Rule:** All new tokens start as Draft. Promotion requires review.
|
||||
|
||||
### AP-020: AI-Multiple Icon Libraries
|
||||
|
||||
**Forbidden:** AI agents suggesting additional icon libraries.
|
||||
|
||||
**Why:** Inconsistent stroke weight, style, and metaphor.
|
||||
|
||||
**Rule:** One icon library. Period.
|
||||
|
||||
### AP-021: AI-Breaking Document Hierarchy
|
||||
|
||||
**Forbidden:** AI agents proposing changes that violate the document hierarchy (e.g., product doctrine contradicting design constitution).
|
||||
|
||||
**Why:** Destroys governance structure.
|
||||
|
||||
**Rule:** AI must verify hierarchy compliance before any proposal.
|
||||
|
||||
---
|
||||
|
||||
## Visual Anti-Patterns
|
||||
|
||||
### AP-001: Hero Images
|
||||
@@ -76,7 +120,7 @@ This document lists patterns that are **explicitly forbidden** in the Landvex de
|
||||
|
||||
---
|
||||
|
||||
## Technical Anti-Patterns
|
||||
## Code Anti-Patterns (Design-Related)
|
||||
|
||||
### AP-007: Hardcoded Values
|
||||
|
||||
@@ -170,31 +214,7 @@ This document lists patterns that are **explicitly forbidden** in the Landvex de
|
||||
|
||||
---
|
||||
|
||||
## AI-Specific Anti-Patterns
|
||||
|
||||
### AP-017: AI-Generated Hardcoded Values
|
||||
|
||||
**Forbidden:** AI agents proposing hardcoded colors, spacing, or dimensions.
|
||||
|
||||
**Why:** Violates Token Philosophy, creates technical debt.
|
||||
|
||||
**Rule:** AI must always reference existing tokens or propose new ones through the Design Review Gate.
|
||||
|
||||
### AP-018: AI-Invented Components
|
||||
|
||||
**Forbidden:** AI agents creating new components without checking existing specifications.
|
||||
|
||||
**Why:** Duplication, inconsistency, bloat.
|
||||
|
||||
**Rule:** AI must search the component library before proposing anything new.
|
||||
|
||||
### AP-019: AI-Ignoring Lifecycle
|
||||
|
||||
**Forbidden:** AI agents introducing tokens directly as Stable.
|
||||
|
||||
**Why:** Bypasses governance, risks breaking changes.
|
||||
|
||||
**Rule:** All new tokens start as Draft. Promotion requires review.
|
||||
|
||||
---
|
||||
|
||||
@@ -222,7 +242,7 @@ This document lists patterns that are **explicitly forbidden** in the Landvex de
|
||||
|
||||
| Version | Datum | Beskrivning |
|
||||
|---------|-------|-------------|
|
||||
| 1.0 | 2026-07-02 | Initial 19 anti-patterns covering visual, technical, interaction, content, and AI-specific |
|
||||
| 1.0 | 2026-07-02 | Initial 21 anti-patterns: visual, code, interaction, content, AI-specific |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user