# FFF (Fast File Finder)

FFF is an experimental integration that gives coding agents a faster, more token-efficient alternative to the built-in Grep and Glob tools for searching files and code.

FFF is powered by [fff.nvim](https://github.com/dmtrKovalenko/fff.nvim) and runs as an MCP server alongside the agent. It provides frecency-ranked results (frequent and recent files first, git-dirty files boosted) and specialized search tools optimized for AI agent workflows.

## Enabling FFF

FFF is an opt-in experimental feature. To enable it:

1. Open **Settings** (gear icon or **&#8984;,**)
2. Navigate to the **Experimental** section
3. Toggle **FFF (Fast File Finder)** on

On first enable, Polyscope automatically downloads and installs the FFF binary. You'll see an "Installing..." indicator while the download completes.

## How It Works

When FFF is enabled, agents receive an additional instruction to prefer FFF tools (`grep`, `find_files`, `multi_grep`) over the default Grep and Glob tools. FFF runs as a stdio-based MCP server that launches alongside each agent session.

FFF provides three search tools:

- **`grep`** — Searches file contents with auto-expanded definition context. The default tool agents should reach for.
- **`find_files`** — Finds files by name using fuzzy matching. Use when looking for a file rather than a definition.
- **`multi_grep`** — Searches multiple patterns in a single call (OR logic). Useful for finding different name variants at once.

## When to Use FFF

FFF is most beneficial for:

- **Large codebases** where Grep/Glob searches can be slow or return too many results
- **Frequent searches** where frecency ranking surfaces the most relevant files first
- **Token-conscious workflows** where reducing search result size helps stay within context limits

## Disabling FFF

Toggle the setting off in **Settings > Experimental**. Agents will immediately revert to using the built-in Grep and Glob tools.
