Design sync

From chmouel/lazyworktree · View interactive version

Design sync is an AI agent skill from the GitHub repository chmouel/lazyworktree. Check DESIGN.md synchronization with codebase architecture

How to use this skill

Skill file

DESIGN.md Synchronization Check

Verify that DESIGN.md accurately reflects the current codebase architecture.

Current Directory Structure

!ls -la internal/ | grep '^d'

DESIGN.md Directory Section

!sed -n '/^## Directory Structure/,/^## /p' DESIGN.md | head -50

Critical File References from DESIGN.md

!grep -oE 'internal/[a-z/]+\.go:[0-9]+-[0-9]+' DESIGN.md | sort -u

Recent Changes Since Last DESIGN.md Update

!git log --since="$(git log -1 --format=%ai DESIGN.md 2>/dev/null || echo '1 month ago')" --name-only --oneline -- 'internal/**/*.go' | grep -E '^internal/' | sort -u

Current Package Import Graph

!go list -f '{{.ImportPath}}: {{join .Imports ", "}}' ./internal/... 2>/dev/null | grep 'lazyworktree/internal' | head -30

DESIGN.md Metadata

!head -20 DESIGN.md | grep -E '(Last updated|Version)'

Theme Fields Documented vs Actual

!echo "=== Documented theme fields ===" && grep -A 20 'type Theme struct' DESIGN.md | grep -oE '^\s+[A-Z][a-zA-Z]+' | wc -l && echo "=== Actual theme fields ===" && grep -A 30 'type Theme struct' internal/app/theme.go | grep -oE '^\s+[A-Z][a-zA-Z]+' | wc -l


Analysis Instructions

Based on the data above, check for:

1. Directory Structure Drift

2. Critical File References

3. Recent Architectural Changes

4. Import Graph Consistency

5. Theme System Accuracy

6. Staleness Check

Report Format

Provide output as:

✅ Up to Date

⚠️ Needs Minor Updates

🔴 Needs Major Updates

📝 Recommended Actions

  1. Specific edits with DESIGN.md line numbers to update
  2. New sections to add (with suggested content outline)
  3. Sections to remove or rewrite
  4. Line number corrections for all file references

Usage Workflow

When to Invoke `/design-sync`

Proactive triggers (before committing):

Periodic triggers:

Recommended Workflow

# 1. Make architectural changes

# 2. Run design-sync skill
/design-sync

# 3. Review output for needed updates

# 4. Update DESIGN.md based on recommendations

# 5. Update "Last updated" date in DESIGN.md

# 6. Re-run to verify
/design-sync  # Should now show ✅ Up to Date

# 7. Commit changes together
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.