Summary
When using fff-mcp grep as a backend for a grep -R -n --fixed-strings workflow, results can be ranked/partial rather than exhaustive vs native grep for the same target subdirectory.
Environment
- fff.nvim repo:
main (as of 2026-04-10)
- install path:
fff-mcp via install-fff-mcp.sh
- macOS host
Repro (real monorepo case, sanitized)
API_SRC=apps/api/src
WEB_SRC=apps/web/src
# run from repo root
/usr/bin/grep -R -n --fixed-strings TODO "$API_SRC" | wc -l
/usr/bin/grep -R -n --fixed-strings TODO "$WEB_SRC" | wc -l
# fff-backed path (wrapper -> fff-mcp grep)
NCR_ENABLE_FFF_GREP=1 grep -R -n --fixed-strings TODO "$API_SRC" | wc -l
NCR_ENABLE_FFF_GREP=1 grep -R -n --fixed-strings TODO "$WEB_SRC" | wc -l
Observed in one repo:
- API native:
14
- API fff-backed:
6
- Web native:
4
- Web fff-backed:
2
Minimal synthetic repro (public-safe)
ROOT="$(mktemp -d)"
mkdir -p "$ROOT"/apps/api/src "$ROOT"/apps/web/src "$ROOT"/docs "$ROOT"/scripts
cd "$ROOT"
git init
# 14 TODOs in api target path
for i in $(seq 1 14); do echo "export const a$i = 'TODO api $i'" >> apps/api/src/api.ts; done
# 4 TODOs in web target path
for i in $(seq 1 4); do echo "export const w$i = 'TODO web $i'" >> apps/web/src/web.ts; done
# noise outside target paths
for i in $(seq 1 80); do echo "TODO doc $i" >> docs/readme.md; done
for i in $(seq 1 80); do echo "echo TODO script $i" >> scripts/build.sh; done
git add . && git commit -m "seed"
/usr/bin/grep -R -n --fixed-strings TODO apps/api/src | wc -l
# expected: 14
# helper call used by wrapper
node ~/.local/share/ncr/bin/grep-fff-helper.mjs --path "$ROOT/apps/api/src" --query TODO --line-number 1 | wc -l
# observed here: 10 (lines 11-14 missing)
Why this matters
For command-router use cases, grep compatibility requires shape + completeness parity for supported forms.
If FFF is intentionally ranked/preview-oriented, that is useful for AI workflows, but wrappers need an explicit exhaustive contract/mode before using it as a default native backend.
Request
Would you consider adding one of these:
- An explicit exhaustive grep mode for MCP/tool calls (native-like completeness), or
- Tool metadata/options that clearly distinguish
ranked/preview vs exhaustive, including paging semantics and termination guarantees.
Happy to test a proposed flag/contract and report back with parity checks.
Summary
When using
fff-mcpgrep as a backend for agrep -R -n --fixed-stringsworkflow, results can be ranked/partial rather than exhaustive vs nativegrepfor the same target subdirectory.Environment
main(as of 2026-04-10)fff-mcpviainstall-fff-mcp.shRepro (real monorepo case, sanitized)
Observed in one repo:
14642Minimal synthetic repro (public-safe)
Why this matters
For command-router use cases,
grepcompatibility requires shape + completeness parity for supported forms.If FFF is intentionally ranked/preview-oriented, that is useful for AI workflows, but wrappers need an explicit exhaustive contract/mode before using it as a default native backend.
Request
Would you consider adding one of these:
ranked/previewvsexhaustive, including paging semantics and termination guarantees.Happy to test a proposed flag/contract and report back with parity checks.