Coding Agent 时代的产品打磨:从功能可用到体验精致

2026-01-30

Claude Code、Cursor、Windsurf 等 Coding Agent 工具让写代码的速度提升了 10 倍。但更快的编码 ≠ 更好的产品。

当一个 tide tracking app(潮汐追踪应用)能在 2 小时内从 idea 变成可运行的原型时,真正的挑战变成了:如何让这个产品从"能用"变成"好用"?

Coding Agent 的陷阱:速度幻觉

@swyx (Latent Space 播客主持人) 在 Twitter 上写道:

"AI coding assistants give you 10x speed on the first 80% of a project, but the last 20% of polish still takes just as long."

这"最后 20%"是什么?

这些工作不会出现在 AI 生成的 commit message 里,但却是区分 demo 和产品的关键。

案例:WACLAM 的 47 次迭代

Washington Clam(WACLAM)是一个帮助捕捞者追踪潮汐和海滩开放状态的应用。Coding Agent 在 3 小时内完成了 MVP,但随后的 2 周内进行了 47 次打磨提交。

迭代 1:从 Runtime API 到静态预下载

初始方案(AI 生成):

// 每次用户打开页面都调用 NOAA API
const tides = await fetch(`https://api.tidesandcurrents.noaa.gov/...`);

问题:

打磨后:

// commit: Replace runtime NOAA API calls with pre-downloaded static tide data
// 使用 GitHub Actions 每小时同步一次数据
// tides.json 直接打包进应用

import tides from '../data/tides.json';
const getTides = (date) => tides[date];

结果:首屏加载时间从 2.5s 降至 0.3s,99.9% 可用性。

迭代 2:分层缓存策略

静态数据解决了速度问题,但海滩状态(是否开放、污染警告)需要实时更新。如何平衡新鲜度和性能?

// commit: Use 30-day cache for tides.json, 1-hour for beaches.json

// next.config.js
async headers() {
  return [
    {
      source: '/data/tides.json',
      headers: [
        { key: 'Cache-Control', value: 'public, max-age=2592000' } // 30天
      ]
    },
    {
      source: '/data/beaches.json',
      headers: [
        { key: 'Cache-Control', value: 'public, max-age=3600' } // 1小时
      ]
    }
  ];
}

策略依据:潮汐数据可预测,30天不会变;海滩状态可能几小时内变化(天气、污染)。

迭代 3:iOS-native 交互重构

Coding Agent 生成的移动端日历是"能用"的桌面端缩小版。但真实的 iOS 用户期待什么?

@daveverwer (iOS Dev Weekly 编辑) 在 iOS Dev Weekly 中强调:

"Users don't notice when you get platform conventions right, but they absolutely notice when you get them wrong."

重构前后的对比:

迭代 4:死代码清理(持续进行)

Coding Agent 生成代码时会保留大量"以防万一"的逻辑。生产代码需要做什么?

# 真实的 commit 序列
630a4be Replace runtime species API with static import from beaches.json
bef4c5d Replace runtime DOH API calls with pre-downloaded static beach data
62bc075 Replace runtime NOAA API calls with pre-downloaded static tide data
19fdbfb Remove unused useTides hook and related dead code
4beaeed Remove unused code and consolidate tide utilities
c6656be Remove WDFW name scraper and featured field

规律:每增加一个新功能,就会暴露 2-3 个可以删除的旧功能。产品打磨是减法,不是加法。

迭代 5:数据同步策略的演进

数据同步频率不是技术问题,是产品决策:

关键认知:同步频率取决于数据源更新频率 + 用户容忍延迟。不是越频繁越好。

Coding Agent 时代的打磨清单

基于上述案例,产品从 MVP 到 production-ready 的打磨清单:

1. 数据层优化

2. 性能层优化

3. 交互层优化

4. 代码层优化

为什么 AI 做不了这些?

Coding Agent 擅长:

但 AI 不擅长:

@johnowhitaker (Stability AI) 写道:

"AI can write the code, but it can't decide what code to write. Product sense comes from understanding user pain points at a human level."

结论:人机协作的新范式

Coding Agent 不是替代开发者,而是改变了工作分配:

WACLAM 的 47 次打磨 commit 中,Coding Agent 协助完成了约 60% 的代码编写,但 100% 的决策点来自人的判断。

在 Coding Agent 时代,写代码的速度不再稀缺,产品判断力才是


参考与延伸阅读