logoalt Hacker News

vova_hn2 • today at 10:30 AM • 0 replies • view on HN

> But I want to continue to understand the code.

You don't have to throw away the original Python codebase.

You can have:

1. An implementation in slow language (i. e. Python) that you maintain manually or semi-manually (with minimal AI assistance) and understand well.

2. A fast implementation that is fully generated and maintained by AI, using slow implementation (1) as a reference.

You can, for example, run two "adversarial" agents, one writes tests that compare output of (1) and (2) and tries to find a discrepancy, the other tries to fix (2) so that its output never differs from (1).

This way, you can be reasonably confident that (2) does exactly the same thing as (1), despite being a blackbox that you don't understand. While (1) remains a reference implementation that you understand well and can work with.