AutoGlue automates BDD glue code, boosting accuracy by 58.7%
Hierarchical multi-agent framework turns natural language scenarios into executable Java code.
AutoGlue addresses a key pain point in Behavior-Driven Development (BDD): writing glue code that maps natural-language scenario steps to project code. The framework employs three specialized agents: a Behavior Interpreter that derives step intent from scenario context, a Developer agent that retrieves relevant BDD artifacts and project code, and a code generator that produces the final glue code. This hierarchical design mirrors a human developer's workflow, first understanding what the step means, then finding the right code context, and finally generating the implementation.
Evaluated on 1,307 steps from eight open-source Java projects, AutoGlue significantly outperforms few-shot prompting with GPT-4 or similar LLMs. API F1 rose by 58.7% and CodeBLEU by 43.7%. Notably, 46.1% of generated glue code was directly usable, and most partially correct outputs needed only minor fixes like missing actions or parameter tweaks. Ablation studies confirmed that both the behavior interpretation and project-aware context retrieval components contribute substantially to quality. This work shows that LLM-based multi-agent systems can effectively connect specification languages with actual code, potentially automating a labor-intensive part of modern Agile development.
- AutoGlue framework separates behavior interpretation, context retrieval, and code generation using three specialized agents.
- Improves API F1 by 58.7% and CodeBLEU by 43.7% over few-shot prompting on 1,307 steps from 8 Java projects.
- 46.1% of generated glue code is directly usable; most other outputs require only minor revisions.
Why It Matters
AutoGlue shows LLMs can automate specification-to-code translation, slashing manual glue code effort in BDD workflows.