Context Engineering for Java Ecosystem

Microsoft Developer, featuring Ayan Gupta and Bruno Borges, showcases advanced context engineering techniques in Java using GitHub Copilot and Visual Studio Code to streamline developer workflows and AI interactions.

Context Engineering for Java Ecosystem

Presented by Ayan Gupta & Bruno Borges | Microsoft Developer

Introduction

Context is crucial when it comes to AI-assisted development. In this episode, Bruno Borges demonstrates how context engineering enables you to get the most out of GitHub Copilot in large Java projects. The right context—just like the right coffee brewing method—makes a huge difference in the quality of AI-generated assistance.

What Is Context Engineering?

Context engineering is about strategically providing information so that AI tools like Copilot generate relevant, high-quality output. Instead of issuing repetitive prompts, developers can predefine standards and intentions, shaping Copilot's code suggestions project-wide.

Three VS Code Features for Better AI Context

  1. Custom Instructions

    • Use copilot-instructions.md to set global or project standards (e.g., “always use Java 25 syntax” or “include humor”).
    • Automatically applies guidance to Copilot’s output.
  2. Chat Modes

    • Create specialized chat modes like ‘planner’ that focus on tasks such as generating implementation plans or code architectures rather than code.
    • Helps teams plan features before coding them.
  3. Prompt Files

    • Save reusable prompts for common tasks.
    • Example shown: Quickly trigger a prompt to analyze code for bad practices without leaving VS Code or copy-pasting from old notes.

Framework-Specific Instructions

Java 25 Language Features

Practical Workflow Benefits

Demonstrated Tasks

Best Practices for Context Engineering

Additional Resources


Harnessing context engineering will help you maximize AI assistance and streamline your Java development process in VS Code.