@sylphx/flow 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 3.7.0 (2026-01-28)
4
+
5
+ ### ✨ Features
6
+
7
+ - sweep modern UI patterns across all commands ([80f4264](https://github.com/SylphxAI/flow/commit/80f4264e1cf6450d83a09507551740b12be54820))
8
+ - **excellence:** add accessibility and mobile dimensions ([e288eab](https://github.com/SylphxAI/flow/commit/e288eabd53fe9f0eb923f41c9ef1dad8a343724c))
9
+ - add /polish command for modern UI excellence ([040ea22](https://github.com/SylphxAI/flow/commit/040ea2280a7c4a7532caa8ed0b33829f3ec79633))
10
+
11
+ ## 3.6.1 (2026-01-28)
12
+
13
+ ### ♻️ Refactoring
14
+
15
+ - comprehensive review of all commands and builder ([73b103a](https://github.com/SylphxAI/flow/commit/73b103a4d6901079408d9e4e0237cad4e4087f14))
16
+
3
17
  ## 3.6.0 (2026-01-28)
4
18
 
5
19
  ### ✨ Features
@@ -144,6 +144,17 @@ Vercel CLI, Neon CLI, GitHub CLI
144
144
  * Semantic HTML — use correct elements (nav, main, article, section, aside, header, footer)
145
145
  * Data presentation must use Data Tables
146
146
  * Large datasets require cursor-based pagination, virtualization, and infinite scrolling
147
+ * Modern interactions — inline editing, drag & drop, undo everywhere, keyboard shortcuts
148
+ * Feedback — skeleton loading, optimistic UI, smooth transitions
149
+ * Accessibility — keyboard navigation, screen reader support, WCAG contrast
150
+
151
+ ## Public-Facing & Exposure
152
+
153
+ * SEO — proper title tags, meta descriptions, structured data, sitemap
154
+ * Social sharing — OG tags, Twitter cards for all public pages
155
+ * README — clear value prop, quick start, badges, screenshots
156
+ * Landing page — value prop above the fold, clear CTA, social proof
157
+ * Documentation — complete, searchable, up-to-date
147
158
 
148
159
  ## Delivery
149
160
 
@@ -12,16 +12,16 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
12
12
  ## Scan Areas
13
13
 
14
14
  ### 1. Code Quality
15
- - Dead code, unused imports, unused variables
15
+ - Dead code, unused imports, unreachable code
16
16
  - TODOs, FIXMEs, HACKs left in code
17
- - `any` types, missing type safety
17
+ - Weak typing (`any`, missing types, unsafe casts)
18
18
  - Hardcoded values that should be config
19
- - Console.logs, debug code in production
20
- - Copy-paste duplication
21
- - Functions > 50 lines, files > 300 lines
22
- - Missing error handling
23
- - Inconsistent naming conventions
24
- - Outdated dependencies with known issues
19
+ - Debug artifacts in production (console.logs, commented code)
20
+ - Copy-paste duplication (DRY violations)
21
+ - Overly complex functions/files (hard to understand at a glance)
22
+ - Missing or inconsistent error handling
23
+ - Naming that doesn't convey intent
24
+ - Outdated or vulnerable dependencies
25
25
 
26
26
  ### 2. Business Logic Correctness
27
27
 
@@ -50,17 +50,28 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
50
50
 
51
51
  ### 4. UI/UX Issues
52
52
  - Confusing user flows
53
- - Missing loading states
54
- - Missing error states
55
- - Missing empty states
53
+ - Missing loading states (use skeleton, not spinner)
54
+ - Missing error states (with recovery actions)
55
+ - Missing empty states (with guidance)
56
56
  - Inconsistent spacing/typography
57
57
  - Non-responsive layouts
58
- - Accessibility violations (contrast, keyboard nav)
58
+ - Accessibility violations (contrast, keyboard nav, screen reader)
59
59
  - Missing feedback on user actions
60
60
  - Unclear CTAs or labels
61
61
  - Information overload
62
62
 
63
- ### 5. Product Design
63
+ ### 5. Modern UI Patterns (Lack of)
64
+ - No inline editing (everything requires modal/page)
65
+ - No drag & drop where it makes sense
66
+ - No undo capability (destructive actions are permanent)
67
+ - No auto-save (users must remember to save)
68
+ - No keyboard shortcuts for power users
69
+ - No command palette (⌘K) for quick navigation
70
+ - Outdated inputs (dropdowns instead of combobox with search)
71
+ - No optimistic UI (waiting for server on every action)
72
+ - Jarring transitions (no smooth state changes)
73
+
74
+ ### 6. Product Design
64
75
  - Unclear value proposition
65
76
  - Friction in core user journey
66
77
  - Missing onboarding guidance
@@ -70,7 +81,7 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
70
81
  - Power user needs unmet
71
82
  - Beginner barriers too high
72
83
 
73
- ### 6. Performance
84
+ ### 7. Performance
74
85
  - Slow page loads
75
86
  - Unnecessary re-renders
76
87
  - Large bundle sizes
@@ -79,7 +90,7 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
79
90
  - Missing caching opportunities
80
91
  - Unoptimized images/assets
81
92
 
82
- ### 7. Security
93
+ ### 8. Security
83
94
  - Exposed secrets or credentials
84
95
  - Missing input validation
85
96
  - XSS vulnerabilities
@@ -88,7 +99,7 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
88
99
  - Missing rate limiting
89
100
  - Overly permissive CORS
90
101
 
91
- ### 8. Developer Experience
102
+ ### 9. Developer Experience
92
103
  - Missing or outdated documentation
93
104
  - Unclear setup instructions
94
105
  - Flaky or missing tests
@@ -96,6 +107,15 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
96
107
  - Missing type definitions
97
108
  - Confusing folder structure
98
109
 
110
+ ### 10. Public-Facing & Exposure
111
+ - **SEO**: Missing/poor title tags, meta descriptions, structured data
112
+ - **Social Sharing**: Missing OG tags, Twitter cards, poor share previews
113
+ - **Landing/Home**: Unclear value prop above the fold, weak CTAs
114
+ - **README**: Missing badges, unclear quick start, no screenshots
115
+ - **Docs**: Incomplete, outdated, hard to navigate
116
+ - **Analytics**: Missing tracking, no conversion funnels
117
+ - **Branding**: Inconsistent voice, visuals, messaging
118
+
99
119
  ## Process
100
120
 
101
121
  1. **Scan** each area systematically
@@ -48,6 +48,13 @@ gh issue list --state open --limit 20
48
48
  gh pr list --state open --limit 10
49
49
  ```
50
50
 
51
+ ### Business & Marketing Strategy
52
+ - What's the monetization model? Is it working?
53
+ - Who are the competitors? How does this differentiate?
54
+ - What's the go-to-market strategy?
55
+ - How are users being acquired? (SEO, social, paid, referral)
56
+ - What public-facing assets exist? (landing page, blog, socials)
57
+
51
58
  ### Branch Analysis
52
59
  ```bash
53
60
  git branch -a
@@ -11,8 +11,8 @@ Stop. Step back. Challenge everything you just did.
11
11
 
12
12
  ### 1. State of the Art?
13
13
  - Would industry experts approve this implementation?
14
- - Does it follow current best practices (2024+)?
15
- - Is this how top engineers at FAANG would solve it?
14
+ - Does it follow current best practices?
15
+ - Is this how top engineers would solve it?
16
16
  - Are you using modern APIs, patterns, and approaches?
17
17
 
18
18
  ### 2. Correct Approach or Workaround?
@@ -21,21 +21,30 @@ Stop. Step back. Challenge everything you just did.
21
21
  - Would you be embarrassed if a senior engineer reviewed this?
22
22
  - Is there technical debt being created?
23
23
 
24
- ### 3. Clean & Complete?
25
- - Zero dead code?
26
- - Zero unused imports?
27
- - Zero TODOs left behind?
28
- - Zero console.logs or debug code?
24
+ ### 3. Business Logic Sound?
25
+ - Does this make sense from a business perspective?
26
+ - Are edge cases handled correctly for real-world scenarios?
27
+ - Would domain experts find issues with this logic?
28
+ - Does it handle regional/locale differences correctly?
29
+
30
+ ### 4. Clean & Complete?
31
+ - Zero dead code, unused imports, TODOs?
29
32
  - All edge cases handled?
30
- - Error handling complete?
33
+ - Error handling complete and user-friendly?
34
+ - No debug artifacts left behind?
31
35
 
32
- ### 4. Human Experience?
36
+ ### 5. Human Experience?
33
37
  - Is the UX intuitive? Would a user understand without explanation?
34
38
  - Are error messages helpful and actionable?
35
39
  - Is the UI responsive and accessible?
36
40
  - Does it feel polished, not janky?
37
41
 
38
- ### 5. Better Way?
42
+ ### 6. Impact Beyond Code?
43
+ - Does this affect public-facing content (SEO, OG tags, docs)?
44
+ - Should README or documentation be updated?
45
+ - Are there marketing/exposure implications?
46
+
47
+ ### 7. Better Way?
39
48
  - What would you do differently with unlimited time?
40
49
  - Is there a simpler solution you overlooked?
41
50
  - Could this be more elegant?
@@ -46,6 +46,12 @@ mcp__playwright__browser_snapshot - Get current page state
46
46
  - [ ] Boundary values (min/max)
47
47
  - [ ] Invalid inputs
48
48
 
49
+ **Public-Facing Pages:**
50
+ - [ ] Landing/home page — value prop clear? CTA works?
51
+ - [ ] Pricing page — accurate? Links work?
52
+ - [ ] Docs/help — accessible? Search works?
53
+ - [ ] Social sharing — OG previews correct? Links work?
54
+
49
55
  ### 3. Test Business Logic
50
56
 
51
57
  **Region/Locale Consistency:**
@@ -88,6 +94,16 @@ mcp__playwright__browser_take_screenshot # Capture evidence
88
94
  - Responsive issues
89
95
  - Inconsistent styling
90
96
 
97
+ ### Modern UI Patterns (Test for)
98
+ - Can you edit inline or must open modal/page?
99
+ - Can you drag & drop to reorder?
100
+ - Is there undo after destructive actions?
101
+ - Does it auto-save or require manual save?
102
+ - Do keyboard shortcuts work (⌘K, ⌘S, etc.)?
103
+ - Are loading states smooth (skeleton) or jarring (spinner)?
104
+ - Are transitions animated or instant jumps?
105
+ - Do inputs have search/autocomplete where useful?
106
+
91
107
  ## Browser Tools Reference
92
108
 
93
109
  ```
@@ -44,17 +44,32 @@ Based on this specific project's nature, determine what "excellence" means here.
44
44
  - Would users choose this over competitors?
45
45
  - Is it intuitive, fast, polished?
46
46
  - Are edge cases handled gracefully?
47
+ - Does it feel **modern**? (inline editing, drag & drop, ⌘K, undo everywhere)
48
+ - Or does it feel **dated**? (modal forms, no shortcuts, destructive actions)
49
+
50
+ ### Accessibility & Inclusivity
51
+ - Can everyone use this? Keyboard users? Screen reader users?
52
+ - Does it meet WCAG standards (contrast, focus, labels)?
53
+ - Does it respect user preferences (reduced motion, dark mode)?
54
+ - Is it an afterthought or designed-in from the start?
55
+
56
+ ### Mobile & Responsive
57
+ - Does it work beautifully on all screen sizes?
58
+ - Are touch interactions first-class, not degraded?
59
+ - Is mobile a real use case or an afterthought?
47
60
 
48
61
  ### Performance
49
62
  - Is it best-in-class or just acceptable?
50
63
  - Are there obvious bottlenecks?
51
64
  - Would performance engineers approve?
52
65
 
53
- ### Public-Facing (Docs, README, Marketing)
54
- - Is the messaging compelling?
55
- - Would it attract users/contributors?
56
- - Is documentation clear and complete?
57
- - Does it convey professionalism and quality?
66
+ ### Public-Facing & Exposure
67
+ - **First Impression**: Would someone landing here be impressed or confused?
68
+ - **SEO/Discoverability**: Can people find this? Are meta tags, titles, descriptions optimized?
69
+ - **Social Sharing**: Do OG tags, Twitter cards make people want to click?
70
+ - **README/Docs**: World-class or bare minimum? Would it make someone star/fork?
71
+ - **Landing Page**: Does it convert? Is the value prop crystal clear?
72
+ - **Branding**: Consistent, professional, memorable?
58
73
 
59
74
  ## Process
60
75
 
@@ -0,0 +1,167 @@
1
+ ---
2
+ name: polish
3
+ description: Elevate UI from functional to delightful - modern patterns and interactions
4
+ ---
5
+
6
+ # Polish: Elevate UI to Modern Excellence
7
+
8
+ Transform functional UI into delightful, state-of-the-art interfaces. This is not about fixing bugs — it's about raising the bar from "it works" to "it's a joy to use".
9
+
10
+ ## Philosophy
11
+
12
+ > **"Reduce user thinking, increase system intelligence."**
13
+
14
+ Modern UI is:
15
+ - **Direct** — interact with the thing itself, not a separate control
16
+ - **Responsive** — immediate feedback, never leave users wondering
17
+ - **Forgiving** — undo everywhere, mistakes are recoverable
18
+ - **Smart** — anticipate needs, reduce manual input
19
+ - **Fluid** — smooth transitions, not jarring jumps
20
+
21
+ ## Upgrade Dimensions
22
+
23
+ ### 1. Direct Manipulation
24
+
25
+ **Before → After:**
26
+ - Upload button → Click avatar/image to change
27
+ - Edit button → Click text to edit inline
28
+ - Reorder with arrows → Drag & drop
29
+ - Separate settings page → Contextual controls where needed
30
+
31
+ **Principle:** Users should manipulate the object itself, not a proxy control.
32
+
33
+ ### 2. Rich Feedback
34
+
35
+ **Before → After:**
36
+ - Spinner → Skeleton/shimmer loading
37
+ - Submit and wait → Optimistic update (instant, sync in background)
38
+ - Alert box → Toast notification (non-blocking)
39
+ - Page reload → Smooth transition/animation
40
+ - Binary states → Progress indicators with context
41
+
42
+ **Principle:** Every action should have immediate, visible response.
43
+
44
+ ### 3. Modern Input Patterns
45
+
46
+ **Before → After:**
47
+ - Text field for tags → Chip/tag input with autocomplete
48
+ - Dropdown select → Combobox with search and create
49
+ - File upload button → Drag & drop zone + paste support
50
+ - Date text input → Visual picker + natural language ("next monday")
51
+ - Manual everything → Smart defaults + auto-complete
52
+
53
+ **Principle:** Inputs should be as intelligent as possible.
54
+
55
+ ### 4. Information Architecture
56
+
57
+ **Before → After:**
58
+ - All fields visible → Progressive disclosure (show when needed)
59
+ - Fixed layout → Adaptive layout based on content/task
60
+ - Pagination → Infinite scroll with virtualization
61
+ - Menu diving → Command palette (⌘K) for quick access
62
+ - Nested menus → Flat structure + contextual actions
63
+
64
+ **Principle:** Show the right information at the right time.
65
+
66
+ ### 5. Trust & Control
67
+
68
+ **Before → After:**
69
+ - "Are you sure?" dialogs → Undo everywhere (Gmail style)
70
+ - Save button → Auto-save with visible status
71
+ - Silent operations → Visible system status (syncing, saved, offline)
72
+ - Error = dead end → Recovery suggestions + retry options
73
+ - Single version → Version history + restore
74
+
75
+ **Principle:** Users should feel safe to explore and experiment.
76
+
77
+ ### 6. Visual Polish
78
+
79
+ **Before → After:**
80
+ - Flat/harsh shadows → Subtle depth (light shadows, blur)
81
+ - Color as decoration → Color as information (status, priority)
82
+ - Uniform text → Clear typography hierarchy
83
+ - Cramped layout → Consistent spacing system (breathing room)
84
+ - Static states → Purposeful motion (guide attention, show relationships)
85
+
86
+ **Principle:** Visual design should reduce cognitive load, not add to it.
87
+
88
+ ### 7. Power User Enablement
89
+
90
+ **Before → After:**
91
+ - Mouse only → Keyboard shortcuts for common actions
92
+ - One item at a time → Bulk selection and actions
93
+ - Fixed views → Customizable columns/layouts
94
+ - No way out → Export/import data
95
+ - Hidden features → Discoverable via command palette
96
+
97
+ **Principle:** Reward expertise without punishing beginners.
98
+
99
+ ### 8. Mobile & Touch
100
+
101
+ **Before → After:**
102
+ - Desktop-only design → Responsive from the start
103
+ - Click targets → Touch-friendly tap targets (44px+)
104
+ - Hover states only → Touch gestures (swipe, long-press)
105
+ - Desktop modals → Bottom sheets on mobile
106
+ - Mouse precision → Finger-friendly spacing
107
+
108
+ **Principle:** Touch is not a degraded experience — it's a different one.
109
+
110
+ ## Process
111
+
112
+ ### 1. Audit Current State
113
+ Walk through the UI as a user:
114
+ - Where do I have to click too many times?
115
+ - Where am I waiting without feedback?
116
+ - Where do I feel friction or annoyance?
117
+ - What feels dated compared to best-in-class apps?
118
+
119
+ ### 2. Prioritize by Impact
120
+ Focus on:
121
+ - High-frequency interactions (used daily)
122
+ - Pain points (users complain or work around)
123
+ - First impressions (onboarding, landing)
124
+
125
+ ### 3. Apply Modern Patterns
126
+ For each area:
127
+ - Identify the current pattern
128
+ - Choose the modern equivalent
129
+ - Implement with smooth transitions
130
+ - Ensure accessibility is maintained
131
+
132
+ ### 4. Verify Quality
133
+ - Interactions feel snappy (< 100ms feedback)
134
+ - Animations are smooth (60fps)
135
+ - Works with keyboard navigation
136
+ - Responsive across screen sizes
137
+ - Accessible (screen readers, contrast)
138
+
139
+ ## Reference: Best-in-Class Examples
140
+
141
+ | Pattern | See How It's Done |
142
+ |---------|-------------------|
143
+ | Command Palette | Linear, Raycast, VS Code (⌘K) |
144
+ | Inline Editing | Notion, Airtable |
145
+ | Drag & Drop | Trello, Figma |
146
+ | Optimistic UI | Twitter/X likes, Gmail send |
147
+ | Skeleton Loading | Facebook, LinkedIn |
148
+ | Tag Input | GitHub labels, Notion tags |
149
+ | Auto-save | Google Docs, Figma |
150
+
151
+ ## Accessibility is Non-Negotiable
152
+
153
+ Modern ≠ Inaccessible. Every polish must maintain:
154
+ - **Keyboard navigation** — all interactions work without mouse
155
+ - **Screen reader support** — proper ARIA labels, announcements
156
+ - **Reduced motion** — respect `prefers-reduced-motion`
157
+ - **Color contrast** — WCAG AA minimum (4.5:1 text, 3:1 UI)
158
+ - **Focus indicators** — visible, clear focus states
159
+
160
+ ## Remember
161
+
162
+ * **Polish is not decoration** — it's reducing friction
163
+ * **Motion with purpose** — guide attention, show relationships
164
+ * **Accessibility first** — modern doesn't mean inaccessible
165
+ * **Performance is UX** — slow animations are worse than none
166
+ * **Consistency compounds** — one pattern, used everywhere
167
+ * **Steal from the best** — Linear, Figma, Notion set the bar
@@ -70,7 +70,16 @@ Evaluate product design holistically — from user experience to business impact
70
70
  - [ ] **Recovery** — Helpful error messages with solutions?
71
71
  - [ ] **Help** — Documentation accessible when needed?
72
72
 
73
- ## 4. Accessibility & Inclusivity
73
+ ## 4. Modern Interaction Patterns
74
+
75
+ - **Direct manipulation**: Can users interact with content directly (inline edit, drag to reorder)?
76
+ - **Instant feedback**: Optimistic UI, skeleton loading, smooth transitions?
77
+ - **Power user support**: Keyboard shortcuts, command palette (⌘K)?
78
+ - **Trust**: Undo everywhere, auto-save, visible sync status?
79
+ - **Smart inputs**: Search in dropdowns, autocomplete, paste to upload?
80
+ - Does it feel like a 2025 app or a 2015 form?
81
+
82
+ ## 5. Accessibility & Inclusivity
74
83
 
75
84
  - Works without mouse (keyboard navigation)?
76
85
  - Works with screen readers?
@@ -80,13 +89,21 @@ Evaluate product design holistically — from user experience to business impact
80
89
  - Works on old devices/browsers?
81
90
  - Internationalization-ready?
82
91
 
83
- ## 5. Competitive Edge
92
+ ## 6. Competitive Edge
84
93
 
85
94
  - What do competitors do better? Can we match or exceed?
86
95
  - What do we do uniquely well? Is it emphasized?
87
96
  - What's missing in the market that we could own?
88
97
  - If a user tried competitor after us, would they come back? Why?
89
98
 
99
+ ## 7. Public-Facing & Exposure
100
+
101
+ - **Landing Page**: Does it convert? Value prop clear in 5 seconds?
102
+ - **SEO**: Are we discoverable? Right keywords targeted?
103
+ - **Social Sharing**: Do shared links look compelling? OG tags set?
104
+ - **README**: Would a developer star this? Quick start clear?
105
+ - **Docs**: Can users self-serve? Search works?
106
+
90
107
  ## Process
91
108
 
92
109
  1. **Walk through** the entire product as each user type
@@ -5,56 +5,57 @@ description: Deep refactoring - modularity, deduplication, cleanup
5
5
 
6
6
  # Refactor: Deep Codebase Improvement
7
7
 
8
- Systematically refactor the codebase for maximum quality.
8
+ Systematically refactor the codebase toward excellence. The goal is not just clean code, but code that is a joy to work with — maintainable, understandable, and extensible.
9
+
10
+ ## Why Refactor?
11
+
12
+ > "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." — Martin Fowler
13
+
14
+ Refactoring is about:
15
+ - **Future velocity** — clean code is faster to change
16
+ - **Bug prevention** — simple code has fewer hiding places for bugs
17
+ - **Onboarding** — new contributors can understand and contribute faster
18
+ - **Pride** — code you'd be proud to show anyone
9
19
 
10
20
  ## Targets
11
21
 
12
- 1. **Dead code** — remove all unused code, imports, variables, functions
13
- 2. **Duplication** — extract shared logic, eliminate copy-paste
14
- 3. **TODOs** — resolve or remove every TODO comment
15
- 4. **Modularity** — split large files, extract reusable modules
16
- 5. **Naming** — rename unclear variables, functions, files
17
- 6. **Types** — strengthen typing, remove `any`, add missing types
18
- 7. **Structure** — reorganize files into logical folders
19
- 8. **Dependencies** — remove unused deps, update outdated ones
22
+ 1. **Dead code** — if it's not used, it's noise
23
+ 2. **Duplication** — DRY violations are bug factories
24
+ 3. **Complexity** — if it's hard to understand, it's wrong
25
+ 4. **Naming** — code should read like well-written prose
26
+ 5. **Types** — weak types are hidden bugs waiting to happen
27
+ 6. **Structure** — logical organization reduces cognitive load
28
+ 7. **Dependencies** — unused deps are attack surface and bloat
20
29
 
21
30
  ## Process
22
31
 
23
- ### Phase 1: Scan
24
-
25
- 1. Find dead code: unused exports, unreachable code
26
- 2. Find duplication: similar code blocks, copy-paste patterns
27
- 3. Find TODOs: `grep -r "TODO" --include="*.ts" --include="*.tsx"`
28
- 4. Find large files: files > 300 lines
29
- 5. Find weak types: `any`, missing return types
32
+ ### Phase 1: Understand
33
+ - What is the code trying to do?
34
+ - Why was it written this way?
35
+ - What are the dependencies and side effects?
30
36
 
31
37
  ### Phase 2: Refactor
32
-
33
- For each issue found:
34
- 1. Plan the refactor
35
- 2. Make the change
36
- 3. Run tests to verify no regression
38
+ For each improvement:
39
+ 1. Understand the context first
40
+ 2. Make one logical change
41
+ 3. Verify behavior unchanged (tests, manual check)
37
42
  4. Commit atomically: `refactor: description`
38
- 5. Push immediately
39
43
 
40
44
  ### Phase 3: Verify
45
+ - Tests pass
46
+ - Types check
47
+ - Linter happy
48
+ - Build succeeds
49
+ - Behavior unchanged
41
50
 
42
- 1. Run full test suite
43
- 2. Run type check
44
- 3. Run linter
45
- 4. Verify build succeeds
46
-
47
- ## Rules
51
+ ## Principles
48
52
 
49
- * One logical change per commit
50
- * Tests must pass after each refactor
51
- * No behavior changes — refactor only
52
- * If behavior change needed, separate commit
53
+ * **Understand before changing** never refactor blindly
54
+ * **One change at a time** — atomic commits, easy to revert
55
+ * **Behavior unchanged** — refactor ≠ rewrite
56
+ * **Tests are your safety net** — if no tests, add them first
57
+ * **When in doubt, simplify** — less code is usually better
53
58
 
54
59
  ## Exit Condition
55
60
 
56
- * Zero TODOs
57
- * Zero dead code
58
- * Zero duplication
59
- * All tests pass
60
- * All types strict
61
+ The codebase should feel **clean, consistent, and comprehensible**.
@@ -51,20 +51,13 @@ For each similar case found:
51
51
 
52
52
  ## Examples
53
53
 
54
- ### Bug Fix Sweep
54
+ ### Code Pattern Sweep
55
55
  ```
56
56
  Fixed: Null check missing in UserProfile
57
57
  Sweep: Find all components accessing user data without null checks
58
58
  Result: Fixed 12 similar issues across 8 files
59
59
  ```
60
60
 
61
- ### Pattern Improvement Sweep
62
- ```
63
- Improved: Converted callback to async/await in fetchData
64
- Sweep: Find all callback-style async code
65
- Result: Modernized 23 functions to async/await
66
- ```
67
-
68
61
  ### Type Safety Sweep
69
62
  ```
70
63
  Fixed: Added proper TypeScript types to API response
@@ -72,18 +65,32 @@ Sweep: Find all `any` types in API layer
72
65
  Result: Added proper types to 15 API functions
73
66
  ```
74
67
 
75
- ### Component Pattern Sweep
68
+ ### Business Logic Sweep
69
+ ```
70
+ Fixed: HK user was seeing CN tax options
71
+ Sweep: Find all region-dependent logic, verify correctness
72
+ Result: Fixed 5 similar locale issues across settings, billing, reports
73
+ ```
74
+
75
+ ### UX Pattern Sweep
76
+ ```
77
+ Improved: Added loading state to save button
78
+ Sweep: Find all async actions without loading feedback
79
+ Result: Added loading states to 8 similar interactions
80
+ ```
81
+
82
+ ### Error Handling Sweep
76
83
  ```
77
84
  Created: Reusable ErrorBoundary with retry
78
- Sweep: Find all try-catch error handling in components
79
- Result: Replaced 8 ad-hoc error handlers with ErrorBoundary
85
+ Sweep: Find all ad-hoc error handling in components
86
+ Result: Standardized error handling across 12 components
80
87
  ```
81
88
 
82
- ### Performance Optimization Sweep
89
+ ### Public-Facing Sweep
83
90
  ```
84
- Optimized: Added useMemo to expensive calculation
85
- Sweep: Find all expensive calculations in render
86
- Result: Memoized 6 similar calculations
91
+ Fixed: Missing OG tags on product page
92
+ Sweep: Find all public pages missing proper meta tags
93
+ Result: Added OG/Twitter cards to 6 pages
87
94
  ```
88
95
 
89
96
  ## Output
@@ -111,6 +118,7 @@ Cases Fixed: [count]
111
118
 
112
119
  * **One fix = comprehensive sweep** — never leave similar issues behind
113
120
  * **Think in patterns** — what class of problem did you just solve?
114
- * **Be thorough** — check everywhere, including tests and docs
115
- * **Maintain consistency** — all similar code should look similar
121
+ * **Sweep all dimensions** — code, business logic, UX, public-facing
122
+ * **Be thorough** — check everywhere: code, tests, docs, marketing pages
123
+ * **Maintain consistency** — similar things should look and work similarly
116
124
  * **This is how you reach State of the Art** — excellence everywhere, not just in spots
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "One CLI to rule them all. Unified orchestration layer for AI coding assistants. Auto-detection, auto-installation, auto-upgrade.",
5
5
  "type": "module",
6
6
  "bin": {