cursorflow 2.0.0__tar.gz → 2.0.1__tar.gz

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.
Files changed (42) hide show
  1. {cursorflow-2.0.0 → cursorflow-2.0.1}/PKG-INFO +1 -1
  2. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/rules/cursorflow-installation.mdc +96 -50
  3. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/rules/cursorflow-usage.mdc +227 -91
  4. {cursorflow-2.0.0 → cursorflow-2.0.1}/pyproject.toml +1 -1
  5. {cursorflow-2.0.0 → cursorflow-2.0.1}/LICENSE +0 -0
  6. {cursorflow-2.0.0 → cursorflow-2.0.1}/MANIFEST.in +0 -0
  7. {cursorflow-2.0.0 → cursorflow-2.0.1}/README.md +0 -0
  8. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/__init__.py +0 -0
  9. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/auto_updater.py +0 -0
  10. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/cli.py +0 -0
  11. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/agent.py +0 -0
  12. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/auth_handler.py +0 -0
  13. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/browser_controller.py +0 -0
  14. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/browser_engine.py +0 -0
  15. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/css_iterator.py +0 -0
  16. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/cursor_integration.py +0 -0
  17. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/cursorflow.py +0 -0
  18. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/error_context_collector.py +0 -0
  19. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/error_correlator.py +0 -0
  20. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/event_correlator.py +0 -0
  21. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/file_change_monitor.py +0 -0
  22. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/hmr_detector.py +0 -0
  23. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/log_collector.py +0 -0
  24. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/log_monitor.py +0 -0
  25. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/mockup_comparator.py +0 -0
  26. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/persistent_session.py +0 -0
  27. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/report_generator.py +0 -0
  28. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/core/trace_manager.py +0 -0
  29. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/install_cursorflow_rules.py +0 -0
  30. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/log_sources/local_file.py +0 -0
  31. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/log_sources/ssh_remote.py +0 -0
  32. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/rules/__init__.py +0 -0
  33. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow/updater.py +0 -0
  34. {cursorflow-2.0.0 → cursorflow-2.0.1}/cursorflow.egg-info/SOURCES.txt +0 -0
  35. {cursorflow-2.0.0 → cursorflow-2.0.1}/docs/USER_MANUAL.md +0 -0
  36. {cursorflow-2.0.0 → cursorflow-2.0.1}/examples/comprehensive_screenshot_example.py +0 -0
  37. {cursorflow-2.0.0 → cursorflow-2.0.1}/examples/mockup_comparison_example.py +0 -0
  38. {cursorflow-2.0.0 → cursorflow-2.0.1}/examples/opensas_example.py +0 -0
  39. {cursorflow-2.0.0 → cursorflow-2.0.1}/examples/react_example.py +0 -0
  40. {cursorflow-2.0.0 → cursorflow-2.0.1}/examples/v2_comprehensive_demo.py +0 -0
  41. {cursorflow-2.0.0 → cursorflow-2.0.1}/setup.cfg +0 -0
  42. {cursorflow-2.0.0 → cursorflow-2.0.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: 🔥 Complete page intelligence for AI-driven development with Hot Reload Intelligence - captures DOM, network, console, performance, HMR events, and comprehensive page analysis
5
5
  Author-email: GeekWarrior Development <rbush@cooltheory.com>
6
6
  License-Expression: MIT
@@ -1,18 +1,18 @@
1
1
  ---
2
- title: CursorFlow CLI Installation & Setup Guide for Cursor
3
- description: How to install and configure CursorFlow CLI in any project for autonomous UI testing
2
+ title: CursorFlow 2.0.0 Installation & Setup Guide for Cursor
3
+ description: How to install and configure CursorFlow 2.0.0 for complete page intelligence in AI-driven development
4
4
  ---
5
5
 
6
- # CursorFlow CLI Installation & Setup Guide for Cursor
6
+ # CursorFlow 2.0.0 Installation & Setup Guide for Cursor
7
7
 
8
- ## 🚀 **When to Install CursorFlow**
8
+ ## 🚀 **When to Install CursorFlow 2.0.0**
9
9
 
10
10
  ### **Automatically Install When:**
11
11
  - User mentions UI testing, visual debugging, or layout issues
12
12
  - User asks to "test this component" or "check if this works"
13
13
  - User is working on CSS/layout modifications
14
14
  - User reports frontend bugs or authentication issues
15
- - New project setup where UI testing would be valuable
15
+ - New project setup where comprehensive UI analysis would be valuable
16
16
 
17
17
  ### **Project Types That Benefit:**
18
18
  - Web applications (React, Vue, Angular, PHP, Django, Rails)
@@ -20,42 +20,46 @@ description: How to install and configure CursorFlow CLI in any project for auto
20
20
  - E-commerce sites with complex user flows
21
21
  - Admin dashboards and data visualization
22
22
  - Any project with user authentication
23
+ - Development projects using Vite, Webpack, Next.js, Parcel, Laravel Mix
23
24
 
24
25
  ## 📦 **Installation Steps**
25
26
 
26
- ### **1. Install CursorFlow CLI:**
27
+ ### **1. Install CursorFlow 2.0.0:**
27
28
  ```bash
28
- # Install the universal testing CLI
29
+ # Install CursorFlow 2.0.0 with complete page intelligence
29
30
  pip install cursorflow
30
31
 
31
32
  # Install browser automation dependencies
32
- cursorflow install-deps
33
+ playwright install chromium
33
34
 
34
- # Verify installation
35
+ # Verify installation and check v2.0.0 features
35
36
  cursorflow --version
36
37
  ```
37
38
 
38
39
  ### **2. Initialize Project:**
39
40
  ```bash
40
- # Initialize CursorFlow in the project (creates config + installs rules)
41
+ # Initialize CursorFlow in the project (creates config + installs Cursor rules)
41
42
  cursorflow init .
42
43
 
43
44
  # This automatically:
44
45
  # - Creates cursor-test-config.json with smart defaults
45
- # - Sets up .cursorflow/ directory structure
46
- # - Configures for your web technology
46
+ # - Sets up .cursorflow/ directory structure
47
+ # - Configures for your web technology stack
48
+ # - Installs Cursor AI rules for autonomous operation
47
49
  ```
48
50
 
49
- ### **3. Verify Installation:**
51
+ ### **3. Verify v2.0.0 Installation:**
50
52
  ```bash
51
- # Test basic functionality
53
+ # Test comprehensive data capture
52
54
  cursorflow test --base-url http://localhost:3000 --path "/"
53
55
 
54
56
  # Check configuration
55
57
  cat cursor-test-config.json
56
58
 
57
- # Verify artifacts directory
58
- ls -la .cursorflow/
59
+ # Verify artifacts directory structure
60
+ ls -la .cursorflow/artifacts/
61
+ ls -la .cursorflow/artifacts/diagnostics/
62
+ ls -la .cursorflow/artifacts/traces/
59
63
  ```
60
64
 
61
65
  ## ⚙️ **Auto-Generated Configuration**
@@ -87,41 +91,58 @@ CursorFlow creates smart defaults based on your project:
87
91
  }
88
92
  ```
89
93
 
90
- ## 🎯 **Quick Start Examples**
94
+ ## 🎯 **CursorFlow 2.0.0 Quick Start Examples**
91
95
 
92
- ### **Test a Component:**
96
+ ### **Test UI Component with Complete Intelligence:**
93
97
  ```bash
94
- # Test any UI component
95
- cursorflow test dashboard --base-url http://localhost:3000
96
-
97
- # Results in structured JSON + artifacts:
98
- # - Browser interaction timeline
99
- # - Screenshots in .cursorflow/artifacts/
100
- # - Console logs and server logs
101
- # - Network requests and responses
98
+ # Test any UI component with comprehensive data capture
99
+ cursorflow test --base-url http://localhost:3000 --path "/dashboard"
100
+
101
+ # Results include:
102
+ # - 🔥 Hot Reload Intelligence (framework auto-detection)
103
+ # - 🧠 Advanced Element Intelligence (7 selector strategies)
104
+ # - 📊 Comprehensive Page Analysis (fonts, animations, resources, storage)
105
+ # - 🎯 Enhanced Error Context (smart screenshot deduplication)
106
+ # - ⚡ Enhanced Browser Data (Playwright traces, network intelligence)
102
107
  ```
103
108
 
104
- ### **Debug Authentication:**
109
+ ### **Debug Authentication with Rich Context:**
105
110
  ```bash
106
- # Test login flow
107
- cursorflow test login-form --base-url http://localhost:3000
108
-
109
- # Analyze output for:
110
- # - Authentication errors in timeline
111
- # - Session state issues
112
- # - Server response patterns
111
+ # Test login flow with comprehensive error context
112
+ cursorflow test \
113
+ --base-url http://localhost:3000 \
114
+ --actions '[
115
+ {"navigate": "/login"},
116
+ {"fill": {"selector": "#username", "value": "test@example.com"}},
117
+ {"fill": {"selector": "#password", "value": "testpass"}},
118
+ {"click": "#login-button"},
119
+ {"wait_for": ".dashboard, .error-message"},
120
+ {"screenshot": "login-result"}
121
+ ]'
122
+
123
+ # Analyze comprehensive output for:
124
+ # - Authentication errors with full context
125
+ # - Network request/response details
126
+ # - Console error correlation
127
+ # - Element interaction intelligence
113
128
  ```
114
129
 
115
- ### **CSS Iteration:**
130
+ ### **CSS Development with HMR Intelligence:**
116
131
  ```bash
117
- # Before: Test current state
118
- cursorflow test dashboard --base-url http://localhost:3000
132
+ # Before: Test current state with framework detection
133
+ cursorflow test --base-url http://localhost:3000 --path "/component"
119
134
 
120
135
  # Apply CSS changes to actual files
121
- # After: Test improved state
122
- cursorflow test dashboard --base-url http://localhost:3000
136
+ # CursorFlow automatically detects your framework (Vite, Webpack, Next.js, etc.)
123
137
 
124
- # Compare screenshots in .cursorflow/artifacts/
138
+ # After: Test improved state with HMR correlation
139
+ cursorflow test --base-url http://localhost:3000 --path "/component"
140
+
141
+ # Compare comprehensive data:
142
+ # - Screenshots in .cursorflow/artifacts/screenshots/
143
+ # - HMR event correlation in results JSON
144
+ # - Performance impact analysis
145
+ # - Element intelligence changes
125
146
  ```
126
147
 
127
148
  ## 🌍 **Environment-Specific Setup**
@@ -285,13 +306,38 @@ cursorflow --help # View all commands
285
306
  - Test artifacts are created and organized properly
286
307
  - Cursor can use `cursorflow test` for any component
287
308
 
288
- ## 🌟 **Result: Cursor Superpowers Activated!**
289
-
290
- Once installed, Cursor can autonomously:
291
- - Test any UI component with simple CLI commands
292
- - Collect comprehensive browser and server data
293
- - Analyze results and make informed decisions
294
- - Iterate on designs with visual feedback
295
- - Debug issues with complete visibility
296
-
297
- **Installation complete = Development superpowers activated!** 🚀
309
+ ## 🌟 **Result: Cursor AI Superpowers Activated with v2.0.0!**
310
+
311
+ Once installed, Cursor can autonomously leverage complete page intelligence:
312
+
313
+ ### **🔥 Hot Reload Intelligence:**
314
+ - Auto-detect development frameworks (Vite, Webpack, Next.js, Parcel, Laravel Mix)
315
+ - Monitor WebSocket connections for HMR events
316
+ - Correlate CSS changes with visual updates
317
+ - Optimize testing timing with framework-specific intelligence
318
+
319
+ ### **🧠 Advanced Element Intelligence:**
320
+ - Utilize 7 selector strategies for robust element targeting
321
+ - Access comprehensive accessibility analysis
322
+ - Leverage visual context data for interaction decisions
323
+ - Apply computed style intelligence for CSS debugging
324
+
325
+ ### **📊 Comprehensive Page Analysis:**
326
+ - Monitor font loading status and performance
327
+ - Track animation states and transitions
328
+ - Analyze resource loading patterns and optimization opportunities
329
+ - Inspect storage state (localStorage, sessionStorage, cookies)
330
+
331
+ ### **🎯 Enhanced Error Context Collection:**
332
+ - Automatic error detection with rich diagnostic data
333
+ - Smart screenshot deduplication to avoid redundancy
334
+ - Comprehensive error correlation across browser and network layers
335
+ - Diagnostic artifacts organized for AI analysis
336
+
337
+ ### **⚡ Enhanced Browser Data Capture:**
338
+ - Full Playwright trace recording for complex debugging
339
+ - Network request/response intelligence with performance data
340
+ - Console message correlation with interaction timeline
341
+ - Performance metrics and optimization insights
342
+
343
+ **CursorFlow 2.0.0 Installation Complete = AI-Driven Development Superpowers Activated!** 🚀
@@ -1,99 +1,230 @@
1
1
  # CursorFlow Usage Rules for Cursor AI
2
2
 
3
- ## 🔥 **PRIMARY USE CASE: Hot Reload CSS Iteration**
3
+ ## 🔥 **CursorFlow 2.0.0: Complete Page Intelligence for AI-Driven Development**
4
4
 
5
- **ALWAYS USE `css_iteration_persistent()` for CSS/UI work** - this is CursorFlow's core strength:
5
+ **CursorFlow provides comprehensive data collection for rapid UI iteration:**
6
6
 
7
- - 🚀 **3-5x faster** than normal testing with hot reload integration
8
- - 🎯 **Preserves application state** during CSS iterations
9
- - 🔥 **Automatic hot reload detection** (Webpack HMR, Vite, Next.js, etc.)
10
- - **Instant visual feedback** without page reloads
11
- - 🧠 **Intelligent session management** with automatic cleanup
7
+ - 🔥 **Hot Reload Intelligence** - Auto-detects Vite, Webpack, Next.js, Parcel, Laravel Mix
8
+ - 🧠 **Advanced Element Intelligence** - 7 selector strategies + accessibility analysis
9
+ - 📊 **Comprehensive Page Analysis** - Fonts, animations, resources, storage state
10
+ - 🎯 **Enhanced Error Context Collection** - Smart screenshot deduplication
11
+ - **Enhanced Browser Data Capture** - Playwright traces + network interception
12
12
 
13
13
  ## When to Use CursorFlow
14
14
 
15
- ### **CSS/UI Development (PRIORITY 1 - Use Persistent Sessions)**
15
+ ### **UI Testing & Development (PRIMARY USE CASE)**
16
16
  - CSS styling, layout adjustments, responsive design
17
17
  - Visual hierarchy improvements, spacing, typography
18
18
  - Component styling and design system work
19
19
  - UI bug fixes and visual improvements
20
20
  - Design iteration and rapid prototyping
21
-
22
- ### **UI Testing & Debugging (Use CLI)**
23
21
  - Form submissions and user interactions
24
22
  - Authentication flows and session handling
25
23
  - Frontend-backend interaction problems
26
24
  - Error reproduction and debugging
27
25
  - Cross-browser compatibility testing
28
26
 
29
- ## 🔥 **Hot Reload CSS Iteration (PRIMARY METHOD)**
27
+ ## 🔥 **Hot Reload Intelligence (v2.0.0)**
28
+
29
+ CursorFlow auto-detects and integrates with development frameworks:
30
30
 
31
- ### **Ultra-Fast CSS Iteration Pattern**
31
+ ### **Supported Frameworks:**
32
+ - **Vite** (port 5173, WebSocket `/__vite_hmr`)
33
+ - **Webpack Dev Server** (port 3000, WebSocket `/sockjs-node`)
34
+ - **Next.js** (port 3000, WebSocket `/_next/webpack-hmr`)
35
+ - **Parcel** (port 1234, WebSocket `/hmr`)
36
+ - **Laravel Mix** (port 3000, WebSocket `/browser-sync/socket.io`)
37
+
38
+ ### **Hot Reload Usage Pattern:**
32
39
  ```python
33
40
  from cursorflow import CursorFlow
34
41
 
35
- # Initialize with hot reload support
42
+ # Initialize with HMR auto-detection
36
43
  flow = CursorFlow(
37
44
  base_url="http://localhost:3000", # Your dev server
38
45
  log_config={"source": "local", "paths": ["logs/app.log"]},
39
- browser_config={"hot_reload_enabled": True, "keep_alive": True}
46
+ browser_config={"headless": True}
40
47
  )
41
48
 
42
- # CSS changes to test rapidly
43
- css_changes = [
44
- {
45
- "name": "improve-spacing",
46
- "css": ".container { gap: 2rem; padding: 1.5rem; }",
47
- "rationale": "Better visual hierarchy"
48
- },
49
- {
50
- "name": "add-shadows",
51
- "css": ".card { box-shadow: 0 4px 6px rgba(0,0,0,0.1); }",
52
- "rationale": "Add depth and visual interest"
53
- }
54
- ]
55
-
56
- # Execute with persistent session - 3-5x faster!
57
- results = await flow.css_iteration_persistent(
58
- base_actions=[{"navigate": "/dashboard"}, {"wait_for": "#main-content"}],
59
- css_changes=css_changes,
60
- session_options={"hot_reload": True, "keep_session_alive": True}
49
+ # CursorFlow automatically:
50
+ # 1. Detects your framework (Vite, Webpack, Next.js, etc.)
51
+ # 2. Monitors WebSocket for HMR events
52
+ # 3. Waits for CSS updates instead of arbitrary delays
53
+ # 4. Captures precise timing of hot reload events
54
+
55
+ # Execute test with HMR intelligence
56
+ results = await flow.execute_and_collect(
57
+ actions=[
58
+ {"navigate": "/dashboard"},
59
+ {"wait_for": "body"},
60
+ {"screenshot": "initial"}
61
+ ]
61
62
  )
62
63
 
63
- # Analyze results
64
- print(f"🔥 Hot reload used: {results.get('hot_reload_used')}")
65
- print(f" Iterations/min: {results.get('persistent_analysis', {}).get('iteration_speed_metrics', {}).get('iterations_per_minute', 0):.1f}")
64
+ # HMR status available in results
65
+ hmr_status = results.get('hmr_status', {})
66
+ print(f"Framework detected: {hmr_status.get('detected_framework', 'None')}")
66
67
  ```
67
68
 
68
- ### **Session Continuation (No Page Reload!)**
69
+ ## 🧠 **Advanced Element Intelligence (v2.0.0)**
70
+
71
+ Every screenshot captures comprehensive element data:
72
+
73
+ ### **7 Selector Strategies:**
74
+ - **CSS Selectors**: `#id`, `.class`, `tag[attr]`
75
+ - **XPath**: `//div[@class='container']`
76
+ - **Text-based**: Elements containing specific text
77
+ - **Role-based**: `[role='button']`, `[role='navigation']`
78
+ - **Test ID**: `[data-testid='submit-button']`
79
+ - **ARIA Labels**: `[aria-label='Close dialog']`
80
+ - **Unique CSS**: Auto-generated unique selectors
81
+
82
+ ### **Comprehensive Element Data:**
69
83
  ```python
70
- # First iteration - sets up persistent session
71
- results1 = await flow.css_iteration_persistent(
72
- base_actions=[{"navigate": "/page"}],
73
- css_changes=[{"name": "initial", "css": ".container { display: flex; }"}],
74
- session_options={"session_id": "my_session", "keep_session_alive": True}
75
- )
84
+ # Every screenshot includes detailed element analysis
85
+ results = await flow.execute_and_collect([
86
+ {"navigate": "/dashboard"},
87
+ {"screenshot": "dashboard"}
88
+ ])
89
+
90
+ # Access rich element data
91
+ screenshot_data = results['artifacts']['screenshots'][0]
92
+ elements = screenshot_data['dom_analysis']['elements']
93
+
94
+ for element in elements:
95
+ print(f"Tag: {element['tagName']}")
96
+ print(f"Unique Selector: {element['uniqueSelector']}")
97
+ print(f"Accessibility Role: {element['accessibility']['role']}")
98
+ print(f"Is Interactive: {element['accessibility']['isInteractive']}")
99
+ print(f"Bounding Box: {element['boundingBox']}")
100
+ print(f"Computed Styles: {element['computedStyles']}")
101
+ print(f"Visual Context: {element['visual_context']}")
102
+ ```
76
103
 
77
- # Continue with same session - INSTANT feedback!
78
- results2 = await flow.css_iteration_persistent(
79
- base_actions=[], # No base actions needed - session preserved!
80
- css_changes=[{"name": "refine", "css": ".container { gap: 1rem; }"}],
81
- session_options={"session_id": "my_session", "reuse_session": True}
82
- )
104
+ ## 📊 **Comprehensive Page Analysis (v2.0.0)**
105
+
106
+ Every screenshot captures complete page intelligence:
107
+
108
+ ### **Font Loading Analysis:**
109
+ - Total fonts loaded/loading/failed
110
+ - Font family details and loading metrics
111
+ - Used font families on the page
112
+
113
+ ### **Animation State Tracking:**
114
+ - Running/paused/finished animations
115
+ - CSS transitions and their states
116
+ - Performance impact analysis
117
+
118
+ ### **Resource Loading Intelligence:**
119
+ - Total resources by type (JS, CSS, images)
120
+ - Loading performance metrics
121
+ - Critical resource identification
122
+ - Cache hit rates and compression ratios
123
+
124
+ ### **Storage State Analysis:**
125
+ - localStorage and sessionStorage contents
126
+ - Cookie count and sizes
127
+ - IndexedDB availability
128
+
129
+ ### **Usage Example:**
130
+ ```python
131
+ results = await flow.execute_and_collect([
132
+ {"navigate": "/app"},
133
+ {"screenshot": "comprehensive"}
134
+ ])
135
+
136
+ screenshot_data = results['artifacts']['screenshots'][0]
137
+
138
+ # Access comprehensive analysis
139
+ print(f"Fonts loaded: {screenshot_data['font_status']['total_loaded_fonts']}")
140
+ print(f"Animations running: {screenshot_data['animation_status']['total_running_animations']}")
141
+ print(f"Resources loaded: {screenshot_data['resource_status']['total_resources']}")
142
+ print(f"Storage items: {screenshot_data['storage_state']['localStorage']['item_count']}")
83
143
  ```
84
144
 
85
- ### **Hot Reload Decision Framework**
86
- 1. **User mentions CSS/styling** → Use `css_iteration_persistent()`
87
- 2. **User wants UI improvements** → Use persistent sessions
88
- 3. **User asks to "test this component"** → Use hot reload iteration
89
- 4. **User reports layout issues** → Use CSS iteration with screenshots
90
- 5. **User wants responsive testing** → Use persistent sessions with viewport changes
145
+ ## 🎯 **Enhanced Error Context Collection (v2.0.0)**
91
146
 
92
- ## Basic CursorFlow CLI Usage
147
+ CursorFlow automatically captures rich error context with smart deduplication:
93
148
 
94
- ### Simple Tests
149
+ ### **Automatic Error Detection:**
150
+ - Console errors and warnings
151
+ - Network request failures (4xx, 5xx responses)
152
+ - JavaScript exceptions and unhandled promises
153
+ - Page crashes and navigation failures
154
+
155
+ ### **Smart Screenshot Deduplication:**
156
+ - Reuses screenshots when page content hasn't changed
157
+ - Avoids duplicate captures for multiple errors in close proximity
158
+ - Maintains comprehensive diagnostic coverage
159
+
160
+ ### **Comprehensive Error Context:**
161
+ ```python
162
+ # Errors are automatically detected and context collected
163
+ results = await flow.execute_and_collect([
164
+ {"navigate": "/page"},
165
+ {"click": "#nonexistent-button"} # This will trigger error collection
166
+ ])
167
+
168
+ # Access error context summary
169
+ error_summary = flow.get_error_context_summary()
170
+ print(f"Total errors: {error_summary['total_errors_collected']}")
171
+ print(f"Error types: {error_summary['unique_error_types']}")
172
+ print(f"Screenshot dedup rate: {error_summary['screenshot_deduplication_rate']}")
173
+
174
+ # Diagnostic screenshots saved to: .cursorflow/artifacts/diagnostics/
175
+ ```
176
+
177
+ ## ⚡ **Enhanced Browser Data Capture (v2.0.0)**
178
+
179
+ Every screenshot includes comprehensive browser intelligence:
180
+
181
+ ### **Playwright Trace Integration:**
182
+ - Full interaction traces for debugging
183
+ - Network request/response details
184
+ - Performance timeline data
185
+ - Console message correlation
186
+
187
+ ### **Network Intelligence:**
188
+ - Request/response headers and bodies
189
+ - Performance timing data
190
+ - Failed request analysis
191
+ - Resource loading optimization insights
192
+
193
+ ### **Console Intelligence:**
194
+ - JavaScript errors with stack traces
195
+ - Application logs and debug messages
196
+ - Performance warnings
197
+ - Framework-specific messages
198
+
199
+ ### **Usage Example:**
200
+ ```python
201
+ # Start session with trace recording
202
+ results = await flow.execute_and_collect(
203
+ actions=[
204
+ {"navigate": "/app"},
205
+ {"click": "#submit-form"},
206
+ {"screenshot": "result"}
207
+ ],
208
+ session_options={'start_trace': True}
209
+ )
210
+
211
+ # Access comprehensive data
212
+ screenshot_data = results['artifacts']['screenshots'][0]
213
+ print(f"Network requests: {len(screenshot_data['network_data']['requests'])}")
214
+ print(f"Console messages: {len(screenshot_data['console_data']['messages'])}")
215
+ print(f"Performance metrics: {screenshot_data['performance_data']}")
216
+
217
+ # Playwright trace available at: .cursorflow/artifacts/traces/session.zip
218
+ ```
219
+
220
+ ## 🚀 **CursorFlow CLI Usage (v2.0.0)**
221
+
222
+ ### **Basic Testing:**
95
223
  ```bash
96
- # Test with inline actions
224
+ # Test any URL with comprehensive data capture
225
+ cursorflow test --base-url http://localhost:3000 --path "/dashboard"
226
+
227
+ # Test with custom actions
97
228
  cursorflow test \
98
229
  --base-url http://localhost:3000 \
99
230
  --actions '[
@@ -102,26 +233,22 @@ cursorflow test \
102
233
  {"screenshot": "state"}
103
234
  ]'
104
235
 
105
- # Simple path test
106
- cursorflow test --base-url http://localhost:3000 --path "/dashboard"
236
+ # Results include:
237
+ # - Hot Reload Intelligence status
238
+ # - Advanced Element Intelligence (7 selector types)
239
+ # - Comprehensive Page Analysis (fonts, animations, resources)
240
+ # - Enhanced Error Context (smart deduplication)
241
+ # - Enhanced Browser Data (Playwright traces)
107
242
  ```
108
243
 
109
- ### Complex Tests
244
+ ### **Available CLI Commands:**
110
245
  ```bash
111
- # Create action file first
112
- cat > test-actions.json << 'EOF'
113
- [
114
- {"navigate": "/login"},
115
- {"fill": {"selector": "#username", "value": "test@example.com"}},
116
- {"fill": {"selector": "#password", "value": "testpass"}},
117
- {"click": "#login-button"},
118
- {"wait_for": ".dashboard"},
119
- {"screenshot": "logged-in"}
120
- ]
121
- EOF
122
-
123
- # Run test
124
- cursorflow test --base-url http://localhost:3000 --actions test-actions.json
246
+ cursorflow test # Execute comprehensive UI test
247
+ cursorflow compare-mockup # Visual mockup comparison
248
+ cursorflow iterate-mockup # Iterative mockup matching
249
+ cursorflow install-rules # Install Cursor AI rules
250
+ cursorflow update # Update CursorFlow and dependencies
251
+ cursorflow --help # Show all commands and options
125
252
  ```
126
253
 
127
254
  ## Available Actions
@@ -400,24 +527,33 @@ cursorflow install-rules
400
527
  cursorflow update
401
528
  ```
402
529
 
403
- ## 🎯 **CRITICAL REMINDERS FOR CURSOR AI**
530
+ ## 🎯 **CRITICAL REMINDERS FOR CURSOR AI (v2.0.0)**
404
531
 
405
- ### **🔥 PRIMARY WORKFLOW: Hot Reload CSS Iteration**
406
- - **ALWAYS use `css_iteration_persistent()` for CSS/UI work**
407
- - **3-5x faster than CLI** - enables rapid design exploration
408
- - **Preserves application state** - no lost context during iteration
409
- - **Auto-detects hot reload** - works with Webpack, Vite, Next.js, etc.
532
+ ### **🔥 PRIMARY WORKFLOW: Comprehensive Data Collection**
533
+ - **ALWAYS use CursorFlow for UI testing and debugging**
534
+ - **Every screenshot captures complete page intelligence**
535
+ - **Automatic framework detection and HMR integration**
536
+ - **Smart error context collection with deduplication**
410
537
 
411
538
  ### **Decision Framework:**
412
- - **User mentions CSS/styling/layout** → `css_iteration_persistent()`
413
- - **User wants UI improvements** → Persistent sessions with hot reload
414
- - **User asks to "test component"** → Hot reload CSS iteration
415
- - **User reports form/auth issues** → Traditional CLI testing
539
+ - **User mentions UI/CSS/layout** → Use CursorFlow CLI or Python API
540
+ - **User wants to test component** → Use comprehensive data capture
541
+ - **User reports errors/bugs** → Leverage enhanced error context
542
+ - **User needs element analysis** → Utilize 7 selector strategies
543
+ - **User works with dev server** → Benefit from HMR intelligence
416
544
 
417
545
  ### **Key Success Patterns:**
418
- 1. **Start persistent session** → Test multiple CSS approaches Continue session → Apply best result
419
- 2. **Monitor `hot_reload_used`**Expect 12+ iterations per minute when working
420
- 3. **Use session continuation** → Avoid page reloads → Maintain complex application state
421
- 4. **Apply recommended CSS** → Let CursorFlow identify target files → Implement changes
422
-
423
- Remember: **CursorFlow's persistent sessions with hot reload are 3-5x faster than traditional testing.** Always prioritize this workflow for CSS/UI development to maximize iteration speed and preserve application state.
546
+ 1. **Run CursorFlow test** → Analyze comprehensive dataMake informed decisions
547
+ 2. **Monitor HMR status** Leverage framework-specific optimizations
548
+ 3. **Use element intelligence** → Select optimal interaction strategies
549
+ 4. **Review error context** → Understand root causes with rich diagnostics
550
+ 5. **Apply trace analysis** → Debug complex interaction flows
551
+
552
+ ### **v2.0.0 Data Available in Every Test:**
553
+ - 🔥 **Hot Reload Intelligence**: Framework detection and HMR event monitoring
554
+ - 🧠 **Advanced Element Intelligence**: 7 selector types + accessibility analysis
555
+ - 📊 **Comprehensive Page Analysis**: Fonts, animations, resources, storage
556
+ - 🎯 **Enhanced Error Context**: Smart screenshot deduplication + diagnostics
557
+ - ⚡ **Enhanced Browser Data**: Playwright traces + network intelligence
558
+
559
+ Remember: **CursorFlow 2.0.0 provides complete page intelligence for AI-driven development.** Every test captures comprehensive data to enable informed decision-making and rapid iteration.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cursorflow"
7
- version = "2.0.0"
7
+ version = "2.0.1"
8
8
  description = "🔥 Complete page intelligence for AI-driven development with Hot Reload Intelligence - captures DOM, network, console, performance, HMR events, and comprehensive page analysis"
9
9
  authors = [
10
10
  {name = "GeekWarrior Development", email = "rbush@cooltheory.com"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes