← NightshiftCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Nightshift
Snapshot Sep 30, 2026 · 23:14 UTC · version 0.25.3
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Read-only diagnosis of the workspace, rules, markers, lease, watchman and deadline, with classified next actions.",
"included_files": [],
"name": "doctor",
"skill_md_contents": "---\nname: doctor\ndescription: Read-only diagnosis of the workspace, rules, markers, lease, watchman and deadline, with classified next actions.\nlicense: MIT\n---\n\nDiagnose the host-opened project **without changing anything**. Doctor is deeper than status: it\nexplains what Nightshift resolved and which failures that implies. It does not arm, stop, revive,\nrewrite, or delete.\n\nThe four state files and what each holds are in\n`$NIGHTSHIFT_PLUGIN_ROOT/skills/nightshift/references/shift/state-map.md`. Report these as different categories; do not merge or move them.\n\nResolve the installed plugin root to an absolute `$NIGHTSHIFT_PLUGIN_ROOT` — `${CLAUDE_PLUGIN_ROOT}`\non Claude Code, `$PLUGIN_ROOT` on Codex when set, otherwise the absolute path this skill was\nattached from (`skills/doctor/SKILL.md`). Run every command below through\n`\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\"` — native Windows: `& \"$NIGHTSHIFT_PLUGIN_ROOT\\runtime\\windows\\ns.ps1\"`\nin the PowerShell tool, same verbs — which resolves the host and the workspace; `ns help` lists the\nverbs, and `ns bind` prints the six resolved facts (`TASK_ROOT`, `NIGHTSHIFT_WORKSPACE`, `NS`,\n`NIGHTSHIFT_PLUGIN_ROOT`, `HOST`, `SOURCE`); `$NS` below is that `NS`. Never a bare relative path: the working\ndirectory persists between calls. Each `$NS/...` path below is where the current layout keeps that file;\n`ns path <key>` prints where this workspace keeps it, and `ns path --list` names every key.\n\n## 1. Run the inspector\n\n```bash\n\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" doctor\n```\n\nPrint its report verbatim. Do not summarise away Facts, Warnings, or Actions, and do not re-derive\nanything it already resolved: the script uses the same workspace, work-mode, work-target, policy\nand ownership libraries as the hooks, and both implementations print the same lines.\n\nThe report answers, in its own words: where the workspace is and whether `.nightshift-link` is\nvalid; the schema version and whether it is current, legacy, malformed, or newer than this plugin;\nwork mode and work target; the punch-list and staged-work counts; each parking-lot or snag-log\nparagraph Archive can never file, by file and line; markers, session, process lease\nand watchman liveness; the deadline and whether it disagrees with the shift policy; an interrupted provisioning transaction; every\n`rules.json` knob it needs and the three native question-tool entries; a `resolved policy` block\nnaming every effective setting with its source (`built-in`, `rules`, `defaults`, `one-shift` or\n`exact-plan`) and expiry (`shift`, `permanent` or `-`); and a `preflight` fact naming which items\nneed an elevation category the resolved policy does not grant.\n\nStaged work is reported, never offered, while the punch list has open items. Doctor suggests\npromoting a draft or a parked Hunt order only when no `- [ ]` remains under `## Items` and no shift\nis armed — the same precedence Start applies. With open work, say what is staged and say plainly\nthat Start works the current list; do not read a count as an invitation to widen the approved\nscope, and never promote anything from this read-only skill.\n\nThe `work mode` fact is `repository` or `artifact`. When `$NS/run/work-mode` is missing and Setup\nwould propose artifact, Doctor warns `work mode is unset; Setup would propose artifact` and offers\n`persist the proposed artifact mode with Setup; Doctor does not write work-mode`. When work-mode is\nunreadable it warns `work mode is malformed; treating the site as unusable until Setup rewrites it`,\nand when the target cannot be resolved it warns\n`work target could not be resolved; treating workspace as the code root`. When the record is\nmissing the resolver takes the workspace or its single immediate child repository.\nSkip a symlink or reparse child; it is not a nested checkout.\n\nIn artifact mode the report also carries `artifact receipts N` for files under `$NS/receipts/`,\nand `latest artifact receipt` with the filename only of the most recently written receipt (no\ndirectory path). When receipts are enabled it reports `completion record per-item receipt` and,\nif ticked items have no model text, warns\n`N ticked items have no receipt text; each item completes through its receipt file`. Disabled\nreceipts are a fact only: `completion record none; the owner disabled receipts`. When the path exists but is not a real\ndirectory, it warns `artifact receipts path is not a usable directory` and offers to replace it\nso receipts can land; it does not also warn empty ticks for that path.\nCopies from Archive live in each shift's folder under the archive root,\n`$NS/archive/<YYYY-MM-DD>/receipts/` by default, and do not replace the live files Doctor counts.\nMissing or empty receipts create no dated receipts folder.\n\n**Every Warning is a real finding — relay it, do not soften it.** A path that is not a usable file\nis a planted symlink where a marker should be, not an empty night; a malformed work mode is not a\nworking site; a failed clock-out is not a finished shift. Say what each one means for the owner\nand, when the report offers a `[confirm]` action for it, name that action.\n\nDoctor never writes the policy file, never runs the project's own tooling, and never prints\ncredentials, raw evidence, rule values, or the output of a command it did not run.\n\n## 2. Classify actions — do not execute them\n\nThe report tags every suggestion:\n\n- `[safe]` — mechanical leftover with no live session (for example a stale watchman pid file whose\n process is already gone). Still do **not** apply it because Doctor was invoked; offer it.\n- `[confirm]` — owner decision (broken link, missing setup, leftover STOP while they still want\n the night). During an **unattended active shift** (`$NS/run/.shift-armed` and open boxes), report that\n the recommendation should be parked with the default \"leave in place until morning\", but do not\n write the parking lot or ask — the Doctor invocation remains byte-identical.\n- `[blocked]` — Nightshift cannot fix this here (non-resumable Codex id, malformed process lease,\n missing host binary, unverified wedge). Say so. Never guess a session id or print/edit a lease\n capability. For a stuck conversation or a fenced recorded session, name\n `\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" stop-shift` — that pauses immediately without waiting for a Stop\n event. Do not run it from Doctor.\n\nWhen the report says a terminal clock-out failed without releasing the shift, say whether the\nrecorded conversation can operate or whether a recovery worker still holds the lease; never tell\nthe owner to reopen a conversation that would stay blocked.\n\nInvoking Doctor alone must leave the tree byte-identical. Never perform a repair merely because\nDoctor was invoked.\n\nWhen cross-host continuity is relevant, summarize stand-down and revival from `$NS/run/shift-log.md`\n(no secrets), and run `continuity-handoff.sh fence-check` only when a duplicate worker or unfenced\nprior owner is suspected.\n\n## 3. After the report\n\nOffer the classified repairs after the report. If the owner explicitly asks to apply a `[safe]`\nleftover while no shift is armed, they are no longer in Doctor — follow stop/start/setup as those\nskills specify. Until that explicit ask, change nothing. During an unattended shift, the offer is\ninformational only: continue the active work without asking or writing state.\n\nTwo repairs the report names are separate owner actions, never Doctor's own:\n\n- The move into the current layout. On a workspace at an older state-version, or one holding a\n state file at an earlier path, the `[confirm]` action names each file with its old and new path\n and says that nothing is deleted; it is `[blocked]` while a shift is armed, a watchman is alive\n or a lock is held. Relay it as printed. The owner previews it with\n `\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" migrate-state` and makes it by running that again with\n `--apply`. A future version is `[blocked]`: never downgrade a marker.\n- A local rule profile. Doctor may list the shipped examples with\n `\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" apply-profile --list`\n and preview one with `--profile <name> --mode fill` (or `--mode replace`). Preview is the\n default; only `--apply` writes, and Invoking\n Doctor never writes `rules.json`.\n\nA senior may run the read-only project inventory after the report:\n`\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" inventory`. It prints one table per\nworkspace package — package manager and lockfile, the scripts declared for test, lint, typecheck,\nbuild and format, the config files present, and each named tool as `declared`, `runnable` or\n`absent`. Those three words are the whole verdict; the report never calls a project misconfigured.\nIt writes and caches nothing, and Doctor never runs it — offer it, the way every other action here\nis offered.\n\nIf the owner then explicitly asks to **Export support bundle**, they are no longer in Doctor.\nRun\n`\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" export-support`.\nPrint its path, included sections, and omitted categories. Do not upload, attach, transmit, or open\nthe file. Invoking Doctor alone must not create `$NS/support/`.\n"
}SHA-256 of public snapshot: 4998d8b480bc5815d9e67194cc3dab596f49f4b12bc4630205dfe36e861737e5