Skip to content

Commit 2e21dad

Browse files
Add Codex CLI provider and project integration (#348)
* feat: add Codex CLI provider and project integration (#195) Add a local Codex CLI LLM provider built on authenticated `codex exec` sessions: argv-based subprocess (no shell), JSONL parsing tolerant of non-JSON noise, an async semaphore, a 600s exec timeout with kill, reasoning mapped to `model_reasoning_effort`, and zero-cost subscription usage tracking (flagged `estimated` when Codex omits usage). Add project-local Codex setup: `.codex/config.toml` MCP server, `.codex` lifecycle hooks (SessionStart / UserPromptSubmit / PostToolUse) installed via the import-isolated `repowise-augment` entry point, `.codex-plugin` metadata, skills, a plugin marketplace entry, and managed `AGENTS.md` generation reusing the existing marker-merge generator. Wire reasoning across all LLM providers (base interface + per-provider model discovery and supported reasoning modes) and add a richer interactive provider / model / reasoning selection flow to `repowise init`, with new `--codex/--no-codex` and `--agents/--no-agents` flags. Codex setup is opt-in: interactive runs prompt (default no); non-interactive runs require `--codex`. Squashes the six commits from #195 and rebases them onto current main, resolving conflicts from the init_cmd/ and ui/ package splits, the editor-setup integration abstraction, and the provider cost-tracker inline-await change: - feat: add Codex editor integration - docs: document Codex setup - Reasoning work - Add provider model discovery to init - Accept cache hints in Codex provider - Close Codex subprocess transport * fix(codex): address review — event-loop blocking, TOML safety, hook gating Follow-up fixes from a post-merge review of the Codex integration: - Run the Codex `_build_command` reasoning-catalog load and Gemini's lazy model discovery via `asyncio.to_thread`, so a cold `codex debug models` call or a paginated Gemini `/models` fetch can't stall every concurrent generation coroutine on the event loop. - Re-validate the merged `.codex/config.toml` with `tomllib` before writing in `save_codex_mcp_config` / `enable_codex_hooks_feature`. The table-rewrite regex only matches the bare key spelling; a quoted or inline `repowise`/ `features` entry would otherwise append a duplicate-key block and corrupt the user's file. Now it aborts cleanly, original file untouched. - Gate the edit-tool PostToolUse freshness notice on `client == "codex"` so a future widening of the Claude installer's matcher can't emit Codex banners to existing Claude Code users. Adds a regression test. --------- Co-authored-by: Selene29 <funmailfach@web.de>
1 parent b0c8954 commit 2e21dad

79 files changed

Lines changed: 5716 additions & 398 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/plugins/marketplace.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "repowise",
3+
"interface": {
4+
"displayName": "Repowise"
5+
},
6+
"plugins": [
7+
{
8+
"name": "codex",
9+
"source": {
10+
"source": "local",
11+
"path": "./plugins/codex"
12+
},
13+
"policy": {
14+
"installation": "AVAILABLE",
15+
"authentication": "ON_INSTALL"
16+
},
17+
"category": "Productivity"
18+
}
19+
]
20+
}

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ source code and no memory of how the codebase got there.
5050

5151
repowise fixes that. It indexes your codebase into **five intelligence layers**
5252
dependency graph, git history, auto-generated docs, architectural decisions, and
53-
code health — and exposes them to Claude Code (and any MCP-compatible agent)
53+
code health — and exposes them to Claude Code, Codex, and any MCP-compatible agent
5454
through **nine task-shaped tools**. The result: your agent answers *"why does
5555
auth work this way?"* instead of *"here is what `auth.ts` contains"* — with
5656
**fewer tool calls, fewer file reads, and lower cost per query, at comparable
@@ -255,6 +255,10 @@ repowise serve # workspace dashboard + per-repo pages
255255
`repowise init` automatically registers the MCP server, installs
256256
PreToolUse/PostToolUse hooks in `~/.claude/settings.json`, generates `.mcp.json`
257257
at the project root, and offers a post-commit hook that keeps everything in sync.
258+
If the Codex CLI is installed and logged in, interactive runs also offer to write
259+
project-local `.codex/config.toml`, `.codex/hooks.json`, and a managed `AGENTS.md`;
260+
non-interactive runs require `--codex`. Skip Codex setup with `--no-codex`; force or
261+
skip `AGENTS.md` with `--agents` / `--no-agents`.
258262

259263
To add the MCP server to another editor manually:
260264

@@ -273,7 +277,7 @@ To add the MCP server to another editor manually:
273277
> commit-triggered update takes **under 30 seconds** and only regenerates the
274278
> pages your change touched.
275279
276-
**Docs:** [Quickstart](docs/QUICKSTART.md) · [User Guide](docs/USER_GUIDE.md) · [CLI Reference](docs/CLI_REFERENCE.md) · [MCP Tools](docs/MCP_TOOLS.md) · [Workspaces](docs/WORKSPACES.md) · [Auto-Sync](docs/AUTO_SYNC.md) · [Config](docs/CONFIG.md)
280+
**Docs:** [Quickstart](docs/QUICKSTART.md) · [User Guide](docs/USER_GUIDE.md) · [CLI Reference](docs/CLI_REFERENCE.md) · [Codex](docs/CODEX.md) · [MCP Tools](docs/MCP_TOOLS.md) · [Workspaces](docs/WORKSPACES.md) · [Auto-Sync](docs/AUTO_SYNC.md) · [Config](docs/CONFIG.md)
277281

278282
---
279283

@@ -311,8 +315,8 @@ Worked example (*"Add rate limiting to all API endpoints"* in 5 calls instead of
311315
| Private repo — no cloud || ❌ in development | ❌ OSS forks only | ✅ Enterprise tier ||
312316
| Auto-generated documentation || ✅ Gemini || ✅ PR2Doc ||
313317
| MCP server for AI agents | ✅ 9 tools || ✅ 3 tools |||
314-
| Proactive agent hooks |Pre + PostToolUse |||||
315-
| Auto-generated CLAUDE.md ||||||
318+
| Proactive agent hooks |Claude + Codex hooks |||||
319+
| Auto-generated AI instructions (`CLAUDE.md`, `AGENTS.md`) ||||||
316320
| Code health score (1–10) | ✅ 25 biomarkers |||| ✅ 25–30 |
317321
| Brain Method / LCOM4 / god class ||||||
318322
| Test-coverage intelligence | ✅ LCOV/Cobertura/Clover |||||

docs/CLI_REFERENCE.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ repowise init .
4242
1. **Ingestion** — walks every file, parses AST with tree-sitter, builds a two-tier dependency graph (file + symbol nodes), indexes git history (churn, hotspots, ownership, bus factor)
4343
2. **Analysis** — detects dead code, extracts architectural decisions from inline markers, READMEs, and git history. Runs Leiden community detection and execution flow tracing.
4444
3. **Generation** — sends structured prompts to the LLM, generates file-level, module-level, and repo-level wiki pages
45-
4. **Persistence** — stores everything in `.repowise/wiki.db`, builds search indexes, generates `CLAUDE.md`, registers MCP server and Claude Code hooks
45+
4. **Persistence** — stores everything in `.repowise/wiki.db`, builds search indexes, generates editor instruction files, registers MCP server and hooks
4646

4747
In workspace mode, adds: repo scanning, per-repo indexing, cross-repo analysis (co-changes, contracts, package deps), workspace CLAUDE.md generation.
4848

4949
**Options:**
5050

5151
| Flag | Description |
5252
|------|-------------|
53-
| `--provider` | LLM provider: `anthropic`, `openai`, `openrouter`, `gemini`, `deepseek`, `ollama`, `litellm`, `mock` |
53+
| `--provider` | LLM provider: `anthropic`, `openai`, `openrouter`, `gemini`, `deepseek`, `ollama`, `litellm`, `codex_cli`, `mock` |
5454
| `--model` | Model name override (e.g., `claude-sonnet-4-6`) |
5555
| `--embedder` | Embedder for semantic search: `gemini`, `openai`, `mock` |
5656
| `--index-only` | Skip LLM generation. Only parse, build graph, and index git. Free. |
@@ -62,26 +62,30 @@ In workspace mode, adds: repo scanning, per-repo indexing, cross-repo analysis (
6262
| `--exclude / -x` | Gitignore-style exclusion patterns. Repeatable. |
6363
| `--include-submodules` | Include git submodule directories. |
6464
| `--concurrency` | Max concurrent LLM calls (default: 5). |
65-
| `--reasoning` | Reasoning mode for supported providers: `auto`, `off`, or `minimal` (default: `auto`). |
65+
| `--reasoning` | Reasoning mode for supported providers: `auto`, `off`/`none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max` (default: `auto`). |
6666
| `--resume` | Resume from the last checkpoint if interrupted. |
6767
| `--force` | Regenerate all pages even if they exist. |
6868
| `--commit-limit` | Max commits to analyze per file (default: 500). |
6969
| `--follow-renames` | Track file renames in git history. |
7070
| `--no-claude-md` | Don't generate `CLAUDE.md`. |
71+
| `--agents / --no-agents` | Generate or skip managed `AGENTS.md` for Codex. Persists the preference. |
72+
| `--codex / --no-codex` | Generate or skip project-local Codex MCP/hooks setup. Interactive runs prompt when Codex CLI is installed and logged in; non-interactive runs require `--codex`. |
7173
| `--yes / -y` | Skip confirmation prompts. |
7274

7375
**Examples:**
7476

7577
```bash
7678
repowise init # interactive
7779
repowise init --provider anthropic --yes # automated
80+
repowise init --provider codex_cli --codex --yes # use authenticated Codex CLI
7881
repowise init --index-only # free, no LLM
7982
repowise init --dry-run # preview cost
8083
repowise init --test-run # quick test (10 files)
8184
repowise init --provider openai --model qwen3 --reasoning off
8285
repowise init --provider openrouter --model openai/gpt-5 --reasoning minimal
8386
repowise init -x vendor/ -x "*.gen.go" # exclude patterns
8487
repowise init --include-submodules # include submodules
88+
repowise init --no-codex --no-agents # skip Codex project files
8589
repowise init . # workspace mode
8690
repowise init . --index-only -x "node_modules/" # workspace, no LLM
8791
```
@@ -99,13 +103,14 @@ Incrementally update wiki pages for files changed since the last sync.
99103
| `--provider` | Override LLM provider for this run |
100104
| `--model` | Override model |
101105
| `--since` | Git ref to diff from (overrides `state.json`) |
102-
| `--reasoning` | Reasoning mode for supported providers: `auto`, `off`, or `minimal` |
106+
| `--reasoning` | Reasoning mode for supported providers: `auto`, `off`/`none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max` |
103107
| `--cascade-budget` | Max pages to regenerate (default: auto) |
104108
| `--dry-run` | Show what would be updated without regenerating |
105109
| `--workspace` | Update all stale repos in the workspace + cross-repo analysis |
106110
| `--no-workspace` | Force single-repo mode (handy when running from a workspace root) |
107111
| `--repo` | Update a specific workspace repo by alias |
108112
| `--full` | Upgrade a fast (`--mode fast`) index to a full one — see below. Single-repo only. |
113+
| `--agents / --no-agents` | Generate or skip managed `AGENTS.md` after update. Persists the preference. |
109114

110115
**First-time indexing:** as of v0.8, `update --workspace` now runs full first-time indexing for workspace entries that have no `.repowise/` dir yet (previously skipped with `"not_indexed"`). The pipeline runs index-only — no LLM cost — and writes a state.json marker so `repowise update --repo <alias> --docs` later picks up doc generation cleanly.
111116

@@ -452,6 +457,8 @@ See [Auto-Sync](AUTO_SYNC.md) for all sync methods (hooks, file watcher, webhook
452457

453458
Start the MCP server for AI editor integration.
454459

460+
If `PATH` is omitted, `repowise mcp` first walks upward from the current directory to the nearest initialized `.repowise` repository. This lets project-local Codex config use `args = ["mcp"]` with `cwd` set to the repo root.
461+
455462
**Options:**
456463

457464
| Flag | Description |
@@ -460,7 +467,7 @@ Start the MCP server for AI editor integration.
460467
| `--port` | Port for SSE transport (default: 7338) |
461468

462469
```bash
463-
repowise mcp --transport stdio # for Claude Code, Cursor, etc.
470+
repowise mcp --transport stdio # for Claude Code, Codex, Cursor, etc.
464471
repowise mcp --transport sse --port 7338 # for web clients
465472
```
466473

@@ -480,6 +487,12 @@ repowise generate-claude-md --stdout
480487

481488
---
482489

490+
### `AGENTS.md`
491+
492+
`repowise init --codex` generates managed `AGENTS.md` for Codex. `repowise update` refreshes it when `editor_files.agents_md` is enabled in config, or when `--agents` is passed. User content outside the Repowise managed markers is preserved.
493+
494+
---
495+
483496
### `repowise export [PATH]`
484497

485498
Export wiki pages to files.
@@ -560,4 +573,4 @@ repowise delete <repo-id> --force # delete a specific repo's index, no pr
560573

561574
### `repowise augment`
562575

563-
Hook-driven context enrichment engine. Not meant to be called manually — invoked by Claude Code hooks installed during `repowise init`.
576+
Hook-driven context enrichment engine. Not meant to be called manually — invoked by Claude Code and Codex hooks installed during `repowise init`. Claude Code uses it for search-result enrichment and stale-wiki checks; Codex uses it for `SessionStart`, `UserPromptSubmit`, and `PostToolUse` lifecycle guidance.

docs/CODEX.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Codex Integration
2+
3+
Repowise supports Codex in three separate ways:
4+
5+
- Project setup for Codex MCP and lifecycle hooks.
6+
- The `codex_cli` LLM provider for wiki generation through your authenticated Codex CLI subscription.
7+
- A local Codex plugin with bundled MCP, hooks, and Repowise skills.
8+
9+
These features use project-local files. `repowise init --codex` writes under the repository, not to global `~/.codex/config.toml`.
10+
11+
## Prerequisites
12+
13+
Install and authenticate the Codex CLI:
14+
15+
```bash
16+
npm install -g @openai/codex
17+
codex login
18+
codex login status
19+
```
20+
21+
Repowise checks `codex --version` and `codex login status`. When both succeed, interactive `repowise init` offers to enable Codex project setup. Non-interactive runs require `--codex`; use `--no-codex` to skip the prompt.
22+
23+
## Project MCP Setup
24+
25+
Run from the repository root:
26+
27+
```bash
28+
repowise init --codex
29+
```
30+
31+
Repowise merges this server into `.codex/config.toml`:
32+
33+
```toml
34+
[mcp_servers.repowise]
35+
command = "repowise"
36+
args = ["mcp"]
37+
cwd = "/absolute/path/to/repo"
38+
startup_timeout_sec = 20
39+
40+
[features]
41+
hooks = true
42+
```
43+
44+
The MCP server uses `repowise mcp` without a path. In no-path mode, Repowise walks upward from the current directory to the nearest initialized `.repowise` repository.
45+
46+
Smoke check:
47+
48+
```bash
49+
codex mcp list
50+
```
51+
52+
## Codex Hooks
53+
54+
Repowise writes hooks to `.codex/hooks.json`, not inline `[hooks]` tables. The default hooks call the import-isolated `repowise-augment` entry point for:
55+
56+
- `SessionStart` to add Repowise MCP workflow guidance.
57+
- `UserPromptSubmit` to remind Codex when Repowise context is available.
58+
- `PostToolUse` for `Bash` to detect git operations that make the wiki stale.
59+
- `PostToolUse` for `apply_patch`, `Edit`, and `Write` to remind Codex after edits.
60+
61+
Claude Code has its own search-result enrichment hook path for `Grep` and `Glob`. Codex setup stays focused on lifecycle guidance and freshness checks instead of trying to reuse that Claude-specific search enrichment.
62+
63+
## `codex_cli` Provider
64+
65+
Use `codex_cli` when you want Repowise page generation to run through your Codex CLI subscription instead of an API key:
66+
67+
```bash
68+
repowise init --provider codex_cli --codex --yes
69+
```
70+
71+
You can also persist it:
72+
73+
```bash
74+
REPOWISE_PROVIDER=codex_cli repowise update
75+
```
76+
77+
The provider runs:
78+
79+
```bash
80+
codex exec --ephemeral --sandbox read-only --json --cd /absolute/path/to/repo -
81+
```
82+
83+
Repowise sends the prompt on stdin, parses Codex JSONL output, records token usage from `turn.completed.usage`, and treats `codex_cli/*` cost as `$0.00` because subscription billing happens outside Repowise API pricing. `--model` is passed to Codex only when you explicitly configure a model. `--reasoning minimal` maps to Codex `model_reasoning_effort="low"`; `low`, `medium`, `high`, and `xhigh` pass through when the selected Codex model advertises those levels. `off`/`none` is not supported by the Codex CLI provider.
84+
85+
Smoke check:
86+
87+
```bash
88+
codex exec --ephemeral --sandbox read-only --json "Return exactly OK"
89+
```
90+
91+
## Plugin And Skills
92+
93+
The repository includes a local Codex plugin:
94+
95+
```text
96+
.agents/plugins/marketplace.json
97+
plugins/codex/.codex-plugin/plugin.json
98+
plugins/codex/.mcp.json
99+
plugins/codex/hooks/hooks.json
100+
plugins/codex/skills/*/SKILL.md
101+
```
102+
103+
From the Repowise repository root, add the local marketplace to Codex, then install the Repowise plugin from the Codex plugin browser:
104+
105+
```bash
106+
codex plugin marketplace add .
107+
codex
108+
/plugins
109+
```
110+
111+
The plugin bundles Repowise MCP, lifecycle hooks, and Codex-neutral skills for exploration, pre-modification checks, architectural decisions, and dead-code cleanup. It does not add Claude-style slash commands. Plugin-bundled hooks are opt-in in current Codex releases; enable them with `[features] plugin_hooks = true` if you want hooks loaded from an installed plugin.
112+
113+
## AGENTS.md
114+
115+
`repowise init --codex` generates a managed `AGENTS.md` by default. `repowise update` refreshes it when `editor_files.agents_md` is enabled, or when `--agents` is passed. The Repowise section is bounded by managed markers and user content outside the markers is preserved.
116+
117+
Controls:
118+
119+
```bash
120+
repowise init --no-agents
121+
repowise init --agents
122+
repowise update --no-agents
123+
repowise update --agents
124+
```
125+
126+
The generated section tells Codex when to use Repowise MCP tools for overview, search, context, risk, why/decision history, dependency tracing, diagrams, and dead-code cleanup.
127+
128+
## Official Codex Docs
129+
130+
- [Codex hooks](https://developers.openai.com/codex/hooks)
131+
- [Codex MCP](https://developers.openai.com/codex/mcp)
132+
- [Codex non-interactive mode](https://developers.openai.com/codex/noninteractive)
133+
- [Codex plugins](https://developers.openai.com/codex/plugins)
134+
- [Build Codex plugins](https://developers.openai.com/codex/plugins/build)
135+
- [Codex skills](https://developers.openai.com/codex/skills)
136+
- [AGENTS.md instructions](https://developers.openai.com/codex/guides/agents-md)

docs/MCP_TOOLS.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# MCP Tools Reference
22

3-
repowise exposes 9 tools via the [Model Context Protocol](https://modelcontextprotocol.io) (MCP). These tools give AI coding assistants (Claude Code, Cursor, Cline, Windsurf) structured access to your codebase intelligence — dependency graph, git history, documentation, and architectural decisions.
3+
repowise exposes 9 tools via the [Model Context Protocol](https://modelcontextprotocol.io) (MCP). These tools give AI coding assistants (Claude Code, Codex, Cursor, Cline, Windsurf) structured access to your codebase intelligence — dependency graph, git history, documentation, and architectural decisions.
44

55
**Start the MCP server:**
66

77
```bash
8-
repowise mcp --transport stdio # for Claude Code, Cursor, etc.
8+
repowise mcp --transport stdio # for Claude Code, Codex, Cursor, etc.
99
repowise mcp --transport sse --port 7338 # for web clients
1010
```
1111

12-
**Auto-setup for Claude Code:** `repowise init` automatically registers the MCP server and installs proactive hooks. No manual configuration needed.
12+
**Auto-setup:** `repowise init` automatically registers the MCP server and installs proactive hooks for Claude Code. `repowise init --codex` writes project-local Codex MCP config and hooks.
1313

1414
---
1515

@@ -287,9 +287,10 @@ The MCP server automatically enriches responses with cross-repo intelligence:
287287

288288
## Proactive Hooks (Complementary)
289289

290-
In addition to the 9 MCP tools, `repowise init` installs Claude Code hooks that provide **passive, automatic** context enrichment:
290+
In addition to the 9 MCP tools, `repowise init` installs AI-agent hooks (Claude Code and Codex) that provide **passive, automatic** context enrichment:
291291

292-
- **PreToolUse** — every `Grep`/`Glob` call is enriched with graph context (symbols, importers, dependencies, git signals) at ~24ms latency
293-
- **PostToolUse** — after git commits, the agent is notified when the wiki is stale
292+
- **Claude Code PostToolUse** — broad or zero-result `Grep`/`Glob` calls can be enriched with graph context, and git operations can trigger stale-wiki notices.
293+
- **Codex SessionStart/UserPromptSubmit** — Codex receives concise Repowise MCP workflow guidance when a session or prompt starts.
294+
- **Codex PostToolUse** — after edits or git operations, Codex receives a freshness reminder when indexed context may be stale.
294295

295-
Hooks fire automatically on every search. MCP tools are for deeper, on-demand investigation. See [Auto-Sync](AUTO_SYNC.md) for details.
296+
Hooks are lightweight reminders. MCP tools are for deeper, on-demand investigation. See [Auto-Sync](AUTO_SYNC.md) and [Codex Integration](CODEX.md) for details.

docs/QUICKSTART.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ pip install "repowise[anthropic]"
1414

1515
Or substitute `openai`, `gemini`, `litellm`, or `all` depending on your LLM provider.
1616

17+
For the Codex CLI subscription flow, no provider SDK or API key is required:
18+
19+
```bash
20+
pip install repowise
21+
npm install -g @openai/codex
22+
codex login
23+
```
24+
1725
**Requirements:** Python 3.11+, Git.
1826

1927
## 2. Set Your API Key
@@ -24,6 +32,12 @@ export ANTHROPIC_API_KEY="sk-ant-..."
2432

2533
Or `OPENAI_API_KEY`, `GEMINI_API_KEY` — whichever provider you installed.
2634

35+
If you use Codex as the LLM provider, authenticate the Codex CLI instead:
36+
37+
```bash
38+
codex login status
39+
```
40+
2741
On Windows PowerShell:
2842

2943
```powershell
@@ -39,6 +53,12 @@ repowise init
3953

4054
Repowise will walk you through an interactive setup — choose a provider, review the cost estimate, and confirm. It parses every file, builds a dependency graph, indexes git history, and generates wiki pages.
4155

56+
Codex users can force project-local MCP/hooks setup and use the Codex CLI provider in one command:
57+
58+
```bash
59+
repowise init --codex --provider codex_cli --yes
60+
```
61+
4262
A typical run on a ~500-file codebase takes 5-15 minutes.
4363

4464
**Want to skip LLM costs?** Use `--index-only` to just parse and analyze without generating docs:
@@ -67,13 +87,15 @@ repowise serve
6787

6888
If Node.js 20+ is installed, the web UI starts automatically. Otherwise, use Docker (see below).
6989

70-
**Connect to your AI editor (Claude Code, Cursor, Cline, Windsurf):**
90+
**Connect to your AI editor (Claude Code, Codex, Cursor, Cline, Windsurf):**
7191

7292
```bash
7393
repowise mcp --transport stdio
7494
```
7595

76-
> **Automatic for Claude Code:** `repowise init` already registers the MCP server and installs PreToolUse/PostToolUse hooks in `~/.claude/settings.json`. Every `Grep`/`Glob` call is automatically enriched with graph context (importers, dependencies, symbols, git signals). After git commits, the agent is notified when the wiki is stale.
96+
> **Automatic for Claude Code:** `repowise init` already registers the MCP server and installs PostToolUse hooks in `~/.claude/settings.json`. Broad or zero-result `Grep`/`Glob` searches can receive graph context, and git operations can notify the agent when the wiki is stale.
97+
98+
> **Automatic for Codex:** run `repowise init --codex` to write project-local `.codex/config.toml`, `.codex/hooks.json`, and managed `AGENTS.md`. See [Codex Integration](CODEX.md).
7799
78100
## 5. Keep It in Sync
79101

0 commit comments

Comments
 (0)