Configuration
Repository-owned configuration lives in ./.night-shift/config.toml.
Tracked config files:
./.night-shift/config.toml./.night-shift/worktree-setup.toml
Runtime artifacts stay alongside them under the same repo-local home.
Example
default_profile = "default"
planning_profile = "planner"
execution_profile = "builder"
base_branch = "main"
max_workers = 4
branch_prefix = "night-shift"
pr_title_prefix = "[night-shift]"
notifiers = ["console", "report_file"]
[profiles.default]
provider = "codex"
[profiles.planner]
provider = "codex"
model = "gpt-5.4-mini"
reasoning = "medium"
[profiles.builder]
provider = "codex"
model = "gpt-5.4"
reasoning = "high"
[profiles.reviewer]
provider = "cursor"
model = "sonnet-4"
[profiles.reviewer.provider_overrides]
mode = "ask"
[verification]
commands = ["gleam test"]
[handoff]
enabled = true
pr_body_mode = "append"
managed_comment = false
provenance = "structured"
pr_body_prefix_path = ".night-shift/pr-handoff-prefix.md"
If config.toml is empty, Night Shift still works. The built-in default
profile is named default, targets codex, and leaves model and reasoning at
provider defaults.
Profiles
Profiles are the main operator abstraction. Each profile can define:
provider: currentlycodexorcursormodel: provider model idreasoning: normalized level, one oflow,medium,high,xhighprovider_overrides: escape hatch for provider-specific settings that do not fit the normalized surface
Phase selectors decide which profile each command uses by default:
planning_profilefornight-shift planplanning_profilealso governsnight-shift plan --from-reviewsexecution_profilefornight-shift startdefault_profileas the fallback when a phase selector is unset
Night Shift accepts review_profile as a compatibility alias for older repo
configs, but review-driven planning resolves through planning_profile.
Setting review_profile emits a warning so the config can be simplified.
Override Precedence
Night Shift resolves agent settings in this order:
- built-in defaults
- repo config profile values
- command-level overrides
That means --profile, --provider, --model, and --reasoning override
what the chosen profile would otherwise resolve for that invocation.
One important wrinkle: start does not accept those overrides. It uses the
planning and execution agent configs already saved in the pending run. resume
also reuses the saved configs instead of re-resolving them.
Provider Overrides
Use [profiles.<name>.provider_overrides] sparingly, and only for settings
Night Shift does not normalize.
Current support:
- Codex: no provider overrides yet
- Cursor:
mode = "plan"ormode = "ask"
Night Shift fails fast when a normalized control cannot be represented by the
selected provider. For example, Cursor can select a model but does not support
the generic reasoning control.
Verification and Delivery Settings
These top-level settings shape how Night Shift delivers completed work:
base_branch: the base branch used for worktree branching and PR deliverymax_workers: maximum concurrent task executionbranch_prefix: branch prefix for Night Shift-created branchespr_title_prefix: prefix for pull request titlesnotifiers: currentlyconsoleandreport_file[verification].commands: commands to run locally before PR delivery
Handoff Settings
[handoff] controls the optional reviewer-facing metadata that Night Shift can
overlay onto delivered pull requests.
Supported fields:
enabled: master switch for Night Shift handoff outputpr_body_mode:off,append, orprependmanaged_comment: whether Night Shift owns and updates one incremental PR comment with “Since Last Review” deltasprovenance:minimal,light, orstructuredinclude_files_touchedinclude_acceptanceinclude_stack_contextinclude_verification_summarypr_body_prefix_path,pr_body_suffix_pathcomment_prefix_path,comment_suffix_path
When [handoff] is absent, Night Shift uses the conservative default:
- handoff enabled
- PR body overlay appended
- managed comment disabled
- structured provenance
- files touched, stack context, and verification summary included
Snippet paths are repo-relative markdown fragments. Night Shift splices them around its generated handoff sections; they augment the structured layout and do not replace it. If a configured snippet path cannot be read, Night Shift falls back to generated content and records a warning event.
Example configs live in:
examples/config-single-profile.tomlexamples/config-phase-profiles.tomlexamples/config-provider-overrides.toml