LoreDocs: Every Edit Keeps Version History LoreDocs now automatically creates a new timestamped, author-attributed version of every document saved through its MCP interface, storing each snapshot as a separate row in a local SQLite database the user owns. The versioning is exposed through two MCP tools, `vault_doc_history` and `vault_doc_restore`, which list a document's full version chain and roll back to any snapshot while recording the restore itself as a new auditable version. The feature is unavailable in LoreDocs' Python fallback script, which omits write-oriented capabilities, so full version control requires running the MCP server. When you edit a knowledge base, the fear of losing a previous insight is real. A stray typo, an accidental overwrite, or a quick experiment can erase a line of reasoning that took weeks to develop. For data engineers and AI practitioners who treat documentation as part of the data pipeline, that risk is a hidden cost. LoreDocs removes the uncertainty by turning every edit into a non-destructive event. The moment you save a change, the system writes a new version and preserves the old one in a searchable history. You can explore the evolution of a document, compare revisions, or roll back to a known good state with a single command. In practice, versioning becomes a safety net that lets you experiment, iterate, and collaborate without the mental overhead of manual backups. Why version history matters for data engineers Data pipelines are built on reproducibility. When a model is trained, a transformation script is tweaked, or a schema is updated, the surrounding documentation should reflect those changes in lockstep. If the documentation diverges, downstream teams spend time reconciling mismatches, and the root cause of bugs becomes harder to trace. A versioned document store solves that problem at its source. Every revision is timestamped and linked to the user who made the change. This creates an audit trail that aligns with the same rigor you apply to code commits. The history is searchable with the same full-text engine that powers regular queries, so you can locate a specific phrase across all past versions without leaving your workspace. And because the history lives in a local SQLite file that you own, you retain full control over retention policies and can prune old versions according to your compliance needs. The result is a documentation layer that mirrors the version control discipline you already trust for code and data. How LoreDocs captures every change LoreDocs treats a vault as a self-contained repository. When you call vault add doc or edit a document through the MCP interface, the system automatically creates a new snapshot. The snapshot includes the full text of the document, the metadata you supplied, and a reference to the previous version. No extra flag or manual step is required -- the process is built into the core edit workflow. Behind the scenes, each version is stored as a separate row in the local SQLite database. The database also maintains an index that maps document identifiers to their version chain, enabling fast retrieval of any point in the timeline. Because the storage format is plain text, you can inspect the raw rows with any SQLite client if you need to perform bulk analysis or export a series of revisions for external review. The versioning feature is exposed through two MCP tools: vault doc history and vault doc restore . vault doc history returns a chronologically ordered list of all versions for a given document, including the author, timestamp, and an optional short summary you can add at save time. vault doc restore takes a version identifier and replaces the current document content with that snapshot, preserving the restore action as a new version itself. Every rollback is itself auditable, so you never lose the context of why a particular state was chosen. Because the versioning logic lives in the MCP server, it is not available through the Python fallback script. The fallback is intended for quick, read-focused access when an MCP client cannot be started, and it deliberately omits write-oriented features to keep the surface area small and secure. If you need full version control, start the MCP server and interact with the vault through the standard tool set. Restoring confidence with one command Imagine you are refining a prompt library for a large language model. You add a new example, run a test, and discover that the change broke a downstream evaluation metric. With LoreDocs, you do not need to copy the old file from a backup folder or search through Git history for a specific commit. Instead, you open the document's history, locate the version that preceded the change, and issue a single vault doc restore call. The system swaps the content, writes a new version that records the restore, and you are back to a known good state in seconds. The same workflow applies to data schema documentation. When a column is renamed, you update the description, but later realize the original name is still referenced in a downstream notebook. A quick restore brings back the previous description, and you can annotate the change with a short note explaining the rename. Because the history is searchable, you can also query for all documents that mentioned the old column name across any version, giving you a clear view of the impact of the rename. This pattern of edit, test, and restore if needed encourages a culture of safe experimentation. Teams no longer need to gate changes behind lengthy review cycles just to protect the knowledge base. The versioning engine handles the safety net, while you focus on delivering value. Integrating versioning into your AI pipelines Versioned documentation is not an isolated feature -- it can be woven into the automation that drives your AI projects. For example, you can add a step to your CI pipeline that runs vault doc history after each successful model training run. The step extracts the latest documentation snapshot, compares it to the previous version, and flags any substantial changes for review. Because the history is stored locally, the comparison runs quickly and does not depend on external services. Another practical integration is using the semantic search capability available in the Pro tier together with version history. By rebuilding the semantic index after a restore, you ensure that queries always reflect the current state of the knowledge base while still allowing you to search across past versions if you need to trace the evolution of a concept. The vault rebuild index command can be scheduled to run nightly, keeping the hybrid BM25-embedding index fresh without manual intervention. The portable nature of LoreDocs means you can move an entire vault -- including its version history -- from one machine to another by copying the local database and vault directory. This is useful when you need to hand off a project to a new team, archive a completed research effort, or replicate a sandbox environment for a demonstration. The receiving side can start the MCP server and immediately have access to the full revision timeline, preserving institutional memory across organizational boundaries. Start editing without fear If you want to protect your documentation from accidental loss and give your team the confidence to edit without fear, the LoreDocs versioning tools are ready to use through any MCP-capable client. Visit /tools https://labyrinthanalyticsconsulting.com/tools to see the full feature list, or read how the vault architecture supports this kind of durability in /blog/loredocs-vault-architecture https://labyrinthanalyticsconsulting.com/blog/loredocs-vault-architecture . For the case behind building locally rather than relying on a hosted knowledge layer, see Why Durable Knowledge Needed Its Own Store https://labyrinthanalyticsconsulting.com/blog/why-durable-knowledge-needed-its-own-store . Get posts like this delivered weekly: subscribe to Dispatches from the Labyrinth https://labyrinthanalytics.substack.com/subscribe?utm source=blog&utm medium=blog&utm campaign=substack subscribe .