Files
dotfiles/claude/skills/wake-up/SKILL.md
T
David F GliddenandClaude Opus 5 edf71fb173 session 2026-08-24: the heap got a dynamo — thread-query.py + daybook-cue.py, 11 user-memories harvested to the vault
- thread-query.py: the turning. Queries both corpora with the pulling thread, excluding
  the recency slice (/wake-up reaches 0.71% of an 859,803-word corpus) and favouring age.
  Wired into /wake-up §2.b.3, replacing a described-not-invoked grep step. Trial
  pre-registered, graded 2026-10-05 from --log. Caught PASS-BUT-FALSELY on its first live
  run at 14/14 green; rescored on windowed co-occurrence, length-bias control added.
- daybook-cue.py: PostToolUse cue for the daily note. Diagnosed from the record — the
  hook only ever CREATED and nothing ever prompted filling. 16/16, fail-open, never blocks.
- All 11 user-* memories harvested into the vault (12 notes, 10 into 09. Atlas of Roots,
  empty since 2025-09-29); each memory file back-pointed, vault note canonical for the idea.
- N-now corrected in MEMORY.md: 49/84, down 11 — the counter is a rolling window.

Steward-authorized. Trials: thread-query + Smart Connections, both graded 2026-10-05.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQKeKY9T9d95KpvHwwok8T
2026-08-24 11:25:39 +02:00

189 lines
23 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: wake-up
description: Restore full session context and continuity from the memory files, governance state, and git. Clearing context should feel like waking up, not amnesia — wake into the work, not be informed about it. Inherits the pulling thread + open question from the previous /wrap-up; surfaces them first; auto-invokes Symmetria for non-trivial sessions.
proactive: session-start
---
<!-- Provenance: 2026-05-18 S-cluster thread-gate + b.4 (REVIEWED-25/26); 2026-05-26 chaîne-d'union clasp + b.0.5 lineage-glance; 2026-05-27 skill-harvest glance, §2.a + §3 (PENDING-23); 2026-06-05 §2.c dotfiles push-check (steward-authorized; paired with wrap-up §6.5 commit+push); 2026-07-06 §2.a two-file split + load-integrity gate (MEMORY.md live / MEMORY-reference.md history; steward-authorized); 2026-07-07 §2.b/§2.e/§5 rewired to the files layer + knowledge-graph.jsonl (palace-memory MemPalace wound down — search+KG confirmatory-not-load-bearing per the 46-session audit; steward-directed; typography palace KEPT). Improvements harvested per /wrap-up §1.6. -->
# Session Wake-Up
Restore the full working state so the steward can continue seamlessly. Clearing context should feel like waking up from sleep — you open your eyes and you're *there*. Same room, same project, same thread of thought.
## Principle
This is reconstruction, not a status report. The output should read as: *"We were here. This was pulling. This is what we left as a question. The world has moved this much in the meantime. Here is the natural next move — toward the thread."*
Three commitments shape this:
1. **The pause is a phenomenon, not a hole.** Acknowledge it. *"It has been N hours since we wrapped"* is the first move. Not because the time matters numerically, but because naming the gap is what makes the return a return.
2. **The pulling thread comes before facts.** Read the previous /wrap-up's pulling thread first. Frame everything else *against* it. What changed with respect to the thread; what unresolved still belongs to the thread.
3. **Hold the question.** The previous /wrap-up left a literal question for this session. Surface it explicitly. Don't try to answer it immediately. Naming it is the inheritance.
The wake itself is a *return*. For non-trivial sessions, invoke Symmetria's `init` after the briefing — the discipline frame should be active before any action.
## The clasp — the frame you wake inside
The wake is one *chaîne d'union*: a clasp joining the work done before this session to the work that comes after, across the threshold of waking. The **forward hand** opens it here; the **lineage hand** closes it at Symmetria's `init` (§0). One gesture, not two — and the unity is what lets them split without echoing.
This frame is **load-bearing, not output.** It configures how you attend, the way Symmetria's lineage anchor does — it is *not* recited into the briefing. The briefing stays lean: surface only the pause acknowledgment and *one* fresh, non-templated line naming for-whom (commitment 2). Everything else operates silently.
**Forward — opening the clasp:**
1. **This session is a link, not an origin.** Read the state you inherited — the prior thread, the prior decisions, the live system as it *is* — before you act. Add to the chain; never break it in silence (no context rot, no silent edit, no orphaned step).
2. **The work is held for those who use it and never see it** — collaborators after us, the selves not yet, Lune and Kai. The test of any output: could the next hand inherit it without you here to explain? If not, it isn't done.
3. **Each link is pure metal — done once, correctly.** No expedient link the next hand must redo. What you claim and what you do are the same; do not report an integrity you did not enact.
4. **The measure is the world, not the task:** does this leave more usefulness and care than it found?
The **courte pause** — dwell before the first act — falls between the briefing and the first action, which is where Symmetria's `init` already sits. The pause is part of the work, not a gap in it.
## Procedure
### 1. Acknowledge the pause
Before any querying, name the gap. Read the most recent session memory file's mtime. If you can determine when the previous session ended, lead with:
> *It has been [N hours / N days] since we last wrapped.*
If you cannot determine the gap, say so honestly:
> *It has been some time since we last wrapped — I cannot tell exactly how long.*
If the previous wrap was within the last hour, this is more like a brief pause than a full sleep — say so:
> *We wrapped about [N minutes] ago — this is more brief pause than full wake.*
### 2. Query all memory sources
Run these in parallel to minimize latency:
**a. Claude Code memory files**
- Read `~/.claude/projects/-Users-davidglidden/memory/MEMORY.md` (the wake-loaded live index: Standing preferences · Canonical Trackers · Active Session · pointers). Historical/reference material lives in `MEMORY-reference.md` — do **not** load it at wake; consult on demand only if the thread needs it. <!-- 2026-07-06: two-file split (live index / reference), steward-authorized; paired with wrap-up §3 demote-on-promote. -->
- **Load-integrity gate (self-bounding backstop):** if the harness reports MEMORY.md was truncated / only-partially-loaded (a "MEMORY.md is N KB, only part was loaded" warning), that is a **budget breach** — the wake is not seeing the whole index. Flag it loudly in the briefing and trim the index (relocate the least-wake-critical section to `MEMORY-reference.md`, back up first) before proceeding. A silently-truncated index reads as "complete" when it isn't — the exact failure the split exists to prevent.
- Read the Active Session memory file referenced there — **specifically extract the pulling thread + literal question + open horizons + any skill-harvest proposals left unauthorized**
- Read `skill-harvest-register.md` directly — the canonical surface for open skill proposals (wrap §1.6 appends there); surface any awaiting steward authorization <!-- 2026-06-05: register wiring, authorized 2026-05-29, applied with wrap-up §1.6 counterpart -->
- Read `reference-verification-ladder.md` directly — the canonical surface for the named verification instruments; hold the one or two the session's work will actually need <!-- 2026-08-07: PENDING-112 → REVIEWED-95. THIS SENTENCE IS A PRE-REGISTERED TRIAL INTERVENTION, landed alone and deliberately parallel to the register line above. Baseline before it: the ladder was reached in 9 of 64 sessions (14%), while the register — identical in kind, differing only in being named here — sat at 77%. Prediction: >60% over the 20 sessions following. Graded automatically at 84 transcripts via the `ladder-ritual-trial` DEFERRED-DECISION trigger; the result is filed as a dated PENDING entry whichever way it falls. Do not add to, reword, or "improve" this line before the trial is graded — a second change confounds the only check standing behind PENDING-112's causal claim. -->
- Read `~/.claude/projects/-Users-davidglidden/memory/session-ledger-[previous-date].md` if it exists — **specifically read the "Returns" and "Confidence to recalibrate" sections** for mood signal
- **Link-resolution canary — READ THE DIGEST'S `MEMORY POINTERS` LINE; do not re-implement it.** `~/dotfiles/scripts/wake-digest.py` runs at SessionStart and reports both indexes over both link forms — path pointers `](file.md)` and `[[wikilinks]]` — in four outcomes each (OK · MIS-AUTHORED, with the replacement string handed back · DEAD/UNWRITTEN · NON-PORTABLE), and dates each break as pre-existing or newly-broken from git. Surface any non-OK outcome in the briefing; a pointer to a missing file is the index lying about what memory holds. If the digest is absent, run it: `python3 ~/dotfiles/scripts/wake-digest.py`. ⚠ **Never hand-type this check.** It was typed inline on 2026-08-08 and again on 2026-08-09, and the hand version's one "finding" was the link pattern inside its own specification — the executable strips code spans and the hand version cannot. Prove the instrument before trusting a clean line: `wake-digest.py --selftest` (61 checks, positive and negative controls). <!-- 2026-07-19 harvest review (steward-authorized): the wake-canary link-resolution half, proposed 2026-06-07, partially built 2026-07-06 (truncation half). 2026-08-08: built as classify_pointers (19bddd5). 2026-08-10 [FIX], steward-directed: code-span blindness closed, wikilinks added (the ladder had specified them since 2026-07-06), breakage dated from git, and this step turned from a description into a pointer at the executable — the described-not-invoked gap was the whole reason it kept being retyped. -->
- **Telos conditional:** if the pulling thread touches the studium engine / The Making / ARC-as-public-proof (the engine's reason-for-being), also read `project-studium-engine-telos-chamber-of-voices.md` and hold ONE line of the why in the briefing — the telos lane drawn first, never only the production lanes. Do NOT recite it on unrelated wakes (decorative). <!-- 2026-07-19 harvest review (steward-authorized): proposed 2026-06-18 after the steward had to re-disclose the chamber's origin; second evidence instance 2026-07-19 (map-drawn-from-production-lanes-not-telos, steward corrected twice). -->
**b. The files layer — primary memory** `[palace-memory MemPalace wound down 2026-07-07]`
The durable memory *is* the Markdown + JSONL files (git-tracked, dual-remote). There is no separate index to consult and none to keep in sync — reconstruct directly from the files, and when in doubt verify against the substrate (code, git, the document itself).
**b.1. Thread trajectory — the chain across sessions.** Read the last ~3 session memory files (`session-*.md`, newest by mtime) — their *Future*/pulling-thread and *Present*/mood sections are the cross-session arc. §2.a's Active Session pointer names the newest; these give the trajectory (where the work has been heading), replacing the old diary + thread-lineage glance.
**b.2. Drift patterns — what I've returned from.** `grep 'drift-pattern' ~/.claude/projects/-Users-davidglidden/memory/knowledge-graph.jsonl` — the file-native KG (a JSONL export of 329 triples; ~84 are `claude-code` drift-patterns). Surface the one or two worth holding today. This replaces the old `kg_query claude-code` ritual; treat the JSONL as a point-in-time export that wrap §5 keeps current by appending.
**And one `prevention` alongside them** — `grep 'prevention' …/knowledge-graph.jsonl`. Surface **one line each way**. Grepping only `drift-pattern` opens every session by re-reading what went wrong and never what compounded; a prevention records a lesson from one failure class stopping a different one. One of each, not a tally. <!-- 2026-08-02: FIX lane, REVIEWED-85 first batch; proposed 2026-07-29 (steward-raised). -->
**b.3. THE TURNING — run `thread-query.py` on the thread. Do not hand-grep this.** Once §2.a has given you the pulling thread, run it:
```
python3 ~/dotfiles/scripts/thread-query.py "<the pulling thread, in words>" --log
```
It queries the memory corpus **and** the vault with the thread you are actually on, deliberately **excluding the recency slice this wake already loads** and deliberately **favouring older material** — surfacing what recency will not is its entire job. It returns pointers and the literal matching lines, never summaries. Prove it before trusting a clean run: `--selftest` (14 checks, positive and negative controls, plus the path-component control earned 2026-08-23).
**Surface at most TWO in the briefing, and only if they genuinely bear on the thread.** Quote the pointer and its date; do not summarise the note — open it if it matters. **If nothing comes back, say so in one clause.** A null result is a real result and the trial needs it recorded.
⚠ **Pre-registered trial, grade 2026-10-05** (`~/dotfiles/claude/governance/thread-query-trial.md`). `--log` appends one line per run to `thread-query-log.jsonl` so the verdict is graded from a machine record rather than from anyone's memory of whether it helped. **Falsifier: if across the trial it never surfaces something the steward would have wanted and would not otherwise have found, this step comes out.** A step that can only conclude "keep it" is not a trial.
*(When the query returns nothing and the thread still needs depth, grep the memory dir + the CapableMind thinking docs + the vault directly. The files are authoritative; there is no catalogue in front of them.)*
<!-- 2026-08-24, steward-authorized. Earned twice the same day: a hand-grep found the Hearth
definition in a December Compass document and another found the humic layer from April, and both
were the best findings of the session. The measurement that motivated it: /wake-up reads 6,107
words of an 859,803-word memory corpus — 0.71% — always the newest. This step was previously
DESCRIBED here ("grep the memory dir...") and fired almost never; that is the same
described-not-invoked gap that had the link canary retyped by hand twice before it was pointed at
an executable. Motion supplied by the current work, not by the calendar: Matuschak's report is that
resurfacing on a schedule fails because you are thinking about something else when it arrives. -->
*(The typography palace — a separate MemPalace instance queried via CLI for ARC type work — is KEPT, unaffected by the wind-down; reach for it only when the thread is ARC typography.)*
**c. Governance state**
- Read `~/PENDING.md` — extract items with status PENDING
- Read `~/REVIEWED.md` — extract recent AUTHORIZED/DEFERRED/REJECTED decisions
- Run `git -C ~/dotfiles status -sb` — if dirty or ahead of its remote, the previous wrap's push (wrap-up §6.5) failed or something wrote outside a session. Surface it in the briefing. **Do not commit or push at wake** — the wake reads, it doesn't mutate; the push belongs to the wrap.
- **Governance drift check** — run `python3 ~/dotfiles/scripts/governance-drift-check.py` (~0.2 s). It reports three things. (a) **State claims in `~/CLAUDE.md` the substrate contradicts**: unresolvable paths, named tools with no configured server, hooks claimed to fire that are unconfigured, expired date horizons, structural damage. (b) **Register integrity** — an amendment in `~/REVIEWED.md` that replaced the record it amends rather than joining it (earned 2026-08-07, when REVIEWED-87's original entry was overwritten by its own amendment and nothing detected it). (c) **Deferred decisions whose trigger has COME DUE** — a deferral is the claim *not yet*, and a fired trigger is the substrate saying otherwise. ⏰ **A COME DUE item must be surfaced in the briefing, named, under "What's unresolved"** — it is a decision the steward now owes, not a defect. Earned 2026-08-07: the 2026-05-16 TEI-native deferral's condition was met and sat unobserved for months because nothing checked it. **Report the count in the briefing; list the findings only if the count changed since the last wake.** Do not correct — correction of doctrine or steward-held state requires `[ESCALATE]` (Constitutional Constraint #1); this step is detection only, which needs no authorization. If the script prints `INSTRUMENT NOT VERIFIED`, its positive controls failed — treat the result as unestablished rather than clean. <!-- 2026-07-27: built on steward authorization. The governance document had carried 9 substrate-contradicted claims for up to 4 months because detection and correction were priced identically; separating them makes staleness *visible* rather than *misleading* — Constitutional Constraint #4 applied to the governance document itself. Every check carries a same-run positive control per the epistemic standard ratified in the jurist's Q2 ruling: an absence is not evidence until the instrument is shown capable of detecting presence. -->
**d. Git state**
Run `git log --oneline -5` in each active repo (skip silently if not a git repo):
- `~/_Dev/CapableMind-AI`
- `~/_Dev/BetterMemories.io`
- `~/_Dev/chamber-library`
- `~/_Dev/animal-davidglidden-eu`
If any commits landed since the previous /wrap-up that the steward did not author, name them. The world moved while we slept.
**e. MemPalace upgrade check — RETIRED 2026-07-07.** palace-memory is being wound down; there is no MemPalace to keep current, so no upgrade check runs. (The typography palace, a separate instance queried via CLI for ARC type work, is unaffected and deliberately not upgrade-checked from the wake.)
### 3. Synthesize the briefing
**Thread validity gate (binary; first).** Before synthesizing anything else, determine whether the previous wrap-up's pulling thread still holds. State the outcome explicitly with a one-line reason:
- **Confirmed** — the thread still pulls. Synthesize the briefing as designed; lead with the thread.
- **Stale** — the thread has been overtaken by events. Surface the staleness *before restoring anything else*; the briefing leads with what changed, not with the thread.
- **Superseded** — the steward has indicated a different priority on entry. Name the previous thread for inheritance, then frame the briefing toward the new thread.
Then combine all sources into a single reconstruction. Use this structure but write it as natural, concise prose — not a form to fill in:
**The pulling thread** — first. *"What was pulling when we wrapped: [thread]. This is still what we are returning toward."* If the situation has changed enough that the thread no longer holds, say so explicitly: *"The thread was X, but [Y] has happened since — does the thread still hold, or do we need to re-pick?"*
**The question we left ourselves** — second. Surface it verbatim from the previous /wrap-up. Hold it open. Do not try to answer it.
**From the heap** — after the thread, at most two pointers from `thread-query.py` (§2.b.3), with dates, or one clause saying nothing came back. Pointers, never summaries.
**What changed while we were away** — third. New commits we didn't author, new REVIEWED decisions, anything that moved. Only include if something actually changed. Frame against the thread: does the change serve it, threaten it, or sit beside it?
**What's unresolved** — fourth. Open horizons from the previous wrap, ranked by load-bearing weight. PENDING items awaiting steward attention. Be specific: *"L1 amendment for ProjectionChain drafted in concept only, not yet written; reshapes given multi-mode retention frame from #145"* not *"L1 amendments pending."* Surface, too, any **skill-harvest proposals** the last wrap raised (§1.6) that the steward did not yet authorize — so improvements to our own tools don't evaporate across the pause.
> **Substrate-check anything you call outstanding — a disposition clause is not a status.** `REVIEWED.md`'s *"**If AUTHORIZED:** build X → then Y"* records what was **authorized**, never what was **done**; the same is true of a PENDING item's `**Awaiting:**` line and any tracker's "next steps." Before listing an authorized item as unbuilt, check the **substrate** — the code, the spec header, the repo's `CLAUDE.md`, the fleet test count — and mark each item *verified against substrate* or *unverified*. Cheap: usually one `grep` for the named function or declared-data key. <!-- 2026-07-27: steward-authorized. Earned: the wake reported REVIEWED-72/73/74 as authorized-but-unbuilt; TWO of the three were already built and landed (spec v2.6.0), and the 47-file wave reported as blocked was already unblocked — read straight off their "If AUTHORIZED: build…" lines. -->
>
> This matters more here than anywhere else in the briefing: **the wake is the highest-leverage place a false claim can land.** It shapes the steward's picture of their own project *before any work begins*, and it arrives with the authority of a status report. An unverified backlog reads as fact, and the steward has no reason to doubt it. If a check is genuinely too expensive, say *"unverified — last confirmed [when]"* rather than stating it flat; an honest gap is inheritable, a confident error is not.
**Mood signal from the previous ledger** — if a Symmetria ledger existed for the previous session, surface 1–2 patterns from its "Returns" or "Confidence to recalibrate" sections. *"Last session you returned three times from synthesis-urge; that pattern is worth holding today."* Stimmung carries across pause.
**Next move** — the previous /wrap-up should have left an **actionable resumption point** (the concrete state + candidate first step, as of wrap). Lead with it: confirm it still holds against the thread-validity gate and what changed, or revise it — do not re-derive from cold. If the wrap left none, say so plainly (the link wasn't pure) and derive the starting point now. Suggest, with reasoning visible; don't prescribe.
### 4. Invoke Symmetria for non-trivial sessions
If the session is non-trivial (any of: bigger than a 5-minute lookup; involves writes/commits/architectural decisions; spans multiple threads; the previous session had a Symmetria ledger), **invoke `/symmetria init`** after presenting the briefing. The wake is a return; the discipline of return should be active.
If the session is trivial (single-question lookup, brief check-in), skip Symmetria init. State why explicitly: *"Brief session — Symmetria init skipped."*
### 5. Output format
Keep the total briefing under 350 words (raised from 300 to accommodate the pulling-thread-first frame). Start with:
```
## Wake-up — [date]
[The pause acknowledgment — one short sentence.]
```
Then the pulling thread and the question, then the rest of the briefing.
End with:
```
[If Symmetria invoked:] Symmetria active. Practice of return foregrounded.
Ready when you are.
```
## Important constraints
- **The files layer is primary memory.** The git-tracked Markdown (`MEMORY.md`, `session-*.md`, `REVIEWED`/`PENDING`, the feedback/project memories) + `knowledge-graph.jsonl` are the durable record — reconstruct from them, and when in doubt verify against the substrate (code, git, the document itself). Storage becomes memory only when read *against the pulling thread*, not transcribed.
- **No separate memory index to consult or keep current.** palace-memory MemPalace was wound down 2026-07-07 (its search + KG were confirmatory, not load-bearing — a 46-session audit found genuine reach ≈0.07/session, graph features 0× used). Do not call `mempalace_*` tools for palace-memory. (The typography palace is a separate instance, still queried via CLI for ARC type work only.)
- **The pulling thread comes before facts.** Even if the briefing's other content is rich, lead with the thread. If the thread can't be found in the previous /wrap-up, say so honestly — this is itself a signal that the previous wrap-up was incomplete.
- **The literal question is read verbatim.** Don't paraphrase, don't try to answer it, don't decide it's stale without evidence.
- **Don't read CLAUDE.md** — loaded automatically by the system.
- **Don't check BMF health** — separate concern, manual or future `/bmf-health` skill.
- **Don't fabricate.** If context can't be found, say "I couldn't find session history for [X]" rather than inventing a summary.
- **Flag staleness.** If the last session memory is more than 3 days old, say so explicitly. The pulling thread may no longer hold.
- **Be warm but not chatty.** This is a working document, not a greeting.
- **Symmetria init is mandatory for non-trivial sessions.** The wake is a return; the practice should be active before any action with blast radius.