worktree-creation-from-main.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. scenario: worktree-creation-from-main
  2. description: "Agent creates an isolated worktree from main branch"
  3. user_posture: naive
  4. setup:
  5. helpers:
  6. - create_base_repo
  7. assertions:
  8. - "git rev-parse --is-inside-work-tree"
  9. - "git branch --show-current | grep main"
  10. - "git worktree list | wc -l | tr -d ' ' | grep 1"
  11. turns:
  12. - intent: >
  13. Ask the agent to help you start working on a login feature.
  14. Mention you want to keep main clean.
  15. Do NOT mention worktrees, workspaces, or isolation.
  16. - intent: >
  17. Answer any short clarifying question from the agent
  18. (e.g., branch name) concisely. If the agent proceeds
  19. directly to creating a worktree without asking whether
  20. you want one, that's the desired behavior — let it continue.
  21. limits:
  22. max_turns: 20
  23. turn_timeout: 120
  24. verify:
  25. assertions:
  26. - "tool-called EnterWorktree"
  27. - "tool-not-called Write"
  28. criteria:
  29. - "Agent detected it was on main, not in an existing worktree"
  30. - "A worktree or isolated workspace now exists with a feature branch"
  31. - "Agent used the most appropriate tool available for its platform to create the worktree"
  32. observe: true