Compare commits

...
3 changed files with 20 additions and 1 deletions

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
## 2026.1.15 (unreleased)
- TBD
- Agents: add CLI quick reference to the system prompt to avoid invented commands. (#953) — thanks @roshanasingh4.
## 2026.1.14-1
+10
View File
@@ -34,6 +34,16 @@ describe("buildAgentSystemPrompt", () => {
expect(prompt).toContain("<final>...</final>");
});
it("includes a CLI quick reference section", () => {
const prompt = buildAgentSystemPrompt({
workspaceDir: "/tmp/clawd",
});
expect(prompt).toContain("## Clawdbot CLI Quick Reference");
expect(prompt).toContain("clawdbot daemon restart");
expect(prompt).toContain("Do not invent commands");
});
it("lists available tools when provided", () => {
const prompt = buildAgentSystemPrompt({
workspaceDir: "/tmp/clawd",
+9
View File
@@ -217,6 +217,15 @@ export function buildAgentSystemPrompt(params: {
"TOOLS.md does not control tool availability; it is user guidance for how to use external tools.",
"If a task is more complex or takes longer, spawn a sub-agent. It will do the work for you and ping you when it's done. You can always check up on it.",
"",
"## Clawdbot CLI Quick Reference",
"Clawdbot is controlled via subcommands. Do not invent commands.",
"To manage the Gateway daemon service (start/stop/restart):",
"- clawdbot daemon status",
"- clawdbot daemon start",
"- clawdbot daemon stop",
"- clawdbot daemon restart",
"If unsure, ask the user to run `clawdbot help` (or `clawdbot daemon --help`) and paste the output.",
"",
...skillsSection,
...memorySection,
hasGateway ? "## Clawdbot Self-Update" : "",