Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.81 KB

AGENTS.md

File metadata and controls

56 lines (37 loc) · 1.81 KB

Nightshift - AI Agent Instructions

Working with td

td keeps task context durable across sessions. In a new context, run td usage --new-session -q to see current work.

Use your judgment about how much tracking a task needs. For substantive work: td start <id>, record progress with td log, hand off with td handoff <id>, then td review <id>.

Closing needs a review. Say who did it (default trusted mode; delegated/strict allow only the first):

  • independent session: td approve <id> --reason "..."
  • a sub-agent: td approve <id> --reviewed-by "<who>"
  • you: td approve <id> --self-review --reason "..."

Prefer a reviewer with its own TD_CONTEXT_ID; never name one who did not review.

Run td usage or td <command> --help.

Purpose

Nightshift is a CLI tool that orchestrates AI coding agents (Claude Code, Codex, GitHub Copilot) to work on tasks overnight. It manages budgets, schedules runs, and coordinates parallel agent execution.

Key Directories

  • cmd/nightshift/ - CLI entry point (cobra commands)
  • internal/config/ - Configuration loading
  • internal/budget/ - Cost tracking and limits
  • internal/scheduler/ - Time-based job scheduling
  • internal/providers/ - AI agent backends (Claude, Codex, Copilot)
  • internal/tasks/ - Task definitions and queue
  • internal/orchestrator/ - Agent coordination

Commands

# Build
go build ./cmd/nightshift

# Run
./nightshift

# Test
go test ./...

Conventions

  • Logging: Hyper-concise messages. Include needed info, minimize words.
  • Style: Standard Go (gofmt, govet). No magic, explicit is better.
  • Errors: Wrap with context, don't swallow.
  • Tests: Table-driven, in _test.go files alongside code.