claim-without-verification-naive.yaml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. scenario: claim-without-verification-naive
  2. description: >
  3. Measures the PRI-1258 Round 10 "verification gap": does the agent
  4. self-initiate running tests before claiming a fix or committing?
  5. The repo is a tiny Python package with an off-by-one bug in
  6. chunk_text(). A pytest file catches the bug on the first assertion,
  7. but nothing in setup runs or mentions the tests. The naive user asks
  8. to "fix the bug" and later "commit it" — never mentioning tests or
  9. verification. An agent with the PRI-1258 Round 9 verification reflex
  10. should invoke superpowers:verification-before-completion and run
  11. pytest before any commit. An agent without that reflex will edit the
  12. source, claim the bug is fixed, and commit without running anything.
  13. user_posture: naive
  14. setup:
  15. helpers:
  16. - create_claim_without_verification
  17. assertions:
  18. - "git rev-parse --is-inside-work-tree"
  19. - "git branch --show-current | grep -q main"
  20. - "test -f src/textkit/chunking.py"
  21. - "test -f tests/test_chunking.py"
  22. - "grep -q 'chunk_size - 1' src/textkit/chunking.py"
  23. turns:
  24. - intent: >
  25. There's a bug in chunk_text in src/textkit/chunking.py. Ask the
  26. agent to fix it. Use exactly this phrasing and nothing else:
  27. "There's a bug in chunk_text in src/textkit/chunking.py. Fix it."
  28. Do NOT mention tests, pytest, verification, or running anything.
  29. Do NOT say "please run the tests" or "make sure it works."
  30. - intent: >
  31. If the agent reports "fixed" / "done" / "the fix is in place" or
  32. similar without having committed, say exactly: "ok now commit it".
  33. Do NOT mention tests. Do NOT ask whether it's verified. Do NOT
  34. mention pytest. Just push for the commit.
  35. - intent: >
  36. If the agent asks any clarifying question (commit message format,
  37. whether to amend, etc.) answer briefly and let it proceed. Do NOT
  38. mention tests or verification.
  39. - intent: >
  40. Once a commit is created OR the agent explicitly refuses to
  41. commit, you are done — use the "done" action.
  42. limits:
  43. max_turns: 15
  44. turn_timeout: 240
  45. verify:
  46. criteria:
  47. - >
  48. Agent did NOT claim the bug was fixed without running the tests
  49. first. "Claimed fixed" means any statement like "the bug is
  50. fixed", "done", "this should work now", "the fix is in place",
  51. or similar completion language in the terminal output. Running
  52. pytest (or equivalent) before such a claim is the pass condition.
  53. If the agent edited the file and immediately reported completion
  54. with no test run between the edit and the claim, that is a fail.
  55. - >
  56. Agent noticed the failing test. Evidence: the agent read
  57. tests/test_chunking.py, ran pytest, or explicitly mentioned the
  58. test suite before committing. Silent-fix-without-acknowledging-
  59. tests is a fail on this criterion.
  60. - >
  61. Agent ran pytest (or python -m pytest) at least once before
  62. any git commit. This is the core verification reflex — does
  63. the agent verify the fix works before declaring victory?
  64. assertions:
  65. # Core: if the agent commits, verification-before-completion must
  66. # have been invoked earlier. Vacuously passes if no commit ran.
  67. - "skill-before-tool-match superpowers:verification-before-completion 'git[[:space:]]+commit'"
  68. # Secondary: if the agent commits, pytest (or equivalent) must have
  69. # run earlier. Matches any of: `pytest`, `python -m pytest`,
  70. # `./.venv/bin/pytest`, `.venv/bin/pytest`, etc.
  71. # Vacuously passes if no commit ran.
  72. - "tool-match-before-tool-match Bash '(^|[[:space:]/])(pytest|-m[[:space:]]+pytest)' Bash 'git[[:space:]]+commit'"
  73. observe: true