v2.25.0 · Memory that survives — pre-compaction rescue + the session-end learning floor - #78
Open
hamza-ali-shahjahan wants to merge 1 commit into
Open
Conversation
…end learning floor - precompact-rescue.ts (PreCompact): reruns the capture classifier over the transcript's user turns right before compaction; missed learnings land in the same /reflect queue (queue-dedupe across compactions, secret-drop, 20/run cap, fail-open, silent) - session-learning-nudge.ts (Stop): managed repo + real (non-wip) commits today + no brain/learnings entry + quiet queue → ONE blocking nudge per session (marker-throttled, stop_hook_active-guarded, fail-open) - both ship inert per the 2026-07-14 house pattern; activation snippets in the hooks README (retitled: capture · rescue · nudge · enablement) - /reflect: distillation guard (negative capability claims harden into refusals) + intro names both queue feeders - templates/status-template.md: the 7-section living summary (merge into previous, never rewrite); skill-authoring playbook: Honesty callouts - 16 new tests (factory/hooks now 29); full suite 134 pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of 4 from the Horizon-scout way-forward plan — operator reviews, then merges (not auto-merged). Phase 0 was #77.
What
1 —
precompact-rescue.ts(PreCompact hook). Right before compaction, re-runs the shared capture classifier over the transcript's user turns and appends anything missed to the SAME queue/reflectdrains — no new storage, no new review surface. Dedupes against the queue across repeated compactions, drops secret-shaped text, caps at 20 rescues/run, fail-open + silent by contract. The deterministic rung of Horizon's pre-compaction flush fork; the LLM rung arrives with/dream-review(phase 2).2 —
session-learning-nudge.ts(Stop hook). CLAUDE.md's "every session that produces real work ends with a learning" rule gets a mechanical floor: managed repo + real (non-wip(auto)) commits today + nobrain/learnings/entry today + quiet capture queue → ONE blocking nudge per session to distill a learning. Marker-throttled,stop_hook_active-guarded, fail-open — can never trap a session.3 — Both ship INERT (house pattern, decision-log 2026-07-14): activation is an explicit paste into
~/.claude/settings.json; snippets in the hooks README (retitled: capture · rescue · nudge · enablement).4 — Writing conventions:
/reflectgains the distillation guard (negative capability claims harden into refusals the agent cites against itself for months — Horizon's curator line) and names both queue feeders;templates/status-template.mdlands the 7-section living summary (merge-into-previous, never rewrite); the skill-authoring playbook gains the Honesty callouts convention.Proof (all local, green)
bun test ./factory/hooks— 29 pass (16 new: classifier reuse, queue dedupe across double-compaction, secret/question/meta/tool-result exclusion, fail-open on missing transcript, the full nudge decision matrix, managed-dir detection, silent-outside-managed end-to-end)bun run test— 134 passcheck-changelog·check-counts(2.25.0 consistent) ·check-retro·check-evals·check-skill-command-collision— greencheck-assets: the one failure it reports locally is a pre-existing reference in the operator's uncommitted README.md edit (absent from HEAD and from this branch — verified) — this PR's CI checks committed files onlyReview notes
/reflecthuman gate; promotion authority still/learn-loop's/dream-review(nightly consolidation, drafts-only, behind the 14-day adoption gate) with its STANDING-ORDERS program entry