daveloop 1.4.0__tar.gz → 1.5.0__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.
@@ -0,0 +1,392 @@
1
+ Metadata-Version: 2.1
2
+ Name: daveloop
3
+ Version: 1.5.0
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
+
23
+ # DaveLoop
24
+
25
+ <img width="842" height="258" alt="DaveLoop Banner" src="https://github.com/user-attachments/assets/97212a83-6eb9-43ed-95c7-ec236718ee16" />
26
+
27
+ ### The agent that doesn't quit until the job is done.
28
+
29
+ **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.
30
+
31
+ 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.
32
+
33
+ ```bash
34
+ pip install daveloop
35
+ ```
36
+
37
+ ---
38
+
39
+ ## What DaveLoop Has Actually Done
40
+
41
+ This isn't a toy demo. These are real, logged, verifiable results from DaveLoop running autonomously.
42
+
43
+ ### It Upgraded Itself
44
+
45
+ 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:
46
+
47
+ - **TaskQueue** -- multi-bug sequential processing with status tracking
48
+ - **Session Memory** -- persistent history across runs via `.daveloop_history.json`
49
+ - **InputMonitor** -- real-time interrupt system (type `wait` mid-execution to redirect it)
50
+ - **Multi-task CLI** -- queue multiple bugs in one command
51
+
52
+ It verified the syntax, tested the integration, and resolved. One session. Its own codebase. No guidance.
53
+
54
+ ### It Built a Complete Mobile Test Suite From Scratch
55
+
56
+ Pointed at an Android Dog Dating app on an emulator, DaveLoop:
57
+
58
+ 1. Located and installed the APK autonomously
59
+ 2. Dumped the UI hierarchy with `uiautomator` to understand the screen layout
60
+ 3. Read the Kotlin source files to understand data models and navigation
61
+ 4. Discovered the Room DB seeds 10 mock dog profiles on fresh install
62
+ 5. **Wrote 3 comprehensive Maestro YAML test flows:**
63
+ - Swipe card functionality (left/right swipe with profile progression)
64
+ - Matches vs Chat screen separation (distinct bottom nav destinations)
65
+ - Chat recipient verification (message send and display)
66
+ 6. Ran all tests 3 consecutive times -- all passed
67
+
68
+ **One iteration. Zero human input. From APK to passing test suite.**
69
+
70
+ ### It Debugged a Production n8n Workflow
71
+
72
+ A WhatsApp webhook integration was returning 500 errors on every request. Hebrew and English messages both failing. DaveLoop:
73
+
74
+ - Traced the data flow through the entire n8n workflow JSON
75
+ - Found Bug #1: incorrect nested path `webhookData.data.messages` instead of `webhookData.data.messages.message`
76
+ - Found Bug #2: the `If2` node was reading from MongoDB output (`$json.body`) instead of referencing the webhook node directly
77
+ - Fixed both, preserving the Hebrew goodbye detection logic that was actually correct
78
+ - Generated a test script and deployment guide
79
+
80
+ Two bugs, both data structure traversal errors buried in a multi-node workflow. Found and fixed.
81
+
82
+ ### It Solved a Django ORM Bug in One Iteration
83
+
84
+ 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]`.
85
+
86
+ ```json
87
+ {
88
+ "instance_id": "django__django-13321",
89
+ "repo": "django/django",
90
+ "resolved": true,
91
+ "iterations": 1
92
+ }
93
+ ```
94
+
95
+ ### It Fixed a Bug in tqdm (47k+ GitHub Stars)
96
+
97
+ 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.
98
+
99
+ ---
100
+
101
+ ## How It Works
102
+
103
+ ```
104
+ You describe the bug
105
+ |
106
+ v
107
+ DaveLoop injects a reasoning protocol into the LLM
108
+ |
109
+ v
110
+ The agent analyzes: KNOWN / UNKNOWN / HYPOTHESIS / NEXT ACTION
111
+ |
112
+ v
113
+ Executes the fix, runs verification
114
+ |
115
+ v
116
+ Not fixed? Loop again with full context (--continue)
117
+ |
118
+ v
119
+ Fixed? --> [DAVELOOP:RESOLVED]
120
+ Stuck? --> [DAVELOOP:BLOCKED] (documents what it tried)
121
+ ```
122
+
123
+ 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.
124
+
125
+ ---
126
+
127
+ ## The 4-Level Reasoning Protocol
128
+
129
+ ![Reasoning Example](https://github.com/user-attachments/assets/a1bbd83a-27f2-4543-9d48-ef089b3cbd75)
130
+
131
+ Every iteration, DaveLoop forces the agent to state:
132
+
133
+ | Level | Purpose |
134
+ |-------|---------|
135
+ | **KNOWN** | What facts have been established so far |
136
+ | **UNKNOWN** | What gaps remain |
137
+ | **HYPOTHESIS** | A testable guess about the root cause |
138
+ | **NEXT ACTION** | The concrete step to test that hypothesis |
139
+
140
+ 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.
141
+
142
+ ---
143
+
144
+ ## Install
145
+
146
+ ```bash
147
+ pip install daveloop
148
+ ```
149
+
150
+ Zero external dependencies. Python 3.7+ and an LLM CLI agent.
151
+
152
+ ---
153
+
154
+ ## Use It Straight From Chat
155
+
156
+ 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.
157
+
158
+ <details>
159
+ <summary><b>Click to expand -- copy this into your global agent instructions file</b></summary>
160
+
161
+ ```markdown
162
+ ## DaveLoop - Self-Healing Debug Agent
163
+
164
+ 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.
165
+
166
+ ### Basic Commands
167
+
168
+ \`\`\`bash
169
+ # Basic usage - describe the bug directly
170
+ daveloop "your bug description here"
171
+
172
+ # Specify working directory
173
+ daveloop -d /path/to/project "bug description"
174
+
175
+ # Set max iterations (default is unlimited until resolved)
176
+ daveloop -m 10 "bug description"
177
+
178
+ # Read bug description from a file
179
+ daveloop -f error.txt
180
+
181
+ # Verbose output for debugging
182
+ daveloop -v "bug description"
183
+ \`\`\`
184
+
185
+ ### Options
186
+
187
+ | Flag | Description |
188
+ |------|-------------|
189
+ | `-h, --help` | Show help message |
190
+ | `-f, --file FILE` | Read bug description from file |
191
+ | `-d, --dir DIR` | Working directory |
192
+ | `-m, --max-iterations N` | Maximum iterations before stopping |
193
+ | `-v, --verbose` | Enable verbose output |
194
+
195
+ ### How It Works
196
+
197
+ 1. DaveLoop sends your bug description to the coding agent
198
+ 2. The agent analyzes, hypothesizes, and attempts fixes
199
+ 3. Runs verification (build/tests)
200
+ 4. If not resolved, DaveLoop loops back with updated context
201
+ 5. Continues until `[DAVELOOP:RESOLVED]` or max iterations reached
202
+
203
+ ### Giving DaveLoop a Command via Chat
204
+
205
+ When the user says "daveloop this" or "run daveloop" with a task, run:
206
+
207
+ \`\`\`bash
208
+ daveloop "the bug description here"
209
+
210
+ # Or with a specific project directory:
211
+ daveloop -d /path/to/project "the bug description"
212
+ \`\`\`
213
+ ```
214
+
215
+ </details>
216
+
217
+ Once that's in your agent instructions file, just say:
218
+
219
+ ```
220
+ daveloop this: "mongodb connection error in the lookup node"
221
+ ```
222
+
223
+ or
224
+
225
+ ```
226
+ run daveloop on the jwt validation bug
227
+ ```
228
+
229
+ The agent picks it up and runs DaveLoop automatically. No special syntax.
230
+
231
+ ---
232
+
233
+ ## Usage
234
+
235
+ ### Give it a bug
236
+
237
+ ```bash
238
+ daveloop "routes/order.ts has a race condition on wallet balance. two concurrent orders overdraw the account"
239
+ ```
240
+
241
+ ### Give it a file
242
+
243
+ ```bash
244
+ daveloop --file bug-report.txt
245
+ ```
246
+
247
+ ### Queue multiple bugs
248
+
249
+ ```bash
250
+ daveloop "fix the login crash" "fix payment validation" "add dark mode toggle"
251
+ ```
252
+
253
+ ### Point it at a project
254
+
255
+ ```bash
256
+ daveloop --dir /path/to/project "the bug description"
257
+ ```
258
+
259
+ ### Limit iterations
260
+
261
+ ```bash
262
+ daveloop --max-iterations 10 "fix the bug"
263
+ ```
264
+
265
+ ### Mobile testing mode (Maestro)
266
+
267
+ ```bash
268
+ daveloop --maestro "write UI tests for the onboarding flow"
269
+ ```
270
+
271
+ ### Web testing mode (Playwright)
272
+
273
+ ```bash
274
+ daveloop --web "test the checkout flow end to end"
275
+ ```
276
+
277
+ ---
278
+
279
+ ## Interactive Controls
280
+
281
+ DaveLoop doesn't lock you out. While it's running, type:
282
+
283
+ | Command | What happens |
284
+ |---------|-------------|
285
+ | `wait` / `pause` | Stops the current iteration. You type a correction. It resumes with your new context. |
286
+ | `add` | Queue a new bug without stopping the current one |
287
+ | `done` | Graceful exit, saves history |
288
+ | `Ctrl+C` | Kill it |
289
+
290
+ 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.
291
+
292
+ ---
293
+
294
+ ## Three Modes
295
+
296
+ ### Standard Mode (default)
297
+ Classic iterative debugging. Reads code, makes hypotheses, applies fixes, verifies.
298
+
299
+ ### Maestro Mode (`--maestro`)
300
+ Autonomous mobile UI testing. Auto-detects devices/emulators, installs APKs, explores UI hierarchy, writes Maestro YAML test flows, and verifies with 3 consecutive passes.
301
+
302
+ ### Web Mode (`--web`)
303
+ 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.
304
+
305
+ ---
306
+
307
+ ## Session Memory
308
+
309
+ 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.
310
+
311
+ ---
312
+
313
+ ## SWE-bench Integration
314
+
315
+ Test DaveLoop against real-world bugs from open source projects:
316
+
317
+ ```bash
318
+ daveloop-swebench --file django_hash_task.json --max-iterations 15
319
+ ```
320
+
321
+ Pre-configured tasks from Django, Pytest, SymPy, and Sklearn included.
322
+
323
+ ---
324
+
325
+ ## Battle-Tested On
326
+
327
+ | Domain | What it solved |
328
+ |--------|---------------|
329
+ | **Security** | Juice-Shop race conditions, NoSQL injection, ReDoS, path traversal |
330
+ | **Backend** | Django ORM bugs, session handling crashes |
331
+ | **Workflow Automation** | n8n webhook failures, MongoDB connection errors, multi-node data flow bugs |
332
+ | **Testing Frameworks** | Pytest AST rewriting issues, Material-UI flaky visual regression tests |
333
+ | **Libraries** | tqdm ZeroDivisionError, SymPy C-code generation |
334
+ | **Mobile** | Android Maestro test suite generation from scratch |
335
+ | **Self** | Added features to its own codebase autonomously |
336
+
337
+ ---
338
+
339
+ ## Writing Good Bug Descriptions
340
+
341
+ More context = fewer iterations.
342
+
343
+ **Vague (works, but slow):**
344
+ ```bash
345
+ daveloop "fix the bug"
346
+ ```
347
+
348
+ **Specific (fast):**
349
+ ```bash
350
+ 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."
351
+ ```
352
+
353
+ Include: bug type, file location, reproduction steps, root cause if known, fix direction if you have one.
354
+
355
+ ---
356
+
357
+ ## Logs
358
+
359
+ Every session is fully logged:
360
+
361
+ ```
362
+ logs/
363
+ 20260131_142120_iteration_01.log <- what it tried
364
+ 20260131_142120_iteration_02.log <- what it tried next
365
+ 20260131_142120_summary.md <- overview
366
+ ```
367
+
368
+ Every reasoning block, every file read, every edit, every command. Full audit trail.
369
+
370
+ ---
371
+
372
+ ## Why DaveLoop Exists
373
+
374
+ 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.
375
+
376
+ 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.
377
+
378
+ It started as a debug loop. It turned out to be something more.
379
+
380
+ ---
381
+
382
+ ## License
383
+
384
+ MIT
385
+
386
+ ---
387
+
388
+ **Built by [Dave Bruzil](https://github.com/davebruzil)**
389
+
390
+ ```bash
391
+ pip install daveloop
392
+ ```