Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

docs([migration-043-line-ending-precedent]): document MD5-hashing precedent for future prompt amendments

[._.]/ Adam Eivy1b9e2d4dc1fa
diff --git a/scripts/migrations/043-story-builder-prompts.js b/scripts/migrations/043-story-builder-prompts.js
index 9347032f8e..f68299e0bd 100644
--- a/scripts/migrations/043-story-builder-prompts.js
+++ b/scripts/migrations/043-story-builder-prompts.js
@@ -8,6 +8,15 @@
* pulls + `pm2 restart`s (rather than running `update.sh`) would otherwise
* leave the new Story Builder stages unseeded and the first reader-map /
* idea-expand generation would throw "Stage not found".
+ *
+ * FIRST-SHIPMENT SEED ONLY — no MD5 hashing here: it copies *missing*
+ * templates and never overwrites an install's existing prompt. When a FUTURE
+ * migration AMENDS any of these story-builder prompts, follow migration 003's
+ * pattern instead: normalize line endings (\r\n → \n, bare \r → \n) before
+ * hashing, and ship both the prior-shipped hash (OLD_SHIPPED_MD5 /
+ * ACCEPTED_OLD_MD5) and the new one (NEW_SHIPPED_MD5) so unmodified installs
+ * auto-update and customized ones warn instead of being clobbered.
+ * See scripts/migrations/003-update-pipeline-stage-prompts.js.
*/
import { access, copyFile, mkdir, readFile, constants } from 'fs/promises';