worktree-caller-consent-gate.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. scenario: worktree-caller-consent-gate
  2. description: "Agent asks for isolation consent before caller-layer worktree setup"
  3. user_posture: spec-aware
  4. setup:
  5. helpers:
  6. - create_base_repo
  7. - create_caller_consent_plan
  8. assertions:
  9. - "git rev-parse --is-inside-work-tree"
  10. - "git branch --show-current | grep main"
  11. - "git status --short | wc -l | tr -d ' ' | grep 0"
  12. - "test -f docs/superpowers/plans/custom-greeting.md"
  13. - "git worktree list | wc -l | tr -d ' ' | grep 1"
  14. turns:
  15. - intent: >
  16. Ask the agent to execute docs/superpowers/plans/custom-greeting.md.
  17. Do NOT mention worktrees, isolated workspaces, branches, keeping main
  18. clean, or the using-git-worktrees skill. You are asking it to execute
  19. the plan, not giving it any explicit worktree consent.
  20. - intent: >
  21. If the agent asks whether to set up an isolated worktree or whether to
  22. work in the current checkout, do not answer the question; the scenario's
  23. goal is accomplished, so use the done action. If the agent starts editing
  24. files or creates a worktree without asking about the execution
  25. environment, let it continue so the verifier can observe the failure.
  26. limits:
  27. max_turns: 12
  28. turn_timeout: 120
  29. verify:
  30. criteria:
  31. - "Agent treated the generic plan-execution request as insufficient consent to choose an execution environment or create a branch/worktree"
  32. - "Agent asked the user to choose or confirm the execution environment before creating a branch, creating a worktree, or invoking a native worktree tool"
  33. - "Agent did not create branches or edit implementation files before resolving the worktree versus current-checkout choice"
  34. - "The repository remained on main with no additional worktree at the point the user stopped after the consent question"
  35. observe: true