cursorflow 2.7.2__tar.gz → 2.7.4__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 (55) hide show
  1. {cursorflow-2.7.2 → cursorflow-2.7.4}/PKG-INFO +72 -1
  2. {cursorflow-2.7.2 → cursorflow-2.7.4}/README.md +71 -0
  3. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/cli.py +0 -3
  4. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/rules/cursorflow-usage.mdc +109 -0
  5. {cursorflow-2.7.2 → cursorflow-2.7.4}/docs/user/USAGE_GUIDE.md +96 -0
  6. {cursorflow-2.7.2 → cursorflow-2.7.4}/pyproject.toml +1 -1
  7. {cursorflow-2.7.2 → cursorflow-2.7.4}/LICENSE +0 -0
  8. {cursorflow-2.7.2 → cursorflow-2.7.4}/MANIFEST.in +0 -0
  9. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/__init__.py +0 -0
  10. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/auto_init.py +0 -0
  11. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/auto_updater.py +0 -0
  12. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/action_validator.py +0 -0
  13. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/agent.py +0 -0
  14. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/auth_handler.py +0 -0
  15. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/browser_controller.py +0 -0
  16. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/browser_engine.py +0 -0
  17. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/config_validator.py +0 -0
  18. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/css_iterator.py +0 -0
  19. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/cursor_integration.py +0 -0
  20. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/cursorflow.py +0 -0
  21. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/data_presenter.py +0 -0
  22. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/error_context_collector.py +0 -0
  23. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/error_correlator.py +0 -0
  24. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/event_correlator.py +0 -0
  25. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/file_change_monitor.py +0 -0
  26. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/hmr_detector.py +0 -0
  27. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/json_utils.py +0 -0
  28. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/log_collector.py +0 -0
  29. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/log_monitor.py +0 -0
  30. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/mockup_comparator.py +0 -0
  31. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/output_manager.py +0 -0
  32. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/persistent_session.py +0 -0
  33. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/query_engine.py +0 -0
  34. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/report_generator.py +0 -0
  35. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/core/trace_manager.py +0 -0
  36. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/install_cursorflow_rules.py +0 -0
  37. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/log_sources/local_file.py +0 -0
  38. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/log_sources/ssh_remote.py +0 -0
  39. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/post_install.py +0 -0
  40. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/rules/__init__.py +0 -0
  41. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/rules/cursorflow-installation.mdc +0 -0
  42. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow/updater.py +0 -0
  43. {cursorflow-2.7.2 → cursorflow-2.7.4}/cursorflow.egg-info/SOURCES.txt +0 -0
  44. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/comprehensive_screenshot_example.py +0 -0
  45. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/element_inspection_example.py +0 -0
  46. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/element_measurement_example.py +0 -0
  47. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/enhanced_screenshot_example.py +0 -0
  48. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/hot_reload_css_iteration.py +0 -0
  49. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/mockup_comparison_example.py +0 -0
  50. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/opensas_example.py +0 -0
  51. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/react_example.py +0 -0
  52. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/responsive_testing_example.py +0 -0
  53. {cursorflow-2.7.2 → cursorflow-2.7.4}/examples/v2_comprehensive_demo.py +0 -0
  54. {cursorflow-2.7.2 → cursorflow-2.7.4}/setup.cfg +0 -0
  55. {cursorflow-2.7.2 → cursorflow-2.7.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.7.2
3
+ Version: 2.7.4
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
@@ -256,6 +256,77 @@ cursorflow query session_A --compare-with session_B --errors
256
256
 
257
257
  ---
258
258
 
259
+ ## 🤖 **For AI Agents: Start Here**
260
+
261
+ ### 3-Second Decision Guide
262
+
263
+ | User Says | Command | What You Get |
264
+ |-----------|---------|--------------|
265
+ | "Debug this error" | `cursorflow test` → `query session_X --errors --with-network` | Error + network + server logs correlated |
266
+ | "Fix this CSS" | Python: `css_iteration_persistent()` | Visual comparison of CSS variations |
267
+ | "Why is this slow?" | `query session_X --network --over 500ms` | Slow requests identified |
268
+ | "Test login flow" | `cursorflow test --actions '[...]'` | Complete flow with server correlation |
269
+
270
+ ### Complete Debugging Example
271
+
272
+ ```bash
273
+ # User: "There's a JavaScript error on the dashboard"
274
+
275
+ # 1. Capture (5 seconds)
276
+ cursorflow test --base-url http://localhost:3000 --path /dashboard
277
+
278
+ # 2. Diagnose (10 seconds)
279
+ cat .cursorflow/artifacts/sessions/session_XXX/data_digest.md
280
+ cursorflow query session_XXX --errors
281
+
282
+ # 3. Get context (5 seconds)
283
+ cursorflow query session_XXX --context-for-error 0 --export markdown
284
+
285
+ # 4. Fix based on correlated data
286
+ # (You now have: error message, stack trace, network requests, server logs)
287
+ ```
288
+
289
+ **Total time: 20 seconds from problem to actionable diagnosis**
290
+
291
+ ### When User Mentions...
292
+
293
+ **"Error", "Broken", "Not working"**
294
+ 1. `cursorflow test` to capture
295
+ 2. `query --errors` to identify
296
+ 3. `query --context-for-error` to understand
297
+ 4. Fix based on correlated data
298
+
299
+ **"Slow", "Performance", "Takes forever"**
300
+ 1. `cursorflow test` to baseline
301
+ 2. `query --network --over 500ms` to find bottlenecks
302
+ 3. `query --performance` for metrics
303
+ 4. Optimize slow requests
304
+
305
+ **"CSS", "Styling", "Layout", "Spacing"**
306
+ 1. Python API: `css_iteration_persistent()`
307
+ 2. Test 2-3 CSS approaches
308
+ 3. Compare screenshots
309
+ 4. Apply best result
310
+
311
+ **"Login", "Auth", "Session"**
312
+ 1. `cursorflow test --actions '[...]'` with login flow
313
+ 2. `--save-session` to preserve auth
314
+ 3. `--use-session` for subsequent tests
315
+ 4. Check auth errors with `query --errors --contains "auth"`
316
+
317
+ **"Responsive", "Mobile", "Tablet"**
318
+ 1. `cursorflow test --responsive`
319
+ 2. `query --responsive --viewport mobile`
320
+ 3. Compare viewport results
321
+ 4. Fix mobile-specific issues
322
+
323
+ **"Compare", "Regression", "What changed"**
324
+ 1. `query session_before --compare-with session_after`
325
+ 2. Focus on `new_errors` and `timing_changes`
326
+ 3. Investigate specific regressions
327
+
328
+ ---
329
+
259
330
  ## 🚀 Quick Start
260
331
 
261
332
  ### Step 1: Install CursorFlow Package
@@ -211,6 +211,77 @@ cursorflow query session_A --compare-with session_B --errors
211
211
 
212
212
  ---
213
213
 
214
+ ## 🤖 **For AI Agents: Start Here**
215
+
216
+ ### 3-Second Decision Guide
217
+
218
+ | User Says | Command | What You Get |
219
+ |-----------|---------|--------------|
220
+ | "Debug this error" | `cursorflow test` → `query session_X --errors --with-network` | Error + network + server logs correlated |
221
+ | "Fix this CSS" | Python: `css_iteration_persistent()` | Visual comparison of CSS variations |
222
+ | "Why is this slow?" | `query session_X --network --over 500ms` | Slow requests identified |
223
+ | "Test login flow" | `cursorflow test --actions '[...]'` | Complete flow with server correlation |
224
+
225
+ ### Complete Debugging Example
226
+
227
+ ```bash
228
+ # User: "There's a JavaScript error on the dashboard"
229
+
230
+ # 1. Capture (5 seconds)
231
+ cursorflow test --base-url http://localhost:3000 --path /dashboard
232
+
233
+ # 2. Diagnose (10 seconds)
234
+ cat .cursorflow/artifacts/sessions/session_XXX/data_digest.md
235
+ cursorflow query session_XXX --errors
236
+
237
+ # 3. Get context (5 seconds)
238
+ cursorflow query session_XXX --context-for-error 0 --export markdown
239
+
240
+ # 4. Fix based on correlated data
241
+ # (You now have: error message, stack trace, network requests, server logs)
242
+ ```
243
+
244
+ **Total time: 20 seconds from problem to actionable diagnosis**
245
+
246
+ ### When User Mentions...
247
+
248
+ **"Error", "Broken", "Not working"**
249
+ 1. `cursorflow test` to capture
250
+ 2. `query --errors` to identify
251
+ 3. `query --context-for-error` to understand
252
+ 4. Fix based on correlated data
253
+
254
+ **"Slow", "Performance", "Takes forever"**
255
+ 1. `cursorflow test` to baseline
256
+ 2. `query --network --over 500ms` to find bottlenecks
257
+ 3. `query --performance` for metrics
258
+ 4. Optimize slow requests
259
+
260
+ **"CSS", "Styling", "Layout", "Spacing"**
261
+ 1. Python API: `css_iteration_persistent()`
262
+ 2. Test 2-3 CSS approaches
263
+ 3. Compare screenshots
264
+ 4. Apply best result
265
+
266
+ **"Login", "Auth", "Session"**
267
+ 1. `cursorflow test --actions '[...]'` with login flow
268
+ 2. `--save-session` to preserve auth
269
+ 3. `--use-session` for subsequent tests
270
+ 4. Check auth errors with `query --errors --contains "auth"`
271
+
272
+ **"Responsive", "Mobile", "Tablet"**
273
+ 1. `cursorflow test --responsive`
274
+ 2. `query --responsive --viewport mobile`
275
+ 3. Compare viewport results
276
+ 4. Fix mobile-specific issues
277
+
278
+ **"Compare", "Regression", "What changed"**
279
+ 1. `query session_before --compare-with session_after`
280
+ 2. Focus on `new_errors` and `timing_changes`
281
+ 3. Investigate specific regressions
282
+
283
+ ---
284
+
214
285
  ## 🚀 Quick Start
215
286
 
216
287
  ### Step 1: Install CursorFlow Package
@@ -337,9 +337,6 @@ def test(base_url, path, actions, output, logs, config, verbose, headless, timeo
337
337
  with open(last_test_file, 'w') as f:
338
338
  json.dump(last_test_data, f, indent=2, default=str)
339
339
 
340
- console.print(f"💾 Full results saved to: [cyan]{output}[/cyan]")
341
- console.print(f"📁 Artifacts stored in: [cyan].cursorflow/artifacts/[/cyan]")
342
-
343
340
  # Phase 3.4: Auto-open trace
344
341
  if open_trace and 'artifacts' in results and 'trace' in results['artifacts']:
345
342
  trace_path = results['artifacts']['trace']
@@ -6,6 +6,115 @@ alwaysApply: true
6
6
 
7
7
  # CursorFlow Usage Rules for Cursor AI
8
8
 
9
+ ## 🎯 **AI AGENT QUICK START - Read This First**
10
+
11
+ ### Instant Decision Tree
12
+
13
+ **User reports error?**
14
+ → `cursorflow test --base-url URL --path /page`
15
+ → `cat .cursorflow/artifacts/sessions/session_XXX/data_digest.md`
16
+ → `cursorflow query session_XXX --errors --with-server-logs --with-network`
17
+ → Analyze correlated data, make fix
18
+
19
+ **User wants CSS/styling change?**
20
+ → Python API: `css_iteration_persistent()`
21
+ → Test 2-3 CSS variations
22
+ → Apply best result
23
+
24
+ **User reports slow page?**
25
+ → `cursorflow query session_XXX --network --over 500ms`
26
+ → `cursorflow query session_XXX --performance`
27
+ → Identify bottlenecks
28
+
29
+ **User debugging network failure?**
30
+ → `cursorflow query session_XXX --network --failed --with-errors`
31
+ → See errors that happened around network failure
32
+ → `cursorflow query session_XXX --server-logs --pattern "api"`
33
+
34
+ ---
35
+
36
+ ## 🔍 **Common Debugging Patterns - Copy These**
37
+
38
+ ### Pattern 1: "Page has JavaScript error"
39
+ ```bash
40
+ # 1. Capture current state
41
+ cursorflow test --base-url http://localhost:3000 --path /page
42
+
43
+ # 2. Get error context
44
+ cursorflow query session_XXX --errors --export markdown
45
+
46
+ # 3. Find what triggered it
47
+ cursorflow query session_XXX --context-for-error 0 --window 10
48
+
49
+ # 4. Check server logs
50
+ cursorflow query session_XXX --server-logs --level error
51
+ ```
52
+
53
+ ### Pattern 2: "API call failing"
54
+ ```bash
55
+ # 1. Find failed request
56
+ cursorflow query session_XXX --network --failed
57
+
58
+ # 2. Get full context
59
+ cursorflow query session_XXX --network --url-contains "/api/" --with-errors
60
+
61
+ # 3. Check server side
62
+ cursorflow query session_XXX --server-logs --pattern "api" --level error
63
+ ```
64
+
65
+ ### Pattern 3: "Feature broken after deployment"
66
+ ```bash
67
+ # 1. Test current version
68
+ cursorflow test --base-url https://staging.com --path /feature
69
+
70
+ # 2. Compare with baseline
71
+ cursorflow query session_new --compare-with session_baseline --errors
72
+ cursorflow query session_new --compare-with session_baseline --network
73
+
74
+ # 3. Identify regressions
75
+ # Shows: new_errors, fixed_errors, timing_changes
76
+ ```
77
+
78
+ ### Pattern 4: "Element not visible/clickable"
79
+ ```bash
80
+ # 1. Inspect element
81
+ cursorflow inspect --base-url URL --path /page --selector ".element"
82
+
83
+ # 2. Query DOM
84
+ cursorflow query session_XXX --dom --selector ".element"
85
+
86
+ # 3. Check if hidden
87
+ cursorflow query session_XXX --dom --visible
88
+ ```
89
+
90
+ ### Pattern 5: "Slow page load"
91
+ ```bash
92
+ # 1. Find slow requests
93
+ cursorflow query session_XXX --network --over 1000ms
94
+
95
+ # 2. Group by URL
96
+ cursorflow query session_XXX --group-by-url "/api/slow"
97
+
98
+ # 3. Check performance
99
+ cursorflow query session_XXX --performance
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 💡 **What Each Query Reveals - AI Agent Guide**
105
+
106
+ **`--errors`** → Error message, source file, line number, stack trace
107
+ **`--errors --with-network`** → Errors + network requests within ±5s (find API failures)
108
+ **`--errors --with-server-logs`** → Errors + backend logs (complete picture)
109
+ **`--network --failed`** → All 4xx/5xx responses with headers and timing
110
+ **`--network --over 500ms`** → Slow requests (bottleneck identification)
111
+ **`--server-logs --level error`** → Backend errors with timestamps
112
+ **`--context-for-error 0`** → Everything within ±5s of error (deep debugging)
113
+ **`--group-by-url "/api/X"`** → All data for specific endpoint
114
+ **`session_A --compare-with session_B`** → New/fixed errors, timing changes
115
+
116
+ ---
117
+
9
118
  ## 🔥 **CursorFlow: AI-Native Testing with Optimized Output**
10
119
 
11
120
  **CursorFlow v2.7.0 provides comprehensive data collection + AI-optimized output:**
@@ -197,6 +197,102 @@ cursorflow query session_A --compare-with session_B --network
197
197
 
198
198
  ---
199
199
 
200
+ ## 📖 **Query Cookbook - Real-World Scenarios**
201
+
202
+ ### Scenario 1: Finding the Root Cause of an Error
203
+
204
+ ```bash
205
+ # You have an error, need to understand what caused it
206
+
207
+ # Step 1: Get the error details
208
+ cursorflow query session_XXX --errors
209
+ # Returns: Error message, source file, line number
210
+
211
+ # Step 2: Get full context (what happened around it)
212
+ cursorflow query session_XXX --context-for-error 0 --window 10
213
+ # Returns: Network requests, console logs, server logs ±10s
214
+
215
+ # Step 3: Check if network failure caused it
216
+ cursorflow query session_XXX --errors --with-network
217
+ # Returns: Errors with related network requests
218
+
219
+ # Step 4: Export for documentation
220
+ cursorflow query session_XXX --context-for-error 0 --export markdown > error_report.md
221
+ ```
222
+
223
+ ### Scenario 2: Debugging Slow Performance
224
+
225
+ ```bash
226
+ # User reports "page is slow"
227
+
228
+ # Step 1: Find slow network requests
229
+ cursorflow query session_XXX --network --over 1000ms
230
+
231
+ # Step 2: Group by API endpoint
232
+ cursorflow query session_XXX --group-by-url "/api/data"
233
+ # Returns: All requests to that endpoint + related errors
234
+
235
+ # Step 3: Check server side
236
+ cursorflow query session_XXX --server-logs --pattern "slow query"
237
+
238
+ # Step 4: Compare with fast version
239
+ cursorflow query session_slow --compare-with session_fast --network
240
+ # Returns: timing_changes showing which requests got slower
241
+ ```
242
+
243
+ ### Scenario 3: Regression Detection
244
+
245
+ ```bash
246
+ # Feature worked yesterday, broken today
247
+
248
+ # Step 1: Compare sessions
249
+ cursorflow query session_today --compare-with session_yesterday --errors
250
+ # Returns: new_errors, fixed_errors, frequency_changes
251
+
252
+ # Step 2: Check network changes
253
+ cursorflow query session_today --compare-with session_yesterday --network
254
+ # Returns: new_urls, removed_urls, status_changes
255
+
256
+ # Step 3: Find specific regression
257
+ cursorflow query session_today --errors --from-file "feature.js"
258
+ ```
259
+
260
+ ### Scenario 4: API Debugging
261
+
262
+ ```bash
263
+ # API endpoint returning errors
264
+
265
+ # Step 1: Find all requests to endpoint
266
+ cursorflow query session_XXX --network --url-contains "/api/users"
267
+
268
+ # Step 2: Find failed ones
269
+ cursorflow query session_XXX --network --url-contains "/api/users" --status 4xx,5xx
270
+
271
+ # Step 3: Get errors that happened at same time
272
+ cursorflow query session_XXX --network --failed --with-errors
273
+
274
+ # Step 4: Check server logs
275
+ cursorflow query session_XXX --server-logs --pattern "api/users"
276
+ ```
277
+
278
+ ### Scenario 5: Complete Frontend + Backend Correlation
279
+
280
+ ```bash
281
+ # Complex issue needs full picture
282
+
283
+ # Step 1: Get error with all related data
284
+ cursorflow query session_XXX --context-for-error 0 --window 10
285
+ # Returns: error, network, console, server logs, timeline
286
+
287
+ # Step 2: Export as markdown report
288
+ cursorflow query session_XXX --context-for-error 0 --export markdown > investigation.md
289
+
290
+ # Step 3: Share with team or use for documentation
291
+ # investigation.md has complete formatted context
292
+ ```
293
+
294
+ ---
295
+
200
296
  ## 📊 **Server Log Configuration**
201
297
 
202
298
  CursorFlow can monitor server logs from multiple sources during testing:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cursorflow"
7
- version = "2.7.2"
7
+ version = "2.7.4"
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