WayToClawEarn
High impactHacker News

I wrote 1,690 lines with AI in 7 months but rewrote: Why does AI write functions but not architecture?

A developer used Claude's full-time "atmosphere programming" for 7 months to build k10s, and finally discovered that the code produced by AI had serious architectural debt - 1,690 lines of code all in one structure. He decided to write it by hand from scratch. 1020 points HN hot post triggered in-depth reflection on AI programming model.

WayToClawEarn EditorialPublished May 17, 2026Updated Aug 8, 2026

Editorial review of public sources · AI-assisted drafting. How we work · Original source

Core conclusion

On May 17, a blog titled “I decided to go back to handwriting code” topped the Hot List on Hacker News (1020 points). The author spent 7 months with Claude full-time "vibe-coding" to build a GPU-aware Kubernetes dashboard k10s, and finally found that all 1690 lines of code were crammed into a "god object" structure - a 500-line Update method, countless nil cleanups and branch nesting.

The core problem is not that AI cannot write code well, but that AI is good at writing functions, but never designs architecture. This discovery sparked widespread discussion among the developer community.

Key Points

  • Time of incident: 2026-05-16 / HN hot discussion 2026-05-17 -Affected objects: All developers using AI programming tools (Claude Code, Codex, Cursor)
  • Core change: The community begins to realize the hidden costs of "atmosphere programming" - the faster functionality is delivered, the deeper the architectural debt accumulates

Background and trigger events

The starting point of this story is a developer named shvbsle. In September 2025, he decided to make a GPU-aware Kubernetes dashboard k10s (similar to k9s, but designed for NVIDIA clusters).

The first few weeks are the "magic moment": Use Claude's prompt "Add a Pod view with real-time updates" and it will take effect immediately. Resource list, namespace filtering, log streaming, Vim shortcut keys - the basic functions were completed in 3 weekends.

But problems started to emerge after adding the GPU fleet view. When he switches back to the Pod view, the table becomes blank and the live updates stop. Other views begin to show "ghost data" - the cache of the previous view pollutes the display of the current view.

After investigation, we found: All 1690 lines of code are in a structure. UI components, K8s clients, per-view state, navigation history, caching, mouse handling - all crammed into one God Object. The single Update method was 500 lines long, relying on switch-case and manual nil cleanup (he counted 9 handwritten m.logLines = nil) to maintain a semblance of normalcy.

Key Impact (by Dimension)

DimensionsChangeWhat it means to usRecommended actions
Code qualityAI-generated code lacks architectural designShort-term high productivity, long-term refactoring costs increase exponentiallyAdd architectural constraints to CLAUDE.md
Development speedExtremely fast in the first 3 weeks, but the growth rate returns to zero after the fourth monthSpeed comes from function accumulation, not design accumulationThe handwritten architecture skeleton is then filled in by AI
Maintenance cost9 manual nil cleanups, 500 lines of switch-caseMultiple modifications involved for each new viewImplement View trait isolation for each view
Human roleDeveloper degradation prompt word auditorLosing the sense of architectural control of the codeFull code review once a week

Adaptation suggestions

  1. Write the architecture first, then write the functions: Put the specific interface definition and ownership rules into CLAUDE.md so that AI can see it every time.
  2. Insist on view isolation: Each view implements an independent trait and prohibits direct access to state between views.
  3. Weekly Code Review: A complete architecture review every 7 days.
  4. Limit the scope of a single session: Close the session after each function is completed, and start the next one in a new context.

Go deeper: Why AI doesn’t write architecture

The large language model is a "cloze" machine, not a "system design" machine. When you say "add a GPU fleet view", what LLM sees is similar patterns in existing code → Copy → Adapt → Insert. It doesn't stop and think about "what kind of view abstraction layer does this code base need?"

The deep insight of this blog is this: AI can write large amounts of code that perfectly performs a single function, but it cannot foresee how the interactions between these functions will evolve into complex systems. This is not a problem that the prompt project can solve.

Tool entry

Claude Code, OpenAI, ChatGPT, DeepSeek, Cursor

— AI code god object

Reference link

Internal link guidance

View source →

Disclaimer: this site shares educational insights only, for inspiration and reference. No outcome guarantee; external execution and decisions are your own responsibility.