Large language models and AI coding agents have reshaped software development, but the path to fully AI-native systems faces structural challenges. Chief among them is managing context windows without losing accuracy or efficiency. When developers inject full project documentation and code into a model's memory, the model loses mid-sequence information, token costs spiral, and architecture drifts. This paper presents MicroSkill Architecture: a modular design paradigm inspired by microservices, applied to knowledge encapsulation instead of service decomposition. Instead of feeding an agent the entire codebase, the architecture partitions knowledge into atomic, sharply scoped skill capsules, and a dynamic router selects only semantically relevant capsules for the task. We formally model context allocation as constrained optimization over semantic relevance subject to a token budget. An empirical case study an enterprise content management system with fifteen complex features shows that MicroSkill cuts token consumption by over 90%, nearly doubles first-try compilation success rates, eliminates architectural violations entirely, and enables autonomous extraction and registration of seven new skill capsules via a self-learning mechanism. These findings suggest MicroSkill Architecture offers a scalable foundation for building AI-native development systems that are more efficient, more reliable, and capable of evolving over time.
翻译:大语言模型与AI编码智能体已深刻改变软件开发模式,但实现完全AI原生系统仍面临结构性挑战。核心难题在于兼顾上下文窗口管理与准确性/效率的平衡:当开发者将完整项目文档和代码注入模型内存时,模型会丢失中段序列信息、令牌成本呈指数级增长,且架构发生漂移。本文提出微技能架构——受微服务启发的模块化设计范式,将知识封装而非服务分解作为核心思想。该架构不再将整个代码库输入智能体,而是将知识划分为原子化、边界清晰的技能胶囊,并通过动态路由器仅选取语义相关的胶囊处理任务。我们形式化地将上下文分配建模为受令牌预算约束的语义相关性优化问题。针对含十五个复杂功能的企业内容管理系统的实证案例研究表明,微技能架构使令牌消耗降低90%以上,首次编译成功率提升近两倍,完全消除架构违规,并通过自学习机制实现七项新技能胶囊的自主提取与注册。这些发现表明,微技能架构为构建更高效、更可靠且具备持续演进能力的AI原生开发系统提供了可扩展基础。