feat: cloud-team-issue multi-member team spec + contract validation

Merged
KH
6mo ago
+389-0

User description

What

  • teams/cloud-team-issue/team.json — a 2-member roster (implementer + reviewer) for the deployed cloud-team-issue teamSolve agent, in the lead-outside-member-list shape bindTeam expects (lead = deployed agent's deployedName; members = launchable workers).
  • scripts/validate-team-spec.mjs — validation helper mirroring cloud's loadTeamSpec rules (packages/core team-spec.ts) plus the Phase-1 bindTeam restriction (inline personas rejected).
  • tests/team-spec.test.mjs — golden-validates every teams/*/team.json against the contract, with self-checks proving each rejection rule fires. npm test: 31/31.
  • teams/README.md — contract summary + bind command + go-live levers.

Why this roster shape

UPDATED: the roster now references the real member personas from agents#44 (cloud-team-implementer codex/gpt-5.5 + cloud-team-reviewer claude/sonnet-4-6). bindTeam requires every member slug to be deployed, and binding fails closed until they are — so the order is: merge+deploy #44 → merge this → bind. The binding upserts on (workspace, slug) so re-binding updates the roster in place.

Open choice flagged for @khaliqgant: if you'd rather the members reference different personas (or a 3rd member to exercise the cap-truncation path), say the word — member rows are the only part that changes.

Dormant by construction — three levers for team N>1 go-live

  1. This roster bound (POST /api/v1/workspaces/{id}/teams with this file — creates the team_members rows cloud#1893's drain reads).
  2. The cloud-team-issue persona's capabilities.teamSolve.maxMembers raised from its current 1 (the drain re-derives the cap from the persona spec and truncates the roster to it, logging dropped members — so binding this today is safe and inert).
  3. CLOUD_TEAM_LAUNCH_MULTI_ENABLED flipped (cloud#1893 dispatcher flag, default off).

Until all three, nothing changes in production behavior.

🤖 Generated with Claude Code


Summary by cubic

Adds a two-member roster for cloud-team-issue and a CI validator with tests to enforce the team spec contract. Further review fixes applied; no behavior changes.

  • New Features

    • teams/cloud-team-issue/team.json: implementer + reviewer members; lead is the deployed cloud-team-issue agent; both members reference the cloud-team-issue persona slug and are distinguished by name/role.
    • scripts/validate-team-spec.mjs: mirrors cloud loadTeamSpec and Phase‑1 bindTeam rules (no inline personas, unique names, non‑overlapping owns, positive 32‑bit budgets).
    • tests/team-spec.test.mjs: validates every teams/*/team.json and includes rejection self‑checks; teams/README.md documents the contract and a curl bind example.
  • Migration

    • Bind the roster: POST teams/cloud-team-issue/team.json to the workspace teams API.
    • Raise the persona capabilities.teamSolve.maxMembers above 1.
    • Flip CLOUD_TEAM_LAUNCH_MULTI_ENABLED to true.

Cap-ordering note (from cloud#1893 drain cross-check)

The drain orders roster rows by team_members.name ascending and truncates to the persona cap — so at the current cap of 1, the alphabetically-first member name decides which row launches. The names here (implementer < reviewer) make the implementer win, which is the intended default; renaming members can silently change the cap-1 pick. Also: once bound, the roster-config path is live at N=1 (memberName/role come from the roster row instead of the verbatim fallback) — that's #1853's intended behavior, not a new delta.


CodeAnt-AI Description

Add a validated multi-member team roster for cloud-team-issue

What Changed

  • Added a cloud-team-issue team spec with two members: an implementer and a reviewer.
  • Pointed the roster at deployed persona slugs so it can be bound only after those personas exist.
  • Added contract validation and test coverage for team specs, including checks for invalid team IDs, duplicate member names, unsupported inline personas, conflicting ownership claims, and invalid budgets.
  • Documented the team spec rules and how to bind the roster.

Impact

✅ Safer team binding
✅ Fewer invalid team spec uploads
✅ Clearer setup for multi-member team launches

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.