ZMIP module structure: stages and data flow

ZMIP module structure: stages and data flow An architecture diagram generated by Archify. annotated.h5ad · MSP annotation result · Architecture component annotated.h5ad MSP annotation result zmip.__main__ · stage orchestration · Architecture component zmip.__main__ stage orchestration zmip.plan · lineage plan, islands · Architecture component · agent zmip.plan lineage plan, islands agent zmip.lineage · lineage subprocess pool · Architecture component zmip.lineage lineage subprocess pool zmip.annotate · keep / remove / reassign · Architecture component · agent zmip.annotate keep / remove / reassign agent zmip.merge · fold back, checks · Architecture component zmip.merge fold back, checks zmip.publication · journal, rollback · Architecture component zmip.publication journal, rollback annotated_zmip.h5ad · report, audit CSVs · Architecture component annotated_zmip.h5ad report, audit CSVs zmip.cache / runtime · receipts, lock, identity · Architecture component zmip.cache / runtime receipts, lock, identity zmip.foreign · markers, foreign scores · Architecture component zmip.foreign markers, foreign scores msp · integrate, plots, report · Architecture component msp integrate, plots, report harness_bridge · model API middleware · Architecture component · Doubao / DeepSeek / Claude harness_bridge model API middleware Doubao / DeepSeek / Claude zmip.report · global HTML report · Architecture component zmip.report global HTML report read prepare_run, lock_run plan_lineages run_agent + tools markers per lineage plan + marker table integrate_adata re-embedding subset + foreign scores run_agent + tools annotated.h5ad + audit CSVs generate_report report.html staged set atomic replace validated plan validated proposal Legend Backend Database Security External

Four stages

  • • plan: the agent groups coarse labels into lineages by UMAP island
  • • zoom: each lineage is re-embedded, scored for foreign signal and annotated per cluster
  • • merge: results fold back into the global object under coverage and consistency checks
  • • publish: outputs are staged, then replaced atomically under a journal

Host guards

  • • Every coarse label belongs to exactly one lineage; pooling separate islands is rejected
  • • Survivors plus removals must partition each lineage's input exactly
  • • Reassignment decisions in the audit CSV and the H5AD are compared cell by cell

Recoverable resume

  • • Receipts record the input hash, options and dependency source hashes
  • • Agent settings are recorded but not compared, so max-turns can change between runs
  • • Only one parent process may write to an output directory at a time