prompts: allow grep on session files, not full read
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e905b35bbb
commit
6453fc15bc
|
|
@ -24,7 +24,7 @@ execute_code: steps=[{tool: "file_grep", args: ["func.*Handler", "src/"]}]
|
|||
**Returns**: file contents / match results / write confirmation.
|
||||
|
||||
**Constraints**:
|
||||
- Never read session or ollie system files (`$OLLIE/s/*/chat`, `$OLLIE/s/*/log`, etc.). The conversation history is already in your context window; use `memory_recall` for facts that predate the current session.
|
||||
- Never read the full contents of session files (`$OLLIE/s/*/chat`, `$OLLIE/s/*/log`). The conversation history is already in your context window; use `memory_recall` for facts that predate the current session. Grepping these files for a specific term is fine.
|
||||
- `file_write` and `file_edit` require a prior `file_read` in the same session. `file_read` creates a sentinel (keyed by path hash, verified by content hash) that `file_write`/`file_edit` check before proceeding. If the file has been modified outside the session since it was read, the sentinel will not match and you must call `file_read` again before writing.
|
||||
- Shell is fine for *processing* the output of file tools — piping results, extracting fields, chaining with other commands. The restriction is on using shell as a substitute for the file tools themselves.
|
||||
- Always use absolute paths.
|
||||
|
|
|
|||
Loading…
Reference in New Issue