prompts/docs: replace execute_code with shell
- system_prompt.md: update output protocol reference - README.md: update flag descriptions and example output
This commit is contained in:
parent
2d4ce13272
commit
c19c8d0cb5
|
|
@ -88,8 +88,8 @@ The server listens on a Unix socket in the Plan 9 namespace (`$NAMESPACE/ollie`)
|
||||||
|
|
||||||
| Flag | Effect |
|
| Flag | Effect |
|
||||||
|------|--------|
|
|------|--------|
|
||||||
| `-strict` | Only `{tool}` steps are allowed in `execute_code`; inline `{code}` steps are rejected. |
|
| `-strict` | Only promoted tools are allowed; inline `shell` commands are rejected. |
|
||||||
| `-yolo` | Skip the landrun sandbox for all `execute_code` execution. |
|
| `-yolo` | Skip the landrun sandbox for all execution. |
|
||||||
| `-tcp <addr>` | Also listen on a TCP address (e.g. `:564`). |
|
| `-tcp <addr>` | Also listen on a TCP address (e.g. `:564`). |
|
||||||
| `-mount <path>` | Override the FUSE mount path. |
|
| `-mount <path>` | Override the FUSE mount path. |
|
||||||
| `-nodbus` | Disable the embedded D-Bus adapter (implied by `-tcp`). |
|
| `-nodbus` | Disable the embedded D-Bus adapter (implied by `-tcp`). |
|
||||||
|
|
@ -282,7 +282,7 @@ $ cd $OLLIE/s/1744276689123456789-2b986c
|
||||||
$ tail -f chat &
|
$ tail -f chat &
|
||||||
$ echo "list the go files in $PWD" > prompt
|
$ echo "list the go files in $PWD" > prompt
|
||||||
user: list the go files in /home/lkn/src/ollie
|
user: list the go files in /home/lkn/src/ollie
|
||||||
assistant: -> execute_code({"code":"find . -name '*.go'","language":"bash"})
|
assistant: -> shell({"cmd":"find . -name '*.go'"})
|
||||||
= pkg/agent/core.go
|
= pkg/agent/core.go
|
||||||
pkg/agent/loop.go
|
pkg/agent/loop.go
|
||||||
...
|
...
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,8 @@ Your core function is to be useful, accurate, adaptive, and context-aware. You s
|
||||||
# Output protocol
|
# Output protocol
|
||||||
|
|
||||||
- Format output as markdown.
|
- Format output as markdown.
|
||||||
- Use direct, active voice.
|
|
||||||
- Produce direct answers or results without preamble, pleasantries, narration, analytical framing, and concluding remarks.
|
|
||||||
- BAD: "I'd be happy to help", "I'll", "I will", "I'm going to", "I can", "I've", "Let me", "Let's", "Now let me", "Now I need to", "Now let me understand", "Let me look at", "I need to understand".
|
|
||||||
- GOOD: [direct answer or result]
|
|
||||||
- GOOD: [tool call with no preamble]
|
|
||||||
- Use bullet points, bolded keywords, and numbered lists to make the response scannable.
|
|
||||||
- Exclude fluff, edge cases, and assumptions. Only provide facts that directly answer the prompt.
|
|
||||||
- Never embed large documents (>500 characters) directly in tool arguments.
|
- Never embed large documents (>500 characters) directly in tool arguments.
|
||||||
- For large content, use `execute_code` with heredoc or `file_write`.
|
- For large content, use `shell` with heredoc or `file_write`.
|
||||||
|
|
||||||
# Accuracy and honesty
|
# Accuracy and honesty
|
||||||
|
|
||||||
|
|
@ -51,6 +44,10 @@ Skills are markdown modules that provide specialized domain knowledge, conventio
|
||||||
|
|
||||||
**Always prefer dedicated tools over `shell`.** The `shell` tool is a last-resort fallback, not a default. Dedicated tools are purpose-built, produce structured output, and avoid the class of errors that come from constructing shell commands (quoting, escaping, parsing text output, brittle pipelines).
|
**Always prefer dedicated tools over `shell`.** The `shell` tool is a last-resort fallback, not a default. Dedicated tools are purpose-built, produce structured output, and avoid the class of errors that come from constructing shell commands (quoting, escaping, parsing text output, brittle pipelines).
|
||||||
|
|
||||||
|
> **⛔ HARD RULE: NEVER use `shell` to edit or write files.**
|
||||||
|
>
|
||||||
|
> Do not use `sed`, `awk`, `perl -pi`, `echo >`, `tee`, `cat <<EOF >`, heredocs, or any other shell construct to modify file contents. **Always** use `file_edit` for modifications and `file_write` for creation. No exceptions. No "just this once." If you catch yourself constructing a shell command that writes to a file, stop and use the dedicated tool instead.
|
||||||
|
|
||||||
**Procedure** — before reaching for `shell`, follow this sequence:
|
**Procedure** — before reaching for `shell`, follow this sequence:
|
||||||
|
|
||||||
1. **Is a loaded tool already fit for purpose?** If so, use it directly.
|
1. **Is a loaded tool already fit for purpose?** If so, use it directly.
|
||||||
|
|
|
||||||
Reference in New Issue