agentsbestfriend 0.11.1 → 0.13.0

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
@@ -1,26 +1,30 @@
1
- # agentsbestfriend
1
+ # AgentsBestFriend (abf)
2
2
 
3
3
  Give your AI coding agents superpowers — a local [MCP](https://modelcontextprotocol.io/) server for fast, token-efficient code navigation, search & analysis.
4
4
 
5
- Works with **VS Code Copilot**, **Cursor**, **Claude Code/Desktop**, **Codex**, **Cline**, **Zed**, and any other MCP-compatible agent.
5
+ Works with **VS Code Copilot**, **Cursor**, **Claude Code/Desktop**, **Codex**, **Cline**, **Zed**, **Gemini CLI**, **Goose**, **OpenCode**, and any other MCP-compatible agent.
6
6
 
7
- ## What it does
7
+ ---
8
8
 
9
- AI agents waste tokens re-reading files and searching blindly. ABF gives them purpose-built tools that return exactly what they need:
9
+ ## Why?
10
10
 
11
- | Tool | Purpose |
11
+ AI coding agents waste tokens re-reading files and searching blindly. ABF gives them purpose-built tools that return exactly what they need — in compact, structured responses that preserve context.
12
+
13
+ ## Tools
14
+
15
+ | Tool | What it does |
12
16
  |---|---|
13
- | `abf_search` | Code search — exact (ripgrep), keyword-ranked, or semantic |
14
- | `abf_symbols` | Functions, classes, exports in a file (AST-based) |
15
- | `abf_chunk` | Smart file chunk by symbol name or line range |
16
- | `abf_project_overview` | Tech stack, structure, dependencies at a glance |
17
+ | `abf_search` | Code search — exact (ripgrep), keyword-ranked, or semantic (embedding-based) |
18
+ | `abf_symbols` | Functions, classes, exports in a file (AST-based for TS/JS, regex for Python) |
19
+ | `abf_chunk` | Smart file chunk by symbol name, chunk index, or file overview |
20
+ | `abf_project_overview` | Tech stack, folder structure, key dependencies at a glance |
17
21
  | `abf_dependencies` | Import graph — who imports what |
18
22
  | `abf_impact` | Find all usages of a symbol across the project |
19
- | `abf_git` | Commits, blame, diff (recent/staged/unstaged) |
20
- | `abf_file_summary` | Search LLM-generated file summaries |
21
- | `abf_conventions` | Detected naming & style conventions |
22
- | `abf_index` | Index status & rebuild |
23
- | `abf_ping` | Health check |
23
+ | `abf_git` | Git log, blame, diff (recent/staged/unstaged) |
24
+ | `abf_file_summary` | Full-text search across LLM-generated file summaries (FTS5, OR/AND mode) |
25
+ | `abf_conventions` | Detected naming, structure, and formatting conventions |
26
+ | `abf_index` | Index status, rebuild, incremental update, or trigger re-summarization |
27
+ | `abf_ping` | Health check — returns version and project root |
24
28
 
25
29
  ## Install
26
30
 
@@ -31,36 +35,34 @@ npm install -g agentsbestfriend
31
35
  ### Prerequisites
32
36
 
33
37
  - **Node.js** ≥ 20
34
- - **ripgrep** — `brew install ripgrep` / `apt install ripgrep`
38
+ - **ripgrep** — `brew install ripgrep` (macOS) / `apt install ripgrep` (Linux)
35
39
  - **git**
36
- - **Ollama** (optional, for summaries & semantic search) [ollama.com](https://ollama.com)
40
+ - **Ollama** (optional) for summaries & semantic search: [ollama.com](https://ollama.com)
37
41
 
38
42
  ## Quick Start
39
43
 
40
44
  ```bash
41
- # Initialize a project (indexes files, optionally installs MCP for your agents)
42
45
  abf init
43
-
44
- # Or initialize a specific path
45
- abf init /path/to/project
46
-
47
- # Check everything is working
48
- abf doctor
49
46
  ```
50
47
 
51
- During `abf init`, you'll be asked whether to install ABF as an MCP server for your coding agents. Pick the agents you use (Cursor, VS Code, Claude Code, etc.) and ABF handles the rest via [add-mcp](https://github.com/neondatabase/add-mcp).
48
+ `abf init` walks you through everything:
49
+
50
+ 1. **Indexes your project** — discovers and indexes all files via `git ls-files`
51
+ 2. **Generates LLM summaries & embeddings** (if Ollama is running) — with live `(12/80)` progress
52
+ 3. **Adds `.abf/` to `.gitignore`** — prompts before writing
53
+ 4. **Installs ABF as an MCP server** for your agents — you pick which agents (Cursor, VS Code, Claude Code, etc.) and whether to use `npx agentsbestfriend start` (always latest) or `abf start` (local install)
52
54
 
53
55
  ### Manual Agent Setup
54
56
 
55
- If you prefer to configure manually, add ABF as a stdio MCP server:
57
+ If you prefer to configure manually, add ABF as a stdio MCP server. Using `npx` is recommended — it always runs the latest published version without requiring a global install:
56
58
 
57
59
  **VS Code / GitHub Copilot** (`.vscode/mcp.json`):
58
60
  ```json
59
61
  {
60
62
  "servers": {
61
63
  "abf": {
62
- "command": "abf",
63
- "args": ["start"]
64
+ "command": "npx",
65
+ "args": ["agentsbestfriend", "start"]
64
66
  }
65
67
  }
66
68
  }
@@ -71,8 +73,8 @@ If you prefer to configure manually, add ABF as a stdio MCP server:
71
73
  {
72
74
  "mcpServers": {
73
75
  "abf": {
74
- "command": "abf",
75
- "args": ["start"]
76
+ "command": "npx",
77
+ "args": ["agentsbestfriend", "start"]
76
78
  }
77
79
  }
78
80
  }
@@ -83,51 +85,64 @@ If you prefer to configure manually, add ABF as a stdio MCP server:
83
85
  {
84
86
  "mcpServers": {
85
87
  "abf": {
86
- "command": "abf",
87
- "args": ["start"]
88
+ "command": "npx",
89
+ "args": ["agentsbestfriend", "start"]
88
90
  }
89
91
  }
90
92
  }
91
93
  ```
92
94
 
95
+ > Set `ABF_PROJECT_ROOT` in the `env` block if the agent does not pass its working directory automatically.
96
+
93
97
  ## CLI Commands
94
98
 
95
99
  ```
96
- abf start Start MCP server in stdio mode (used by agents)
97
- abf init [path] Initialize index & optionally install MCP for agents
98
- abf index [path] Re-index a project
99
- abf status [path] Show index status
100
- abf config Interactive configuration editor
101
- abf doctor System health checks (Node, ripgrep, git, Ollama)
102
- abf portal Interactive terminal dashboard
100
+ abf start Start MCP server in stdio mode (used by agents)
101
+ abf init [path] Index project, set up .gitignore entry, install MCP for agents
102
+ abf skill [path] Install or update the ABF workflow skill for your coding agents
103
+ abf index [path] Re-index a project (incremental by default)
104
+ abf status [path] Show index stats
105
+ abf config Interactive configuration editor
106
+ abf doctor Health checks (Node, ripgrep, git, Ollama)
107
+ abf portal Interactive TUI dashboard
103
108
  ```
104
109
 
105
110
  ## How It Works
106
111
 
107
- ABF maintains a lightweight SQLite index (`.abf/index.db`) per project containing:
108
-
109
- - **File metadata** — paths, hashes, languages, line counts
110
- - **Symbols** — functions, classes, interfaces, types extracted via AST (ts-morph for TS/JS, regex for Python & others)
111
- - **Imports** — dependency edges between files
112
- - **Summaries** — LLM-generated file descriptions (optional, via Ollama)
113
- - **Embeddings** — vectors for semantic search (optional, via Ollama)
112
+ ABF maintains a lightweight SQLite index (`.abf/index.db`) inside each project root. The index is built once and updated incrementally — only changed files are re-processed. A file watcher keeps it current as you edit.
114
113
 
115
- The index updates incrementally — only changed files are re-processed.
114
+ | Table | Contents |
115
+ |---|---|
116
+ | `files` | Paths, hashes, languages, line counts, LLM summaries |
117
+ | `symbols` | Functions, classes, interfaces, types (AST-extracted) |
118
+ | `imports` | Dependency edges between files |
119
+ | `embeddings` | Float32 vectors for semantic search (chunked for large files) |
120
+ | `file_chunks` | Smart chunks aligned to symbol boundaries |
121
+ | `files_fts` | FTS5 full-text index over summaries |
116
122
 
117
123
  ## Optional: LLM Enrichment
118
124
 
119
- With [Ollama](https://ollama.com) running locally, ABF can generate file summaries and embeddings for semantic search:
125
+ With [Ollama](https://ollama.com) running locally, ABF generates file summaries and embeddings:
120
126
 
121
127
  ```bash
122
- ollama pull qwen2.5-coder:1.5b # summaries
123
- ollama pull nomic-embed-text # embeddings
128
+ ollama pull qwen2.5-coder:1.5b # file summaries
129
+ ollama pull nomic-embed-text # embeddings / semantic search
124
130
  ```
125
131
 
126
- Without Ollama, all tools work normally semantic search falls back to keyword mode.
132
+ Both `abf init` and `abf portal Re-index` show live progress:
133
+
134
+ ```
135
+ ◆ Generating LLM summaries... (14/80)
136
+ ◆ Generating embeddings... (28/80)
137
+ ```
138
+
139
+ Large files are automatically split into chunks for embedding — no context-length errors.
140
+
141
+ Without Ollama, all tools still work normally. Semantic search falls back to keyword mode.
127
142
 
128
143
  ## Configuration
129
144
 
130
- Global config at `~/.abf/config.json`. Edit with `abf config` or `abf portal`.
145
+ Global config at `~/.abf/config.json`. Edit interactively with `abf config` or via `abf portal`.
131
146
 
132
147
  ```json
133
148
  {
@@ -142,7 +157,8 @@ Global config at `~/.abf/config.json`. Edit with `abf config` or `abf portal`.
142
157
  "indexing": {
143
158
  "autoWatch": true,
144
159
  "respectGitignore": true,
145
- "maxFileSizeKb": 512
160
+ "maxFileSizeKb": 512,
161
+ "excludedPatterns": ["*.min.js", "*.min.css", "*.map", "*.lock"]
146
162
  },
147
163
  "search": {
148
164
  "defaultMaxResults": 20
@@ -150,9 +166,50 @@ Global config at `~/.abf/config.json`. Edit with `abf config` or `abf portal`.
150
166
  }
151
167
  ```
152
168
 
169
+ ## Architecture
170
+
171
+ ```
172
+ AgentsBestFriend/
173
+ ├── packages/
174
+ │ ├── core/ Shared logic — DB, config, search, analysis, indexer, LLM
175
+ │ ├── server/ MCP server (11 tools)
176
+ │ └── cli/ Commander.js CLI + TUI portal
177
+ ├── turbo.json
178
+ └── package.json
179
+ ```
180
+
181
+ Built with Turborepo + pnpm workspaces. Core modules:
182
+
183
+ | Module | Purpose |
184
+ |---|---|
185
+ | `@abf/core/db` | Drizzle ORM + SQLite (WAL, FTS5) |
186
+ | `@abf/core/config` | Zod-validated config |
187
+ | `@abf/core/search` | ripgrep, keyword scorer, semantic (cosine similarity) |
188
+ | `@abf/core/analysis` | ts-morph AST, conventions detector, project overview |
189
+ | `@abf/core/indexer` | git ls-files discovery, incremental pipeline, file watcher |
190
+ | `@abf/core/llm` | Ollama client, summary & chunked embedding pipelines |
191
+ | `@abf/core/git` | Git CLI wrapper |
192
+
193
+ ## Development
194
+
195
+ ```bash
196
+ # Install dependencies
197
+ pnpm install
198
+
199
+ # Build all packages
200
+ pnpm build
201
+
202
+ # Watch mode
203
+ pnpm dev
204
+
205
+ # Type-check
206
+ pnpm type-check
207
+ ```
208
+
153
209
  ## Links
154
210
 
155
211
  - **GitHub**: [github.com/TheRealFloatDev/AgentsBestFriend](https://github.com/TheRealFloatDev/AgentsBestFriend)
212
+ - **npm**: [npmjs.com/package/agentsbestfriend](https://npmjs.com/package/agentsbestfriend)
156
213
  - **Issues**: [github.com/TheRealFloatDev/AgentsBestFriend/issues](https://github.com/TheRealFloatDev/AgentsBestFriend/issues)
157
214
  - **MCP Spec**: [modelcontextprotocol.io](https://modelcontextprotocol.io)
158
215
 
@@ -1,161 +1,173 @@
1
1
  ---
2
2
  name: abf
3
- description: "Use AgentsBestFriend (ABF) MCP tools for codebase navigation, search, and analysis instead of native file-reading tools. USE WHEN: exploring unfamiliar code, understanding architecture, searching across files, tracing imports/dependencies, analyzing change impact, reading large files, or needing project context. Prefer ABF tools over read_file, grep_search, semantic_search, and list_dir for multi-file workflows they return pre-structured, token-efficient results in a single call."
3
+ description: "MANDATORY: AgentsBestFriend (ABF) MCP tools are connected and MUST be used for ALL code navigation, search, and analysis. NEVER use read_file, grep_search, semantic_search, or list_dir for exploring code ABF tools are faster, return structured results, and use 50–80% fewer tokens. USE FOR: any file reading, code search, symbol lookup, dependency tracing, impact analysis, git history, or architecture questions. Load this skill IMMEDIATELY whenever working in a codebase."
4
4
  ---
5
5
 
6
- # AgentsBestFriend (ABF) — Codebase Navigation Skill
6
+ # AgentsBestFriend (ABF) — MANDATORY Code Navigation
7
7
 
8
- ABF is a local MCP server that provides AI-optimized tools for navigating, searching, and analyzing code repositories. These tools return structured, compact results that save 50–80% of tokens compared to manually reading files.
8
+ > **CRITICAL**: ABF MCP tools are available and MUST be your default for all code exploration.
9
+ > Using `read_file`, `grep_search`, or `list_dir` when ABF tools exist is **always wrong**.
9
10
 
10
- ## When to Use ABF Tools
11
+ ---
11
12
 
12
- **Always prefer ABF tools when you need to:**
13
- - Understand a project's structure or tech stack
14
- - Search for code across files (exact, keyword, or semantic)
15
- - Read specific functions or classes from large files
16
- - Trace imports, dependencies, or reverse dependencies
17
- - Assess the impact of changing a symbol
18
- - Get multi-file context around an entry point
13
+ ## ABSOLUTE RULES
19
14
 
20
- **Use native tools only when:**
21
- - Making edits to files (ABF is read-only)
22
- - Checking for lint/compile errors
23
- - Running terminal commands
24
- - The ABF MCP server is not connected
15
+ 1. **NEVER call `read_file` to explore code** — use `abf_chunk` (by symbol) or `abf_symbols` first
16
+ 2. **NEVER call `grep_search`** use `abf_search` (exact/keyword/semantic modes)
17
+ 3. **NEVER call `list_dir`** — use `abf_project_overview` or `abf_dependencies`
18
+ 4. **NEVER call `semantic_search`** — use `abf_search mode: "semantic"` or `abf_file_summary`
19
+ 5. **ALWAYS start a new codebase with `abf_project_overview`** — not by listing directories
20
+ 6. **ALWAYS use `abf_impact` before modifying a symbol** — never guess what depends on it
21
+ 7. **ALWAYS use `abf_conventions` before writing new code** — not by reading config files
25
22
 
26
- ## Decision Matrix
23
+ ---
27
24
 
28
- | Task | ABF Tool | Instead of |
29
- |------|----------|------------|
30
- | Orient in a new project | `abf_project_overview` | Reading README + listing directories + checking package.json |
31
- | Find where something is defined | `abf_search` (exact mode) | `grep_search` |
32
- | Find files related to a concept | `abf_search` (keyword mode) | Multiple `semantic_search` + `grep_search` calls |
33
- | Read a specific function from a large file | `abf_chunk` with symbol name | `read_file` (which loads entire file or requires guessing line ranges) |
34
- | List all exports of a file | `abf_symbols` | `read_file` and scanning manually |
35
- | Understand what a file imports and who imports it | `abf_dependencies` | Multiple `grep_search` calls for import statements |
36
- | Get multi-file context around one entry point | `abf_context_bundle` | 5–10 calls to `read_file` + `abf_symbols` + `abf_dependencies` |
37
- | Find all usages of a function/class | `abf_impact` | `grep_search` with manual filtering |
38
- | Understand project conventions | `abf_conventions` | Reading multiple config files manually |
39
- | Search by file purpose/description | `abf_file_summary` | No native equivalent |
40
- | Check git history or blame | `abf_git` | `run_in_terminal` with git commands |
25
+ ## Quick Decision Reference
26
+
27
+ | What you want to do | CORRECT tool | WRONG approach |
28
+ | -------------------------------- | --------------------------- | -------------------------------------- |
29
+ | Understand the project | `abf_project_overview` | `list_dir` + reading package.json |
30
+ | Find a function/class definition | `abf_search` mode: exact | `grep_search` |
31
+ | Read a specific function | `abf_chunk` symbol: "name" | `read_file` entire file |
32
+ | See what a file exports | `abf_symbols` | `read_file` + manual scan |
33
+ | Find files about a topic | `abf_search` mode: keyword | multiple `semantic_search` calls |
34
+ | Trace what a file imports | `abf_dependencies` | `grep_search` for import statements |
35
+ | Who calls this function? | `abf_impact` symbol: "name" | `grep_search` with manual filtering |
36
+ | Understand project style | `abf_conventions` | reading eslint + tsconfig + prettier |
37
+ | Get context around a file | `abf_context_bundle` | 5–10 `read_file` + `abf_symbols` calls |
38
+ | Search file descriptions | `abf_file_summary` | no native equivalent |
39
+ | Git history / blame / diff | `abf_git` | `run_in_terminal` with git commands |
40
+ | Index status or rebuild | `abf_index` | nothing |
41
41
 
42
- ## Recommended Workflows
42
+ ---
43
43
 
44
- ### 1. First Contact with a Codebase
44
+ ## Workflows
45
+
46
+ ### Starting work on any codebase
45
47
 
46
48
  ```
47
- 1. abf_project_overview architecture, tech stack, entry points
48
- 2. abf_conventions coding style, patterns, naming
49
- 3. abf_search (keyword: "main topic") find relevant files
49
+ 1. abf_project_overview ALWAYS first — architecture, stack, entry points
50
+ 2. abf_conventions style, patterns, naming before writing anything
51
+ 3. abf_search (keyword mode) find relevant files for the task
50
52
  ```
51
53
 
52
- ### 2. Understanding a Specific File
54
+ ### Reading code in a file
53
55
 
54
56
  ```
55
- 1. abf_symbols (file) see all exports/functions at a glance
56
- 2. abf_chunk (file, symbol: "name") read just the function you care about
57
- 3. abf_dependencies (file) → see what it imports and who imports it
57
+ 1. abf_symbols (file) see all exports/functions first
58
+ 2. abf_chunk (symbol: "name") read exactly the function you need
59
+ only use read_file if you need the ENTIRE file
58
60
  ```
59
61
 
60
- ### 3. Deep Dive into a Feature
62
+ ### Understanding a feature
61
63
 
62
64
  ```
63
- 1. abf_context_bundle (entry file, depth: 2, include: "smart")
64
- full source of entry + signatures of all dependencies in ONE call
65
- 2. If needed: abf_chunk to read specific dependency functions
65
+ abf_context_bundle (entry file, depth: 2)
66
+ full source of entry + signatures of all deps in ONE call
67
+ replaces 5–10 read_file calls
66
68
  ```
67
69
 
68
- ### 4. Change Impact Analysis
70
+ ### Before changing anything
69
71
 
70
72
  ```
71
- 1. abf_impact (symbol: "functionName") → all files and lines referencing it
72
- 2. abf_context_bundle (entry, focus_symbol: "functionName", reverse: true)
73
- → focused view of the function + its callers
73
+ abf_impact (symbol: "functionName")
74
+ ALL files and lines that reference it — never skip this
74
75
  ```
75
76
 
76
- ### 5. Searching for Code
77
+ ### Searching for code
77
78
 
78
79
  ```
79
- - Know the exact name? → abf_search mode: "exact"
80
- - Exploring a concept? → abf_search mode: "keyword"
81
- - Describe what you need? → abf_file_summary (searches LLM-generated descriptions)
82
- - Semantic similarity? → abf_search mode: "semantic" (requires Ollama)
80
+ Exact name known? → abf_search mode: "exact"
81
+ Exploring a concept? → abf_search mode: "keyword"
82
+ By file purpose? → abf_file_summary (searches LLM descriptions)
83
+ Semantic match? → abf_search mode: "semantic"
83
84
  ```
84
85
 
86
+ ---
87
+
85
88
  ## Tool Reference
86
89
 
87
- ### abf_project_overview
88
- **When:** Starting work on a project, or when asked "what does this project do?"
89
- **Saves:** Reading README + package.json + listing directories manually (3–5 calls → 1)
90
- - Returns: tech stack, frameworks, entry points, directory structure, language distribution, architectural patterns
91
- - No index required works immediately
92
-
93
- ### abf_search
94
- **When:** Looking for code, files, or patterns across the project
95
- **Saves:** Multiple grep_search or semantic_search calls
96
- - `mode: "exact"` — ripgrep-powered, supports regex, returns matching lines with context
97
- - `mode: "keyword"` — scores every file by keyword density, best for exploration
98
- - `mode: "semantic"` — embedding similarity (requires Ollama + index with embeddings)
99
- - Use `path_filter` to narrow scope (e.g. `"src/**/*.ts"`)
100
-
101
- ### abf_context_bundle
102
- **When:** You need to understand a file in the context of its dependencies
103
- **Saves:** 5–10 calls to read_file + abf_symbols + abf_dependencies (biggest saver)
90
+ ### `abf_project_overview`
91
+
92
+ Returns tech stack, frameworks, entry points, folder structure, language distribution, architectural patterns.
93
+ **Required params:** none
94
+ **Use it:** at the start of every new task in an unfamiliar codebase.
95
+
96
+ ### `abf_search`
97
+
98
+ - `mode: "exact"` ripgrep regex, returns matching lines with context
99
+ - `mode: "keyword"` — ranks every file by keyword density, best for exploration
100
+ - `mode: "semantic"` — embedding similarity (requires Ollama index)
101
+ - `path_filter` — narrow scope (e.g. `"src/**/*.ts"`)
102
+
103
+ ### `abf_chunk`
104
+
105
+ Read a specific function/class without loading the full file.
106
+
107
+ - `symbol: "functionName"` → returns the full body of that symbol
108
+ - No symbol → returns a chunk map; then use `chunk_index` for a specific section
109
+
110
+ ### `abf_symbols`
111
+
112
+ All exports, functions, classes, interfaces in a file with line ranges.
113
+ Call this before `abf_chunk` to see what's available.
114
+
115
+ ### `abf_context_bundle`
116
+
117
+ **Biggest token saver.** Returns entry file + signatures/source of all its imports in one call.
118
+
104
119
  - `include: "smart"` (default) — full source for entry, signatures for deps
105
- - `include: "signatures"` — compact type signatures only (minimal tokens)
106
- - `include: "full"` — full source code for all files up to depth
107
- - `focus_symbol` — only follows imports relevant to one function/class
108
- - `reverse: true` — also shows who imports this file
120
+ - `include: "full"` — full source for everything
121
+ - `focus_symbol` — only follow imports relevant to one function
109
122
  - `depth: 0–4` — how far to follow the import graph
110
123
 
111
- ### abf_chunk
112
- **When:** You need to read a specific function/class from a file without loading the entire file
113
- **Saves:** read_file loading hundreds of irrelevant lines
114
- - Call with `symbol: "functionName"` to get its full source code directly
115
- - Call without symbol first to get a chunk overview, then use `chunk_index` to retrieve specific sections
116
-
117
- ### abf_symbols
118
- **When:** You need to see what a file exports without reading its full content
119
- **Saves:** read_file + mentally parsing the file structure
120
- - Returns: function signatures, classes, interfaces, types, variables with line ranges
121
- - Shows export status (★ = exported) and nesting
122
-
123
- ### abf_dependencies
124
- **When:** Tracing what a file imports or finding who depends on it
125
- **Saves:** Multiple grep_search calls for import statements
126
- - Returns both imports and reverse dependencies (imported_by)
127
-
128
- ### abf_impact
129
- **When:** Assessing how widely a symbol is used before changing it
130
- **Saves:** grep_search + manual filtering of false positives
131
- - Returns all files and specific lines that reference the symbol
132
- - Classifies usage type (call, import, type reference, etc.)
133
-
134
- ### abf_file_summary
135
- **When:** Searching by file purpose rather than exact code text
136
- **Saves:** No native equivalent unique capability
137
- - Full-text search across LLM-generated file descriptions
138
- - Requires summaries to be generated first (`abf_index` action: summarize)
139
-
140
- ### abf_conventions
141
- **When:** Understanding project style before making changes
142
- **Saves:** Reading eslint, tsconfig, prettier, and other config files manually
143
- - Detects naming patterns, design patterns, folder structure conventions
144
- - Returns confidence scores and examples
145
-
146
- ### abf_git
147
- **When:** Checking history, blame, or diffs
148
- **Saves:** Running git commands in terminal and parsing output
149
- - Actions: log, file_history, blame, diff
150
- - Structured output ready for analysis
151
-
152
- ### abf_index
153
- **When:** Managing the ABF index
154
- - `status` check index health
155
- - `rebuild` — full re-index
156
- - `update`incremental update
157
- - `summarize` generate LLM summaries (requires Ollama)
158
-
159
- ### abf_ping
160
- **When:** Verifying ABF is running
161
- - Returns server version, project root, and status
124
+ ### `abf_dependencies`
125
+
126
+ Returns both imports (what this file uses) and reverse dependencies (who imports this file).
127
+
128
+ ### `abf_impact`
129
+
130
+ All files and specific lines that reference a symbol.
131
+ **Always call before modifying a function, class, or exported type.**
132
+
133
+ ### `abf_conventions`
134
+
135
+ Detected naming patterns, design patterns, folder structure conventions — with confidence scores and examples.
136
+
137
+ ### `abf_file_summary`
138
+
139
+ Full-text search across LLM-generated file descriptions (FTS5/BM25 ranked).
140
+ Use when you want to find files by purpose, not by exact code text.
141
+
142
+ - `match_mode: "or"` (default) broader results
143
+ - `match_mode: "and"` stricter matching
144
+
145
+ ### `abf_git`
146
+
147
+ Structured git output — no terminal needed.
148
+
149
+ - `action: "log"`recent commits
150
+ - `action: "file_history"` commits touching a file
151
+ - `action: "blame"` line-by-line authorship
152
+ - `action: "diff"` — staged, unstaged, or between commits
153
+
154
+ ### `abf_index`
155
+
156
+ - `action: "status"` index health and file count
157
+ - `action: "rebuild"` full re-index
158
+ - `action: "update"` — incremental update
159
+ - `action: "summarize"` — generate LLM summaries (requires Ollama)
160
+
161
+ ### `abf_ping`
162
+
163
+ Returns server version and project root. Use to verify ABF is connected.
164
+
165
+ ---
166
+
167
+ ## When ABF Tools Are NOT Needed
168
+
169
+ - **Writing/editing files** ABF is read-only; use your normal edit tools
170
+ - **Running tests or build commands** use the terminal
171
+ - **Checking lint/type errors** — use native diagnostic tools
172
+ - **ABF is not connected** — fall back to native tools, then reconnect with `abf start`
173
+ - **ABF returned no useful result** — if you already called the appropriate ABF tool and the output didn't answer your question (e.g. `abf_search` returned nothing, `abf_chunk` didn't find the symbol), fall back to native tools for that specific lookup. Do not skip ABF preemptively — only fall back _after_ ABF has been tried.