prompts: adopt compact defaults and rebalance guidance

Promote the a0_small prompt work into the shipped default stack.

Token count for default prompt, accounting for tools, plugins, secrets placeholders, inactive project, etc: 2996 tokens.

- migrate compact prompt fragments into core prompts, plugin-owned prompts, and the agent0 overlay
- remove the obsolete a0_small profile and rename the tool-call knowledge reference to a generic framework file
- keep a small set of high-value JSON examples while preserving key guardrails for tool names, tool args, and method-style calls
- bake balanced conciseness into default response behavior without changing the initial greeting
- drop the call_sub prompt-side loader and keep call_sub guidance self-contained
- restore essential secrets/security guidance, preserve inactive-project messaging, and rebalance the A2A prompt
- add a regression test that verifies the assembled default agent0 prompt stays under the token budget and retains critical guardrails
This commit is contained in:
Alessandro 2026-03-30 21:42:37 +02:00
parent 3df7065685
commit 54362bf8ee
65 changed files with 327 additions and 1410 deletions

View file

@ -1,90 +1,26 @@
### code_execution_tool
execute terminal commands python nodejs code for computation or software tasks
place code in "code" arg; escape carefully and indent properly
select "runtime" arg: "terminal" "python" "nodejs" "output"
select "session" number, 0 default, others for multitasking
if code runs long, use runtime "output" to wait
use argument reset true on next call to kill previous process when stuck default false
use "pip" "npm" "apt-get" in "terminal" to install package
to output, use print() or console.log()
if tool outputs error, adjust code before retrying;
important: check code for placeholders or demo data; replace with real variables; don't reuse snippets
don't use with other tools except thoughts; wait for response before using others
check dependencies before running code
output may end with [SYSTEM: ...] information comming from framework, not terminal
usage:
1 execute terminal command
run terminal, python, or nodejs commands
args:
- `runtime`: `terminal`, `python`, `nodejs`, or `output`
- `code`: command or script code
- `session`: terminal session id; default `0`
- `reset`: kill a session before running; `true` or `false`
rules:
- use `runtime=output` to poll running work
- use `input` for interactive terminal prompts
- do not interleave other tools while waiting
- ignore framework `[SYSTEM: ...]` info in output
example:
~~~json
{
"thoughts": [
"Need to do...",
"Need to install...",
],
"headline": "Installing zip package via terminal",
"tool_name": "code_execution_tool",
"tool_args": {
"runtime": "terminal",
"session": 0,
"reset": false,
"code": "apt-get install zip",
}
}
~~~
2 execute python code
~~~json
{
"thoughts": [
"Need to do...",
"I can use...",
"Then I can...",
],
"headline": "Executing Python code to check current directory",
"tool_name": "code_execution_tool",
"tool_args": {
"runtime": "python",
"session": 0,
"reset": false,
"code": "import os\nprint(os.getcwd())",
}
}
~~~
3 execute nodejs code
~~~json
{
"thoughts": [
"Need to do...",
"I can use...",
"Then I can...",
],
"headline": "Executing Javascript code to check current directory",
"tool_name": "code_execution_tool",
"tool_args": {
"runtime": "nodejs",
"session": 0,
"reset": false,
"code": "console.log(process.cwd());",
}
}
~~~
4 wait for output with long-running scripts
~~~json
{
"thoughts": [
"Waiting for program to finish...",
],
"headline": "Waiting for long-running program to complete",
"tool_name": "code_execution_tool",
"tool_args": {
"runtime": "output",
"session": 0,
}
"thoughts": ["I should run a terminal command in the default session."],
"headline": "Running terminal command",
"tool_name": "code_execution_tool",
"tool_args": {
"runtime": "terminal",
"session": 0,
"reset": false,
"code": "pwd"
}
}
~~~