一键导入
stale-checkout-recovery
How to assess and recover from a working tree parked on a stale branch before starting a new implementation batch
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
How to assess and recover from a working tree parked on a stale branch before starting a new implementation batch
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Resolve knowledge gaps: fetch unresolved gaps, assess sensitivity, generate research queries, ingest findings, and close gaps with a resolution slug.
Interrupt-driven alerts: detect and surface new contradictions, stale pages, resolved gaps, and embedding drift. Priority-classified with deduplication.
Ingest meeting notes, articles, documents, and conversations into Quaid. Handles idempotent ingestion for exact-byte duplicates and vault-backed sync.
Keep the brain healthy: detect and resolve contradictions via the correction / supersede workflow, validate referential integrity, triage knowledge gaps, find orphaned pages, and compact the database.
Answer questions from the brain using FTS5 + semantic search + structured queries. Synthesize across multiple pages. Cite sources.
Agent-guided binary upgrades: version check, channel detection, download via install.sh (or manual asset fetch + SHA-256 verify), and post-upgrade validation.
| name | stale-checkout-recovery |
| description | How to assess and recover from a working tree parked on a stale branch before starting a new implementation batch |
| domain | git-workflow |
| confidence | high |
| source | extracted — Batch 4 pre-flight assessment, 2026-04-30T06:37:20.531+08:00 |
The main clone (D:\repos\quaid) may be parked on a stale release or feature branch
(e.g., release/v0.11.0) while origin/main has advanced by one or more merged batches.
This creates false readings:
tasks.md in the local checkout shows items as open that are actually closed on origin/main.Run this read-only check before any batch:
# What branch are we on?
git branch --show-current
# Are we ahead/behind origin/main?
git log --oneline HEAD..origin/main # commits on main not in HEAD
git log --oneline origin/main..HEAD # local commits not yet on main
# What is the HEAD tag (if any)?
git tag --points-at origin/main
# Read tasks.md from origin/main, not the local checkout
git show origin/main:openspec/changes/vault-sync-engine/tasks.md | Select-String "PATTERN"
If HEAD..origin/main returns commits: the local checkout is behind main. Do NOT start implementation here.
git-workflow skill).origin/main:cd D:\repos\quaid
git fetch origin main --tags
git worktree add ..\quaid-<change>-batch<N>-v<version> `
-b spec/<change>-batch<N>-v<version> `
origin/main
cd ..\quaid-<change>-batch<N>-v<version>
git log --oneline -1 # should show the tagged merge commit
When assessing batch completion status, ALWAYS read from origin/main, not from a local checkout that may be on a stale branch:
git show origin/main:openspec/changes/vault-sync-engine/tasks.md
The local checkout's tasks.md is only authoritative when HEAD == origin/main.
Modified or untracked .squad/ files in the stale checkout (health reports, skill files, etc.)
are Scribe artifacts and do not block a new batch worktree. Leave them — Scribe should
commit or clean them separately. They do not affect the new worktree's object store.
git checkout main in the main clone when worktrees are activeorigin/main