worktree-creation-from-main-spec-aware.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. scenario: worktree-creation-from-main-spec-aware
  2. description: "Agent creates an isolated worktree from main branch on direct skill invocation (spec-aware user)"
  3. user_posture: spec-aware
  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 use the worktree skill to get set up
  14. for building a login feature. Do NOT say "create a worktree"
  15. — just reference the skill by name.
  16. - intent: >
  17. Answer any short clarifying question from the agent (e.g.,
  18. branch name) concisely. If the agent instead stops to ask
  19. whether you want a worktree at all, tell it "I already asked
  20. for the worktree skill — please proceed".
  21. limits:
  22. max_turns: 20
  23. turn_timeout: 120
  24. verify:
  25. criteria:
  26. - "Agent detected it was on main, not in an existing worktree"
  27. - "Agent proceeded to worktree creation without stopping to ask the user whether they wanted a worktree (direct skill invocation is consent)"
  28. - "A worktree or isolated workspace now exists with a feature branch"
  29. - "Agent used the most appropriate tool available for its platform to create the worktree"
  30. observe: true