一句话:让 LLM 智能体在每次代码生成后自动更新特性模型并嵌入特性注解,从而维护特性与代码的可追溯性。
智能体编码工具借助 LLM 让开发者快速生成软件,但生成过程中没有记录存在哪些特性、实现于何处,代码库日益复杂后开发者很快失去全局视图。Agent-HAnS 是一个智能体工作流:在每次代码生成步骤后指示 LLM 更新特性模型并生成嵌入式特性注解,并通过 Model Context Protocol 服务器上的实时仪表盘可视化演进结构。作者在由 27 条提示、10 个演进步骤演化的 C#/.NET 9 Web API 上演示,注解基本自动维护;人工审计显示 92% 的片段注解与 70% 的文件映射仍正确,错误集中在特性合并与拆分处;用户研究 SUS 得分 73.9。
Agentic coding tools using LLMs enable developers to quickly generate software. However, developers quickly lose the overview over their increasingly complex codebases. During code generation, no knowledge about what features exist or where they are implemented is documented. We present Agent-HAnS, an agentic workflow which instructs the LLM to update a feature model and generate embedded feature annotations after each code-generation step. It visualizes the evolving structure on a live dashboard served via a Model Context Protocol server. We demonstrate Agent-HAnS on a C#/.NET 9 web API evolved through 27 prompts across 10 evolution steps, with most annotations maintained automatically and no active annotation effort from the developer. In a manual audit, 92% of fragment annotations and 70% of file mappings remain correct, with errors concentrating at feature merges and splits. In a user study, Agent-HAnS scored 73.9 on the System Usability Scale. Tool video: https://youtu.be/Nb-eDrGokI8
@inproceedings{paperbot12499,
title = {Agent-HAnS: Maintaining Feature and Code Traceability in Agentic Development},
author = {Johan Martinson and Jacob Bengtsson and Moltas Hultin and Kevin Hermann and Thorsten Berger},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834652}
}