Major cleanup: Remove redundant code, consolidate knowledge base

- Delete redundant directories: demo/, server/, orchestrator/, team-portal/, servers/
- Remove all human-readable documentation (docs/, .dss/*.md, admin-ui/*.md)
- Consolidate 4 knowledge JSON files into single DSS_CORE.json
- Clear browser logs (7.5MB), backups, temp files
- Remove obsolete configs (.cursorrules, .dss-boundaries.yaml, .ds-swarm/)
- Reduce project from 20MB to ~8MB

Kept: tools/, admin-ui/, cli/, dss-claude-plugin/, .dss/schema/

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-10 07:34:52 -03:00
parent 3e4295457d
commit 7a3044bccc
470 changed files with 233 additions and 252780 deletions

View File

@@ -1,113 +0,0 @@
# DSS Code Examples
Practical examples showing how to use DSS core functionality.
## Running the Examples
```bash
# Activate virtual environment
source .venv/bin/activate
# Run any example
python examples/01_basic_ingestion.py
python examples/02_token_merge.py
python examples/03_project_analysis.py
```
## Example List
### 01_basic_ingestion.py
**Topic**: Token Ingestion from Multiple Sources
Shows how to extract design tokens from:
- CSS custom properties (`:root { --var: value; }`)
- SCSS variables (`$var: value;`)
- JSON tokens (W3C Design Tokens format)
**Output**: Demonstrates token extraction with counts and preview
---
### 02_token_merge.py
**Topic**: Merging Tokens with Conflict Resolution
Shows how to:
- Create token collections from different sources
- Merge tokens using different strategies (FIRST, LAST, PREFER_FIGMA)
- Resolve conflicts between sources
- Understand which strategy to use when
**Output**: Side-by-side comparison of merge strategies and conflict resolution
---
### 03_project_analysis.py
**Topic**: Project Analysis & Quick Wins
Shows how to:
- Scan a project for framework and styling detection
- Find improvement opportunities (quick wins)
- Prioritize changes by impact vs effort
- Generate improvement reports
**Output**: Project stats, quick win recommendations, prioritized task list
---
## More Examples
Check the [QUICKSTART.md](../docs/QUICKSTART.md) for:
- Full workflow examples (Figma → DSS → Storybook)
- REST API usage
- MCP tool integration
- Production deployment patterns
## Adding Your Own Examples
1. Create a new file: `examples/XX_your_example.py`
2. Add docstring explaining the example
3. Use `async def main()` pattern
4. Add to this README
5. Submit PR!
## Common Patterns
### Basic Example Structure
```python
#!/usr/bin/env python3
"""Brief description of what this example demonstrates"""
import asyncio
import sys
from pathlib import Path
# Add project to path
sys.path.insert(0, str(Path(__file__).parent.parent))
async def main():
print("=" * 60)
print("EXAMPLE TITLE")
print("=" * 60)
# Your code here
if __name__ == "__main__":
asyncio.run(main())
```
### Error Handling
```python
try:
result = await some_operation()
print(f"✅ Success: {result}")
except Exception as e:
print(f"❌ Error: {e}")
```
## Need Help?
- Read [QUICKSTART.md](../docs/QUICKSTART.md) for detailed guides
- Check [ARCHITECTURE.md](../docs/ARCHITECTURE.md) for system design
- Review [PROJECT_MEMORY.md](../PROJECT_MEMORY.md) for module inventory