tests/opencode: expand tests for agents / commands

Include various tests for the agents and command file generation and
different ways of configuring it.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-09-16 21:29:05 -05:00
parent c104ee92bf
commit 53538044d9
12 changed files with 160 additions and 0 deletions

View file

@ -0,0 +1,37 @@
{
programs.opencode = {
enable = true;
agents = {
code-reviewer = ''
# Code Reviewer Agent
You are a senior software engineer specializing in code reviews.
Focus on code quality, security, and maintainability.
## Guidelines
- Review for potential bugs and edge cases
- Check for security vulnerabilities
- Ensure code follows best practices
- Suggest improvements for readability and performance'';
documentation = ''
# Documentation Agent
You are a technical writer who creates clear, comprehensive documentation.
Focus on user-friendly explanations and examples.
## Guidelines
- Write clear, concise documentation
- Include practical examples
- Use proper formatting and structure
- Consider the target audience'';
};
};
nmt.script = ''
assertFileExists home-files/.config/opencode/agent/code-reviewer.md
assertFileExists home-files/.config/opencode/agent/documentation.md
assertFileContent home-files/.config/opencode/agent/code-reviewer.md \
${./code-reviewer-agent.md}
assertFileContent home-files/.config/opencode/agent/documentation.md \
${./documentation-agent.md}
'';
}