devensor.dev

Technology for public defense management

Completivos

An internal management system for the Public Defender's Office's Institutional Affairs department, with an active search for who can take each substitution and accumulation.

The problem

In the Institutional Affairs department, the routines around substitutions and accumulations were done by hand, or in spreadsheets.

What was built

A system that supports the department’s workflows around substitutions and accumulations. It automated the whole routine of the department, and it is where we keep putting every productivity gain in its office work.

It is also useful for reports, giving an overall picture of substitutions and accumulations, and we use it to keep track of distances, always looking to keep public spending down.

The system tracks the service record of 450 defenders in their accumulations and substitutions, cross-checked with holidays and leave. A finance module checks whether the cap has been reached, reversals, and the knock-on effect on time off in lieu, in the cases the rules provide for.

The best feature is the active search for defenders who could take a given substitution or accumulation, based on a score that predicts who is most likely to want it: because they will be available, because they will have no other accumulation or substitution in the same period, or because of the extra pay. The score also aims to cut public travel costs.

The system has an AI assistant called Reginaldo, which users can talk to and ask questions in a more natural way. Reginaldo points to the links and gives the answers asked for. The system does the maths; Reginaldo only explains.

Completivos also provides an API with the defenders’ seniority and manages the substitution and accumulation tables, which it also serves through an API to other systems, such as PowerToys. In the Defensoria, the “tabelar” is whoever is bound by the rules to stand in for an office, or to act when it has a conflict of interest.

How it was built

The system runs inside the Defensoria’s own infrastructure. It reads the official records linking defenders to their offices, and the HR system’s records, to see holidays, leave and other events.

Current state

Today the systems unit maintains Completivos’s infrastructure, but I do all the development, along with testing and deployment, since the system is still constantly gaining features and settling its purpose. As soon as the pace of change settles, the plan is to hand it over to the portfolio of the IT Directorate’s information systems unit (DTI-USI).