Skip to content

feat: autonomous context maintenance — reflux engine + qmd auto-reindex (v2.4.0)#3

Merged
aedneth merged 1 commit into
mainfrom
feat/autonomous-context-reflux-v2.4.0
Jun 20, 2026
Merged

feat: autonomous context maintenance — reflux engine + qmd auto-reindex (v2.4.0)#3
aedneth merged 1 commit into
mainfrom
feat/autonomous-context-reflux-v2.4.0

Conversation

@aedneth

@aedneth aedneth commented Jun 20, 2026

Copy link
Copy Markdown
Owner

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 -p or 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:

  • Drafts an update + unified diff into a quarantine queue; never overwrites a live doc unless a human runs ckis-reflux-all --apply <queuefile> (or sets a doc's auto_apply=true, off by default).
  • Every proposal must pass structural guards or it's rejected, never queued: frontmatter created immutable · no section heading dropped · no shrink below min_retain_pct · line cap · secret-scan clean (fail-closed if the scanner is missing).
  • Optional systemd --user timer 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_index block), 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 --apply re-checks guards. Full backup-system/tests/run.sh green.

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

…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>
@aedneth aedneth merged commit 44a4211 into main Jun 20, 2026
3 checks passed
@aedneth aedneth deleted the feat/autonomous-context-reflux-v2.4.0 branch June 20, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant