Factory¶
The factory runs Linear tickets through coding agents (Claude Code, Codex) on a
developer's machine, in isolated git worktrees. Its code now lives in Night
Shift (Tenjin-Tech/nightshift, local/): Rose is a consumer that supplies its
repository configuration, run instructions and skills. See
Factory: local setup to run it.
Night Shift runs two kinds of work: jobs it schedules for itself, and assigned issues you hand to Night Shift in Linear. Your Mac runs assigned issues with your own logins as soon as it is free, and returns one verified pull request per issue.
Two paths exist during the migration:
| Path | Who owns an issue | Delivery |
|---|---|---|
| Assigned issues | Night Shift: one work item per issue, one attempt at a time, on the Mac chosen for the repository | The machine's supervisor commits, runs Rose's checks on that commit, pushes nightshift/<issue> and opens one PR into develop |
Legacy (nightshift-local start, formerly rose-factory start) |
The local orchestrator's own polling or relay cursor | The coding agent pushes and opens the PR itself |
An issue's route belongs to one path at a time. Migrate a route only through the
cutover plan:
drain the old owner (registry agent, relay session and the overlapping
.nightshift/ jobs) before enabling its route for assigned issues.
Assigned issues¶
- A reply in the Linear session resumes the same worktree; new commits update the same PR.
- Stop in Linear stops the engine's whole process group; the work stays on the branch.
- An offline or busy Mac leaves issues queued: there is no cloud fallback.
- Rose's bootstrap and verification commands live in the Mac's own configuration,
never on Night Shift. Rose's run instructions are
.agents/nightshift-local/run_instructions.md. - A change to a file listed under
evidence_pathsin.nightshift/local.tomlis delivered only with a screenshot, or a stated reason why none applies. The agent gets one retry; after that the issue fails with its work kept.
Data boundaries¶
A worktree's bootstrap creates its own Supabase preview branch. Supabase and Redis are shared across Rose environments (production data boundaries): a machine's ability to reach Supabase is no permission to write production.
Legacy orchestrator¶
Unmigrated agents keep running from their installed runtime. The pipx rose-factory
snapshot keeps working until its routes are drained; reinstalling it now comes
from Night Shift's package (nightshift-local), with
NIGHTSHIFT_LOCAL_HOME=~/rose-factory to keep its registry, state, cursors and
worktrees. Rose's legacy registry template is
.agents/nightshift-local/agents.example.yaml;
the old runtime still reads .agents/rose-factory/run_instructions.md, which goes
once it is retired. Redeploy the relay from a Night Shift checkout with
GCP_PROJECT_ID=inboundx RELAY_SERVICE=rose-factory-relay local/deploy/deploy.sh.