Skip to content

feat(repo-hygiene): add --owner and cite the target-scope contract for repository selection #17247

Description

@kyle-sexton

Parent

Refs: #17228, which adds the shared contract docs/contracts/target-scope/README.md and its first adopters (/architecture:improve deepening and conventions lenses, /coupling:reduce).

The owner decided on 2026-11-18, in their own words: "for anything that affects just improving: deduplication, single source of truth, clean up, tidying, general improvement-related skills, maintenance, all that stuff, I want to be able to run across multiple repos, even though the default is usually a single target repo or folder." They approved defining multi-repository scope once, as a shared contract each skill cites (reuse-or-replace: no second way).

Depends on

Outcome

/repo-hygiene:clean accept the contract's target forms (--repo, --repos-from, --owner, --fleet, --skip, or the same request in words) and run once per repository with the root anchored, merging findings on one scale. With no target form, each skill behaves exactly as it does today. Writes stay per repository: one worktree and one PR each. This skill already runs across repositories; the gap is --owner and one definition of the words.

Where the text changes

Line numbers as read on main at dc93c878.

File and lines Today Change
plugins/repo-hygiene/skills/clean/SKILL.md:247 "Repo sources: --repo, `--repos-from FILE -... and--fleet`"

Key interfaces

  • The contract owns the target forms, repository resolution, fan-out, merging, cross-repository signals and per-repository writes. A skill cites its sections by name and states only what differs for it; it never restates them.
  • An installed plugin cannot read docs/: carry the contract as plugins/repo-hygiene/reference/target-scope.md, registered in scripts/shared-copies.txt and generated by scripts/sync-shared-copies.sh (as plugins/coupling/reference/target-scope.md is), unless the plugin already carries it.
  • Cross-repository duplicate files are measured by /coupling:reduce (scripts/cross-repo-dups.py); a skill that wants that signal invokes the skill, never a copy of the script.

Done when

  • Each listed skill accepts the target forms by citing the contract, and its argument-hint shows [--repo <repo> ...].
  • With no target form, each skill's behavior is unchanged.
  • Any per-repository state (ledger, cursor, findings file, delta state) is kept per repository.
  • plugins/repo-hygiene/reference/target-scope.md exists as a generated copy, registered in scripts/shared-copies.txt and scripts/cross-plugin-source-registry.txt; sync-shared-copies.sh --check passes.
  • The contract's Adopters table lists each skill.
  • docs/skill-cheat-sheet.md regenerated (node scripts/generate-cheatsheet.mjs).
  • A changelog fragment under .changes/repo-hygiene/.
  • The PR body names an eval case whose run reads the changed text, or says none does.

Activity

  1. added
    agent-ready
    on Nov 18, 2026
  2. github-actions commented on Nov 19, 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).

  3. github-actions commented on Nov 19, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: the repo-hygiene clean skill text, one generated reference copy, the shared-copies registries, the contract's Adopters table, the regenerated cheat sheet and one changelog fragment; read by anyone running /repo-hygiene:clean.
    Reversible: yes; revert the PR, since no existing flag changes behavior.
    Open questions: none
    Understood: add --owner <owner> to /repo-hygiene:clean and cite the target-scope contract as the single definition of the target forms, with a generated copy at plugins/repo-hygiene/reference/target-scope.md. Behavior with no target form stays the same. The parent #17228 is not in the open issues, and the contract copy already ships in other plugins, so I don't treat it as a blocker. I found no duplicate. Sibling issues such as #17246 and #17245 cover other plugins.

    Automated triage. A maintainer reviews it.

  4. melodic-automation-lanes commented on Nov 19, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"f204839bffe1bd1b32847dfee8c37496434e1e80694b1c0220fca553e23d87e9","body_sha256":"ecb0b639eeb16f7cebdf54da2e81cf0e4a37af73963f4ded955778e560f4394b"}

  5. melodic-automation-lanes commented on Nov 19, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"f204839bffe1bd1b32847dfee8c37496434e1e80694b1c0220fca553e23d87e9","body_sha256":"ecb0b639eeb16f7cebdf54da2e81cf0e4a37af73963f4ded955778e560f4394b"}

  6. github-actions commented on Nov 19, 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

    agent-ready

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions