# Rehabilitation — the post-arrest loop, wired *The warden work that finally drives discipline, reform, and parole. Source in `Source/Justice/Corrections/`.* Classification, discipline, deterrence, and parole always had their **maths** — a grade over the record, a reform score punishment moves, an order climate, a release decision. What they lacked was a **trigger**: nothing in play called them. Reform never moved, so classification never re-graded and parole never fired; the only thing that raised the colony's order was a punishment nothing invoked. The post-arrest half of the loop was real code with no way to run it. Rehabilitation is that trigger. It gives corrections the same treatment Ward gave psychiatric care — a **prisoner interaction mode**, **warden jobs**, an **alert**, and an inspect readout — so a warden actually reforms a prisoner over time and paroles them when they have turned a corner. --- ## The two modes Both are non-exclusive prisoner interaction modes (the shape Prison Labor and Ward use), so they stack with each other and with recruit / reduce-resistance. | Mode | What a warden does | Result | |---|---|---| | **Rehabilitate** | Runs counselling sessions on the prisoner | Reform rises, the reform track fills, colony order rises | | **Parole when reformed** | Releases the prisoner **once they are eligible** | A paroled colonist, back in the colony | Set **Rehabilitate** alone to run the programme and parole by hand when the alert fires; set **both** for a hands-off "reform, then release" pipeline. A prisoner flagged for parole who is *not yet* eligible is simply not acted on — the warden waits. --- ## A rehabilitation session A warden walks to the prisoner and counsels them for ~1250 ticks (about 20 in-game minutes), Social being the active skill. On completion (never on interruption — the credit is a follow-on toil), one session does three things, in `CorrectionsUtility.RunReformSession`: 1. **Corrective discipline** — `Discipline.Punish(prisoner, harsh: false)`: reform **+0.10**, and the punishment is recorded, which raises the colony's **order** by `+0.12`. This is the deterrence-up half that punishment alone never triggered — visible corrective justice deters everyone else. 2. **The reform track** — `TreatmentProgram.AdvanceRecovery` advances `Institution_Reforming` on Core's shared treatment engine, by `0.34 × cell quality × skill`. It is the visible progress bar, and it **decays** (`−0.08/day`), so rehabilitation has to be *sustained*. 3. **A memory** — the prisoner feels counselled (a small mood lift). | Input | Range | Source | |---|---|---| | skill factor | `0.5 … 1.0` | warden's Social level | | cell quality | `0.5 … 1.5` | `TreatmentProgram.FacilityQuality` (room impressiveness) | | reform / session | `+0.10` | `Discipline.Punish` (fixed) | | order / session | `+0.12` | `Justice.RecordPunishment` | Reform reaches the parole bar (`≥ 0.30`) in roughly **three completed sessions**, faster than a bad cell or a poor counsellor fills the visible track — so the "Ready for parole" alert keys off the real gate (`Parole.CanRelease`), not the bar. --- ## Neglect — the teeth A prisoner you flag for rehabilitation and then never attend **hardens**, exactly as a ward you don't staff does. `MapComponent_ReformNeglect` measures the days since the last real session; past **two days** of neglect, reform falls `−0.15/day` and they resent it (a mood hit). The hardening lowers reform *directly*, not through `Discipline.Punish` — neglect is passive prisonization, not an act of visible justice, so unlike a session it must **not** raise the colony's order. Attend the prisoner and the clock resets; flag them and walk away and they slide back toward the record that put them in. "A reform programme you don't staff is worse than none." --- ## Parole — the release that stays When a rehabilitated prisoner clears `Parole.CanRelease` — reform `≥ 0.30`, security grade `≤ Medium`, not already pardoned — the **Ready for parole** alert names them. A warden set to Parole then processes the release (`CorrectionsUtility.ReleaseOnParole`): - marks the **pardon** on the record; - clears the prisoner hold so a former colonist is a **free colonist again** — a parolee who *stays* in the colony carrying their record, not vanilla's release that ejects them from the map; - a grateful memory, and a small **+0.03** to order (a lawful release is visible justice too). The parolee keeps their `CriminalRecord`, so if they reoffend the [policing](Policing.md) loop catches them again — recidivism, closing back onto the start. --- ## Discipline — the other lever Rehabilitation is the carrot; **discipline** is the stick, and its opposite. Set a prisoner to **Discipline** and a warden puts them in **solitary**: harsh discipline (`Discipline.Punish`) *hardens* them — reform falls — yet raises the colony's order (visible harsh justice deters the rest), and it stings: a mood hit and an on-edge *in solitary* status. It fires at most once per term (the status gates re-discipline for about two days), so it holds order without cratering reform in a single day. The tension is the point: lean on discipline to keep order and you make the punished harder to reform. ## Classification enforcement Classification always computed a **security grade** (`Minimum`..`Supermax`); now it is actionable: - **The grade shows** on every prisoner's inspect pane — the game tells you who is dangerous instead of leaving you to guess. - A **"Dangerous prisoner unsecured" alert** fires when a Maximum/Supermax pawn is held in the open or sharing a cell — the misplacement flag, without a wing-grading UI. It clears once they have a secure, solo cell. - **Cell safety:** a prisoner caged with a dangerous one suffers a mood penalty. Segregate your dangerous prisoners, or their cellmates pay for it — the grade made to matter on the *housing* side, not only at parole. ## Regime — yard, lockup, and visitors Beyond punishment and reform, the held have a **daily life**: - **Yard / Lockup schedule.** Two timetable blocks set a held pawn's day: **Yard** allows recreation (with the prisoner Joy need Regime enables, they head out to a rec area), **Lockup** confines them to the cell and stews their mood. The timetable itself is **Prison Labor's** — this reads it when PL is present and is inert without it, so PL stays compatible: read, never fought. - **Visitors.** A prisoner or ward patient with family or a bond gets **visitors** — a friendly party walks in under the game's own visitor AI and congregates by their cell, and the break from isolation lifts their mood. Thematically strongest for a ward patient whose family comes to see them. --- ## Seeing it Every colony prisoner's inspect pane now carries the corrections readout (a Harmony postfix on `Pawn.GetInspectString`, via Justice's existing Regime patch — not a contested method): > *Security grade: Maximum* · *In solitary* · *Rehabilitation: reforming (40%) — neglected (3d)* · > *reformed — ready for parole* The **grade** shows for every held pawn (classification's information pillar); *in solitary* while a discipline term runs; the **rehabilitation** line for a pawn set to reform. And because the colony's **order climate** otherwise has no readout at all, the same pane surfaces it when it is far enough from ordinary to matter — *Colony order: low (28%) — crime pays here* / *high (71%) — order holds*. --- ## What this closes With rehabilitation wired, the whole post-arrest arc runs in play: **discipline** moves reform, **classification** re-grades as reform rises, **deterrence** climbs on visible justice (not just falls on crime), **parole** releases the reformed, and Core's **treatment engine** carries the reform track the same way it carries Ward's recovery. The loop closes back onto disposition — catching, reforming, and releasing one pawn moves the climate every other pawn is judged against. Gated by `InstitutionSettings.justice`, like the rest of the corrections layer. --- *Part of the **Institution** suite. AI disclosure: developed with substantial assistance from Claude (Anthropic).*