Agent skills and a Rust CLI that take an issue to a reviewed, verified PR overnight. Works with any harness (Claude Code, Codex, Cursor) and any stack.
nightshift
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Agent skills that take an issue to a merged PR: triage, define, plan, build, verify, review and ship. Every phase leaves evidence behind. They work with any agent that reads SKILL.md (Claude Code, Codex, Cursor, OpenCode), and with any stack, firmware included.
Status: early. The core path (triage → build → verify → review → ship) is the first slice. See docs/DESIGN.md.
How it fits together
Each unit of work gets its own git worktree. Phases hand off through files in .ns/ / (brief.md, build.md, evidence.md, review.md, pr.md), so each phase can start in a fresh context. A phase's gate either stops for a human or, under gates: auto, moves on by itself. Deploying and releasing always wait for a human. Merging waits for one under merge.policy = "human" (the default) or when the PR touches a file that needs human review, and docs/factory/merge.md lists the other cases.
The layers diagram shows how the operator, ns watch, ns run, the phase skills and ns-auto fit together.
Install
Then, in each project you want to run the factory on:
1. ns-setup: writes docs/agents/ (stack, verify, tracker, labels, domain, docs).
2. ns-setup-verify: generates the project's verification skill and control CLI.
3. ns-agent-readiness: audits what in the codebase helps or hurts agents and files the top findings. ns-setup offers it.
docs/factory/onboarding-a-repo.md walks a Python repo through every step, from ns install to its first supervised night.
Run it overnight
Log in to claude with your Claude subscription, and name the GitHub account that should open the PRs in ~/.config/nightshift/config.toml:
ns watch runs the command once and exports the token as GH_TOKEN to gh and every phase. A GH_TOKEN already set wins. ns doctor shows which account resolved.
It takes status:ready-for-agent issues one at a time (--parallel 3 runs three at once) and starts no new unit after 06:30. A unit already running finishes. docs/factory/watch.md lists the other stop conditions, such as limits.max_units.
The worktree is not a sandbox. Each phase runs claude with permissions bypassed, so it can use the GH_TOKEN it inherits and read or change anything your user can. Run it on a dedicated machine or VM, with a bot account or a fine-grained token limited to the repo as the only GitHub login on that machine, and mark only issues you trust as ready.
docs/FACTORY.md is the reference for the factory definition (.nightshift/nightshift.toml), ns run and ns watch.
Skills
| Phase | Skills |
|---|---|
| setup | ns-setup, ns-setup-verify, ns-agent-readiness |
| outer loop | ns-triage, ns-troubleshoot |
| build | ns-build, ns-tdd |
| verify | ns-verify, ns-verify-docs |
| review | ns-review, ns-no-comments |
| ship | ns-ship |
| all phases, in one session | ns-auto |