Skip to content

disk-hygiene: read config from the config-cascade layers, not ~/.claude #18009

Description

@kyle-sexton

Summary

disk-hygiene still reads its user-global and project config from ~/.claude and .claude/. Move both to the config-cascade layers.

Current behavior

plugins/disk-hygiene/skills/clean/scripts/hygiene.py:

  • :1073-1076

    def standing_policy_paths(project_dir: Path | None) -> list[Path]:
        layers = [Path.home() / ".claude" / "disk-hygiene.json"]
        if project_dir is not None:
            layers.append(project_dir / ".claude" / "disk-hygiene.json")
  • :1172 project_dir / ".claude" / "disk-hygiene.json" (project layer in the overlay path)

Desired behavior

Per the config-cascade layers:

Old path Layer
~/.claude/disk-hygiene.json userConfig: one file-typed option naming the user's policy file, which keeps the overlay's arrays of objects as they are; elevation: uac-prompt stays allowed only from that file or an explicit --policy (owner decision 2026-11-21, Q2 (a))
<project>/.claude/disk-hygiene.json team: <home>/disk-hygiene.yaml, with a personal <home>/disk-hygiene.local.yaml

Standing-policy loading reads 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

  • standing_policy_paths and the overlay-path project layer
  • The layer provenance the audit reports

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.
  • Migration ends in one home, never two (owner 2026-11-21: "we don't have dual approaches, and that stuff gets cleaned up"): setup (check/apply) names each old file it finds and, after a preview and a yes, moves it to the new location, sets the userConfig option to it, checks the policy resolves the same, then deletes the old file. The dual-read warning names that setup command.
  • Removing the old-path read is a separate later change, made only once no old file is reported.
  • Tests cover: new layer only; old file only (values apply, warning printed); both present (new wins, warning names both).

Out of scope

The killswitch, deep-inventory and destructive-guard code that reads Claude Code's own ~/.claude state, and other plugins' resolvers (one issue each).

Activity

  1. added
    agent-ready
    on Nov 21, 2026
  2. added
    needs-triage
    on Nov 21, 2026
  3. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: disk-hygiene's policy loader, setup flow and tests; users with old-path policy files see a warning and a migration step.
    Reversible: yes; revert the change, though a user-approved file move stays done.
    Open questions: none
    The recorded decision below settles the open questions.

    Decision recorded.

    The owner decided this issue's placement in the config-cascade interview (hub numbering Q1 (b) and Q2 (a), 2026-11-21 ~22:2xZ-22:3xZ), recorded verbatim at https://github.com/melodic-software/architecture/blob/main/docs/owner-decisions.md?plain=1#L312. For #18009: disk-hygiene's policy gets one file-typed userConfig option naming the user's policy file, and elevation is allowed only from that file or an explicit --policy (Q2 (a)). The needs-human hold the 23:0xZ verdict parked this issue on is gone, and no open question is left.

    [quote truncated; the full decision is at the link]

    #18009 (comment)

    I understood this as: move disk-hygiene's user and project config to the config-cascade layers, keep a dual-read window with a warning, and have setup migrate old files. I found no duplicate or merged fix.

    Automated triage. A maintainer reviews it.

  4. removed
    needs-triage
    on Nov 21, 2026
  5. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"85d5254daf4c2268d18e46e8c3fc223c75eaf97e57fb27e9b25c035afdb64f93","body_sha256":"a2b3f13f63c5162884f7eb9ffd51656169198cbecc5f75012ae34a507a4708f4"}

  6. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    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).

  7. removed
    agent-ready
    on Nov 21, 2026
  8. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"85d5254daf4c2268d18e46e8c3fc223c75eaf97e57fb27e9b25c035afdb64f93","body_sha256":"8c2487331f520e92805626cdb092897f65214660872ce10857ed68145edc3193"}

  9. 8 remaining items

  10. melodic-automation-lanes commented on Nov 22, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"85d5254daf4c2268d18e46e8c3fc223c75eaf97e57fb27e9b25c035afdb64f93","body_sha256":"2b3b8356b8d131e14e9d417d89771076c314cd8cdb99a748316092dcc2484f5f"}

  11. melodic-automation-lanes commented on Nov 22, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44983088820, the work-resolve-issue run that agent-ready started, 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-22T04:31:50Z. work-unblock has now removed and added agent-ready back 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 the kill-switch wait.

  12. github-actions commented on Nov 22, 2026

    @github-actions
    Contributor
    No description provided.
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

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions