🤖 AI 速览
📋 文章元数据
- 发布时间
- 2026-06-20
- 类型
- posts
- 标签
- Vibe Coding, AI Development, Software Engineering, Contract First, OpenSpec, Claude Code, Codex
The 500-Line Curse
Have you experienced this? You open Cursor or Claude Code, describe your needs in three sentences, and AI generates hundreds of lines of code. The feature works—you're happy. You add more features, ask AI to modify things, then modify again…
By the fifth round of conversation, something is wrong. AI has started to "forget" the interface formats you previously agreed upon. A parameter name mysteriously changed. A working function has been refactored into three conflicting versions. You find yourself spending more and more time reading code—not reviewing, but debugging. Worse still, these aren't logic errors: they are inconsistencies introduced by AI across different conversation turns.
This is the "500-line curse": vibe coding's charm faces a cliff-like decline when confronted with the linear growth of project complexity.
A Security Engineer's Epiphany
@Pluvio9yte's recent deep dive captures this insight perfectly. Originally a security engineer, he went all-in on full-stack development—using AI coding tools intensively every day.
His core insight is counterintuitive: The best practice for Vibe Coding is neither "Requirement First" nor "Code First"—it's "Contract First."
Why? The problem with "Requirement First" is that after you write the requirements document, AI won't naturally adhere to it. It re-interprets the requirements in every conversation turn, and the interpretation may differ slightly each time. The problem with "Code First" is more direct: when the code itself is the sole source of truth, each of AI's modifications can destroy global consistency in pursuit of local optimization.
He built a methodology around OpenSpec:
1. Define interface contracts first—inputs, outputs, side effects, invariants—must be established before any line of code
2. The contract becomes the single source of truth for both human and AI—all conversation context is anchored to the contract
3. Spec drift is caught at development time—not discovered in production by your users
The greatest value of this approach: it externalizes "drift-prone context" into a stable reference point. Humans fully understand it; AI has explicit constraints around it.
What's Happening on the Tool Side
If you've been following updates from major AI coding platforms over the past month, you'll notice a common trend.
Claude Code Artifacts: Solving the collaboration black hole. Previously, AI programming output was "only visible to the operator." Claude Code has just shipped Artifacts—turning AI programming outputs (debug data, architecture diagrams, PR walkthrough results) into shareable interactive web pages. But the key dependency: this feature only works when there's something structured to share. If your AI code is a tangled hash, Artifacts can't save you.
OpenAI Codex Record & Replay. Launched June 18, this feature takes a different path: you perform a task once, AI watches, then automatically compiles that workflow into a reusable Skill. This is essentially a behavioral contract—you're demonstrating not "how to write code" but "how things should be done."
Loop Engineering. Proposes self-sustaining AI agents that write, test, and modify code through cyclical development. But the prerequisite for this mechanism to function isn't advanced prompt engineering—it's having stable interface contracts as anchors. An autonomous agent without a contract is like a drone without GPS.
Why Now?
Three years ago, developers debated whether writing specs was even useful. Today, the question has completely inverted. In an AI-first workflow, specs are no longer "documentation written for humans"—they've become a runtime artifact that both humans and AI continuously reference, compare against, and base decisions on.
The spec itself is the product. Code is merely the rendered artifact.
Three forces drive this paradigm inversion: Conversation context unreliability—AI's "memory decay" in long conversations is a structural flaw, and contracts are the most effective external memory against it. The inevitable need for multi-agent collaboration—when multiple AI agents work together, without interface contracts their conversations will be more catastrophic than human ones. Rising automation levels—tools like Codex Record & Replay signal AI's shift from "passively responding to instructions" to "actively executing workflows"—without contract-defined boundaries, automation becomes gambling.
Practical Takeaways
If you're using AI for serious projects (not toy demos), here are four starting points:
• Interface before implementation—even just a comment block defining input/output formats
• Version contracts alongside code—keep them in the same repo, with corresponding commits for contract changes
• Treat spec drift as a bug—don't let "close enough" become a habit
• AI generates scaffolding; humans own contract design—architectural decisions (especially interface design) remain the least replaceable human role
Developers who grasp this relationship can realistically achieve 5x productivity. Those who don't will spend that 5x debugging.
2026.06.20 · Based on Pluvio9yte's Contract First methodology, Claude Code Artifacts, OpenAI Codex Record & Replay, and Loop Engineering observations