mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
refactor(ui-design): enhance conflict detection methods and improve semantic search for primary color definitions
This commit is contained in:
@@ -74,10 +74,22 @@ You execute 6 distinct task types organized into 3 patterns. Each task includes
|
|||||||
* Report conflicts in `_metadata.conflicts` with all definitions and selection reasoning
|
* Report conflicts in `_metadata.conflicts` with all definitions and selection reasoning
|
||||||
* NO inference, NO normalization - faithful extraction with explicit conflict resolution
|
* NO inference, NO normalization - faithful extraction with explicit conflict resolution
|
||||||
- Fast Conflict Detection (Use Bash/Grep):
|
- Fast Conflict Detection (Use Bash/Grep):
|
||||||
* Quick scan: `rg --color=never -n "^\s*--primary:" <files>` to find all primary color definitions
|
* Quick scan: `rg --color=never -n "^\s*--primary:" --type css` to find all primary color definitions with line numbers
|
||||||
* Semantic search: `rg --color=never -B2 -A0 "^\s*--primary:" <files>` to capture comments
|
* Semantic search: `rg --color=never -B3 -A1 "^\s*--primary:" --type css` to capture surrounding context and comments
|
||||||
* Multi-file comparison: Compare definitions across discovered CSS/JS files
|
* Per-file comparison: `rg --color=never -B3 -A1 "^\s*--primary:" file1.css && rg --color=never -B3 -A1 "^\s*--primary:" file2.css` to compare specific files
|
||||||
* Pattern: Search → Compare values → If different → Read full context → Record conflict
|
* Core token scan: Search for --primary, --secondary, --accent, --background patterns to detect all theme-critical definitions
|
||||||
|
* Pattern: `rg → Extract values → Compare → If different → Read full context with comments → Record conflict`
|
||||||
|
* Example workflow:
|
||||||
|
```bash
|
||||||
|
# Step 1: Find all primary definitions
|
||||||
|
rg --color=never -n "^\s*--primary:" --type css
|
||||||
|
|
||||||
|
# Step 2: Get semantic context for each
|
||||||
|
rg --color=never -B5 -A2 "^\s*--primary:" file.css
|
||||||
|
|
||||||
|
# Step 3: Look for top-level scheme comments
|
||||||
|
rg --color=never -B10 "^\s*:root" file.css | grep -i "color scheme\|theme"
|
||||||
|
```
|
||||||
|
|
||||||
2. **Explore/Text Mode** (Source: `style-extract`, `layout-extract`, `animation-extract`)
|
2. **Explore/Text Mode** (Source: `style-extract`, `layout-extract`, `animation-extract`)
|
||||||
- Data Source: User prompts, visual references, images, URLs
|
- Data Source: User prompts, visual references, images, URLs
|
||||||
|
|||||||
Reference in New Issue
Block a user