Just like cyborgs, Subroutines sole purpose is to assist the AI in any way possible. However, unlike cyborgs who assist the AI in interacting with the physical world, Subroutines are designed to assist AIs in the digital world. In real life, a sufficiently potent AI could be "everywhere at once" or in other words pay perfect attention to multiple tasks at a time. Since AIs in SS13 are played by people, that's not really possible and it often puts a lot of stress on AI players. This job helps remedy that.
How are Subroutines made?
Subroutines are pulled from the ghost pool from players who have it set in their preferences, exactly like PAIs. They are created from a new machine located in the R&D Server Room, known as the Bluespace Intelligence Generator, or B.I.G. and stored in data clusters also located in the Server Room. If the B.I.G. loses power or is destroyed, no new Subroutines can be made until it is repaired. If the data cluster holding the Subroutine is destroyed, the Subroutine is instantly killed. The B.I.G. will automatically generate a new Subroutine (selected from ghosted players) every 10-15ish minutes so long as there is an empty data cluster to store it in (Two start in the server room but more can be constructed).
What can a Subroutine do?
Subroutines act as "AI-Lite"s. Their sole purpose is to act as an extension of the AI players will. They have most of the same abilities as an AI, but also have many limitations.
When a Subroutine is made, it is immediately slaved to the AI with the least amount of Subroutines. The Subroutine and its AI master share the same silicon laws at all times, and their bond cannot be broken in any way. Initially, Subroutines are powerless to do anything, first its master AI must assign them to a department on the station. Once it is assigned to a department, the Subroutine essentially becomes the departments own personal AI. It can do almost anything the AI can, but only within the confines of its assigned department. In fact, they cannot see anything outside their assigned department.
A complete detailed list of their abilities/limitations is as follows:
As many AI players will tell you, having to watch over the entire station can be daunting. Subroutines allow the AI to assign other players to watch over areas of interest in its stead. They allow the AI to act faster in many situations (for example, assign a Subroutine to engineering to vent plasma while at the exact same time you are electrifying doors elsewhere) and allow departments to enjoy their own AI micromanaging their department (For example, a Subroutine assigned to Security could help update security records, release prisoners who have served their time, and ensure prisoners are not being harmed without having to worry about distractions from outside Security.)
I would also consider giving Subroutines abilities the AI does not have (temporarily boost effectiveness of machines?) but I think that can wait until later.