Skip to main content

Overview

The Experts feature in HAI Build enables context-aware code generation tailored to specific technologies, frameworks, or domain standards. You can use built-in experts or create custom ones with your own guidelines and reference documentation.
Experts are currently an upcoming feature in HAI Build. Check the latest release notes for availability.

How Experts Work

Experts provide:
  • Technology-specific guidelines and best practices
  • Reference documentation for accurate code generation
  • Consistent coding standards across your team
  • Domain-specific context for AI-powered development
When you select an expert, HAI Build incorporates their guidelines into the AI’s context, ensuring generated code follows your standards.

Built-in Experts

HAI Build includes four built-in experts available in read-only mode:

.NET

Best practices for C# and .NET development

Terraform

Infrastructure as Code guidelines and patterns

Node.js

JavaScript/TypeScript server-side development

Go

Go language idioms and conventions
Built-in experts provide predefined guidelines for quick reference and cannot be modified.

Custom Experts

Create custom experts to define your own coding standards, architectural patterns, or domain-specific requirements.

Expert Structure

Custom experts are stored in the .hai-experts directory at your workspace root:

File Structure

Stores expert metadata and configuration:
string
required
Display name of the expert
string
required
ISO 8601 timestamp of creation
Up to 3 reference document URLs (optional)
Contains the expert’s guidelines and instructions (required):
Processed reference documents:
  • Markdown files for each document link
  • status.json tracks processing status

Creating a Custom Expert

1

Open Experts Interface

Navigate to the Experts section in HAI Build sidebar
2

Click Create Expert

Select “Create Custom Expert” to start the wizard
3

Enter Expert Details

Provide required information:
string
required
Descriptive name for your expert (e.g., “React Best Practices”)
markdown
required
Coding standards, patterns, and best practices in Markdown format
Up to 3 reference document URLs (optional)
4

Save Expert

HAI Build creates the expert folder structure in .hai-experts/
5

Process Documents (if provided)

HAI Build fetches and processes reference documents in the background

Example: React Expert

Create a React expert with your team’s standards: Expert Name: React Best Practices Guidelines (prompt.md):
Document Links:
  • https://react.dev/reference/react
  • https://testing-library.com/docs/react-testing-library/intro
  • https://styled-components.com/docs

Example: API Integration Expert

Create an expert for your API integration standards: Expert Name: API Integration Standards Guidelines (prompt.md):
Document Links:
  • https://axios-http.com/docs/intro
  • https://tanstack.com/query/latest/docs/react/overview

Using Experts

Once created, experts can be selected when starting a new task or conversation with HAI Build.
1

Select Expert

Choose the relevant expert from the dropdown when starting a task
2

Expert Context Applied

HAI Build incorporates the expert’s guidelines into the AI’s context
3

Generate Code

Code generation follows the expert’s standards and best practices
For consistent results across your team, commit .hai-experts/ to your repository (excluding any sensitive data).

Managing Experts

Editing Experts

To modify a custom expert:
  1. Navigate to .hai-experts/expert-name/
  2. Edit prompt.md or metadata.json
  3. Save changes
  4. Restart HAI Build or reload the expert

Deleting Experts

To remove a custom expert:
  1. Delete the expert folder from .hai-experts/
  2. Refresh HAI Build
Built-in experts cannot be modified or deleted.

Sharing Experts

Share experts with your team by:
  1. Committing .hai-experts/ to version control
  2. Excluding sensitive information from metadata.json
  3. Documenting expert usage in your team’s documentation

Reference Document Processing

When you provide document links, HAI Build:
  1. Fetches the content from the URLs
  2. Converts to Markdown format
  3. Stores in the docs/ folder
  4. Updates status.json with processing status

Document Limits

  • Maximum 3 document links per expert
  • Documents must be publicly accessible
  • Supported formats: HTML, Markdown, PDF (depending on implementation)

Status Tracking

Monitor document processing in status.json:
Status values:
  • pending - Processing not started
  • in_progress - Currently fetching/converting
  • completed - Successfully processed
  • failed - Error during processing

Best Practices

Be Specific

Provide clear, actionable guidelines rather than vague suggestions

Use Examples

Include code examples in guidelines to demonstrate patterns

Keep Updated

Regularly review and update expert guidelines as standards evolve

Version Control

Commit experts to git for team consistency and version history

Focus on Domain

Create experts for specific domains rather than general coding

Reference Quality Docs

Link to official documentation and authoritative sources

Troubleshooting

Check:
  • Expert folder exists in .hai-experts/
  • metadata.json is valid JSON
  • prompt.md exists and is not empty
  • Restart VS Code or reload HAI Build
Solutions:
  • Verify URLs are publicly accessible
  • Check status.json for error messages
  • Try removing and re-adding document links
  • Ensure network connectivity
Solutions:
  • Verify expert is selected before starting task
  • Check expert guidelines are clear and specific
  • Ensure expert folder structure is correct
  • Try recreating the expert
Built-in experts (.NET, Terraform, Node.js, Go) are read-only by design.Solution: Create a custom expert based on the built-in one:
  1. Copy guidelines from built-in expert
  2. Create new custom expert
  3. Modify as needed

Example Experts

Guidelines:
Guidelines:
Guidelines:

Next Steps

Settings

Configure extension settings

LLM Providers

Set up AI model providers

Telemetry

Configure monitoring and analytics