Skip to content

Walking skeleton: a fresh run on the happy path #3

Closed

Description

@JacobStephens2

Parent

#2

What to build

The walking skeleton: thirdshift <Issue URL> takes an open issue to a PR in the simplest case, end to end, together with the test harness every later ticket extends.

From a clone whose origin matches the Issue URL (basic Origin match only), thirdshift:

  • creates a sibling worktree on a new issue-<n> Issue branch from origin/<Base branch>;
  • writes the embedded Factory skills and a generated thirdshift plugin manifest to a temp directory;
  • runs a headless Claude Code session in the worktree in auto mode with the plugin loaded and the fresh prompt from the spec, logging the stream to ~/.thirdshift/logs/<owner>-<repo>-issue-<n>-<timestamp>-implement.jsonl;
  • pushes the Issue branch itself;
  • checks through gh that an open PR from the Issue branch targets the Base branch;
  • prints only the PR URL to stdout and exits 0;
  • removes the worktree, the local Issue branch, and the temp directory.

No CI watching, Repairs, Continuation, or failure path yet.

The harness (see the spec's Testing Decisions): tests run the compiled binary; git is real (temp bare repo as origin, launch clone with a github.com origin redirected by insteadOf); gh and claude are fake executables first on PATH: fake gh backed by a JSON state file, fake claude scripted per test and recording its argv and prompt.

Acceptance criteria

  • Rust binary crate thirdshift at the repo root, installable with cargo install --path .
  • The Factory skills are embedded at compile time (ADR-0001); the plugin directory given to claude contains a manifest named thirdshift and every skill
  • claude is invoked headless with --permission-mode auto, --plugin-dir, and stream-json output, with the worktree as its working directory
  • The fresh prompt matches the spec, with Issue URL, Base branch, branch name, and issue number filled in
  • The session's log file is created, with ~/.thirdshift/logs/ created if missing
  • thirdshift pushes the Issue branch after the session, even if the fake agent didn't
  • stdout contains only the PR URL; exit code 0
  • After the run: no worktree, no local Issue branch, no temp plugin directory
  • Harness in place: real git with insteadOf, fake gh with seedable/inspectable state, scriptable fake claude; a happy-path test through the binary passes

Blocked by

None (can start immediately).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions