Skip to content

A self-organizing Obsidian vault that gives AI coding agents persistent memory.

fix: bump shardmind bootstrap fingerprint to qmd-v2 for the v7 migration (#138)

Brenno Ferrari21c374689225
diff --git a/.shardmind/hooks/post-update.ts b/.shardmind/hooks/post-update.ts
index fb28d79..3fb88a9 100644
--- a/.shardmind/hooks/post-update.ts
+++ b/.shardmind/hooks/post-update.ts
@@ -53,6 +53,21 @@ export default async function postUpdate(ctx: PostUpdateContext): Promise<void>
console.log('qmd: index stays fresh via the PostToolUse refresh hook during sessions — no action needed here.');
}
+ // One-time v7 migration note. MEMORY.md lives OUTSIDE the vault tree
+ // (~/.claude/projects/<slug>/memory/), so the merge engine can neither
+ // migrate it nor surface a conflict — this console note in the update
+ // summary is the only surface that reaches the user at upgrade time.
+ // previousVersion is optional; when unknown, print anyway (harmless).
+ const prevMajor = Number.parseInt(ctx.previousVersion ?? '', 10);
+ const nowMajor = Number.parseInt(ctx.shard.version, 10);
+ if (nowMajor >= 7 && !(prevMajor >= 7)) {
+ console.log(
+ 'v7 note: the auto-memory MEMORY.md (~/.claude/projects/<slug>/memory/) is now a DERIVED index — ' +
+ 'regenerated from brain/ frontmatter, and regeneration overwrites hand edits. ' +
+ 'If yours accumulated hand-written content, migrate it into brain/ topic notes before the next wrap-up regenerates the index.',
+ );
+ }
+
// Invariant 3: no managed-file writes from this hook today. If you add
// one, gate it on `ctx.newFiles.includes(<path>)` so the engine's
// additive-only contract is preserved. `ctx.removedFiles` is available
diff --git a/.shardmind/shard.yaml b/.shardmind/shard.yaml
index bad7ba5..df07fe2 100644
--- a/.shardmind/shard.yaml
+++ b/.shardmind/shard.yaml
@@ -24,9 +24,14 @@ requires:
hooks:
bootstrap:
script: .shardmind/hooks/bootstrap.ts
- # Bump when the QMD index schema changes — the engine re-runs bootstrap on
- # update whenever this fingerprint differs from the recorded one.
- fingerprint: "qmd-v1"
+ # Bump whenever an update must RE-RUN bootstrap on existing installs —
+ # index schema changes, one-time store migrations, new setup-time gates.
+ # The engine re-runs bootstrap on update whenever this fingerprint
+ # differs from the recorded one.
+ # v2 (v7.0.0): collection name derives from qmd_index with an in-place
+ # legacy-name migration, plus the qmd_min_version gate — upgrading
+ # installs must re-run bootstrap for the migration to execute.
+ fingerprint: "qmd-v2"
personalize: .shardmind/hooks/personalize.ts
post-update: .shardmind/hooks/post-update.ts
# 60 s to accommodate first-run qmd bootstrap (index creation + initial embed pass).