Context Engineering for Agentic Systems: A Five-Phase Pipeline for Enterprise Repository Knowledge Extraction
LLM-based coding agents operating at enterprisescale require accurate, structured context about organizationalcodebases—which repositories exist, what capabilities they ex-pose, how services interconnect, and what APIs are available.We present a five-phase automated enrichment pipeline thatconstructs this context substrate from raw GitHub repositories:(1) GitHub API crawl with intelligent file prioritization, (2) deter-ministic metadata extraction via regex and configuration parsing,(3) AST-based code analysis using tree-sitter for endpoint anddependency detection, (4) LLM-based capability summarizationwith structured output, and (5) vector embedding generationfor semantic search. The pipeline processes approximately 900repositories across 80+ development teams at a Fortune 50 re-tailer, extracting over 4,400 capabilities, more than 3,300 servicedependency edges, and generating 3,072-dimensional embeddingsper entry. New repositories are enriched on demand. Thesystem includes monorepo detection that automatically createssub-application documents, enabling resolution to specific sub-paths. Validated by 40+ teams who manually reviewed theirown enriched entries, the pipeline achieves approximately 95%accuracy across 60 evaluated repositories, with the 5% miss rateattributable to scan depth limitations. The enriched catalog en-ables a downstream scope resolution algorithm to achieve 94.6%success across 879 autonomous pipeline executions, demonstrat-ing that accurate context engineering is the critical enabler foragentic software development at enterprise scale
Authors
- Avasarala Papa Rao (ORCID: https://orcid.org/0009-0006-6674-0337)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-06-17
- DOI
- https://doi.org/10.5281/zenodo.20738591
- Primary Topic
- Software System Performance and Reliability
- Type
- article
- Field-Weighted Citation Impact
- 0.00