@@ -21,10 +21,6 @@ The LLM can then query the entire project for chunks with specific names or with
21
21
specific text in their contents. The LLM can then fetch the entire contents
22
22
of individual chunks.
23
23
24
- ** On top of this** , MCPunk provides tools for analysing git diffs to help
25
- with PR reviews, and provides a task queue that LLMs can read and write, allowing
26
- you to split work across multiple chats to keep context manageable.
27
-
28
24
All this with no SaaS, no pricing, nothing (well you need a claude SaaS sub).
29
25
Just you and Claude Desktop, with all tools running on your local machine after
30
26
one tiny snippet in ` claude_desktop_config.json ` .
@@ -53,7 +49,7 @@ Next, start claude desktop and you should see the tools available after a small
53
49
![ ] ( assets/setup.png )
54
50
55
51
Next, ask it to set up a project like "hey pal can you set up the ~ /git/mcpunk project".
56
- Then start asking away, like "how is the tasks database schema structured ?"
52
+ Then start asking away, like "What sorts of chunks come from Python files ?"
57
53
58
54
# Roaming RAG
59
55
@@ -122,32 +118,26 @@ someone wants to do it).
122
118
123
119
# Common Usage Patterns
124
120
125
- ### Answer Questions About Your Codebase & Search for Bugs
126
-
127
- (this is a genuine race condition in MCPunk but given how things are used
128
- it's a big "who cares 🤷")
121
+ ### Answer Questions About Your Codebase
129
122
130
123
- ** [ User] ** Hey pal can you please set up the ~ /git/mcpunk repo, then help me
131
- troubleshoot why I'm sometimes seeing that with multiple concurrent clients
132
- the same task can be picked up twice
124
+ understand how a user of mcpunk would get the git diff of the currently
125
+ checked out branch in the repo that they have configured with mcpunk
133
126
- ** [ Claude] ** Call ` configure_project `
134
- - ** [ Claude] ** Call ` list_files_by_chunk_type_and_chunk_contents ` searching for ` task ` and ` get_task ` callables
135
- - ** [ Claude] ** Call ` list_all_chunk_names_in_file ` for ` db.py `
136
- - ** [ Claude] ** Call ` chunk_details ` for ` db.py:get_task `
137
- - ** [ Claude] ** I see the potential issue - there's a race condition in the task
138
- retrieval process. The current implementation has a Time-Of-Check to Time-Of-Use
139
- (TOCTOU) vulnerability because the selection and update of the task aren't atomic....
127
+ - ** [ Claude] ** Call ` list_all_files_in_project `
128
+ - ** [ Claude] ** Call ` find_files_by_chunk_content `
129
+ - ** [ Claude] ** ... makes a total of 21 tool calls with MCPunk.
130
+ - ** [ Claude] ** Now I understand how the git diff functionality works in mcpunk.
131
+ Let me summarize how a user would get the git diff of the currently checked out branch:
132
+ To get a git diff of the currently checked out branch in a repo configured with mcpunk:
133
+ 1 . First, the user needs to configure mcpunk to work with their project by using the configure_project tool
134
+ 2 . To see what branches were recently checked out (to identify what to diff against)
135
+ 3 . Then, to get the diff between the current branch (HEAD) and a reference branch
136
+ This will display the differences between the current branch (HEAD) and the specified reference branch.
137
+ The ref parameter should be the name of the base branch (like "main" or "develop") that you want to compare against.
140
138
- ** [ User] ** Great job pal!
141
139
142
- ### PR Review Split Into Tasks
143
-
144
- This demonstrates
145
-
146
- - Grab a diff between current branch and another
147
- - Putting tasks on a queue for other LLM chat sessions to perform
148
- - Running tasks from the queue
149
-
150
- .
140
+ ### PR Review
151
141
152
142
- ** [ user] ** Hey pal can you please set up the ~ /git/mcpunk repo and have a
153
143
look at the current branch versus ` scratch/1.5 `
@@ -168,42 +158,6 @@ This demonstrates
168
158
- Test data only shows simple branch names, what about spaces/special chars?
169
159
- Is example_reflog representative of real git reflog output?
170
160
- Are we testing against actual git behavior?
171
- - ** [ User] ** Can you please go ahead and add a single task for each of these items,
172
- using the task tool. Each task must be totally self contained with all relevant context,
173
- such that a new person could pick it up and know exactly what to do. For example,
174
- it must specify to set up the project, get the diff, and look at a specific area
175
- with refrenc to the remainder of the codebase, then mark the task as done with
176
- a relevant outcome note
177
- - ** [ Claude] ** (adds tasks)
178
- - ` 1. ` Set up ~ /git/mcpunk repo 2. Get diff between HEAD and scratch/1.5 3.
179
- Review _ branches_from_reflog function in mcpunk/git_analysis.py, particularly
180
- the ` split('to ')[-1] ` logic 4. Check this against branch names containing
181
- spaces or special characters 5. If issues found, validate against git's reflog documentation
182
- - ` 1. ` Set up ~ /git/mcpunk repo 2. Get diff between HEAD and scratch/1.5 3.
183
- Compare example_reflog test data in tests/test_git_analysis.py against actual
184
- git reflog output from multiple repos 4. Verify it covers common reflog scenarios
185
- (merges, rebases, checkouts) 5. Document any missing patterns
186
- - ` 1. ` Set up ~ /git/mcpunk repo 2. Get diff between HEAD and scratch/1.5 3.
187
- Review get_recent_branches function in mcpunk/git_analysis.py 4. Verify there
188
- are integration tests that check the full function with a real git repo, not
189
- just the helper 5. If missing, document test gaps
190
-
191
- Start a totally new chat:
192
-
193
- - ** [ User] ** Hey buddy can you please grab a task and complete it
194
- - ** [ Claude] ** grabs a task, sets up project, gets diff, digs around project
195
- - ** [ Claude] ** discusses details
196
- - ** [ Claude] ** marks task done with note:
197
-
198
- ```
199
- Found potential issues with _branches_from_reflog function:
200
- 1. Current implementation is brittle as it uses simple string splitting
201
- 2. Could fail with branch names containing \"to \"
202
- 3. May break with non-standard reflog entries
203
- Recommend using regex pattern matching to properly parse reflog format
204
-
205
- follow_up_criticality: medium
206
- ```
207
161
208
162
### Work across multiple codebases
209
163
@@ -239,7 +193,6 @@ MCPunk is at a minimum usable state right now.
239
193
240
194
** High up on the roadmap**
241
195
242
- - Improved logging, likely into the db itself
243
196
- Possibly stemming for search
244
197
- Change the whole "project" concept to not need files to actually exist - this
245
198
leads to allowing "virtual" files inside the project.
@@ -253,11 +206,6 @@ MCPunk is at a minimum usable state right now.
253
206
- Chunking of git diffs. Currently, there's a tool to fetch an entire diff. This
254
207
might be very large. Instead, the tool could be changed to ` add_diff_to_project `
255
208
and it puts files under the ` gitdiff:// ` URI or under some fake path
256
- - Database tweaks
257
- - Maybe migrations. More than likely just if db version has changed make a backup
258
- copy of the old one and start from scratch.
259
- - If db needs stay so simple, just switch to JSON file on disk. Multithread/process
260
- considerations.
261
209
- Include module-level comments when extracting python module-level statements.
262
210
- Caching of a project, so it doesn't need to re-parse all files every time you
263
211
restart MCP client. This may be tricky as changes to the code in a chunker
0 commit comments