configure-plugin/skills/multi-repo-discipline/SKILL.md
Multi-repo workspace rules: read-only fixtures, upstream/downstream pairs. Use when dispatching agents across sibling repos or editing another repo's .claude/.
npx skillsauth add laurigates/claude-plugins multi-repo-disciplineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Roles and commit boundaries when multiple repositories share a parent workspace. Pairs with configure-plugin:config-sync — that skill propagates mechanical config; this one defines the discipline layer that says who owns what and when a cross-repo commit needs user confirmation.
| Use this skill when… | Skip when… |
|---------------------|------------|
| The cwd is inside a parent directory that contains other git repos | Working in a single isolated repo |
| A sibling CLAUDE.md names the current repo | No cross-repo relationship exists |
| Dispatching agents whose scope could span sibling repos | Single-repo agent fan-out |
| Updating a shared spec that other repos consume | Internal change with no downstream |
| About to edit a sibling's CLAUDE.md or .claude/ config | Edits confined to current repo |
Run before applying any discipline:
# Parent directory contains other git repos?
find "$(git rev-parse --show-toplevel)/.." -maxdepth 2 -name .git -type d
# Any sibling CLAUDE.md names this repo by directory name?
grep -l "$(basename "$(git rev-parse --show-toplevel)")" ../*/CLAUDE.md 2>/dev/null
If neither detector produces output, exit silently — the rule does not apply to single-repo work. Do not load discipline that does not apply.
Classify every repository in the workspace into one of three roles.
Inputs the current project depends on but must never mutate:
Discipline: treat as immutable. Never commit to a fixture. If an agent proposes an edit, the edit is a misdirection — redirect to the working repo.
Two repositories in the same domain where one derives from the other. Examples:
| Upstream | Downstream | |----------|-----------| | Workbench / toolkit | Shipped native port | | Schema-owning repo | Generated client library | | Design tokens | Component library | | Contract repo | Consumer service |
Discipline: the downstream may lag the upstream by design. Changes in the upstream do not automatically propagate — the orchestrator surfaces the required downstream diff and the human decides when to land it.
Single source of truth for shared specs, schemas, or interface contracts. Sibling repos that carry copies of the same material are explicitly downstream.
Discipline: updates to the authoritative surface are deliberate. The authoritative repo's commit lands first; downstream updates follow in their own PRs against the sibling repos.
Follow the repo's own conventions. No cross-repo confirmation needed.
Cross-repo edits during a dispatched agent's run are acceptable when the scope explicitly names the sibling path. Cross-repo commits in sibling repos require user confirmation before they land.
The pattern:
Orchestrator action needed field (see agent-patterns-plugin:parallel-agent-dispatch
§Verbatim patches).Automatic downstream commits are the failure mode this rule prevents — they drift schemas silently and the next reviewer cannot tell which commit shipped the decision vs which shipped the propagation.
CLAUDE.md / .claude/ / docs/Never modify a sibling repo's CLAUDE.md, .claude/ config, or docs/
as a side-effect of unrelated work. These are the sibling repo's
authoritative surfaces; touching them mid-unrelated-task is a side-effect
bug.
When a sibling's Claude configuration genuinely needs an update,
dispatch a targeted agent whose scope names the sibling's config
explicitly. configure-plugin:config-sync handles the mechanical
propagation; this rule sets the boundary.
When the current repo is authoritative and a change affects downstream consumers:
Checklists embedded in the authoritative PR description often get lost when the PR merges. Prefer follow-up issues per downstream repo, linked from the authoritative PR description.
| Scenario | Action |
|----------|--------|
| Edit in current repo | Normal commit |
| Agent edit in sibling worktree | OK; commit only with user confirmation |
| Sibling's CLAUDE.md changed as side-effect | Revert; redirect scope |
| Spec change in authoritative repo | Land here; file follow-up in downstream |
| Fixture repo edit proposed | Refuse; redirect |
configure-plugin:config-sync — mechanical propagation that this rule gatesagent-patterns-plugin:parallel-agent-dispatch — Return Contract's "Orchestrator action needed" field carries cross-repo diffsagent-patterns-plugin:agent-coworker-detection — concurrent-writer detection in shared checkouts.claude/rules/docs-currency.md — same-commit discipline (applies to each repo individually)Evidence: multi-repo sessions where downstream propagation was auto-committed produced a week-long schema drift that took two follow-up PRs to reconcile. Surfacing the diff and letting the human decide when to land it avoided the drift entirely on the next cycle.
tools
Scaffold a new ComfyUI custom-node repo (pyproject, CI, release-please, vitest+pytest, JS extension skeleton) in the picker/gesture vein. Use when bootstrapping or init-ing a comfyui node pack.
tools
Orchestrate a ComfyUI node pack from idea to registry: scaffold, create + seed the repo, open the gitops adoption PR. Use when releasing or spinning up a new comfyui node pack.
testing
macOS EndpointSecurity/EDR high CPU & battery drain. Use when Kandji ESF / XProtect pegs a core; trace the exec storm via powermetrics + eslogger.
development
odiff pixel-by-pixel image diffing. Use when comparing screenshots, detecting visual regressions, diffing before/after PNGs, asserting golden images.