Skip to content

fix(agents): align taizi and liubu SOULs with subagent flow#285

Open
luoyanglang wants to merge 1 commit intocft0808:mainfrom
luoyanglang:wolf/fix-stale-subagent-prompts
Open

fix(agents): align taizi and liubu SOULs with subagent flow#285
luoyanglang wants to merge 1 commit intocft0808:mainfrom
luoyanglang:wolf/fix-stale-subagent-prompts

Conversation

@luoyanglang
Copy link
Copy Markdown
Contributor

Summary

Issue: Related to #251 / #246 / #274 — taizi and liubu still instruct agents to use sessions_send on paths that are already configured for subagent chaining
Type: Bug Fix
Severity: Medium

This PR aligns the remaining taizi/liubu SOUL instructions with the subagent flow that was already adopted in fe7c06c for zhongshu/menxia/shangshu. It removes stale guidance that still sends agents down the older sessions_send path, which is more brittle and matches the user reports about "中书省不在线" / "只能太子可用".


Root Cause

After fe7c06c, the three-province chain already moved to subagent calls, but taizi and liubu SOUL files still told agents to use sessions_send.

  • agents/taizi/SOUL.md:67-68 still said to send the task to zhongshu via sessions_send
  • agents/taizi/SOUL.md:92 still assumed the final handoff would come back via sessions_send
  • agents/groups/liubu.md:29 and each liubu SOUL still told execution agents to report back to shangshu with sessions_send
  • Meanwhile, agents/shangshu/SOUL.md:3-5 already defines shangshu as a subagent caller, and install.sh / install.ps1 already grant the necessary subagents.allowAgents permissions

So the repository ended up with a mixed flow:

taizi -> sessions_send -> zhongshu
zhongshu -> subagent -> menxia/shangshu
liubu -> sessions_send -> shangshu

That inconsistency keeps steering agents toward the older and more failure-prone path even though the project is already configured for subagent chaining.

Before
- taizi: use sessions_send to hand work to zhongshu
- liubu: use sessions_send to report back to shangshu

After
- taizi: call zhongshu as a subagent
- liubu: execute as shangshu subagents and return results directly

Fix Description

Changed files:

  • agents/taizi/SOUL.md:67-68 — replace the zhongshu handoff instruction with a subagent call
  • agents/taizi/SOUL.md:92 — update the completion wording so taizi expects the full zhongshu -> menxia -> shangshu chain to return a final result
  • agents/groups/liubu.md:29 — replace the stale sessions_send return step with direct subagent return wording
  • agents/hubu/SOUL.md:3-5,40 — mark hubu as a shangshu subagent and remove the old sessions_send return instruction
  • agents/libu/SOUL.md:3-5,40 — mark libu as a shangshu subagent and remove the old sessions_send return instruction
  • agents/bingbu/SOUL.md:3-5,40 — mark bingbu as a shangshu subagent and remove the old sessions_send return instruction
  • agents/xingbu/SOUL.md:3-5,40 — mark xingbu as a shangshu subagent and remove the old sessions_send return instruction
  • agents/gongbu/SOUL.md:3-5,40 — mark gongbu as a shangshu subagent and remove the old sessions_send return instruction
  • agents/libu_hr/SOUL.md:3-5,40 — mark libu_hr as a shangshu subagent and remove the old sessions_send return instruction

Rationale:

  • This reuses the same prompt pattern already used in agents/shangshu/SOUL.md
  • It matches the subagents.allowAgents permissions already shipped by the install scripts
  • It keeps the fix narrowly scoped to prompt consistency, without changing kanban state flow or runtime code

Test Results

Test Description Status
rg -n "sessions_send" agents Confirmed there are no remaining taizi/liubu execution instructions that require sessions_send; only explicit "not sessions_send" guidance remains in the subagent-based SOULs ✅ PASS
git diff --check Checked the patch for whitespace / patch formatting issues ✅ PASS
Manual static review Verified the full instruction chain is now internally consistent: taizi -> zhongshu (subagent), zhongshu -> menxia/shangshu (subagent), shangshu -> liubu (subagent), liubu -> shangshu (direct return) ✅ PASS

Disprove Analysis

是否已有其他地方修复

I checked the earlier fix commit fe7c06c and it only updated agents/zhongshu/SOUL.md, agents/menxia/SOUL.md, and agents/shangshu/SOUL.md. The stale taizi/liubu instructions were still present on upstream/main before this PR.

影响范围

This change is limited to SOUL prompt instructions. It does not change Python code, dashboard APIs, install logic, or the kanban state machine. The behavioral impact is intentionally narrow: steer the agents onto the already-configured subagent path.

边界情况

I specifically checked that the install scripts already allow the required subagent calls:

  • taizi -> zhongshu
  • shangshu -> hubu/libu/bingbu/xingbu/gongbu/libu_hr

So this PR does not introduce a new permission dependency; it only aligns the prompts with existing configuration.

已知局限

This does not claim to fully solve the OpenClaw-side sessions_send regressions discussed in #274. It only removes stale Edict prompt instructions that continue to depend on that brittle path.


Checklist

  • 代码遵循项目现有风格
  • 相关 issue 编号在 PR 描述中已引用
  • 有测试覆盖(静态验证 + 手动链路核对)
  • 无硬编码路径、密钥、调试输出

Found during routine triage. Happy to adjust if you prefer to keep a different agent-to-agent pattern here.

@luoyanglang luoyanglang requested a review from cft0808 as a code owner April 12, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant