/discipline:reuse-or-replace [--repo <repo> ...]from discipline
Prevents codebase fragmentation by enforcing reuse of established patterns or open replacement with migration. Use when you detect a parallel second way being introduced.
Ships in discipline. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A drift corrector for anti-fragmentation discipline: one way to do a thing,
not two. The shared method (re-anchor, audit the work in flight, correct
forward, report) lives in
${CLAUDE_PLUGIN_ROOT}/context/re-anchor-audit-correct.md.
Read it; this file adds only what is specific to reusing or replacing an
established way rather than splitting into a parallel one.
When a codebase, structure, or process already has an established way of
doing something, new work must not silently stand up a second, parallel
way beside it. Two coexisting ways of doing the same thing is
fragmentation: it splits the reader's model, doubles the surface that
drifts, and taxes every future change with a "which one?" decision. Resolve
the source of truth per the method doc's ladder: if the consuming project
states a consistency / one-way rule in its own CLAUDE.md /
.claude/rules/, re-anchor that. Otherwise re-anchor this portable baseline.
Facing an established way, new work has exactly two honest options:
The sin is neither of those: it is leaving the established way in place and quietly adding a divergent way alongside it, so both now exist.
Reusing is not blind conformity, and this skill never demands straight obedience to the incumbent way. Replacing the established way is a first-class, encouraged move, not a deviation to be suppressed. The established way should be replaced when:
/discipline:do-your-research, invoked via the
Skill tool);When you replace, do it in the open and carry it through: migrate the old uses.
When you reuse, reuse because the way holds up, not merely because it is there;
that interrogation is /discipline:reason-dont-recite's axis (below).
Replacing the established way (or otherwise diverging from it) is allowed, but it carries a burden: a stated rationale, recorded proportional to the divergence's blast radius.
A project may record its chosen ways as paved paths: a standards index row
whose Surface is paved-path, pointing at one file that names, per concern,
the chosen way and the check that enforces it (the standards convention's
"Paved paths" section, docs/contracts/standards/README.md in the
marketplace repository). Read that file on demand, when the work in flight
touches a concern it might list; do not load it otherwise. The index sits at
docs/standards/README.md unless docs/conventions/standards.yaml sets another
standards_dir. A listed entry is the established way for that concern; a
second way beside it is the finding above, and replacing it means updating
the entry too. With no index or no paved-path row, find the established way
in the codebase.
This skill is the only one that writes paved-path entries; every other skill
(the architecture conventions lens, /corrections:codify (if enabled), review) proposes
an entry to it and writes none. When the work establishes a new way for a
recurring concern, or openly replaces a listed one, draft the entry: the
concern, the chosen way as a pointer to the code or template that shows it,
and the enforcing check, or none when nothing enforces it yet. For a
replacement, the draft changes the listed entry rather than adding a second
one for the same concern.
paved-path index
row, and the file the row points at) and write nothing until the user says
yes.This skill owns consistency of how work is done where judgment, not a tool, decides it: code idioms and shapes, module and file structure, naming shapes, error-handling and logging approaches, API and interface conventions, documentation formats, and process or workflow choices.
Mechanical style is out of scope. Indentation, quote style, import order, line length, and everything a formatter or linter settles deterministically belong to those tools, not to a judgment corrector.
/discipline:reason-dont-recite (evaluation-side). That skill
interrogates inherited content. Is this existing convention actually
justified, or coasting on precedent? This skill is production-side:
when creating new work, reuse the established way unless you state a
reason to replace it. They meet at the challenge: when this skill's audit
finds you want to replace the established way, the question "is the
established way even right?" is reason-dont-recite's, and the evidence for a
better way is /discipline:do-your-research's. Reuse-or-replace governs the
second way; those govern the justification./discipline:pick-for-the-problem (carve-out. Does not overlap). That
skill governs selecting a tool, library, framework, or dependency to fit
the problem, and names incumbency as a selection sin. This skill
never governs that selection. Consistency of idioms, structure, and
process is reuse-or-replace; choosing what tool or dependency to adopt is
pick-for-the-problem, where matching the incumbent choice can be exactly
the wrong reflex. Do not apply this skill to a build-vs-buy or
which-library decision. Route it there.Name concrete, located findings (per the method doc's step 2, self-audit; on load-bearing work a fresh-context subagent confirms a clean result):
/discipline:reason-dont-recite /
/discipline:do-your-research, invoked via the Skill tool).Correct each forward now: reuse the established way for the new work; or, where replacement is warranted, record the rationale at the blast-radius- appropriate level and, if the established way is genuinely superseded, migrate the existing uses and retire it rather than leaving both. Never settle for the silent second way.
Resolve the verification level once with
bash "${CLAUDE_PLUGIN_ROOT}/lib/read-verification.sh" --plugin discipline --skill reuse-or-replace --file docs/conventions/discipline.yaml
and report its line (levels):
The method doc's steps 2-4 say what light and off skip and the line the reply then carries.
A target form from
${CLAUDE_PLUGIN_ROOT}/reference/target-scope.md
(--repo <repo> and the others) runs the audit once per repository, per the
method doc's "Several repositories"; with none, the skill audits the work in
flight as above. Each repository's pass audits that repository's tracked
code, structure and docs for two coexisting ways of one concern with no
recorded reason, and returns its concern-to-way list (paved-path entries
first, then the ways its codebase shows) for the merge.
Across repositories, the merge adds one finding of its own: two
repositories solving the same concern two ways is the silent second way this
skill exists to catch, unless one of them records why it differs. It covers
only concerns inside this skill's Scope above: never a tool or dependency
choice, which stays /discipline:pick-for-the-problem's, and never
mechanical style. Name both ways and propose the one way both repositories
converge on, either one of the two or a new way that replaces both. A
paved-path entry is still written only in its own repository, behind the
ask in "Writing the paved-path entry".
What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/be-ambitiousBe ambitiousRaise a request before work (altitude, depth, range, outside check) and wait, or deepen finished work and redo it with an outside check./do-your-researchDo your researchRe-anchor research discipline: audit/correct work and pending recommendation (research properly, grounded, cite, verify, evidence not vibes, stop assuming, guessing, training-data recall, re-check what you recommended), or deep research pass to audit all claims. Use when 'do your research', 'fact-check that', 'verify every claim', or at start./follow-operating-proceduresFollow operating proceduresReread the user's and project's instruction files in force (CLAUDE.md, rules, imports), remind/remember how we work and operate, check work in flight against them, and correct drift or report clean. Use when 'follow operating procedures', 'reread my instructions', 'reread CLAUDE.md', or operating outside my instructions./follow-our-standardsFollow our standardsRe-anchor to organization engineering standard, audit work in flight (or --repo) for drifting from our standard and convention, and correct violation with doc citation. Use when 'follow our standards', 'does this match our conventions', 'audit against standards', or at conversation start on a repo governed by shared standard and convention./hold-my-handHold my handStanding hand-hold posture to guide multi-step work one phase at a time: show only current phase (exact step, output, failure, actor, reply), later as 'Phase 1 of N'. Use when 'hold my hand', 'walk me through this', 'one step at a time'. Not for lists: /adhd:shape; message: /adhd:clarify; scripts: /wizard:generate; stage: /session-flow:workflow./mind-your-maximsMind your maximsRe-anchor cooperative communication quality (Grice maxim plus AI transparency): audit recent response and artifact for completeness (neither too little nor too much), relevance (stay on topic), clarity (clear, not vague, answer the question), and disclosed boundary. Use when 'mind your maxims', 'answer what I asked', 'you buried the answer'.npx claudepluginhub melodic-software/claude-code-plugins --plugin disciplineOther plugins' skills for the same job