tools/prompts: fix task_add printf bug; point agents at t/idx for tool discovery
printf format string starting with '-' was treated as a flag; use '--' to terminate option parsing. Agents reading individual tool scripts to understand them should use $OLLIE/t/idx instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2d20f95b93
commit
dcf7d4010f
|
|
@ -25,6 +25,7 @@ execute_code: steps=[{tool: "file_grep", args: ["func.*Handler", "src/"]}]
|
|||
|
||||
**Constraints**:
|
||||
- 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.
|
||||
- Never read individual tool scripts to understand their behavior. To discover or verify tool capabilities, read `$OLLIE/t/idx`.
|
||||
- `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.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ current="$(cat "$plan" 2>/dev/null)"
|
|||
{
|
||||
[ -n "$current" ] && printf '%s\n' "$current"
|
||||
for task in "$@"; do
|
||||
printf '- [ ] %s\n' "$task"
|
||||
printf -- '- [ ] %s\n' "$task"
|
||||
done
|
||||
} > "$plan"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue