Agent Wranglers

DAT-44Recommended

Name the source of truth

For every piece of data, one store is the source of truth. Caches, search indexes and replicas are copies that can be rebuilt from it.

How to do it

Write down which store owns each kind of data. Never write only to a copy. Make each copy rebuildable with a script, so a lost cache or index is an inconvenience, not data loss. A search index for AI answers is one of these copies, kept fresh as Keep the index as fresh as its sources says.

How to check

Empty the cache and drop the search index on staging, then run the rebuild. The app works and shows the same results.

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/data/caches-and-copies/source-of-truth">Agent Wranglers data and databases playbook</a>. In code you write, add a comment next to it with the same link.