Files
dss/dss-claude-plugin/commands/dss-analyze.md
Digital Production Factory 276ed71f31 Initial commit: Clean DSS implementation
Migrated from design-system-swarm with fresh git history.
Old project history preserved in /home/overbits/apps/design-system-swarm

Core components:
- MCP Server (Python FastAPI with mcp 1.23.1)
- Claude Plugin (agents, commands, skills, strategies, hooks, core)
- DSS Backend (dss-mvp1 - token translation, Figma sync)
- Admin UI (Node.js/React)
- Server (Node.js/Express)
- Storybook integration (dss-mvp1/.storybook)

Self-contained configuration:
- All paths relative or use DSS_BASE_PATH=/home/overbits/dss
- PYTHONPATH configured for dss-mvp1 and dss-claude-plugin
- .env file with all configuration
- Claude plugin uses ${CLAUDE_PLUGIN_ROOT} for portability

Migration completed: $(date)
🤖 Clean migration with full functionality preserved
2025-12-09 18:45:48 -03:00

83 lines
1.9 KiB
Markdown

---
name: dss-analyze
description: Analyze a project for design system patterns and opportunities
arguments:
- name: path
description: Path to the project directory to analyze
required: false
---
# DSS Analyze Command
Analyze a project directory for design system patterns, component usage, and tokenization opportunities.
## Usage
```
/dss-analyze [path]
```
If no path is provided, analyzes the current working directory.
## What This Does
1. **Scans Project Structure**
- Identifies all style files (CSS, SCSS, Tailwind)
- Locates component files (React, Vue)
- Maps project dependencies
2. **Analyzes Styles**
- Extracts color values and patterns
- Identifies typography usage
- Finds spacing patterns
- Detects shadows and borders
3. **Analyzes Components**
- Maps React/Vue components
- Identifies repeated patterns
- Finds hardcoded values
4. **Generates Report**
- Summary statistics
- Pattern identification
- Recommendations for improvement
## Instructions for Claude
When the user runs this command:
1. Use the `dss_analyze_project` tool with the provided path (or current directory if not specified)
2. Wait for analysis results
3. Present findings in a clear, organized format:
- Summary section with key metrics
- Style patterns found
- Component analysis
- Top recommendations
4. Offer to drill deeper into specific areas
5. Suggest next steps (token extraction, component audit, etc.)
## Example Output
```
Design System Analysis: /path/to/project
SUMMARY
- Files scanned: 127
- Style files: 34
- Components: 23
- Unique colors: 156
- Typography variations: 12
TOP FINDINGS
1. Color inconsistency: 156 colors could be 12 tokens
2. Spacing: 8 different scales in use
3. 3 button variants that could consolidate
RECOMMENDATIONS
1. Create color token system
2. Standardize spacing scale
3. Audit button components
Next: Run /dss-extract to create tokens from these patterns
```