@octocodeai/octocode-tools-core 18.0.1 → 18.1.2

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.
package/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
 
6
6
  [![MCP Community Server](https://img.shields.io/badge/Model_Context_Protocol-Official_Community_Server-blue?style=flat-square)](https://github.com/modelcontextprotocol/servers)
7
7
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/bgauryy/octocode)
8
+ [![Glama score](https://glama.ai/mcp/servers/bgauryy/octocode/badges/score.svg)](https://glama.ai/mcp/servers/bgauryy/octocode)
8
9
 
9
10
  [![Website](https://img.shields.io/badge/Website-007ACC?style=for-the-badge&logo=link&logoColor=white)](https://octocode.ai)
10
11
  [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@Octocode-ai)
@@ -13,7 +14,7 @@
13
14
 
14
15
  **Evidence-first code research for AI agents and developers.**
15
16
 
16
- Evidence from your **local workspace** and **external** sources (GitHub repos, PRs, npm). One toolset: ripgrep + AST search, trees, precise reads, and LSP as a **CLI** or **MCP server**, backed by a **Rust engine** for fast, token-efficient results across single files or mega-repos.
17
+ Octocode researches **your local code and external code alike** (GitHub repos, PRs, npm) with one toolset: ripgrep + AST search, trees, precise reads, and LSP. Use it as a **CLI** or **MCP server**, backed by a **Rust engine** for fast, token-efficient results across single files or mega-repos.
17
18
 
18
19
  ---
19
20
 
@@ -21,7 +22,7 @@ Evidence from your **local workspace** and **external** sources (GitHub repos, P
21
22
 
22
23
  - [Quick Start](#quick-start)
23
24
  - [Why Octocode](#why-octocode)
24
- - [What You Can Do](#what-you-can-do)
25
+ - [Built for Research (Benchmarks)](#built-for-research-benchmarks)
25
26
  - [Tools](#tools)
26
27
  - [MCP](#mcp)
27
28
  - [CLI](#cli)
@@ -33,36 +34,45 @@ Evidence from your **local workspace** and **external** sources (GitHub repos, P
33
34
  - [Architecture](#architecture)
34
35
  - [Documentation](#documentation)
35
36
  - [Troubleshooting](#troubleshooting)
37
+ - [Agent Workflows](#agent-workflows)
36
38
 
37
39
  ---
38
40
 
39
41
  ## Quick Start
40
42
 
43
+ **Prerequisites:** Node.js 20.12+
44
+
41
45
  **1. Run the Octocode CLI with `npx`**
42
46
 
43
47
  ```bash
44
48
  npx octocode --help
45
49
  ```
46
50
 
47
- **2. Authenticate with GitHub** optional, but unlocks private repositories and higher API rate limits:
51
+ **2. Authenticate with GitHub** - optional, but unlocks private repositories and higher API rate limits:
48
52
 
49
53
  ```bash
50
54
  npx octocode auth login
51
55
  npx octocode status # verify the active token source
52
56
  ```
53
57
 
54
- **3. Choose your interface.** The same engine and tools run identically either way.
58
+ **3. Choose your interface.** Same tools and Rust engine on both. (Clone is on by
59
+ default in the CLI, opt-in for MCP.)
55
60
 
56
- **🖥️ CLI** research straight from your terminal:
61
+ **🖥️ CLI** - research straight from your terminal:
57
62
 
58
63
  ```bash
59
64
  npx octocode
60
65
  ```
61
66
 
62
- **🤖 MCP** one-click install:
67
+ **🤖 MCP** - one-click install:
63
68
 
64
69
  - [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=octocode&config=eyJjb21tYW5kIjoibnB4IiwidHlwZSI6InN0ZGlvIiwiYXJncyI6WyJAb2N0b2NvZGVhaS9tY3BAbGF0ZXN0Il19)
65
70
  - [<img src="https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code">](https://insiders.vscode.dev/redirect/mcp/install?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D)
71
+
72
+ <details>
73
+ <summary><b>Show more install options (Windsurf, Kiro, Goose, LM Studio, Claude Code)</b></summary>
74
+ <br>
75
+
66
76
  - [<img src="https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect/mcp/install?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D&quality=insiders)
67
77
  - [<img src="https://img.shields.io/badge/Windsurf-Install_Server-1a1a1a?style=flat-square&logoColor=white" alt="Install in Windsurf">](windsurf://mcp/install?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D)
68
78
  - [<img src="https://kiro.dev/images/add-to-kiro.svg" alt="Install in Kiro">](https://kiro.dev/launch/mcp/add?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D)
@@ -72,31 +82,76 @@ npx octocode
72
82
  **Claude Code:**
73
83
 
74
84
  ```bash
75
- claude mcp add-json octocode --scope user '{"command":"npx","type":"stdio","args":["@octocodeai/mcp@latest"]}'
85
+ claude mcp add-json octocode --scope user '{"command":"npx","type":"stdio","args":["octocode-mcp@latest"]}'
76
86
  ```
87
+ </details>
77
88
 
78
89
  **Any other client:** `npx octocode install`
79
90
 
80
- ➡️ Learn more at **[octocode.ai](https://octocode.ai)**.
91
+ ---
92
+
93
+ ### Use it as an MCP server
94
+
95
+ Add to your MCP client config (or use a one-click install above):
96
+
97
+ ```json
98
+ {
99
+ "octocode": {
100
+ "command": "npx",
101
+ "type": "stdio",
102
+ "args": ["octocode-mcp@latest"]
103
+ }
104
+ }
105
+ ```
106
+
107
+ Put a GitHub token and options under `env` (see [Configuration](#configuration)).
108
+
109
+ ### Use it as an agentic-friendly CLI
110
+
111
+ Just run `npx octocode`, agents figure out the rest. The bare command prints built-in usage and the full tool catalog, so any coding agent knows how to drive it out of the box, no MCP client or extra wiring required.
112
+
113
+ ```bash
114
+ npx octocode # self-describing usage for agents
115
+ npx octocode tools # list every tool
116
+ npx octocode tools localSearchCode --scheme # inspect a tool's schema
117
+ ```
118
+
119
+ Every MCP tool is also a plain command: JSON in, token-efficient YAML out. Local paths route to local tools; `owner/repo[/path]` routes to GitHub.
120
+
121
+ ```bash
122
+ npx octocode tools localSearchCode \
123
+ --queries '{"path":".","searchText":"authenticate","maxFiles":20}'
124
+ ```
125
+ ```yaml
126
+ results:
127
+ - id: localSearchCode-1
128
+ data:
129
+ files:
130
+ - path: src/auth.ts
131
+ matches:
132
+ - line: 12
133
+ value: "export async function authenticate(req: Request) {"
134
+ ```
135
+
136
+ Learn more at **[octocode.ai](https://octocode.ai)**.
81
137
 
82
138
  ---
83
139
 
84
140
  ## Why Octocode
85
141
 
86
- Agents write better code from evidence than from assumptions. Octocode turns *guess-driven* work into **research-driven** work. Before an agent changes, reviews, or explains code, it gathers real evidence from your local workspace **and** from GitHub repositories, pull requests, and npm packages, then hands it back as compact, citable context. *Code is truth; context is the map.*
87
-
88
- Most tools cover one slice: searching the web, or grepping your repo. Octocode covers the **whole research flow, end to end**:
142
+ Agents code better from evidence than from guesses. Octocode researches **two worlds with one flow**, your **local code** and **external code** on GitHub and npm, and hands back compact, citable context before an agent changes, reviews, or explains code. *Code is truth; context is the map.*
89
143
 
90
- - **Built for scale.** In organizations with thousands of repositories and endless code, Octocode is the solution: spot a pattern in one repo, follow it through the pull request that introduced it, then trace the same shape across other repos and your own files without leaving the conversation. Clone any repo and study it locally, on any machine.
91
- - **Smart GitHub workflows.** Parallel bulk queries and built-in **next-step hints** keep the agent on the cheapest path: search broadly, read narrowly, trace semantically. Each result points to the natural follow-up.
92
- - **No GitHub required.** Even without GitHub, clone any repository locally and point Octocode's local tools (search, structural AST, LSP, content) at it for the same evidence-first research.
93
- - **Reads the shape, not the noise.** Code is minified and skeletonized on the fly across 70+ languages, so an agent grasps a 100 KB file in a few hundred tokens instead of spending its context on boilerplate.
94
- - **Fast and self-contained.** Search, parsing, semantic navigation, and redaction run in one prebuilt **Rust engine**: quick on a laptop or a mega-repo, with no extra toolchain to install.
95
- - **Safe by default.** Every byte returned to the model is scanned and secrets redacted first (see [Security](#security)).
144
+ Most tools do one slice (web search, or grep your repo) and hand back a fixed blob. Octocode covers the whole loop and lets the **agent decide what data it needs next**:
96
145
 
97
- ## What You Can Do
146
+ - **Agent-driven, efficient flows.** Instead of one-shot dumps, Octocode chains cheap steps into an optimized research flow: broad code search, then fetch only the **exact matched lines/region**, with **smart pagination** and **out-of-the-box minification** so the model never over-fetches. Every result carries **next-step hints** to the cheapest follow-up.
147
+ - **Scales to monorepos.** Spot a pattern in one repo, follow the PR that introduced it, then trace it across other repos and your own files, without leaving the chat. Clone any repo and study it locally.
148
+ - **Smart GitHub flow.** Parallel bulk queries across code, PRs, commits, issues, and repos, all with the same search-broad, read-narrow, trace-semantically discipline.
149
+ - **Works without GitHub.** Clone any repo and point the local tools (search, AST, LSP, content) at it, same evidence-first flow.
150
+ - **Reads shape, not noise.** On-the-fly minify/skeletonize across 70+ languages: a 100 KB file in a few hundred tokens, not walls of boilerplate.
151
+ - **Fast, self-contained.** Search, parsing, navigation, and redaction run in one prebuilt **Rust engine**: quick on a laptop or a mega-repo, nothing extra to install.
152
+ - **Safe by default.** Every byte to the model is scanned and secrets redacted first (see [Security](#security)).
98
153
 
99
- Octocode is useful whenever the next coding step depends on finding and proving context, not guessing it.
154
+ **What you can do** (whenever the next step needs proven context, not a guess):
100
155
 
101
156
  | Need | Use Octocode to |
102
157
  |------|-----------------|
@@ -107,13 +162,86 @@ Octocode is useful whenever the next coding step depends on finding and proving
107
162
  | **Large-file context** | Minify, skeletonize, or paginate code so agents spend tokens on relevant structure instead of boilerplate. |
108
163
  | **Agent workflows** | Same engine via MCP, CLI, and Agent Skills. |
109
164
 
110
- See [Quick Start](#quick-start) to install in your terminal or AI assistant.
165
+ ---
166
+
167
+ ## Built for Research (Benchmarks)
168
+
169
+ Octocode is a **research layer for coding agents**: it finds and proves the context an agent
170
+ needs *before* it writes, reviews, or explains code, via **CLI or MCP**. It shines at **deep
171
+ research across many repositories**: connecting the dots from a symbol to its source, the PR
172
+ that changed it, and the same pattern in other repos. The benchmark measures the two things a
173
+ developer actually pays for:
174
+
175
+ - **Accuracy**: did the agent get the answer right?
176
+ - **Context cost**: how many characters the model had to read to get there. Fewer characters =
177
+ **lower token spend, faster turns, and sharper focus** (the model isn't buried in boilerplate).
178
+
179
+ We ran **30 real cross-repo questions** (dependency traces, call graphs, commit ranges, blast
180
+ radius, PR reviews), 3 passes each, against three GitHub setups a developer might use today:
181
+ plain `gh`, `gh` + Headroom (compression), and `gh` + RTK. A blind, neutral judge (gpt-5.5)
182
+ graded every answer.
183
+
184
+ ### Scorecard (30 Q × 3 passes per matchup, local build v18.1.1, blind neutral gpt-5.5 judge, 95% bootstrap CIs)
185
+
186
+ **Typical context per question**: how many characters the model reads to answer, relative to
187
+ Octocode (lower is better):
188
+
189
+ ```text
190
+ Octocode ███ 1.0× (baseline)
191
+ plain gh ██████ 2.0× more context
192
+ gh + Headroom ████████ 2.6× more context
193
+ gh + RTK ██████████ 3.2× more context
194
+ ```
195
+
196
+ | Dimension | Octocode | plain gh | gh + Headroom | gh + RTK |
197
+ |---|---:|---:|---:|---:|
198
+ | Correctness (/10) | ~9.2–9.3 | 9.3 | 8.6 | **9.4** |
199
+ | Chars, per-Q geo-mean (baseline÷Octo, 95% CI) | 1.0× | **2.0×** (1.5–2.6) | **2.6×** (1.9–3.7) | **3.2×** (2.4–4.5) |
200
+ | Correct-and-leaner wins (Octo / baseline) | n/a | 51 / 38 | 60 / 28 | 57 / 33 |
201
+ | Questions Octocode leaner | n/a | 67/89 | 63/88 | 68/90 |
202
+
203
+ **What this means for you:** at the **same accuracy** (all arms tie at ~9/10), Octocode answers
204
+ in **2–3× fewer characters** than every baseline, every 95% CI stays above 1×, and it is
205
+ leaner on ~72–75% of questions. That is directly less token spend and context bloat on each
206
+ research step. Even versus bare, disciplined `gh` (the leanest baseline) it is ~2× leaner, and
207
+ the lead grows on the hard multi-hop, large-file questions where agents usually derail.
208
+
209
+ **Why it's leaner without losing anything:**
210
+ - **Exact slices, not dumps**: reads the region, symbol, or diff you asked for, never a whole file or tree.
211
+ - **Lossless minification**: strips boilerplate across 70+ languages with zero data loss: a 100 KB file becomes a few hundred tokens of real structure.
212
+ - **No silent truncation**: you get the full slice; large results continue on demand via exact cursors.
213
+ - **One research loop**: GitHub + local + LSP + npm behind a single flow: structure → search → exact read → prove.
214
+
215
+ Full reports:
216
+ [vs plain gh](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/results/full-octocode-vs-gh-152630-2026-08-07.md) ·
217
+ [vs gh+Headroom](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/results/full-octocode-vs-headroom-134213-2026-08-07.md) ·
218
+ [vs gh+RTK](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/results/full-octocode-vs-rtk-162848-2026-08-07.md).
219
+
220
+ ### When to reach for Octocode vs a quick check
221
+
222
+ | Reach for **Octocode** when… | A **quick check** is enough when… |
223
+ |---|---|
224
+ | You need **exact field membership** (peer vs optional vs dev, version ranges). | You already know the file+line and just want to eyeball it. |
225
+ | The answer is a **trace across files/repos** (dependency → source → transport → parser chain). | You need one PR title, issue state, or a single `--json` field. |
226
+ | You want to **stay lean in context**: targeted reads, not whole-file/tree dumps. | The file is tiny and a full fetch is trivially cheap. |
227
+ | You need **reachability / call-graph proof** before a change. | A single grep hit already answers it. |
228
+
229
+ **Dig deeper:** [run](https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/skills/octocode-benchmark) ·
230
+ [design](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/skills/octocode-benchmark/references/BENCHMARK.md) ·
231
+ [questions](https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/compare/github-questions) ·
232
+ [stats method](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/skills/octocode-benchmark/references/aggregation-and-stats.md) ·
233
+ [all reports](https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/results) (historical runs carry their own caveats).
111
234
 
112
235
  ---
113
236
 
114
237
  ## Tools
115
238
 
116
- **13 always-on tools** (same on [MCP](#mcp) and [CLI](#cli)). Local tools on by default (`ENABLE_LOCAL=false` to disable). Three opt-ins: `ghCloneRepo` (MCP opt-in `ENABLE_CLONE=true`, CLI on by default), `ghListReleases` (`ENABLE_RELEASES=true`), and `ghSearchDiscussions` (`ENABLE_DISCUSSIONS=true`). Flags: [Configuration](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md).
239
+ **17 tools in the full catalog.** MCP registers 14 by default; the CLI exposes 15
240
+ because clone is enabled there by default. `ghCloneRepo` is opt-in on MCP
241
+ (`ENABLE_CLONE=true`), while `ghListReleases` and `ghSearchDiscussions` are opt-in
242
+ on both surfaces. Local tools default on for the **CLI** and off for the **MCP
243
+ server** (`ENABLE_LOCAL=true` enables them on MCP; `ENABLE_LOCAL=false` disables on
244
+ CLI). Flags: [Configuration](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md).
117
245
 
118
246
  **Token knobs.** `concise:true` returns path/title-only lists. `minify` controls file read density: `symbols` = skeleton with line numbers, `standard` = comments/blanks stripped (default), `none` = exact bytes.
119
247
 
@@ -137,8 +265,9 @@ See [Quick Start](#quick-start) to install in your terminal or AI assistant.
137
265
  | Tool | What it does | Knob |
138
266
  |------|--------------|------|
139
267
  | `localSearchCode` | Local code/text search returning file and line anchors. `mode:"structural"` runs Octocode AST shape queries (`pattern` or `rule`). | `mode` |
140
- | `localViewStructure` | Browse a local directory tree: depth, filters, pagination, metadata. | `concise` |
268
+ | `localViewStructure` | Browse a local directory tree: depth, filters, pagination, metadata. | `detail` |
141
269
  | `localFindFiles` | Find local files and directories by name, path, regex, extension, size, time, permissions, type. | |
270
+ | `localFindDeadCode` | Find likely-unreferenced exports and dead-code clusters using whole-repository reachability analysis. | `entrypoints` |
142
271
  | `localGetFileContent` | Read a local file or region: exact slice, match string, line range, or paginated chars. | `minify` |
143
272
 
144
273
  ### Package Search
@@ -165,23 +294,7 @@ https://github.com/user-attachments/assets/de8d14c0-2ead-46ed-895e-09144c9b5071
165
294
 
166
295
  ### Manual Configuration
167
296
 
168
- Add to your MCP client config. Pick the package that matches the version you want:
169
-
170
- **New Octocode (Rust-powered engine)** — use `@octocodeai/mcp`:
171
-
172
- ```json
173
- {
174
- "octocode": {
175
- "command": "npx",
176
- "type": "stdio",
177
- "args": [
178
- "@octocodeai/mcp@latest"
179
- ]
180
- }
181
- }
182
- ```
183
-
184
- **Classic octocode-mcp** — use `octocode-mcp`:
297
+ Add to your MCP client config, using `octocode-mcp`:
185
298
 
186
299
  ```json
187
300
  {
@@ -195,19 +308,13 @@ Add to your MCP client config. Pick the package that matches the version you wan
195
308
  }
196
309
  ```
197
310
 
198
- Add a GitHub token and options under `env` see [Authentication](#authentication-methods) and [Configuration](#configuration).
311
+ Add a GitHub token and options under `env` - see [Authentication](#authentication-methods) and [Configuration](#configuration).
199
312
 
200
313
  ---
201
314
 
202
315
  ## CLI
203
316
 
204
- Same research engine, no MCP client needed. Local paths route to local tools; `owner/repo[/path]` routes to GitHub.
205
-
206
- ```bash
207
- npx octocode auth login # authenticate once
208
- npx octocode status # verify setup
209
- npx octocode --help # full usage
210
- ```
317
+ Same research engine, no MCP client needed. Local paths route to local tools; `owner/repo[/path]` routes to GitHub. Authenticate once with `npx octocode auth login` (see [Authentication](#authentication-methods)); run `npx octocode --help` for full usage.
211
318
 
212
319
  ### Commands
213
320
 
@@ -222,12 +329,12 @@ npx octocode --help # full usage
222
329
 
223
330
  #### More commands
224
331
 
225
- - **Cache & clone** `npx octocode clone`, `npx octocode cache fetch|status|clear`
226
- - **Skills** `npx octocode skill list|install|check|info|remove` for bundled Octocode skills
227
- - **Language servers** `npx octocode lsp-server list|install|status|uninstall|clean`
228
- - **Setup & introspection** `npx octocode install`, `npx octocode auth`, `npx octocode status`, `npx octocode context`
332
+ - **Cache & clone** - `npx octocode clone`, `npx octocode cache fetch|status|clear`
333
+ - **Skills** - `npx octocode skill list|install|check|info|remove` for bundled Octocode skills
334
+ - **Language servers** - `npx octocode lsp-server list|install|status|uninstall|clean`
335
+ - **Setup & introspection** - `npx octocode install`, `npx octocode auth`, `npx octocode status`, `npx octocode context`
229
336
 
230
- Full syntax, flags, and exit codes: [Octocode CLI Guide](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_CLI.md)
337
+ Full syntax, flags, and exit codes: [Octocode CLI Guide](https://github.com/bgauryy/octocode/blob/main/packages/octocode/docs/OCTOCODE_CLI.md)
231
338
 
232
339
  ---
233
340
 
@@ -251,27 +358,40 @@ environment variables > <octocode-home>/.octocoderc > built-in defaults
251
358
  | Linux | `${XDG_CONFIG_HOME:-~/.config}/.octocode` |
252
359
  | Windows | `%APPDATA%\.octocode` |
253
360
 
254
- Set values as MCP `env` entries (per client; these win over `.octocoderc`) or globally in `<octocode-home>/.octocoderc` (JSON with comments). **Tokens never go in `.octocoderc`** use `env` or `npx octocode auth login`.
361
+ Set values as MCP `env` entries (per client; these win over `.octocoderc`) or globally in `<octocode-home>/.octocoderc` (JSON with comments). **Tokens never go in `.octocoderc`** - use `env` or `npx octocode auth login`.
255
362
 
256
363
  ### Common settings
257
364
 
258
- The **Scope** column shows where a setting applies: `Both`, or `MCP` (the CLI ignores it).
365
+ Most-used settings (both CLI and MCP unless noted):
259
366
 
260
- | Env var | `.octocoderc` key | Default | Scope | What it does |
261
- |---------|-------------------|---------|-------|--------------|
262
- | `OCTOCODE_HOME` | env only | platform default | Both | Overrides the Octocode data directory for config, credentials, sessions, stats, and caches. |
263
- | `OCTOCODE_TOKEN` / `GH_TOKEN` / `GITHUB_TOKEN` | env only | unset | Both | GitHub token, in priority order. Tokens stay in env, never in `.octocoderc`. |
264
- | `GITHUB_API_URL` | `github.apiUrl` | `https://api.github.com` | Both | API endpoint; use `/api/v3` for GitHub Enterprise. |
265
- | `ENABLE_LOCAL` | `local.enabled` | `true` | Both | Turns local filesystem + LSP tools on/off; set `false` to disable. |
266
- | `ENABLE_CLONE` | `local.enableClone` | CLI `true`, MCP `false` | Both | `ghCloneRepo` and directory fetch. Default differs by surface; set `false` to disable in either. |
267
- | `WORKSPACE_ROOT` | `local.workspaceRoot` | `cwd` | Both | Absolute root for resolving relative local paths. |
268
- | `ALLOWED_PATHS` | `local.allowedPaths` | `[]` | Both | Extra path allowlist for local access; empty means home directory only after validation. |
269
- | `TOOLS_TO_RUN` / `ENABLE_TOOLS` / `DISABLE_TOOLS` | `tools.*` | unset | **MCP** | Whitelist, add to, or remove from the registered tool set. The CLI exposes every tool. |
270
- | `REQUEST_TIMEOUT` | `network.timeout` | `30000` | Both | Request timeout in ms (clamped `5000..300000`). |
271
- | `MAX_RETRIES` | `network.maxRetries` | `3` | Both | Retry attempts (clamped `0..10`). |
272
- | `OCTOCODE_OUTPUT_FORMAT` | `output.format` | `yaml` | Both | Response format: `yaml` or `json`. |
367
+ | Env var | `.octocoderc` key | Default | What it does |
368
+ |---------|-------------------|---------|--------------|
369
+ | `OCTOCODE_TOKEN` / `GH_TOKEN` / `GITHUB_TOKEN` | env only | unset | GitHub token, in priority order. Never in `.octocoderc`. |
370
+ | `ENABLE_LOCAL` | `local.enabled` | CLI `true`, MCP `false` | Local filesystem + LSP tools on/off. |
371
+ | `ENABLE_CLONE` | `local.enableClone` | CLI `true`, MCP `false` | `ghCloneRepo` + directory fetch on/off. |
372
+ | `WORKSPACE_ROOT` | `local.workspaceRoot` | `cwd` | Root for resolving relative local paths. |
373
+ | `ALLOWED_PATHS` | `local.allowedPaths` | `[]` | Extra path allowlist for local access. |
374
+ | `OCTOCODE_OUTPUT_FORMAT` | `output.format` | `yaml` | Response format: `yaml` or `json`. |
273
375
 
274
- > **Local defaults on; clone differs by surface.** Both CLI and MCP default local tools on; set `ENABLE_LOCAL=false` to disable them. The **CLI** defaults clone on, while the **MCP server** requires `ENABLE_CLONE=true`.
376
+ `OCTOCODE_HOME`, GitHub Enterprise (`GITHUB_API_URL`), MCP tool whitelisting (`TOOLS_TO_RUN`/`ENABLE_TOOLS`/`DISABLE_TOOLS`), and network timeouts/retries: see the [Configuration Reference](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md).
377
+
378
+ ### Example Configuration
379
+
380
+ **`~/.octocode/.octocoderc`:**
381
+ ```json
382
+ {
383
+ "github": {
384
+ "apiUrl": "https://api.github.com"
385
+ },
386
+ "local": {
387
+ "enabled": true,
388
+ "enableClone": true
389
+ },
390
+ "output": {
391
+ "format": "yaml"
392
+ }
393
+ }
394
+ ```
275
395
 
276
396
  Per-project overrides and custom LSP servers live in a workspace `.octocode/` folder. For the full `.octocoderc` schema, a ready-to-copy example, clone-cache tuning, GitHub Enterprise setup, and precedence details, see the [Configuration Reference](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md).
277
397
 
@@ -296,7 +416,7 @@ Interactive login lets you choose Octocode browser OAuth or `gh auth login`. Oct
296
416
  gh auth login
297
417
  ```
298
418
 
299
- Octocode reads the `gh` token automatically no further config needed.
419
+ Octocode reads the `gh` token automatically - no further config needed.
300
420
 
301
421
  ### Option 3: Personal Access Token (also supported)
302
422
 
@@ -310,21 +430,17 @@ Create a token at [github.com/settings/tokens](https://github.com/settings/token
310
430
 
311
431
  ## Security
312
432
 
313
- **Every byte that reaches the model is scanned and redacted first.** All content (local files, GitHub and npm responses, error messages, and tool outputs) passes through the Rust engine's secret scanner on the way *in* (tool inputs) and on the way *out* (results), so secrets never reach the LLM. The same enforcement runs identically under MCP and the CLI.
433
+ **Every byte to the model is scanned and redacted first.** All content (local files, GitHub/npm responses, errors, tool output) passes through the Rust engine's secret scanner on the way *in* and *out*, so secrets never reach the LLM. Identical under MCP and CLI.
314
434
 
315
435
  - **Secret redaction, in and out.** 300+ provider credential patterns (AWS, Azure, GCP, GitHub, OpenAI, Anthropic, Stripe, Slack, 1Password, and more) plus generic JWTs, PEM/private keys, bearer tokens, database connection strings, and high-entropy strings. Masked values surface a redaction warning so the agent knows.
316
436
  - **Content sanitized at the source.** Local reads (`localGetFileContent`, ripgrep, structural search, binary, file discovery, structure) and external fetches (GitHub code/files, npm) are scanned as they are read, not only at the boundary.
317
437
  - **Path safety.** Relative inputs resolve from `WORKSPACE_ROOT` / config / `cwd`, then local reads are bounded to the engine's allowed roots (home by default, plus `ALLOWED_PATHS` and Octocode-registered roots). Symlinks are resolved and the real target is **re-validated**, so a link cannot escape into a blocked location.
318
- - **Sensitive files and directories are blocked by default.** Octocode refuses to read known secret-bearing files and folders wherever they live, returning a redacted error instead of contents. Blocked patterns include:
319
- - **Keys and certs:** `*.pem`, `*.key`, `*.crt`/`*.cer`/`*.csr`, `*.p12`/`*.pfx`/`*.jks`/`*.keystore`, and SSH keys (`id_rsa`, `*_ed25519`, `authorized_keys`, `known_hosts`, `.ssh/`).
320
- - **Credentials and tokens:** `.env` / `.env.*`, `.netrc`, `.npmrc`, `.pgpass`, `.git-credentials`, `*_token` / `.token`, `client_secret*.json`, `*service-account*.json`, `auth.json`, `.htpasswd`.
321
- - **Cloud and infra:** `.aws/`, `.azure/`, `.config/gcloud/`, `.kube/` / `kubeconfig`, `.docker/`, `.terraform/` and `*.tfstate`.
322
- - **OS and app secret stores:** `.git/`, `secrets/`, `private/`, browser login data (Chrome/Firefox), OS keychains, password managers (`*.kdbx`), shell history files, and crypto wallets.
438
+ - **Sensitive files blocked by default.** Reads of known secret-bearing files and folders return a redacted error instead of contents: keys/certs, `.env*`, `.npmrc`/`.netrc`, cloud/infra credentials (`.aws/`, `.kube/`, `*.tfstate`), `.git/`, browser logins, OS keychains, and wallets. Full list in [SECURITY.md](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md).
323
439
  - **Command safety.** Normal local search runs in-process inside `octocode-engine`. External helpers are fixed per lane, command/argument allowlisted, and run via `spawn` with argument arrays: no shell strings, no injection.
324
440
  - **Schema validation** runs before any tool executes; untrusted input size and shape are bounded.
325
441
  - **Credentials.** GitHub auth via env tokens, AES-256-GCM-encrypted on-disk OAuth, or the `gh` CLI; tokens are never logged.
326
442
 
327
- **Full security model, pipeline, and threat coverage: [SECURITY.md](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md).** Related: [Authentication](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) · [Configuration](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) · [Credentials](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md#github-token)
443
+ **Full security model, pipeline, and threat coverage: [SECURITY.md](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md).** Related: [Configuration & Authentication](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) · [Credentials](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md#github-token)
328
444
 
329
445
  ---
330
446
 
@@ -339,7 +455,9 @@ Four code-intelligence axes; three are native to the Rust engine and need no ext
339
455
  | **Content minification** | Comment/whitespace stripping for 70+ languages and config formats; HTML/Vue/Svelte also minify embedded `<style>`/`<script>`. | `minify:"standard"` (default) |
340
456
  | **LSP navigation** | definition, references, callers/callees, callHierarchy, hover, typeDefinition, implementation, documentSymbols, via an installed language server; JS/TS also have a native, no-server path. | `lspGetSemantics` · CLI `tools lspGetSemantics --scheme` |
341
457
 
342
- 📋 **Full support matrix:** every extension with its exact AST, signature, LSP, and minify capability, machine-generated from the shipped binary, lives in the **[Full format support matrix](https://github.com/bgauryy/octocode/blob/main/docs/LSP_SERVER_LIFECYCLE.md#full-format-support-matrix)** (151 extensions: 61 AST, 47 signature, 32 LSP, 90 minify-only). Regenerate or verify with `yarn workspace @octocodeai/octocode-benchmark matrix:check`.
458
+ 📋 **Full support matrix:** every extension with its exact AST, signature, LSP,
459
+ and minify capability lives in the
460
+ **[Full format support matrix](https://github.com/bgauryy/octocode/blob/main/packages/octocode-engine/docs/LSP_SERVER_LIFECYCLE.md#full-format-support-matrix)**.
343
461
 
344
462
  ---
345
463
 
@@ -348,7 +466,7 @@ Four code-intelligence axes; three are native to the Rust engine and need no ext
348
466
  > [Agent Skills](https://agentskills.io/what-are-skills) are a lightweight, open format for extending AI agent capabilities.
349
467
  > Browse and install on [**skills.sh/bgauryy/octocode-mcp**](https://www.skills.sh/bgauryy/octocode-mcp)
350
468
 
351
- **13 skills** under [`skills/`](https://github.com/bgauryy/octocode/tree/main/skills), bundled in the `octocode` package. Every skill shares one architecture — a lean `SKILL.md` lobby with hard gates, references loaded only when a step needs them, and cross-skill routes — so they compose. Start with ⭐ [Research](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research) for evidence-first code work.
469
+ **13 skills** under [`skills/`](https://github.com/bgauryy/octocode/tree/main/skills), bundled in the `octocode` package. Each is a lean `SKILL.md` that loads references only when needed, so they compose. Start with ⭐ [Research](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research) for evidence-first code work.
352
470
 
353
471
  ```bash
354
472
  npx octocode skill list
@@ -357,20 +475,33 @@ npx octocode skill check --json
357
475
  npx octocode skill help
358
476
  ```
359
477
 
478
+ #### Core Research & Extraction
360
479
  | Skill | Use when |
361
480
  |-------|----------|
362
481
  | ⭐ [**octocode-research**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-research) | Evidence-first research, review, debugging, refactors, prior-art validation. |
363
- | [**octocode-graph-eval**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-graph-eval) | Measuring whether a change helped: goal→KPI contracts, baselines, accept/revert loops, eval suites. |
482
+ | [**octocode-scraping**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-scraping) | Public page extraction and crawl triage: static corpus + graph v2 (pages/data/actions/risks/evidence), then CDP handoff for dynamic actions and blocked pages. |
483
+ | [**octocode-chrome-devtools**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-chrome-devtools) | Browser/CDP evidence: network, console, performance, cookies/storage, screenshots, auth-gated pages, and live validation of scrape-graph actions. |
484
+
485
+ #### Planning & Architecture
486
+ | Skill | Use when |
487
+ |-------|----------|
364
488
  | [**octocode-brainstorming**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-brainstorming) | Disciplined idea exploration before building: options, worth-building tests, prior-art maps. |
365
489
  | [**octocode-rfc-generator**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-rfc-generator) | Evidence-backed RFCs, design docs, migration plans, option comparisons. |
366
- | [**octocode-roast**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-roast) | Blunt, evidence-backed code critique with severity ranking and repair paths. |
367
490
  | [**octocode-documentation**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-documentation) | Writing or updating README, API docs, runbooks, AGENTS.md, ADRs. |
368
- | [**octocode-skills**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-skills) | Agent-skill lifecycle: discover, review, create, improve, install, sync. |
491
+
492
+ #### Evaluation & Review
493
+ | Skill | Use when |
494
+ |-------|----------|
495
+ | [**octocode-roast**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-roast) | Blunt, evidence-backed code critique with severity ranking and repair paths. |
496
+ | [**octocode-graph-eval**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-graph-eval) | Measuring whether a change helped: goal→KPI contracts, baselines, accept/revert loops, eval suites. |
497
+ | [**octocode-prompt-optimizer**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-prompt-optimizer) | Making prompts, tool schemas, and agent contracts clearer, safer, cheaper, measurable. |
498
+
499
+ #### Agent Orchestration
500
+ | Skill | Use when |
501
+ |-------|----------|
369
502
  | [**octocode-subagent**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-subagent) | Delegation: spawn gates, decomposition, sealed packets, coordination, synthesis. |
370
503
  | [**octocode-awareness**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-awareness) | Shared-repo coordination: collision avoidance, handoffs, verification debt, durable memory. |
371
- | [**octocode-prompt-optimizer**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-prompt-optimizer) | Making prompts, tool schemas, and agent contracts clearer, safer, cheaper, measurable. |
372
- | [**octocode-chrome-devtools**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-chrome-devtools) | Browser/CDP evidence: network, console, performance, cookies/storage, screenshots, auth-gated pages, and live validation of scrape-graph actions. |
373
- | [**octocode-scraping**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-scraping) | Public page extraction and crawl triage: static corpus + graph v2 (pages/data/actions/risks/evidence), then CDP handoff for dynamic actions and blocked pages. |
504
+ | [**octocode-skills**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-skills) | Agent-skill lifecycle: discover, review, create, improve, install, sync. |
374
505
  | [**octocode-orchestrator-local-worker**](https://github.com/bgauryy/octocode/tree/main/skills/octocode-orchestrator-local-worker) | Offloading token-heavy text work to a local Ollama worker under a verify gate. |
375
506
 
376
507
  **Web automation workflow:** `octocode-scraping` performs the safe static pass first (fetch/crawl/extract → local corpus → graph v2). When the graph exposes dynamic actions or static output is blocked/thin, `octocode-chrome-devtools` validates live actionability, cookies/storage, network/HAR bodies, screenshots, or auth-gated state; discovered URLs/data/artifacts can be fed back into the scraping corpus for continued proof.
@@ -413,13 +544,13 @@ client → sanitize inputs (Rust) → run tool (GitHub / FS / LSP) → sanitize
413
544
  | Directory | npm package | Role |
414
545
  |-----------|-------------|------|
415
546
  | [`packages/octocode`](https://github.com/bgauryy/octocode/tree/main/packages/octocode) | `octocode` | CLI: quick commands, raw tool runner, skill installs, auth/login/logout, install, status, context. |
416
- | [`packages/octocode-mcp`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-mcp) | `@octocodeai/mcp` | MCP server (stdio) that registers the tool catalog for AI assistants. |
547
+ | [`packages/octocode-mcp`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-mcp) | `octocode-mcp` | MCP server (stdio) that registers the tool catalog for AI assistants. |
417
548
  | [`packages/octocode-tools-core`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-tools-core) | `@octocodeai/octocode-tools-core` | Shared tool core: implementations, GitHub client, credentials and token resolution, session, pagination, security bridge. |
418
549
  | [`packages/octocode-engine`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-engine) | `@octocodeai/octocode-engine` | Rust/napi native engine: security scanning, minification, signatures, structural AST, ripgrep/diff/YAML, LSP. |
419
550
  | [`packages/octocode-config`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-config) | `@octocodeai/config` | Zero-dep env + config loader: `getOctocodeHome`, `.env` parsing, `.octocoderc` reading. Single source used by every package and skill. |
420
551
  | [`packages/octocode-vscode`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-vscode) | `octocode-mcp-vscode` | VS Code extension: GitHub OAuth + multi-editor MCP install. |
421
552
 
422
- `packages/octocode-benchmark` (private, not published) holds benchmark methodology, evals, and run artifacts see [Documentation](#documentation).
553
+ `packages/octocode-benchmark` (private, not published) holds benchmark methodology, evals, and run artifacts - see [Documentation](#documentation).
423
554
 
424
555
  ---
425
556
 
@@ -429,25 +560,29 @@ Website: **[octocode.ai](https://octocode.ai)** · Product docs: **[github.com/b
429
560
 
430
561
  | Area | Docs |
431
562
  |---|---|
432
- | MCP server | [Octocode MCP Server](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_MCP.md) · [Configuration](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) · [Authentication](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) |
563
+ | MCP server | [Octocode MCP Server](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_MCP.md) · [Configuration & Authentication](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) |
433
564
  | Tools and workflows | [Octocode Tools Reference](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_TOOLS.md) · [RDD Manifest & Workflows](https://github.com/bgauryy/octocode/blob/main/MANIFEST.md) · [Octocode Research Skill](https://github.com/bgauryy/octocode/tree/main/skills/octocode-research) · [Search Guide](https://github.com/bgauryy/octocode/blob/main/docs/context/SEARCH_GUIDE.md) |
434
- | CLI | [Octocode CLI Guide](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_CLI.md) |
565
+ | CLI | [Octocode CLI Guide](https://github.com/bgauryy/octocode/blob/main/packages/octocode/docs/OCTOCODE_CLI.md) |
435
566
  | Skills | [Skills](https://github.com/bgauryy/octocode/tree/main/skills) |
436
- | Development and security | [Security Model](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md) · [LSP Server Lifecycle](https://github.com/bgauryy/octocode/blob/main/docs/LSP_SERVER_LIFECYCLE.md) |
437
- | Benchmarks and evals | [Benchmark Summary](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/BENCHMARK.md) · [Unified CLI/Tool Eval](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/octocode/README.md) · [Benchmark Runbook](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/recipes/agent-benchmark-runbook.md) · [Support Matrix](https://github.com/bgauryy/octocode/blob/main/docs/LSP_SERVER_LIFECYCLE.md#full-format-support-matrix) |
567
+ | Development and security | [Security Model](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md) · [LSP Server Lifecycle](https://github.com/bgauryy/octocode/blob/main/packages/octocode-engine/docs/LSP_SERVER_LIFECYCLE.md) |
568
+ | Benchmarks and evals | [Benchmark Results](https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/results) · [Benchmark Design](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/skills/octocode-benchmark/references/BENCHMARK.md) · [Benchmark Runbook](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/skills/octocode-benchmark/references/INSTRUCTIONS.md) · [Support Matrix](https://github.com/bgauryy/octocode/blob/main/packages/octocode-engine/docs/LSP_SERVER_LIFECYCLE.md#full-format-support-matrix) |
438
569
  | Shared internals | [Credentials Architecture](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md#github-token) · [Session Persistence](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_MCP.md#session-persistence) |
439
570
 
440
571
  ---
441
572
 
442
573
  ## Troubleshooting
443
574
 
444
- Having Node.js issues? Run:
575
+ **Node.js or Environment Issues?**
576
+ Run the built-in doctor command to check your environment:
445
577
 
446
578
  ```bash
447
579
  npx node-doctor check --json
448
580
  ```
449
581
 
450
- Read the output and fix accordingly.
582
+ **Common Pitfalls:**
583
+ - **GitHub Auth Failures:** Ensure your Personal Access Token (PAT) has the `repo` and `read:user` scopes. If using the CLI, run `npx octocode auth login` to refresh.
584
+ - **MCP Connection Issues:** If your AI assistant (like Cursor or Windsurf) fails to connect, ensure you have run `npx octocode auth login` in your terminal first, or explicitly pass your `OCTOCODE_TOKEN` in the MCP `env` configuration.
585
+ - **Native Engine Errors:** Octocode uses a prebuilt Rust engine. If it fails to load on Linux, ensure your system has `glibc` or `musl` compatibility. On macOS/Windows, ensure you are on a supported architecture (x64 or arm64).
451
586
 
452
587
  ---
453
588
 
@@ -455,21 +590,19 @@ Read the output and fix accordingly.
455
590
 
456
591
  ### Recommended dev mode: Pi + Octocode
457
592
 
458
- [Pi](https://github.com/earendil-works/pi) is a fast, local-first coding agent whose stated philosophy is *"CLI tools with READMEs (Skills) over MCP."* Pairing it with Octocode gives a lean, evidence-driven dev loop **Pi edits, Octocode researches**. Two routes, pick by how much surface you need:
593
+ [Pi](https://github.com/earendil-works/pi) is a fast, local-first coding agent whose stated philosophy is *"CLI tools with READMEs (Skills) over MCP."* Pairing it with Octocode gives a lean, evidence-driven dev loop - **Pi edits, Octocode researches**. Two routes, pick by how much surface you need:
459
594
 
460
- - **Skill route recommended, leanest.** Drop the [`octocode-research`](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research) skill into Pi's global skills dir. It drives the Octocode **CLI** directly no MCP transport, minimal token overhead and Pi auto-discovers it:
595
+ - **Skill route - recommended, leanest.** Drop the [`octocode-research`](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research) skill into Pi's global skills dir. It drives the Octocode **CLI** directly - no MCP transport, minimal token overhead - and Pi auto-discovers it:
461
596
 
462
597
  ```bash
463
598
  npx octocode skill install octocode-research --platform pi
464
599
  ```
465
600
 
466
- - **Adapter route full tool surface.** Install [`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter) to expose Octocode MCP tools behind a single ~200-token proxy tool, so servers stay disconnected until a tool is actually called. Enable clone tools with `ENABLE_CLONE=true`.
601
+ - **Adapter route - full tool surface.** Install [`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter) to expose Octocode MCP tools behind a single ~200-token proxy tool, so servers stay disconnected until a tool is actually called. Enable clone tools with `ENABLE_CLONE=true`.
467
602
 
468
603
  ### Research-driven loop
469
604
 
470
- Most agent failures start before implementation: the agent guesses the owner of a behavior, trusts a snippet without reading the exact source, or edits before proving blast radius. Prefer a cheaper loop first: orient with trees and discovery output, search with Octocode, read exact evidence, use AST/LSP when identity matters, then patch and verify.
471
-
472
- That shape keeps the editing surface small while preserving context for what matters: file anchors, symbols, call paths, PR/history evidence, package sources, and the verification command that proves the change. In short, the host edits, Octocode is the map, and skills encode the habit.
605
+ Most agent failures happen before the edit: guessing who owns a behavior, trusting a snippet without reading the source, editing before proving blast radius. Run a cheaper loop instead: orient with trees, search, read exact evidence, use AST/LSP when identity matters, then patch and verify. The host edits, Octocode is the map, and skills encode the habit.
473
606
 
474
607
  ### The Manifest
475
608
 
package/dist/direct.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { buildDirectToolExampleQuery, DIRECT_TOOL_CATEGORIES, DIRECT_TOOL_DEFINITIONS, DirectToolInputError, executeDirectTool, findDirectToolDefinition, formatDirectToolMetadataSchemaText, formatDirectToolOutputSchemaText, formatDirectToolSchemaText, getDirectToolAutoFilledFields, getDirectToolCategory, getDirectToolDescription, getDirectToolDisplayFields, getDirectToolOutputFields, prepareDirectToolInput, prepareDirectToolInputFromJsonText, sortDirectToolNames, type DirectToolCategory, type DirectToolDefinition, type DirectToolDisplayField, type DirectToolInput, type DirectToolMetadata, type DirectToolOutputField, type PrepareDirectToolInputOptions, } from './tools/directToolCatalog.js';
1
+ export { buildDirectToolExampleQuery, DIRECT_TOOL_CATEGORIES, DIRECT_TOOL_DEFINITIONS, DirectToolInputError, executeDirectTool, findDirectToolDefinition, formatDirectToolMetadataSchemaText, formatDirectToolSchemaText, getDirectToolAutoFilledFields, getDirectToolCategory, getDirectToolDescription, getDirectToolDisplayFields, prepareDirectToolInput, prepareDirectToolInputFromJsonText, sortDirectToolNames, type DirectToolCategory, type DirectToolDefinition, type DirectToolDisplayField, type DirectToolInput, type DirectToolMetadata, type PrepareDirectToolInputOptions, } from './tools/directToolCatalog.js';
2
2
  export { loadToolContent } from './tools/toolMetadata/state.js';
3
3
  export { formatCallToolResultForOutput, type CallToolResultOutputMode, } from './responses.js';