System Instructions
System instructions shape how the AI Assistant responds. They act as persistent directives prepended to every conversation, letting you control tone, focus areas, and domain-specific behavior.
How Instructions Work
Every message you send to the assistant is wrapped in a prompt that includes:
- System instructions (configured by you)
- Project context (auto-injected — see Project Context)
- Conversation history (previous turns)
- Your current message
The system instructions sit at the top of this stack, giving them the highest influence on the AI's behavior.
Default Instructions
xyva ships with a default instruction set optimized for test engineering:
You are an expert test automation engineer specializing in Playwright
and modern web testing. You write TypeScript. You follow the Page Object
Model pattern. You prefer role-based and accessible locators. You never
suggest hard-coded waits. You explain trade-offs when multiple
approaches exist.These defaults apply when no custom instructions are configured.
Custom Instructions per Project
Override the defaults in Settings > AI > System Instructions. Custom instructions are stored per project, so different repositories can have different AI personalities.
TIP
Keep instructions concise and directive. Instead of "It would be nice if you could maybe focus on accessibility," write "Always suggest accessible locators and flag WCAG violations."
Instruction Templates
xyva includes built-in templates you can use as a starting point:
| Template | Focus |
|---|---|
| Test Engineer | Playwright best practices, POM, CI integration |
| Security Reviewer | OWASP, input validation, auth flows, header checks |
| Accessibility Auditor | WCAG 2.1 AA, ARIA, keyboard navigation, screen readers |
| Performance Analyst | Core Web Vitals, bundle size, lazy loading, caching |
| Code Reviewer | Clean code, DRY, error handling, type safety |
Select a template from the dropdown and customize it further for your project needs.
What Instructions Affect
| Aspect | Example effect |
|---|---|
| Language & tone | Formal technical writing vs. casual explanations |
| Code style | Class-based vs. functional, semicolons vs. none |
| Focus areas | Prioritize security, accessibility, or performance |
| Output format | Always include code examples, or prefer bullet-point summaries |
| Guardrails | Never suggest deprecated APIs, always use TypeScript strict mode |
WARNING
Instructions do not override safety filters from the LLM provider. They shape the assistant's expertise and style, not its fundamental behavior boundaries.
Best Practices
- Start with a template and iterate based on the responses you get.
- Reference your project's conventions explicitly: "We use
data-testidattributes, never CSS class selectors." - Include negative instructions for clarity: "Do not suggest Cypress or WebDriverIO alternatives."
- Review instructions quarterly as your project evolves.
