this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

CLAUDE: discourage "go build" and add a set of "must follow" rules

I keep having to tell Claude to not do these things;
for example, excessive use of "cat <<EOF" or /tmp causes it to ask
for permission to use these new commands and paths,
which interrupts the session for no reason at all.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I4f4daf40786301dc0e0c47cc8930bd85f51e3af7
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1229648
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

+18 -7
+18 -7
CLAUDE.md
··· 8 8 9 9 ## Common Development Commands 10 10 11 - ### Building 11 + ### Running the "cue" command 12 + 12 13 ```bash 13 - # Build and install the cue command 14 - go install ./cmd/cue 14 + # Build and run ./cmd/cue via a cached binary 15 + go tool cue 15 16 16 - # Build without installing 17 - go build ./cmd/cue 17 + # Or build and install it in $PATH. 18 + go install ./cmd/cue 18 19 ``` 19 20 20 21 ### Testing ··· 28 29 go test ./internal/core/adt 29 30 30 31 # Run a specific test function 31 - go test -run TestEvalV2 ./internal/core/adt 32 + go test -run TestEvalV3 ./internal/core/adt 32 33 33 - # Run a specific testscript test 34 + # Run a specific sub-test 34 35 go test -run TestScript/eval_concrete ./cmd/cue/cmd 35 36 36 37 # Update golden test files (when output changes are expected) ··· 41 42 ``` 42 43 43 44 ### Code Quality 45 + 44 46 ```bash 45 47 # Run go vet (catches common mistakes) 46 48 go vet ./... ··· 105 107 - Follow existing code style and patterns in the package you're modifying 106 108 - Check neighboring files for framework choices and conventions 107 109 - Use existing libraries and utilities rather than assuming new dependencies 110 + 111 + ## Rules to follow 112 + 113 + These rules MUST be followed at all times: 114 + - Do not use commands like `cat` to read or write files; read and write files directly 115 + - Do not write to temporary folders like /tmp; place all temporary files under the current directory 116 + - Do not use env vars like CUE_DEBUG for debug prints; print unconditionally, and remove them when done 117 + - Do not "go build" binaries; use commands like "go tool cue" or "go run ./cmd/cue" instead 118 + - When adding a regression test for a bug fix, ensure that the test fails without the fix