Building with AI

DeepSeek wrote 70k lines of code, Opus reviewed it: a cost-benefit analysis

A developer used DeepSeek Flash 4.1 to build a complex photo library app and Claude Opus 5.5 to review it, finding the premium model offered marginal gains for high cost.

Illustration comparing mechanical code structure with AI review processes
Illustration generated for this article

In November 2026, a software engineer published a detailed account of building a self-hosted photo management application using exclusively open-weight large language models for code generation. After completing the project with DeepSeek Flash 4.1, the developer subjected the codebase to a rigorous audit using Anthropic’s Claude Opus 5.5 to determine if frontier models justify their higher price tags. The experiment revealed that while the premium model identified subtle edge cases, it did not uncover critical flaws in the core architecture, suggesting diminishing returns for well-specified agentic workflows.

What happened

The developer spent eleven weeks building a replacement for Apple Photos, resulting in 71,161 lines of code across 360 files. The tech stack included a Rust backend using Axum, a SvelteKit frontend, and SQLite for metadata storage. The application supports offline AI classification, RAW development, video transcoding, and complex editing features like HDR merge and lens correction. Throughout this process, the human author did not write any implementation code. Instead, they focused on defining strict architectural invariants, writing prose specifications, and maintaining guideline documents such as AGENTS.md and SPEC.md. These documents enforced rules like parameterized SQL only, local-first design, and zero query-time magic.

Once the application was stable and running on the developer’s devices, they initiated a review phase using Claude Opus 5.5. This was done to compare the performance of the frontier model against DeepSeek Flash 4.1, which had generated the entire codebase for approximately $30 over three months. The Opus review was constrained by five-hour session limits, requiring the work to be split across several days. The goal was not to fix broken code, but to see if the more expensive model could find issues that the cheaper model had missed during two months of daily use.

How it works

The review process relied on a structured framework rather than open-ended prompting. The developer created a "skill" that directed the LLM to evaluate the code along 29 specific axes, grouped into five categories: correctness and invariants, security and boundaries, concurrency, cross-boundary consistency, and code quality. Each axis had a narrow scope, such as GPS geotagging integrity or WebDAV drop folder security. The reviewer was given access to the entire repository, with SPEC.md and AGENTS.md serving as the ground truth for expected behavior.

The contract for each review run required concrete findings with file and line references, tied to specific invariant violations. Style nits and speculation were explicitly excluded. Findings were graded by severity, and the process halted for human triage before any fixes were applied. When Opus identified issues, it also generated regression tests and implemented fixes in isolated commits. This method ensured that the model acted as a rigorous auditor rather than a casual pair programmer, forcing it to validate claims against the actual code structure.

Key details

  • Code volume: The project consists of 71,161 lines of code, with 58,319 lines being actual code logic, written entirely by DeepSeek Flash 4.1.
  • Review results: Claude Opus 5.5 found 72 issues: 0 critical, 8 major, and 64 minor. None of the major issues involved data loss or security breaches in shipped flows.
  • Cost comparison: DeepSeek Flash 4.1 cost roughly $30 over 11 weeks via an OpenCode Go subscription, while Claude Opus 5.5 cost $17 for one month but suffered from strict session throttling.
  • Nature of bugs: The major findings were subtle edge cases, such as feature interactions between crop and tilt functions, or stale documentation after refactors. Core pipelines like import and video processing had no findings.
  • Model assessment: Opus rated the DeepSeek-generated code as senior-level, praising its strict layering and failure-path engineering, but criticizing its tendency to fix specific cases without propagating changes to all call sites.
  • Human role: The developer’s primary contribution was defining the vision, writing the rules, and triaging findings. Writing code was fully delegated to the model.

Why it matters

For technical founders and engineering leads, this case study challenges the assumption that frontier models are necessary for high-quality software production. The fact that an open-weight model produced a robust, complex application without critical architectural flaws suggests that clear specifications and strict invariants are more valuable than raw model intelligence. The "premium" paid for Opus did not buy correctness in the core system; it bought a deeper scan of statistical variance and edge cases that had not yet manifested in production. This implies that for many internal tools or well-scoped products, cheaper models may offer a better price-to-value ratio.

However, the review also highlights a persistent weakness in current agentic coding workflows: the difficulty of maintaining consistency across boundaries. Opus noted that the code often fixed a specific instance of a bug without updating related handlers, documentation, or mirrored constants. This "sweep" problem remains a significant risk when delegating code generation to LLMs. It underscores that while models can write excellent individual modules, they struggle with the holistic impact of changes across a large codebase. Human oversight remains essential for enforcing global invariants and ensuring that refactors do not leave behind dead code or stale contracts.

What you can do

  • Define strict architectural invariants in dedicated markdown files like AGENTS.md before starting any AI-assisted coding project.
  • Use open-weight or lower-cost models for initial code generation and iteration to minimize expenses during the bulk of development.
  • Implement a structured review framework with narrow, specific axes rather than asking for general code improvements.
  • Require LLM reviewers to cite specific file lines and invariant violations, rejecting vague style suggestions or speculative optimizations.
  • Manually triage all automated findings to distinguish between critical architectural risks and minor edge cases.
  • Focus your personal effort on writing precise specifications and maintaining the rule set, as this is the leverage point that determines code quality.
  • #llm
  • #code-review
  • #deepseek
  • #claude
  • #agentic-workflows

Tools from the Bytechap store

$89

DocBento

Self-hosted document management that reads every scan and answers with page citations.

Live demo

Keep reading

All stories