Night Watch Command
Triggers the autonomous maintenance agent.
Usage
/night-watch [scope]
# Example: /night-watch deps
# Example: /night-watch cleanup
# Default: runs full suite
Protocol
- Checkout: Create
maintenance/branch. - Execute: Run
night-watchmanagent skills. - Verify: Run full test suite.
- Report: Generate Shift Report.
Rules
- MUST work on a dedicated
maintenance/branch — never commit tomainor the user's active branch - NEVER push without the full test suite passing
- CRITICAL: stop on the first failing test and surface it — do not try to "fix" tests opportunistically
- MANDATORY: every change lands in a discrete commit with a conventional message
Gotchas
npm audit fixbumps to the latest major version when--forceis set — quietly introducing breaking changes. Always use plainnpm audit fixfirst and only escalate to--forceafter the user approves each named package.pip install --upgradewithout a constraints file resolves differently each run due to transitive dependencies. Pin viapip-compileand commit the lockfile, otherwise maintenance runs produce "mysterious" unrelated changes.git add -Aon a maintenance run can pull in build artifacts and IDE caches if.gitignoreis incomplete. Prefer explicitgit add <path>per change category (deps, docs, lint-fixes) to keep commits attributable.- Pre-commit hooks that format on commit may re-modify files AFTER your edit — the resulting commit may differ from the planned diff. Run the formatter as a separate step and verify
git diff --stagedbefore committing.
When NOT to Use
- For planned refactors with a known scope — use
/refactor-plan - For immediate bug fixes — use
/fixor/debug - In a repo the user is actively working in — wait for idle time
- When there are uncommitted changes on the current branch — abort until clean