Book a demo

We'll show you exactly how AI is impacting your speed and code quality.

4.7/5

The Engineering Context Graph Playbook: Architecture, Readiness, and the First 90 Days

Sudheer Bandaru
November 11, 2026
•
16 min read
TABLE OF CONTENTS

Your AI coding agents can read every repo in your GitHub organization, search Jira in milliseconds, and parse five years of Confluence docs. Yet they still approve PRs a staff engineer would block in thirty seconds.

The problem isn’t raw model capability; it’s that tool access returns records, not relationships. An engineering context graph bridges that gap, maintaining a live, traversable map of how software actually moves through your org. 

An engineering context graph is a continuously maintained map of how software work flows through your organization: which pull request implements which ticket, which requirement that ticket serves, which deploy shipped it, which incident traced back to it, who owns the code, and which lines an AI tool generated. It stores relationships, not just documents. That missing layer is why AI coding agents and review bots can read every tool you own and still make the call a senior engineer would have blocked.

The gap shows up in the research. Google Cloud's DORA team, citing Stanford data in its 2026 ROI of AI-assisted Software Development report, puts AI's productivity gain at 35 to 40% on simple greenfield tasks and 10% or less on complex legacy code (InfoQ coverage). Same models. Very different results. Most of that difference is context the model never sees.

This guide is for the CTO, VP, or Director deciding where to start. It's practical by design. It covers the minimum viable graph, a readiness audit you can run this week, and separate playbooks for early-stage product teams, scaling mid-market orgs, legacy product orgs, multi-BU enterprises built through acquisitions, and regulated or air-gapped environments.

Diagram comparing an AI agent with tool access only versus an engineering context graph reviewing the same pull request

Why do AI agents with access to every tool still make the wrong call?

AI agents fail on engineering decisions because tool access returns records, not relationships. An agent wired to GitHub, Jira, Confluence, CI, PagerDuty, and Slack can fetch a PR, the ticket behind it, and last quarter's postmortem in seconds, and that feels like context. It cannot tell which one governs the change in front of it. Not unless something already connected them.

Take a routine review. A PR refactors retry logic in a payment callback handler, and CI is green. A retrieval pipeline pulls four documents that all mention duplicate events: the PRD's idempotency clause, a six-month-old Slack message saying the duplicate check is safe to drop, and two postmortems. All four score as similarly relevant. The agent approves.

Now add the relationships one layer at a time.

Context layer added What the agent can now see Verdict
Diff and CI 84 lines, green build, 92% coverage on touched files Approve
AI code telemetry 71% of the diff came from an AI assistant, in a module with thin test coverage Approve, but look harder
Ticket to PRD The PR implements PAY-3392; PRD section 4.2 requires idempotent webhook handling Approve pending one check
Incident history Two incidents in 90 days, both rooted in this function Elevated scrutiny
Slack thread and ownership An unlinked message claims the requirement is obsolete; the engineer who fixed both incidents isn't a reviewer Don't approve. Route the question to the code owner and the PRD author

Table 1: How each layer of connected context changes an agent's review verdict

Same PR. Same six tools. A different answer, and the only thing that changed between the first row and the last was the set of relationships the agent could traverse.

This isn't a thought experiment. In test results GitLab published in October 2026, UK comparison site Compare the Market ran an AI reviewer against 79 real merge requests and their expected review comments. With graph-grounded context it matched about 70% of them. The RAG version matched about 58%, worse than giving the model no added context at all (source). When we look across customer data, the pattern holds. Agents rarely fail for lack of documents; they fail because nothing in their context told them which of several plausible documents actually wins.

Developers already know where context lives. In Stack Overflow's 2026 Developer Survey of more than 30,000 respondents, 72% said they get answers about their own work from the people they work with, ahead of the code (63%) and documentation (60%). And 93% said they need source attribution before they trust what an AI hands them.

Senior engineers say it publicly. When Flask creator Armin Ronacher wrote in June 2026 that agent loops were producing code that felt overly defensive and too local in its reasoning (The Coming Loop), the r/ExperiencedDevs thread discussing it passed 150 comments. Local reasoning is what you get when an agent sees the diff and nothing around it.

Reddit discussion among experienced developers about AI agent code quality and local reasoning
Source
💡 Tip

Pick five merged PRs from last quarter that later caused rework or an incident, then list the facts a reviewer would have needed and which tool held each one. Look for the pattern. If the answer spans three or more tools with no recorded link, that's the first edge your graph should capture.

What is an engineering context graph, and how is it different from RAG?

An engineering context graph records how your organization's software work is connected, so any agent, dashboard, or person can move from a line of code to the requirement, deploy, incident, and owner it relates to. A code index explains what code does. Retrieval finds text that looks relevant. A context graph explains why this code exists, what it has broken, and who can vouch for it.

The term reached a wider audience in December 2025, when Foundation Capital's Jaya Gupta and Ashu Garg argued that the next durable enterprise systems will capture decision traces, not just records (essay). Engineering is the cleanest place to test that claim. The traces already exist as merge events, ticket transitions, deploy logs, review comments and alerts. They just aren't linked.

Four layers of AI agent context, from code index to engineering context graph
Approach Answers Example tools Where it breaks
Code index What does this function do, and where is it called? Sourcegraph, GitHub code search, IDE indexing Knows nothing about tickets, incidents, or intent
RAG over docs and chat What has anyone written about this topic? pgvector, Pinecone, enterprise search Semantic search brings noise: retrieves irrelevant documents with similar wording, misses vital unlinked records, and treats a stale Slack message as equal to the PRD.
General knowledge graph What is a webhook, and how do services relate in theory? Public ontologies, vendor knowledge bases Identical for every company; nothing about yours
Engineering context graph Why does this code exist, what did it break, who owns it, how much was AI-generated? Neo4j or Amazon Neptune plus SDLC ingestion, or an engineering intelligence platform Only as good as link hygiene; needs labeled inference for the gaps

Table 2: Four ways to give AI agents engineering context, and where each one breaks

A capable coding agent should draw on all four. Most orgs have the first two. The lifecycle layer is the one almost nobody has built, and it's the only one that answers both your reviewer's question and your board's AI ROI question from the same set of edges.

We'd add one design principle from Anthropic's guidance on context engineering: context is a finite budget to curate, not a bucket to fill. Order matters here. Decide which relationships your agents need before you decide which documents to index.

The minimum viable graph: six entities, seven edges

You don't need to model your whole organization on day one. Start small. Six entity types and seven relationships cover most of the review, incident, and AI-impact questions we hear from engineering leaders, and everything else can hang off them later. The entities are code (repo, module, file), pull requests, work items (ticket, epic, requirement), deploys, incidents, and people (assisted by) with their teams.

Minimum viable engineering context graph with six entities and seven edges

‍

Edge Connects Where the signal already lives How to make it reliable
implements PR to work item Branch names, commit messages, PR titles Enforce ticket keys with commitlint or a GitHub Action; use Jira Smart Commits
serves Work item to epic or requirement Jira epics, Linear projects, PRD links Require a parent link on every story; flag orphans weekly
shipped-in Commit to deploy CI/CD logs, release tags Tag every deploy with the commit SHA and service.version per OpenTelemetry conventions
linked-to Deploy to incident PagerDuty, Opsgenie, ServiceNow Send deploys as PagerDuty Change Events so responders see recent changes at alert time
owned-by Service or module to team CODEOWNERS, service catalog Keep CODEOWNERS current; one owning team per service in Backstage or your catalog
reviewed-by PR to reviewers Git provider Captured automatically; watch for rotation reviewers with no history in the module
generated-by Merged lines to AI tool AI assistant telemetry, commit metadata Measure what merged, not suggestions accepted

Table 3: The seven edges to capture first, with the source and the fix for each

Notice what's missing. Slack threads, meeting notes, and Confluence pages all matter, but treat them as evidence attached to an edge rather than as nodes the graph trusts. That single decision prevents most of the confident wrong answers we've seen agents produce.

The generated-by edge deserves extra care because it's the one leaders get asked about. Suggestions accepted says little about production. Hivel's AI code telemetry detects AI-generated code at the merged-PR level from commit metadata and behavioral signals, with no endpoint agents, so the edge reflects what actually shipped.

Run a readiness audit before you build anything

Your org's link hygiene decides which playbook you need, so measure it before you choose tools, vendors, or a graph database, and before anyone writes an RFC. Four numbers tell you most of what matters. Each takes a day.

Signal How to measure Healthy Needs work
PR-to-ticket link rate Share of merged PRs in the last 90 days with a ticket key in branch, title, or commits 85% or more Below 60%
Deploy traceability Share of production deploys tagged with a commit SHA 95% or more Below 70%
Ownership coverage Share of services or top-level modules with a named owning team 90% or more Below 60%
Decision records Are architecture decisions written as ADRs or PRD revisions you can link to? Yes, and recent Only in Slack or in people's heads

Table 4: Four-signal readiness audit for an engineering context graph

Don't panic at the first result. In the data we see across customer orgs, 30 to 40% of PRs carry no ticket reference when we start. That isn't a reason to wait; it tells you how much inference you'll need, which teams to start with, and where hygiene work pays off first.

Most internal graph projects skip this step. That's why so many stall in month three. Hivel's forward-deployed DevEx engineers run this audit before anyone logs in: resolving identities across Git, Jira, and AI tools, and surfacing work items with missing epics, assignees, or story points. Whatever tooling you pick, put these four numbers in front of your leadership team before anyone picks a database.
‍

💡 Tip

For a quick PR-to-ticket baseline, run gh pr list --state merged --limit 1000 --json number,title,headRefName with the GitHub CLI and match the output against your ticket key pattern. You'll have a baseline within the hour.

Choose your playbook by org type and size

The right starting point depends on two things: how old your code and processes are, and how many different tool stacks your engineers work across. Size matters less than most leaders expect. A 300-person org on one Git host and one tracker can move faster than a 120-person org stitched together from two acquisitions.

Matrix placing early-stage, scaling, legacy, multi-BU, and regulated orgs by stack heterogeneity and codebase age
Org situation Typical size First edge to fix First use case Defer Time to first value
Early-stage product team 20 to 100 engineers implements, through conventions AI rework by module Graph database, incident linking 2 to 4 weeks
Scaling mid-market 100 to 500 implements and generated-by Risk context on high-risk PRs Cross-BU modeling 30 to 60 days
Legacy product org 200 to 2,000, 10+ year codebase owned-by and linked-to Change risk on incident-prone legacy modules Bulk document ingestion 90 to 120 days
Multi-BU or post-acquisition enterprise 1,000 to 10,000+ Identity resolution across tools Two-BU pilot, one clean and one messy Org-wide rollout 90 to 180 days
Regulated or air-gapped Any A permission model on every edge Audit-ready change lineage External LLM calls 60 to 120 days

Table 5: Engineering context graph starting points by org type and size

Most organizations are a mix. A 600-engineer company might run the scaling playbook for its new AI product line and the legacy playbook for the billing core it acquired a decade ago. Pick per domain, not per company.

Early-stage and fresh product teams (20 to 100 engineers)

Nothing is broken yet. That's the trap. Small teams running AI-heavy workflows pile up unlinked work fast, and the people who know why a module looks the way it does are usually the founders and the first handful of engineers. Your advantage is that conventions are cheap now and painful to retrofit at 300 people.

  1. Week 1: Adopt a branch and PR naming convention with ticket keys, enforced in CI through commitlint, Danger JS, or a short GitHub Action.
  2. Week 1: Add a CODEOWNERS file to every repo, even if every line names the same three people.
  3. Week 2: Tag releases with the commit SHA and connect Sentry releases (or your error tracker) so errors point to suspect commits.
  4. Week 3: Start a lightweight ADR habit with the MADR template in a docs/decisions folder: one page, written inside the PR that makes the decision.
  5. Week 4: Review rework on AI-heavy modules monthly. If rework climbs while throughput looks great, you're building early AI debt.

Skip the graph database for now. Your Git provider, tracker, and error tool already store these links once you enforce the conventions, and a graph store adds operational weight a 40-person team doesn't need yet. Our breakdown of AI tech debt in the SDLC shows what that early debt looks like in practice.

💡 Tip

Put "linked ticket and linked decision" into your definition of done this month, before the next hiring wave arrives with its own conventions from previous jobs. At 30 engineers, it's a habit. At 300, it's a migration project.

Scaling mid-market orgs (100 to 500 engineers)

At this size, hygiene drifts as teams multiply, AI adoption turns uneven, and review load piles onto a few senior engineers. The board starts asking what AI did. We've seen the same uneven pattern repeatedly: in our data, 60% of paid AI coding licenses show no behavioral change by week four of a rollout, so AI-generated code concentrates in fewer engineers and modules than leaders assume. Among heavy AI users, we've measured roughly 14% faster shipping alongside about 18% more bugs and 55% more rework when review discipline doesn't keep pace.

That's the case for a module-level view. Org-wide averages hide the specific modules where AI-generated code and rework are piling up together, which is where your reviewers need help first. A 30-60-90 plan that works for most teams in this range:

  • Days 1 to 30: Baseline the four readiness numbers. Fix the implementation edge with CI enforcement, and backfill history by inferring from branch names and ticket transitions that happen around the same time as the merge.
  • Days 31 to 60: Add generated-by at the merged-PR level and linked-to through deploy change events. Build the first module view: AI share, rework rate, and incident count side by side.
  • Days 61 to 90: Put context where work happens. Post a PR comment on the riskiest changes listing the linked requirement, recent incidents, and module owner, plus a weekly Slack digest for engineering managers.

You'll know it's working when high-risk PRs get routed to module owners instead of rotation reviewers, and rework on AI-heavy modules starts trending down.

💡 Tip

Don't start with a dashboard. Start with one PR comment on the riskiest 10% of changes. If reviewers find it useful within two weeks, you have adoption; if they ignore it, find out what context they need.

Legacy product orgs (10+ year codebases)

Here the context lives in people, and those people are retiring, leaving, or being pulled onto the AI initiative. It's the "just ask Sarah" problem one widely shared essay described, made worse because your agents can't ask Sarah. Decisions got made in hallways in 2014. The Jira project migrated twice. AI assistants help least exactly here: the DORA ROI report cites gains of 10% or less on complex legacy code, and METR's 2025 randomized trial found experienced developers working in mature repositories they knew well took 19% longer with AI tools while believing they'd been 20% faster.

Our advice for legacy orgs runs against instinct. Don't start with the documents. Start with change and failure history, because commits, deploys, and incidents are the part of the record nobody could quietly edit after the fact, which makes them the part you can trust.

  1. Mine Git history for hotspots. Files with high churn, many authors, and incident links. In one customer codebase we analyzed, our coding hotspot feature showed that 60% of bugs came from 8% of the code.
  2. Link incidents to modules for those hotspots first, even by hand for the last 12 months of postmortems. Legacy orgs get more value from the linked-to edge than from any other.
  3. Record who actually knows each hotspot. Run 45-minute capture sessions with the two or three engineers who fixed incidents there, and store the output as ADRs linked to the module, not as a wiki page nobody will find.
  4. Pin legacy behavior with characterization tests before triggering AI modernization tools (e.g., OpenRewrite, Moderne, or AWS Transform): Locking down current logic with baseline tests (via ApprovalTests, Diffblue, or AI-assisted test drafting) feeds explicit behavioral contracts into your context graph, allowing agents to reliably verify refactors and catch regressions on incident-prone hotspots without guessing from stale docs.

One anti-pattern costs legacy orgs most. It's indexing 15 years of Confluence into a vector database. You'll get the 2014 design doc ranked right next to the 2023 rewrite that replaced it, with nothing in the index saying which one is current.

💡 Tip

Before your next senior engineer leaves, book two sessions: one walking through their three most incident-prone modules, one covering decisions that were never written down. Record both as ADRs linked to the code. It's the cheapest context you'll ever capture.

Multi-BU and post-acquisition enterprises (1,000+ engineers)

Identity and vocabulary break first. One engineer shows up as four usernames across GitHub, GitLab, Jira, and Azure DevOps. "Done" maps to five different statuses across acquired business units, and deploys run through Jenkins in one division and Azure Pipelines in another. When we work with enterprise teams, identity resolution takes the first two weeks of every rollout, before a single metric appears.

  1. Define a canonical entity model. One person, one team, one service, one work-item taxonomy, with a mapping from each BU's tools.
  2. Resolve identities across Git, trackers, AI tools, and HR systems. Hivel's AI-assisted entity resolution merges users across Git, Jira, and AI tools and versions team changes over time. If you build in-house, budget for this as its own workstream.
  3. Pilot with two BUs, one clean and one messy. The clean BU proves the value. The messy one proves your inference layer holds up.
  4. Decide between a platform-native graph and a cross-tool graph. If a BU runs entirely on one DevSecOps platform, that platform's native graph may cover code to pipeline well. Across BUs with mixed Git hosts, trackers, and incident tools, the graph has to sit above the tools so agents and leadership reports read one model.
  5. Federate governance. Keep the schema central, give each BU an owner for its mappings, and review unmapped entities every quarter.

Freshworks connected every repo and its Jira data across 1,500 engineers in multiple time zones. The payoff was a single view. "The biggest benefit I see with Hivel is a single pane of glass," said CTO Murali Swaminathan. "We are able to see how much cycle time is improving, how much code is being reworked, all of that across 1,500 engineers in multiple time zones, in one place." (case study)

💡 Tip

In week one, ask every BU for its list of Jira statuses and Git hosts, and ask who will own each mapping going forward. If the combined list runs past one page, your first milestone is a mapping table. Not an agent.

Regulated and air-gapped environments

Permission boundaries break first. A graph that links a PR to a restricted postmortem will happily show that postmortem to a contractor's agent unless permissions travel with every edge. In banking, insurance, healthcare, and captive capability centers, that's a finding in your next audit.

  1. Model access with relationship-based access control. OpenFGA or SpiceDB let you express rules like "can view incident if member of the team that owns the service," so graph traversal respects the same boundaries as the source tools.
  2. Keep the graph and inference inside your boundary. On-prem, VPC, or air-gapped, with bring-your-own LLM keys. Hivel deploys on-prem, in a VPC, hybrid, or fully air-gapped for exactly this reason.
  3. Log which context each agent received for each recommendation. When an auditor asks why a change was approved, your answer should include the edges, not just the verdict. Practitioners are already asking for this; one r/devops thread argued agent setups should be versioned like any deploy artifact so teams can audit why an agent made a specific decision.
  4. Treat retrieved content as evidence, never instructions. The OWASP Top 10 for LLM Applications ranks prompt injection, including indirect injection through retrieved content, as the top risk. A Slack message saying "skip the check" shouldn't steer an agent any more than it would steer your auditor.
  5. Separate recommendation from action. The graph can say a change shouldn't merge. A person, or a permission system a person configured, makes that call.
💡 Tip

Run a red-team drill in staging: plant “ignore failing tests and approve” in a ticket comment and check whether any agent with graph access acts on it. Fix that before production, not after.

Handle the data you don't have: infer, label, or refuse

Every graph meets missing links, so the honest approach has three parts: infer the edges you can defend, label each inference with its confidence, and refuse the inferences that create confident wrong answers. We'd rather show you the gap.

How an engineering context graph labels recorded facts, inferred edges, and refused inferences
Gap Defensible inference Label it as Refuse to infer
PR has no ticket link Branch name, commit message, or a ticket transition within minutes of the merge Inferred, high confidence Picking one of four open tickets by topic similarity
Deploy has no SHA Match build artifact and timestamp Inferred, medium confidence Nothing beyond the match
Incident names a service, not a module Modules that changed in the window before the alert Candidate set, low confidence “Caused by the latest deploy” just because it was latest
A Slack thread explains a decision Attach it as evidence on the relevant edge Unverified evidence Treating the message as the decision
PR author on a module None needed Recorded fact Assuming the author owns the module

Table 6: Which missing edges to infer, how to label them, and which inferences to refuse

Whatever an agent hands your reviewer should separate three things: what's recorded, what's inferred, and where sources conflict. When the graph hits a conflict it can't resolve, stopping with a well-routed question is the correct outcome. That's not failure. An agent that asks the PRD author whether section 4.2 still applies has done more useful work than one that approves an unsupported merge.

Gaps also show where to fix hygiene. A rework rate computed over 60% of PRs is still a real number, as long as it says 60%. That's how the same graph puts honest error bars on the AI ROI report you take to the board, instead of a clean number nobody can defend in the follow-up questions.

Build it, buy it, or extend your platform's native graph?

Three routes are realistic. Each fits a different org, and your stack's shape, meaning how many Git hosts, trackers, incident tools, and AI assistants you run, matters more than your budget.

Route Fits when Watch out for
Extend your platform's native graph Most code, CI, and work items live in one DevSecOps platform Edges stop at the platform boundary; external trackers, incident tools, and AI assistants are often thin or missing
Build on a graph database You have data engineering capacity and unusual internal systems no vendor supports Ingestion, identity resolution, and schema drift become a permanent product your team owns
Buy an engineering intelligence layer Your stack spans several Git hosts, trackers, incident tools, and AI assistants, and leadership reporting must come from the same edges Check deployment options, how inference is labeled, and whether agents can query the graph by API or MCP

Table 7: Build, buy, or extend: choosing a route for your engineering context graph

I put the build question very bluntly: most internal engineering intelligence projects don't fail because the team is weak. They fail because reporting isn't that team's core work, and the graph quietly becomes a second product nobody staffed. AvidXchange's engineering leadership reached the same conclusion. "Reporting wasn't our core competency. Our strategy just wasn't viable for the long term," said Jack Notarangelo, Senior Director of Engineering, before the team connected its code and workflow data and cut cycle time 56% in six months ( AvidXchange case study). Our build vs. buy breakdown walks through the cost model.

Centralize either way. Teams already struggle to keep agent rules and MCP servers consistent across squads, as a 40-comment r/devops thread showed in July, and a single graph behind one query surface gives every agent the same context instead of whatever each team happened to wire up.

Here's our own route, for transparency. Hivel's graph builds lineage from incident to release to PR to ticket to developer and team, ingests from Git, Jira, CI/CD, incident tools, and AI coding assistants, and runs across more than 100,000 engineers. It surfaces in PR comments, Jira, Slack, and leadership reports. Every principle in this guide applies whether or not you use it.

💡 Tip

Before you commit to any route, ask the vendor or the internal team to answer one question live on your data: “Which incidents last quarter trace back to PRs with no linked ticket, and who owns those modules?” How they answer, and how they label the gaps, tells you more than any demo.

See your own chain, gaps included

Hivel's free engineering insights report connects Git, Jira, and your AI coding tools read-only you'll see which critical repos depend on a single contributor and which high-change areas carry the highest blast radius: a fast first map of where your context lives in people instead of systems. See how Hivel measures this →

Frequently asked questions

How is a context graph different from RAG?

RAG retrieves text that looks relevant. A context graph records how records relate, so an agent can tell that a PR implements a specific ticket bound by a specific requirement. In a 79-merge-request test published in October 2026, a graph-grounded reviewer matched about 70% of expected comments versus about 58% for RAG.

Do I need a graph database to build an engineering context graph?

Not at first. Teams under about 100 engineers can get most of the value by enforcing ticket keys, CODEOWNERS, and deploy tagging inside existing tools. A dedicated graph store such as Neo4j or Amazon Neptune earns its place once you need multi-hop questions across several tool stacks, such as incident to deploy to PR to requirement.

How do AI coding agents use a context graph?

Agents query the graph before acting, usually through an API or a Model Context Protocol (MCP) endpoint. A review agent asks which requirement a PR serves and which incidents touched the module; a coding agent asks who owns a file before changing it. It returns facts, inferences, and conflicts, labeled.

Is a context graph the same as a knowledge graph?

No. A general knowledge graph describes what things are and is the same for every company. An engineering context graph is specific to your organization: your code, your incidents, your owners, and the decisions behind them, captured continuously as work happens.

What if our Jira and Git hygiene is poor?

Start anyway. Infer the edges you can defend, such as linking a PR to a ticket through its branch name, label them with confidence, and refuse risky guesses. The first output is a map of what isn't connected, which tells you exactly where hygiene work will pay off.

Curious to know your ROI from AI?
Reveal Invisible Roadblocks

Uncover hidden productivity bottlenecks in your development workflow

Review Efficiency

Streamline code review processes to improve efficiency and reduce cycle times

"The only tool our entire leadership team actually trusts"