Skip to content

prep command: ready-to-work composite #28

Description

@dubscode

Parent

#21 — Agent UX: state-by-name, command aliases, prep/pr-ready, list guardrail

What to build

A top-level linear prep <id-or-identifier> command that does everything needed to start work on an issue in one call (mirrors my-work / triage).

End-to-end behavior:

  • Fetch the issue; gather its parent issue (via parentId) or, if none, its project (via projectId) as a context summary.
  • Compute the issue's branch name (surface it in the output — no git operations, nothing is checked out).
  • Resolve the target in-progress state using the resolver from State-by-name resolver + issues update #22: prefer an exact name match for "In Progress"; otherwise the team's first started-type state; overridable via --state.
  • Set the issue to that state.
  • Return a single envelope containing the issue, the parent/project summary, the branch name, and the new state.

Orchestration lives in a service function that takes a gateway-like dependency, so it is testable in isolation.

Acceptance criteria

  • linear prep ANN-1 sets the issue to the team's in-progress state
  • Output includes the branch name, the parent or project summary, and the new state in one envelope
  • --state overrides the target state
  • Falls back to the first started-type state when no exact "In Progress" exists
  • No git commands are run
  • Orchestration tested via a fake gateway (override path and started-type fallback path)

Blocked by

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