Prevent cognitive debt by manually retyping LLM-generated code
TL;DR Highlight
Blocking agent file edits and retyping code by hand improved one dev's understanding, at about 2x speed.
Who Should Read
A solo developer uneasy because code from coding assistants has left them not knowing what lives where in their own project
Core Mechanics
- Make the agent show edits only in chat
- The agents file forbids creating, editing, moving, renaming or deleting files unless asked.
- Proposed edits appear in chat and the author types them in.
- Run state-changing commands yourself
- Commands that install dependencies or change repo state are shown in chat instead.
- The author runs them manually.
- About 2x faster, not 10x
- The author says this is faster than using no LLM.
- It is slower than letting the machine do everything.
- Typing surfaces hallucinations and bad design
- Slowing down makes errors more likely to be noticed.
- The author also refactors and comments while typing.
- You get a spatial map of the codebase
- The author knows where each piece of functionality lives.
- This also helps with prompting the LLM better later.
- Reviewing AI PRs is no fun
- The author dislikes reading hundreds of overly defensive, subtly incorrect lines.
- Personal projects should be fun in the process, not just the outcome.
Community Reactions
- Where are the efficiency gains?
- One commenter asked why not drop the LLM if you think, read, retype and fix anyway.
- Another said retyping to understand makes you a code monkey.
- Only self-written code builds the skill
- One commenter said retyping is a no, but typing your own code is a yes.
- They described learning Ruby and Go by retyping others' example solutions.
- Experience retyping code
- One commenter retyped an inherited codebase and fixed many bugs while becoming an expert quickly.
- Another used this approach, then stopped and blogged about it.
- Rethink the understanding level
- One commenter reviews AI code like a teammate's and accepts, edits or requests revisions.
- Another suggested managing LLMs as agents, like a manager who doesn't know every line.
How to Apply
- Add the no-edit rules to your agents file
- Today, paste the author's three instructions into AGENTS.md or CLAUDE.md in a personal project.
- Ask for one small feature and type the code from chat yourself.
- Ask about unfamiliar APIs while typing
- Stop when an API or algorithm is unclear and ask the LLM to explain it.
- Rename and restructure to your taste as you type.
- Scope where you use this
- Use it for personal projects or core modules you must understand.
- Keep your normal review flow for simple parts and compare the speed cost.
Try It
# Paste into AGENTS.md / CLAUDE.md for Claude Code etc. (the author's instructions)
I want to understand every line of code that goes into this project. Never create, edit, move, rename, or delete project files unless I explicitly ask you to do so. Instead, show me every proposed edit in the chat so I can type it in manually.
Do not run commands that modify project files, install dependencies, or change repository state unless I explicitly request that action. Instead, show me those commands in the chat so I can run them manually.
I'm an experienced developer. Do not explain syntax, APIs, programming concepts, or implementation details unless explicitly asked.
# Next: ask "Show me the code to add {{feature}}" and type it in yourselfTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques
Related Resources
- https://ankursethi.com/blog/prevent-cognitive-debt-by-manually-retyping-llm-generated-code/
- https://arxiv.org/pdf/2509.21972v1
- http://rubyquiz.com/
- https://quii.gitbook.io/learn-go-with-tests
- https://kamens.com/blog/code-with-ai-the-hard-way
- https://kamens.com/blog/code-with-ai-the-hard-way-update
- https://kamens.com/blog/code-with-ai-the-hard-way-update-ii
- https://smalldocs.org
- https://github.com/espressoplease/smalldocs