JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(prompt): Align code mode bash usage rules with CC-style command chaining.
kdgmpwc335ec9c9310
diff --git a/jiuwenswarm/agents/harness/code/prompt/code_prompt_builder.py b/jiuwenswarm/agents/harness/code/prompt/code_prompt_builder.pyindex c86dacd223..484f19c13c 100644--- a/jiuwenswarm/agents/harness/code/prompt/code_prompt_builder.py+++ b/jiuwenswarm/agents/harness/code/prompt/code_prompt_builder.py@@ -363,14 +363,26 @@ def _code_using_your_tools_prompt() -> PromptSection:"\n""- Working directory persists between commands, ""but shell state does not.\n"- "- Independent commands should be issued "- "as multiple parallel bash tool calls; "- "dependent commands should employ && chaining; "- "use ; if you do not care about failure; "- "never use newlines for separating commands.\n"- "- Never sleep between commands "- "that could be executed immediately; "- "never use sleep-retry loops for failed commands.\n"+ "- Prefer one bash call per workflow step when commands "+ "share context or order matters. "+ "Chain dependent commands with && in a single bash call; "+ "use ; only when earlier failures should not block later steps.\n"+ "- Do NOT split dependent verification across multiple rounds. "+ "Start server, wait, and HTTP-test in one call, e.g. "+ "`python app.py & sleep 3 && curl http://localhost:5000/`.\n"+ "- When multiple bash calls are needed in one response, "+ "parallelize only truly independent operations "+ "(e.g. `git status` and `git diff`). "+ "Do not parallelize setup, verification, or cleanup "+ "that belong to the same check.\n"+ "- Use a separate bash round only when the previous command "+ "failed and you need a different diagnostic or fix.\n"+ "- Do not use newlines to separate commands "+ "in a single bash call "+ "(newlines are ok in quoted strings).\n"+ "- A short sleep after starting a background process "+ "is fine within the same chained command; "+ "do not use sleep-retry loops to mask failures.\n""\n""### Git Safety Protocol\n""\n"