Surfil

Local memory with Mind

Mind is the memory stage - last in the pipeline, deliberately. It writes settled facts from your sessions to Weave with provenance and a code hash, so your next session starts warm instead of rediscovering everything from zero.

Prerequisite: Surfil installed with Weave bootstrapped (that happens during surfil consolidate - see Install).

When you need this

Every new agent session that re-derives your build commands, conventions, and past decisions is paid-for context you already bought once. Mind exists to stop that: facts your agent has already established - decisions, context, prior results - persist across sessions.

How it works

  1. As sessions run through the pipeline, Mind writes settled facts to Weave - plain signed Markdown, on your device.
  2. Each fact carries provenance and a code_hash. If the code a fact describes changes, the hash mismatch auto-flags it STALE - no confidently wrong memory.
  3. Pilot reads facts back with citations, so you can see where a remembered claim came from.
  4. To teach Surfil something directly, use surfil mind remember.
$ surfil mind remember
$ surfil mind stats

How it stays private

  • Memory is written to Weave on-device; nothing about it requires a server.
  • If it syncs at all, it syncs as ciphertext - end-to-end encrypted, the server never sees plaintext.
  • This is the same zero-trace invariant every product obeys, not a Mind-specific setting.

How you know it worked

  • surfil mind stats shows facts accumulating as you work.
  • Weave facts are plain .md files - open one in any editor and read exactly what was remembered and its provenance.
  • A new session references established facts instead of re-deriving them.
Facts flagged STALE are not deleted - they are marked so nothing trusts them until re-established. Seeing STALE flags after a big refactor is the system working, not memory failing.
  • Weave - the format and staleness model in full.
  • Zero-trace - the privacy invariant behind ciphertext sync.
  • Install - exporting your memory as a .surfilpkg before uninstall.