33 Slice Development Landscapes
Pipeline Slice: Therapeutic Development Programs and Landscapes
Section titled “Pipeline Slice: Therapeutic Development Programs and Landscapes”Status: CONVERGED CORE VERTICAL. Contextual program synthesis, state history, milestones, evidence drill-down, query models, contracts, checks, and database acceptance tests are implemented. Additional source families extend owner slices rather than changing this model. Denoising state: converged (noise -> rough -> sharp -> converged) Updated: 2026-07-23
Purpose
Section titled “Purpose”Model the therapeutic development story that ties drugs and regimens to diseases, patient contexts, trials, approvals, publications, organisations, targets, and technologies.
This slice answers:
What is being developed for whom, how far has it progressed, what is happening now, and what evidence supports that view?
It owns cross-slice synthesis. It does not take ownership away from the slices that produce trial, approval, publication, organisation, disease, or drug facts.
The Clean Mental Model
Section titled “The Clean Mental Model”therapy + disease -> development program -> one or more evidence-backed population contexts -> source-grounded milestones -> deterministic state over time -> queryable landscapesflowchart LR Therapy["Drug or regimen identity"] Disease["Disease identity"] Context["Patient / line / setting context"] Trials["Trial facts"] Approvals["Regulatory facts"] Publications["Reported outcomes and safety"] Organisations["Sponsors and temporal owners"] Program["Therapeutic Development Program"] Milestones["Program milestones"] State["Program state history"] Query["q_development_* and q_emerging_clinical_evidence"] Therapy --> Program Disease --> Program Context --> Program Trials --> Milestones Approvals --> Milestones Publications --> Milestones Organisations --> State Program --> Milestones --> State --> Query
Boundary Decisions
Section titled “Boundary Decisions”- Development state is contextual, not an attribute of drug identity. Pembrolizumab can be approved in one disease, active in Phase 2 in another, and stopped in a third.
- Clinical phase, clinical activity, and regulatory state are separate axes. Approval is not “Phase 5” or rank 100.
- Current state and historical maximum are separate facts. A terminated Phase 3 program can have no active Phase 3 trial while still retaining a maximum historical phase of 3.
- A landscape is a query projection, not a canonical entity. It groups programs by disease, target, technology, organisation, line, or state without minting a second truth model.
- Cross-slice synthesis consumes canonical assets, never
q_*. Query models remain terminal consumer surfaces. - Unknown context remains unknown. Missing treatment line, biomarker, setting, or phase is null/unknown, never silently defaulted.
- Time is explicit. Source-effective time and system-observed time are kept separate; state rows use validity intervals.
These decisions are recorded in adr/0008-development-state-is-contextual.md.
Legacy Intent and Corrections
Section titled “Legacy Intent and Corrections”Data Gov’s drug_development_programs views, development-phase analytics, TPP reporting specs, and Aero’s disease/drug/target/technology pages demonstrate a real product need: current development programs, historical progression, competitive landscapes, and emerging clinical data.
The legacy implementation accumulated incompatible meanings inside one ranking problem:
| Legacy behavior | Useful intent | Greenfield model |
|---|---|---|
| approval row assigned a rank above clinical phases | show marketed/approved maturity | regulatory_state, independent of phase |
| “current” views used active statuses plus a recent-completed time window | show present development activity | explicit normalized activity state and state_as_of |
| “all trials” views ranked highest phase ever | retain historical progress | maximum_historical_phase derived from accepted milestones |
| phase/status lived on the drug | show a compact drug summary | derive summaries from contextual programs; identity remains stable |
| missing line sometimes became 1L | keep rows filterable | null means unknown; source-backed lines only |
| approved contexts hid development rows | avoid duplicate display | keep regulatory and clinical facts together; deduplicate only at declared query grain |
| parent-drug and component rollups changed counting behavior | make landscapes readable | explicit therapy/regimen identity and declared deduplication key |
| publication and registry metrics were blended for reports | surface emerging evidence | preserve each source observation and expose selection/ranking separately |
Evidence: ../bioloupe-data-gov/db/views/drug_development_programs_v11.sql, ../bioloupe-data-gov/openspec/specs/development-phase-analytics/spec.md, ../bioloupe-data-gov/openspec/specs/tpp-reporting/spec.md, and Aero’s ../bioloupe-aero/apps/studio-server/src/entities/registry.ts.
Source Authority
Section titled “Source Authority”| Fact | Primary authority | Supporting evidence | Not sufficient alone |
|---|---|---|---|
| registered trial phase/status/dates/sponsor | trial registry snapshot | publication, sponsor announcement | news summary |
| regulatory approval/status/label | regulator product/decision record | label artifact, company filing | trial phase or press release |
| reported efficacy/safety result | exact publication, conference artifact, or registry result record | linked trial protocol | secondary news article |
| disease/population/line/setting | source protocol, label, publication, or guideline at the fact’s grain | accepted extraction and identity receipts | drug-level therapeutic-area tag |
| target/technology relation | target/technology spine evidence | trial/publication context | name similarity |
| sponsor/owner relationship | trial registry for sponsor role; organisation slice for temporal ownership | filing, deal evidence | current company name alone |
ClinicalTrials.gov explicitly models study phase and overall recruitment status as distinct protocol fields; the greenfield normalization preserves that distinction. See https://clinicaltrials.gov/data-api/about-api/study-data-structure and https://clinicaltrials.gov/policy/protocol-definitions.
Domain Model
Section titled “Domain Model”Durable nouns
Section titled “Durable nouns”| Noun | Grain | Meaning |
|---|---|---|
| Therapeutic Development Program | one resolved therapy + one resolved disease | The stable effort to develop a drug or regimen in a disease. Phase, status, sponsor, and approval are not part of its identity. |
| Program Context | one program + one evidence-supported population context | Optional patient segment, biomarkers, treatment line/range, setting, intent, and geography. A generic unknown context may exist until narrower evidence appears. |
| Program Evidence Link | one program context + one canonical source fact | Connects a trial, approval indication, publication observation, SOC assertion, or event to the context with a stated relation and acceptance receipt. |
| Program Milestone | one accepted source-grounded change | Trial start/status/phase observation, regulatory filing/decision, result disclosure, ownership event, or other typed milestone with effective and observed time. |
| Program State Interval | one program context + one validity interval | Deterministic interpretation of clinical activity, phase, regulatory state, and current relationships over [valid_from, valid_to). |
| Development Landscape | a query-time grouping of programs | A disease/target/technology/organisation/line/state projection. It is not stored as canonical identity. |
| Emerging Clinical Evidence Observation | one source-reported endpoint or safety statistic | Source-specific observation at trial, arm, population, endpoint, timepoint, and report grain. It is not a cross-source average. |
Identity and keys
Section titled “Identity and keys”development_program_keyidentifiestherapy_key + resolved_disease_keyusing a stable opaque key.therapy_keypoints to exactly oneresolved_drug_keyor oneregimen_key; monotherapy and regimen programs do not collapse.program_context_keyidentifies a stable context within a program. Context attributes are resolved through the disease/biomarker spine and evidence-backed treatment-line/setting vocabularies.- phase, status, approval, owner, sponsor, target, technology, and evidence source do not enter either identity key.
- a newly resolved narrow context creates or links a context; it does not silently rewrite the meaning of older evidence. Reviewed merge/split decisions preserve supersession history.
- aggregation declares its count key: program, program context, therapy, or trial. “Drug count” must not accidentally count one multi-target program several times.
State axes
Section titled “State axes”| Axis | Values / form | Derivation rule |
|---|---|---|
clinical_activity_state | active, halted, completed, stopped, unknown, no_trial_evidence | normalized from accepted trial status at state_as_of; source status remains separately available |
current_clinical_phase | normalized phase or null | highest phase among accepted active trial facts at state_as_of; no recent-completed heuristic |
latest_observed_phase | normalized phase or null | phase on the latest accepted phase-bearing milestone by effective time, with deterministic tie-break |
maximum_historical_phase | normalized phase or null | maximum phase ordinal across all accepted historical trial milestones |
regulatory_state | not_observed, filed, approved, conditional, rejected, withdrawn, suspended, unknown | accepted regulator milestones for the program context and region |
ownership_state | temporal organisation relationships | supplied by the organisation slice at state_as_of |
Combined phases remain source-faithful values (early_phase_1, phase_1, phase_1_2, phase_2, phase_2_3, phase_3, phase_4, not_applicable, unknown). A documented ordinal supports sorting and maximum-phase derivation; the ordinal does not turn regulatory approval into a phase.
ClinicalTrials.gov status normalization is explicit:
| Source overall status | Program activity bucket |
|---|---|
NOT_YET_RECRUITING, RECRUITING, ENROLLING_BY_INVITATION, ACTIVE_NOT_RECRUITING | active |
SUSPENDED | halted |
COMPLETED | completed |
TERMINATED, WITHDRAWN | stopped |
UNKNOWN or unmapped source value | unknown |
At program-context grain, precedence is active -> halted -> completed -> stopped -> unknown; no_trial_evidence applies only when no accepted trial-status fact exists. Every source status remains queryable, so the summary bucket never erases mixed trial histories.
Temporal contract
Section titled “Temporal contract”Every milestone and derived state carries:
effective_ator a bounded effective date when the source says the event happened;observed_atwhen Bioloupe captured it;source_release_or_snapshot;valid_fromandvalid_toon derived state intervals;derivation_revisionandprovenance_key.
Corrections append new evidence or decisions and supersede old interpretations. They do not mutate historical source observations.
The physical state-history table uses a half-open tstzrange ([valid_from, valid_to)) and a GiST exclusion constraint over program_context_key + derivation_revision + validity_range to reject overlapping intervals. PostgreSQL range and exclusion constraints are designed for exactly this non-overlap invariant: https://www.postgresql.org/docs/current/rangetypes.html.
Canonical Assets
Section titled “Canonical Assets”| Asset | Grain | Inputs |
|---|---|---|
canonical.development_programs | one program | drug/regimen + disease identities |
canonical.development_program_contexts | one program context | resolved segment/biomarker/line/setting claims |
canonical.development_program_evidence | one accepted evidence relation | canonical trial, approval, publication, SOC, news-event, and organisation facts |
canonical.development_program_milestones | one typed milestone | accepted evidence links with effective time |
canonical.development_program_state_history | one validity interval | deterministic fold over ordered milestones and temporal relationships |
The state-history asset may be recomputed under a new derivation_revision; milestones remain stable evidence. This makes fixes replayable without provider calls when no extraction contract changed.
Query Models
Section titled “Query Models”q_development_programs
Section titled “q_development_programs”| Contract field | Required meaning |
|---|---|
| Purpose | Current, filterable development state for each evidence-backed program context. |
| Grain | One program_context_key at the latest published state_as_of. |
| Stable row key | program_context_key. |
| Identity columns | development_program_key, program_context_key, therapy_key, therapy_kind, resolved_drug_key, regimen_key, resolved_disease_key, segment_key, resolved_biomarker_keys, treatment_line_min, treatment_line_max, setting. |
| State columns | clinical_activity_state, source_trial_statuses, current_clinical_phase, latest_observed_phase, maximum_historical_phase, regulatory_states_by_region, state_as_of. |
| Relationship columns | active/supporting trial keys, approval indication keys, current sponsor keys, current owner keys, target keys, technology keys. |
| Evidence columns | first_evidence_at, latest_evidence_at, milestone_count, provenance_key, derivation_revision. |
| Search/indexes | btree/composite filters for disease + phase + activity, target, technology, organisation, line, and regulatory state; GIN for key arrays. |
| Provenance | bundle; each derived state expands to the milestones and owner-spine facts used. |
No global drug_status field substitutes for this model.
q_development_program_state_history
Section titled “q_development_program_state_history”One row per program context and validity interval. Required columns include all state axes, valid_from, valid_to, state_as_of, derivation_revision, changed field names, causing milestone keys, and provenance_key. This is the authoritative SQL surface for “what did we know then?” and state-diff questions.
q_development_program_milestones
Section titled “q_development_program_milestones”One row per accepted milestone. Required columns include milestone key/type, program/context keys, source fact kind/key, normalized and source-native phase/status/regulatory values, effective/observed time, region, relationship roles, assertion state, and provenance key.
q_development_program_evidence
Section titled “q_development_program_evidence”One row per accepted program-context-to-evidence relation. It supports drill-down without forcing consumers to infer links from denormalized arrays. Required columns include program/context keys, evidence kind/key, relation type, source family, effective/observed time, acceptance decision, and provenance key.
q_emerging_clinical_evidence
Section titled “q_emerging_clinical_evidence”One row per source-reported efficacy or safety observation linked to a program context.
Required dimensions:
- source type and exact source fact key;
- trial, program, program context, therapy, and disease keys;
- arm/result-group key and label;
- analysis population and cohort text/keys;
- endpoint or adverse-event key, source term, statistic kind, value, unit, denominator, grade, timepoint, and analysis method where applicable;
- treatment intent, line, setting, target, technology, and organisation keys when source-backed;
- report/effective/observed dates, evidence coverage, assertion state, and provenance key.
Registry and publication observations remain separate rows. A later evidence-selection policy may identify a preferred observation for a specific use case, but must record the policy/revision and never overwrite the source rows.
Why there is no q_competitive_landscape_counts
Section titled “Why there is no q_competitive_landscape_counts”The first contract keeps landscapes composable: consumers aggregate q_development_programs using an explicit count key and drill through to milestones/evidence. A pre-aggregated model is justified only by measured query cost or a stable consumer contract, and must reconcile exactly to the base rows.
Inference and Deterministic Compute
Section titled “Inference and Deterministic Compute”Deterministic logic owns:
- source status and phase normalization;
- phase ordinals and state folding;
- effective/observed time ordering;
- current, latest, and maximum-phase derivation;
- owner-spine joins, deduplication, and query aggregation;
- referential, temporal, and provenance checks.
Inference may help extract:
- unstructured population/line/setting context;
- investigational regimen components from prose;
- publication arm/population/endpoint observations;
- relationship/event candidates from documents.
Inference output follows 06-llm-extraction-and-verification.md: immutable request/attempt/result records, deterministic validation, explicit acceptance, source locators, and quarantine. A model does not decide current phase, approval status, or canonical identity by intuition.
Curation Subjects
Section titled “Curation Subjects”Reviewed overlays may:
- merge or split development programs/contexts;
- correct a program-evidence link;
- resolve ambiguous line, segment, setting, or regimen context;
- suppress an unsupported milestone;
- correct an ownership relationship through the organisation owner;
- select preferred evidence for a declared reporting purpose.
Curation does not edit source facts, invent missing phases, or turn a news claim into regulatory truth.
Blocking Checks
Section titled “Blocking Checks”schema_contractandprovenance_coverageon every query model;referential_integrityfor every drug/regimen, disease, biomarker, trial, approval, organisation, target, technology, endpoint, and adverse-event key;source_authorityfor phase, trial status, regulatory state, and outcomes;temporal_validityfor milestone ordering and non-overlapping state intervals;development_program_semantics, a slice-owned gate suite that verifies:- one program at therapy + disease grain and one stable program-context interpretation;
- no silent context mutation;
- regulatory state never enters clinical phase or its ordinal;
- current phase comes from active trials only;
- maximum historical phase reconciles to accepted milestones;
- unknown treatment line remains unknown;
- grouped landscapes reconcile to the declared distinct count key;
- emerging evidence never collapses source, arm, population, endpoint, or timepoint grains.
Acceptance Scenarios
Section titled “Acceptance Scenarios”| Scenario | Expected result |
|---|---|
| terminated Phase 3 plus active Phase 2 trial | current phase 2; maximum historical phase 3; activity active |
| approved indication plus active Phase 2 expansion study | regulatory state approved; current phase 2; neither overwrites the other |
| terminated-only Phase 3 program | current phase null; activity stopped; maximum historical phase 3 |
| completed Phase 3 five years ago, no active trial | no arbitrary “current” status from a recency window; latest/max phase remain inspectable |
| missing treatment line | line fields remain null; the row is filterable as unknown, not 1L |
| same drug in two diseases | two programs with independent state and evidence |
| same drug as monotherapy and combination | distinct therapy/program identities |
| one program linked to two targets | disease program count remains one when count key is program; target drill-down shows both links |
| publication and registry report different ORR values | two source-specific observations with separate arm/population/timepoint/provenance; no silent average |
| source correction arrives late | observed time shows late capture; effective time places the milestone correctly; state history is replayed under a new derivation revision |
Operations and Replay
Section titled “Operations and Replay”- source partitions follow their owner slices; this synthesis does not refetch upstream systems;
- a changed accepted milestone or identity/curation decision targets affected program contexts;
- state derivation is deterministic and replayable from persisted canonical inputs;
- target publication generations keep the previous good query state when blocking checks fail; current in-place query publication does not yet provide this guarantee;
- materialization metadata reports changed programs, inserted/superseded intervals, unresolved contexts, and landscape reconciliation counts.
Implementation Map
Section titled “Implementation Map”| Responsibility | Implementation owner |
|---|---|
| Deterministic canonical rebuild | defs/canonical/development.py and sql/canonical/development/ |
| Agent-facing read models | defs/query/development.py and sql/query/development/ |
| Query contracts and blocking checks | lib/checks/contracts_schema/development__*.yaml and defs/query/development.py |
| Temporal/domain acceptance tests | tests/test_slice_development.py |
The canonical asset consumes accepted owner-slice facts and performs no network or provider calls. Replaying a derivation or fixing state logic is therefore free once the source evidence is stored. The implemented first vertical synthesizes the trial, approval, publication, organisation, and identity facts currently published by those owners; adding richer publication outcomes or new registries belongs in those slices, not in a second development model.
References
Section titled “References”- ClinicalTrials.gov study structure: https://clinicaltrials.gov/data-api/about-api/study-data-structure
- ClinicalTrials.gov protocol definitions: https://clinicaltrials.gov/policy/protocol-definitions
- FDA Drugs@FDA: https://www.fda.gov/drugs/drug-approvals-and-databases/about-drugsfda
- FDA Drugs@FDA data files: https://www.fda.gov/drugs/drug-approvals-and-databases/drugsfda-data-files
- Legacy product intent:
../bioloupe-data-gov/openspec/specs/development-phase-analytics/spec.md,../bioloupe-data-gov/openspec/specs/tpp-reporting/spec.md, and../bioloupe-data-gov/db/views/drug_development_programs_v11.sql