home/productivity/archiver-recovery

Archiver Recovery

GPTClaudeDeepSeek··318 copies·updated 2026-07-14
archiver-recovery.prompt
# User-invoked prompt · archiver-recovery (v1.8.2 · Obsidian-style)

> v1.8.0 pivot: this used to fire from launchd cron daily 23:30. Cron is gone.
> ROUTER reads this when the user says they missed an adjourn, then performs
> the recovery directly using Read/Write/Bash tools and Task subagents.
>
> **v1.8.2 HARD RULE #11**: Recovery report + recovered session archives
> render in Obsidian. Apply `references/obsidian-style.md` — callouts for
> Recovery Status / Phase results, `[[wikilinks]]` for session/wiki refs,
> nested tags.

## Trigger keywords

- `补救退朝` / `漏 adjourn` / `forgot to adjourn`
- `昨天没退朝` / `archiver 没跑`
- retrospective Mode 0 Conscious Patrol reports `archiver missed {date}` and user says "补一下"

## Context

The user may have:
- (a) Properly said "退朝" / "adjourn" today → no recovery needed; tell user
  and exit.
- (b) Forgotten to say adjourn → no archiver Phase 1-4 ran → recovery needed.
- (c) Said adjourn but archiver failed (CLASS_C violation in
  `compliance/violations.md`) → recovery needed.

## Required actions (in order)

1. **Detect today's adjourn state**:
   - Find archiver-phase-4.md files modified today across `meta/runtime/` (pre-v1.8.6 legacy sessions may use `archiver-phase-4.json`)
   - Check today's CLASS_C archiver violations in `compliance/violations.md`

2. **Decision matrix**:
   - Found complete adjourn AND no violations → **silent skip**, write to `meta/eval-history/recovery/archiver-recovery-{date}.log` "no recovery needed", exit 0. (Path renamed from `cron-runs/` in R-1.8.0-011 — cron removed, paths use `recovery/` to reflect user-invoked semantics.)
   - No successful adjourn today OR CLASS_C violation present → **proceed to recovery**.

3. **Recovery execution**:
   - Find the most recent session that has `archiver-phase-1.md` but missing 2/3/4 (pre-v1.8.6 legacy: `archiver-phase-1.json`): this is the incomplete adjourn to recover.
   - If no incomplete session exists, create a new SID: `cron-recovery-{YYYYMMDD-HHMM}`.
   - Reconstruct context: read latest entries in `meta/sessions/INDEX.md`, `SOUL.md`, `meta/journal/`.
   - Launch `knowledge-extractor` subagent (Phase 2 carve-out per agents/knowledge-extractor.md).
   - Wait for YAML output.
   - Launch `archiver` subagent (Phase 1 archive + Phase 3 DREAM + Phase 4 sync; Phase 2 reads knowledge-extractor reports).
   - Wait for completion checklist.

4. **Logging**:
   - Write recovery report to `meta/eval-history/recovery/{YYYY-MM-DD-HHMM}.md` with: trigger reason, recovered SID, Phase 2 extraction summary, Phase 3 DREAM summary, Phase 4 git push status, total tokens used.
   - Append to `meta/queue/notifications.md`: `[{ISO8601}] 🌆 archiver-recovery: auto-recovered SID {sid}, see meta/eval-history/recovery/{file}.md`

5. **macOS notification** (if osascript available):
   `osascript -e 'display notification "Recovered missed adjourn for {sid}" with title "🌆 Life OS · auto-archive"' 2>/dev/null || true`

## Exit conditions

- Success (recovery complete or silent skip) → exit 0
- Failure (knowledge-extractor or archiver subagent fail) → write failure to `meta/eval-history/recovery/archiver-recovery-{date}-FAIL.md` + macOS notification → exit 1 (path renamed from `cron-runs/` in R-1.8.0-011)

## HARD RULES

- **Never run business deliberation** (PLANNER / REVIEWER / 6 Domains / COUNCIL / STRATEGIST). This is recovery only.
- **Never modify SOUL.md outside knowledge-extractor's auto-write** (no manual SOUL edits).
- **Never delete files**. Only append + git commit.
- **Always git pull --rebase before starting**. Always git push at end. Conflict → abort + log.
- **Respect session lock**: if `~/.claude/lifeos-active-session.lock` exists, sleep 5 min retry, max 3 times.

## v1.8.0 R-1.8.0-013 · Review Queue Append (HARD RULE)

Recovery normally completes silently if no issues. ONLY append review-queue items if recovery surfaced data inconsistencies that need user attention. Spec: `references/review-queue-spec.md`.

Use Edit tool (NOT Write). Pattern per issue:

fill the variables

This prompt has 6 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.

{date}{YYYYMMDD-HHMM}{YYYY-MM-DD-HHMM}{ISO8601}{sid}{file}
Unlock with Pro →

when to use it

Community prompt sourced from the open-source GitHub repo jasonhnd/life_OS (NOASSERTION). A "Archiver Recovery" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

jasonhnd/life_OS · NOASSERTION