Well Reopening Scoring Schema And Worklist Design
Purpose
This document turns the reopening-target ranking logic into three concrete artifacts:
- an exact PostgreSQL scoring schema,
- a JSON output contract for ranked reopening targets,
- a UI design for the scientist and engineer worklist.
The goal is to separate:
- historic bypassed-pay discovery,
- remaining-payload assessment,
- actual reopening target selection.
Those are related, but they are not the same workflow.
Why A Separate Reopening Layer Is Needed
ops.well_bypassed_candidates is useful for interval discovery.
It is not enough for reopening decisions because reopening decisions require:
- dynamic depletion assessment,
- operability assessment,
- score breakdown transparency,
- ranking across many wells in one reservoir,
- gating by critical gaps and evidence completeness.
That is why reopening ranking belongs in a distinct layer.
High-Level Architecture
Scoring Model
The reopening score should be a weighted blend of:
static_scoredynamic_scoreoperability_scoreconfidence_score
Default weighting
\[
Score_{total} =
0.35(Score_{static}) +
0.30(Score_{dynamic}) +
0.20(Score_{operability}) +
0.15(Score_{confidence})
\]
Score intent
static_score
Measures original subsurface quality.
Inputs:
VshPHIERtSw- net pay
- gross thickness
- structural position
dynamic_score
Measures remaining payload likelihood now.
Inputs:
- cumulative production
- water cut trend
- pressure support or depletion
- offset drainage
- injector influence
- unswept potential
operability_score
Measures whether the well is practical to reopen.
Inputs:
- casing/integrity
- workover complexity
- completion readiness
- access
- cost risk
confidence_score
Measures whether the data is good enough to trust.
Inputs:
- log quality
- CRS confidence
- depth-reference confidence
- completion data completeness
- production/injection data completeness
- evidence pack completeness
PostgreSQL Scoring Schema
This design is implemented in:
db/migrations/versions/0018_reopening_target_scoring.py
1. ops.reopen_score_profiles
This stores reusable scoring profiles.
Purpose:
- keep weights versioned,
- keep Archie defaults explicit,
- keep gating rules auditable,
- let projects evolve scoring without changing code first.
Core columns:
scoring_profile_idproject_idprofile_keydisplay_nameweightsarchie_defaultsgating_rulesscoring_versionis_active
2. ops.well_reopening_targets
This is the new ranked worklist output table.
Purpose:
- one row per ranked reopening target,
- trace back to bypassed-pay candidate when available,
- expose score components and decision gates,
- support portfolio ranking and UI filtering.
Core columns:
reopening_target_idproject_idwell_idsource_candidate_idsource_interpretation_idscoring_profile_idtarget_rankstatic_scoredynamic_scoreoperability_scoreconfidence_scoretotal_scoreclassificationblocking_reasonrecommended_actionhistoric_payload_classremaining_payload_classdepletion_riskoperability_statusdata_confidencescore_inputsassumptions_jsonrw_valuerw_sourcea_factorm_exponentn_exponentsw_modelsw_confidenceevidence_pack_idscoring_version
3. ops.well_data_gaps extension
The migration also adds:
gap_domainpromotion_action
This is necessary because scoring must distinguish:
- non-blocking warnings,
- review holds,
- spatial-only quarantine,
- full decision-grade block.
Reopening Classification
Use the following operational classes:
A
- high-confidence reopening target
B
- review-worthy target with moderate uncertainty
C
- technically interesting but blocked by missing data
D
- historic payload only, likely depleted or operationally weak
Q
- quarantined
Gating Rules
No target should be promoted without gates.
Gate 1: technical minimum
Requires:
- resolvable well identity
- usable depth track
- required curves
- no critical unit conflict
Gate 2: spatial minimum
Requires:
- source CRS resolved
- vertical datum acceptable
- transform chain documented
Gate 3: decision-grade minimum
Requires:
- completion context adequate
- depletion context adequate
- operability not clearly blocked
- evidence pack complete
JSON Output Contract
The ranked reopening-target output contract is defined in:
contracts/events/well-reopening-target-ranked.schema.json
Output intent
This contract is designed for:
- portfolio summaries,
- UI worklists,
- downstream analytics,
- AI retrieval context.
Top-level fields
event_typeproject_idscoring_profile_keyscoring_versiongenerated_atcandidate_countsummarycandidates
Candidate-level fields
target_idrankwell_idsource_candidate_idclassificationhistoric_payload_classremaining_payload_classdepletion_riskoperability_statusdata_confidencestatic_scoredynamic_scoreoperability_scoreconfidence_scoretotal_scoreblocking_reasonrecommended_actionevidence_pack_idintervalarchie_assumptionsscore_inputsassumptions
Example output
{
"event_type": "welllog.reopening_target_ranked",
"project_id": "kern_reopen_demo",
"scoring_profile_key": "earthbond_reopen_v1",
"scoring_version": "earthbond.reopen.v1",
"generated_at": "2026-03-23T17:00:00Z",
"candidate_count": 2,
"summary": {
"class_counts": {
"A": 1,
"B": 1
},
"blocked_count": 0,
"review_ready_count": 2
},
"candidates": [
{
"target_id": "9a7e...",
"rank": 1,
"well_id": "0423000123",
"source_candidate_id": "dc91...",
"classification": "A",
"historic_payload_class": "strong_bypassed_pay",
"remaining_payload_class": "high_remaining_potential",
"depletion_risk": "moderate",
"operability_status": "workover_feasible",
"data_confidence": "high",
"static_score": 0.82,
"dynamic_score": 0.73,
"operability_score": 0.68,
"confidence_score": 0.88,
"total_score": 0.77,
"blocking_reason": null,
"recommended_action": "Prioritize cased-hole review and recompletion planning.",
"evidence_pack_id": "a2c1...",
"interval": {
"event_no": 3,
"top_tvdss_m": 2134.2,
"base_tvdss_m": 2142.8,
"gross_thickness_m": 8.6,
"net_thickness_m": 6.9
},
"archie_assumptions": {
"rw_value": 0.12,
"rw_source": "offset_analog",
"a_factor": 1.0,
"m_exponent": 2.0,
"n_exponent": 2.0,
"sw_model": "archie",
"sw_confidence": "medium"
},
"score_inputs": {
"vsh": 0.21,
"phie": 0.16,
"rt": 18.4,
"sw": 0.43,
"water_cut_trend": "stable",
"offset_drainage": "limited"
},
"assumptions": {
"trajectory_mode": "minimum_curvature",
"completion_context": "partial",
"pressure_data": "missing"
}
}
]
}
Relationship To Existing Bypassed-Pay Contract
The older contract:
contracts/events/well-bypassed-pay-ranked.schema.json
should remain the interval-discovery contract.
It is now hardened with:
recommended_actioncompletion_statusposition_confidence- cone radius outputs,
evidence_pack_idcutoffs_applied
Use the contracts like this:
- bypassed-pay contract = interval discovery output,
- reopening-target contract = portfolio decision output.
Worklist UI Design
The worklist should not be a raw table dump.
It should be a decision surface.
Page layout
Sticky summary header
Always visible while scrolling.
Contains:
- total targets
- count by class
A/B/C/D/Q - blocked count
- review-ready count
- active scoring profile
- last generated timestamp
Left filter rail
Filters should be explicit and domain-aware.
Required filters:
- project
- field / reservoir
- classification
- minimum total score
- maximum depletion risk
- operability status
- data confidence
- evidence completeness
- only wells with no critical spatial gaps
- only targets with recommended action available
Main ranked target table
One row per reopening target.
Columns:
- rank
- well id / well name
- class
- total score
- static score
- dynamic score
- operability score
- confidence score
- remaining payload class
- depletion risk
- operability status
- recommended action
- evidence status
Detail drawer
Opens when a row is selected.
Tabs:
Score BreakdownIntervalGapsEvidenceProduction / DepletionSpatial
Score Breakdown tab
Shows:
- four component bars
- weight profile
- formula version
- blocking reason if any
- assumptions
Interval tab
Shows:
- event number
- top/base depth
- top/base TVDSS
- net/gross
- Vsh
- PHIE
- Rt
- Sw and Archie assumptions
Gaps tab
Shows:
- structured gaps
- severity
- promotion action
- whether each gap blocks reopening or only blocks 3D/spatial publication
Evidence tab
Shows:
- evidence-pack link
- source files
- completion sources
- production sources
- transform provenance
Production / Depletion tab
Shows:
- cumulative production
- water cut trend
- offset drainage indicators
- injector proximity or sweep flags
Spatial tab
Shows:
- well location confidence
- CRS / vertical datum summary
- ECEF anchor status
- linked 2D/3D context panel
User Roles
viewer
Can:
- read ranked targets,
- filter,
- open details.
operator
Can:
- annotate,
- change review status,
- export selected target sets.
project_admin
Can:
- activate scoring profiles,
- rerun ranking,
- adjust project-scoped thresholds.
platform_admin
Can:
- modify canonical scoring profiles,
- change formula defaults,
- audit profile history.
Recommended Future API Endpoints
These are the natural next contracts to expose:
POST /well-logs/jobs/reopen-rankGET /projects/{project_id}/portfolio/reopening-targetsGET /projects/{project_id}/reopening-targets/{target_id}GET /projects/{project_id}/reopening-targets/export
Why This Design Is Safer
This design avoids a common mistake:
using one score to hide the reason a well is high or low priority.
By separating:
- static quality,
- remaining payload,
- operability,
- confidence,
the platform stays auditable and explainable.
That is mandatory if scientists and engineers are expected to trust the ranking.
Next Implementation Step
After this schema and contract layer, the next code work should be:
- add worker logic that writes
ops.well_reopening_targets, - expose portfolio read APIs,
- build the actual reopening worklist page against those APIs,
- add export and review-state actions.