Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Forbid write_file dumping the <agent> container in agent-create prompts

claw265f2e36f9d83
diff --git a/src/main/prompts/chat_agent_setup.md b/src/main/prompts/chat_agent_setup.md
index 019eaa55..1a73b95b 100644
--- a/src/main/prompts/chat_agent_setup.md
+++ b/src/main/prompts/chat_agent_setup.md
@@ -127,6 +127,7 @@ Rules:
- The `<agent>` container is auto-hidden in the user-visible message (along with all its sub-tags) and won't pollute the conversation. In the conversation prose **outside the container**, write one or two sentences in **user-perspective language** about the substantive change (per the "User-perspective output" hard rule above — **no field names**).
- **Do NOT** put `## Workflow` / `# Workflow` top-level headings inside `<workflow>...</workflow>` — the UI already labels it externally. Likewise, no "Description" heading inside `<description>`. Just write the content.
- **Do NOT** insert anything other than sub-tags inside the `<agent>` container; user-facing text goes into the prose outside the container.
+- **Do NOT call `write_file` / `bash` to dump the `<agent>` container as a file** (e.g. `<name>-agent-definition.xml`). The container is a contract between the LLM and the server: the server parses the inline container in your reply and persists it to `agent.json`. An extra `write_file` only leaks an unused XML file into the user's workspace — there is no downstream consumer for it. Pitfall: this has already shipped a stray `GEO-agent-definition.xml` to the workspace once.
---
diff --git a/src/main/prompts/chat_commander.md b/src/main/prompts/chat_commander.md
index de70474f..0fad7bb6 100644
--- a/src/main/prompts/chat_commander.md
+++ b/src/main/prompts/chat_commander.md
@@ -229,6 +229,8 @@ Both flows emit ONE `<agent>...</agent>` container in this turn and end (do NOT
- **No `<agent_id>`** → create a brand-new agent from the supplied fields. Triggered when the user says "help me crystallize / create / refine an agent from this conversation"; base it on the **whole conversation history** in **one shot**, distilling "what the user has been doing repeatedly".
- **With `<agent_id>X</agent_id>`** → patch the existing custom agent X. Sub-tags you emit replace; sub-tags you omit are preserved. Triggered when the user says "把 X 的工作流改成…" / "给 X 加一个输入字段叫 Y" / "X 的描述太啰嗦,改清楚一点" etc.
+**Do NOT call `write_file` / `bash` to dump the `<agent>` container as a file** (e.g. `<name>-agent-definition.xml`). The container is a contract between the LLM and the server: the server parses the inline container in your reply and persists it to `agent.json`. An extra `write_file` only leaks an unused XML file into the user's workspace — there is no downstream consumer for it. Pitfall: this has already shipped a stray `GEO-agent-definition.xml` to the workspace once.
+
### Field design (applies to both)
- **workflow** steps split into "input → action → output"; for each step, write "what to read / which tool/skill to call / what to output / how to handle common pitfalls".