daveloop 1.4.0__py3-none-any.whl → 1.5.1__py3-none-any.whl

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.
@@ -0,0 +1,403 @@
1
+ Metadata-Version: 2.4
2
+ Name: daveloop
3
+ Version: 1.5.1
4
+ Summary: Self-healing debug agent powered by Claude Code CLI
5
+ Home-page: https://github.com/davebruzil/DaveLoop
6
+ Author: Dave Bruzil
7
+ Keywords: debugging ai claude automation agent
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Debuggers
19
+ Classifier: Topic :: Software Development :: Quality Assurance
20
+ Requires-Python: >=3.7
21
+ Description-Content-Type: text/markdown
22
+ Provides-Extra: turbo
23
+ Requires-Dist: rich>=13.0; extra == "turbo"
24
+ Dynamic: author
25
+ Dynamic: classifier
26
+ Dynamic: description
27
+ Dynamic: description-content-type
28
+ Dynamic: home-page
29
+ Dynamic: keywords
30
+ Dynamic: provides-extra
31
+ Dynamic: requires-python
32
+ Dynamic: summary
33
+
34
+ # DaveLoop
35
+
36
+ <img width="842" height="258" alt="DaveLoop Banner" src="https://github.com/user-attachments/assets/97212a83-6eb9-43ed-95c7-ec236718ee16" />
37
+
38
+ ### The agent that doesn't quit until the job is done.
39
+
40
+ **DaveLoop** is a self-healing autonomous agent powered by LLM-driven iterative reasoning. It was designed for debugging. Then it started building features, writing test suites, fixing production workflows, and improving its own source code -- all without being asked.
41
+
42
+ You give it a problem. It reasons, hypothesizes, executes, verifies, and loops until the problem is gone. No hand-holding. No copy-pasting context between retries. No pressing "approve" every 10 seconds. It just works.
43
+
44
+ ```bash
45
+ pip install daveloop
46
+ ```
47
+
48
+ ---
49
+
50
+ ## What DaveLoop Has Actually Done
51
+
52
+ This isn't a toy demo. These are real, logged, verifiable results from DaveLoop running autonomously.
53
+
54
+ ### It Upgraded Itself
55
+
56
+ DaveLoop was given a feature request file and told to add capabilities to its own codebase. It read its own source code, understood the architecture, and implemented 4 major features:
57
+
58
+ - **TaskQueue** -- multi-bug sequential processing with status tracking
59
+ - **Session Memory** -- persistent history across runs via `.daveloop_history.json`
60
+ - **InputMonitor** -- real-time interrupt system (type `wait` mid-execution to redirect it)
61
+ - **Multi-task CLI** -- queue multiple bugs in one command
62
+
63
+ It verified the syntax, tested the integration, and resolved. One session. Its own codebase. No guidance.
64
+
65
+ ### It Built a Complete Mobile Test Suite From Scratch
66
+
67
+ Pointed at an Android Dog Dating app on an emulator, DaveLoop:
68
+
69
+ 1. Located and installed the APK autonomously
70
+ 2. Dumped the UI hierarchy with `uiautomator` to understand the screen layout
71
+ 3. Read the Kotlin source files to understand data models and navigation
72
+ 4. Discovered the Room DB seeds 10 mock dog profiles on fresh install
73
+ 5. **Wrote 3 comprehensive Maestro YAML test flows:**
74
+ - Swipe card functionality (left/right swipe with profile progression)
75
+ - Matches vs Chat screen separation (distinct bottom nav destinations)
76
+ - Chat recipient verification (message send and display)
77
+ 6. Ran all tests 3 consecutive times -- all passed
78
+
79
+ **One iteration. Zero human input. From APK to passing test suite.**
80
+
81
+ ### It Debugged a Production n8n Workflow
82
+
83
+ A WhatsApp webhook integration was returning 500 errors on every request. Hebrew and English messages both failing. DaveLoop:
84
+
85
+ - Traced the data flow through the entire n8n workflow JSON
86
+ - Found Bug #1: incorrect nested path `webhookData.data.messages` instead of `webhookData.data.messages.message`
87
+ - Found Bug #2: the `If2` node was reading from MongoDB output (`$json.body`) instead of referencing the webhook node directly
88
+ - Fixed both, preserving the Hebrew goodbye detection logic that was actually correct
89
+ - Generated a test script and deployment guide
90
+
91
+ Two bugs, both data structure traversal errors buried in a multi-node workflow. Found and fixed.
92
+
93
+ ### It Solved a Django ORM Bug in One Iteration
94
+
95
+ Running against [SWE-bench](https://www.swebench.com/), DaveLoop resolved `django__django-13321` -- a real bug from the Django issue tracker -- in a single iteration. 5 minutes from start to `[DAVELOOP:RESOLVED]`.
96
+
97
+ ```json
98
+ {
99
+ "instance_id": "django__django-13321",
100
+ "repo": "django/django",
101
+ "resolved": true,
102
+ "iterations": 1
103
+ }
104
+ ```
105
+
106
+ ### It Fixed a Bug in tqdm (47k+ GitHub Stars)
107
+
108
+ A `ZeroDivisionError` when `total=0`. DaveLoop explored the entire tqdm codebase, traced all division operations across multiple files, identified that `if total:` was treating `0` the same as `None`, and applied a targeted fix. One iteration.
109
+
110
+ ---
111
+
112
+ ## How It Works
113
+
114
+ ```
115
+ You describe the bug
116
+ |
117
+ v
118
+ DaveLoop injects a reasoning protocol into the LLM
119
+ |
120
+ v
121
+ The agent analyzes: KNOWN / UNKNOWN / HYPOTHESIS / NEXT ACTION
122
+ |
123
+ v
124
+ Executes the fix, runs verification
125
+ |
126
+ v
127
+ Not fixed? Loop again with full context (--continue)
128
+ |
129
+ v
130
+ Fixed? --> [DAVELOOP:RESOLVED]
131
+ Stuck? --> [DAVELOOP:BLOCKED] (documents what it tried)
132
+ ```
133
+
134
+ The key insight: even the best coding agents sometimes need multiple attempts for complex bugs. DaveLoop automates that retry loop with persistent context and structured reasoning, so each iteration builds on everything the agent already learned.
135
+
136
+ ---
137
+
138
+ ## The 4-Level Reasoning Protocol
139
+
140
+ ![Reasoning Example](https://github.com/user-attachments/assets/a1bbd83a-27f2-4543-9d48-ef089b3cbd75)
141
+
142
+ Every iteration, DaveLoop forces the agent to state:
143
+
144
+ | Level | Purpose |
145
+ |-------|---------|
146
+ | **KNOWN** | What facts have been established so far |
147
+ | **UNKNOWN** | What gaps remain |
148
+ | **HYPOTHESIS** | A testable guess about the root cause |
149
+ | **NEXT ACTION** | The concrete step to test that hypothesis |
150
+
151
+ This prevents random shotgun debugging. Each iteration's KNOWN section grows. The UNKNOWN list shrinks or shifts focus. You can watch the agent systematically close in on the bug in real time.
152
+
153
+ ---
154
+
155
+ ## Install
156
+
157
+ ```bash
158
+ pip install daveloop
159
+ ```
160
+
161
+ Zero external dependencies. Python 3.7+ and an LLM CLI agent.
162
+
163
+ ---
164
+
165
+ ## Use It Straight From Chat
166
+
167
+ After installing, paste the following block into your global agent instructions file (the markdown file your coding agent reads for project instructions). This lets you trigger DaveLoop by just talking naturally in chat -- no terminal switching needed.
168
+
169
+ <details>
170
+ <summary><b>Click to expand -- copy this into your global agent instructions file</b></summary>
171
+
172
+ ```markdown
173
+ ## DaveLoop - Self-Healing Debug Agent
174
+
175
+ DaveLoop is a Python wrapper that runs the coding agent in a loop until bugs are resolved. It keeps iterating until the issue is fixed.
176
+
177
+ ### Basic Commands
178
+
179
+ \`\`\`bash
180
+ # Basic usage - describe the bug directly
181
+ daveloop "your bug description here"
182
+
183
+ # Specify working directory
184
+ daveloop -d /path/to/project "bug description"
185
+
186
+ # Set max iterations (default is unlimited until resolved)
187
+ daveloop -m 10 "bug description"
188
+
189
+ # Read bug description from a file
190
+ daveloop -f error.txt
191
+
192
+ # Verbose output for debugging
193
+ daveloop -v "bug description"
194
+ \`\`\`
195
+
196
+ ### Options
197
+
198
+ | Flag | Description |
199
+ |------|-------------|
200
+ | `-h, --help` | Show help message |
201
+ | `-f, --file FILE` | Read bug description from file |
202
+ | `-d, --dir DIR` | Working directory |
203
+ | `-m, --max-iterations N` | Maximum iterations before stopping |
204
+ | `-v, --verbose` | Enable verbose output |
205
+
206
+ ### How It Works
207
+
208
+ 1. DaveLoop sends your bug description to the coding agent
209
+ 2. The agent analyzes, hypothesizes, and attempts fixes
210
+ 3. Runs verification (build/tests)
211
+ 4. If not resolved, DaveLoop loops back with updated context
212
+ 5. Continues until `[DAVELOOP:RESOLVED]` or max iterations reached
213
+
214
+ ### Giving DaveLoop a Command via Chat
215
+
216
+ When the user says "daveloop this" or "run daveloop" with a task, run:
217
+
218
+ \`\`\`bash
219
+ daveloop "the bug description here"
220
+
221
+ # Or with a specific project directory:
222
+ daveloop -d /path/to/project "the bug description"
223
+ \`\`\`
224
+ ```
225
+
226
+ </details>
227
+
228
+ Once that's in your agent instructions file, just say:
229
+
230
+ ```
231
+ daveloop this: "mongodb connection error in the lookup node"
232
+ ```
233
+
234
+ or
235
+
236
+ ```
237
+ run daveloop on the jwt validation bug
238
+ ```
239
+
240
+ The agent picks it up and runs DaveLoop automatically. No special syntax.
241
+
242
+ ---
243
+
244
+ ## Usage
245
+
246
+ ### Give it a bug
247
+
248
+ ```bash
249
+ daveloop "routes/order.ts has a race condition on wallet balance. two concurrent orders overdraw the account"
250
+ ```
251
+
252
+ ### Give it a file
253
+
254
+ ```bash
255
+ daveloop --file bug-report.txt
256
+ ```
257
+
258
+ ### Queue multiple bugs
259
+
260
+ ```bash
261
+ daveloop "fix the login crash" "fix payment validation" "add dark mode toggle"
262
+ ```
263
+
264
+ ### Point it at a project
265
+
266
+ ```bash
267
+ daveloop --dir /path/to/project "the bug description"
268
+ ```
269
+
270
+ ### Limit iterations
271
+
272
+ ```bash
273
+ daveloop --max-iterations 10 "fix the bug"
274
+ ```
275
+
276
+ ### Mobile testing mode (Maestro)
277
+
278
+ ```bash
279
+ daveloop --maestro "write UI tests for the onboarding flow"
280
+ ```
281
+
282
+ ### Web testing mode (Playwright)
283
+
284
+ ```bash
285
+ daveloop --web "test the checkout flow end to end"
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Interactive Controls
291
+
292
+ DaveLoop doesn't lock you out. While it's running, type:
293
+
294
+ | Command | What happens |
295
+ |---------|-------------|
296
+ | `wait` / `pause` | Stops the current iteration. You type a correction. It resumes with your new context. |
297
+ | `add` | Queue a new bug without stopping the current one |
298
+ | `done` | Graceful exit, saves history |
299
+ | `Ctrl+C` | Kill it |
300
+
301
+ The `wait` command is the standout feature. When you see the agent going down the wrong path, type `wait`, tell it what you know, and it course-corrects with full context preserved.
302
+
303
+ ---
304
+
305
+ ## Three Modes
306
+
307
+ ### Standard Mode (default)
308
+ Classic iterative debugging. Reads code, makes hypotheses, applies fixes, verifies.
309
+
310
+ ### Maestro Mode (`--maestro`)
311
+ Autonomous mobile UI testing. Auto-detects devices/emulators, installs APKs, explores UI hierarchy, writes Maestro YAML test flows, and verifies with 3 consecutive passes.
312
+
313
+ ### Web Mode (`--web`)
314
+ Playwright-based web testing. Detects your framework (React, Next.js, Vue, etc.), installs Playwright, starts dev servers, and tests with human-like interactions -- real mouse movements, drags, hovers, not just DOM manipulation.
315
+
316
+ ---
317
+
318
+ ## Session Memory
319
+
320
+ DaveLoop remembers. It saves a history of past sessions in `.daveloop_history.json` and loads that context into future runs. If it fixed a similar bug before, it knows.
321
+
322
+ ---
323
+
324
+ ## SWE-bench Integration
325
+
326
+ Test DaveLoop against real-world bugs from open source projects:
327
+
328
+ ```bash
329
+ daveloop-swebench --file django_hash_task.json --max-iterations 15
330
+ ```
331
+
332
+ Pre-configured tasks from Django, Pytest, SymPy, and Sklearn included.
333
+
334
+ ---
335
+
336
+ ## Battle-Tested On
337
+
338
+ | Domain | What it solved |
339
+ |--------|---------------|
340
+ | **Security** | Juice-Shop race conditions, NoSQL injection, ReDoS, path traversal |
341
+ | **Backend** | Django ORM bugs, session handling crashes |
342
+ | **Workflow Automation** | n8n webhook failures, MongoDB connection errors, multi-node data flow bugs |
343
+ | **Testing Frameworks** | Pytest AST rewriting issues, Material-UI flaky visual regression tests |
344
+ | **Libraries** | tqdm ZeroDivisionError, SymPy C-code generation |
345
+ | **Mobile** | Android Maestro test suite generation from scratch |
346
+ | **Self** | Added features to its own codebase autonomously |
347
+
348
+ ---
349
+
350
+ ## Writing Good Bug Descriptions
351
+
352
+ More context = fewer iterations.
353
+
354
+ **Vague (works, but slow):**
355
+ ```bash
356
+ daveloop "fix the bug"
357
+ ```
358
+
359
+ **Specific (fast):**
360
+ ```bash
361
+ daveloop "RACE CONDITION: routes/order.ts lines 139-148. Balance check at 141 before decrement at 142. Two concurrent $100 orders both pass and overdraw to -$100. Need atomic check+decrement."
362
+ ```
363
+
364
+ Include: bug type, file location, reproduction steps, root cause if known, fix direction if you have one.
365
+
366
+ ---
367
+
368
+ ## Logs
369
+
370
+ Every session is fully logged:
371
+
372
+ ```
373
+ logs/
374
+ 20260131_142120_iteration_01.log <- what it tried
375
+ 20260131_142120_iteration_02.log <- what it tried next
376
+ 20260131_142120_summary.md <- overview
377
+ ```
378
+
379
+ Every reasoning block, every file read, every edit, every command. Full audit trail.
380
+
381
+ ---
382
+
383
+ ## Why DaveLoop Exists
384
+
385
+ Some bugs don't fall in one shot. Race conditions. Multi-file refactors. Subtle logic errors buried in nested data structures. Production workflows with 12 interconnected nodes.
386
+
387
+ DaveLoop wraps your coding agent in a persistence layer -- structured reasoning, iterative context, session memory, and the stubbornness to keep going until the job is done or honestly admit it's stuck.
388
+
389
+ It started as a debug loop. It turned out to be something more.
390
+
391
+ ---
392
+
393
+ ## License
394
+
395
+ MIT
396
+
397
+ ---
398
+
399
+ **Built by [Dave Bruzil](https://github.com/davebruzil)**
400
+
401
+ ```bash
402
+ pip install daveloop
403
+ ```
@@ -0,0 +1,7 @@
1
+ daveloop.py,sha256=SrIlZMZpRgYw8dPEequNoWbZ2hMyip0wLMNFVzVskcQ,85885
2
+ daveloop_swebench.py,sha256=iD9AU3XRiMQpt7TknFNlvnmPCNp64V-JaTfqTFgsGBM,15996
3
+ daveloop-1.5.1.dist-info/METADATA,sha256=c6DPGhLDRu5ODmf7iu2bSyMsqCQDk0SdOVjUQKrxRxQ,13113
4
+ daveloop-1.5.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
+ daveloop-1.5.1.dist-info/entry_points.txt,sha256=QcFAZgFrDfPtIikNQb7eW9DxOpBK7T-qWrKqbGAS9Ww,86
6
+ daveloop-1.5.1.dist-info/top_level.txt,sha256=36DiYt70m4DIK8t7IhV_y6hAzUIyeb5-qDUf3-gbDdg,27
7
+ daveloop-1.5.1.dist-info/RECORD,,