Research + open reference implementation for Indian courts
Author: Advocate Adesh Kumar (Delhi High Court)
Email: adv.kumaradesh@gmail.com
Version: 1.1.0 (13 August 2026) — Quantitative Analysis release
Identify, sort, and notify criminal cases where an accused remains in jail for prolonged periods (≥ 2 years / ≥ 5 years), with stagnant or unstarted trial progress, and/or no High Court / Supreme Court listing — in a way that is explainable to a court, aligned with BNSS s.479 (successor to CrPC s.436A), and usable by UTRCs, jail superintendents, and court masters.
This repository is the public priority claim for the ULPS design. Cite it. Do not strip authorship.
India already has Article 21 speedy-trial law, BNSS s.479, Under Trial Review Committees (NALSA), and eCourts/CIS. What is missing in daily operations is a single transparent ranking algebra that surfaces liberty-critical files instead of burying them in ordinary cause lists.
ULPS rebuilds that mechanism as:
- A research paper (
docs/RESEARCH-PAPER.md) suitable for Zenodo deposit - A normative algorithm (
docs/ALGORITHM.md) - A small Python reference engine (
src/ulps) with tests and synthetic sample data
ULPS does not decide bail. It ranks and explains.
# from repo root
PYTHONPATH=src python3 -m ulps rank data/samples/undertrials.sample.json
PYTHONPATH=src python3 -m ulps analyze data/samples/undertrials.sample.json
PYTHONPATH=src python3 -m ulps analyze data/samples/undertrials.sample.json --json
python3 -m pytest tests/ -qSample output alerts include: RED-5Y, RED-2Y, STAT-479, NEAR-479, STAGNANT, NO-HCSC.
v1.1.0 Quantitative Analysis adds prevalence tables, custody percentiles, cohorts, dual-signal rates, and the Liberty Backlog Index (LBI). See docs/QUANTITATIVE-ANALYSIS.md.
| Path | Role |
|---|---|
docs/RESEARCH-PAPER.md |
Full research text (Zenodo-oriented) |
docs/ALGORITHM.md |
Normative scoring rules |
docs/QUANTITATIVE-ANALYSIS.md |
Prevalence, cohorts, Liberty Backlog Index |
docs/DATA-SCHEMA.md |
Court extract fields |
docs/ZENODO-DEPOSIT.md |
How to mint a DOI on zenodo.org |
CITATION.cff |
Citation metadata |
zenodo/metadata.json |
Zenodo deposition metadata draft |
| Code | Meaning |
|---|---|
| RED-5Y | Custody ≥ 5 years |
| RED-2Y | Custody ≥ 2 years |
| STAT-479 | BNSS s.479-style fractional threshold met (⅓ first offence / ½ general), if eligible |
| NEAR-479 | Within ~30 days of that threshold |
| STAGNANT | Trial not commenced, or no effective hearing ≥ 180 days while in custody |
| NO-HCSC | ≥ 2 years custody and no HC/SC case id / listing linked |
- Educational / access-to-justice research tooling.
- Not legal advice. Not solicitation.
- Production use must stay on authorised court/prison systems; do not publish real undertrial identities.
- Sample data in this repo is synthetic.
See CITATION.cff. After Zenodo DOI is minted, add it to the citation file and GitHub release notes.
Kumar, Adesh (2026). Undertrial Liberty Priority System (ULPS): A Court-Operable Algorithm
for Sorting and Notifying Prolonged Pre-Trial Detention Cases in Indian Courts. GitHub / Zenodo.
- Software (
src/): MIT License - Research text (
docs/): © 2026 Advocate Adesh Kumar — cite with attribution
Advocate Adesh Kumar · Delhi High Court · LL.M. (Cyber Law)
ORCID: 0009-0000-7383-1508
GitHub: @advkumaradesh