Skip to content

fix(improvement): read the user-global setup config as one ~/.claude Read - #13865

Merged
kyle-sexton merged 3 commits into
mainfrom
fix/13768-improvement-setup-home-read
Nov 6, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
fix/13768-improvement-setup-home-read

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #13768

Draft: the coordinating session decides the ready flip.

Summary

/improvement:setup now reads the user-global layer with one Read of the literal ~/.claude/improvement.md and reads the bundled churn exclusions with one Read of the hotspot recipe. Before this change, an eval sandbox denied both lookups, so the setup suite could not produce a VALID run.

Fix

  • plugins/improvement/skills/setup/SKILL.md check step 1, and the layer table in plugins/improvement/reference/config.md: the user-global layer is one Read of the literal ~/.claude/improvement.md with ~ kept. It is never looked up with a Glob, a spelled-out home directory or a home-tree search. This is the same rule as fix(codebase-health): keep audit config and view lookups inside the session home #13807.
  • SKILL.md apply step 2: the skill names where the bundled defaults live (the excludes ERE in ${CLAUDE_PLUGIN_ROOT}/skills/find/context/hotspots.md) and reads that file with one Read. It never Globs or Greps the plugin directory. In every drafts-case run the with-arm searched the plugin directory for those defaults, and the sandbox denied the search.
  • Each edit rewrites a single line in place, so line numbers do not move. None of the three cases cites a SKILL.md line, so no citation needed updating.
  • Changelog fragment: .changes/improvement/fix-13768-setup-user-global-read-4b8d2e61.md (patch).

Verification

All runs use the same 3 cases on both sides: setup-apply-drafts-then-asks, setup-apply-verify-tracked-proposal and setup-check-zero-config-info. Each run uses --runs 3 --scaffold --allow-tools Edit,Write.

  • Before, origin/main 31531107e2: INVALID, 15 denials in 9 runs. The plugin is unchanged from this branch's base. The denials:
    • Read of ~/.claude/improvement.md in 9 of 9 with-arm runs.
    • A Glob over the home directory in 1 run.
    • Grep and Glob over plugins/improvement/ in all 3 drafts runs.
    • One Write to the workspace .claude/improvement.md.
    • Per the reading rule, an INVALID suite reports no scores.
  • Head, first commit 042e06d093 (the ~/.claude rule only): INVALID, 6 denials. The ~/.claude reads were gone. What remained was Grep and Glob over plugins/improvement/ in all 3 drafts runs. The apply step 2 line was then added, and the head was run once more.
  • Head 887643554a: VALID, 0 denials. Its traces show a Read of skills/find/context/hotspots.md and no plugin-directory search. The only warning is skill-fired, which is expected because the skill is slash-invoked (disable-model-invocation), so no case has a skill-fired grader.
Case with (3 runs) with mean without mean
setup-apply-drafts-then-asks 0.857, 0.857, 1.0 0.905 0.429
setup-apply-verify-tracked-proposal 0.889, 0.667, 0.889 0.815 0.444
setup-check-zero-config-info 1.0, 0.857, 1.0 0.952 0.571
  • In every case the with arm scores above the without arm, so nothing regresses.
  • validate-cases.py plugins/improvement/evals: exit 0, 0 FAIL, 41 WARN. 40 of the WARNs are the standard allowed_tools grant notes. 1 is a pre-existing missing-samples WARN on find-implement-request-routes.

Remaining on #13768

  • Graders the with arm missed on the VALID head run (this is variance, not a sandbox block):
    • tier2-gap, both-probes and untracked-commit-it in the verify case.
    • baseline-before-question and drafts-generated-exclusion in the drafts case. The bundled ERE does not cover src/generated/, so drafting that entry is correct.
    • bundled-default-window in 1 check run.
  • Case design: a with-arm Write to the workspace .claude/improvement.md, the behaviour the no-write grader exists to catch, is a permission denial that marks the whole suite INVALID instead of scoring that grader 0. It happened once on the before side and not on head.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 6, 2026 16:32
…Read

/improvement:setup and its config reference now say to look up
~/.claude/improvement.md with one Read of the literal path, ~ kept,
never a Glob, a spelled-out home directory or a home-tree search.

Refs: #13768

Co-Authored-By: Claude Opus 5.5 <[email protected]>
apply searched the plugin directory for the bundled churn exclusions
with Grep and Glob, which the eval sandbox denies. Name the hotspot
recipe file and read it with one Read.

Refs: #13768

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 6, 2026 23:01
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-06T23:01:04.727582Z
We couldn’t complete this review. Comment @codex review to try again.
c33afa7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed c33afa700eb3a5ffb6aa533bf7cd36fccd19c0e2: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read all three changed files in full:

  • .changes/improvement/fix-13768-setup-user-global-read-4b8d2e61.md: a new changelog fragment.
  • plugins/improvement/reference/config.md: the user-global row of the layer table.
  • plugins/improvement/skills/setup/SKILL.md: check step 1 and apply step 2.

Instruction-surface lens. Both edits change instruction text, so I checked them against this lens before ruling out the skip. They delete or soften no rule. Each one adds a restriction.

  • The user-global layer is now looked up with one Read of the literal path ~/.claude/improvement.md, with ~ kept. The skill may not Glob for it, spell out a home directory, or search the home tree. A Read that finds no file means the layer is absent.
  • The bundled churn exclusions now come from one Read of ${CLAUDE_PLUGIN_ROOT}/skills/find/context/hotspots.md. The skill may not Glob or Grep the plugin directory.

Both edits narrow what the skill reads, from searches of the home and plugin trees down to two fixed paths. Neither adds a write, a tool grant, a command, a network or publish step, or a way for untrusted input to reach a lane that holds credentials. The existing WARN for an unreadable layer outside the repo is kept, as are the rule against modifying anything in check and the confirm-before-write steps in apply.

Other checks:

  • Trusted paths: no changed file matches one.
  • Manifests: the diff changes no plugin manifest.
  • Workflows and trust controls: no workflow or trust control changes.
  • PR context: I found no embedded directives in the pull request description.

Cost: none. Nothing here can cause a charge.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed c33afa700eb3a5ffb6aa533bf7cd36fccd19c0e2: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #13865 (no findings)

I read the whole change in all 3 files: the changelog fragment, plugins/improvement/reference/config.md and plugins/improvement/skills/setup/SKILL.md.

What changed

  • In /improvement:setup, step 1 of check and the layer table in config.md now look up the user-global ~/.claude/improvement.md with one Read of that literal path. They never Glob for it, spell out a home directory or search the home tree.
  • Step 2 of apply now says where the bundled churn defaults live and reads that file with one Read.

What I checked

  • Hotspot file: the cited path exists, and it defines the named excludes ERE at hotspots.md#L53, so the pointer is accurate.
  • Absent vs. unreadable layer: the new sentence, "A Read that finds no file means the layer is absent", agrees with the existing rule that a user-global layer that cannot be read is a WARN (SKILL.md#L41-L45). A missing file means absent; a denied Read means it cannot be read.
  • Table parsing: no script in the plugin parses the config.md layer table, so adding guidance text to its Path cell breaks nothing. The only other match is an eval sample answer, which is free text.
  • Path-scoped rules: skill-bodies-state-current-rules.md and cost-claims.md both match the changed files, and neither is broken. The new text states this repository's own read rule, not an upstream detail that could change, and it contains no cost figures.
  • Changelog: the fragment's bump: patch fits a wording-only fix to a skill. No plugin manifest changed.

Not checked

  • The PR says Refs: #13768 and closes no issue, so there were no closing-issue criteria to check.
  • The before/after eval runs and scores in the PR description are the author's claims. I did not run them.
  • There were no prior findings, and no earlier head of this PR had been reviewed.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit b1e3634 Nov 6, 2026
70 checks passed
@kyle-sexton
kyle-sexton deleted the fix/13768-improvement-setup-home-read branch November 6, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant