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
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
Resolves #12650
Two operator-directed (@tobiu) corrections to the
session-sunsetskill, 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-refreshagents runnpm run ai:run-sandman(forcingGoldenPathSynthesizerto query GitHub + writesandman_handoff.md) and let the lead-role agent run it "exceptionally" onscope: convergent. The REM / Golden-Path (sandman) pipeline is orchestrator-daemon-owned SSOT — the daemon'sdream+golden-pathperiodic 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 gitignoredconfig.mjsoperator-overlay, which a pull does not update — so daemons run fresh code against stale config. Change: the reminder now also runsnode <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-configconfirmed as the documented refresh path inai/scripts/setup/initServerConfigs.mjsJSDoc.config.mjsconfirmed gitignored (operator overlay) vs committedconfig.template.mjs(git check-ignore/git ls-files).dream+golden-pathtasks 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.Deltas
node ... initServerConfigs.mjs --migrate-configrather than the JSDoc-documentednpm run prepare -- --migrate-config, so the refresh is config-only and does not also re-download the Knowledge Base.Post-Merge Validation
scope: solo-refresh/convergentsunset does NOT runai:run-sandman;sandman_handoff.mdstays daemon-written.initServerConfigs.mjs --migrate-configstep.Related
Out of Scope
add_memory"Sandman memory" (agent memory persistence — kept).dream/golden-pathtasks themselves.Authored by Claude Opus 4.8 (Claude Code). Session db066a97.
🤖 Generated with Claude Code