{
  "version": 3,
  "created_at": "2026-07-08T22:17:19.527Z",
  "task_summary": "Mine celiac mucosal omics for villi-protecting immune targets, scored on a tolerability/modality axis into two tiers",
  "agents": [],
  "phases": [
    {
      "name": "Plan",
      "delegations": [
        {
          "steps": [
            {
              "title": "Frame the tolerability scoring rubric",
              "description": "Codify the patient-preference/field-consensus evidence already gathered (GFD as safe baseline raises the safety bar; oral/gut-restricted/tolerogenic modalities preferred; two populations — diet-adherent villi-protection vs refractory) into an explicit scoring rubric. Define the two output tiers (Tier-1 repurposing-first oral/low-side-effect; Tier-2 novel biology incl. refractory-acceptable modalities) and the modality axis levels (approved oral drug on target/pathway > gut-restricted > systemic biologic). Save celiac_tolerability_rubric.md and a patient-preference evidence table celiac_patient_preference.csv with sourced figures (enzyme/vaccine survey rankings, FDA adjunctive-therapy guidance population)."
            },
            {
              "title": "Build celiac omics dataset inventory",
              "description": "Query GEO (E-utilities), ArrayExpress, PRIDE, CELLxGENE for celiac/coeliac duodenal-mucosa datasets (bulk RNA-seq, microarray, scRNA-seq, proteomics). Build celiac_dataset_inventory.csv (accession, assay, tissue, n, has_control, context: active vs GFD vs refractory, Marsh grade if noted, platform, date, title, summary). Audit keyword-only false positives (flag relevant=False with reason). Deliver a landscape figure (assay × repository, colored by disease context)."
            },
            {
              "title": "Tier & prioritize datasets",
              "description": "Score datasets on relevance/analytical role/tractability. Tier 1 = human in-vivo case-control bulk/array duodenum with active-CeD vs control and usable n; Tier 2 = scRNA-seq (for the IEL/epithelial villous axis); Tier 3 = complementary (proteomics, blood, refractory-specific, in-vitro gluten challenge). Save celiac_dataset_tiers.csv + a short rationale md."
            },
            {
              "title": "Retrieve & QC Tier-1 bulk",
              "description": "Download supplementary matrices for Tier-1 duodenal case-control studies. Build binary active-CeD vs control labels per study (keep labelling logic scriptable; hold GFD-treated as a separate contrast where available). Harmonize IDs to gene symbols (mygene / platform annotation), normalize (log-CPM or log2 intensity). QC: per-study PCA and a celiac villous-axis marker check (IL15, CD3/IEL markers, KLRK1/NKG2D, MICA/B, IFNG, and villous/enterocyte markers e.g. APOA4, SI as damage-direction controls). Save a harmonized checkpoint bundle; report marker-direction heterogeneity."
            },
            {
              "title": "Per-study DE + cross-study meta-analysis",
              "description": "Run moderated_de (variance-moderated Welch t, BH-FDR) per study on active-CeD vs control; confirm canonical villous-axis markers rank with correct direction (quote actual q-values). Then meta_analysis (DerSimonian-Laird random-effects) to pool into celiac_meta_signature.csv (pooled log2FC, z, p, Q, I2, k). High-confidence signature = FDR<0.05 & |pooledFC|>=1 & concordant in >=k_min studies. Deliver per-study volcanoes, a cross-study concordance heatmap, and the meta volcano + forest for top villous-axis genes."
            },
            {
              "title": "Single-cell validation of the villous-destruction axis",
              "description": "Load a celiac duodenal scRNA-seq series; QC-filter, integrate (Harmony by subject), Leiden/UMAP, annotate epithelial/IEL/T/plasma compartments. Quantify composition shift (IEL expansion, enterocyte loss) active vs control (per-sample fractions, Mann-Whitney) and per-cell-type DE for the IL-15/NKG2D/IFN-γ nodes — pinpointing which compartment expresses each candidate target. Save slim h5ad checkpoint, UMAP/composition/dotplot figures, composition + cell-type-DE CSVs. Guardrail: IEL/granulocyte dropout in droplet data — absence of a cluster ≠ absence of the cell."
            },
            {
              "title": "Pathway, regulator & cytokine-axis enrichment",
              "description": "Enrichr (gseapy) on the up/down meta signature (GO_BP, Reactome, Hallmark) and TF libraries (ChEA/ENCODE/TRRUST) for upstream regulators; focus interpretation on the villous-destruction effector axis (IL-15→JAK/STAT, IFN-γ, NKG2D-MIC stress ligands, cytotoxic IEL programs). Deliver enrichment tables + a pathway/regulator figure highlighting the targetable effector nodes."
            },
            {
              "title": "Druggability with tolerability/modality scoring",
              "description": "Open Targets GraphQL per candidate (tractability, drugAndClinicalCandidates, subcellularLocations, targetClass) + FDA drug connector to find approved ORAL drugs already hitting each target or its pathway (e.g. oral JAK inhibitors on IL-15 downstream signaling). Composite score adds the tolerability axis: local/luminal actionability, oral-drug availability, repurposing precedent — alongside effect size, reproducibility, single-cell confirmation. Save celiac_target_druggability.csv with per-target modality flag and oral-repurposing candidate column; deliver a druggability figure with the modality axis visible."
            },
            {
              "title": "Consolidate into two ranked tiers + report",
              "description": "Assemble Tier-1 (repurposing-first: villous-axis targets with an approved oral/low-side-effect drug, for the diet-adherent accidental-exposure population) and Tier-2 (novel high-value biology incl. refractory-acceptable modalities), each row carrying mechanism rationale, expressing compartment, suggested modality, and tolerability score. Write celiac_omics_target_report.md with the patient-preference rationale up front, the presentation-vs-pathology and HLA-necessary-not-sufficient guardrails, honest limitations, and a summary dashboard figure. Save celiac_target_shortlist_tierA.csv / _tierB.csv."
            }
          ]
        }
      ],
      "id": "phase-0"
    }
  ],
  "desired_outputs": [
    "celiac_dataset_inventory.csv + landscape figure",
    "celiac_meta_signature.csv (cross-study active-CeD vs control mucosa)",
    "villous-destruction axis single-cell validation (IEL/IL-15/NKG2D) with figures",
    "celiac_target_druggability.csv with oral/repurposing + local-actionability scoring",
    "Tier-1 (repurposing-first, oral/low-side-effect villi protection) + Tier-2 (novel biology incl. refractory population) shortlists",
    "consolidated report with patient-preference/tolerability rationale and per-target suggested modality"
  ],
  "feasibility": {
    "rationale": "Celiac mucosal transcriptomics are well-represented in GEO (active vs GFD vs control duodenum), the villous-destruction immune axis is mechanistically defined (IL-15/IEL/NKG2D-MIC/IFN-γ), and Open Targets + an FDA drug connector let us score oral/repurposing potential directly. Main risks: dataset heterogeneity (biopsy site, Marsh grade, GFD status) and the usual scRNA-seq granulocyte/IEL dropout — handled by the pipeline's QC and marker-direction guardrails.",
    "confidence": "high"
  }
}