fix: assign unique colors to squad member labels from a curated palette - #1663
Conversation
🟠 Impact Analysis — PR #1663Risk tier: 🟠 HIGH 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (1 file)
root (3 files)
squad-cli (1 file)
squad-sdk (1 file)
templates (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 4 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 1 unresolved Copilot thread(s) — fix and resolve before merging |
| ✅ | CI passing | All checks passing |
Files Changed (7 files, +313 −34)
| File | +/− |
|---|---|
.changeset/label-color-palette.md |
+6 −0 |
.github/workflows/sync-squad-labels.yml |
+49 −3 |
.squad-templates/workflows/sync-squad-labels.yml |
+62 −7 |
packages/squad-cli/templates/workflows/sync-squad-labels.yml |
+62 −7 |
packages/squad-sdk/templates/workflows/sync-squad-labels.yml |
+62 −7 |
templates/workflows/sync-squad-labels.yml |
+62 −7 |
workflows/squad.md |
+10 −3 |
Total: +313 −34
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Pull request overview
Updates the label-sync workflow to assign squad:{agent} labels deterministic, palette-based colors (instead of all sharing the same color), and documents the new behavior in the Squad workflow spec. This supports the goal in #1662 of making labels easier to visually distinguish.
Changes:
- Introduces a curated 20-color
SQUAD_MEMBER_PALETTEand a deterministicgetAgentColor()mapping for squad member labels. - Adds
.ai-team/team.mdas an alternate roster source and adds workflow-level concurrency control. - Updates
workflows/squad.mdto describe the unique-color rule forsquad:{agent}labels.
Show a summary per file
| File | Description |
|---|---|
| workflows/squad.md | Documents the new unique-color requirement for squad:{agent} labels and references the palette-based workflow behavior. |
| .github/workflows/sync-squad-labels.yml | Implements palette + deterministic hashing for member label colors, plus .ai-team fallback and concurrency. |
| templates/workflows/sync-squad-labels.yml | Template mirror of the label-sync workflow updates. |
| .squad-templates/workflows/sync-squad-labels.yml | Canonical template updated to match the new palette + deterministic color assignment approach. |
| packages/squad-cli/templates/workflows/sync-squad-labels.yml | CLI template mirror updated to keep template sync consistent. |
| packages/squad-sdk/templates/workflows/sync-squad-labels.yml | SDK template mirror updated to keep template sync consistent. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (2)
workflows/squad.md:427
- This line documents the
squadlabel color as0075ca, but the label sync workflow sets thesquadlabel color to9B8FCCviaSQUAD_COLOR.
- **Labels:** `squad` (color: `0075ca`, applied automatically by safe-outputs)
workflows/squad.md:958
- This line documents the
squadlabel color as0075caand says the member label color is derived from an “agent name” hash, but the sync workflow usesSQUAD_COLOR = '9B8FCC'forsquadand hashes the slugified name when callinggetAgentColor(slug).
- **Labels:** `squad` (color: `0075ca`), plus `squad:{owner-name}` if an agent is assigned — color: unique per agent, from `SQUAD_MEMBER_PALETTE` (deterministic hash of agent name)
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
| > **Label color uniqueness:** Each `squad:{agent}` label MUST receive a unique | ||
| > color from the `SQUAD_MEMBER_PALETTE` defined in `sync-squad-labels.yml`. | ||
| > Colors are assigned deterministically based on agent name (hash-based index) | ||
| > so they remain stable across re-runs. The parent `squad` label retains its | ||
| > distinct color (`0075ca`). Do NOT hardcode a single color for all agent labels. |
| for (const member of members) { | ||
| const slug = slugify(member.name); | ||
| labels.push({ | ||
| name: `squad:${slugify(member.name)}`, | ||
| color: MEMBER_COLOR, | ||
| name: `squad:${slug}`, | ||
| color: getAgentColor(slug), |
Closes #1662 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds label color uniqueness rule to workflows/squad.md — each squad:{agent}
label must receive a deterministic unique color from the palette, not a
shared hardcoded value.
Relates to #1662
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix squad label color in docs (0075ca → 9B8FCC) - Clarify hash uses slugified name, not display name - Add collision-free color assignment with linear probing Closes #1662 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
56c89c6 to
4d16320
Compare
Summary
Fixes the boring grey/yellow label problem — each
squad:{agent}label now gets a unique, visually distinct color from a curated 20-color palette.Changes
.github/workflows/sync-squad-labels.yml(+ all 4 template mirrors):MEMBER_COLORconstant withSQUAD_MEMBER_PALETTE(20 curated colors)getAgentColor()— deterministic hash-based color assignment per agent namesquad:copilotremains green (10b981)squadlabel stays at9B8FCCworkflows/squad.md:Palette design criteria
type:*,priority:*,go:*,release:*, orstatus:*labelsCloses #1662
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com