🤖 AI Summary
This work addresses the fragmentation, traceability challenges, and governance difficulties inherent in context engineering for generative AI. We propose a Unix-inspired “everything-as-a-file” abstraction—a Context File System—that uniformly models external knowledge, memory, tools, and human inputs as persistent, metadata-annotated, and access-controlled context elements, supporting standardized mounting and integrity verification. We design a verifiable pipeline comprising context constructors, loaders, and evaluators to enable systematic assembly and quality assurance under token constraints. A prototype is implemented within the open-source AIGNE framework, validated through two real-world applications: a memory-augmented agent and an MCP-driven GitHub assistant. Results demonstrate improved trustworthiness, maintainability, and governability of generative AI systems in both development and industrial settings. The core contribution is the first application of filesystem paradigms to context engineering, establishing a unified infrastructure across heterogeneous techniques—including RAG, tool integration, and prompt engineering.
📝 Abstract
Generative AI (GenAI) has reshaped software system design by introducing foundation models as pre-trained subsystems that redefine architectures and operations. The emerging challenge is no longer model fine-tuning but context engineering-how systems capture, structure, and govern external knowledge, memory, tools, and human input to enable trustworthy reasoning. Existing practices such as prompt engineering, retrieval-augmented generation (RAG), and tool integration remain fragmented, producing transient artefacts that limit traceability and accountability. This paper proposes a file-system abstraction for context engineering, inspired by the Unix notion that 'everything is a file'. The abstraction offers a persistent, governed infrastructure for managing heterogeneous context artefacts through uniform mounting, metadata, and access control. Implemented within the open-source AIGNE framework, the architecture realises a verifiable context-engineering pipeline, comprising the Context Constructor, Loader, and Evaluator, that assembles, delivers, and validates context under token constraints. As GenAI becomes an active collaborator in decision support, humans play a central role as curators, verifiers, and co-reasoners. The proposed architecture establishes a reusable foundation for accountable and human-centred AI co-work, demonstrated through two exemplars: an agent with memory and an MCP-based GitHub assistant. The implementation within the AIGNE framework demonstrates how the architecture can be operationalised in developer and industrial settings, supporting verifiable, maintainable, and industry-ready GenAI systems.