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

Aperta Adatta ai principianti
#2,528 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, node.js, typescript

Direzione di ricerca

Inizia da renderClaudeMember in packages/squad-sdk/src/client/adapters/claude-members.ts e segui come costruisce la descrizione e il testo Owns: a partire dal membro e dalla riga di routing. Controlla i test vicini sul rendering dei membri Claude, poi verifica l'output per un nome uguale al suo ruolo e per tipi di lavoro instradati uguali al ruolo. Il lavoro è completato quando queste ripetizioni vengono omesse, mentre i nomi e i tipi di lavoro distinti rimangono.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
3.4k
Fork
516
Merge medio
1g 15h
PR unite (30g)
116

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/squad

Tutte le issue di github/squad

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.