Skip to content

fix(lib): check-retirements reads the user-global .claude layer as a retired file at a home or non-repository root #13504

Closed

Description

@kyle-sexton

Refs: #13476, #9737

Problem

lib/check-retirements.sh resolves --root to ${CLAUDE_PROJECT_DIR}, else the git toplevel, else the working directory (lib/check-retirements.sh:76). When that root is the home directory, or a directory outside any repository that holds a .claude/ folder, a kind: file record with a repo-relative .claude/<name>.json path matches the user-global ~/.claude/<name>.json. That file is a live layer the detectors still read, not a retired team file.

Seen while building #13476: check-retirements.sh --root <non-repo dir holding .claude/attribution.json> exited 1 with an attribution-r003 row. With action: migrate and --clean, a setup run from the home directory could migrate or delete the user-global layer.

The same shape affects the older attribution-r001 (.claude/provenance.json) and any plugin whose retirements.yaml retires a .claude/<name>.json team file that also has a user-global twin. #13476 guards it in the attribution setup SKILL.md text only.

Fix

In the shared lib/check-retirements.sh (and its copies under plugins/*/lib/, synced the repository's shared-copies way), skip kind: file detection, and refuse --clean, when the resolved root is $HOME or is not inside a git work tree, reporting the row as skipped: root is not a repository. Add a test for both roots. Then drop the SKILL.md exception paragraph #13476 added.

Done when

  • check-retirements.sh --root "$HOME" and --root <non-repo dir> report no file row and refuse --clean, covered by a test.
  • Every copy under plugins/*/lib/check-retirements.sh matches lib/check-retirements.sh.
  • The "root that is the home directory or not a repository" paragraph in plugins/attribution/skills/setup/SKILL.md is removed.

Activity

  1. added
    needs-triage
    on Nov 5, 2026
  2. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Decision recorded. One item is left after #13510: remove the SKILL.md exception paragraph.
    Agent choice, not an owner answer.

    Delivered by #13510, checked on origin/main: lib/check-retirements.sh skips kind: file records and refuses --clean at $HOME or outside a git work tree (:55, :127-128, :192-199), with the copies synced. #13505, which #13510's Remaining said this item waited on, has merged.

    Left:

    • The "root that is the home directory or not a repository" paragraph in plugins/attribution/skills/setup/SKILL.md is removed: git grep -n "home directory or not a repository" -- plugins/attribution/skills/setup/SKILL.md prints nothing (it prints :78 on origin/main today).

    #13504 (comment)

    This decision settles the open questions. What remains is one docs-only edit: removing the exception paragraph from the attribution setup SKILL.md. The script guard and test were delivered by #13510. No duplicates found among the open issues.

    Automated triage, applied by the lanes App.

  3. added and removed
    needs-triage
    on Nov 5, 2026
  4. added
    status: ready
    on Nov 5, 2026
  5. added
    admission-deferred
    agent-ready
    and removed
    admission-deferred
    on Nov 5, 2026
  6. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor
    No description provided.
  7. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor
    No description provided.
  8. melodic-automation-lanes commented on Nov 5, 2026

    @melodic-automation-lanes
    Contributor

    The lanes App's pull request #13510 merged with Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removed status: ready and agent-ready, so the hourly triage sweep sends it back to intake triage. Admission then parks it at status: confirmed for a check of what that pull request left, until a **Decision recorded.** comment says what is left or someone closes it.

  9. 3 remaining items

  10. kyle-sexton commented on Nov 5, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. One item is left after #13510: remove the SKILL.md exception paragraph.
    Agent choice, not an owner answer.

    Delivered by #13510, checked on origin/main: lib/check-retirements.sh skips kind: file records and refuses --clean at $HOME or outside a git work tree (:55, :127-128, :192-199), with the copies synced. #13505, which #13510's Remaining said this item waited on, has merged.

    Left:

    • The "root that is the home directory or not a repository" paragraph in plugins/attribution/skills/setup/SKILL.md is removed: git grep -n "home directory or not a repository" -- plugins/attribution/skills/setup/SKILL.md prints nothing (it prints :78 on origin/main today).
  11. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).

  12. added
    status: ready
    on Nov 5, 2026
  13. added
    admission-deferred
    agent-ready
    and removed
    admission-deferred
    on Nov 5, 2026
  14. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor
    No description provided.
  15. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor
    No description provided.
  16. removed
    status: ready
    agent-ready
    on Nov 5, 2026
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

    agent-ready

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions