daveloop 1.3.0__py3-none-any.whl → 1.5.0__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.
@@ -1,391 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: daveloop
3
- Version: 1.3.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
- Dynamic: author
23
- Dynamic: classifier
24
- Dynamic: description
25
- Dynamic: description-content-type
26
- Dynamic: home-page
27
- Dynamic: keywords
28
- Dynamic: requires-python
29
- Dynamic: summary
30
-
31
- # DaveLoop
32
-
33
- ![DaveLoop Banner](https://github.com/user-attachments/assets/c0611446-41f2-4d10-ad0b-bcdde63bcfd3)
34
-
35
- **DaveLoop** is a Claude CLI based debug agent designed to solve bugs in cases where Claude Code fails to one-shot them.
36
- It feeds itself bugs iteratively until it resolves them or gets blocked. Each iteration builds on the previous one with
37
- full context thanks to the `--continue` flag.
38
-
39
- ---
40
-
41
- ## How It Works
42
-
43
- 1. You give it a bug description
44
- 2. It analyzes, makes a hypothesis, and tries a fix
45
- 3. If not fixed, it loops again with new context
46
- 4. Keeps going until it outputs `[DAVELOOP:RESOLVED]`
47
-
48
- ---
49
-
50
- ## Why Use It
51
-
52
- - Claude Code sometimes needs multiple attempts to fix complex bugs
53
- - Race conditions, subtle logic errors, multi-file refactors
54
- - You dont want to manually copy-paste context every iteration
55
- - Autonomous operation means you dont need to press enter for permissions all the time
56
-
57
- ---
58
-
59
- ## Key Features
60
-
61
- - **Persistent Context** - uses `claude --continue` so it remembers everything
62
- - **Exit Signals** - explicitly tells you when done or blocked
63
- - **Real-time Streaming** - watch it think and debug live
64
- - **Pragmatic Exits** - if environment is broken, it documents the fix and exits
65
- - **4-Level Reasoning** - KNOWN, UNKNOWN, HYPOTHESIS, and WHY
66
-
67
- ---
68
-
69
- ## The 4-Level Reasoning Protocol
70
-
71
- ![Reasoning Example](https://github.com/user-attachments/assets/a1bbd83a-27f2-4543-9d48-ef089b3cbd75)
72
-
73
- The reasoning protocol forces systematic debugging:
74
-
75
- 1. **Prevents random changes** - cant just try stuff without stating why
76
- 2. **Builds knowledge incrementally** - each iterations KNOWN grows
77
- 3. **Explicit about uncertainty** - UNKNOWN list gets smaller or changes focus
78
- 4. **Testable hypotheses** - you can verify if the guess matches symptoms
79
- 5. **Clear action items** - NEXT ACTION is concrete and measurable
80
-
81
- ---
82
- ## INSTALL
83
- ### Via pip
84
- ```bash
85
- pip install daveloop
86
- ```
87
-
88
- ## How to Use
89
-
90
- ### Basic Usage
91
-
92
- ```bash
93
- python daveloop.py "your bug description here"
94
- ```
95
-
96
- **Example:**
97
- ```bash
98
- python daveloop.py "routes/order.ts has a race condition on wallet balance. two concurrent orders can overdraw the account"
99
- ```
100
-
101
- ---
102
-
103
- ### From a File
104
-
105
- If you have a detailed bug report:
106
-
107
- ```bash
108
- python daveloop.py --file bug-report.txt
109
- ```
110
-
111
- The file should contain the bug description. Can be as detailed as you want - stack traces, error logs, reproduction steps, whatever.
112
-
113
- ---
114
-
115
- ### From Claude Code Chat
116
-
117
- Just talk naturally to Claude Code:
118
-
119
- ```
120
- "daveloop this: mongodb connection error in lookup artist node"
121
- ```
122
-
123
- Or:
124
-
125
- ```
126
- "run daveloop on the jwt validation bug"
127
- ```
128
-
129
- Claude Code will automatically run:
130
-
131
- ```bash
132
- python daveloop.py "mongodb connection error in lookup artist node"
133
- ```
134
-
135
- No special commands needed. Just mention "daveloop" and describe the bug.
136
-
137
- ---
138
-
139
- ### With Options
140
-
141
- ```bash
142
- # Custom working directory
143
- python daveloop.py "fix the bug" --dir /path/to/your/project
144
-
145
- # Limit iterations (default is 20)
146
- python daveloop.py "fix the bug" --max-iterations 10
147
-
148
- # All together
149
- python daveloop.py --file bug.txt --dir ./my-app --max-iterations 15
150
- ```
151
-
152
- ---
153
-
154
- ## If Claude CLI Not Found
155
-
156
- DaveLoop automatically searches for Claude CLI in common locations. But if you get:
157
-
158
- ```
159
- ERROR: Claude CLI not found!
160
-
161
- Please install Claude Code CLI or set CLAUDE_CLI_PATH environment variable:
162
- Windows: set CLAUDE_CLI_PATH=C:\path\to\claude.cmd
163
- Linux/Mac: export CLAUDE_CLI_PATH=/path/to/claude
164
-
165
- Install from: https://github.com/anthropics/claude-code
166
- ```
167
-
168
- ### Option 1: Set Environment Variable (Recommended)
169
-
170
- Find where Claude CLI is installed:
171
-
172
- **Windows:**
173
- ```cmd
174
- where claude.cmd
175
- ```
176
-
177
- **Linux/Mac:**
178
- ```bash
179
- which claude
180
- ```
181
-
182
- Then set the path:
183
-
184
- **Windows (temporary - current session):**
185
- ```cmd
186
- set CLAUDE_CLI_PATH=C:\Users\YourName\AppData\Roaming\npm\claude.cmd
187
- ```
188
-
189
- **Windows (permanent):**
190
- ```cmd
191
- setx CLAUDE_CLI_PATH "C:\Users\YourName\AppData\Roaming\npm\claude.cmd"
192
- ```
193
-
194
- **Linux/Mac (add to ~/.bashrc or ~/.zshrc):**
195
- ```bash
196
- export CLAUDE_CLI_PATH=/usr/local/bin/claude
197
- ```
198
-
199
- ---
200
-
201
- ### Option 2: Add to PATH
202
-
203
- **Windows:**
204
- 1. Search for "environment variables" in start menu
205
- 2. Click "Environment Variables" button
206
- 3. Under "User variables", find "Path"
207
- 4. Add the directory containing claude.cmd
208
- 5. Restart terminal
209
-
210
- **Linux/Mac:**
211
- ```bash
212
- # Add to ~/.bashrc or ~/.zshrc
213
- export PATH="$PATH:/path/to/claude/directory"
214
- ```
215
-
216
- ---
217
-
218
- ### Option 3: Install/Reinstall Claude CLI
219
-
220
- If Claude CLI isnt installed:
221
-
222
- ```bash
223
- npm install -g @anthropics/claude-code
224
- ```
225
-
226
- After setting the path, run DaveLoop again.
227
-
228
- ---
229
-
230
- ## What Happens When You Run It
231
-
232
- 1. **Banner shows up** - you see the DAVELOOP ASCII art
233
- 2. **Session info** - working dir, max iterations, prompt loaded
234
- 3. **Bug report** - your description echoed back
235
- 4. **Iteration 1 starts** - progress bar shows up
236
- 5. **You see the reasoning** - KNOWN, UNKNOWN, HYPOTHESIS, NEXT ACTION
237
- 6. **You see the actions** - file reads, edits, bash commands
238
- 7. **Iteration completes** - either continues or exits
239
-
240
- ---
241
-
242
- ## Reading the Output
243
-
244
- Output is color coded:
245
-
246
- - **Blue** - reasoning blocks and actions
247
- - **White** - normal text and code
248
- - **Dim** - less important details
249
- - **Green** - success messages
250
- - **Red** - errors
251
- - **Yellow** - warnings
252
-
253
- Key things to watch for:
254
-
255
- - **Reasoning blocks** - shows how its thinking through the problem
256
- - **Tool usage** - what files its reading/editing
257
- - **Exit signals** - `[Exit signal detected: RESOLVED]` means its done
258
-
259
- ---
260
-
261
- ## When It Finishes
262
-
263
- ### Three Possible Outcomes:
264
-
265
- **1. Success - Bug is Fixed**
266
-
267
- ★ ★ ★ BUG SUCCESSFULLY RESOLVED ★ ★ ★
268
-
269
- Bug fixed in 3 iteration(s)!
270
- ```
271
-
272
- **2. Blocked - Needs Human Help**
273
- ```
274
- ERROR: Claude is blocked - needs human help
275
- ```
276
-
277
- Check the logs to see what it tried. Usually means:
278
- - Environment issues (missing dependencies)
279
- - Need clarification on requirements
280
- - Need access to external systems
281
-
282
- **3. Max Iterations - Ran Out of Attempts**
283
- ```
284
- WARNING: Max iterations (20) reached without resolution
285
- ```
286
-
287
- Check logs in `logs/` directory. Either:
288
- - Increase max iterations
289
- - Provide more context about the bug
290
- - Manually help it past a blocker
291
-
292
- ---
293
-
294
- ## Logs Location
295
-
296
- Every session creates logs:
297
-
298
- ```
299
- logs/
300
- 20240127_143022_iteration_01.log <- first attempt
301
- 20240127_143022_iteration_02.log <- second attempt
302
- 20240127_143022_summary.md <- overview
303
- ```
304
-
305
- Session ID format: `YYYYMMDD_HHMMSS`
306
-
307
- Useful for:
308
- - Seeing what the agent tried
309
- - Debugging why it got stuck
310
- - Understanding its reasoning process
311
- - Proving to your team that the AI actually fixed the bug
312
-
313
- ---
314
-
315
- ## Tips for Good Bug Descriptions
316
-
317
- **Bad:**
318
- ```bash
319
- python daveloop.py "fix the bug"
320
- ```
321
- Too vague. What bug? Where?
322
-
323
- **Better:**
324
- ```bash
325
- python daveloop.py "wallet balance goes negative when two users checkout simultaneously"
326
- ```
327
- Has symptom and context.
328
-
329
- **Best:**
330
- ```bash
331
- python daveloop.py "RACE CONDITION: routes/order.ts wallet payment (lines 139-148). Balance check at line 141 happens BEFORE decrement
332
- at line 142. Two concurrent $100 orders both pass the check and overdraw wallet to -$100. Need atomic check+decrement."
333
- ```
334
-
335
- Has:
336
- - Bug type (race condition)
337
- - Location (file and lines)
338
- - Reproduction (concurrent orders)
339
- - Root cause (non-atomic operations)
340
- - Suggested fix direction (atomic operation)
341
-
342
- **More context = faster resolution = fewer iterations**
343
-
344
- ---
345
-
346
- ## Interrupting the Agent
347
-
348
- If you need to stop it:
349
- - Press `Ctrl+C` once - graceful shutdown
350
- - Press `Ctrl+C` twice - force kill
351
-
352
- Logs are saved even if interrupted.
353
-
354
- ---
355
-
356
- ## Testing Before Production
357
-
358
- Run on test bugs first:
359
-
360
- ```bash
361
- # Simple test
362
- python daveloop.py "create a file test.txt with 'hello world' and output [DAVELOOP:RESOLVED]"
363
- ```
364
-
365
- Should resolve in 1-2 iterations. If it works, youre good to go.
366
-
367
- ---
368
-
369
- ## Using with SWE-bench
370
-
371
- For testing against real-world benchmark bugs:
372
-
373
- ```bash
374
- python daveloop_swebench.py --file django_hash_task.json --max-iterations 15
375
- ```
376
-
377
- Comes with pre-configured bugs from:
378
- - Django ORM
379
- - Pytest AST rewriting
380
- - SymPy code generation
381
- - Sklearn edge cases
382
-
383
- ---
384
-
385
- ## Tested On
386
-
387
- - Juice-Shop security vulnerabilities (race conditions, NoSQL injection, ReDoS, path traversal)
388
- - SWE-bench real-world bugs (Django ORM, Pytest AST, SymPy C-code generation)
389
- - Production n8n workflow errors (MongoDB connection, webhook failures)
390
-
391
- **Success rate significantly higher than one-shot attempts because of the iterative + reasoning approach**
@@ -1,7 +0,0 @@
1
- daveloop.py,sha256=Htq9-ga4EPeyfIUW2Llq6yz7TJi4umfWD7-zlQPGZLs,49406
2
- daveloop_swebench.py,sha256=iD9AU3XRiMQpt7TknFNlvnmPCNp64V-JaTfqTFgsGBM,15996
3
- daveloop-1.3.0.dist-info/METADATA,sha256=eOrj3xTjeHWdrS9_Y87_H3KfHYa3KOtv5fXBDDC485w,10463
4
- daveloop-1.3.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
- daveloop-1.3.0.dist-info/entry_points.txt,sha256=QcFAZgFrDfPtIikNQb7eW9DxOpBK7T-qWrKqbGAS9Ww,86
6
- daveloop-1.3.0.dist-info/top_level.txt,sha256=36DiYt70m4DIK8t7IhV_y6hAzUIyeb5-qDUf3-gbDdg,27
7
- daveloop-1.3.0.dist-info/RECORD,,