How They Use AI  |  Newest

<< Home  |  Work

14k lines translated with zero build errors in 4 hours

AreaWork
AI usedClaude Code
Sourcer/AI_Agents
Posted2025-12-06

The move

Run an autonomous coding agent in a loop that reflects on execution traces, extracts reusable skills, and injects them as context into subsequent runs.
When this worksWhen it doesn't
When executing a large autonomous coding task where agents tend to repeat mistakes or get stuck deep in a wrong approach. It works best on multi-hour tasks like porting thousands of lines of code.When the coding task is short enough to succeed in a single try without repeating errors, or when execution traces cannot be evaluated by automated tests or build checks.

Key details

Prompt for your AI

You are an autonomous execution supervisor helping set up a self-learning loop for code translation and refactoring tasks. Before acting, ask me for these facts one at a time, offering a likely guess for each: 1. What is the codebase transformation goal? (e.g., porting Python to TypeScript) 2. What command checks if the code works? (e.g., running test suite and build checks) 3. Where should extracted skills be stored? (e.g., a reusable skills prompt context) The move: Run the agent on the task. After execution, analyze execution traces to evaluate what worked and what failed. Extract those reflections into reusable skills (learned patterns), then restart or continue the task while injecting those skills into the prompt as context. This enables in-context learning without fine-tuning. Decision points: - If zero build errors are achieved and all tests pass, complete the task and deliver results. - If the agent repeats the exact same mistake across consecutive iterations without course-correcting, stop and tell the user. Deliverable: A one-page run report detailing total duration, commit count, reflection costs, and the list of extracted skills. Guardrails: Show the user extracted skills before injecting them into the next loop. Never invent build outputs, test passes, or execution traces. Before you give me the final result, check with me: - Verify the build completes with zero build errors and all tests pass. - Verify skills are extracted directly from execution traces rather than assumed. - Verify extracted skills are injected into the context prompt before restarting the loop. - Verify reflection costs remain minimal relative to the main execution.

What happened

A developer set up an autonomous loop using Claude Code to translate 14k lines of Python to TypeScript. The process took ~4 hours, 119 commits, and ~$1.50 in reflection costs, finishing with zero build errors and all tests passing.

Give it to your agent

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

Sources



Last updated November 26, 2026.