docs: move the two procedural sections out of CLAUDE.md - #60
Merged
Merged
Conversation
CLAUDE.md is read in full at the start of every session, so everything in it is paid for on every task. Two of its sections are procedures that apply to a small fraction of them: the service-addition recipe and the lint/PR checklist. Both now live in .claude/skills/, which load only when the task matches, leaving CLAUDE.md to the invariants a session cannot afford to miss - the signing and encoding gotchas, and what the test doubles do not cover. Correct the lint guidance on the way out. It predates the golangci-lint CI job: go vet is no longer a separate step, and the documented --no-config --default=none -E ... invocation bypasses .golangci.yml, so it enabled linters CI does not run and skipped ones it does. The esc(), asAttributeMap and pathescape_test.go references stay as they are. They look dangling on main but describe fix/escape-path-segments and fix/dig-nested-attributes, which are in review, not code that went away. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Tim Smith <tim@mondoo.com>
Collaborator
Author
|
CI: The single finding is (Apologies for the noise in the previous revision of this comment — a shell quoting slip pasted a tool's help text into it.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CLAUDE.mdis read in full at the start of every session, so all ~2,000 tokens of it are paid for on every task. Two of its eight sections are procedures that apply to a small fraction of those tasks:Both move to
.claude/skills/, which load only when the task matches. What stays behind are the invariants — the signing and encoding gotchas, and what the test doubles fail to cover. Those stay inline deliberately: a skill only fires when you recognise it applies, and "I am about to silently break request signing" is not a trigger you can recognise in advance.160 lines → 107.
Lint guidance was stale, and is corrected here
The Linting section predates the golangci-lint CI job (#57):
go vetis in CI and golangci-lint is not. Both are now backwards —.golangci.ymlenablesgovet, which is why the standalone vet step was dropped.golangci-lint run --no-config --default=none -E staticcheck,unused,unparam,revive,bodyclose ./...bypasses.golangci.yml. It enabledunparamandrevive, which CI does not run, and skippederrcheck,ineffassignandgofmt, which it does. The skill now documentsgolangci-lint run ./..., matching CI, plus the second run over theintegration/module that the root run cannot reach.What deliberately did not change
esc(),asAttributeMapandpathescape_test.goare referenced by CLAUDE.md but exist nowhere onmain. They are not stale — they describe #44 and #45, both still open. Removing them would strip the warning about unescaped identifiers ("a name can break the signature or walk into another collection") exactly as the fix for that bug lands. Left intact so they are correct the moment those merge.The
~96%coverage figure is likewise left alone;mainmeasures 94.6%, and the gap is plausibly those same open PRs.Test plan
go test ./... -race -count=2cleangolangci-lint run ./...reproduces CI — one pre-existingQF1001ontransport.go:34, which is what chore: name the retry condition instead of negating a disjunction #59 fixesCLAUDE.mdchecked to survive in a skill, or merged into an adjacent bullet deliberately🤖 Generated with Claude Code