Repository navigation
Description
Summary
code-metrics still reads its user-global and personal config from ~/.claude and .claude/. Move both to the config-cascade layers.
Current behavior
plugins/code-metrics/scripts/resolve-config.py:247-252:
def layer_paths(home: str, root: str, stem: str) -> list[tuple[str, str]]:
return [
("user-global", os.path.join(home, ".claude", f"{stem}.yaml")),
("team", os.path.join(root, ".claude", f"{stem}.yaml")),
("local", os.path.join(root, ".claude", f"{stem}.local.yaml")),
]surface_layer_paths (:255-263) replaces only the team entry with docs/conventions/code-metrics.yaml, so the user-global and personal old paths stay live. scripts/dispatch.sh, skills/setup/scripts/setup-apply.py and skills/setup/scripts/setup-check.sh name the same paths.
Desired behavior
Per the config-cascade layers:
| Old path | Layer |
|---|---|
~/.claude/code-metrics.yaml |
userConfig (no user-global file layer) |
<repo>/.claude/code-metrics.local.yaml |
personal: <home>/code-metrics.local.yaml |
The resolver, dispatch.sh and setup read and write the contract layers; a file at an old path keeps being read during a dual-read window (see the acceptance criteria) and is reported with a warning. The canonical location list (docs/contracts/config-cascade/locations.md) lands in the docs/config-locations pull request.
Key interfaces
layer_pathsandsurface_layer_paths, and the per-value provenance the resolver printssetup-apply.pyandsetup-check.shpaths
Acceptance criteria
- The resolver reads the config-cascade layers (the layers).
- Dual-read window: while an old-path file exists, it is still read and its values still apply where no new-layer file supplies that layer; each run prints one warning naming the old file and the new location to move it to. No setting in an old file is silently dropped.
-
setup-check.shandsetup-apply.pyname each old file they find;applyoffers to copy its keys into the new location after a preview and a yes, leaving the old file in place. - Removing the old-path read is a separate later change, made only once no old file is reported.
- The plugin's tests (
dispatch.test.sh,setup-check.test.sh,test_setup_apply.py,audit-size.test.sh) cover: new layer only; old file only (values apply, warning printed); both present (new wins, warning names both).
Out of scope
Other plugins' resolvers (one issue each).
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 21, 2026
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: the code-metrics plugin's resolver, dispatch.sh, setup scripts and their tests; anyone running code-metrics with config files.
Reversible: yes; revert the change, since the old paths keep being read during the dual-read window.
Open questions: none
I understood this as moving code-metrics config reads and writes to the config-cascade layers. Old-path files would still be read and warned about, and setup would offer to copy their keys to the new location. The issue has exact acceptance criteria. Other plugins have similar open issues (for example #18001's siblings for overengineering, ai-slop and bugs), but the issue scopes them out and they are not duplicates. No merged pull request already fixes this.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 21, 2026
{"v":1,"actor_id":337595936,"title_sha256":"23d0b26bfed7e2ecd697a2f40dd619f438b0ba23a85b8307fef5959d38c7ccf1","body_sha256":"28a0af68febbbadf45673c93b9209d0448df4151523a5746c4c98c7b505b2c41"}
melodic-automation-lanes commentedon Nov 21, 2026
Not admitted to the issue lane: its body was edited after it was deferred, so the admission it was deferred from judged an older body. Admission takes the issue once each of those is met, when intake triages it again (
.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Nov 21, 2026
{"v":1,"actor_id":337595936,"title_sha256":"23d0b26bfed7e2ecd697a2f40dd619f438b0ba23a85b8307fef5959d38c7ccf1","body_sha256":"49b0dac0e501d9600e44566377bc45d0bf44a7e40154eb5ea90eae5b990c7ae5"}
melodic-automation-lanes commentedon Nov 21, 2026
This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44952330685, the work-resolve-issue run that
agent-readystarted, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share, or the window was projected to have under its start-project share of the header's limit left by the run's expected end (github-token start-gate, start-project and start-run-minutes in rate-limits.json; the run's start-gate notice names which); that run ended at 2026-11-21T21:37:20Z. work-unblock has now removed and addedagent-readyback to start a fresh run. A budget stop is the lanes' load, not a fault in this issue: it never counts toward limits.limit-stops-per-issue or thekill-switchwait.github-actions commentedon Nov 21, 2026
feat(code-metrics): read the userConfig layer from a config_file option
fix(code-metrics): keep the old user-global file while config_file is…