feat: autonomous context maintenance — reflux engine + qmd auto-reindex (v2.4.0)#3
Merged
Merged
Conversation
…ex (v2.4.0) Reflux engine (ckis-reflux-all): keeps the canonical heart docs (_MEMORY/ _ACTIVE-PROJECTS/_INTERESTS/_PROFILE) fresh from accumulated session activity via a headless model call. Propose-only by default — drafts an update+diff into a quarantine queue, never overwrites a live doc unless a human runs --apply. Structural guards (created immutable, no heading dropped, no shrink, line cap, secret-scan) reject any unsafe proposal. Optional systemd --user timer, cadence-throttled. qmd auto-reindex: backup reconcile refreshes the local BM25 search index each run (optional search_index manifest block); best-effort, never fails a backup. Both are optional declarative manifest blocks. 14-test test_reflux.sh (stub model, no network); full backup-system suite green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds two optional, declarative autonomy layers to
backup-system/— no extra code for users, just a manifest block.Reflux engine (
ckis-reflux-all)Keeps the canonical heart docs (
_MEMORY/_ACTIVE-PROJECTS/_INTERESTS/_PROFILE) fresh from accumulated session activity via a headless model call (claude -por any equivalent). Closes the common failure where a vault grows for months while its canonical state files quietly go stale.Safety — propose-only by default:
ckis-reflux-all --apply <queuefile>(or sets a doc'sauto_apply=true, off by default).createdimmutable · no section heading dropped · no shrink belowmin_retain_pct· line cap · secret-scan clean (fail-closed if the scanner is missing).systemd --usertimer runs it daily, cadence-throttled (per-doc cadence + skip-if-a-proposal-is-pending) so it's never noisy; pending proposals surface in the session banner.qmd auto-reindex
The backup reconcile refreshes the local qmd BM25 search index on every run (optional
search_indexblock), so search stays fresh for edits made outside any agent. Best-effort — a stale index never fails a backup.Tests
backup-system/tests/test_reflux.sh— 14 tests, no model call (stub), proving the guards reject every unsafe proposal, the live doc is never touched on propose, and--applyre-checks guards. Fullbackup-system/tests/run.shgreen.Notes
Both layers are off until you add the manifest block; remove the block to disable. See
backup-system/ckis-manifest.example.json.🤖 Generated with Claude Code