Skip to content

fix: assign unique colors to squad member labels from a curated palette - #1663

Merged
bradygaster merged 4 commits into
devfrom
squad/1662-label-color-palette
Aug 9, 2026
Merged

fix: assign unique colors to squad member labels from a curated palette#1663
bradygaster merged 4 commits into
devfrom
squad/1662-label-color-palette

Conversation

@bradygaster

Copy link
Copy Markdown
Owner

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):

  • Replaced single MEMBER_COLOR constant with SQUAD_MEMBER_PALETTE (20 curated colors)
  • Added getAgentColor() — deterministic hash-based color assignment per agent name
  • Each agent label now gets a unique color; squad:copilot remains green (10b981)
  • Parent squad label stays at 9B8FCC

workflows/squad.md:

  • Updated gh-aw spec to require unique colors per agent label (palette-based, deterministic)
  • Added label color uniqueness rule documentation

Palette design criteria

  • Visually distinct from each other
  • Good contrast with white text (GitHub label rendering)
  • Does not duplicate colors already used by type:*, priority:*, go:*, release:*, or status:* labels
  • Deterministic assignment (same agent always gets same color across re-runs)

Closes #1662

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Copilot AI lite review requested due to automatic review settings August 8, 2026 17:36
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #1663

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 7
Files added 1
Files modified 6
Files deleted 0
Modules touched 5

🎯 Risk Factors

  • 7 files changed (6-20 → MEDIUM)
  • 5 modules touched (5-8 → HIGH)

📦 Modules Affected

ci-workflows (1 file)
  • .github/workflows/sync-squad-labels.yml
root (3 files)
  • .changeset/label-color-palette.md
  • templates/workflows/sync-squad-labels.yml
  • workflows/squad.md
squad-cli (1 file)
  • packages/squad-cli/templates/workflows/sync-squad-labels.yml
squad-sdk (1 file)
  • packages/squad-sdk/templates/workflows/sync-squad-labels.yml
templates (1 file)
  • .squad-templates/workflows/sync-squad-labels.yml

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 4d16320

PR Scope: 🔧 Infrastructure

⚠️ 3 item(s) to address before review

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_PALETTE and a deterministic getAgentColor() mapping for squad member labels.
  • Adds .ai-team/team.md as an alternate roster source and adds workflow-level concurrency control.
  • Updates workflows/squad.md to describe the unique-color rule for squad:{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 squad label color as 0075ca, but the label sync workflow sets the squad label color to 9B8FCC via SQUAD_COLOR.
- **Labels:** `squad` (color: `0075ca`, applied automatically by safe-outputs)

workflows/squad.md:958

  • This line documents the squad label color as 0075ca and says the member label color is derived from an “agent name” hash, but the sync workflow uses SQUAD_COLOR = '9B8FCC' for squad and hashes the slugified name when calling getAgentColor(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

Comment thread workflows/squad.md Outdated
Comment on lines +363 to +367
> **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.
Comment on lines 152 to +156
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),
bradygaster and others added 4 commits August 9, 2026 20:54
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>
@bradygaster
bradygaster force-pushed the squad/1662-label-color-palette branch from 56c89c6 to 4d16320 Compare August 9, 2026 20:56
@bradygaster
bradygaster merged commit c3661bc into dev Aug 9, 2026
17 checks passed
@bradygaster
bradygaster deleted the squad/1662-label-color-palette branch August 9, 2026 21:23
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.

Label creation should avoid reusing colors already in use

2 participants