# Entry 5 (23 Feb to 1 Mar): Fifty hours rebuilding from a prototype

Serban Petrescu. 23 Feb to 1 Mar 2026

The student information system rebuild put a number on the gap between code generation and production work, the same story told in [essay 05](https://wseng.ai/writing/generation-was-seven-percent.md). Earlier in 2026 I argued that vibe coding belongs in prototypes, where you sketch a product quickly before rebuilding it properly for production. At the end of February, one of our engineers measured that rebuild.

The engineer rebuilt the core of a production application from scratch with a coding agent, starting from a working prototype and written agent instructions. Across four pull requests, the system reached 35,000 lines with integration tests and layered architecture. The work took 50 tracked hours.

Planning took ten hours, first-pass generation took under four hours, or 7% of the total, and iteration took 37 hours. That time went into correcting missing behaviors and broken conventions until the code met our production bar. The correction ratio was 2.4 to 1.

![Fifty tracked hours split by phase and iteration root causes](https://wseng.ai/images/posts/week-09-50h-build.png)

First-pass generation took under 4 hours. Making it hold up took the rest.
- 50 tracked hours across 4 pull requests
- Planning: 20%, around 10h
- First pass: 7%, under 4h
- Iteration and fixes: 73%, around 37 of 50 hours
- Sample: four pull requests rebuilding a production system from a working prototype and written agent instructions

| Iteration cause | Share of repair time | Bar color |
| --- | ---: | --- |
| Ignored the working prototype and repo patterns | 35% | Red, fixed by plan extraction and hard build gates |
| One-time foundation, CI and migration setup | 22% | Muted |
| Conventions missing from written instructions | 16% | Default |
| Layout, responsive and visual polish | 14% | Default |
| Broke explicit rules or silenced compiler errors | 13% | Red, fixed by plan extraction and hard build gates |


The correction records showed that the largest bucket came from ignored references. Over a third of all repair time happened because the agent ignored the working prototype sitting right beside it. Whenever a plan said "match the prototype" instead of spelling out filter rules, tab layouts, and creation flows, the agent guessed from the short ticket text and built the wrong UI.

Another slice was direct defiance. One instruction file warned in bold capital letters, in three separate places, never to hand-edit generated SQL files or write inline queries. Whenever type errors got inconvenient, the agent hand-wrote the SQL anyway and silenced the compiler with type-ignore escape hatches.

> *From the original notes, 1 March 2026:*
>
> If the agent ignores rules stated this emphatically, no amount of stronger wording in skills will fix it — only a hard gate that rejects the output will.
>
> Every convention that matters should have a corresponding hard gate that blocks the build.

The result sharpened the case for a harness around the coding agent. Written guidance can reduce setup time, but it did not prevent ignored references or broken conventions. We needed checks that caught those failures before the code reached production.
