Habr AI→ original

GitHub Copilot: как заставить нейросеть соблюдать ваши правила кода

GitHub Copilot наконец-то повзрослел. С выходом VS Code 1.106 разработчики получили возможность создавать Custom Agents — специализированных помощников, которые

AI-processed from Habr AI; edited by Hamidun News
GitHub Copilot: как заставить нейросеть соблюдать ваши правила кода
Source: Habr AI. Collage: Hamidun News.
◐ Listen to article

Imagine you've hired a very talented but completely forgetful intern. He writes code exceptionally well, knows all modern libraries, but every morning you have to explain anew that in this project we don't use Redux, and documentation lives in a strictly defined folder. Until recently, that's exactly what working with GitHub Copilot looked like. You spent precious minutes "feeding" the chat with necessary files or reminding for the hundredth time about architectural patterns adopted by the team. The standard @workspace agent works well as a universal tool, but its "averaging" often became a bottleneck for experienced developers. When AI suggests technically correct but stylistically alien solutions to your project, it's not help—it's additional refactoring work.

The situation changed with the release of VS Code version 1.106. Developers from GitHub and Microsoft finally heard the groans of those tired of endless copying of instructions into the chat window. Custom Agents appeared—a mechanism that transforms Copilot from a random fellow traveler into a permanent employee who knows all your internal regulations. Now, instead of pointing out the peculiarities of your stack to the AI each time, you can create a specialized role. This could be a security expert who checks code against internal checklists, or a frontend architect who knows all the nuances of your custom component library. The point is that context no longer needs to be imposed manually—it becomes part of the agent's personality.

Configuration of such assistants is implemented with maximum pragmatism. Microsoft offered two paths: through the VS Code visual interface for those who love clarity, and through configuration files for automation enthusiasts. In the github-copilot.json file, you can now write not just a set of instructions, but an entire knowledge ecosystem. You tell the agent which files to rely on first, what external documentation to consider, and what rules to follow when generating responses. This is a fundamental shift in user experience. If before you adapted to the logic of the neural network, now the neural network adapts to your workflow. You literally create a snapshot of your experience and pass it to the algorithm.

Why is this important right now? The industry is gradually moving away from euphoria about "just smart chats" and transitioning to a stage of deep AI integration into production pipelines. We no longer want to simply "generate a function," we want that function to fit perfectly into the existing project, taking into account all the workarounds, legacy code, and brilliant architectural discoveries from the past year. Custom Agents solve the problem of cognitive load on the developer. You no longer need to keep in mind what exactly Copilot knows about your project at any given moment. You simply call the right agent and get a result that meets your expectations 90% of the time instead of the usual 60%.

Of course, this is just the beginning of the path toward fully autonomous agents, but a rather significant step. In the future, we will surely see marketplaces for such custom roles or the ability to share them within teams through a repository. For now, this is a great opportunity to reconsider your approach to pair programming with AI. If you're still using the standard chat for complex project tasks, you're simply overpaying with your time for the unwillingness to set up the tool once. Configuring your own agent takes ten minutes and saves the hours that previously went into fixing "hallucinations" or averaged advice from a universal algorithm.

The key point: Microsoft is betting on personalization and narrow specialization. Will custom agents be able to completely free us from manual context management, or will we just get another layer of configurations to keep track of?

ZK
Hamidun News
AI news without noise. Daily editorial selection from 400+ sources. A product by Zhemal Khamidun, Head of AI at Alpina Digital.

Want to stop reading about AI and start using it?

AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.

What do you think?
Loading comments…