Well, there's noting in the rules about adding new programs to an AIs codebase. It's one of the many omissions.
The AI rules are pretty half-baked. Runner's Companion is a book full of holes.
As a GM, how would I handle it? Maybe like Initiation or Submersion. As if it were a major event which changes the fundamental nature of the character (and costs 15 karma...) Consuming and digesting some sort of code such that it becomes a part of who and what the AI is? That's pretty intense. Also, I would allow software options at, say 5 karma per level of the option, so getting biofeedback rating 3 on your inherent attack costs 15 karma. Finally, I wouldn't allow any programs that are capped by their nature (like available as 1-4 only,) such as Tacnet and Autosofts, or unrated programs like Negator. Those programs have goofy rules, so they don't fit with the rest of the pack.