🤖 AI Summary
This work addresses the challenge of extracting high-quality natural language specifications from AI-assisted programming dialogues that accurately capture developer intent while remaining independent of concrete implementation details. The authors propose AfterVibe, a framework that leverages large language models to distill abstract specifications from code and conversational context. Central to their approach is the novel evaluation metric of “regeneration consistency,” which assesses behavioral equivalence between the original code and new implementations generated solely from the extracted specification, using a multi-stage equivalence validation pipeline. This intent-driven method supports iterative refinement to strengthen specification constraints. Evaluated on 72 real-world projects, the initial regeneration score reaches 5.06 out of 6.0—surpassing human-written descriptions—and improves to 5.74 after iteration, with regenerated implementations exhibiting diverse syntax yet consistent behavior, thereby demonstrating the abstraction quality and strong guidance capability of the derived specifications.
📝 Abstract
We present AfterVibe, a framework that recovers natural-language specifications from a vibe coding session. Given a code artifact and the conversation trajectory that produced it, AfterVibe uses an LLM to extract an abstract natural-language specification capturing the developer's intent, and validates it through a regeneration test: a second, blind AI agent re-implements the artifact from the spec alone, and the resulting code is graded against the original through a multi-tier validation pipeline. Spec quality is thus measured by whether an agent can regenerate passing code; if the verifiers deem the implementations equivalent the spec is considered strong, otherwise it is iteratively refined. Evaluating AfterVibe on 72 real-world vibe-coded projects from a company's internal coding sessions, we find that its recovered specs are abstract by design-capturing behavioral intent without dictating implementation-yet strong. Multiple independent regenerations achieve a high mean regeneration score of 5.06 out of 6.0 while remaining diverse in their details, confirming that the spec constrains what without over-prescribing how. Besides outperforming existing human-authored descriptions, the specs can be further strengthened iteratively to a score of 5.74. A practical implication is that specifications-not code-could become the primary artifact for human review and the source of record at a time when AI-generated code is outpacing customary code review.