{
  "title": "AIsim distributed generation architecture",
  "public_names": {
    "worker_a": {
      "label": "Worker A",
      "os": "macOS",
      "role": "stationary worker and external master database storage"
    },
    "worker_b": {
      "label": "Worker B",
      "os": "Linux",
      "role": "workstation worker"
    },
    "worker_c": {
      "label": "Worker C",
      "os": "Linux",
      "role": "mobile workstation worker"
    },
    "control_laptop": {
      "label": "Control laptop",
      "os": "macOS",
      "role": "supervision and lightweight coordination"
    }
  },
  "nodes": [
    {"id": "reports", "group": "input", "label": "Evaluation report case packs", "detail": "Cleaned Markdown / structured case packs"},
    {"id": "personas", "group": "input", "label": "Persona set", "detail": "32,256 virtual residents"},
    {"id": "prompt_builder", "group": "prompt", "label": "Prompt builder", "detail": "fixed prefix + output schema + case pack + variable persona"},
    {"id": "shards", "group": "orchestration", "label": "Non-overlapping JSONL shards", "detail": "one row = persona-report-condition prompt input"},
    {"id": "worker_a", "group": "worker", "label": "Worker A / macOS", "detail": "4 active worker processes"},
    {"id": "worker_b", "group": "worker", "label": "Worker B / Linux", "detail": "4 active worker processes"},
    {"id": "worker_c", "group": "worker", "label": "Worker C / Linux", "detail": "4 active worker processes"},
    {"id": "api", "group": "model", "label": "OpenAI-compatible LLM endpoint", "detail": "DeepSeek V4 Flash via provider route"},
    {"id": "cache", "group": "recovery", "label": "Worker-local cache", "detail": "cache key prevents duplicate generation"},
    {"id": "outputs", "group": "recovery", "label": "Output JSONL + report", "detail": "schema validation and failure log"},
    {"id": "source", "group": "storage", "label": "Master database", "detail": "external large-capacity disk"},
    {"id": "merge", "group": "analysis", "label": "Merge and validation", "detail": "deduplicate, validate, summarize"},
    {"id": "figures", "group": "publication", "label": "Analysis / figures / web supplement", "detail": "TSV, JSON, SVG, PDF"}
  ],
  "edges": [
    {"source": "reports", "target": "prompt_builder", "label": "case pack"},
    {"source": "personas", "target": "prompt_builder", "label": "persona"},
    {"source": "prompt_builder", "target": "shards", "label": "prompt input JSONL"},
    {"source": "shards", "target": "worker_a", "label": "shard 01.."},
    {"source": "shards", "target": "worker_b", "label": "shard 01.."},
    {"source": "shards", "target": "worker_c", "label": "shard 01.."},
    {"source": "worker_a", "target": "api", "label": "chat completions"},
    {"source": "worker_b", "target": "api", "label": "chat completions"},
    {"source": "worker_c", "target": "api", "label": "chat completions"},
    {"source": "worker_a", "target": "cache", "label": "cache writes"},
    {"source": "worker_b", "target": "cache", "label": "cache writes"},
    {"source": "worker_c", "target": "cache", "label": "cache writes"},
    {"source": "worker_a", "target": "outputs", "label": "JSONL/report"},
    {"source": "worker_b", "target": "outputs", "label": "JSONL/report"},
    {"source": "worker_c", "target": "outputs", "label": "JSONL/report"},
    {"source": "cache", "target": "source", "label": "periodic sync"},
    {"source": "outputs", "target": "source", "label": "periodic sync"},
    {"source": "source", "target": "merge", "label": "retrieve"},
    {"source": "merge", "target": "figures", "label": "analysis-ready data"}
  ],
  "callouts": [
    "API keys are not stored in the repository.",
    "Each worker has separate output, report, and cache paths.",
    "Restarting with the same paths resumes from completed cache keys.",
    "The public diagram anonymizes hostnames and network details."
  ]
}
