
Experts in Action
What are Experts?
Experts are specialized AI assistants that:- Provide guidelines for specific technologies or domains
- Include best practices from industry standards
- Reference documentation for accurate code generation
- Maintain consistency across your codebase
- Reduce errors by following proven patterns
Experts integrate directly into the AI’s system prompt, influencing every decision it makes during code generation.
Built-In Experts
HAI Build includes four production-ready experts:.NET Expert
Expertise:
- ASP.NET Core web applications
- Entity Framework Core
- Dependency injection patterns
- C# best practices
- .NET ecosystem tools
- Web APIs and microservices
- Enterprise applications
- Azure cloud integrations
Terraform Expert
Expertise:
- Infrastructure as Code
- AWS, Azure, GCP providers
- Module design patterns
- State management
- Security best practices
- Cloud infrastructure provisioning
- Multi-cloud deployments
- Infrastructure automation
Node.js Expert
Expertise:
- Express.js and Fastify
- TypeScript for Node
- npm ecosystem
- Async patterns and promises
- Testing with Jest/Mocha
- Backend services
- REST and GraphQL APIs
- Serverless functions
Go Expert
Expertise:
- Idiomatic Go patterns
- Concurrency with goroutines
- Standard library usage
- Error handling
- Testing and benchmarking
- High-performance services
- CLI tools
- Distributed systems
Built-in experts are read-only and maintained by the HAI Build team. For customization, create a custom expert.
Custom Experts
Create your own experts tailored to your team’s needs:Create New Expert
Click “Create Custom Expert” and provide:
- Name: Descriptive identifier (e.g., “React with Redux”)
- Guidelines: Markdown-formatted best practices
- Document Links: Up to 3 reference URLs (optional)
Add Documentation (Optional)
Provide URLs to reference documentation:
- Official docs
- Internal wikis
- Best practice guides
Expert Storage Structure
Custom experts are stored in your workspace:- metadata.json
- prompt.md
- docs/
- status.json
Stores expert configuration:
Using Experts
Selecting an Expert
Expert-Guided Code Generation
Once an expert is active:- System Prompt Enhancement: Expert guidelines are injected into the AI’s system prompt
- Context-Aware Responses: AI follows expert’s best practices
- Consistent Patterns: Code matches your defined standards
- Documentation References: AI can cite expert documentation
Without Expert
Without Expert
User: “Create a React component for a user profile”AI generates:
With React Expert
With React Expert
User: “Create a React component for a user profile”AI generates (following expert guidelines):
Expert Guidelines Best Practices
Be Specific and Actionable
Be Specific and Actionable
❌ “Write good code”✅ “Use TypeScript strict mode. Always define return types for functions. Prefer
const over let.”Include Examples
Include Examples
Organize by Topic
Organize by Topic
Structure guidelines hierarchically:
Reference Authoritative Sources
Reference Authoritative Sources
Document Processing
When you add document links to an expert:Supported Document Types
- Web pages: HTML documentation
- GitHub README: Markdown from repositories
- API docs: OpenAPI/Swagger specifications
- PDFs: Technical guides (experimental)
Documents are re-processed when links change or every 30 days to ensure freshness.
Expert Use Cases
Team Standards
Codify your team’s conventions:
- Naming conventions
- File organization
- Comment styles
- Git commit formats
Framework Patterns
Enforce framework-specific patterns:
- Next.js app router conventions
- Django REST framework structure
- Spring Boot annotations
- Rails ActiveRecord patterns
Security Guidelines
Embed security best practices:
- Input validation rules
- Authentication patterns
- Secret management
- SQL injection prevention
Testing Standards
Define testing expectations:
- Unit test structure
- Integration test patterns
- Mocking strategies
- Coverage requirements
API Design
Standardize API development:
- RESTful conventions
- GraphQL schema design
- Error response formats
- Versioning strategies
Database Patterns
Guide database interactions:
- ORM usage
- Migration patterns
- Query optimization
- Transaction handling
Advanced Expert Features
Multi-Expert Scenarios
Scenario: Full-stack applicationCombining Experts with Other Features
- + HAI Tasks
- + Focus Chain
- + Custom Instructions
Apply experts to task execution:
- Load tasks from Specif AI
- Select appropriate expert (e.g., .NET for backend tasks)
- Execute tasks with expert guidance
- Consistent code across all task outputs
Editing Experts
Sharing Experts
Share experts across teams:Troubleshooting
Expert not appearing
Expert not appearing
- Check
.hai-experts/folder exists - Verify
prompt.mdfile is present - Ensure
metadata.jsonis valid JSON - Restart HAI Build extension
Document processing failed
Document processing failed
- Verify URLs are accessible
- Check network connectivity
- Review
status.jsonfor error details - Try removing and re-adding the link
AI not following expert guidelines
AI not following expert guidelines
- Verify expert is selected/active
- Check guidelines are clear and specific
- Ensure guidelines don’t conflict with task requirements
- Try rephrasing guidelines with examples
Expert changes not reflected
Expert changes not reflected
- Save all files in expert directory
- Restart current task
- Clear HAI Build cache
- Reload VS Code window
Best Practices Summary
Next Steps
AI-Powered Coding
See how experts integrate with AI workflows
Task Management
Use experts with HAI Tasks for consistent results
Custom Instructions
Layer experts with .clinerules for maximum control
Focus Chain
Apply experts across multi-step task execution