Repository navigation
Closed
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Description
Parent
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 fromorigin/<Base branch>; - writes the embedded Factory skills and a generated
thirdshiftplugin 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
ghthat 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
thirdshiftat the repo root, installable withcargo install --path . - The Factory skills are embedded at compile time (ADR-0001); the plugin directory given to
claudecontains a manifest namedthirdshiftand every skill -
claudeis 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, fakeghwith seedable/inspectable state, scriptable fakeclaude; a happy-path test through the binary passes
Blocked by
None (can start immediately).
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Activity
Use actions/checkout@v7, which runs on Node.js 24