Skip to content

feat(teams): add teams read command with full team configuration #95

@iamfj

Description

@iamfj

What problem does this solve?

There's no way to discover a team's configuration via the CLI — most importantly the estimation scale. PR #94 adds --estimate to issues, but valid estimate values depend on the team's configured scale (fibonacci, exponential, linear, t-shirt, or disabled). Today, linearis teams list only returns id, key, and name.

This means:

  • A human using --estimate 5 has no way to check whether their team uses fibonacci, t-shirt sizing, or has estimates disabled entirely.
  • An LLM agent has no way to discover valid estimate values before constructing an issues create or issues update command.
  • Cycle configuration (duration, cooldown, start day) and workflow automation settings (triage, auto-close, auto-archive) are similarly invisible.

Proposed solution

Add teams read <team> command returning full team configuration as flat JSON:

linearis teams read ENG

{
  "id": "uuid",
  "key": "ENG",
  "name": "Engineering",
  "description": "Core product team",
  "private": false,
  "timezone": "Europe/Berlin",
  "color": "#5E6AD2",
  "icon": "⚙️",
  "issueCount": 342,
  "parent": { "id": "uuid", "key": "PROD", "name": "Product" },
  "issueEstimationType": "fibonacci",
  "issueEstimationExtended": false,
  "issueEstimationAllowZero": true,
  "defaultIssueEstimate": 0,
  "inheritIssueEstimation": false,
  "cyclesEnabled": true,
  "cycleDuration": 2,
  "cycleCooldownTime": 0,
  "cycleStartDay": 1,
  "upcomingCycleCount": 2,
  "triageEnabled": false,
  "requirePriorityToLeaveTriage": false,
  "autoClosePeriod": null,
  "autoArchivePeriod": 6,
  "autoCloseChildIssues": false,
  "autoCloseParentIssues": false
}

Accepts team key (ENG), name, or UUID — same resolution as --team on issues create.

Implementation outline:

Layer Change
GraphQL New TeamDetailFields fragment + GetTeamById query (keeps existing TeamFields for list)
Service New getTeam(client, id) function in team-service.ts
Resolver None — resolveTeamId already handles key/name/UUID
Command New read <team> subcommand in teams.ts
Types New TeamDetail type in common/types.ts
Meta Update TEAMS_META context to mention estimation scales and add arguments / seeAlso

TEAMS_META update:

export const TEAMS_META: DomainMeta = {
  name: "teams",
  summary: "organizational units owning issues, cycles, and estimation config",
  context: [
    "a team is a group of users that owns issues, cycles, statuses, and",
    "labels. teams are identified by a short key (e.g. ENG), name, or UUID.",
    "each team configures its own estimation scale (fibonacci, exponential,",
    "linear, t-shirt, or disabled). use teams read to discover the scale",
    "before setting estimates. sub-teams can inherit estimation settings",
    "from their parent.",
  ].join("\n"),
  arguments: {
    team: "team key (e.g. ENG), name, or UUID",
  },
  seeAlso: ["issues create --team <team> --estimate <n>"],
};

Alternatives considered

  • Separate teams config <team> subcommand — splits identity from settings but adds cognitive load. Agents would call both commands anyway, doubling API calls. A single read is consistent with issues read, cycles read, milestones read.
  • Grouped/nested JSON output (estimation, cycles, triage as sub-objects) — looks nicer to humans but adds nesting agents must navigate, and diverges from the flat GraphQL field names every other read command returns.

Additional context

  • Follows up on feat(issues): add --estimate and --clear-estimate #94 which adds --estimate and --clear-estimate to issues (refs Feature: Add estimate support to issues #26)

  • The Linear Team GraphQL type exposes all these fields; no custom API work needed

  • Estimation scales and their API integer values:

    Type API values UI display
    notUsed disabled
    fibonacci 0, 1, 2, 3, 5, 8, 13, 21 point values
    exponential 0, 1, 2, 4, 8, 16, 32 point values
    linear 1–10 point values
    tShirt 1, 2, 3, 5, 8, 13, 21 XS, S, M, L, XL, XXL, XXXL
  • inheritIssueEstimation + parent is included so sub-team users can trace where their estimation settings actually come from

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions