Graphite Reviewer is now Diamond

What is context awareness in AI?

Greg Foster
Greg Foster
Graphite software engineer
Try Graphite

AI is increasingly integrated into developer workflows, from code generation to review. But making AI tools truly useful requires more than just fast autocomplete or static checks. That’s where context awareness comes in.

Context-aware AI can interpret what you're building, why you're building it, and how everything connects. This is especially critical in tools like AI code generators or AI code review systems, where nuance matters.

Context awareness in AI refers to the system’s ability to interpret information in relation to its environment, user behavior, historical data, and current tasks. A context-aware AI system can adapt its responses and actions based on that understanding.

In practice, this means the AI takes into account:

  • The broader goal of the application.
  • The user’s intent or workflow.
  • Previous interactions or data states.
  • Relationships between different parts of the codebase.

When you use an AI code generator, like GitHub Copilot or Amazon Q Developer, you're experiencing a basic level of context awareness. These systems analyze the current file, surrounding functions, and comments to predict what code you want next.

However, these tools still struggle with deep context beyond the tabs in your IDE. They might not recognize your organization’s conventions, your app architecture, or security policies. That’s where more advanced tools come in.

Diamond, part of the Graphite platform, represents a more advanced implementation of context aware AI. It doesn’t just scan for syntax errors or flag TODOs—it understands the broader meaning behind the code.

For example:

  • It identifies logic bugs, like inverted conditions, by analyzing the structure and purpose of the function.
  • It spots platform-specific edge cases, such as the use of readlink -f which breaks on macOS.
  • It checks that documentation and comments reflect what the code actually does—not just what the dev intended.

screenshot of Diamond comment

Most importantly, Diamond integrates with your whole codebase. It understands how one pull request might impact others. This agentic AI code review model goes far beyond linters or static analysis tools.

When a generative AI model understands context, it can:

  • Write code that follows project-specific patterns.
  • Select libraries and APIs that align with your stack.
  • Avoid irrelevant or unsafe suggestions.

This kind of system reduces friction, avoids rework, and generates higher quality output.

With context-aware AI, code reviews become:

  • Faster: Diamond automates much of the review process with actionable suggestions
  • Smarter: it flags issues that typical linters miss
  • Less noisy: unlike other bots, Diamond avoids hallucinated or redundant comments

For high-velocity teams, this means fewer bugs in production and faster PR turnaround.

Here are some standout tools using context-aware models:

  • Diamond Agentic AI for intelligent, codebase-aware reviews. Understands logic, platform quirks, and documentation consistency.

  • GitHub Copilot Autocompletes code with awareness of local context, but limited by its lack of whole-project insight.

  • Codeium Other autocomplete tools that offer moderate context awareness, usually file-scoped.

  • Amazon Q Developer Trained on a broader body of work, useful for AWS-centric development, with some context adaptation.

As development environments grow more complex, tools that adapt to your project's structure, intent, and constraints will dominate. Context isn’t just a nice-to-have—it’s the differentiator between noisy automation and truly intelligent assistance. Whether you're generating code or reviewing it, context-aware AI tools like Diamond are raising the bar for software quality, speed, and safety.

Built for the world's fastest engineering teams, now available for everyone