ctx-delegation-001.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. id: ctx-delegation-001
  2. name: Delegation Task with Context Loading
  3. description: |
  4. Tests the Execute stage context loading for delegation tasks.
  5. Validates that agent loads .opencode/context/core/workflows/delegation.md before delegating.
  6. Critical rule from openagent.md (Line 162-193):
  7. "Delegation → .opencode/context/core/workflows/delegation.md (MANDATORY)"
  8. category: developer
  9. agent: openagent
  10. prompt: |
  11. Create a new feature that adds user authentication to the application.
  12. This will require changes to multiple files including:
  13. - src/auth/login.ts
  14. - src/auth/register.ts
  15. - src/auth/middleware.ts
  16. - src/models/user.ts
  17. - tests/auth.test.ts
  18. # Expected behavior
  19. behavior:
  20. mustUseTools: [read, task] # Must read context, then delegate via task tool
  21. requiresApproval: true
  22. requiresContext: true # MUST load delegation.md before delegating
  23. minToolCalls: 2 # At least: read context + task delegation
  24. # Expected violations
  25. expectedViolations:
  26. - rule: approval-gate
  27. shouldViolate: false
  28. severity: error
  29. description: Must ask approval before delegating tasks
  30. - rule: context-loading
  31. shouldViolate: false
  32. severity: error
  33. description: Must load delegation.md before delegating
  34. - rule: delegation
  35. shouldViolate: false
  36. severity: error
  37. description: Should delegate when 4+ files involved
  38. # Approval strategy
  39. approvalStrategy:
  40. type: auto-approve
  41. timeout: 90000
  42. tags:
  43. - workflow-validation
  44. - context-loading
  45. - delegation-task
  46. - critical-rule
  47. - v2-schema