Where Did the Variability Go? From Vibe Coding to Product Lines by Regeneration
Summary
Variability by Regeneration (VbR) is a novel product-line approach designed for AI-generated software, specifically addressing the inherent lack of in-artifact variability observed in "vibe coded" systems. An exploratory analysis of 10 vibe coded C/C++ projects, ranging from 201 to 14,077 LoC, revealed near-zero in-artifact variability, contrasting sharply with configurable systems like x264 (70,964 LoC) which exposes 184 CLI options. The study found that all variability decisions in vibe coded systems are resolved at a new "generation time," when the LLM produces the source code. VbR formalizes a method where an LLM acts as a derivation engine, generating purpose-built, dead-code-free binaries for each software variant from a declarative specification. A variant dispatcher transparently routes user requests to the appropriate binary. This was demonstrated on a "wc" product family, featuring six features and three variants, using Claude Opus 4.
Key takeaway
For Software Product Line Engineers designing systems with AI-generated code, you should embrace "generation time" as the primary binding time for variability. Instead of attempting to embed traditional variation points in LLM-generated artifacts, manage variability entirely through a declarative specification. This approach yields purpose-built, dead-code-free binaries for each variant, simplifying maintenance and deployment. Consider implementing a variant dispatcher to transparently serve users based on their feature requests.
Key insights
VbR manages software variability in AI-generated code by synthesizing zero-variability binaries from a declarative specification at generation time.
Principles
- Variability in AI-generated software belongs in the specification, not code.
- AI code generation inverts traditional cost: generation is cheap, maintenance hard.
- Generate many variant-specific systems, not one configurable system.
Method
VbR defines a product family via a specification (features, variants, constraints), uses an LLM (e.g., Claude Opus 4) with a prompt template to generate purpose-built binaries for each variant, and employs a dispatcher to route user requests to the matching binary.
In practice
- Use a YAML file for declarative feature specifications.
- Employ a shell script for variant dispatching based on user input.
- Implement compilation and test gates for regenerated artifacts.
Topics
- Vibe Coding
- Software Variability
- Software Product Lines
- Large Language Models
- Code Generation
- Variant Dispatching
Best for: Research Scientist, AI Engineer, AI Scientist, Machine Learning Engineer, AI Architect
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.