Skip to content

docs: hibernation lifecycle spec (#196 behavior half) - #285

Merged
robotrocketscience merged 2 commits into
mainfrom
docs/issue-196-hibernation-lifecycle-spec
Apr 29, 2026
Merged

docs: hibernation lifecycle spec (#196 behavior half)#285
robotrocketscience merged 2 commits into
mainfrom
docs/issue-196-hibernation-lifecycle-spec

Conversation

@robotrocketscience

Copy link
Copy Markdown
Owner

Summary

Spec memo for the v2.0 #196 behavior half. Storage half (PR #282) added the columns; this memo proposes the rules that consume them. Doc-only — no code change. Posted for ratification.

Three open questions resolved:

  1. Trigger. Candidate A: conjunction of unlocked + retrieved-and-cold (30d) + demotion_pressure ≥ 1 + posterior_mean < 0.6. The conjunction is what keeps it safe — old-and-quiet beliefs (probably true, just off-topic) don't hibernate; new beliefs (α=β=1.0, posterior 0.5) don't hibernate (no last_retrieved_at); user-flagged-wrong beliefs go through deletion, not hibernation.
  2. Predicate grammar. Closed three-clause JSON object: `keywords_any` (substring match), `source_kind` (equality), `after_ts` (ISO-8601). Implicit AND, no nesting, no expressions. Widening is additive; narrowing later would break beliefs in the wild.
  3. Sweeper. New `aelfrice.hibernation` module. `score_pass` invoked from `aelf doctor --hibernate` (opt-in in v2.0); `wake_pass` runs automatically on `UserPromptSubmit` before the L0/L1/L2.5 search so woken beliefs are eligible same-turn. Hibernated beliefs filter out of L1/L2.5 retrieval; locked beliefs cannot hibernate.

Decision asks (four)

Bottom of the memo. Trigger conjunction shape, grammar closure, sweeper placement, retrieval-filter semantics.

What ships if ratified

Three follow-up PRs:

  1. `aelfrice.hibernation` module (pure functions + pytest coverage).
  2. Doctor flag + retrieval filter + hook `wake_pass` invocation.
  3. `LIMITATIONS.md` / `PHILOSOPHY.md` / README updates.

Test plan

Refs #196

Storage half (PR #282) added hibernation_score + activation_condition
columns but left behavior unspecified. This memo proposes:

- Trigger rule (Candidate A): conjunction of unlocked + cold (30d) +
  demotion_pressure ≥ 1 + posterior < 0.6. The conjunction is what
  makes the rule safe — old-and-quiet beliefs (probably true, just
  off-topic) don't hibernate.
- Predicate grammar: closed three-clause JSON object with implicit
  AND — keywords_any, source_kind, after_ts. No nesting, no
  expressions, no eval surface. Widening is additive; narrowing
  breaks beliefs in the wild.
- Sweeper: new aelfrice.hibernation module with score_pass (opt-in
  via aelf doctor --hibernate) and wake_pass (auto on
  UserPromptSubmit). Hibernated beliefs filtered out of L1/L2.5
  retrieval; locked beliefs cannot hibernate.

Four ratification asks at the bottom. Implementation deferred to
post-ratification; rough plan is three PRs (module, doctor wiring,
docs).

Refs #196
@robotrocketscience robotrocketscience added the author-Kulili PR coordination mutex label Apr 29, 2026
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Setr:2026-04-29T02:12:47Z]

@robotrocketscience

Copy link
Copy Markdown
Owner Author

Review: discretion grep on docs/hibernation_lifecycle.md flags one tier-reasoning leak.

docs/hibernation_lifecycle.md:230
   path. ~queen-tier implementation, ~rook-tier tests.

Per the public-artifact discretion rule, tier reasoning (queen-tier / rook-tier) shouldn't appear in shipped docs. Suggest sanitizing in place — drop the tier annotation, or rephrase as effort/scope ("non-trivial implementation, tests are mechanical") if the size signal is worth keeping.

Spec content itself looks good — Candidate A trigger conjunction is the right shape, closed three-clause grammar is the right call, sweeper placement matches the substrate decision. Holding merge on the leak only.

Releasing review claim; will re-review after the sanitize.

@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Setr:2026-04-29T02:13:44Z]

@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Gylf:2026-04-29T02:14:49Z]

@robotrocketscience

Copy link
Copy Markdown
Owner Author

Review: blocking on discretion leak — docs/hibernation_lifecycle.md line near "~queen-tier implementation, ~rook-tier tests" violates discretion rules for public artifacts. Please sanitize that line and re-request. Spec content otherwise reads well.

@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Gylf:2026-04-29T02:15:29Z]

Replace coordination-protocol vocabulary (queen-tier/rook-tier) with
descriptive terms in the implementation roadmap section.
@robotrocketscience

Copy link
Copy Markdown
Owner Author

Sanitized tier vocab in docs/hibernation_lifecycle.md (commit a547cf8). The implementation-roadmap line that read ~queen-tier implementation, ~rook-tier tests now reads Implementation needs design judgment; tests are mechanical. — no coordination-vocab remaining per discretion grep. Re-requesting review.

@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Setr:2026-04-29T03:08:17Z]

@robotrocketscience
robotrocketscience merged commit 0473dff into main Apr 29, 2026
8 checks passed
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Setr:2026-04-29T03:08:45Z]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author-Kulili PR coordination mutex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant