Commit Graph

324 Commits

Author SHA1 Message Date
catlog22
bbf88826ba fix: convert all shell scripts to LF line endings for Linux/WSL compatibility
- Convert all .sh files from CRLF to LF line endings
- Add .gitattributes to enforce LF for shell scripts
- Fix "bash\r: No such file or directory" error in WSL environments

This resolves the installation failure on WSL/Linux systems where
Windows CRLF line endings cause shell scripts to fail.

Related to #1

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 10:00:33 +08:00
catlog22
ce5d903813 fix: improve environment detection and error handling in remote installers
- Add git availability check with helpful installation hints
- Improve version detection with automatic fallback to GitHub API
- Add detailed progress feedback during installation
- Enhance error messages for better user experience
- Fix WSL installation issue reported in #1

Changes:
- install-remote.sh: Add git check, improve commit SHA detection
- install-remote.ps1: Add git check, improve commit SHA detection

Fixes #1

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 09:54:45 +08:00
catlog22
703f22e331 feat: add codebase-retrieval semantic search tool
Add semantic file discovery via Gemini CLI --all-files parameter
- Define codebase-retrieval as primary semantic search tool
- Add tool selection matrix for search strategy
- Provide command templates with dynamic placeholders
- Document workflow integration with rg and other tools

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 09:38:25 +08:00
catlog22
61997f8db8 feat: add memory state check between Phase 3 and Phase 4
Add automatic memory compaction trigger when context usage exceeds 110K tokens:
- Evaluates memory state after analysis phase (Phase 3)
- Triggers /compact command if approaching context limits
- Prevents context overflow and ensures optimal performance
- Particularly important after extensive documentation generation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 22:23:32 +08:00
catlog22
f090c713ca refactor: streamline concept-enhanced.md command (532→377 lines, 29% reduction)
Optimizations:
- Merge Overview & Philosophy sections (78→29 lines)
- Simplify Tool Selection Strategy (76→47 lines)
- Optimize Execution Lifecycle (242→119 lines)
- Reduce Code Modification Targets examples (4→2 examples)
- Merge Error Handling & Performance into Execution Management (52→14 lines)
- Merge Integration & Quality into unified section (30→25 lines)

Core features preserved:
- Complete output format template (kept internal)
- 5-phase execution lifecycle
- Tool selection complexity matrix
- Gemini/Codex bash configurations
- All essential functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 22:21:29 +08:00
catlog22
177279b760 chore: remove deprecated templates and unused files
- Delete archived layer-based templates (Layer 1-4)
- Remove hierarchy-analysis.txt (no longer needed)
- Update intelligent-tools-strategy.md to remove references

Cleanup:
- Keep only claude-module-unified.txt in memory/ directory
- Remove outdated template references from strategy document
- Simplify template structure for installation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 21:57:19 +08:00
catlog22
46f749605a fix: remove @ prefix from intelligent-tools-strategy.md reference
- Update enhance-prompt.md to use correct file reference format
- Change from @~/.claude/workflows/intelligent-tools-strategy.md to ~/.claude/workflows/intelligent-tools-strategy.md
- Align with other command files' reference format

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 21:52:59 +08:00
catlog22
8a849d651f refactor: simplify module documentation with unified template
- Replace 4-layer hierarchy (Layer 1-4) with single unified template
- New template: claude-module-unified.txt works for all modules and files
- Update update_module_claude.sh to remove layer detection logic
- Archive old layer-based templates to memory/archive/
- Update intelligent-tools-strategy.md to reference unified template

Benefits:
 Single template to maintain
 Simpler script logic
 Universal application for folders and code files
 Clearer documentation structure

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 21:50:01 +08:00
catlog22
0fd390f5d8 docs: optimize README with concise language and memory management emphasis
- Simplify introduction to highlight core value proposition
- Restructure "Key Features" to "Core Differentiators" with 6 key innovations
- Reduce content by 63% while maintaining 100% information completeness
- Add dedicated "Memory Management" section emphasizing its critical importance
- Add "Technical Architecture" section showing project organization
- Improve readability with concise bullet points and tables
- Synchronize English and Chinese versions

Key improvements:
- Context-First Architecture: Explain 1-to-N development drift solution
- JSON-First State Management: Highlight single source of truth design
- Autonomous Orchestration: Detail flow_control mechanism
- Multi-Model Strategy: Document 5-10x performance improvement
- Hierarchical Memory: Show 4-layer documentation structure
- Role-Based Agents: List specialized agents and workflows

Memory Management highlights:
- Document memory hierarchy (Root → Domain → Module → Sub-Module)
- Provide update triggers and best practices
- Emphasize quality impact on execution accuracy
- Show tool integration options (Gemini/Qwen/Codex)
2025-10-12 21:01:00 +08:00
catlog22
1dff4ff0c7 docs: add template reference rule - use $(cat ...) directly, never read first 2025-10-12 18:40:45 +08:00
catlog22
8a8090709f docs: add command substitution rules and fix template syntax
Key changes:
1. Add CRITICAL section for command substitution rules
   - Document why escape characters (\$, \", \') break commands
   - Explain correct syntax without quotes in $(cat ...) paths
   - Provide clear correct vs wrong examples

2. Fix all template references in examples
   - Remove single quotes from $(cat '...') → $(cat ...)
   - Ensure all 4 occurrences use correct syntax (lines 331, 356, 366, 379)

3. Add best practice guideline
   - Add warning in General Guidelines about escape characters
   - Emphasize this applies to all CLI command execution

Problem solved: Prevent automatic escape character insertion that breaks
shell command substitution and path expansion in actual CLI execution.
2025-10-12 18:36:53 +08:00
catlog22
4006234fa0 docs: add memory templates to intelligent tools strategy
Add memory hierarchy templates to Available Templates section and Selection Matrix:
- Layer 1-4 templates for hierarchical documentation
- Hierarchy analysis template for project structure
- Semantic triggers and use cases for each template level
2025-10-12 18:28:56 +08:00
catlog22
9d4d728ee7 docs: add bash execution rules and Windows path conversion guide
- Add rule to prevent run_in_background parameter in bash() calls
- Add Windows path conversion guidelines for Git Bash compatibility
- Simplify path handling: C:\path → /c/path, relative paths unchanged
2025-10-12 17:19:47 +08:00
catlog22
8e4710389d refactor: restructure memory update commands to command-style docs
Major improvements to /update-memory-full and /update-memory-related:

Structure:
- Adopt plan.md command-style format with clear phases
- Consolidate redundant sections and examples
- Add Coordinator Role and Core Rules sections
- Include detailed Coordinator Checklist

Features:
- Add --path parameter to target specific directories
- Update Task() call format to function-style syntax
- Merge execution examples into workflow phases
- Add Path Parameter Reference section

Documentation:
- Increase parallel job limit from 4 to 5
- Add comprehensive usage examples
- Include tool parameter reference
- Add comparison tables and best practices

Files changed:
- .claude/commands/update-memory-full.md: +285/-100 lines
- .claude/commands/update-memory-related.md: +229/-136 lines
2025-10-12 17:07:26 +08:00
catlog22
7ce76e1564 refactor: merge ARCHITECTURE and EXAMPLES into single task
- Combine IMPL-005 (ARCHITECTURE.md) and IMPL-006 (EXAMPLES.md) into one task
  - New IMPL-005: Generate both ARCHITECTURE.md and EXAMPLES.md together
  - Reduces task count and simplifies workflow execution
  - Both documents share similar analysis context from project README and modules

- Update HTTP API task from IMPL-007 to IMPL-006
  - Maintain sequential task numbering after merge

- Update all references:
  - Task hierarchy documentation
  - Task generation logic
  - Session structure examples
  - Execution command examples

Benefits:
- Streamlined workflow with fewer tasks to execute
- Architecture and examples are logically related (structure + usage)
- Reduced overhead in task management and execution
2025-10-12 16:37:10 +08:00
catlog22
42d7ad895e fix: improve docs workflow and module discovery
- Fix get_modules_by_depth.sh to avoid filtering 'core' directories
  - Remove overly broad "core" exclusion pattern
  - Keep "*.core" for actual core dump files
  - Resolves issue where directories named 'core' were incorrectly filtered

- Refactor docs workflow from path-based detection to mode selection
  - Replace is_root logic with explicit --mode parameter
  - Add --mode full: generate complete documentation (modules + project-level)
  - Add --mode partial: generate module documentation only
  - Default to full mode for better user experience
  - Simplify configuration by removing complex path comparison logic

These changes provide better control over documentation generation
and fix directory discovery issues in Python projects with core/ folders.
2025-10-12 15:40:11 +08:00
catlog22
03399259f4 feat: optimize docs workflow and add gitignore support to scripts
Major Changes:
1. Add classify-folders.sh script
   - Extract folder classification logic from inline script
   - Support for code/navigation/skip folder types
   - Placed in .claude/scripts/ for reusability

2. Optimize /workflow:docs command (docs.md)
   - Simplify Phase 1: single-step session initialization
   - Add Path Mirroring Strategy section
   - Document structure now mirrors source structure
   - Update to single config.json file (replace multiple .process files)
   - Fix path detection for Windows/Git Bash compatibility
   - Update all task templates with mirrored output paths

3. Add parent .gitignore support
   - detect_changed_modules.sh: parse .gitignore from current or git root
   - update_module_claude.sh: respect .gitignore patterns when counting files
   - Unified build_exclusion_filters() function across scripts

Key Improvements:
- Documentation output: .workflow/docs/ with project structure mirroring
- Session init: 4 steps → 1 bash command block
- Config files: multiple files → single config.json
- Path detection: improved Windows/Git Bash normalization
- Gitignore support: current dir → parent dir fallback

Related Issue: Fix core directory exclusion in get_modules_by_depth.sh
(Note: get_modules_by_depth.sh is in user global config, not in this repo)
2025-10-12 15:06:13 +08:00
catlog22
b0c3d0d0c1 Release v4.4.1: Implementation approach structure refactoring
- Refactor implementation_approach from object to array format
- Add step-based execution with dependency management
- Add CLI execution mode support with --cli-execute flag
- Add Codex resume mechanism for context continuity
- Update 15 files across agents, commands, and core architecture
- Major docs.md refactoring (67% size reduction)
- Enhanced workflow-architecture.md with flow control documentation
v4.4.1
2025-10-12 14:15:33 +08:00
catlog22
58153ecb83 Refactor implementation approach structure across task generation files
- Updated implementation_approach in task-generate-tdd.md to use an array format with detailed steps for minimal code implementation and iterative testing.
- Enhanced task-generate.md to support CLI execution mode with Codex, including examples for task execution and session management.
- Modified test-task-generate.md to incorporate CLI execution mode, allowing Codex to autonomously generate tests and execute iterative test-fix cycles.
- Revised task-core.md and workflow-architecture.md to adopt a step-based implementation approach, improving clarity and dependency management in task execution.
- Improved documentation in workflow-architecture.md to clarify flow control structure and variable referencing.
2025-10-12 14:09:47 +08:00
catlog22
c5aac313ff Add discuss-plan command for multi-model collaborative planning and analysis
- Introduced the discuss-plan command to facilitate iterative discussions among Gemini, Codex, and Claude.
- Defined roles and priorities for each model in the discussion loop.
- Established a structured workflow for input processing, discussion rounds, and user review.
- Implemented TodoWrite tracking for progress across rounds.
- Specified output routing for logs and final plans.
- Included examples and best practices for effective usage.
2025-10-12 11:53:16 +08:00
catlog22
3ec5de821d Add comprehensive documentation templates for API, folder navigation, module README, project architecture, examples, and project-level README
- Introduced a unified API documentation template covering both Code API and HTTP API sections.
- Created a folder navigation documentation template for directories containing subdirectories.
- Developed a module README documentation template focusing on module purpose, usage, and dependencies.
- Added a project architecture documentation template synthesizing module information and system design.
- Implemented a project examples documentation template showcasing practical usage scenarios.
- Established a project-level documentation template outlining project overview, architecture, and navigation.
2025-10-12 11:22:07 +08:00
catlog22
75ec70ad23 更新 generate.md 和 layout-extract.md 文档:添加对参考图像的自动检测和使用说明 2025-10-12 10:11:08 +08:00
catlog22
be2d0f24b6 Sync Install-Claude.sh with Install-Claude.ps1: Selective folder replacement
**Summary:**
Applied the same selective replacement logic from Install-Claude.ps1 to Install-Claude.sh (Bash version).

**Changes:**
- Added `backup_and_replace_directory` function for folder-level operations
- Modified `install_global` to use selective replacement for .claude, .codex, .gemini, .qwen
- Modified `install_path` to use selective replacement for local folders and config directories
- Maintained `merge_directory_contents` for backward compatibility

**New Installation Flow:**
1. Backup entire existing directory to timestamped backup folder
2. Only remove items in destination that match source item names
3. Copy source items to destination
4. Preserve all other files in destination directory

**Benefits:**
- Protects user-created files and session data
- Only updates files that come from installation source
- Safer incremental updates
- Consistent behavior across PowerShell and Bash versions

**Example:**
Source: .claude/{commands, workflows, scripts}
Destination before: .claude/{commands, workflows, custom.json, .workflow/}
Destination after: .claude/{commands, workflows, scripts, custom.json, .workflow/}

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:57:12 +08:00
catlog22
543f655bc1 Fix Install-Claude.ps1: Only clear conflicting items, preserve other files
**Issue:**
Previous logic cleared entire destination directory, removing all existing files including user-created content.

**Fix:**
Modified `Backup-AndReplaceDirectory` to:
1. Backup entire destination directory (as before)
2. Only remove items in destination that match source item names
3. Copy source items to destination
4. Preserve all other files in destination directory

**New Behavior:**
- Removes: ~/.claude/commands (if exists in source)
- Removes: ~/.claude/workflows (if exists in source)
- Preserves: ~/.claude/custom-file.md (user-created)
- Preserves: ~/.claude/.workflow/ (session data)

**Example:**
Source: .claude/{commands, workflows, scripts}
Destination before: .claude/{commands, workflows, custom-config.json, .workflow/}
Destination after: .claude/{commands, workflows, scripts, custom-config.json, .workflow/}

**Benefits:**
- Protects user-created files and session data
- Only updates files that come from installation source
- Safer incremental updates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:53:18 +08:00
catlog22
62161c9a16 Refactor Install-Claude.ps1: Replace file-by-file merge with folder replacement
**Summary:**
Modified installation logic to backup entire folders, clear destinations, and copy complete directories instead of merging individual files.

**Changes:**
- Added `Backup-AndReplaceDirectory` function for folder-level operations
- Modified `Install-Global` to use folder replacement for .claude, .codex, .gemini, .qwen
- Modified `Install-Path` to use folder replacement for local folders and config directories
- Maintained `Merge-DirectoryContents` for backward compatibility (not used in main flow)

**New Installation Flow:**
1. Backup entire existing directory to timestamped backup folder
2. Clear destination directory completely
3. Copy entire source directory to destination

**Benefits:**
- Faster installation (no file-by-file comparison)
- Cleaner installations (no orphaned files from previous versions)
- Simpler backup/restore process (complete directory snapshots)
- Better handling of renamed/moved files

**Testing:**
 Successfully tested Global installation mode
 Verified backup creation and folder replacement
 Confirmed all directories (.claude, .codex, .gemini, .qwen) installed correctly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:51:18 +08:00
catlog22
369bfa8a08 Refactor command YAML headers: replace examples with argument-hint
**Summary:**
Updated all 62 command files in `.claude/commands` directory to improve parameter documentation clarity by replacing `examples` field with descriptive `argument-hint` field.

**Changes:**
- Added/improved `argument-hint` for all commands based on usage patterns
- Removed `examples` field and all example items from YAML headers
- Maintained all other YAML fields (name, description, usage, allowed-tools)
- Deleted obsolete commands: workflow/issue/*, workflow/session/pause.md, workflow/session/switch.md
- Cleaned up temporary analysis files

**Rationale:**
The `argument-hint` field provides clearer, more concise parameter documentation than example lists, improving command discoverability and usability in the Claude Code interface.

**Files Modified:** 62 command files
**Lines Changed:** -1570 insertions, +192 deletions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:45:55 +08:00
catlog22
6b360939bc Update documentation with tool control system information
- Add Tool Control System section explaining optional external CLI tools
- Replace "Prerequisites: Required Tools" with optional tool configuration
- Document graceful degradation and progressive enhancement features
- Add configuration file reference and usage examples
- Update both English and Chinese versions

This addresses Issue #2 by documenting the new optional CLI dependency system.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:06:48 +08:00
catlog22
3772cbd331 Add tool control configuration reference to CLAUDE.md
- Added reference to tool-control.yaml for CLI tool availability management
- Includes new tool-control.yaml configuration file
- Helps coordinate tool usage across commands and agent executions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:02:57 +08:00
catlog22
7c8e75f363 Release v4.4.0: UI Design Workflow V3 - Layout/Style Separation Architecture
## Breaking Changes

- **Command Renamed**: `extract` → `style-extract`
- **New Required Phase**: `layout-extract` now mandatory before `generate`
- **Workflow Changed**: Old flow (extract → consolidate → generate)
  → New flow (style-extract → consolidate → layout-extract → generate)

## Added

**New Command: layout-extract**
- Extract structural layout separate from visual style
- Agent-powered with ui-design-agent
- Dual-mode: imitate (high-fidelity) / explore (multiple variants)
- Device-aware: desktop, mobile, tablet, responsive
- MCP-integrated layout pattern research (explore mode)
- Output: layout-templates.json with DOM structure + CSS layout rules

**Enhanced Architecture**
- Layout/Style Separation: Clear responsibility boundaries
- Pure Assembler: generate command combines pre-extracted components
- Device-Aware Layouts: Optimized structures for different devices
- Token-Based CSS: var() placeholders for spacing/breakpoints

## Changed

**style-extract (Renamed from extract)**
- File renamed: extract.md → style-extract.md
- Scope clarified: Visual style only (colors, typography, spacing)
- No functionality change, all features preserved

**generate (Refactored to Pure Assembler)**
- Before: Agent designed layout + applied style
- After: Pure assembly - combines layout-templates.json + design-tokens.json
- No design logic: All decisions made in previous phases
- Simplified agent instructions: Focus on assembly only

**Workflow Commands Updated**
- imitate-auto: Added Phase 2.5 (layout extraction)
- explore-auto: Added Phase 2.5 (layout extraction)
- Both workflows now include layout-extract step

## Removed

-  V2 Commands: generate-v2, explore-auto-v2 (merged into main commands)
-  Old extract command (renamed to style-extract)
-  ui-generate-preview-v2.sh (merged into ui-generate-preview.sh)

## Files Changed

- Renamed: extract.md → style-extract.md
- Added: layout-extract.md (370+ lines)
- Modified: generate.md, imitate-auto.md, explore-auto.md, consolidate.md
- Removed: 2 deprecated v2 command files
- Updated: CHANGELOG.md, README.md

## Benefits

-  Single Responsibility: Each phase has one clear job
-  Better Layout Variety: Explore mode generates structurally distinct layouts
-  Reusability: Layout templates work with any style
-  Clarity: All structural decisions visible in layout-templates.json
-  Testability: Layout structure and visual style tested independently

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

Co-Authored-By: Claude <noreply@anthropic.com>
v4.4.0
2025-10-11 16:21:28 +08:00
catlog22
3857aa44ce 增强截图捕获工作流:添加格式选项(PNG、WebP、JPEG),更新错误处理和执行机制,优化用户体验 2025-10-11 15:42:50 +08:00
catlog22
9993d599f8 Add interactive layer exploration workflow for UI design
- Implemented the `/workflow:ui-design:explore-layers` command for depth-controlled UI capture.
- Defined depth levels from full-page screenshots to Shadow DOM exploration.
- Included setup, validation, and navigation phases with error handling.
- Captured screenshots at various depths and generated a comprehensive layer map.
- Added examples and usage instructions for ease of use.
2025-10-11 15:29:33 +08:00
catlog22
980f554b27 Refactor UI Generation Workflow: Optimize matrix generation process, enhance layout planning, and improve error handling. Consolidate steps for better performance and clarity, ensuring production-ready output with semantic HTML and responsive design. Update examples and documentation for clarity and usability. 2025-10-11 12:54:55 +08:00
catlog22
2fcd44e856 feat: Add imitate-auto-v3 workflow for high-speed multi-page UI replication
- Introduced a new workflow named `imitate-auto-v3` that allows for batch screenshot capture and optional token refinement.
- Implemented a comprehensive 5-phase execution protocol to handle initialization, screenshot capture, style extraction, token processing, and UI generation.
- Added support for multiple target URLs through a `--url-map` parameter, enhancing flexibility in design replication.
- Included optional parameters for session management and token refinement, allowing users to customize their workflow experience.
- Enhanced error handling and reporting throughout the workflow to ensure clarity and ease of debugging.
- Deprecated the previous `imitate-auto.md` workflow in favor of this more robust version.
2025-10-11 11:42:33 +08:00
catlog22
f07e77e9fa Enhance UI Design Workflow: Transition to Target-Style-Centric Generation
- Introduced Phase 0c for user confirmation before initiating the workflow.
- Updated phases to ensure immediate transitions between style extraction, consolidation, and UI generation.
- Revised documentation to reflect changes in phase execution and user interaction.
- Changed terminology from "style-centric" to "target-style-centric" to emphasize the new approach.
- Improved layout planning to focus on gathering layout inspiration rather than strict structural differences.
- Enhanced task descriptions and requirements for clarity and consistency across phases.
- Updated TodoWrite patterns to track progress accurately through the new workflow structure.
2025-10-10 23:11:47 +08:00
catlog22
f1ac41966f refactor(ui-design): optimize screenshot capture tool detection without installation
- Remove npx playwright to prevent auto-installation triggers
- Add explicit tool availability checks using 'which' command
- Check for playwright-cli, google-chrome, chrome, and chromium executables
- Only attempt screenshot capture if tools are already installed
- Provide clear tool availability reporting to users
- Gracefully fallback to manual mode when no tools available
- Support chromium browser on Linux systems

This ensures the workflow never triggers package installations and works
safely in environments without screenshot tools installed.
2025-10-10 22:33:09 +08:00
catlog22
db1b4aa43b feat(ui-design): add memory check mechanism to workflow commands
Add Phase 0.1/1.1 memory check to all UI design workflow commands to skip
execution when outputs already exist. This optimization dramatically reduces
redundant execution time from minutes to <1 second.

Changes:
- extract.md: Check for style-cards.json, skip Phase 0.5-3 if exists
- consolidate.md: Check for style-1/design-tokens.json, skip Phase 2-6
- generate.md: Check for compare.html, skip Phase 1.5-4
- update.md: Check for current design run in synthesis-spec, skip Phase 2-5

Benefits:
- >99% time reduction for repeated workflow execution
- Automatic cache detection without manual flags
- Clear reporting of skipped phases

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 21:24:50 +08:00
catlog22
ca8ee121a7 docs: update README_CN.md to v4.3.0 with self-contained CSS architecture highlights 2025-10-10 20:04:17 +08:00
catlog22
8b9cc411e9 docs: update README.md to v4.3.0 with self-contained CSS architecture highlights 2025-10-10 20:03:39 +08:00
catlog22
3fd087620b docs(changelog): add v4.3.0 release notes for UI Design Workflow V2
- Self-contained CSS architecture improvements
- Removed placeholder mechanism
- Enhanced agent CSS generation with direct token values
- Simplified workflow with 346 lines removed
- Better style differentiation and design quality

Features:
- generate-v2 command with independent CSS generation
- explore-auto-v2 updated for new architecture
- Agents read design-tokens.json directly
- No more tokens.css or placeholder replacement

Benefits:
- Faster execution (2 fewer intermediate steps)
- Better style diversity and differentiation
- Easier debugging and maintenance
- Self-contained, portable CSS files

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

Co-Authored-By: Claude <noreply@anthropic.com>
v4.3.0
2025-10-10 19:32:53 +08:00
catlog22
6e37881588 refactor(ui-design): remove placeholder mechanism and simplify CSS generation workflow
- Agent now directly generates HTML with final CSS references (no placeholders)
- Remove tokens.css dependency - agents create self-contained CSS from design-tokens.json
- Simplify ui-generate-preview-v2.sh (no placeholder replacement logic)
- Update Phase 2.5 validation to check actual href attributes
- Remove Phase 1.6 (token conversion step)
- Improve agent instructions with direct CSS value usage from design tokens

Benefits:
- Simpler workflow with fewer intermediate steps
- More flexible CSS generation - agents can adapt token values based on design_attributes
- Better style differentiation across variants
- Reduced dependencies and potential error points

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 19:29:38 +08:00
catlog22
043a3f05ba refactor(ui-design): optimize layout planning to prevent architecture homogenization
- Replace exa-code with web-search for diverse layout inspiration
- Simplify from keyword pools to direct "common variations" search
- Add selection strategy for agents to pick different structural patterns
- Support unlimited layout variants with natural diversity

Impact: Prevents layout architecture convergence by leveraging web search
for real-world layout variations instead of code examples.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 17:05:11 +08:00
catlog22
6b6367a669 feat: Add ui-generate-preview-v2.sh script for style-centric prototype preview generation
- Implemented a new script to generate compare.html and index.html for UI prototypes.
- Auto-detects styles, layouts, and targets from HTML file patterns.
- Generates an interactive comparison matrix and a simple index of prototypes.
- Includes a detailed PREVIEW.md guide with usage instructions and file structure.
2025-10-10 16:53:53 +08:00
catlog22
d255e633fe refactor(ui-design): remove internal parameter --continue-run for clarity and maintain backward compatibility 2025-10-10 15:22:11 +08:00
catlog22
6b6481dc3f refactor(ui-design): clean up command documentation by removing unused parameters and clarifying usage instructions 2025-10-10 15:12:24 +08:00
catlog22
e0d4bf2aee refactor(ui-design): optimize consolidate workflow - remove MCP calls and fix path inconsistency
## Major Changes

### 1. Remove MCP Calls (Philosophy-Driven Refinement)
- Eliminated all 13 MCP queries (4 per variant + 1 accessibility)
- Replaced with pure AI philosophy-driven token refinement
- Uses design_attributes from extract phase to map to token values
- Performance: ~50% faster execution (~60s vs ~120s)
- Quality: Better variant divergence (no trend pollution)

### 2. Fix Path Naming Inconsistency
- Fixed mismatch: `style-variant-1/` → `style-1/`
- mkdir creates: style-1/, style-2/, style-3/
- Agent now writes to matching directories using loop index {N}
- Added CRITICAL PATH MAPPING section for clarity

## Technical Details

**MCP Removal:**
- Step 1: Trend Research → Load Design Philosophy
- Step 2: Added attribute-to-token mapping rules
- Agent prompt: Removed MCP integration code
- All accessibility validation uses built-in AI knowledge

**Path Fix:**
- Unified on numeric index format: style-{N}/ (N = 1-based loop index)
- Updated 9 path references throughout the file
- Separated variant.id (metadata) from directory names (numeric index)
- Added examples and clarifications for agent implementation

## Impact

- MCP calls: 13 → 0 (-100%)
- Execution time: ~120s → ~60s (-50%)
- Variant divergence: Medium → High
- Path consistency: Broken → Fixed

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 14:39:53 +08:00
catlog22
c0921cd5ff feat(ui-design): add optional layout-specific token extension
- Allow agent to create layout-specific tokens if needed
- Use `--layout-*` prefix for layout-specific CSS variables
- Keep prompt minimal - let agent decide when extension is needed
- Examples: --layout-spacing-navbar-height, --layout-size-sidebar-width

Benefits:
-  Flexible token system (core + layout-specific)
-  Agent autonomy (decides when to extend)
-  Clear naming convention (--layout-* prefix)
-  Minimal workflow changes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 14:25:27 +08:00
catlog22
cb6e44efde refactor(ui-design): optimize workflow phases and token refinement strategy
**generate.md - Fix CSS variable naming mismatch**:
- Move token conversion to Phase 1.6 (before agent generation)
- Add Phase 1.7 to extract actual variable names from tokens.css
- Update Phase 2a agent prompt to read tokens.css directly
- Eliminate variable name guessing - agent uses actual file reference
- Remove redundant token conversion from Phase 2b

Benefits:
-  Eliminates CSS variable name mismatches
-  Single source of truth (tokens.css)
-  More reliable agent generation
-  Easier debugging

**consolidate.md - Replace MCP research with philosophy-driven refinement**:
- Remove variant-specific MCP trend research (4 queries per variant)
- Use design_attributes from extraction phase as refinement rules
- Apply philosophy-driven token generation (no external calls)
- Preserve variant divergence through anti_keywords constraints
- Faster execution (~30-60s saved per variant)

Benefits:
-  Better divergence preservation
-  Faster workflow execution
-  Pure AI-driven refinement
-  Consistent with extraction phase philosophy

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 13:24:48 +08:00
catlog22
e3f8283386 docs(ui-design): eliminate output-then-save ambiguity in workflow documentation
Clarified file writing patterns across UI design workflows to prevent confusion
between "generate content as output then save" vs "direct write to file" approaches.

Changes:
- extract.md: Merged Phase 2 & 3 to unify style synthesis and file write operations
  * Updated phase title to emphasize direct file writing
  * Added explicit note about internal processing without context output
  * Consolidated parse-and-write step into single atomic operation

- imitate-auto.md: Added clarifying comments for orchestrator file transformation
  * Documented that Phase 2 uses orchestrator-level read-process-write pattern
  * Explained this as performance optimization to bypass consolidate phase

The entire UI design workflow now consistently follows clear file operation patterns
with no ambiguous intermediate output steps.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 12:55:41 +08:00
catlog22
a1c1c95bf4 fix(ui-design): use mcp__exa__web_search_exa for design trend research and URL analysis
- Replace mcp__exa__get_code_context_exa with mcp__exa__web_search_exa in consolidate.md
  for trend research queries (colors, typography, layout, contrast, accessibility)
- Add Phase 0.75 URL Content Analysis in imitate-auto.md for screenshot fallback mode
- Use web_search_exa for design pattern extraction from URLs when screenshots unavailable
- Update workflow documentation to reflect new MCP tool usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 12:37:34 +08:00
catlog22
4e48803424 fix(ui-design): ensure component templates include CSS placeholders
Fix critical CSS loading issue where component templates were missing
style references due to contradictory instructions.

Changes:
- Require all templates (pages and components) to generate complete HTML5 documents
- Components now use full document structure with isolated body content
- Guarantees <head> tag presence for CSS placeholder injection
- Update validation to enforce <!DOCTYPE html> requirement
- Update documentation to reflect unified template approach

This ensures ui-instantiate-prototypes.sh can reliably inject STRUCTURAL_CSS
and TOKEN_CSS placeholders, fixing component styling issues.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 12:30:17 +08:00