How They Use AI  |  Newest

<< Home  |  Work

14k lines of Python translated with zero errors

AreaWork
AI usedCustom AI agent
Sourcer/ArtificialInteligence
Posted2025-12-06

The move

Create a self-improving loop where the agent reflects on its output, extracts successful patterns, and injects them back into the next iteration.

Steps

  1. Define a clear coding task with a comprehensive test suite.
  2. Build a script that runs the agent and captures its output.
  3. Implement a reflection step where the agent analyzes its own errors and successes.
  4. Store the successful patterns as 'skills' in a persistent file.
  5. Restart the agent with the updated skill set injected into the prompt.

Prompt for your AI

You are a coding agent. Your task is to [insert task]. After each attempt, analyze your output for errors and identify what worked. Save these successful strategies as 'skills' and use them to inform your next attempt. Continue this loop until [insert success criteria].

What happened

The user wanted to test if an AI could complete a large coding task without human intervention. They built a loop where the agent reflects on its progress and saves successful strategies to improve subsequent attempts. After 4 hours of unsupervised execution, the agent successfully translated 14,000 lines of Python to TypeScript with zero build errors.

Watch out

The agent may enter an infinite loop if the reflection logic is flawed. Large-scale automated tasks can consume significant API credits if not monitored.

Give it to your agent

Read https://howtheyuse.ai/p/14k-lines-of-python-translated-with-zero-errors.md and help me do this.

Sources



Last updated November 26, 2026.