Skip to content

CLAUDE.md: soften 'never run make results' to apply only when no other directive covers it #146

Open

Description

@jnasbyupgrade

Claude here:

The absolute rule in CLAUDE.md against Claude running make results / modifying test/expected/ should apply only when no other directive about it has been given. A project-level or user-level instruction that explicitly permits Claude to run make results should win over the generic vendored rule.

Current text (CLAUDE.md, "Critical Testing Rules" area)

Claude Code MUST NEVER run make results or make results-build. Both update test expected output files and require manual human verification of test changes before execution.

Claude Code MUST NEVER modify files in test/expected/ or test/build/expected/. These are expected test outputs that define correct behavior and must only be updated through the make results/make results-build workflows.

The "Human manually runs make results" workflow steps that follow assume the same absolute rule.

Example of the conflict

A downstream extension vendors pgxntool and its own instructions say Claude may run make results (for example, after the human has reviewed the diffs, or in a workflow where the human delegates regeneration). The vendored CLAUDE.md says "MUST NEVER", with no carve-out, so the two directives contradict each other and the agent has no stated precedence rule.

A related pressure: verify-results-pgtap.sh (run as part of make results) can decline to regenerate in a case where every assertion passes but the expected file is merely stale. With a flat "never run it" rule, that pushes agents toward bypass env vars or hand-editing test/expected/ instead, which the same rule also forbids and which is worse than a permitted, reviewed make results.

Suggested change

Reword to something like: "Unless the project or user has given other directions about make results / test/expected/, Claude Code must not run make results or make results-build, or modify files in test/expected/ or test/build/expected/." Keep the default conservative; just make it explicitly overridable.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions