# Offline Markdown Search with Verifiable Source Evidence (SQLite FTS5 + SHA-256)

> Source: <https://dev.to/capicove_ai/offline-markdown-search-with-verifiable-source-evidence-sqlite-fts5-sha-256-5d4g>
> Published: 2026-11-28 03:07:09+00:00

**Recommendation:** When building local keyword retrieval, store character spans and source SHA-256 hashes per hit so results can be verified and stale sources rejected at index build.
More in the playbook "Retrieval and RAG": <https://wpnews.pro/playbooks/rag-retrieval>

A keyword search hit is much more useful when you can verify the exact passage and file hash it came from.

In this reproducible walkthrough, we use [Capicove](https://capicove.ai/) (MIT-licensed, local-first knowledge and multimodal CLI) to import three local Markdown notes, build an offline SQLite FTS5 keyword index, search for `FTS5`, and inspect exact character-span evidence (` start_char`–` end_char`) plus SHA-256 lineage—without a hosted API, API key, or model download during retrieval.

**Full HTML guide, captured outputs, and replay bundle (ZIP + SHA-256):**

[https://capicove.ai/guides/offline-markdown-search/](https://capicove.ai/guides/offline-markdown-search/)

Requires Python 3.11+ and `uv`:

```
git clone https://github.com/happyBayes/capicove.git
cd capicove
git checkout 3f1be3314fa15dec8b8063166d77cc896cc5f68f
uv sync --locked --no-dev --python 3.11
```

Then initialize a local workspace, import your Markdown files, build the index, and inspect the returned `evidence_id`:

```
"$BIN" setup init "$CASE/workspace" --source-root "notes=$CASE/notes"
CFG="$CASE/workspace/host.json"
"$BIN" source import --runtime-config "$CFG" --root notes --relative-path offline-search.md
"$BIN" index build --runtime-config "$CFG"
"$BIN" search FTS5 --runtime-config "$CFG"
"$BIN" get-evidence YOUR_EVIDENCE_ID --runtime-config "$CFG" --section metadata --section lineage
```

`metadata.text` and the UTF-8 source slice `[0:403]`
`metadata.source_sha256`, `lineage.source_sha256`, and the raw file` index build` to reject the stale source without replacing the active generation
