Laravel管理员面板包Backpack的维护者近日分享经验指出,旨在适应Claude等AI代理而开发的llms.txt文件和MCP服务器,在提升开发效率方面作用甚微 1。据其观察,llms.txt的实际效用有限,因为AI代理很少主动去查找该文件,团队甚至计划考虑将其移除 1。同样,MCP服务器的效果也不理想,原因在于代理需要主动决定调用且查询质量参差不齐,因此也被列入可能移除的计划中 1。
相比之下,真正推动开发效率大幅提升的是那些“人类友好”的传统工程特性 1。该维护者透露,引入AI代理后,构建简单网站管理面板的时间已从过去的1至2天缩短至1至2小时 1。这一显著进步主要归功于几年前做出的核心决策:保持API长达四年的稳定性,使得旧代码仍存在于模型的训练数据中 1。此外,开源项目未混淆的代码让代理能够直接阅读vendor目录下的源代码并自行解答大部分问题,而松散、可覆盖的架构设计则减少了需要加载的上下文及潜在出错点 1。一致的命名模式(如文本字段对应文本列)也帮助代理更准确地猜测结构 1。
在具体工具实践上,Laravel Boost插件通过将指南和技能直接放入代理上下文中,被证明比MCP更为有效,因为它消除了代理主动获取信息的步骤 1。基于此,文章建议开发者优先提供包含上下文内指令的文件,而非依赖代理主动检索外部文档 1。
The maintainer of Backpack for Laravel reports that while AI coding agents like Claude have significantly accelerated development—reducing the time to build simple management panels from one or two days to just one or two hours—specialized tools designed to bridge the gap between documentation and AI, such as llms.txt files and Model Context Protocol (MCP) servers, have provided little value 1. Consequently, the project is considering removing these features because they failed to improve agent performance as expected 1.
Instead of relying on external retrieval mechanisms, the most effective strategy has been rooted in long-standing architectural decisions that favor human-friendly, stable code structures. The primary factor enabling AI success was maintaining core API stability for four years, ensuring that older code examples remained present in the models' training data 1. Additionally, keeping the source code open and unobfuscated allowed agents to directly read vendor directory contents to resolve most queries independently 1. A loose, overridable architecture also proved beneficial by minimizing the context window required and reducing potential error points 1.
The maintainer noted that consistent naming patterns, such as mapping text fields to text columns, helped agents correctly infer structural relationships 1. In contrast to MCP servers, which require agents to proactively decide to call them often resulting in inconsistent query quality, the team found that placing guidelines and skills directly into the agent's context via the Laravel Boost plugin was far more effective 1. This approach bypasses the need for the agent to actively search for external documents, a behavior observed to be rare with llms.txt files 1.
评论
还没有评论,欢迎留下第一条。