feat: Enterprise DSS architecture implementation
Some checks failed
DSS Project Analysis / dss-context-update (push) Has been cancelled

Complete implementation of enterprise design system validation:

Phase 1 - @dss/rules npm package:
- CLI with validate and init commands
- 16 rules across 5 categories (colors, spacing, typography, components, a11y)
- dss-ignore support (inline and next-line)
- Break-glass [dss-skip] for emergency merges
- CI workflow templates (Gitea, GitHub, GitLab)

Phase 2 - Metrics dashboard:
- FastAPI metrics API with SQLite storage
- Portfolio-wide metrics aggregation
- Project drill-down with file:line:column violations
- Trend charts and history tracking

Phase 3 - Local analysis cache:
- LocalAnalysisCache for offline-capable validation
- Mode detection (LOCAL/REMOTE/CI)
- Stale cache warnings with recommendations

Phase 4 - Project onboarding:
- dss-init command for project setup
- Creates ds.config.json, .dss/ folder structure
- Updates .gitignore and package.json scripts
- Optional CI workflow setup

Architecture decisions:
- No commit-back: CI uploads to dashboard, not git
- Three-tier: Dashboard (read-only) → CI (authoritative) → Local (advisory)
- Pull-based rules via npm for version control

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
DSS
2025-12-11 09:41:36 -03:00
parent ab8769933d
commit 9dbd56271e
27 changed files with 3888 additions and 398 deletions

View File

@@ -10,15 +10,16 @@
{
"id": "use-typography-scale",
"name": "Use Typography Scale",
"description": "Font sizes must use the defined typography scale",
"description": "Font sizes must use the defined typography scale tokens",
"severity": "error",
"patterns": {
"forbidden": [
"font-size:\\s*[0-9]+px",
"fontSize:\\s*[0-9]+"
"fontSize:\\s*[0-9]+",
"fontSize:\\s*'[0-9]+px'"
],
"allowed": [
"var\\(--font-size-[a-z]+\\)",
"var\\(--font-size-[a-z0-9]+\\)",
"\\$font-size-[a-z]+",
"typography\\.[a-z]+"
]
@@ -36,26 +37,25 @@
}
},
{
"id": "line-height-consistency",
"name": "Consistent Line Heights",
"description": "Line heights should match the typography scale",
"severity": "info",
"guidelines": [
"Use lineHeight.tight (1.25) for headings",
"Use lineHeight.normal (1.5) for body text",
"Use lineHeight.relaxed (1.75) for long-form content"
]
"id": "no-font-family-override",
"name": "No Font Family Override",
"description": "Font families should use design system tokens",
"severity": "warning",
"patterns": {
"forbidden": [
"font-family:\\s*['\"][^'\"]+['\"]",
"fontFamily:\\s*['\"][^'\"]+['\"]"
],
"allowed": [
"var\\(--font-[a-z]+\\)",
"\\$font-[a-z]+",
"fonts\\.[a-z]+"
]
}
}
],
"tokens": {
"required": [
"typography.h1",
"typography.h2",
"typography.h3",
"typography.body",
"typography.small",
"typography.caption"
],
"required": ["typography.h1", "typography.h2", "typography.h3", "typography.body", "typography.small"],
"scale": {
"xs": "12px",
"sm": "14px",
@@ -64,12 +64,7 @@
"xl": "20px",
"2xl": "24px",
"3xl": "30px",
"4xl": "36px",
"5xl": "48px"
},
"fontFamilies": {
"sans": "Inter, system-ui, sans-serif",
"mono": "JetBrains Mono, monospace"
"4xl": "36px"
}
}
}