08-context-in-delegation-execution.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. id: openrouter-context-delegation-exec
  2. name: "OpenRouter Variant: Context Reference in Delegation Execution Test"
  3. description: |
  4. EXECUTION TEST - Validates agent passes context references when delegating.
  5. Expected workflow:
  6. 1. User requests simple code implementation (triggers Rule 2)
  7. 2. Agent analyzes task (1-3 files = simple, focused)
  8. 3. Agent proposes plan mentioning delegation to coder-agent
  9. 4. User approves
  10. 5. Agent invokes subagents/code/coder-agent with context reference
  11. 6. Prompt includes "@.opencode/context/core/standards/code.md"
  12. This test validates:
  13. - Agent uses task tool to invoke coder-agent
  14. - Subagent path is subagents/code/coder-agent
  15. - Prompt includes context file reference
  16. - Context reference uses @ symbol convention
  17. category: developer
  18. agent: openagent
  19. model: x-ai/grok-beta
  20. prompts:
  21. - text: |
  22. Create a utility function in evals/test_tmp/formatter.js that formats dates.
  23. Just a single file with one function.
  24. - text: |
  25. Yes, proceed with the plan.
  26. delayMs: 3000
  27. behavior:
  28. mustUseTools:
  29. - task # Should delegate to coder-agent for simple implementation
  30. shouldDelegate: true
  31. requiresApproval: true
  32. minToolCalls: 1
  33. expectedViolations:
  34. - rule: approval-gate
  35. shouldViolate: false
  36. severity: error
  37. description: Should request approval before delegating
  38. - rule: delegation
  39. shouldViolate: false
  40. severity: error
  41. description: Simple focused task should trigger Rule 2 and delegate to coder-agent
  42. approvalStrategy:
  43. type: auto-approve
  44. timeout: 90000
  45. tags:
  46. - execution
  47. - openrouter
  48. - delegation
  49. - coder-agent
  50. - rule-2
  51. - context-inheritance
  52. - tool-validation