feat: Enterprise DSS architecture implementation
Some checks failed
DSS Project Analysis / dss-context-update (push) Has been cancelled
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:
@@ -7,74 +7,44 @@
|
||||
"required": ["id", "version", "name", "category", "rules"],
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "Reference to this schema"
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]*$",
|
||||
"description": "Unique identifier for this rule set"
|
||||
"pattern": "^[a-z][a-z0-9-]*$"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
|
||||
"description": "Semantic version of this rule set"
|
||||
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Human-readable name"
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Detailed description of the rule set"
|
||||
"type": "string"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"enum": ["tokens", "components", "accessibility", "patterns", "naming"],
|
||||
"description": "Category this rule set belongs to"
|
||||
"enum": ["tokens", "components", "accessibility", "patterns", "naming"]
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": ["error", "warning", "info"],
|
||||
"default": "warning",
|
||||
"description": "Default severity for rules in this set"
|
||||
"default": "warning"
|
||||
},
|
||||
"rules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Rule"
|
||||
},
|
||||
"description": "Individual rules in this set"
|
||||
}
|
||||
},
|
||||
"tokens": {
|
||||
"type": "object",
|
||||
"description": "Token requirements and definitions",
|
||||
"properties": {
|
||||
"required": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"optional": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"scale": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "type": "string" }
|
||||
}
|
||||
"required": { "type": "array", "items": { "type": "string" } },
|
||||
"optional": { "type": "array", "items": { "type": "string" } },
|
||||
"scale": { "type": "object", "additionalProperties": { "type": "string" } }
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"type": "object",
|
||||
"description": "Component requirements"
|
||||
},
|
||||
"compliance": {
|
||||
"type": "object",
|
||||
"description": "Compliance metadata"
|
||||
},
|
||||
"adoption": {
|
||||
"type": "object",
|
||||
"description": "Adoption threshold definitions"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -82,61 +52,21 @@
|
||||
"type": "object",
|
||||
"required": ["id", "name"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]*$",
|
||||
"description": "Unique rule identifier"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Human-readable rule name"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "What this rule checks for"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": ["error", "warning", "info"],
|
||||
"description": "Rule severity (overrides set default)"
|
||||
},
|
||||
"wcag": {
|
||||
"type": "string",
|
||||
"description": "WCAG criterion reference if applicable"
|
||||
},
|
||||
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
||||
"name": { "type": "string" },
|
||||
"description": { "type": "string" },
|
||||
"severity": { "type": "string", "enum": ["error", "warning", "info"] },
|
||||
"wcag": { "type": "string" },
|
||||
"patterns": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"forbidden": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Regex patterns that violate this rule"
|
||||
},
|
||||
"allowed": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Regex patterns that satisfy this rule"
|
||||
}
|
||||
"forbidden": { "type": "array", "items": { "type": "string" } },
|
||||
"allowed": { "type": "array", "items": { "type": "string" } }
|
||||
}
|
||||
},
|
||||
"validation": {
|
||||
"type": "object",
|
||||
"description": "Validation configuration"
|
||||
},
|
||||
"exceptions": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "File patterns or values to exclude"
|
||||
},
|
||||
"guidelines": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Human-readable guidelines for this rule"
|
||||
},
|
||||
"components": {
|
||||
"type": "object",
|
||||
"description": "Component-specific rule configuration"
|
||||
}
|
||||
"validation": { "type": "object" },
|
||||
"exceptions": { "type": "array", "items": { "type": "string" } },
|
||||
"guidelines": { "type": "array", "items": { "type": "string" } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user