From 7e70864907078b7ad0d0e437b0b6752011a53efc Mon Sep 17 00:00:00 2001 From: mikael-lovqvists-claude-agent Date: Fri, 3 Apr 2026 03:06:33 +0000 Subject: [PATCH] Note: replace flat prefixed KV keys with hierarchical collection structure Co-Authored-By: Claude Sonnet 4.6 --- future-plans.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/future-plans.md b/future-plans.md index 4879ea5..2292ace 100644 --- a/future-plans.md +++ b/future-plans.md @@ -7,6 +7,14 @@ `fs-views`, `publication-tool`). Should live in its own Gitea repo as an installable npm package (`npm install git+https://...`) so changes propagate rather than drift. +### Hierarchical storage structure +The current store is a flat string→value map with prefixed keys (`f:`, `c:`, `bin:`, +etc.) as a manual namespacing convention. This should be replaced with a proper tree: +collections as top-level keys whose values are `Record`. Eliminates the +prefix convention, makes collection access direct and self-documenting, and removes +the full-scan `startsWith` pattern from every `list_*` function. Requires a one-time +migration of existing NDJSON data. Best done as part of the shared library rewrite. + ### Delta / revision tracking Add a delta log alongside the main snapshot file (e.g. `inventory.ndjson.deltas`) that records every `set`/`delete` as a timestamped entry. The main file stays a