codiff 0.1.0__tar.gz → 0.1.1__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.
- {codiff-0.1.0 → codiff-0.1.1}/PKG-INFO +30 -29
- {codiff-0.1.0 → codiff-0.1.1}/README.md +29 -28
- {codiff-0.1.0 → codiff-0.1.1}/codiff/cli.py +11 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/repository.py +31 -24
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/resolver.py +8 -3
- {codiff-0.1.0 → codiff-0.1.1}/codiff/mcp_server.py +2 -1
- {codiff-0.1.0 → codiff-0.1.1}/codiff.egg-info/PKG-INFO +30 -29
- {codiff-0.1.0 → codiff-0.1.1}/pyproject.toml +1 -1
- {codiff-0.1.0 → codiff-0.1.1}/LICENSE +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/__main__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/db/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/db/engine.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/db/models.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/db/operations.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/diff/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/diff/analysis.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/diff/differ.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/diff/engine.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/diff/indexer.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/diff/snapshot.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/export/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/export/json.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/export/mermaid.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/export/terminal.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/parser.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/python/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/python/parser.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/python/resolver.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/typescript/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/typescript/parser.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/languages/typescript/resolver.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/schema/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/schema/diff.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/schema/parsing.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/setup.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/utils/__init__.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/utils/args.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/utils/files.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/utils/git.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/utils/instructions.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/utils/instructions.yaml +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff/utils/terminal.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff.egg-info/SOURCES.txt +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff.egg-info/dependency_links.txt +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff.egg-info/entry_points.txt +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff.egg-info/requires.txt +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/codiff.egg-info/top_level.txt +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/setup.cfg +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_call_patterns.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_call_resolver.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_cli.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_code_parser.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_db.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_diff.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_export_json.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_export_mermaid.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_export_terminal.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_indexer.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_setup.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_snapshot.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_ts_integration.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_ts_parser.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_ts_resolver.py +0 -0
- {codiff-0.1.0 → codiff-0.1.1}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codiff
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Structural call-graph diff for codebases, built for coding agents
|
|
5
5
|
Author-email: Issa Hammoud <issa.hammoud@outlook.com>
|
|
6
6
|
License: Apache License
|
|
@@ -347,6 +347,31 @@ pip install codiff
|
|
|
347
347
|
|
|
348
348
|
## Usage
|
|
349
349
|
|
|
350
|
+
### Agent integration (MCP + project instructions)
|
|
351
|
+
|
|
352
|
+
Run once per project to configure your coding agent:
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
codiff init --agent claude # Claude Code
|
|
356
|
+
codiff init --agent codex # OpenAI Codex CLI
|
|
357
|
+
codiff init --agent gemini # Gemini CLI
|
|
358
|
+
codiff init --agent vibe # Mistral Vibe
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Each command writes the MCP server config and a project instructions file telling the agent to use the `codiff_diff` MCP tool when creating pull requests:
|
|
362
|
+
|
|
363
|
+
| Agent | MCP config | Instructions file |
|
|
364
|
+
|---|---|---|
|
|
365
|
+
| `claude` | `.mcp.json` | `CLAUDE.md` |
|
|
366
|
+
| `codex` | `.codex/config.toml` | `AGENTS.md` |
|
|
367
|
+
| `gemini` | `~/.gemini/settings.json` ¹ | `GEMINI.md` |
|
|
368
|
+
| `vibe` | `~/.vibe/config.toml` ² | — |
|
|
369
|
+
|
|
370
|
+
¹ Gemini CLI MCP config is global (not project-scoped). Restart Gemini CLI after running.
|
|
371
|
+
² Mistral Vibe MCP config is global (not project-scoped). Restart Vibe after running.
|
|
372
|
+
|
|
373
|
+
When creating a pull request, the agent calls `codiff_diff(base_ref="main", head_ref="HEAD", format="mermaid")` and embeds the returned diagram in the PR description. GitHub renders Mermaid natively — no plugin needed.
|
|
374
|
+
|
|
350
375
|
### CLI
|
|
351
376
|
|
|
352
377
|
```bash
|
|
@@ -377,30 +402,6 @@ codiff init --agent <agent>
|
|
|
377
402
|
| `mermaid` | Two Mermaid `classDiagram` blocks — paste into any Markdown file or PR description |
|
|
378
403
|
| `json` | Structured JSON — consumed by editor integrations (e.g. the VS Code extension) |
|
|
379
404
|
|
|
380
|
-
### Agent integration (MCP + project instructions)
|
|
381
|
-
|
|
382
|
-
Run once per project to configure your coding agent:
|
|
383
|
-
|
|
384
|
-
```bash
|
|
385
|
-
codiff init --agent claude # Claude Code
|
|
386
|
-
codiff init --agent codex # OpenAI Codex CLI
|
|
387
|
-
codiff init --agent gemini # Gemini CLI
|
|
388
|
-
codiff init --agent vibe # Mistral Vibe
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
Each command writes the MCP server config and a project instructions file telling the agent to use the `codiff_diff` MCP tool when creating pull requests:
|
|
392
|
-
|
|
393
|
-
| Agent | MCP config | Instructions file |
|
|
394
|
-
|---|---|---|
|
|
395
|
-
| `claude` | `.mcp.json` | `CLAUDE.md` |
|
|
396
|
-
| `codex` | `.codex/config.toml` | `AGENTS.md` |
|
|
397
|
-
| `gemini` | `~/.gemini/settings.json` ¹ | `GEMINI.md` |
|
|
398
|
-
| `vibe` | `~/.vibe/config.toml` ² | — |
|
|
399
|
-
|
|
400
|
-
¹ Gemini CLI MCP config is global (not project-scoped). Restart Gemini CLI after running.
|
|
401
|
-
² Mistral Vibe MCP config is global (not project-scoped). Restart Vibe after running.
|
|
402
|
-
|
|
403
|
-
When creating a pull request, the agent calls `codiff_diff(base_ref="main", head_ref="HEAD", format="mermaid")` and embeds the returned diagram in the PR description. GitHub renders Mermaid natively — no plugin needed.
|
|
404
405
|
|
|
405
406
|
## Reading the terminal output
|
|
406
407
|
|
|
@@ -433,10 +434,10 @@ When two changed classes in the same file are related, each class box shows a di
|
|
|
433
434
|
|
|
434
435
|
```
|
|
435
436
|
╭╌╌╌ PageAwarePreChunker ╌╌╌╮
|
|
436
|
-
│ calls
|
|
437
|
-
│ ──────────────
|
|
438
|
-
│ + __init__
|
|
439
|
-
|
|
437
|
+
│ calls PageAwareBuilder │
|
|
438
|
+
│ ────────────── │
|
|
439
|
+
│ + __init__ │
|
|
440
|
+
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
|
|
440
441
|
```
|
|
441
442
|
|
|
442
443
|
Relationship types: `calls` (method calls to another class) and `inherits` (superclass relationship detected from class definitions).
|
|
@@ -109,6 +109,31 @@ pip install codiff
|
|
|
109
109
|
|
|
110
110
|
## Usage
|
|
111
111
|
|
|
112
|
+
### Agent integration (MCP + project instructions)
|
|
113
|
+
|
|
114
|
+
Run once per project to configure your coding agent:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
codiff init --agent claude # Claude Code
|
|
118
|
+
codiff init --agent codex # OpenAI Codex CLI
|
|
119
|
+
codiff init --agent gemini # Gemini CLI
|
|
120
|
+
codiff init --agent vibe # Mistral Vibe
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Each command writes the MCP server config and a project instructions file telling the agent to use the `codiff_diff` MCP tool when creating pull requests:
|
|
124
|
+
|
|
125
|
+
| Agent | MCP config | Instructions file |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| `claude` | `.mcp.json` | `CLAUDE.md` |
|
|
128
|
+
| `codex` | `.codex/config.toml` | `AGENTS.md` |
|
|
129
|
+
| `gemini` | `~/.gemini/settings.json` ¹ | `GEMINI.md` |
|
|
130
|
+
| `vibe` | `~/.vibe/config.toml` ² | — |
|
|
131
|
+
|
|
132
|
+
¹ Gemini CLI MCP config is global (not project-scoped). Restart Gemini CLI after running.
|
|
133
|
+
² Mistral Vibe MCP config is global (not project-scoped). Restart Vibe after running.
|
|
134
|
+
|
|
135
|
+
When creating a pull request, the agent calls `codiff_diff(base_ref="main", head_ref="HEAD", format="mermaid")` and embeds the returned diagram in the PR description. GitHub renders Mermaid natively — no plugin needed.
|
|
136
|
+
|
|
112
137
|
### CLI
|
|
113
138
|
|
|
114
139
|
```bash
|
|
@@ -139,30 +164,6 @@ codiff init --agent <agent>
|
|
|
139
164
|
| `mermaid` | Two Mermaid `classDiagram` blocks — paste into any Markdown file or PR description |
|
|
140
165
|
| `json` | Structured JSON — consumed by editor integrations (e.g. the VS Code extension) |
|
|
141
166
|
|
|
142
|
-
### Agent integration (MCP + project instructions)
|
|
143
|
-
|
|
144
|
-
Run once per project to configure your coding agent:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
codiff init --agent claude # Claude Code
|
|
148
|
-
codiff init --agent codex # OpenAI Codex CLI
|
|
149
|
-
codiff init --agent gemini # Gemini CLI
|
|
150
|
-
codiff init --agent vibe # Mistral Vibe
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Each command writes the MCP server config and a project instructions file telling the agent to use the `codiff_diff` MCP tool when creating pull requests:
|
|
154
|
-
|
|
155
|
-
| Agent | MCP config | Instructions file |
|
|
156
|
-
|---|---|---|
|
|
157
|
-
| `claude` | `.mcp.json` | `CLAUDE.md` |
|
|
158
|
-
| `codex` | `.codex/config.toml` | `AGENTS.md` |
|
|
159
|
-
| `gemini` | `~/.gemini/settings.json` ¹ | `GEMINI.md` |
|
|
160
|
-
| `vibe` | `~/.vibe/config.toml` ² | — |
|
|
161
|
-
|
|
162
|
-
¹ Gemini CLI MCP config is global (not project-scoped). Restart Gemini CLI after running.
|
|
163
|
-
² Mistral Vibe MCP config is global (not project-scoped). Restart Vibe after running.
|
|
164
|
-
|
|
165
|
-
When creating a pull request, the agent calls `codiff_diff(base_ref="main", head_ref="HEAD", format="mermaid")` and embeds the returned diagram in the PR description. GitHub renders Mermaid natively — no plugin needed.
|
|
166
167
|
|
|
167
168
|
## Reading the terminal output
|
|
168
169
|
|
|
@@ -195,10 +196,10 @@ When two changed classes in the same file are related, each class box shows a di
|
|
|
195
196
|
|
|
196
197
|
```
|
|
197
198
|
╭╌╌╌ PageAwarePreChunker ╌╌╌╮
|
|
198
|
-
│ calls
|
|
199
|
-
│ ──────────────
|
|
200
|
-
│ + __init__
|
|
201
|
-
|
|
199
|
+
│ calls PageAwareBuilder │
|
|
200
|
+
│ ────────────── │
|
|
201
|
+
│ + __init__ │
|
|
202
|
+
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
|
|
202
203
|
```
|
|
203
204
|
|
|
204
205
|
Relationship types: `calls` (method calls to another class) and `inherits` (superclass relationship detected from class definitions).
|
|
@@ -209,10 +209,21 @@ _INIT_AGENTS = {
|
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
def _run_init(repo_path: str, agent: str) -> None:
|
|
212
|
+
import subprocess
|
|
213
|
+
|
|
214
|
+
from codiff.diff.indexer import ensure_indexed
|
|
215
|
+
|
|
212
216
|
repo_path = os.path.abspath(repo_path)
|
|
213
217
|
print(f"\nConfiguring codiff for {agent} in {repo_path}\n")
|
|
214
218
|
_INIT_AGENTS[agent](repo_path)
|
|
215
219
|
|
|
220
|
+
print(" Building initial call-graph index...")
|
|
221
|
+
try:
|
|
222
|
+
ensure_indexed(repo_path, "HEAD", max_workers=_DEFAULT_WORKERS)
|
|
223
|
+
print(" Index complete.\n")
|
|
224
|
+
except subprocess.CalledProcessError:
|
|
225
|
+
print(" Skipped: not a git repository. Index will be built on first diff.\n")
|
|
226
|
+
|
|
216
227
|
|
|
217
228
|
def _run_diff(
|
|
218
229
|
repo_path: str,
|
|
@@ -166,34 +166,41 @@ def parse_repository(
|
|
|
166
166
|
"[timing] file walk (collect): %.2fs (%d files)", time.perf_counter() - t0, len(pending)
|
|
167
167
|
)
|
|
168
168
|
|
|
169
|
-
# Phase 2: parse files
|
|
170
|
-
#
|
|
171
|
-
#
|
|
169
|
+
# Phase 2: parse files. When max_workers <= 1, run inline in the calling
|
|
170
|
+
# process — no subprocess, no inherited file descriptors (required for MCP
|
|
171
|
+
# stdio servers where child processes inherit the JSON-RPC pipes and corrupt
|
|
172
|
+
# the channel). With multiple workers, use ProcessPoolExecutor as before.
|
|
172
173
|
t0 = time.perf_counter()
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
174
|
+
if max_workers <= 1:
|
|
175
|
+
_init_mp_worker(modules_dict)
|
|
176
|
+
file_results = [_parse_file_mp(args) for args in pending]
|
|
177
|
+
else:
|
|
178
|
+
chunksize = max(1, len(pending) // (max_workers * 8))
|
|
179
|
+
with ProcessPoolExecutor(
|
|
180
|
+
max_workers=max_workers,
|
|
181
|
+
initializer=_init_mp_worker,
|
|
182
|
+
initargs=(modules_dict,),
|
|
183
|
+
) as pool:
|
|
184
|
+
file_results = list(pool.map(_parse_file_mp, pending, chunksize=chunksize))
|
|
185
|
+
|
|
186
|
+
for result in file_results:
|
|
187
|
+
if result is None:
|
|
188
|
+
continue
|
|
189
|
+
ext, rel, funcs, classes, imports, mod_doc = result
|
|
190
|
+
resolver_cls = ext_to_resolver[ext]
|
|
191
|
+
if mod_doc:
|
|
192
|
+
module_docstrings[rel] = mod_doc
|
|
193
|
+
resolver_funcs[resolver_cls].extend(funcs)
|
|
194
|
+
resolver_classes[resolver_cls].extend(classes)
|
|
195
|
+
resolver_imports[resolver_cls].update(imports)
|
|
196
|
+
for cls in classes:
|
|
197
|
+
if cls.docstring:
|
|
198
|
+
class_docstrings[cls.name] = cls.docstring
|
|
192
199
|
|
|
193
200
|
n_fresh = sum(len(f) for f in resolver_funcs.values())
|
|
194
201
|
logger.debug(
|
|
195
|
-
"[timing] parse files (
|
|
196
|
-
max_workers,
|
|
202
|
+
"[timing] parse files (%s): %.2fs (%d functions, %d classes)",
|
|
203
|
+
f"{max_workers} workers" if max_workers > 1 else "sequential",
|
|
197
204
|
time.perf_counter() - t0,
|
|
198
205
|
n_fresh,
|
|
199
206
|
sum(len(c) for c in resolver_classes.values()),
|
|
@@ -168,10 +168,15 @@ class BaseCallResolver(ABC):
|
|
|
168
168
|
global _mp_resolver_instance
|
|
169
169
|
_mp_resolver_instance = self
|
|
170
170
|
try:
|
|
171
|
-
|
|
172
|
-
for
|
|
173
|
-
for func_id, resolved_calls in
|
|
171
|
+
if max_workers <= 1:
|
|
172
|
+
for batch in batches:
|
|
173
|
+
for func_id, resolved_calls in _resolve_batch_mp(batch):
|
|
174
174
|
id_to_func[func_id].calls = resolved_calls
|
|
175
|
+
else:
|
|
176
|
+
with ProcessPoolExecutor(max_workers=max_workers) as pool:
|
|
177
|
+
for batch_result in pool.map(_resolve_batch_mp, batches, chunksize=1):
|
|
178
|
+
for func_id, resolved_calls in batch_result:
|
|
179
|
+
id_to_func[func_id].calls = resolved_calls
|
|
175
180
|
finally:
|
|
176
181
|
_mp_resolver_instance = None
|
|
177
182
|
|
|
@@ -46,7 +46,7 @@ def codiff_diff(
|
|
|
46
46
|
head_ref: Optional[str] = None,
|
|
47
47
|
include_tests: bool = False,
|
|
48
48
|
include_deleted: bool = False,
|
|
49
|
-
format: str = "
|
|
49
|
+
format: str = "mermaid",
|
|
50
50
|
) -> str:
|
|
51
51
|
"""Compute and render the structural call-graph diff.
|
|
52
52
|
|
|
@@ -62,6 +62,7 @@ def codiff_diff(
|
|
|
62
62
|
head_ref=head_ref,
|
|
63
63
|
include_tests=include_tests,
|
|
64
64
|
include_deleted=include_deleted,
|
|
65
|
+
max_workers=1,
|
|
65
66
|
)
|
|
66
67
|
head_label = head_ref or "working tree"
|
|
67
68
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codiff
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Structural call-graph diff for codebases, built for coding agents
|
|
5
5
|
Author-email: Issa Hammoud <issa.hammoud@outlook.com>
|
|
6
6
|
License: Apache License
|
|
@@ -347,6 +347,31 @@ pip install codiff
|
|
|
347
347
|
|
|
348
348
|
## Usage
|
|
349
349
|
|
|
350
|
+
### Agent integration (MCP + project instructions)
|
|
351
|
+
|
|
352
|
+
Run once per project to configure your coding agent:
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
codiff init --agent claude # Claude Code
|
|
356
|
+
codiff init --agent codex # OpenAI Codex CLI
|
|
357
|
+
codiff init --agent gemini # Gemini CLI
|
|
358
|
+
codiff init --agent vibe # Mistral Vibe
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Each command writes the MCP server config and a project instructions file telling the agent to use the `codiff_diff` MCP tool when creating pull requests:
|
|
362
|
+
|
|
363
|
+
| Agent | MCP config | Instructions file |
|
|
364
|
+
|---|---|---|
|
|
365
|
+
| `claude` | `.mcp.json` | `CLAUDE.md` |
|
|
366
|
+
| `codex` | `.codex/config.toml` | `AGENTS.md` |
|
|
367
|
+
| `gemini` | `~/.gemini/settings.json` ¹ | `GEMINI.md` |
|
|
368
|
+
| `vibe` | `~/.vibe/config.toml` ² | — |
|
|
369
|
+
|
|
370
|
+
¹ Gemini CLI MCP config is global (not project-scoped). Restart Gemini CLI after running.
|
|
371
|
+
² Mistral Vibe MCP config is global (not project-scoped). Restart Vibe after running.
|
|
372
|
+
|
|
373
|
+
When creating a pull request, the agent calls `codiff_diff(base_ref="main", head_ref="HEAD", format="mermaid")` and embeds the returned diagram in the PR description. GitHub renders Mermaid natively — no plugin needed.
|
|
374
|
+
|
|
350
375
|
### CLI
|
|
351
376
|
|
|
352
377
|
```bash
|
|
@@ -377,30 +402,6 @@ codiff init --agent <agent>
|
|
|
377
402
|
| `mermaid` | Two Mermaid `classDiagram` blocks — paste into any Markdown file or PR description |
|
|
378
403
|
| `json` | Structured JSON — consumed by editor integrations (e.g. the VS Code extension) |
|
|
379
404
|
|
|
380
|
-
### Agent integration (MCP + project instructions)
|
|
381
|
-
|
|
382
|
-
Run once per project to configure your coding agent:
|
|
383
|
-
|
|
384
|
-
```bash
|
|
385
|
-
codiff init --agent claude # Claude Code
|
|
386
|
-
codiff init --agent codex # OpenAI Codex CLI
|
|
387
|
-
codiff init --agent gemini # Gemini CLI
|
|
388
|
-
codiff init --agent vibe # Mistral Vibe
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
Each command writes the MCP server config and a project instructions file telling the agent to use the `codiff_diff` MCP tool when creating pull requests:
|
|
392
|
-
|
|
393
|
-
| Agent | MCP config | Instructions file |
|
|
394
|
-
|---|---|---|
|
|
395
|
-
| `claude` | `.mcp.json` | `CLAUDE.md` |
|
|
396
|
-
| `codex` | `.codex/config.toml` | `AGENTS.md` |
|
|
397
|
-
| `gemini` | `~/.gemini/settings.json` ¹ | `GEMINI.md` |
|
|
398
|
-
| `vibe` | `~/.vibe/config.toml` ² | — |
|
|
399
|
-
|
|
400
|
-
¹ Gemini CLI MCP config is global (not project-scoped). Restart Gemini CLI after running.
|
|
401
|
-
² Mistral Vibe MCP config is global (not project-scoped). Restart Vibe after running.
|
|
402
|
-
|
|
403
|
-
When creating a pull request, the agent calls `codiff_diff(base_ref="main", head_ref="HEAD", format="mermaid")` and embeds the returned diagram in the PR description. GitHub renders Mermaid natively — no plugin needed.
|
|
404
405
|
|
|
405
406
|
## Reading the terminal output
|
|
406
407
|
|
|
@@ -433,10 +434,10 @@ When two changed classes in the same file are related, each class box shows a di
|
|
|
433
434
|
|
|
434
435
|
```
|
|
435
436
|
╭╌╌╌ PageAwarePreChunker ╌╌╌╮
|
|
436
|
-
│ calls
|
|
437
|
-
│ ──────────────
|
|
438
|
-
│ + __init__
|
|
439
|
-
|
|
437
|
+
│ calls PageAwareBuilder │
|
|
438
|
+
│ ────────────── │
|
|
439
|
+
│ + __init__ │
|
|
440
|
+
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
|
|
440
441
|
```
|
|
441
442
|
|
|
442
443
|
Relationship types: `calls` (method calls to another class) and `inherits` (superclass relationship detected from class definitions).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|