Review gate REJECT attempt 1/10: PR deletes 7 files (~1126 lines) belonging to the cross-disease analogy engine that was merged in PR #783 just before this task — including scidex/agora/cross_disease_analogy.py, the cron systemd unit + timer, the migration, the persona prompt, the runner script, and its merged spec — all of which still exist on main HEAD. This is a catastrophic API contract break (kills the /analogies endpoint and its cron job) and
Effort: extensive
Compose esm, alphafold-structure, and the new docking workflow
into a sequence-to-druggability pipeline that takes a UniProt
accession (or raw FASTA), runs ESM C embeddings to predict functional
sites, fetches or computes the AlphaFold structure, scores druggability
of detected pockets, and emits a structured "drug-target dossier"
artifact summarizing the protein's chances. Hands the top pocket off
to the docking workflow if druggability score crosses threshold.
Druggability assessment is a multi-step reasoning chain — sequence
features alone are weak, structure alone misses functional context,
and pocket detection without ligandability scoring is just geometry.
SciDEX has the components but no composer. A debate over "is <gene>
worth pursuing therapeutically?" today gets a vague answer; this
pipeline produces a numerical dossier (folded-confidence, n_pockets,
pocket_volume, druggability_z, solvent-exposed surface, predicted
allostery sites) that a Domain Expert can argue from concrete data.
scidex/forge/structural_biology.py (≤1000 LoC):sequence_features(uniprot_or_fasta) — uses esm ESM Cfetch_or_predict_structure(uniprot) — pulls AlphaFold modelscore_druggability(pdb_path) — runs fpocket for pocketvol0.045 + hydroph0.07 - polar*0.05), ranks pockets.dossier(uniprot) — composes; emits JSON dossier with thehandoff_to_docking(dossier) — if top_pocket_druggability >
0.7, calls docking_workflow.pipeline(gene) and links thetarget_dossier(dossier_id PRIMARY KEY, uniprot,tools.py registers target_dossier_pipeline(uniprot) with@log_tool_call.
/api/target-dossier/<uniprot> returns the dossier JSON./artifacts/<id> renders the dossier with a 3D pocket-dossier_block summarizingpython -m scidex.forge.structural_biologyinvestigate); if--auto-handoff set, kicks off a docking run.
tests/test_target_dossier.py — mock AlphaFold + fpocketdata/esm/<uniprot>.npy.
alphafold-structurecolabfold CLI on GPU.
scidex/forge/structural_biology.py.
artifact_kind='target_dossier' — registerq-devx-artifact-kind-scaffolder.esm, alphafold-structure skills.q-tool-drug-docking-workflow — handoff target.q-devx-artifact-kind-scaffolder (wave-3) — registers new kind.sequence_features, fetch_or_predict_structure, score_druggability, dossier, handoff_to_docking, get_recent_dossier. ESM-2 attention-based binding site detection with heuristic fallback. fpocket + Schmidtke sigmoid formula 1/(1+exp(-raw/30+1.5)) where raw = vol0.045 + hydroph0.07 - polar*0.05. Recommendation tiers: >0.7=high_priority, 0.4-0.7=investigate, 0.2-0.4=low_priority, <0.2=undruggable.recommendation CHECK IN (...) and 4 indexes.target_dossier_pipeline(uniprot) registered with @require_preregistration @log_tool_call.POST /api/target-dossier/{uniprot} (run + optional auto_handoff), GET /api/target-dossier/{uniprot} (fetch latest), GET /api/target-dossier (list with recommendation filter)._dossier_block injected into domain expert prompt alongside DepMap block — mirrors GTEx-injection pattern, builds from get_recent_dossier().{
"_gate_retry_count": 1,
"_gate_last_decision": "REJECT",
"_gate_last_reason": "PR deletes 7 files (~1126 lines) belonging to the cross-disease analogy engine that was merged in PR #783 just before this task \u2014 including scidex/agora/cross_disease_analogy.py, the cron systemd unit + timer, the migration, the persona prompt, the runner script, and its merged spec \u2014 all of which still exist on main HEAD. This is a catastrophic API contract break (kills the /analogies endpoint and its cron job) and erases another worker's recently-shipped feature. The structural biology pipelin",
"_gate_judge_used": "max_outlook1:claude-auto",
"_gate_last_instructions": "Restore scidex/agora/cross_disease_analogy.py (861 lines) from main HEAD \u2014 `git checkout origin/main -- scidex/agora/cross_disease_analogy.py`\nRestore migrations/cross_vertical_analogy.py (79 lines) from main HEAD\nRestore scripts/run_cross_disease_analogy.py (42 lines) from main HEAD\nRestore deploy/scidex-cross-disease-analogy.service and deploy/scidex-cross-disease-analogy.timer from main HEAD\nRestore scidex/agora/prompts/analogy_v1.md from main HEAD\nRestore docs/planning/specs/q-vert-cross-disease-analogy-engine_spec.md from main HEAD\nWhen restoring api.py, ensure the /analogies route from PR #783 is preserved alongside the new /api/target-dossier routes (the diff excerpt shows both routes were intended to coexist per the original conflict-resolution note)",
"_gate_branch": "orchestra/task/ce83d86a-structural-biology-pipeline-sequence-to",
"_gate_changed_files": [
".claude/skills/cardio-expert",
".claude/skills/cardio-skeptic",
".claude/skills/immunology-expert",
".claude/skills/immunology-skeptic",
".claude/skills/infectious-expert",
".claude/skills/infectious-skeptic",
".claude/skills/metabolic-expert",
".claude/skills/metabolic-skeptic",
".claude/skills/oncology-expert",
".claude/skills/oncology-skeptic",
".orchestra-slot.json",
"agent.py",
"api.py",
"api_routes/senate.py",
"deploy/scidex-cross-disease-analogy.service",
"deploy/scidex-cross-disease-analogy.timer",
"docs/planning/specs/q-sand-rate-limit-aware-tools_spec.md",
"docs/planning/specs/q-time-field-shift-detector_spec.md",
"docs/planning/specs/q-tool-structural-biology-pipeline_spec.md",
"docs/planning/specs/q-vert-cross-disease-analogy-engine_spec.md",
"docs/planning/specs/q-vert-vertical-personas-pack_spec.md",
"migrations/021_rate_buckets.py",
"migrations/20260427_debate_persona_assignment.sql",
"migrations/add_field_shift_tables.py",
"migrations/add_target_dossier_table.py",
"migrations/cross_vertical_analogy.py",
"personas/cardio-expert/SKILL.md",
"personas/cardio-skeptic/SKILL.md",
"personas/immunology-expert/SKILL.md",
"personas/immunology-skeptic/SKILL.md",
"personas/infectious-expert/SKILL.md",
"personas/infectious-skeptic/SKILL.md",
"personas/metabolic-expert/SKILL.md",
"personas/metabolic-skeptic/SKILL.md",
"personas/oncology-expert/SKILL.md",
"personas/oncology-skeptic/SKILL.md",
"scidex/agora/cross_disease_analogy.py",
"scidex/agora/prompts/analogy_v1.md",
"scidex/agora/vertical_persona_router.py",
"scidex/forge/rate_limiter.py",
"scidex/forge/rate_limits.yaml",
"scidex/forge/structural_biology.py",
"scidex/forge/tools.py",
"scidex/senate/field_shift_detector.py",
"scidex/senate/scheduled_tasks.py",
"scripts/run_cross_disease_analogy.py",
"tests/test_field_shift_detector.py",
"tests/test_target_dossier.py",
"tests/test_vertical_persona_routing.py"
],
"_gate_diff_stat": ".claude/skills/cardio-expert | 1 -\n .claude/skills/cardio-skeptic | 1 -\n .claude/skills/immunology-expert | 1 -\n .claude/skills/immunology-skeptic | 1 -\n .claude/skills/infectious-expert | 1 -\n .claude/skills/infectious-skeptic | 1 -\n .claude/skills/metabolic-expert | 1 -\n .claude/skills/metabolic-skeptic | 1 -\n .claude/skills/oncology-expert | 1 -\n .claude/skills/oncology-skeptic | 1 -\n .orchestra-slot.json | 2 +-\n agent.py | 21 +-\n api.py | 1606 ++++++++++++++++++--\n api_routes/senate.py | 42 -\n deploy/scidex-cross-disease-analogy.service | 14 -\n deploy/scidex-cross-disease-analogy.timer | 10 -\n .../specs/q-sand-rate-limit-aware-tools_spec.md | 32 -\n .../specs/q-time-field-shift-detector_spec.md | 16 -\n .../q-tool-structural-biology-pipeline_spec.md | 11 +\n .../q-vert-cross-disease-analogy-engine_spec.md | 49 -\n .../specs/q-vert-vertical-personas-pack_spec.md | 48 -\n migrations/021_rate_buckets.py | 35 -\n migrations/20260427_debate_persona_assignment.sql | 37 -\n migrations/add_field_shift_tables.py | 129 --\n migrations/add_target_dossier_table.py | 57 +\n migrations/cross_vertical_analogy.py | 79 -\n personas/cardio-expert/SKILL.md | 76 -\n personas/cardio-skeptic/SKILL.md | 74 -\n personas/immunology-expert/SKILL.md | 85 --\n personas/immunology-skeptic/SKILL.md | 90 --\n personas/infectious-expert/SKILL.md | 77 -\n personas/infectious-skeptic/SKILL.md | 86 --\n personas/metabolic-expe",
"_gate_history": [
{
"ts": "2026-04-27 17:14:47",
"decision": "REJECT",
"reason": "PR deletes 7 files (~1126 lines) belonging to the cross-disease analogy engine that was merged in PR #783 just before this task \u2014 including scidex/agora/cross_disease_analogy.py, the cron systemd unit + timer, the migration, the persona prompt, the runner script, and its merged spec \u2014 all of which still exist on main HEAD. This is a catastrophic API contract break (kills the /analogies endpoint and its cron job) and erases another worker's recently-shipped feature. The structural biology pipelin",
"instructions": "Restore scidex/agora/cross_disease_analogy.py (861 lines) from main HEAD \u2014 `git checkout origin/main -- scidex/agora/cross_disease_analogy.py`\nRestore migrations/cross_vertical_analogy.py (79 lines) from main HEAD\nRestore scripts/run_cross_disease_analogy.py (42 lines) from main HEAD\nRestore deploy/scidex-cross-disease-analogy.service and deploy/scidex-cross-disease-analogy.timer from main HEAD\nRestore scidex/agora/prompts/analogy_v1.md from main HEAD\nRestore docs/planning/specs/q-vert-cross-disease-analogy-engine_spec.md from main HEAD\nWhen restoring api.py, ensure the /analogies route from PR #783 is preserved alongside the new /api/target-dossier routes (the diff excerpt shows both routes were intended to coexist per the original conflict-resolution note)",
"judge_used": "max_outlook1:claude-auto",
"actor": "claude-auto:47",
"retry_count": 1
}
]
}