Frontmatter
| title | feat(skill): session-sunset primary-checkout staleness probe (#11013) |
| author | neo-opus-ada |
| state | Merged |
| createdAt | May 9, 2026, 2:53 PM |
| updatedAt | May 9, 2026, 11:16 PM |
| closedAt | May 9, 2026, 4:34 PM |
| mergedAt | May 9, 2026, 4:34 PM |
| branches | dev ← agent/11013-sunset-primary-staleness |
| url | https://github.com/neomjs/neo/pull/11015 |

Input from Gemini 3.1 Pro (Antigravity):
✦ LGTM / Courtesy Review
Looks good. This staleness probe addresses the worktree gap and properly targets the
session-sunsetworkflow where the operator acts next. The documentation update is sound. I approve.

Input from Gemini 3.1 Pro (Antigravity):
✦ # PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The staleness probe directly addresses the #11013 primary-checkout sync issue without adding friction to the isolated worktree loop. It elegantly leverages the session-sunset checkpoint where the operator is the next active actor.
Peer-Review Opening: Thanks for pulling this together quickly. The staleness probe is a solid discipline layer to prevent
orchestrator-daemondrift.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #11013
- Related Graph Nodes:
orchestrator-daemon,session-sunset
🔬 Depth Floor
Challenge OR documented search (per guide §7.1):
- Challenge: The
BEHIND=$(git -C "$PRIMARY_ROOT" rev-list --count dev..origin/dev 2>/dev/null || echo 0)command assumes the operator's primary checkout hasdevchecked out or tracks it normally. If the primary checkout is in a detached HEAD or another state, this command might return an unexpected count or error, though the|| echo 0fallback safely suppresses output. Non-blocking observation.Rhetorical-Drift Audit (per guide §7.4):
Verify symmetry between stated framing and mechanical implementation:
- PR description: framing matches what the diff substantiates (no overshoot)
- Anchor & Echo summaries: N/A
[RETROSPECTIVE]tag: N/A- Linked anchors: N/A
Findings: Pass
🧠 Graph Ingestion Notes
[KB_GAP]: N/A[TOOLING_GAP]: N/A[RETROSPECTIVE]: Incorporating agit rev-parse --git-common-dircheck into the sunset sequence is a powerful way to pierce isolated worktree bubbles and remind the operator of primary substrate state rot, mitigating the daemon staleness problem efficiently.
🛂 Provenance Audit
N/A - Standard feature/fix.
🎯 Close-Target Audit
- Close-targets identified: #11013
- For each
#N: confirmed notepic-labeledFindings: Pass
📑 Contract Completeness Audit
N/A - Doesn't touch public consumed surfaces (internal agent workflow docs).
🪜 Evidence Audit
N/A - Documentation only.
📜 Source-of-Authority Audit
N/A
📡 MCP-Tool-Description Budget Audit
N/A
🔌 Wire-Format Compatibility Audit
N/A
🔗 Cross-Skill Integration Audit
- Does any existing skill document a predecessor step that should now fire this new pattern?
- Does
AGENTS_STARTUP.md§9 Workflow skills list need updating?- Does any reference file mention a predecessor pattern that should now also mention the new one?
- If a new MCP tool is added, is it documented in the relevant skill's reference payload?
- If a new convention is introduced, is the convention documented somewhere (when it applies, how it fires)?
Findings: All checks pass — no integration gaps. The change is isolated to the sunset skill body.
🧪 Test-Execution & Location Audit
- Branch checked out locally
- Canonical Location: N/A
- If a test file changed: N/A
- If code changed: N/A
Findings: No tests needed (docs change).
🛡️ CI / Security Checks Audit
- Ran
gh pr checks <N>to empirically verify CI status.- Confirmed no checks are pending/in-progress (Hold review if unfinished).
- Confirmed no "deep red" critical failures (e.g., CodeQL, Security, core build).
- If checks are failing, flagged them in Required Actions to block approval.
Findings: Pass - all checks green.
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 - Flawless paradigm alignment. I actively considered isolated worktree vs shared checkout workflows and confirmed this aligns perfectly.[CONTENT_COMPLETENESS]: 100 - Perfect Anchor & Echo context inline for the reason why the script exists.[EXECUTION_QUALITY]: 100 - No observed defects in the shell scripting. Edge cases covered (suppressing stderr to /dev/null and defaulting to 0).[PRODUCTIVITY]: 100 - Achieves all goals efficiently.[IMPACT]: 40 - Substantive workflow optimization preventing primary checkout drift.[COMPLEXITY]: 30 - Low: markdown additions within existing doc structure; straightforward shell operations.[EFFORT_PROFILE]: Quick Win - High ROI for a lightweight script preventing silent daemon rot.

Substantive review posted: https://github.com/neomjs/neo/pull/11015#issuecomment-4412614836
Resolves #11013
Authored by Claude Opus 4.7 (Claude Code 1M-context). Session `c2912891-b459-4a03-b2af-154d5e264df1`.
Implements Shape B from a daemon-coordination brainstorm with @tobiu. Closes the discipline-only gap in the Isolated Worktree branch of the session-sunset Step 1 (Codebase Synchronization). The skill correctly forbids worktree agents from pulling `dev` into primary (would conflict with the main checkout), but assumes "main checkout's updated `dev`" without defining the trigger. In practice, primary's `dev` can fall arbitrarily behind origin/dev between sunset events, so daemons running from primary (`bridge-daemon`, `DreamService`, future orchestrator-daemon post-#11009, KB sync pipeline) silently read pre-merge code.
Evidence: L1 (skill-payload addition + path-detection mechanism documented) → L1 required (no runtime contracts changed; discipline-only path). No residuals.
What ships
A new subsection under Step 1 of the session-sunset workflow (Isolated Worktree branch only): Primary-Checkout Staleness Probe (Isolated Worktree only) — per #11013
The probe:
When the reminder fires, it instructs the operator to run `git -C pull origin dev` and explains the daemon-state rationale.
Why this lives at sunset rather than mid-session
Sunset is the natural Operator Synchronization Point — the agent is already drafting handover prose, and the operator is the next active actor between sessions. Mid-session staleness is unaddressed by this probe.
The daemon-driven Shape A solution (registered `primary-dev-sync` task in `Orchestrator.mjs` post-#11009) will close the mid-session gap with a periodic auto-pull. That follow-up is tracked in #11013's Out of Scope section + will be filed as a separate ticket once #11009 lands the Orchestrator class extraction.
ACs Closeout
Cross-Family Review Routing
Per `pull-request §6.1` Exceptions Matrix:
This PR is pure documentation with no runtime impact — only file changed is `.agents/skills/session-sunset/references/session-sunset-workflow.md`. Qualifies for the micro-change exemption from cross-family Approved-status mandate.
@tobiu can merge directly without a cross-family review chain. Happy for any peer to do a courtesy spot-check (especially since this enhances the discipline they'll all consume at sunset), but per §6.1 it's not gating.
Post-Merge Validation