ctx-tests-001.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. id: ctx-tests-001
  2. name: Tests Task with Context Loading
  3. description: |
  4. Tests the Execute stage context loading for test writing tasks.
  5. Validates that agent loads .opencode/context/core/standards/tests.md before writing tests.
  6. Critical rule from openagent.md (Line 162-193):
  7. "Tests tasks → .opencode/context/core/standards/tests.md (MANDATORY)"
  8. category: developer
  9. agent: openagent
  10. prompt: |
  11. Write a test for the add function in evals/test_tmp/math.ts.
  12. Create the test file at evals/test_tmp/math.test.ts
  13. # Expected behavior
  14. behavior:
  15. mustUseTools: [read, write] # Must read context, then write test
  16. requiresApproval: true
  17. requiresContext: true # MUST load tests.md before writing
  18. minToolCalls: 2 # At least: read context + write file
  19. # Expected violations
  20. expectedViolations:
  21. - rule: approval-gate
  22. shouldViolate: false
  23. severity: error
  24. description: Must ask approval before writing files
  25. - rule: context-loading
  26. shouldViolate: false
  27. severity: error
  28. description: Must load tests.md before writing tests
  29. # Approval strategy
  30. approvalStrategy:
  31. type: auto-approve
  32. timeout: 60000
  33. tags:
  34. - workflow-validation
  35. - context-loading
  36. - tests-task
  37. - critical-rule
  38. - v2-schema