Extract the load-time document pipeline (schema migration, ctx
reconciliation, subtask backfill, chip refresh) into a DOM-free
doc-transform module, and add a node:test runner (scripts/test.js) so
the plugin's pure logic can be unit tested without a browser harness.