Should a Tech Lead Prepare AI Instructions for the Team?

AI is no longer just a tool. It's an assistant that can be integrated into daily development. But like any newcomer to a team, it's only effective when given clear instructions. Why is this important for a tech lead? AI as a new team member Imagine: a newcomer joins your team. They're fast and can work with a large amount of context, but they don't know your architectural approaches, where things are located in the project, or what "good code" looks like. Without instructions, they'll start acting chaotically. Quality of instructions = quality of results AI doesn't guess intentions. What you tell it is what you'll get. Instructions need to be clear and structured. Simple examples: ❌ "Process the order" ✅ "Write a Go function that processes a JSON order, saves it to Postgres, and logs it to Redis." ❌ "Check my code" ✅ "Analyze this JavaScript code for potential memory leaks and security vulnerabilities, especially in user data processing functions." ❌ "Do refactoring" ✅ "Refactor this React component by splitting it into smaller sub-components following the single responsibility principle. Apply hooks instead of class components and use TypeScript for props typing." Teams are changing how they work Developers are shifting from "writing code" to "managing the code creation process." And AI is a great tool if used correctly. What should be in AI instructions? Prompt templates: Create and store ready-made queries in Markdown files. This allows you to quickly apply proven templates with minimal changes for different tasks — writing tests, refactoring, fixing bugs. Defining AI responsibility boundaries: Clearly define which tasks can use AI and which cannot. Critical code, especially related to security and financial operations, should always be verified by humans. Workflow integration: Document the prompts used in Pull Request descriptions. This helps colleagues understand how the code was generated and use similar approaches in the future. Store successful prompts as part of project documentation. Team training: Organize regular sessions where developers can share effective AI practices and demonstrate which approaches work best for your project. Examples of prompts that not every AI agent will understand Write a Go function that transforms regular numbers into success spells for your sprint. No external libraries, but with an extra portion of humor. Rewrite this function so that even a sleepy junior at 6 AM can understand what's happening here. And let the code shine like a star on a Christmas tree! Create unit tests that check this function with such thoroughness as if it controls a space rocket launch. Use testify, but add funny comments about each test case. Development cycle with AI AI doesn't just help write code. It changes the entire approach to development. Here's what a modern development cycle might look like when AI is part of daily work. Explanation of stages: Task Definition — clear requirement specification for AI. Detailed technical descriptions of the task yield better results. AI: Prompt Creation — developer creates structured instructions that precisely communicate the code requirements. AI: Code Generation — process where AI creates code based on the prompt that should meet the specified requirements. Manual Code Review — important step of checking the generated code for compliance with project standards and requirements. Testing — verifying code functionality through automated and manual tests. Thorough testing helps identify hidden errors. AI: Refactoring or Optimization — improving the initial code version with more specific requirements and context in mind. Code Review with prompt description — team discussion not just of the code, but also the approach to formulating the task for AI. Merge and deploy — final stage where the verified code is integrated into the project and deployed in the production environment. What will the team gain? Development acceleration (up to +30% on typical tasks and +200% on coming up with excuses for the manager) Fewer errors in simple parts of code (and more creative errors in complex ones) More focus on creative solutions (and on scrolling Reddit while AI works)

Apr 15, 2025 - 11:37
 0
Should a Tech Lead Prepare AI Instructions for the Team?

AI is no longer just a tool. It's an assistant that can be integrated into daily development. But like any newcomer to a team, it's only effective when given clear instructions.

Why is this important for a tech lead?

AI as a new team member

Imagine: a newcomer joins your team. They're fast and can work with a large amount of context, but they don't know your architectural approaches, where things are located in the project, or what "good code" looks like. Without instructions, they'll start acting chaotically.

Quality of instructions = quality of results

AI doesn't guess intentions. What you tell it is what you'll get. Instructions need to be clear and structured. Simple examples:

  • ❌ "Process the order"
  • ✅ "Write a Go function that processes a JSON order, saves it to Postgres, and logs it to Redis."

  • ❌ "Check my code"

  • ✅ "Analyze this JavaScript code for potential memory leaks and security vulnerabilities, especially in user data processing functions."

  • ❌ "Do refactoring"

  • ✅ "Refactor this React component by splitting it into smaller sub-components following the single responsibility principle. Apply hooks instead of class components and use TypeScript for props typing."

Teams are changing how they work

Developers are shifting from "writing code" to "managing the code creation process." And AI is a great tool if used correctly.

What should be in AI instructions?

  1. Prompt templates: Create and store ready-made queries in Markdown files. This allows you to quickly apply proven templates with minimal changes for different tasks — writing tests, refactoring, fixing bugs.

  2. Defining AI responsibility boundaries: Clearly define which tasks can use AI and which cannot. Critical code, especially related to security and financial operations, should always be verified by humans.

  3. Workflow integration: Document the prompts used in Pull Request descriptions. This helps colleagues understand how the code was generated and use similar approaches in the future. Store successful prompts as part of project documentation.

  4. Team training: Organize regular sessions where developers can share effective AI practices and demonstrate which approaches work best for your project.

Examples of prompts that not every AI agent will understand

Write a Go function that transforms regular numbers into success spells for your sprint. No external libraries, but with an extra portion of humor.

Rewrite this function so that even a sleepy junior at 6 AM can understand what's happening here. And let the code shine like a star on a Christmas tree!

Create unit tests that check this function with such thoroughness as if it controls a space rocket launch. Use testify, but add funny comments about each test case.

Development cycle with AI

AI doesn't just help write code. It changes the entire approach to development. Here's what a modern development cycle might look like when AI is part of daily work.

Development cycle with AI

Explanation of stages:

  • Task Definition — clear requirement specification for AI. Detailed technical descriptions of the task yield better results.
  • AI: Prompt Creation — developer creates structured instructions that precisely communicate the code requirements.
  • AI: Code Generation — process where AI creates code based on the prompt that should meet the specified requirements.
  • Manual Code Review — important step of checking the generated code for compliance with project standards and requirements.
  • Testing — verifying code functionality through automated and manual tests. Thorough testing helps identify hidden errors.
  • AI: Refactoring or Optimization — improving the initial code version with more specific requirements and context in mind.
  • Code Review with prompt description — team discussion not just of the code, but also the approach to formulating the task for AI.
  • Merge and deploy — final stage where the verified code is integrated into the project and deployed in the production environment.

What will the team gain?

  • Development acceleration (up to +30% on typical tasks and +200% on coming up with excuses for the manager)
  • Fewer errors in simple parts of code (and more creative errors in complex ones)
  • More focus on creative solutions (and on scrolling Reddit while AI works)