In real-world software engineering, the bottleneck for AI Agent effectiveness is usually not "can it generate code" but "can it accurately understand the project." In large repositories, module boundaries, implicit contracts, historical conventions, and cross-file collaboration patterns can rarely be fully expressed in a user prompt. When an Agent relies solely on ad-hoc search and localized code reading, it runs into high localization cost, shallow project understanding, and missed changes in cross-module edits.
The Qoder Knowledge Engine distills a project's engineering knowledge into context infrastructure that Agents can generate, retrieve, and maintain. It is not a documentation library in the traditional sense—it is a project-understanding layer built specifically for AI coding tasks.
Without project knowledge, an Agent typically starts from the user request, searches the code, reads a handful of files, infers module boundaries, call relationships, and project conventions from limited context—and only then moves on to modifying and verifying code. In essence, the Agent rebuilds its understanding of the project from scratch on every task.
This just-in-time context construction is workable in small repositories, but it breaks down in large projects. The Agent often needs multiple rounds of retrieval and code reading before it forms usable context, so a substantial share of compute and interaction cost is spent on repeatedly re-understanding the project. Exploration paths are also highly non-deterministic: given the same task, different runs may touch entirely different file sets and reasoning branches. Engineering conventions are not centrally recorded in any single file—cross-layer parameter passing rules and data-migration constraints, for example, are typically scattered across call chains, historical implementations, and team practices spanning many files and modules. When a task requires coordinated multi-file changes, an Agent may complete the core logic change yet still miss the synchronized updates to tests, configuration, migration scripts, call sites, or the UI layer.
The problem the Qoder Knowledge Engine sets out to solve is not "give the model more text" but "give the model a more stable and more complete understanding of the project while it executes tasks."
The Qoder Knowledge Engine can be viewed as an engineering knowledge layer built for Agents. Its overall structure looks like this:

The engine draws on two upstream information sources: the module structure, dependency relationships, and engineering conventions found in the code repository; and the user preferences, technical decisions, and project experience accumulated across historical interactions. Once inside the engine, this information is not stored statically—it is continuously governed through user correction, incremental updates, sharing, and import/export, ultimately producing three kinds of knowledge artifacts: Repo Wiki, Knowledge Cards, and Memory. The Repo Wiki primarily serves human readers for project reading and navigation; Memory captures user preferences, project experience, and other long-lived information formed in historical interactions; Knowledge Cards serve the Agent's task understanding and execution.
A wiki is usually organized around human reading habits, emphasizing narrative and navigation. If a wiki were fed directly to an Agent as task context, the Agent would still have to re-extract module boundaries, call relationships, configuration conventions, and change caveats from long-form documents during execution.
This is where Knowledge Cards come in. They do not replace the Repo Wiki. Instead, they extract the project knowledge that today's models and Agents actually need, and convert it into structured context suited for Agent consumption. Compared with a wiki, Knowledge Cards operate at a granularity closer to concrete tasks, express relationships more explicitly, adopt knowledge types and formats aligned with Agent context engineering, and are easier to keep updated as the repository evolves.
A Knowledge Card typically describes module responsibilities, architecture design, tech stack, coding conventions, setup and commands, and inter-module relationships. It is far more structured than ordinary documentation, which makes it better suited to retrieval, ranking, and consumption. Knowledge Cards record not only "where the code lives" but also "how the project works." That difference sets the Knowledge Engine apart from generic code-search tools: code search locates facts, while the Knowledge Engine expresses engineering semantics.
The rest of this post focuses on the Knowledge Card capability—how module structure, architectural conventions, and implicit engineering knowledge in a repository are turned into Agent-consumable context—and examines its measured impact on task execution.
A Knowledge Card's lifecycle spans four stages: scanning and generation, knowledge graph construction, governance and sharing, and Agent consumption. The system first scans the code repository, historical sessions, and Git metadata to extract knowledge content; it then generates structured Knowledge Cards and their relationships, forming a queryable knowledge graph; incremental updates, sharing, and import/export mechanisms keep the knowledge trustworthy and reusable. Users can intervene before generation to customize the generation plan, and correct knowledge content after generation. At task time, the Agent retrieves relevant Knowledge Cards on demand.

The generation stage extracts project knowledge from the repository. Its focus is not isolated code snippets but higher-level engineering structure: module boundaries, entry files, cross-module dependencies, configuration approaches, and development conventions.
Generation consists of module planning, knowledge synthesis, and relationship extraction. Module planning decides how the project is partitioned into knowledge nodes; knowledge synthesis distills module responsibilities, architecture design, tech stack, coding conventions, and setup commands into Knowledge Cards; relationship extraction then identifies dependency and semantic relationships between modules.
Knowledge Cards express project knowledge in a structured form. Different nodes carry different kinds of information—architecture design, tech stack, code conventions—while edges express containment, dependency, association, or version evolution between nodes. Together, all Knowledge Cards and their relationships form a queryable project knowledge graph, providing the foundation for relational retrieval and recommendation.
This representation can answer not only "what a module is" but also "how that module collaborates with others." For cross-module change tasks, the latter usually carries far more decision value.
Users can customize the generation plan via command before Knowledge Cards are generated, and correct or supplement card content and relationships afterward. As the repository evolves, Knowledge Cards evolve with it. For small-scope changes, the system incrementally updates the affected cards; for large refactors or branch switches, it uses commit history, branch state, and change scope to choose among reuse, incremental update, or full regeneration—keeping knowledge consistent with the code version and preventing stale knowledge from being applied to newer code.
Knowledge Cards also support sharing and import/export. They can be uploaded to the server side for enterprise-internal sharing and cross-device reuse, or migrated, backed up, and analyzed locally. Knowledge Cards are therefore not a transient single-machine cache but a shareable, portable, and reusable team knowledge asset.
Knowledge Cards can be supplied before an Agent starts a task or on demand while the task is in progress. Before the task begins, the Knowledge Engine uses multi-path recall to filter and organize relevant knowledge based on the user request, giving the Agent initial context and semantic direction; as the task proceeds, the Agent can keep querying Knowledge Cards to fill in local details.
Knowledge Cards do not replace code search. Their role is to help the Agent understand the task background, relevant modules, and candidate implementation paths faster, while subsequent code queries verify and supplement the details. Through this collaboration, Knowledge Cards stop being static reference material and instead support the Agent's decisions and execution across every stage of a task.
During consumption, the system does not merely return isolated cards. It organizes knowledge around the current task and, drawing on the knowledge graph, provides the Agent with the relevant card content plus its associated relationships—helping the Agent form a comparatively complete contextual understanding.
We selected 40 complex cases from SWE-bench Pro and compared the following five experimental conditions. Each condition was run independently 3 times; task performance and execution cost are reported as averages, and the coefficient of variation (CV) describes run-to-run variance.
| Condition | Knowledge source and delivery |
|---|---|
| No-knowledge baseline | No project knowledge; the Agent relies mainly on code search and file reading to build context |
| CodeGraph | No project knowledge; the Agent uses a code-graph MCP during the task to locate symbols and related code |
| Tool retrieval | The Agent calls a knowledge retrieval tool mid-task to query project knowledge based on the current problem |
| Agent prefetch | A knowledge-prefetch agent selects the Knowledge Cards a task needs at initialization, based on the user request, repository code, and the full project knowledge, and injects them into the initial task context |
| Knowledge Engine (tool retrieval + semantic-retrieval prefetch) | Candidate knowledge is gathered via multi-path recall—semantic-retrieval prefetch plus tool retrieval—then filtered, organized, and injected into context |
Evaluation metrics include task score, result stability, token consumption, Agent execution turns, tool-call count, and wall-clock time. The five conditions cover distinct information-supply paths: pure code exploration, structural indexing, active mid-task querying, agent-driven upfront knowledge selection, and multi-path recall with filtering and organization.

Overall, the no-knowledge baseline averaged 30.2 points; CodeGraph and tool retrieval raised this to 31.7 and 32.8 respectively; agent prefetch reached 37.2; and the Knowledge Engine achieved the highest average at 38.4—roughly a 27.1% improvement over the baseline. On stability, every project-knowledge condition reduced variance: tool retrieval, agent prefetch, and the Knowledge Engine posted CVs of 2.8%, 5.9%, and 6.4%, all well below the baseline's 11.1%.
All three project-knowledge conditions outscored both no-knowledge conditions, which shows that the bottleneck in complex engineering tasks is not just code localization—it also includes understanding module responsibilities, behavioral constraints, compatibility rules, and cross-file collaboration. Without knowledge, the Agent must reconstruct this implicit information from local code and ad-hoc search results, and it easily forms wrong assumptions before sufficient evidence has been gathered. Project knowledge converts scattered engineering semantics into directly consumable context, lowering the probability of missing critical constraints or misjudging task boundaries. It also constrains the Agent's search space, so repeated runs converge on similar modules, constraints, and implementation paths—which is why all three knowledge conditions show lower CVs than the no-knowledge runs.
The Knowledge Engine and agent prefetch averaged 38.4 and 37.2, clearly ahead of the other conditions. Their shared advantage is that relevant knowledge enters the context at the start of the task, letting the Agent identify the target modules, likely call chains, and implementation constraints early—reducing broad exploration and the task-understanding corrections it triggers. Compared with querying knowledge mid-execution, upfront knowledge directly shapes the initial plan and the first round of code search, hence the larger score gains. The Knowledge Engine scored highest mainly because its knowledge supply covers the full execution lifecycle: before the task starts, multi-path recall plus filtering and organization establish the initial task context; as the task proceeds, it continues retrieving and supplementing local knowledge, verifying call relationships, engineering conventions, and integration points not yet covered. Combining upfront organization, in-flight supplementation, and code verification preserves agent prefetch's early-stage advantage while mitigating the anchoring risk of incomplete upfront knowledge. What the Knowledge Engine increases is not context length, but the density of useful information at each execution stage.
CodeGraph's score gain was comparatively modest, indicating that code localization alone is not enough for correct implementation. A code graph provides symbol locations, call directions, and structural relations, but many SWE-bench Pro failures stem from behavioral ordering, compatibility constraints, and cross-module collaboration conventions—information that is generally not encoded in call relationships.

On execution cost, the Knowledge Engine cut average total tokens from the baseline's 3110K to 2920K—about a 6.1% reduction; average turns dropped from 35.5 to 31.7, tool calls from 41.1 to 37.4, and average time from 578s to 559s. CodeGraph saved roughly 3.6% of tokens but increased turns, tool calls, and time.
The efficiency metrics show that knowledge volume and token consumption are not in a simple linear relationship. Project knowledge improves efficiency mainly by reducing the exploratory probing an Agent performs to build project understanding: by providing relevant modules, call relationships, and engineering constraints up front, it lets the Agent form verifiable task hypotheses faster, cutting the loop of searching irrelevant files, reading, revising assumptions, and searching again. All three knowledge conditions accordingly reduced turns and tool calls; their differences come mainly from when knowledge enters the task and whether it can be continuously supplemented afterward.
Among the three knowledge conditions, the Knowledge Engine had the lowest overall execution cost. Tool retrieval mainly corrects search direction mid-task and still depends on the Agent forming a hypothesis first; agent prefetch shortens the startup search path, but a one-shot knowledge selection can be incomplete and adds context occupancy in later turns. The Knowledge Engine supports both pre-task recall, filtering, and organization and in-flight supplementation with code verification—converting broad exploration into targeted verification around key modules and call chains—and achieved the lowest totals for tokens, turns, and tool calls, striking a better balance between task quality and execution cost. Additionally, the Knowledge Engine performs upfront recall via engineered semantic retrieval rather than having an agent scan and screen Knowledge Cards for prefetch, which removes extra model inference and tool calls before the task begins, lowers task startup latency, and makes the time and compute cost of knowledge prefetch more predictable.
CodeGraph's structural-localization strength did not translate into overall execution efficiency. Although it saved about 3.6% of tokens, its turns, tool calls, and elapsed time all increased. Once the code graph provides a structural entry point, the Agent still needs file reading, text search, and terminal verification to make implementation decisions, so graph interactions stack on top of the existing tool chain. CodeGraph helps locate relevant code, but it cannot adequately supply behavioral constraints, compatibility rules, or cross-module collaboration semantics, so it fails to meaningfully reduce downstream analysis and verification cost.
Execution traces reveal exactly where knowledge changed the outcome. Three representative cases illustrate three distinct pathways.
Behavioral constraints: project knowledge supplies business semantics beyond code structure. Case nodebb-30 required permission checks to run in a fixed order while remaining compatible with legacy configuration. The no-knowledge condition actually located nearly the same set of files as the successful runs—yet it reversed the permission-check order and mismapped the compatibility fields, failing all three runs. What determined the outcome was not file coverage, but whether the Agent had explicit constraints about check ordering, exemption rules, and compatibility semantics. Knowledge supplied that higher-level project understanding, and every knowledge-equipped run succeeded.
Integration relationships: project knowledge reveals system integration points beyond the feature definition. In case flipt-605, implementing the body of the new feature was not enough to make it take effect—the upper-layer module responsible for runtime registration also had to be modified to wire the new capability into the actual execution path. Project knowledge supplied the connections between the feature definition, its consumption relationships, and the initialization mechanism, expanding the Agent's scope from local implementation to system integration, and prompting it to follow dependencies to verify the registration entry point and activation conditions. This case shows that project knowledge can expose the full chain from a feature's definition to its consumption by the system, helping the Agent determine the complete change scope instead of stopping prematurely after a local implementation.
Call-chain propagation: project knowledge helps verify coverage and parameter semantics. Case tutanota-176 required a session key to propagate fully through a multi-layer data-loading and caching call chain. The no-knowledge runs skipped an edge implementation because type structures happened to be compatible—but the results show that whether a specific file was modified is not a reliable success criterion. What mattered was whether the optional parameter propagated intact across the client, cache layer, and indexing pipeline, and whether default parameters and batch-loading keys were handled consistently. All knowledge-equipped runs succeeded, demonstrating that project knowledge's value is not a static file checklist but help in simultaneously verifying call-chain coverage and cross-layer semantics.
Taken together, project knowledge influences task outcomes by supplying behavioral constraints, revealing system integration relationships, and aiding cross-module call-chain verification. It does not replace code retrieval and verification; rather, it organizes scattered engineering semantics into executable task context, letting the Agent more accurately determine change scope, implementation semantics, and verification priorities. The Knowledge Engine goes further by combining pre-task knowledge organization with continuous in-flight supplementation, so relevant information is available at every decision stage—reducing wrong assumptions and incomplete implementations.
The Qoder Knowledge Engine is not a static documentation library—it is project-understanding infrastructure for Agents. Through knowledge generation, structured representation, sharing and circulation, semantic retrieval, and incremental evolution, it converts engineering knowledge scattered across code, documents, and historical experience into reusable task context.
In this evaluation, the Qoder Knowledge Engine improved the average task score by about 27.1% over the baseline while reducing token consumption, execution turns, and tool calls. The CodeGraph MCP reduced token consumption but increased turns, tool calls, and average time. These results show that Agent task performance depends not only on model capability but also on how context is organized and knowledge is supplied.
Execution traces further show that structural information mainly determines the task entry point, behavioral specifications help the Agent grasp the correct implementation semantics, and cross-file relationships determine the complete change scope. Recalling, filtering, and organizing knowledge turns these scattered pieces into task-relevant engineering context, enabling the Agent to identify key modules, call chains, and engineering constraints before committing to an implementation plan. The Knowledge Engine thereby reduces the trial-and-error loop of rebuilding project understanding, focusing task execution on analyzing and verifying the target code and its relationships.
For AI coding systems, the key is not simply adding more input, but providing appropriately granular, task-relevant project knowledge at the right moment. The core value of the Qoder Knowledge Engine is exactly this: converting one-off project search and comprehension into an engineering capability that can be continuously maintained and reused.
1,496 posts | 510 followers
FollowAlibaba Cloud Community - July 31, 2026
Alibaba Cloud Big Data and AI - January 21, 2026
Alibaba Cloud Native Community - November 6, 2025
CloudSecurity - April 9, 2026
Alibaba Cloud Community - August 22, 2025
Alibaba Cloud Native - December 10, 2024
1,496 posts | 510 followers
Follow
Token Plan
Build more, spend less. One plan, every modality.
Learn More
Alibaba Cloud Model Studio
A one-stop generative AI platform to build intelligent applications that understand your business, based on Qwen model series such as Qwen-Max and other popular models
Learn More
Offline Visual Intelligence Software Packages
Offline SDKs for visual production, such as image segmentation, video segmentation, and character recognition, based on deep learning technologies developed by Alibaba Cloud.
Learn More
Qwen
Full-range, open-source, multimodal, and multi-functional
Learn MoreMore Posts by Alibaba Cloud Community