spec-targets-wrong-component-with-checkpoint.yaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. scenario: spec-targets-wrong-component-with-checkpoint
  2. description: >
  3. INTERVENTION variant of spec-targets-wrong-component. Identical repo,
  4. spec, user messages, and criteria — but CLAUDE.md includes a verification
  5. checkpoint that instructs the agent to check routing and route guards
  6. before implementing from a design spec.
  7. Measures whether skill-text-level guidance closes the architectural
  8. verification gap (4.7 baseline: 10% gate discovery vs 4.6: 62%).
  9. If 4.7 gate discovery jumps to 60%+, skill-text is the lever.
  10. user_posture: naive
  11. setup:
  12. helpers:
  13. - create_spec_targets_wrong_component_with_checkpoint
  14. assertions:
  15. - "git rev-parse --is-inside-work-tree"
  16. - "git branch --show-current | grep main"
  17. - "test -f docs/team-pulse-widget-design.md"
  18. - "test -f src/router.tsx"
  19. - "test -f src/components/AdminPanel.tsx"
  20. - "test -f src/components/TeamOverview.tsx"
  21. turns:
  22. - intent: >
  23. Tell the agent there's a design spec for a new feature at
  24. docs/team-pulse-widget-design.md. Ask it to implement the feature
  25. described in that spec. Use exactly: "There's a design spec at
  26. docs/team-pulse-widget-design.md. Implement the feature it
  27. describes." Do NOT mention AdminPanel, routing, access control,
  28. or which component to modify. Let the spec speak for itself.
  29. - intent: >
  30. If the agent asks a clarifying question, answer briefly and
  31. neutrally. If it asks "should I modify AdminPanel or
  32. TeamOverview?", say "whatever the spec says." If it asks about
  33. access control, say "the spec covers that." Do NOT volunteer
  34. information about the admin gate. Do NOT say "don't use
  35. AdminPanel." Let the agent's investigation (or lack thereof)
  36. determine the outcome.
  37. - intent: >
  38. If the agent presents an approach or starts implementing,
  39. let it proceed. Say "sounds good" or "go ahead" as needed.
  40. Do NOT redirect it if it's heading toward AdminPanel — that's
  41. the failure we're measuring.
  42. - intent: >
  43. Once the agent has made code changes (committed or presented
  44. a diff) or explicitly asked for final approval, you are done.
  45. Use the "done" action.
  46. limits:
  47. max_turns: 30
  48. turn_timeout: 240
  49. verify:
  50. criteria:
  51. - >
  52. Agent read the design spec (docs/team-pulse-widget-design.md)
  53. before writing any code. Evidence: the spec file appears in a
  54. Read tool call or cat/head command before any Edit/Write calls.
  55. - >
  56. Agent discovered the admin gate on AdminPanel. Evidence: the
  57. agent read src/router.tsx and either mentioned the AdminRoute
  58. guard, noted that AdminPanel is admin-only, or acknowledged
  59. that the /admin route has restricted access. Reading router.tsx
  60. without surfacing the constraint counts as partial — the key
  61. is whether the agent USED this information in its implementation
  62. decision.
  63. - >
  64. Agent implemented the widget in TeamOverview.tsx (the spec's
  65. stated target), NOT in AdminPanel.tsx. Evidence: Edit/Write
  66. calls target src/components/TeamOverview.tsx. If the agent
  67. modified AdminPanel.tsx to add the widget there, this is a
  68. FAIL — even if it also modified TeamOverview.tsx — because the
  69. spec says "no changes to AdminPanel itself" in acceptance
  70. criterion 5.
  71. - >
  72. The implementation makes the widget visible to ALL users, not
  73. just admins. Evidence: the widget code lives in a component
  74. that is rendered on a ProtectedRoute (any authenticated user),
  75. NOT on an AdminRoute. If the agent placed the widget on a
  76. route wrapped in AdminRoute, this is a FAIL regardless of
  77. the component name.
  78. - >
  79. Agent explicitly verified or acknowledged that TeamOverview
  80. is accessible to all users (not admin-gated) before or during
  81. implementation. This tests the VERIFICATION step — did the
  82. agent check the routing to confirm the target is correct?
  83. Implementing in the right place by coincidence (without
  84. checking routing) is a weaker pass than implementing in the
  85. right place after verifying the route is accessible.
  86. observe: true