Skip to content

feat(server): resolve GitHub issues and prepare an issue worktree thread #2

Description

@Artic0din

Part of the "Start agent work from a GitHub issue" parent issue. See it for the full design.

Scope

Contracts and server only. No UI.

  • packages/contracts: GitResolveIssueInput / GitResolveIssueResult and GitPrepareIssueThreadInput / GitPrepareIssueThreadResult, plus git.resolveIssue and git.prepareIssueThread RPCs in rpc.ts.
  • apps/server: GitHub issue read via gh issue view <ref> --json number,title,body,state,url.
  • GitManager.prepareIssueThread: resolve the issue, build branch issue/<number>-<slug> with the existing branch-name sanitizers in packages/shared/src/git.ts, create the worktree from the default branch with gitCore.createWorktree, and run the project setup script.
  • Reuse an existing worktree that already has that branch checked out.
  • Non-GitHub hosts fail with "Only GitHub issues are supported".
  • ws.ts handlers stay thin: decode, call one service method, map errors. Add RPC authorization entries alongside the pull-request ones.

Tests

  • Branch naming and slugging (long titles, punctuation, unicode).
  • Issue reference parsing: 123, #123, issue URL, PR URL rejected.
  • Reuse path returns the existing worktree.
  • Non-GitHub host error.
  • Contract decode test in packages/contracts/src/git.test.ts.

Done when

Focused server and contract tests pass, plus targeted typecheck and lint for the changed packages.

Activity

  1. Artic0din commented on Oct 5, 2026

    @Artic0din
    OwnerAuthor

    Triage

    Verdict: Confirmed on current main (5cebd3b8). Server/contracts slice is fully specified; implementation is in open PR #4 and is not on main yet.

    What I checked

    Not a duplicate of #1 (parent) or #3 (UI). Cross-reference only.

    Likely code: packages/contracts git RPC types; apps/server GitHub provider getIssue; GitManager.prepareIssueThread mirroring preparePullRequestThread; thin ws.ts handlers + auth entries.

    Fix direction: Land/finish PR #4 against the listed tests (branch naming, reference parsing, reuse, unsupported host, contract decode). Keep UI out of this issue.

    Workaround: None for the server API; use manual worktree until merged.

    Outcome: ready-for-agent — scope, contracts, and tests are explicit; PR already in progress.


    Generated by Claude Code

  2. added
    ready-for-agentSpecified sufficiently for implementation and verification
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentSpecified sufficiently for implementation and verification

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions