Skip to content

refactor(discipline): rename re-anchor plugin to discipline - #1276

Merged
kyle-sexton merged 3 commits into
mainfrom
refactor/rename-re-anchor-to-discipline
Jul 25, 2026
Merged

refactor(discipline): rename re-anchor plugin to discipline#1276
kyle-sexton merged 3 commits into
mainfrom
refactor/rename-re-anchor-to-discipline

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

No related issue: the rename was decided in-session; the follow-on metadata work it unblocks is tracked under the issues in ## Related.

Summary

Renames the re-anchor plugin to discipline. re-anchor is a bare verb sitting among 60 noun-named siblings, its re- prefix presumes a prior anchored state the conversation-start case does not have, and it collides with the cognitive-bias term of art. discipline is the word the plugin already used for itself 189 times ("a drift corrector for research discipline") — the authors' own revealed vocabulary, not a coinage, and legible to a reader who has never seen the plugin.

The verb "re-anchor" is deliberately KEPT (210 occurrences, context/re-anchor-audit-correct.md, and 3 live trigger phrases). The three defects above concern its use as a CONTAINER name; as the verb for step 1 of the loop it is accurate. Changing it would touch eval expectations and trigger keywords that skill-quality:check gates against HEAD, so it belongs in a separate reviewable pass if wanted at all.

Mechanically, 45 files:

  • Directory moved with git mv so history is preserved
  • sweep-all-disciplines skill renamed to sweep-all
  • plugin.json name + version 0.9.0; marketplace entry name/source plus a renames map entry so installed consumers migrate instead of hitting plugin-not-found
  • All /re-anchor:* invocations to /discipline:*; metadata.re-anchor-batch to discipline-batch
  • Cross-plugin references in docs-hygiene, planning, review, session-flow, source-control, work-items
  • CHANGELOG 0.9.0 entry carrying the full rationale and every rejected candidate, plus a header pointer noting entries below 0.9.0 shipped under the former name

Deliberately NOT rewritten: CHANGELOG history and docs/topics/ — they record releases and decisions that genuinely happened under the former name.

Test plan

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01GSXnCLnmzk8y4cKv2y1z9f

Three verified defects in the old name. It was a bare verb — the sole
outlier among 60 sibling plugins, all nouns or noun-phrases. The `re-`
prefix presumes a prior anchoring, but the shared method's documented
conversation-start case is a first posture-set with nothing yet to
re-anchor. And "anchoring" is the cognitive-bias term of art, so the
plugin was named after the bias `reason-dont-recite` exists to fight.

`discipline` is the word the plugin already used for itself 189 times
("a drift corrector for research discipline") — the authors' revealed
vocabulary rather than a coinage. Container/member word overlap
(`/discipline:sweep-all`) is routine here: `/planning:plan`,
`/debugging:debug`, `/visualization:visualize`, and `/work-items:work`
all ship that shape.

Rejected on evidence: `steering` (fails the conversation-start case;
collides with Codex "mid-turn steering" and ML "activation steering"),
`calibration` (implies adjustment against a measurable reference with
quantified error — this work is judgment-based, the same objection that
rules out `invariants`), `salience` (accurate but not a word a reader
reaches for first), `grounding` (slug already taken).

Also renames `sweep-all-disciplines` to `sweep-all`, removing the one
awkward pairing the plugin rename introduced.

Migration is automatic via the marketplace `renames` map (CC >= 2.1.193);
no user action required. `CHANGELOG.md` history and `docs/topics/` are
deliberately not rewritten — they record releases that shipped under the
former name.

The verb "re-anchor" is retained in skill bodies and trigger phrases: the
defects above concern its use as a container name, not as the verb for
step 1 of the loop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GSXnCLnmzk8y4cKv2y1z9f
@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 31s —— View job


PR Review: refactor(discipline): rename re-anchor plugin to discipline

  • Gather context and understand the PR
  • Review plugin.json — name, version, renames map
  • Review marketplace.json — name/source/renames entry
  • Review skill invocation updates (/re-anchor:*/discipline:*)
  • Review cross-plugin reference updates
  • Review CHANGELOG entry
  • Check for stale re-anchor references in non-verb usage
  • Verify alignment with CLAUDE.md requirements
  • Post final review

Summary

This is a thorough, well-scoped rename. The mechanics are sound: the renames map in marketplace.json enables automatic migration for installed consumers, discipline-batch metadata is consistently applied across all 14 skill frontmatters, all cross-plugin /re-anchor:* invocations are updated, and the CHANGELOG 0.9.0 entry carries the full rationale with rejected candidates documented. I found one clear miss and one functional issue in the updated setup skill.


Findings

1. README H1 heading still reads # re-anchor

File: plugins/discipline/README.md, line 1

The file moved to plugins/discipline/ but the H1 title was not updated:

# re-anchor   ← should be: # discipline

This is the landing-page heading for every consumer who opens the plugin README. All /discipline:* invocation tokens below it are correct — only the title line was missed. Fix this →


2. setup skill instructs users to run /plugin configure re-anchor

File: plugins/discipline/skills/setup/SKILL.md, lines 73 and 81

The plugin is now named discipline, but the skill body tells users to run the old name:

/plugin configure re-anchor   ← will fail; plugin is now named discipline

Both line 73 (interactive /plugin configure re-anchor any time) and line 81 (the re-anchor flow reference) need to read /plugin configure discipline. A user who follows this instruction will hit a not-found error. Fix this →


3. Minor: setup skill body text refers to "re-anchor's effective configuration"

File: plugins/discipline/skills/setup/SKILL.md, line 18

Report re-anchor's effective configuration without editing Claude Code settings.

Should read Report discipline's effective configuration…. Not a functional issue — a reader is not misled — but it is inconsistent with the skill description's first sentence which correctly says "the discipline plugin's configuration". Minor; can be fixed alongside finding 2.


Observations (no action required)

  • setup description trigger phrases ('set up re-anchor', 'configure re-anchor', etc.) — keeping the old-name phrases is a reasonable backward-compat choice for users who still type the former name; the description's opening correctly names "the discipline plugin".
  • metadata.re-anchor-batch in CHANGELOG — two occurrences in the 0.6.0 history entry describing how the old key was named at that release. Intentionally preserved per the stated no-rewrite policy for CHANGELOG history; correct.
  • discipline-batch metadata — verified across all 14 skill frontmatters; fully consistent.
  • sweep-all-disciplinessweep-all — rename is correct and the CHANGELOG entry explains the rationale well (/discipline:sweep-all-disciplines was genuinely awkward).
  • renames map"re-anchor": "discipline" in marketplace.json is the right location for this; the chain terminates cleanly.
  • re-anchor verb preservation — correctly kept in every context where it is the verb for the loop step, not the container name.

Verdict

Two issues to fix before merge: the README H1 (cosmetic but prominent) and the /plugin configure re-anchor command references in setup/SKILL.md (functional — will produce a not-found error for any user who follows the instruction). Everything else is correct.

@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 30s —— View job


Security Review — PR #1276

  • Gather PR diff and changed files
  • Review plugin manifest and marketplace changes
  • Review skill files for injection surfaces
  • Review cross-plugin references
  • Review GitHub Actions / workflow changes
  • Check for secrets/credential handling issues
  • Report findings

Result: No security issues found

This PR is a mechanical rename/refactor — 45 files, all moving content from plugins/re-anchor/ to plugins/discipline/, updating slash-command invocations from /re-anchor:* to /discipline:*, and adding a renames migration map entry. I reviewed each attack surface in scope:

GitHub Actions — No .github/workflows/ files were changed. No CI/CD security surface introduced.

Manifest and marketplace (marketplace.json, plugin.json) — The renames entry "re-anchor": "discipline" is a static JSON string used by the Claude Code plugin resolver to redirect installed consumers; it is not evaluated as code. The four new userConfig fields (batch_exclude, batch_promote, batch_demote, research_deep_verification) accept user-supplied strings, but these strings are consumed only as LLM skill-name lookups and a two-value enum (tiered/full). The skill docs explicitly degrade any unrecognized or unexpanded value to the safe default rather than erroring — no injection surface.

SKILL.md instruction files — The skills that dispatch subagents (do-your-research-deep, sweep-all, recheck-against-upstream-deep) and the skill that scripts deterministic work (script-the-deterministic-work) are all pre-existing in the renamed re-anchor plugin. No new agentic capabilities or code-execution surfaces were introduced by this PR; the content changes are pure rename passes.

Path references — All ${CLAUDE_PLUGIN_ROOT}/… references remain within the plugin boundary. No ../ traversal. No new remote fetch targets added.

Cross-plugin updates — The seven modified files in sibling plugins (docs-hygiene, planning, review, session-flow, source-control, work-items) are plain text replacements of skill-invocation strings. No logic changes, no new trust delegations.

Secrets and credentials — None present in any changed file.

Supply chain — No new dependencies, action pins, or remote MCP servers added.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 535d250e64

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/discipline/skills/setup/SKILL.md Outdated
Comment thread plugins/discipline/CHANGELOG.md Outdated
…ename

The rename pass updated every `/re-anchor:*` slash-command invocation but
missed the places the plugin name appears as a COMMAND ARGUMENT or a title,
where the old name now resolves to nothing:

- `README.md` H1 still read `# re-anchor`
- `/plugin install re-anchor@melodic-software` — would fail for any new
  installer following the README
- `/plugin configure re-anchor` in `README.md` and `setup/SKILL.md` — would
  fail for any user following the setup skill's own instructions
- `setup/SKILL.md` prose reporting "re-anchor's effective configuration"
- `setup/evals/evals.json` expected output and criteria asserting the
  assistant routes to the stale command

`setup`'s trigger phrases gain `discipline` spellings alongside the
`re-anchor` ones, which stay for users who still type the former name.

The 0.9.0 CHANGELOG entry also claimed migration needed no user action. The
`renames` map migrates the installed plugin record and nothing else: it
cannot rewrite qualified invocations stored in a consuming repository, an
agent prompt, or automation, and the `sweep-all-disciplines` -> `sweep-all`
leaf rename has no compatibility path at all because the map keys plugins,
not skills. The entry now states both explicitly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GSXnCLnmzk8y4cKv2y1z9f
@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 29s —— View job


PR Review: refactor(discipline): rename re-anchor plugin to discipline

  • Gather context on the follow-up commit (930c97a)
  • Verify fixes for findings from prior review
  • Check for any new issues
  • Post final review

The follow-up commit 930c97a addresses every finding from the initial review and the Codex P2 comments. Here is the verification:

Finding 1 (prior review) — README H1 still read # re-anchor
Fixed. H1 is now # discipline.

Finding 2 (prior review, functional) — /plugin configure re-anchor in setup/SKILL.md
Fixed. Both occurrences (lines 73 and 81 of the original) updated to /plugin configure discipline. The evals (setup/evals/evals.json) were updated in the same commit to match — expected output and criteria now assert routing to /plugin configure discipline.

Finding 3 (prior review, minor) — prose "re-anchor's effective configuration"
Fixed. Now reads "discipline's effective configuration".

Codex P2 — /plugin install re-anchor@melodic-software in README
Also fixed (not in the prior review, caught in this pass). README install block now reads /plugin install discipline@melodic-software.

Codex P2 — CHANGELOG claimed no user action required
Fixed and improved. The 0.9.0 entry now explicitly distinguishes what the renames map DOES (migrates the installed plugin record) from what it DOESN'T (rewrite qualified invocations in consuming repos), and gives the hand-update steps. The sweep-all-disciplinessweep-all leaf rename's lack of a compatibility path is now documented explicitly.

Backward compatibility — setup trigger phrases
Handled correctly. The discipline spellings ('set up discipline', 'configure discipline', etc.) were added to the description alongside the retained re-anchor spellings, so users who still type the former name are still routed.


Remaining stale re-anchor occurrences (all intentional)

  • plugin.json description/keywords — verb and keyword for discoverability; both correct
  • CHANGELOG.md line 37 — appears in the migration guide as the thing to replace (correctly shows re-anchordiscipline)
  • CHANGELOG.md historical entries below 0.9.0 — records what shipped under the former name; intentional per the stated no-rewrite policy
  • README.md inline comments (# re-anchor + audit + correct) — verb in code comments describing the skill loop step; correct

No stale plugin-name references remain.

Verdict

All findings resolved. The PR is clean and ready to merge.

@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 0s —— View job


Security Review — PR #1276

  • Review PR diff (git diff)
  • Examine manifest/marketplace changes for injection surfaces
  • Review skill files for prompt injection, command injection, path traversal
  • Check cross-plugin reference updates
  • Inspect GitHub Actions / workflow changes
  • Check for secrets/credential exposure
  • Report findings

Result: No security issues found

This PR is a mechanical rename — 45 files moving content from plugins/re-anchor/ to plugins/discipline/, updating slash-command invocations from /re-anchor:* to /discipline:*, adding a renames migration map entry, and updating cross-plugin references in 7 sibling plugins. I reviewed each attack surface in scope:

GitHub Actionsgit diff d39ea66..HEAD -- '.github/' returns nothing. No workflow files were changed.

marketplace.json and plugin.json — The "re-anchor": "discipline" entry added to the renames map is a static JSON string used by the Claude Code plugin resolver as a lookup table. It is not evaluated as code and contains no special characters. The four userConfig fields (batch_exclude, batch_promote, batch_demote, research_deep_verification) accept user-supplied strings and are pre-existing; this PR only renames the plugin that declares them:

  • The three batch_* fields are consumed as comma-separated corrector names, validated via a glob against the skills/ directory (see setup/SKILL.md step 4). An adversarial value like ../../etc/passwd would be checked against the glob result and surface as a FAIL (typo or removed corrector) — no file read or execution on the name. Degradation is safe.
  • research_deep_verification is a two-value enum (tiered/full); any unrecognized string — including an unset/unexpanded token — falls back to tiered. No error path, no code execution.

SKILL.md instruction files — The skills that dispatch subagents (do-your-research-deep, sweep-all, recheck-against-upstream-deep) and the skill that scripts deterministic work (script-the-deterministic-work) are all pre-existing. The PR's changes to these files are pure string replacements of plugin/skill names. No new agentic capabilities or code-execution surfaces were introduced.

sweep-all's fork subagent dispatch — The skill dispatches fork subagents by reading each corrector's discipline-batch metadata from its SKILL.md frontmatter. The membership is determined by globbing the skills/ directory and reading colocated metadata; there is no externally-controlled input that can inject an arbitrary skill name into the dispatch path. userConfig overlays are validated against the glob result (same defense as above) before they influence membership.

Path references — All ${CLAUDE_PLUGIN_ROOT}/… references remain within the plugin boundary. No ../ traversal. The context file context/re-anchor-audit-correct.md is intentionally preserved under its old name inside plugins/discipline/ (the PR description states this explicitly, and the diff confirms a rename with 0 changes).

Cross-plugin updates — The seven modified files in sibling plugins (docs-hygiene, planning, review, session-flow, source-control, work-items) are plain text replacements of skill-invocation tokens (/re-anchor:skill/discipline:skill). No logic changes, no new trust delegations, no new MCP server connections.

Secrets and credentials — None present in any changed file. No .env, no tokens, no API keys.

Supply chain — No new dependencies, no new npm packages, no new GitHub Action pins or version bumps, no new remote MCP servers added.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 930c97a470

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/discipline/CHANGELOG.md Outdated
@kyle-sexton

Copy link
Copy Markdown
Contributor Author

Review response — all findings CONFIRMED, fixed in 930c97a4

Each was verified against the actual file before fixing; none were taken on assertion.

# Finding Verdict Fix
1 plugins/discipline/README.md:1 H1 reads # re-anchor CONFIRMED Now # discipline
2 setup/SKILL.md:73,81 instruct /plugin configure re-anchor CONFIRMED — functional; a user following the instruction hits not-found Both now discipline
3 setup/SKILL.md:18 prose "re-anchor's effective configuration" CONFIRMED Now "discipline's"
Codex P2 (a) Same /plugin configure re-anchor class, plus README:363 and the eval expectations CONFIRMED All updated
Codex P2 (b) CHANGELOG claimed migration needs no user action CONFIRMED — the claim was false as written Entry rewritten

Two more of the same class, found while verifying yours:

  • plugins/discipline/README.md:340/plugin install re-anchor@melodic-software. The install instruction itself would fail for a new consumer. Higher impact than finding 1, and neither review caught it.
  • setup/evals/evals.json:8,12expected_output and an expectations entry both asserted the assistant routes to /plugin configure re-anchor. A correctly-behaving assistant would have failed the eval.

On the setup trigger-phrase observation — agreed that keeping the re-anchor spellings is right, but keeping only them left a gap: a user typing "configure discipline" matched nothing. The description now carries both sets. The old phrases are preserved, so skill-quality:check's trigger-keyword-preservation gate against HEAD still passes.

On the retain-compatibility-commands alternative (Codex): considered, not taken. A duplicate sweep-all-disciplines skill would consume skill-listing budget permanently to serve a one-time transition. Documenting the manual step is proportionate; the CHANGELOG entry is what makes a shim discoverable if a third-party consumer ever appears.

Root cause of the class. The original sweep searched for /re-anchor: invocations and plugins/re-anchor paths. It found zero — correctly — because the misses were neither shape: the plugin name as a bare argument to /plugin install|configure, and as a document title. My own pre-push grep did hit setup/SKILL.md and I classified it as verb usage without reading the surrounding line. That is exactly how the class survived.

Verification after the fix:

  • claude plugin validate . — passes
  • markdownlint-cli2 on all changed markdown — 0 errors
  • evals.json and marketplace.json — parse
  • Repo-wide search for the plugin name as a command argument (/plugin install|configure|enable|disable, re-anchor@) — zero hits outside CHANGELOG history

…st upstream

The 0.9.0 entry said the map "rewrites nothing else" beyond the installed
plugin record. That is wrong. Official docs, the in-binary marketplace schema,
and the decompiled migration function all agree the map rewrites the old key to
the new one in the user, project, and local settings scopes for BOTH
`enabledPlugins` and `pluginConfigs` — so a configured consumer's
`batch_exclude` / `batch_promote` / `batch_demote` /
`research_deep_verification` values move automatically.

Two edges the upstream docs do not spell out, both read off the migration
function: managed and policy scopes are read-only and are not rewritten, and a
pre-existing `pluginConfigs` entry under the new id wins — the old entry is
deleted, not merged. Below 2.1.193 the rename does not migrate at all, which
reports `plugin-not-found` rather than losing configuration.

The genuinely manual step is unchanged and stays documented: invocations stored
outside settings are never rewritten.

Source: https://code.claude.com/docs/en/plugin-marketplaces#rename-or-remove-a-plugin
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GSXnCLnmzk8y4cKv2y1z9f
@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 11s —— View job


PR Review — refactor(discipline): rename re-anchor plugin to discipline

  • Gather context on latest commit (aa094fc)
  • Review Codex P2 finding on userConfig migration
  • Check CHANGELOG for updated migration guidance
  • Post final review

The latest commit aa094fc is a single-file, targeted correction to the 0.9.0 CHANGELOG entry — directly addressing the Codex P2 finding raised after the second review.

What changed. The prior version stated the renames map "rewrites nothing else" beyond the installed plugin record. That claim was false: the map also rewrites pluginConfigs entries (for batch_exclude, batch_promote, batch_demote, research_deep_verification) in user, project, and local settings scopes. The updated entry now states this accurately, attributes it to Claude Code >= 2.1.193, and documents two edge cases the upstream docs don't cover:

  1. Managed and policy scopes are read-only to Claude Code and are not rewritten.
  2. If discipline@melodic-software already has a pluginConfigs entry before migration, the new id's values win and the old ones are dropped rather than merged.

Both edge cases are niche (edge 2 requires a consumer to have simultaneously enabled both the old and new plugin ID with distinct config) and are documented rather than worked around — appropriate for a docs-only file. Below 2.1.193 the CHANGELOG now clarifies nothing is lost (migration simply doesn't run, and the old name reports plugin-not-found).

Verification. The commit cites https://code.claude.com/docs/en/plugin-marketplaces#rename-or-remove-a-plugin as the source. The manually-verified-from-upstream claim is unverifiable here by static analysis, but this is documentation, not behavior code, and the author's verification trail is clear.

No new issues. The only file changed is plugins/discipline/CHANGELOG.md. The rest of the PR remains clean from the 930c97a pass.


Verdict

All findings from both prior reviews, both Codex P2 comments, and the response thread are resolved. The PR is ready to merge.

@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 56s —— View job


Security Review — PR #1276

  • Gather PR diff and identify changed files
  • Review manifest/marketplace changes (plugin.json, marketplace.json)
  • Review skill files for injection surfaces
  • Review cross-plugin reference updates
  • Check for secrets/credential handling
  • Check GitHub Actions workflow changes
  • Report findings

Result: No security issues found

This PR is a mechanical rename — 45 files moving content from plugins/re-anchor/ to plugins/discipline/, updating slash-command invocations from /re-anchor:* to /discipline:*, adding a renames migration map entry, and updating cross-plugin references in seven sibling plugins. I reviewed each attack surface in scope:

GitHub Actionsgit diff d39ea66..HEAD -- '.github/' is empty. No workflow files were changed.

marketplace.json and plugin.json — The "re-anchor": "discipline" entry added to the renames map is a static JSON string used by the Claude Code plugin resolver as a lookup table; it is not evaluated as code. The renames chain terminates cleanly (no cycles, no multi-hop that could redirect to an unintended plugin). The four userConfig fields (batch_exclude, batch_promote, batch_demote, research_deep_verification) are pre-existing definitions carried over from the renamed plugin with no behavioral change:

  • The three batch_* fields accept comma-separated corrector names. In both sweep-all/SKILL.md and setup/SKILL.md, each parsed name is matched only against the result of a glob over the colocated skills/ directory — it is never used to construct a file path or shell command. An adversarial value like ../../etc/passwd matches nothing in the glob and is reported as a FAIL with no side effect. Surviving unexpanded ${user_config.…} tokens are explicitly treated as unset in both files.
  • research_deep_verification is a two-value enum; any unrecognized string falls back to tiered with no error path and no code execution.

sweep-all/SKILL.md — Dispatches conversation-inheriting fork subagents per corrector. The corrector set is determined by globbing ${CLAUDE_PLUGIN_ROOT}/skills/ and reading colocated discipline-batch metadata — there is no externally-controlled input that can inject an arbitrary corrector name into the dispatch path. The userConfig overlay is applied only after the glob result is resolved, and validation against that result is the gate. No changes to this logic in the PR.

do-your-research-deep/SKILL.md and recheck-against-upstream-deep/SKILL.md — Both dispatch fresh-context subagents for verification. The dispatch inputs are derived from reading the session's conversation and the project under review; no user-controlled scalar from outside the session shapes the subagent prompt in an unsafe way. Both files are pure rename passes with no behavioral change.

script-the-deterministic-work/SKILL.md — Instructs the model to write and execute scripts for deterministic sub-work. This is a model behavior instruction, not a code-execution surface in the security sense; the model writes scripts in response to the task at hand, subject to Claude Code's permission model. No change in this PR.

Path references — All ${CLAUDE_PLUGIN_ROOT}/… references remain within the plugin boundary. No ../ traversal. context/re-anchor-audit-correct.md is preserved inside plugins/discipline/ under its original filename (zero content changes).

Cross-plugin updates — The seven modified files in sibling plugins (docs-hygiene, planning, review, session-flow, source-control, work-items) are plain text replacements of skill-invocation tokens. No logic changes, no new trust delegations, no new MCP server connections.

Secrets and credentials — None present in any changed file.

Supply chain — No new dependencies, no new npm packages, no new GitHub Action pins or version bumps, no new remote MCP servers added.

@kyle-sexton
kyle-sexton merged commit 7cad5ca into main Jul 25, 2026
26 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/rename-re-anchor-to-discipline branch July 25, 2026 02:13
kyle-sexton added a commit that referenced this pull request Jul 25, 2026
Rebasing onto a moved default branch invalidated two statements in the brief
that were accurate when written:

- #1276 renamed the `re-anchor` plugin to `discipline` and its sweep skill to
  `sweep-all`. The TLDR now cites the live surface, `/discipline:sweep-all`.
- #1261 added a fifteenth contract slice, so the deferred question's count of
  persisting slices moves from fourteen to fifteen. Counted on the default
  branch, which is what the question is about — this branch's own slice is the
  sixteenth and is not yet merged.

Co-authored-by: Claude <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 25, 2026
S13 cited the source article at its .work/ path, which no clone contains; it
now points at the committed copy. The D-12 evidence pointer named a file that
lives only in the memory slice and said nothing about that - it now states
where the file is and that a clone cannot reach it, rather than dangling.

Records the #1276 rename as an erratum instead of rewriting the digests. Every
plugins/re-anchor path in them resolves nowhere now, but those are dated
measurements taken before the rename; retargeting paths and line numbers that
were never re-measured would fabricate precision. The lanes resuming against
those targets are who this warning is for.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 25, 2026
…sweep missed (#1365)

## Summary

Fixes the two genuinely-live follow-ups from #1328 — three prose sites
the `re-anchor` -> `discipline`
token sweep (#1276) missed, leaving stale `re-anchor` prose beside the
already-renamed token:

- `plugins/work-items/reference/pipeline-shape.md:52` — "re-anchor slot"
/ "re-anchor set" -> "discipline slot" / "discipline set", matching the
sibling `docs/conventions/loop-lane/README.md:181` the same rename
commit already updated.
- `plugins/work-items/skills/work-loop/SKILL.md:176` — "presence-gated
re-anchor sweep" -> "presence-gated discipline sweep", matching
`plugins/source-control/skills/babysit-loop/SKILL.md:319`.
- `plugins/session-flow/skills/reanchor/evals/evals.json:76` — eval case
`id: 7`'s `name` field,
`negative-routing-rule-discipline-is-re-anchor-plugin` ->
`negative-routing-rule-discipline-is-discipline-plugin`, matching the
sibling `negative-routing-*` case names.
`expected_output`/`expectations` were already correct; only the `name`
field was stale. Grepped the repo — nothing else references the old
name.

Each plugin touched (`work-items`, `session-flow`) gets a matching patch
version bump and CHANGELOG entry.

**Item 1 of #1328 (orphaned `pluginConfigs` overlays) is deliberately
NOT addressed — its premise is false, verified against current upstream
docs.** #1328 claimed the rename orphans
`pluginConfigs["re-anchor@melodic-software"].options` because the
`renames` map "migrates only the enabled/installed record — not the
options," and proposed telling users to manually re-enter their four
`userConfig` values. Fetched [Create and distribute a plugin
marketplace](https://code.claude.com/docs/en/plugin-marketplaces#rename-or-remove-a-plugin)
this session; it states, verbatim:

> It then rewrites the old key to the new key in the user, project, and
local settings scopes for both `enabledPlugins` and `pluginConfigs`, so
the notice appears once.

`plugins/discipline/CHANGELOG.md`'s `[0.9.0]` entry already states this
correctly — a `chatgpt-codex-connector[bot]` reviewer raised the same
pluginConfigs concern on #1276 itself, and it was resolved pre-merge
(not left "without a reply" as #1328 states): confirmed incorrect
against the same upstream doc and fixed in commit `aa094fc9`, before
#1276 merged. Adding the proposed "re-enter your values via `/plugin
configure discipline`" line would ship guidance that contradicts
upstream behavior. Per the Bug Investigation Rule (`/work-items:work`),
this is proof via history that the claim doesn't apply, not a
reproduction — so item 1's acceptance box is intentionally left
unchecked.

The three retained-by-design items #1328 lists (the
`re-anchor-audit-correct.md` filename, `marketplace.json`
`tags`/`renames`, CHANGELOG history) are unchanged, per the issue's own
acceptance criterion 3.

## Test plan

- [x] `jq .` on all three touched JSON files (`evals.json`, both
`plugin.json`) — valid.
- [x] Grepped the fixed lines post-edit — no `re-anchor` token remains
at any of the three sites; grepped the eval-case-name string repo-wide
for other references — none found.
- [x] Diffed the retained-by-design sites
(`plugins/discipline/context/re-anchor-audit-correct.md`,
`.claude-plugin/marketplace.json`,
`docs/topics/fresh-eyes-checkpoint-audit/PLAN.md`) — untouched.
- [x] Verified the item-1 rebuttal against current docs (WebFetch, this
session) and against PR #1276's own review thread (`gh api
repos/.../pulls/1276/comments`).

## Related

Closes #1328. Related to #1276 (the rename this fixes fallout from).

---

*This was generated by AI during work-loop execution.*

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 25, 2026
The contract tier is committed on the task branch only and pruned before merge
(docs/conventions/topic-docs/README.md:33, :302-304). Its durable outcome
graduated to docs/adr/0004 in an earlier commit on this branch; what remains
here is the evidence base that produced it.

Pruned: the thirteen blind section digests, the agent brief, the collision
register, and the source-article capture. Each is dated measurement taken
against a tree that has since moved — #1276 renamed the re-anchor plugin and
the sweep-all-disciplines skill out from under every path they cite — so
retargeting them would fabricate precision they never had, and keeping them
would publish stale targets an incumbent search silently fails against. The
rename mapping and the digests' surviving conclusions are recorded in the ADR.

The evidence does not become unreachable. This commit's parent holds the full
slice, and GitHub serves blobs at a pull request's head SHA after squash-merge
and branch deletion (verified against merged #1365). The PR description carries
that SHA and the retrieval command, which is the pointer this convention
directs durable surfaces to leave (:135-141, :302-304).

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 25, 2026
…dispatched instruction-surface pass (#1322)

The design record behind #1315, #1316, and #1318 — the decomposition of
the source article, the proportionality gate that decided what to build,
and the contracts the shipped code implements.

No linked issue.

## What it decides

Seven candidate detectors (D1–D7) went through a proportionality gate.
**One survived as a new check** — cross-surface instruction conflict,
the only finding with no incumbent. Every other candidate became an edit
to a check that already owns its surface, or an explicit exclusion with
a recorded reason. The gate's own working is here, including the parts
that went against the first answer.

## The corrections are the point

This branch documents four occasions where the effort asserted "nothing
covers this" and was wrong each time, because nobody read the body of
the incumbent — `skill-quality:check`, `mcp-tools:audit`,
`claude-memory`'s C6 (on the deliverable's *own* primary check, *after*
the failure mode had been named), and an eval runner that already
existed as working code. Counts had the same disease. The standing rule
that came out of it — derive counts by command, never transcribe them —
is recorded with the instances that produced it.

## Independent verification

A second derivation of the same source article was made **deliberately
blind** to this one, and the two were compared. They substantially
agree: the blind reader independently reached "one detector with no
incumbent, everything else an edit inside the plugin that already owns
the surface", and independently routed its own new rule to the same
catalog at the same check number. Six findings moved a disposition and
are recorded, along with seven things this derivation found that the
blind one missed. Where they genuinely diverge — the blind derivation
ratified "no new router" — the disagreement is recorded rather than
resolved in this work's favour, with the reconciliation left open as a
row due before Phase 9.

## A convention conflict this PR cannot resolve on its own

`docs/conventions/topic-docs/` places `docs/topics/<slug>/` in the
**contract tier**: "committed on the task branch only; pruned before
merge." This PR does not prune, because **fifteen topic directories are
already on `main`**, including one merged today. Practice and the
written convention disagree wholesale, and this branch follows practice
rather than silently picking a side.

Reviewer call: merge as-is (consistent with every prior topic branch),
or prune first (consistent with the written convention, which would then
need every existing topic directory explained). Either way the
convention and practice should stop disagreeing.

Task #37 was resolved on the assumption the prune is real, and that work
stands regardless — the shipped catalog carries its own source URLs and
recheck triggers rather than pointing into this tree, so nothing in
#1316 or #1318 dangles whichever way this goes.

## Also in here

The prompt-injection threat model the design entirely lacked —
`audit-pass` reads instruction surfaces that are attacker-controlled
text in any repository the operator did not write. Plus the re-run
contract, the determinism tiering, the seam resolution, and the naming
record for `audit-pass` (32 candidates, five lenses, with what the
chosen name *costs* recorded so it is not re-litigated).

Rebased onto current `main`, including the `re-anchor` → `discipline`
plugin rename from #1276.

## Related

- #1315 — cross-plugin hygiene, the fixes this design's audit found
- #1316 — the criteria payload
- #1318 — the `audit-pass` skill
- #1096 — fresh-eyes doctrine and check 21; this design's determinism
contract was re-verified against it
- #1225 — a second sweep-shaped effort; reconciliation open before Phase
9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 26, 2026
…ferences (#1386)

Closes #1283

## Summary

Six stale references survived three sweep passes during the `re-anchor`
→ `discipline` plugin rename (#1276). All six were two syntactic shapes
`rename-references`' pattern library did not cover, and the gap is
structural rather than incidental: **Forms 1–12 all assume the renamed
token is a skill or mode identifier.**

When a CONTAINER renames — a plugin, a marketplace entry — the token
occupies positions none of them reach:

- **Form 1** anchors on `/<old>`, so it cannot fire on `/plugin
configure <old>`: the slash belongs to `plugin`, and the token sits
downstream in argument position.
- **Form 3** needs a path; none of these are paths.
- **Form 2** (bare token) matches, but cannot separate the container
sense from the verb sense at any triage setting when the token is also a
verb in the consuming codebase.

Forms 13–15 anchor on syntax that admits **only** the naming sense:

| Form | Position | Why it is Certain |
|---|---|---|
| 13 | Command argument — `/plugin install <old>@mkt`, `/plugin
configure <old>` | A management verb immediately precedes the token;
prose does not say "/plugin configure" before an English verb |
| 14 | Document title — `# <old>`, frontmatter `name:` | The `$` anchor:
a heading that *contains* the token may be verb usage, but one that IS
the token can only be naming it |
| 15 | Possessive / appositive — `<old>'s`, `the <old> plugin` | English
verbs do not take the possessive clitic; the noun-class appositive
forces the naming reading |

Command-argument hits are flagged as **functional breaks**, not
cosmetic: a reader following `/plugin install <old>@marketplace` gets
`plugin-not-found`. Four of the six missed references were this shape,
including the README's own install block.

## Fix

- `context/patterns.md` — Forms 13–15, each with the five documented
fields the existing forms carry, under a short section explaining why
container position is its own class.
- `context/triage.md` — records the collision class the English-verb
blocklist **cannot** serve. The blocklist holds tokens that are verbs
*in general*; a token that is a verb *in the consuming codebase* fails
both ways: omitted → every bare-token hit is rated Certain and the sweep
proposes rewriting the verb uses; added → every hit lands ambiguous,
where the per-match confirmation rule turns a handful of real defects
into hundreds of prompts. Extending the blocklist swaps one unusable
bucket for another. The remedy is position.
- `context/patterns.md` Phase 6 — now requires validating any new form
on **both** axes. Recall alone is not evidence: Form 2 already has
perfect recall on every form in the library and is still unusable.
- `context/audit.md` — pattern-form breakdown lists 13–15, so an audit
report accounts for every form the sweep runs.
- Seven eval cases (7-13): the container-rename sweep, and the
blocklist-extension trap.

## Verification

Validated on **both** axes against the real fixture rather than
asserted. Recall came from the removed lines of `930c97a4` (the commit
that fixed the references — its deletions *are* the defect set);
precision from the whole pre-fix tree at `930c97a4^`.

| Pattern | Hits on `930c97a4^` under `plugins/discipline` | Real
defects among them |
|---|--:|--:|
| Form 2 (bare token) | **134** | 8 |
| Forms 13–15 combined | **9** | 8 |

The 9th hit is a frozen CHANGELOG-history line, which the existing
"Frozen historical records" auto-exclusion already handles. The one
defect line Forms 13–15 do *not* match is the frontmatter `description`
trigger-phrase block — deliberately kept in that rename, so matching it
would have been a false positive.

Gates run locally:

- `claude plugin validate .` — passes
- `markdownlint-cli2` on all four changed markdown files — 0 errors
- `scripts/check-changelog-parity.sh --check-bump origin/main` — passes
(`docs-hygiene` 0.8.6 → 0.9.0 with a matching entry)
- `scripts/check-changelog-parity.sh --check` — passes
- `evals.json` parses; diff is additive only (25 insertions, 0 deletions
to existing cases)

## Review rounds (this PR supersedes #1335 for branch reasons only —
same work, rebased)

Four findings across two reviewers, all verified against real input
before fixing; two were correct about defects in **this PR's own
claims**:

- **P1 — Form 2 was never suppressed.** The first version added Forms
13–15 as the remedy for a codebase-specific verb, but nothing suppressed
Form 2, so every prompt they were meant to avoid still fired. Fixed by
container-position precedence: dedup by `(file, line)` after the sweep,
before triage.
- **P1 (second round) — precedence left the residue.** Dedup only
resolves lines a container form ALSO matched (8 of 134 on the fixture).
The other 126 still fell through to Form 2's Certain default, so my
claim that they "were never candidates" was false. Fixed by
container-rename mode: mode is decided by WHAT is renamed, so it works
where the static blocklist cannot.
- **P2 — Form 14 over-reached on ordinary-word names.** Verified in this
repo: renaming a `testing` plugin matches `README.md:86` (`###
Testing`), renaming `architecture` matches `plugins/miro/README.md:39`.
Under precedence a false Certain there is worse than a Form 2 hit — it
discards the safer classification. Form 14 is now scoped to
container-owned files and always Ambiguous for common-word tokens.
- **P2 — regex gaps.** Form 14 missed single-quoted YAML; Form 15 missed
the token as inline code before the clitic (its own motivating example).
Both fixed with paired-quote alternation and optional backticks,
verified against real input including the mismatched-quote rejection
case.

Final fixture result: **8 Certain findings, 126 reported-not-proposed, 0
confirmation prompts**, against Form 2 unaided at 134.

## Related

- Refs #1394 — filed from this PR's review: Form 14 is case-sensitive,
so a title-cased heading falls through to Form 2 and gets a LESS safe
classification. Deliberately not fixed here — the safe version needs the
scope rule load-bearing first.
- Refs #1335 — the original PR for this work; closed unmerged because a
force-push was needed after main moved and force-push is blocked in this
environment. Identical content, rebased.
- Refs #1276 — the rename whose six missed references are this PR's
fixture; `930c97a4` is the reference commit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01GSXnCLnmzk8y4cKv2y1z9f

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant