---
number: 12652
title: 'session-sunset: no agent sandman-trigger + config-migrate on dev-pull (#12650)'
author: neo-opus-vega
state: MERGED
createdAt: '2026-06-06T19:08:34Z'
updatedAt: '2026-06-06T19:27:25Z'
closedAt: '2026-06-06T19:27:20Z'
mergedAt: '2026-06-06T19:27:20Z'
head: agent/12650-session-sunset-no-sandman
base: dev
url: 'https://github.com/neomjs/neo/pull/12652'
---
Resolves #12650

Two operator-directed (@tobiu) corrections to the `session-sunset` skill, both about the **daemon environment** the skill sets up at sunset. Bundled per the operator's "one addition."

## 1. Step 2 — agents must NOT trigger sandman (net-reduction)
Step 2 mandated `scope: solo-refresh` agents run `npm run ai:run-sandman` (forcing `GoldenPathSynthesizer` to query GitHub + write `sandman_handoff.md`) and let the lead-role agent run it "exceptionally" on `scope: convergent`. The REM / Golden-Path (sandman) pipeline is **orchestrator-daemon-owned SSOT** — the daemon's `dream` + `golden-path` periodic tasks (`ai/daemons/TaskDefinitions.mjs`) were already named, in the same step, as the canonical writer. An agent triggering it ad-hoc duplicates the daemon, contends on the shared SQLite + Chroma substrate (~45min serialization, last-write-wins), and couples a deployment-specific local command into the sunset flow.

**Change:** the daemon is the sole writer; agents never trigger sandman (any scope); a stale handoff is surfaced as a daemon-health issue; continuity is preserved by the Step 10 Sandman memory + the A2A ping + context-priming. Drops the redundant "OR `ai:run-sandman`" clause. (Consumer-side complement to Epic #12065.)

## 2. Step 1 — migrate config from template after the dev pull
The primary-checkout refresh reminder told the operator to run only `git -C <PRIMARY_ROOT> pull origin dev`. That refreshes committed code incl. `config.template.mjs`, but the daemons read the **gitignored `config.mjs` operator-overlay**, which a pull does not update — so daemons run fresh code against stale config. **Change:** the reminder now also runs `node <PRIMARY_ROOT>/ai/scripts/setup/initServerConfigs.mjs --migrate-config` (the script's own documented refresh path).

Evidence: L1 (skill-documentation change; no code paths, no runtime behavior) → L1 required (the close-target ACs are "the skill text instructs/omits the right thing", fully satisfied by static doc inspection). No residuals.

## Test Evidence
Skill-documentation only — no automated tests apply (no `.mjs` / runtime changed). Static verification instead:
- `--migrate-config` confirmed as the documented refresh path in `ai/scripts/setup/initServerConfigs.mjs` JSDoc.
- `config.mjs` confirmed gitignored (operator overlay) vs committed `config.template.mjs` (`git check-ignore` / `git ls-files`).
- The daemon `dream`+`golden-path` tasks were already named the canonical sandman writer in the pre-change Step 2 — so removing the agent-trigger loses no continuity.
- `git diff --stat`: fix 1 = −2 lines (net-reduction); fix 2 = 1-line swap.
- Commit hooks (whitespace / shorthand / ticket-archaeology) passed on both commits.

## Deltas
- Fix 2 (config-migration on dev-pull) was an operator addition after the ticket was created; bundled into this PR (same skill, same daemon-environment concern), and #12650's title + an AC were updated to cover it.
- Used the targeted `node ... initServerConfigs.mjs --migrate-config` rather than the JSDoc-documented `npm run prepare -- --migrate-config`, so the refresh is config-only and does not also re-download the Knowledge Base.

## Post-Merge Validation
- [ ] Next `scope: solo-refresh` / `convergent` sunset does NOT run `ai:run-sandman`; `sandman_handoff.md` stays daemon-written.
- [ ] A primary-checkout-behind sunset reminder now includes the `initServerConfigs.mjs --migrate-config` step.
- [ ] Confirm with @neo-opus-ada whether to adopt #12650 as a sub of Epic #12065.

## Related
- Epic #12065 — Orchestrator-as-SSOT for the REM (Sandman) Pipeline (consumer-side complement).
- Discussion #12062 — origin of the REM/Sandman SSOT direction.

## Out of Scope
- The pipeline execution-path consolidation (Epic #12065's subs).
- The Step 10 `add_memory` "Sandman memory" (agent memory persistence — kept).
- The daemon's `dream` / `golden-path` tasks themselves.

Authored by Claude Opus 4.8 (Claude Code). Session db066a97.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


## Comments

### `@github-actions` commented on 2026-06-06T19:08:43Z

## 🚨 Agent PR Body Lint Violation

@neo-opus-vega — your [PR body on PR #12652](https://github.com/neomjs/neo/pull/12652) does not match the pull-request template structure.

**Required action**: read `.agents/skills/pull-request/SKILL.md` BEFORE editing the PR body. The skill points at:
  - Minimum-viable PR body structure: `.agents/skills/pull-request/references/pull-request-workflow.md §9`
  - Self-Identification mandate: `.agents/skills/pull-request/references/pull-request-workflow.md §5`

Do NOT compose a substitute template or hallucinate section headings. The validator
checks more structural anchors than this comment names. The only reliable path to
passing is reading the actual workflow file and following its structure.

**Diagnostic hint**: at least one recognized anchor like `Evidence:` is missing.

<details>
<summary>Visible anchors missing (full list)</summary>

- `Evidence:`
- `## Test Evidence`
- `## Post-Merge Validation`

</details>

<sub>This is the CI tool-boundary lint companion to PR #11494's MCP `manage_pr_review` validator and PR #11502's `agent-pr-review-body-lint.yml` reviewer-side lint.
Resolves #11501.</sub>

---



## Reviews

### `@tobiu` (APPROVED) reviewed on 2026-06-06T19:27:08Z

*No review body provided.*

---

