Claude member subagent description repeats itself when name equals role ("QA Engineer, QA Engineer.")

未关闭 适合新手
#2,528 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, node.js, typescript

调研方向

从 packages/squad-sdk/src/client/adapters/claude-members.ts 中的 renderClaudeMember 开始,追踪它如何根据成员和路由行构建描述和 Owns: 文本。检查附近有关 Claude 成员渲染的测试,然后验证名称与角色相同,以及路由的工作类型与角色相同时的输出。完成标准是省略这些重复内容,同时保留不同的名称和工作类型。

由索引模型根据 Issue 内容生成。

描述

bug

Version: CLI built from release/prepare-2.0.0-preview.5 @ 38d45d02 (package version 2.0.0-preview.6).

What happens

.claude/agents/<id>.md builds its description as "<name>, <role>.". Members named after their role, which is common with init --roles and plain-role teams, get a stuttering description:

D=$(mktemp -d); cd "$D"; git init -q
node <squad-cli>/dist/cli-entry.js init --roles --client copilot,claude
node <squad-cli>/dist/cli-entry.js cast --name "QA Engineer" --role "QA Engineer"
node <squad-cli>/dist/cli-entry.js cast --name Quinn --role "Security Engineer"
grep -h '^description' .claude/agents/qa-engineer.md .claude/agents/quinn.md
description: "QA Engineer, QA Engineer. Spawned by the Squad coordinator."
description: "Quinn, Security Engineer. Owns: Security Engineer. Spawned by the Squad coordinator."

The second line shows a related repetition. Right after a cast, the only routing.md row for a member has the role as its work type, so Owns: repeats the role too.

Claude Code chooses which subagent to delegate to from this text, so the repeated words carry no information. Claude Code's /agents list shows these strings verbatim.

Expected

  • When the name equals the role (case-insensitive, after trimming), use just "<role>.".
  • Drop Owns: work types that equal the role, and omit Owns: when nothing is left.

Source

  • packages/squad-sdk/src/client/adapters/claude-members.ts, renderClaudeMember, lines 148–152: summary = purpose ?? \${name}, ${role}.`andOwns: ${routed.join('; ')}`.

Related: #2456 (closed; vague descriptions written before routing exists). This is the remaining cosmetic part.

🤖 Generated with Claude Code

主要语言
TypeScript
星标
3.4k
派生
516
平均合并
1 天 15 小时
30 天内合并 PR
116

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/squad 的其他 Issue

查看 github/squad 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。