Skip to content

Commit d7e2fe8

Browse files
NagyViktNagyVikt
andauthored
Prefer FFF for search guidance (#532)
The managed Codex/Claude instructions already mentioned fff, but the RTK guidance could still read as if RTK should wrap file search first. This records fff MCP as the first-choice search surface whenever it is available, with RTK and rg as fallbacks only. Constraint: fff is client-provided MCP capability and is not always available. Rejected: Require fff-mcp as a global Guardex dependency | current status tests intentionally keep fff-mcp out of global service requirements. Confidence: high Scope-risk: narrow Directive: Keep file-search ordering fff MCP first, RTK shell wrappers second. Tested: rtk test node --test test/prompt.test.js Tested: rtk test node --test test/setup.test.js Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
1 parent 8454c25 commit d7e2fe8

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ GUARDEX_ON=1
373373
- Work from an `agent/*` branch and worktree, never directly on the protected base branch.
374374
- Claim files before edits.
375375
- Use Colony for coordination before falling back to OMX state/notepad.
376+
- Prefer fff MCP tools for file search whenever available; do not route file search through RTK when fff can answer it.
376377
- Use OpenSpec for durable behavior contracts and change-driven work.
377378
- Keep outputs compact: less word, same proof.
378379
- Commit, push, and open/update a PR for completed work unless the user explicitly says to keep it local.
@@ -480,6 +481,12 @@ Default: less word, same proof.
480481
- Treat local edit/commit, remote publish/PR, CI diagnosis, and cleanup as bounded phases.
481482
- Do not spend fresh narration or approval turns on obvious safe follow-ons inside an already authorized phase unless the risk changes.
482483

484+
### FFF file search
485+
486+
Use the fff MCP tools for all file search operations instead of default tools, including RTK shell wrappers.
487+
488+
If fff MCP tools are unavailable in the current client, fall back to `rtk grep`, `rtk find`, `rtk ls`, or `rg` and keep output compact.
489+
483490
### Caveman style
484491

485492
Commentary and progress updates use smart-caveman `ultra` by default:

templates/AGENTS.multiagent-safety.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ GUARDEX_ON=1
2727
- Work from an `agent/*` branch and worktree, never directly on the protected base branch.
2828
- Claim files before edits.
2929
- Use Colony for coordination before falling back to OMX state/notepad.
30-
- Use the fff MCP tools for all file search operations instead of default tools.
30+
- Prefer fff MCP tools for file search whenever available; do not route file search through RTK when fff can answer it.
3131
- Use OpenSpec for durable behavior contracts and change-driven work.
3232
- Keep outputs compact: less word, same proof.
3333
- Commit, push, and open/update a PR for completed work unless the user explicitly says to keep it local.
@@ -137,7 +137,7 @@ Default: less word, same proof.
137137

138138
### RTK command compression
139139

140-
When `rtk` is available, prefer it for noisy shell discovery and verification.
140+
When `rtk` is available, prefer it for noisy shell discovery and verification. For file search, fff MCP takes precedence whenever available.
141141

142142
- Files: `rtk ls .`, `rtk read <file>`, `rtk read <file> -l aggressive`, `rtk smart <file>`, `rtk find "<glob>" .`, `rtk grep "<pattern>" .`, `rtk diff <a> <b>`.
143143
- Git and GitHub: `rtk git status`, `rtk git diff`, `rtk git log -n 10`, `rtk gh pr list`, `rtk gh pr view <id>`.
@@ -150,9 +150,9 @@ When `rtk` is available, prefer it for noisy shell discovery and verification.
150150

151151
### FFF file search
152152

153-
Use the fff MCP tools for all file search operations instead of default tools.
153+
Use the fff MCP tools for all file search operations instead of default tools, including RTK shell wrappers.
154154

155-
If fff MCP tools are unavailable in the current client, fall back to `rtk grep`, `rtk ls`, or `rg` and keep output compact.
155+
If fff MCP tools are unavailable in the current client, fall back to `rtk grep`, `rtk find`, `rtk ls`, or `rg` and keep output compact.
156156

157157
### Caveman style
158158

test/prompt.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ test('prompt --snippet prints the managed AGENTS template with token budget and
165165
assert.match(result.stdout, /rtk git status/);
166166
assert.match(result.stdout, /Do not wrap machine-readable commands with RTK/);
167167
assert.match(result.stdout, /### FFF file search/);
168-
assert.match(result.stdout, /Use the fff MCP tools for all file search operations instead of default tools\./);
168+
assert.match(result.stdout, /For file search, fff MCP takes precedence whenever available\./);
169+
assert.match(result.stdout, /Use the fff MCP tools for all file search operations instead of default tools, including RTK shell wrappers\./);
169170
assert.match(result.stdout, /If fff MCP tools are unavailable in the current client/);
170171
assert.match(result.stdout, /### Caveman style/);
171172
assert.match(result.stdout, /Answer order stays fixed: answer first, cause next, fix or next step last\./);

0 commit comments

Comments
 (0)