execdiff-git-ai 1.0.2__tar.gz → 1.0.3__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.
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/PKG-INFO +101 -140
- execdiff_git_ai-1.0.3/README.md +244 -0
- execdiff_git_ai-1.0.3/execdiff_git_ai/__init__.py +16 -0
- execdiff_git_ai-1.0.3/execdiff_git_ai/agent.py +560 -0
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/execdiff_git_ai/cli.py +12 -12
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/execdiff_git_ai.egg-info/PKG-INFO +101 -140
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/pyproject.toml +1 -1
- execdiff_git_ai-1.0.2/README.md +0 -283
- execdiff_git_ai-1.0.2/execdiff_git_ai/__init__.py +0 -13
- execdiff_git_ai-1.0.2/execdiff_git_ai/agent.py +0 -315
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/LICENSE +0 -0
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/execdiff_git_ai.egg-info/SOURCES.txt +0 -0
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/execdiff_git_ai.egg-info/dependency_links.txt +0 -0
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/execdiff_git_ai.egg-info/entry_points.txt +0 -0
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/execdiff_git_ai.egg-info/requires.txt +0 -0
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/execdiff_git_ai.egg-info/top_level.txt +0 -0
- {execdiff_git_ai-1.0.2 → execdiff_git_ai-1.0.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: execdiff-git-ai
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: AI Impact Assessment for git changes - understand what your AI copilot changed before you commit.
|
|
5
5
|
Author-email: Anup Moncy <n93181165@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -45,27 +45,25 @@ Dynamic: license-file
|
|
|
45
45
|
|
|
46
46
|
AI Impact Assessment for git changes - understand what your AI copilot changed before you commit it.
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Intro
|
|
49
49
|
|
|
50
|
-
ExecDiff Git AI is a Python CLI tool that helps developers understand the scope and implications of code changes made by AI coding assistants (like GitHub Copilot, Cursor, or Replit AI)
|
|
51
|
-
|
|
52
|
-
## Privacy
|
|
53
|
-
|
|
54
|
-
ExecDiff Git AI runs **entirely locally**.
|
|
50
|
+
ExecDiff Git AI is a Python CLI tool that helps developers understand the scope and implications of code changes made by AI coding assistants (like GitHub Copilot, Cursor, or Replit AI). It analyzes git diffs and extracts modified symbols (functions, classes, variables).
|
|
55
51
|
|
|
52
|
+
**100% Local - No Cloud Required**
|
|
56
53
|
- ✅ No code is uploaded
|
|
57
54
|
- ✅ No cloud calls required
|
|
58
55
|
- ✅ No telemetry
|
|
59
56
|
- ✅ Works offline with optional local LLM (Ollama)
|
|
60
57
|
- ✅ All analysis happens on your machine
|
|
61
58
|
|
|
62
|
-
## Features
|
|
59
|
+
## Features & Privacy
|
|
63
60
|
|
|
64
61
|
- **Local-first**: Runs entirely on your machine with no cloud calls or telemetry
|
|
65
|
-
- **
|
|
66
|
-
- **
|
|
67
|
-
- **CLI-first**: `execdiff-git
|
|
68
|
-
- **
|
|
62
|
+
- **Fast Assessment**: Quick symbol detection and impact analysis (always available)
|
|
63
|
+
- **Optional AI Mode**: Deep business-facing analysis using local Ollama (opt-in)
|
|
64
|
+
- **CLI-first**: Simple commands `execdiff-git assess` and `execdiff-git ai-assess`
|
|
65
|
+
- **Zero Dependencies**: Non-AI mode works with just Python and Git
|
|
66
|
+
- **Privacy-focused**: No data sent to external servers
|
|
69
67
|
|
|
70
68
|
## Installation
|
|
71
69
|
|
|
@@ -74,121 +72,67 @@ ExecDiff Git AI runs **entirely locally**.
|
|
|
74
72
|
- Python 3.8+
|
|
75
73
|
- Git
|
|
76
74
|
|
|
77
|
-
###
|
|
78
|
-
|
|
79
|
-
Install from PyPI:
|
|
75
|
+
### Install Package
|
|
80
76
|
|
|
81
77
|
```bash
|
|
82
78
|
pip install execdiff-git-ai
|
|
83
79
|
```
|
|
84
80
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## How to Use
|
|
88
|
-
|
|
89
|
-
### Quick Start (No AI Required)
|
|
90
|
-
|
|
91
|
-
1. **Make your code change** (or let your AI copilot make changes)
|
|
92
|
-
|
|
93
|
-
2. **Stage your changes with git**
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
git add .
|
|
97
|
-
# For new files, you may need:
|
|
98
|
-
git add -N .
|
|
99
|
-
```
|
|
81
|
+
### Optional: Ollama for AI Mode
|
|
100
82
|
|
|
101
|
-
|
|
83
|
+
For AI-powered analysis, optionally install:
|
|
102
84
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
85
|
+
| Component | Size | Purpose |
|
|
86
|
+
|-----------|------|---------|
|
|
87
|
+
| Ollama | ~50MB | Local AI runtime |
|
|
88
|
+
| tinyllama model | ~637MB | AI analysis model |
|
|
106
89
|
|
|
107
|
-
**
|
|
90
|
+
**Total: ~700MB (one-time, optional)**
|
|
108
91
|
|
|
109
|
-
|
|
92
|
+
**Install Ollama:**
|
|
110
93
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
**AI mode is completely optional.** The non-AI mode works great for most use cases.
|
|
114
|
-
|
|
115
|
-
### Requirements for AI Mode
|
|
116
|
-
|
|
117
|
-
| Component | Size | Description |
|
|
118
|
-
|-----------|------|-------------|
|
|
119
|
-
| **Ollama** | ~50MB | Local AI runtime (one-time install) |
|
|
120
|
-
| **tinyllama model** | ~637MB | Smallest AI model (one-time download) |
|
|
121
|
-
|
|
122
|
-
**Total: ~700MB one-time download**
|
|
123
|
-
|
|
124
|
-
- ✅ 100% local - no data sent to cloud
|
|
125
|
-
- ✅ Works offline after initial setup
|
|
126
|
-
- ✅ User permission required before any downloads
|
|
127
|
-
|
|
128
|
-
### How AI Mode Works
|
|
129
|
-
|
|
130
|
-
When you run `execdiff-git scan-ai`:
|
|
131
|
-
|
|
132
|
-
1. **Ollama check** - Checks if Ollama is installed
|
|
133
|
-
2. **Model check** - Checks if AI model is available
|
|
134
|
-
3. **User permission** - Asks before downloading anything
|
|
135
|
-
4. **Auto-start** - Starts Ollama server automatically
|
|
136
|
-
5. **Analysis** - Runs local AI analysis on your changes
|
|
137
|
-
6. **Auto-stop** - Stops Ollama server when done
|
|
138
|
-
|
|
139
|
-
### Install Ollama (One-Time)
|
|
140
|
-
|
|
141
|
-
**macOS:**
|
|
94
|
+
macOS:
|
|
142
95
|
```bash
|
|
143
96
|
brew install ollama
|
|
144
97
|
```
|
|
145
98
|
|
|
146
|
-
|
|
99
|
+
macOS/Linux:
|
|
147
100
|
```bash
|
|
148
101
|
curl -fsSL https://ollama.ai/install.sh | sh
|
|
149
102
|
```
|
|
150
103
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
### Use AI Mode
|
|
104
|
+
Or download from: https://ollama.ai/
|
|
154
105
|
|
|
155
|
-
|
|
106
|
+
---
|
|
156
107
|
|
|
157
|
-
|
|
158
|
-
execdiff-git scan-ai
|
|
159
|
-
```
|
|
108
|
+
## Initial Setup
|
|
160
109
|
|
|
161
|
-
|
|
110
|
+
1. **Make your code change** (or let your AI copilot make changes)
|
|
162
111
|
|
|
163
|
-
|
|
164
|
-
⚠️ Model 'tinyllama' (~637MB) is not installed locally.
|
|
165
|
-
✅ Everything stays local - no data is sent to the cloud.
|
|
112
|
+
2. **Stage your changes with git**
|
|
166
113
|
|
|
167
|
-
|
|
168
|
-
|
|
114
|
+
```bash
|
|
115
|
+
git add .
|
|
116
|
+
# For new files, you may need:
|
|
117
|
+
git add -N .
|
|
118
|
+
```
|
|
169
119
|
|
|
170
|
-
**
|
|
120
|
+
3. **You're ready to use ExecDiff Git AI!**
|
|
171
121
|
|
|
172
122
|
---
|
|
173
123
|
|
|
174
|
-
##
|
|
124
|
+
## Quick Assessment (No AI)
|
|
175
125
|
|
|
176
|
-
|
|
126
|
+
Fast, local symbol detection - no setup required.
|
|
177
127
|
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
execdiff-git scan
|
|
181
|
-
```
|
|
128
|
+
### Usage
|
|
182
129
|
|
|
183
|
-
**AI mode (optional, requires Ollama ~700MB total):**
|
|
184
130
|
```bash
|
|
185
|
-
execdiff-git
|
|
131
|
+
execdiff-git assess
|
|
186
132
|
```
|
|
187
133
|
|
|
188
134
|
### Example Output
|
|
189
135
|
|
|
190
|
-
**Non-AI Mode:**
|
|
191
|
-
|
|
192
136
|
```
|
|
193
137
|
==============================
|
|
194
138
|
📊 File Change Assessment
|
|
@@ -197,19 +141,41 @@ File +Lines -Lines
|
|
|
197
141
|
------------------------------------------------
|
|
198
142
|
test_feature.py 14 0
|
|
199
143
|
|
|
144
|
+
--------------------------------
|
|
145
|
+
|
|
200
146
|
================================================================================
|
|
201
147
|
📋 Impact Summary
|
|
202
148
|
================================================================================
|
|
203
|
-
Symbol Change Type Impact
|
|
149
|
+
Symbol Change Type Impact
|
|
204
150
|
--------------------------------------------------------
|
|
205
|
-
authenticate_user
|
|
206
|
-
create_session
|
|
207
|
-
validate_token
|
|
151
|
+
[NEW] authenticate_user function added LOW
|
|
152
|
+
[NEW] create_session function added LOW
|
|
153
|
+
[NEW] validate_token function added LOW
|
|
208
154
|
|
|
209
155
|
✅ Assessment complete!
|
|
210
156
|
```
|
|
211
157
|
|
|
212
|
-
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## AI-Powered Assessment
|
|
161
|
+
|
|
162
|
+
Deep analysis with business-facing summaries using local Ollama (requires optional Ollama installation).
|
|
163
|
+
|
|
164
|
+
### Usage
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
execdiff-git ai-assess
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The tool will:
|
|
171
|
+
- Check if Ollama is installed
|
|
172
|
+
- Ask permission before downloading AI model (~637MB)
|
|
173
|
+
- Start Ollama server automatically
|
|
174
|
+
- Analyze each change individually
|
|
175
|
+
- Get overall business impact summary
|
|
176
|
+
- Stop Ollama server when done
|
|
177
|
+
|
|
178
|
+
### Example Output
|
|
213
179
|
|
|
214
180
|
```
|
|
215
181
|
==============================
|
|
@@ -219,14 +185,16 @@ File +Lines -Lines
|
|
|
219
185
|
------------------------------------------------
|
|
220
186
|
test_feature.py 14 0
|
|
221
187
|
|
|
188
|
+
--------------------------------
|
|
189
|
+
|
|
222
190
|
================================================================================
|
|
223
191
|
📋 Impact Summary
|
|
224
192
|
================================================================================
|
|
225
|
-
Symbol Change Type Impact
|
|
193
|
+
Symbol Change Type Impact
|
|
226
194
|
--------------------------------------------------------
|
|
227
|
-
authenticate_user
|
|
228
|
-
create_session
|
|
229
|
-
validate_token
|
|
195
|
+
[NEW] authenticate_user function added LOW
|
|
196
|
+
[NEW] create_session function added LOW
|
|
197
|
+
[NEW] validate_token function added LOW
|
|
230
198
|
|
|
231
199
|
================================================================================
|
|
232
200
|
🤖 AI Impact Assessment
|
|
@@ -235,19 +203,27 @@ validate_token function added LOW
|
|
|
235
203
|
🚀 Starting Ollama server...
|
|
236
204
|
⏳ Waiting for Ollama server to start...
|
|
237
205
|
✅ Ollama server is ready!
|
|
238
|
-
🧠 Analyzing with AI (tinyllama, 100% local)...
|
|
239
206
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
207
|
+
🧠 Analyzing 3 changes:
|
|
208
|
+
|
|
209
|
+
• [NEW] authenticate_user... ✓
|
|
210
|
+
Handles user login and credential verification.
|
|
243
211
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
Summary: Added session creation. Improves user experience and session management.
|
|
212
|
+
• [NEW] create_session... ✓
|
|
213
|
+
Establishes user sessions after authentication.
|
|
247
214
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
215
|
+
• [NEW] validate_token... ✓
|
|
216
|
+
Verifies tokens are valid and not expired.
|
|
217
|
+
|
|
218
|
+
• Overall impact... ✓
|
|
219
|
+
|
|
220
|
+
Overall:
|
|
221
|
+
• System now provides complete authentication workflow with secure token validation.
|
|
222
|
+
|
|
223
|
+
Changes:
|
|
224
|
+
• [NEW] authenticate_user: Handles user login and credential verification.
|
|
225
|
+
• [NEW] create_session: Establishes user sessions after authentication.
|
|
226
|
+
• [NEW] validate_token: Verifies tokens are valid and not expired.
|
|
251
227
|
|
|
252
228
|
🛑 Ollama server stopped
|
|
253
229
|
|
|
@@ -256,56 +232,41 @@ Summary: Added token validation. Enhances security by validating session tokens.
|
|
|
256
232
|
|
|
257
233
|
---
|
|
258
234
|
|
|
259
|
-
##
|
|
235
|
+
## Symbol Change Types
|
|
236
|
+
|
|
237
|
+
Each symbol is labeled with its change type:
|
|
260
238
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
| **Speed** | Instant | 5-30 seconds |
|
|
265
|
-
| **Analysis** | Symbol detection | Business-facing summaries |
|
|
266
|
-
| **Privacy** | 100% local | 100% local |
|
|
267
|
-
| **Offline** | Yes | Yes (after setup) |
|
|
239
|
+
- **[NEW]** - Newly added function or class
|
|
240
|
+
- **[MODIFIED]** - Existing function or class that was changed
|
|
241
|
+
- **[DELETED]** - Function or class that was removed
|
|
268
242
|
|
|
269
243
|
---
|
|
270
244
|
|
|
271
245
|
## How It Works
|
|
272
246
|
|
|
273
|
-
1. **Reads git diff** - Gets all staged changes
|
|
247
|
+
1. **Reads git diff** - Gets all staged changes
|
|
274
248
|
2. **Extracts symbols** - Finds functions, classes, and variables
|
|
275
|
-
3. **Detects
|
|
276
|
-
4. **
|
|
277
|
-
5. **Generates business summary** - Specific, non-technical impact summary (AI mode only)
|
|
278
|
-
6. **Advisory warnings** - Critical impact changes trigger warnings (AI mode only)
|
|
279
|
-
|
|
280
|
-
---
|
|
249
|
+
3. **Detects changes** - Identifies NEW, MODIFIED, or DELETED code
|
|
250
|
+
4. **Analyzes impact** - AI provides business-facing summaries (AI mode only)
|
|
281
251
|
|
|
282
252
|
## Development
|
|
283
253
|
|
|
284
|
-
Install in editable mode:
|
|
285
|
-
|
|
286
254
|
```bash
|
|
287
255
|
git clone https://github.com/anupmoncy/execdiff-git-ai.git
|
|
288
256
|
cd execdiff-git-ai
|
|
289
257
|
pip install -e .
|
|
258
|
+
execdiff-git assess
|
|
290
259
|
```
|
|
291
260
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
execdiff-git scan
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
## Programmatic Usage
|
|
299
|
-
|
|
300
|
-
You can also use ExecDiff Git AI as a library:
|
|
261
|
+
## Library Usage
|
|
301
262
|
|
|
302
263
|
```python
|
|
303
264
|
from execdiff_git_ai.agent import run_agent, run_agent_with_ai
|
|
304
265
|
|
|
305
|
-
# Non-AI mode
|
|
266
|
+
# Non-AI mode
|
|
306
267
|
run_agent()
|
|
307
268
|
|
|
308
|
-
# AI
|
|
269
|
+
# AI mode
|
|
309
270
|
run_agent_with_ai()
|
|
310
271
|
```
|
|
311
272
|
|
|
@@ -323,4 +284,4 @@ Contributions welcome! Please open an issue or submit a pull request.
|
|
|
323
284
|
|
|
324
285
|
---
|
|
325
286
|
|
|
326
|
-
**Note**:
|
|
287
|
+
**Note**: Early-stage project. API and behavior subject to change.
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# ExecDiff Git AI
|
|
2
|
+
|
|
3
|
+
AI Impact Assessment for git changes - understand what your AI copilot changed before you commit it.
|
|
4
|
+
|
|
5
|
+
## Intro
|
|
6
|
+
|
|
7
|
+
ExecDiff Git AI is a Python CLI tool that helps developers understand the scope and implications of code changes made by AI coding assistants (like GitHub Copilot, Cursor, or Replit AI). It analyzes git diffs and extracts modified symbols (functions, classes, variables).
|
|
8
|
+
|
|
9
|
+
**100% Local - No Cloud Required**
|
|
10
|
+
- ✅ No code is uploaded
|
|
11
|
+
- ✅ No cloud calls required
|
|
12
|
+
- ✅ No telemetry
|
|
13
|
+
- ✅ Works offline with optional local LLM (Ollama)
|
|
14
|
+
- ✅ All analysis happens on your machine
|
|
15
|
+
|
|
16
|
+
## Features & Privacy
|
|
17
|
+
|
|
18
|
+
- **Local-first**: Runs entirely on your machine with no cloud calls or telemetry
|
|
19
|
+
- **Fast Assessment**: Quick symbol detection and impact analysis (always available)
|
|
20
|
+
- **Optional AI Mode**: Deep business-facing analysis using local Ollama (opt-in)
|
|
21
|
+
- **CLI-first**: Simple commands `execdiff-git assess` and `execdiff-git ai-assess`
|
|
22
|
+
- **Zero Dependencies**: Non-AI mode works with just Python and Git
|
|
23
|
+
- **Privacy-focused**: No data sent to external servers
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
### Prerequisites (Required)
|
|
28
|
+
|
|
29
|
+
- Python 3.8+
|
|
30
|
+
- Git
|
|
31
|
+
|
|
32
|
+
### Install Package
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install execdiff-git-ai
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Optional: Ollama for AI Mode
|
|
39
|
+
|
|
40
|
+
For AI-powered analysis, optionally install:
|
|
41
|
+
|
|
42
|
+
| Component | Size | Purpose |
|
|
43
|
+
|-----------|------|---------|
|
|
44
|
+
| Ollama | ~50MB | Local AI runtime |
|
|
45
|
+
| tinyllama model | ~637MB | AI analysis model |
|
|
46
|
+
|
|
47
|
+
**Total: ~700MB (one-time, optional)**
|
|
48
|
+
|
|
49
|
+
**Install Ollama:**
|
|
50
|
+
|
|
51
|
+
macOS:
|
|
52
|
+
```bash
|
|
53
|
+
brew install ollama
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
macOS/Linux:
|
|
57
|
+
```bash
|
|
58
|
+
curl -fsSL https://ollama.ai/install.sh | sh
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or download from: https://ollama.ai/
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Initial Setup
|
|
66
|
+
|
|
67
|
+
1. **Make your code change** (or let your AI copilot make changes)
|
|
68
|
+
|
|
69
|
+
2. **Stage your changes with git**
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git add .
|
|
73
|
+
# For new files, you may need:
|
|
74
|
+
git add -N .
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
3. **You're ready to use ExecDiff Git AI!**
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Quick Assessment (No AI)
|
|
82
|
+
|
|
83
|
+
Fast, local symbol detection - no setup required.
|
|
84
|
+
|
|
85
|
+
### Usage
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
execdiff-git assess
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Example Output
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
==============================
|
|
95
|
+
📊 File Change Assessment
|
|
96
|
+
==============================
|
|
97
|
+
File +Lines -Lines
|
|
98
|
+
------------------------------------------------
|
|
99
|
+
test_feature.py 14 0
|
|
100
|
+
|
|
101
|
+
--------------------------------
|
|
102
|
+
|
|
103
|
+
================================================================================
|
|
104
|
+
📋 Impact Summary
|
|
105
|
+
================================================================================
|
|
106
|
+
Symbol Change Type Impact
|
|
107
|
+
--------------------------------------------------------
|
|
108
|
+
[NEW] authenticate_user function added LOW
|
|
109
|
+
[NEW] create_session function added LOW
|
|
110
|
+
[NEW] validate_token function added LOW
|
|
111
|
+
|
|
112
|
+
✅ Assessment complete!
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## AI-Powered Assessment
|
|
118
|
+
|
|
119
|
+
Deep analysis with business-facing summaries using local Ollama (requires optional Ollama installation).
|
|
120
|
+
|
|
121
|
+
### Usage
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
execdiff-git ai-assess
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The tool will:
|
|
128
|
+
- Check if Ollama is installed
|
|
129
|
+
- Ask permission before downloading AI model (~637MB)
|
|
130
|
+
- Start Ollama server automatically
|
|
131
|
+
- Analyze each change individually
|
|
132
|
+
- Get overall business impact summary
|
|
133
|
+
- Stop Ollama server when done
|
|
134
|
+
|
|
135
|
+
### Example Output
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
==============================
|
|
139
|
+
📊 File Change Assessment
|
|
140
|
+
==============================
|
|
141
|
+
File +Lines -Lines
|
|
142
|
+
------------------------------------------------
|
|
143
|
+
test_feature.py 14 0
|
|
144
|
+
|
|
145
|
+
--------------------------------
|
|
146
|
+
|
|
147
|
+
================================================================================
|
|
148
|
+
📋 Impact Summary
|
|
149
|
+
================================================================================
|
|
150
|
+
Symbol Change Type Impact
|
|
151
|
+
--------------------------------------------------------
|
|
152
|
+
[NEW] authenticate_user function added LOW
|
|
153
|
+
[NEW] create_session function added LOW
|
|
154
|
+
[NEW] validate_token function added LOW
|
|
155
|
+
|
|
156
|
+
================================================================================
|
|
157
|
+
🤖 AI Impact Assessment
|
|
158
|
+
================================================================================
|
|
159
|
+
|
|
160
|
+
🚀 Starting Ollama server...
|
|
161
|
+
⏳ Waiting for Ollama server to start...
|
|
162
|
+
✅ Ollama server is ready!
|
|
163
|
+
|
|
164
|
+
🧠 Analyzing 3 changes:
|
|
165
|
+
|
|
166
|
+
• [NEW] authenticate_user... ✓
|
|
167
|
+
Handles user login and credential verification.
|
|
168
|
+
|
|
169
|
+
• [NEW] create_session... ✓
|
|
170
|
+
Establishes user sessions after authentication.
|
|
171
|
+
|
|
172
|
+
• [NEW] validate_token... ✓
|
|
173
|
+
Verifies tokens are valid and not expired.
|
|
174
|
+
|
|
175
|
+
• Overall impact... ✓
|
|
176
|
+
|
|
177
|
+
Overall:
|
|
178
|
+
• System now provides complete authentication workflow with secure token validation.
|
|
179
|
+
|
|
180
|
+
Changes:
|
|
181
|
+
• [NEW] authenticate_user: Handles user login and credential verification.
|
|
182
|
+
• [NEW] create_session: Establishes user sessions after authentication.
|
|
183
|
+
• [NEW] validate_token: Verifies tokens are valid and not expired.
|
|
184
|
+
|
|
185
|
+
🛑 Ollama server stopped
|
|
186
|
+
|
|
187
|
+
✅ Assessment complete!
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Symbol Change Types
|
|
193
|
+
|
|
194
|
+
Each symbol is labeled with its change type:
|
|
195
|
+
|
|
196
|
+
- **[NEW]** - Newly added function or class
|
|
197
|
+
- **[MODIFIED]** - Existing function or class that was changed
|
|
198
|
+
- **[DELETED]** - Function or class that was removed
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## How It Works
|
|
203
|
+
|
|
204
|
+
1. **Reads git diff** - Gets all staged changes
|
|
205
|
+
2. **Extracts symbols** - Finds functions, classes, and variables
|
|
206
|
+
3. **Detects changes** - Identifies NEW, MODIFIED, or DELETED code
|
|
207
|
+
4. **Analyzes impact** - AI provides business-facing summaries (AI mode only)
|
|
208
|
+
|
|
209
|
+
## Development
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
git clone https://github.com/anupmoncy/execdiff-git-ai.git
|
|
213
|
+
cd execdiff-git-ai
|
|
214
|
+
pip install -e .
|
|
215
|
+
execdiff-git assess
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Library Usage
|
|
219
|
+
|
|
220
|
+
```python
|
|
221
|
+
from execdiff_git_ai.agent import run_agent, run_agent_with_ai
|
|
222
|
+
|
|
223
|
+
# Non-AI mode
|
|
224
|
+
run_agent()
|
|
225
|
+
|
|
226
|
+
# AI mode
|
|
227
|
+
run_agent_with_ai()
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
Apache-2.0
|
|
233
|
+
|
|
234
|
+
## Author
|
|
235
|
+
|
|
236
|
+
Anup Moncy (n93181165@gmail.com)
|
|
237
|
+
|
|
238
|
+
## Contributing
|
|
239
|
+
|
|
240
|
+
Contributions welcome! Please open an issue or submit a pull request.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
**Note**: Early-stage project. API and behavior subject to change.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ExecDiff Git AI - Analyze AI-driven code changes.
|
|
3
|
+
|
|
4
|
+
This package provides tools to analyze Git diffs and assess the impact
|
|
5
|
+
of changes made by AI coding assistants.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "1.0.2"
|
|
9
|
+
__author__ = "Anup Moncy"
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from execdiff_git_ai.agent import run_agent, run_agent_with_ai
|
|
13
|
+
__all__ = ['run_agent', 'run_agent_with_ai']
|
|
14
|
+
except ImportError as e:
|
|
15
|
+
print(f"Warning: Could not import agent functions: {e}")
|
|
16
|
+
__all__ = []
|