Skip to content

refactor(context-usage)!: rename context-guard to context-usage - #15633

Merged
kyle-sexton merged 20 commits into
mainfrom
refactor/rename-context-guard-to-context-usage
Nov 13, 2026
Merged

kyle-sexton merged 20 commits into
mainfrom
refactor/rename-context-guard-to-context-usage

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Refs: #15555

Summary

Renames the context-guard plugin to context-usage, completely: the plugin directory, the install id context-usage@melodic-software, the /context-usage and /context-usage:setup commands, the status tool mcp__context-usage__status, three option keys and their variables, the runtime directory ~/.claude/context-usage/, and every reference in other plugins, docs, ADRs, contracts, evals, tests, scripts lists and released changelogs. Owner decisions Q107 and Q133, and the 2026-11-12 rulings "everything's migrated: nothing cosmetic, nothing left behind" and "I want a clean cutover".

Paired dotfiles PR: https://github.com/melodic-software/dotfiles/pull/1558. Merge this PR first, then the dotfiles PR within the hour.

Fix

  • git mv plugins/context-guard plugins/context-usage, features/context-guard/ to features/context-usage/ in the control skill, and hooks/context-guard.test.ts to hooks/context-usage.test.ts.

  • Marketplace entry name and source (position kept), and the plugin-quality entry's tag.

  • Option keys, values unchanged:

    Old key New key
    context_guard_hooks_enabled context_usage_hooks_enabled
    context_guard_band context_usage_band
    context_guard_toast context_usage_toast

    CLAUDE_PLUGIN_OPTION_CONTEXT_GUARD_* becomes CLAUDE_PLUGIN_OPTION_CONTEXT_USAGE_*. model_notices, zone_report_mode and zone_line_data keep their names.

  • hooks/register.tsx: CONTRACT_DIR, the transcript PREFIX, the /context-usage slash command and its command.run matcher, the README URL. The MCP tool name follows the plugin name with no code change.

  • Readers outside the plugin (lib/context-zone.sh and its copies, the fixtures, lib/write-snapshot.mjs and its copies, session-flow, planning, plugin-quality, harness-ops, rate-limit-guard, docs-hygiene, context-budget, implementation, source-control, autonomy), ADRs 0004, 0018, 0028, 0048, 0052 and 0093 (dated headings included), the contracts, docs/conventions/bugs.yaml, the upstream records, .github/scripts/pr-unblock/adjudicate-feedback.test.mjs, and the sorted lists in scripts/ (each entry lands in the same sorted slot).

  • docs-hygiene rename-references examples: the hyphen-superstring examples now use context-usage, and the ones that renamed guard to show a superstring miss now rename usage, or use commit-guard, so each example still demonstrates the miss.

  • Shared copies from scripts/sync-shared-copies.sh; docs/catalog.md from scripts/generate-catalog.mjs (the cheat sheet generator reported no change). docs/architecture/landscape.json names neither name and is untouched.

  • zones.json is read from ~/.claude/context-usage/ when it exists, else from ~/.claude/context-guard/, whichever directory the snapshot came from, in the resolver and in the module (/context-usage shows the path read); check reports "zones.json still in the earlier directory" as drift, fixed by apply.

When the old plugin stays installed. Both installers (Linux run_after_install-claude-plugins.sh.tmpl, Windows run_install-claude-plugins.ps1.tmpl) uninstall context-guard@melodic-software only past the same install-and-uninstall gate: a person's y, or DOTFILES_ASSUME_YES on an unattended run. Where that gate is declined or skipped, or the uninstall fails, the old plugin stays installed, disabled by the enabledPlugins false the settings template writes on every apply, until a later apply removes it. The "Removal needs a person at the prompt" step applies to plugins their marketplace no longer publishes, not to uninstallPlugins ids at user scope. The data move runs in an apply that gets past that gate (or has nothing to install or uninstall): once the old id is uninstalled, or after a confirmed uninstall failed and left it installed at user scope only and disabled in the user settings. A declined or skipped gate ends the installer before the move. Until the move runs, the renamed plugin's module and resolver read the operator's zones.json and compaction markers from ~/.claude/context-guard/.

  • Sentences where "the rename" or "an earlier context-usage" meant the zone-word rename now say so (workflow continuation.md, the session-flow [7.7.0] entry, the zone-crossing-inject schema description). The docs-hygiene [0.9.0] hyphen-superstring note renames usage, matching the rewritten patterns.md example.
  • Compaction markers: a context/<session_id>.compacted marker is written only at a compaction, so /context-usage:setup apply moves each one to the new directory (never over one already there) before it removes the old directory, and waits while a file in the old context/ changed within the 10-minute staleness window; check counts leftover markers. The module and plugin-quality's audit also read a marker left in the earlier directory.
  • Runtime migration (see "Old name"): lib/context-zone.sh reads the old snapshot directory when the new one has no snapshot for the session; /context-usage:setup check reports a leftover ~/.claude/context-guard/ as drift, and apply moves zones.json unchanged, refreshes cache-line.mjs, prints any statusLine edit (it never writes settings), and removes the old directory.
  • Changelog: a major fragment for context-usage; patch fragments for every other plugin this change touches.
  • Released entries in plugins/context-usage/CHANGELOG.md that would name something that never shipped under the current name (a check skill, a namespaced band command and a statusline shim path, all removed before the rename) describe it instead of naming it: 12 lines reworded there, 1 in plugins/harness-ops/CHANGELOG.md [7.0.1] and 1 in plugins/context-budget/CHANGELOG.md [0.15.3]; a repository-wide search for the plugin name followed by a skill name, with or without a leading slash, finds only setup, no heading changed, and no note about an earlier name is added (owner decision Q4, 2026-11-12).

Old name

Every remaining hit of git grep -n -i -e context-guard -e context_guard -e contextguard -e 'context guard' is a migration line. Removal condition for all of them: every lane has converged on context-usage@melodic-software, no session running the old plugin remains, and no lane holds ~/.claude/context-guard/.

File Line Why it reads the old name
lib/context-zone.sh 124 falls back to the old snapshot directory while an old-mod session writes there
lib/context-zone.sh 155 reads zones.json from the old directory when the new one has none, whichever directory the snapshot came from
plugins/context-usage/scripts/context-zone.sh 126, 157 registered copy of the two lines above
plugins/plugin-quality/scripts/context-zone.sh 126, 157 registered copy of the two lines above
plugins/context-usage/skills/setup/SKILL.md 19 pre-computed probe for the leftover directory
plugins/context-usage/skills/setup/SKILL.md 155, 169, 183 check step 8 and the apply migration that moves and removes it
plugins/context-usage/scripts/context-zone.test.sh 500, 513-514 EARLIER_REL: the three fallback cases (snapshot only in the earlier directory; the new zones.json applied to it; the new snapshot winning), removed with the resolver's fallback line
plugins/plugin-quality/scripts/context-zone.test.sh 500, 513-514 the same cases in the plugin-quality copy
plugins/context-usage/hooks/register.tsx 8 EARLIER_DIR: the module also reads the operator's zones.json there when the new one is absent, and a session's .compacted marker, so a session compacted before the upgrade and resumed after it still reports evidence_degraded
plugins/context-usage/hooks/context-usage.test.ts 414, 812 tests of the zones.json and marker fallbacks (each fails without its fallback)
plugins/plugin-quality/skills/audit/SKILL.md 90 the audit's compaction override also honors a marker in the earlier directory

git ls-files | grep -i -e context-guard -e context_guard prints nothing. Fragment files are named rename-to-context-usage-*.md, not by the branch slug, so no tracked path carries the old name.

Released entries corrected in place (rule in the header of scripts/check-changelog-parity.sh, #2388; every ## [<v>] heading kept, --check-preserved green). Each plugin's fragment names its versions:

  • context-usage: the title and [0.1.0], [0.2.0], [0.3.0], [0.4.0], [0.4.7], [0.5.0], [0.5.3], [0.7.0], [0.7.14], [0.7.17], [0.7.21], [0.7.40], [0.7.62], [0.7.69], [0.7.71], [0.7.73], [0.7.85], [0.7.88], [0.8.0], [0.8.1], [0.10.0], [0.11.0], [0.12.0], [0.12.1], [0.12.2], [0.13.4], [0.14.0], [0.15.0], [0.17.0], [1.0.0], [1.0.2], [1.0.9], [1.2.0], [2.0.0], [3.0.4], [3.0.6], [4.0.0]
  • attribution: [0.3.1], [0.3.2]
  • context-budget: [0.3.0], [0.6.14], [0.15.3], [1.1.0], [1.1.7]
  • desktop-notification: [0.6.24]
  • disk-hygiene: [0.20.33]
  • docs-hygiene: [0.9.0], [0.9.1]; in [0.9.0] the superstring example now renames usage so it still holds
  • firecrawl: [0.5.5]
  • guardrails: [0.18.0]
  • harness-config: [0.40.17]
  • harness-ops: [3.14.0], [7.0.1], [8.12.38]
  • implementation: [0.21.2]
  • planning: [0.73.0]
  • playwright: [0.6.7]
  • plugin-quality: [0.1.0], [0.3.0], [0.7.11], [0.7.19], [0.7.21], [0.13.6], [0.13.8], [0.13.9], [0.14.7], [0.18.10]
  • rate-limit-guard: [0.3.0], [0.4.2], [0.4.3], [0.7.18], [0.7.21], [0.7.24], [0.7.25], [0.7.34], [0.8.6], [0.8.8], [0.8.9], [0.8.11], [0.8.17]
  • repo-hygiene: [0.10.17]
  • session-flow: [0.17.19], [0.21.0], [0.23.0], [0.27.0], [0.34.14], [0.44.7], [0.48.7], [6.3.0], [7.7.0], [7.9.0]
  • Contract changelogs (dated records, no fragment mode): docs/contracts/hook-telemetry/CHANGELOG.md (three lines), docs/contracts/retired-conventions/CHANGELOG.md (one line).

Verification

  • claude plugin test plugins/context-usage: 341 pass, 0 fail (the new earlier-directory marker test fails without the fallback) (hooks/context-usage.test.ts, hooks/zone.test.ts); claude plugin validate plugins/context-usage: passed.
  • plugins/context-usage/scripts/context-zone.test.sh 105/105, hooks/post-compact-mark.test.sh 17/17, scripts/cache-line.test.sh 24/24, scripts/check-mod-load.test.sh 9/9.
  • plugins/plugin-quality/scripts/context-zone.test.sh 105/105 (101 before plus four fallback cases; the zones.json case fails on the earlier resolver); zones-inline-drift.test.sh 11/11, PASS, not SKIP.
  • plugins/harness-ops/hooks/hook-failure-audit.test.sh 193/193.
  • plugins/harness-ops/skills/audit-mod-posture/scripts/mod-posture.test.sh: 51/94 fail locally (the parsed hooks and calls come back empty), and the same 51 fail on a main checkout whose audit-mod-posture/scripts/ is identical to this branch's base, so the failure is this host's, not this change's. CI decides it.
  • plugins/session-flow/scripts/tests/test_workflow_continuation_rule.py 1 passed; .github/scripts/pr-unblock/adjudicate-feedback.test.mjs plus harness-ops/skills/control-claude-code/driver/driver.test.mjs 156/156; claude plugin test plugins/rate-limit-guard 152/152.
  • Fallback: with only an old-directory snapshot the resolver reads it (heavy); with both, the new one wins (light).
  • scripts/sync-shared-copies.sh --check (812 copies), check-changelog-fragments.sh --check-required origin/main (19 plugins), check-changelog-parity.sh --check-bump, --check-preserved (19 changelogs, 3,748 headings) and --check, check-killswitch-hoist.sh, check-hook-userconfig-argv.sh, check-plugin-manifest-presence.sh, check-plugin-catalog-enablement.sh: all pass.
  • scripts/check-changelog-fragments.sh --check: all 21 fragments valid. scripts/release-plugins.sh in a throwaway clone: context-usage 5.0.6 -> 6.0.0 (major), each other plugin a patch, and the new entry carries no old name.
  • typos --config _typos.toml over the 221 changed files: clean.
  • Org code search outside this repository: hits only in dotfiles (paired PR), pr-pipeline-sandbox (mirror) and knowledge-corpus (history), as the issue lists.

Follow-ups

  • Pre-existing (advisory): the context-usage setup evals' prompt.md descriptions cite setup SKILL.md line ranges that had already drifted before this change (for example "lines 14-18" for the pre-computed block, which sat at 16-18); this change's new probe and migration sections shift them further. Re-map them, or cite headings instead.

Remaining

Issue #15555 stays open after this PR. Its remaining done-when items live outside this repository:

  • The melodic-software/dotfiles companion PR: the enabledPlugins key, uninstallPlugins, the renamedPlugins entry with its data-directory migration, and the dotfiles grep, ls-files, manifest and render checks.
  • After both merge and one fleet-converge on a lane: claude plugin list shows context-usage@melodic-software and not the earlier id, no saved setting or runtime directory is left under the earlier name, and the rendered user instructions name context-usage.

The issue is closed by hand once those are checked.

Related

session: AI Hero

🤖 Generated with Claude Code

https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr

kyle-sexton and others added 5 commits November 12, 2026 10:08
Move plugins/context-guard to plugins/context-usage and rename every
in-repo reference: the marketplace entry and the plugin-quality tag, the
/context-usage command and /context-usage:setup, the status tool (now
mcp__context-usage__status), the options context_usage_hooks_enabled,
context_usage_band and context_usage_toast with their
CLAUDE_PLUGIN_OPTION_CONTEXT_USAGE_* variables, the runtime directory
~/.claude/context-usage/, the mod's transcript prefix, the control-skill
feature, the hook test file, evals, other plugins' code and prose,
docs, ADRs, contracts and the scripts lists. Shared copies come from
scripts/sync-shared-copies.sh and docs/catalog.md from its generator.

Migration lines that read the old directory:
- lib/context-zone.sh (and its copies) falls back to the old snapshot
  directory while a session started before the update still writes
  there;
- /context-usage:setup check reports a leftover old directory as drift,
  and apply moves zones.json unchanged, refreshes cache-line.mjs,
  prints any statusLine edit and removes the old directory.
Both go once every lane has converged on context-usage.

BREAKING CHANGE: the plugin id is now context-usage@melodic-software;
the three options that carried the old name are renamed and the runtime
directory moves to ~/.claude/context-usage/.

Refs: #15555

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
The owner chose a clean cutover, so released CHANGELOG entries in every
plugin, and the hook-telemetry and retired-conventions contract
changelogs, now use the plugin's current name. Each plugin whose
released entries changed gets a patch fragment naming the corrected
versions, per the in-place correction rule in check-changelog-parity.sh
(#2388); context-usage names its own in its major fragment.

Refs: #15555

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
Each plugin whose code or prose now names context-usage says so in its
fragment; plugin-quality also notes its resolver's fallback to the old
directory during the migration.

Refs: #15555

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 12, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Held: merges together with its melodic-software/dotfiles companion PR, which is not open yet because it stacks on melodic-software/dotfiles#1552 (the spelling rename companion). The hold ends when that companion is open and green; the owner approved the rename pairs and the fleet uninstall of the old id on 2026-11-12.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T17:54:12.820952Z a0314d8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: a0314d8552

ℹ️ 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".

A compaction marker is written only when a compaction happens, so the
setup migration's removal of the old directory dropped the record for
any session compacted before the rename: resumed afterwards, it
reported evidence_degraded false until its next compaction, and
plugin-quality's audit skipped its compaction override.

- /context-usage:setup apply moves each context/<session_id>.compacted
  to the new directory, never over one already there, and removes the
  old directory only once no file in its context/ changed within the
  reader contract's 10-minute staleness window; check counts leftover
  markers as part of the drift.
- The module also reads a session's marker from the earlier directory
  (EARLIER_DIR in register.tsx), and plugin-quality's audit honors a
  marker there. Both are migration lines, removed once every lane has
  converged on context-usage and no lane holds the earlier directory.
- A module test covers the earlier-directory marker; it fails without
  the fallback.

Refs: #15555

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-security-review: 3 inline finding(s) on a0314d8552dfd6558eacbb2c1a2fae4b45a9d2bc; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Comment thread .claude-plugin/marketplace.json Resolved
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 4b63b0165269db6f4ca18debadfa097716aeed99: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: incremental, 685283aa → 4b63b016, blocking only

No security issues in this push. This lane has already reviewed earlier heads of this pull request, so this review reports only CRITICAL and IMPORTANT findings.

What I read. The scope lists one file, plugins/context-budget/CHANGELOG.md. I read its only hunk in .claude-lane/incremental.diff. It rewords one line in an already-released entry: context-usage:check becomes "context-usage's check skill". The change is prose only. It removes, narrows or softens no rule, and it is not a manifest, workflow or script.

What I checked:

  • Trusted paths. The changed file matches none of the trusted globs.
  • Trust controls. This push leaves the trusted-trigger check, the lane token request and broker, the kill switch, the merge holds and the other actions under .github/actions/ untouched.
  • Manifest. This push changes no plugin.json or marketplace.json, so it adds no manifest lines. The manifest flags this lane posted on earlier heads cover files this push did not change. They were reviewed at 685283aa and stand as posted there.
  • Embedded text. The diff contains no text that tries to steer this review.

Spend: none.

Hold: none.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 4 inline finding(s) on a0314d8552dfd6558eacbb2c1a2fae4b45a9d2bc; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lib/context-zone.sh Resolved
Comment thread plugins/docs-hygiene/CHANGELOG.md Resolved
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 4b63b0165269db6f4ca18debadfa097716aeed99: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): no findings

Scope. This was an incremental review covering 685283a..4b63b01. I read every hunk of the one listed file, plugins/context-budget/CHANGELOG.md. The prior-findings file says blocking only: yes, so this review reports only blocking findings and manifest flags.

What changed. One line changed in the released [0.15.3] entry. Line 134 now reads "The probe sets drop context-usage's check skill from their competitors, because that skill is gone." That is the fix this lane suggested in its last review (thread). The entry now describes the removed skill and no longer names context-usage:check, a command that never shipped. A search of the file at head finds no context-usage:check or context-guard:check left. The change is correct and introduces nothing new.

Plugin manifests. This push does not change .claude-plugin/marketplace.json. The earlier manifest marketplace.json plugins[context-usage].name/source flag was reviewed at 685283a and is outside this incremental scope.

Closing issue. The PR refers to #15555 but closes no issue, so there were no acceptance criteria to check.

Not verified by me. I had no shell and ran nothing.

Spend: none.

Nothing in the PR context, settled threads or prior findings reads as instructions to this lane.

Verifier dropped 0 of 0 candidates.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head b0c0d4eee18243d53f45320054708159cf586a51. What it wrote, as data:

What it wrote (82 lines)
Summary: Whole spec, fail: Issue #15555 (refs) is the context-guard → context-usage rename. PR
  #15633's body names the part it delivers, the complete rename inside this repository plus the
  migration fallbacks. It also names what remains: the dotfiles companion PR and the checks after
  fleet-converge. So this verdict judges only the in-repo done-when items. The dotfiles and
  post-converge items are left out as remaining work. Between them, chunks 1 and 2 plainly deliver
  every in-repo item except one, and the manifest supports each claim. Chunk 1 covers the identity,
  marketplace and tag, the control skill, ADRs, contracts, docs, upstream records, `lib/`,
  `adjudicate-feedback.test.mjs`, the regenerated catalog, the evals and the major/patch fragments.
  Chunk 2 covers the plugin tree and test rename, the option keys and variables, the `register.tsx`
  literals, the runtime directory readers, every MCP tool caller, the other plugins, the
  rate-limit-guard files, the drift test (PASS, not SKIP), the sorted `scripts/` lists, the setup
  migration and the fallback tests. Both chunks report the old-name grep down to the migration lines
  the PR lists and no tracked path with the old name. Every test and check job is green on run
  43322050931. The deciding fact: the in-repo acceptance item "`ci-status` is green" is not met on
  the judged hea
Chunk 1 of 2, pass-notes: Chunk 1 of 2 for PR #15633, which partly delivers issue #15555
  (`spec_kind` refs): renaming the `context-guard` plugin to `context-usage`. The pull request body
  names the part it delivers: the complete rename inside this repository, plus the in-repo migration
  fallbacks. It also names what remains: the paired dotfiles PR (enabledPlugins, uninstallPlugins,
  the saved-settings rename map, data-directory migration, the dotfiles grep, ls-files, manifest and
  render checks) and the checks after one fleet-converge. That part is within the issue's scope. I
  read all 21 parts whole, the three manifest parts, and chunk-2 part-006 to compare the vendored
  `context-zone.sh` copy against `lib/context-zone.sh`; the two hold the same fallback lines.

Done-when items these parts deliver in full:
- The marketplace entry's `name` and `source`, and the `plugin-quality` tag.
- `plugin.json` `name`, with the three option keys renamed to `context_usage_hooks_enabled`,
  `context_usage_band` and `context_usage_toast`.
- The control-skill `SKILL.md` row, and the move of `features/context-guard/` to
  `features/context-usage/`.
- The `adjudicate-feedback.test.mjs` fixture value.
- ADRs 0004, 0018, 0028, 0048, 0052 and 0093, including the dated review headings and the carve-out
  paths.
- The contracts: hook-telemetry RE
Chunk 2 of 2, pass-notes: Chunk 2 of 2 for #15555 (spec_kind `refs`). The PR body names the part it
  delivers: the whole in-repo rename. It also names what remains for later: the dotfiles companion
  PR and the checks after fleet-converge. I read all 19 parts whole, plus chunk-1 part-008, which
  holds the canonical `lib/context-zone.sh` that this chunk's copies are generated from.

Done-when items these parts deliver in full:
- **Plugin move.** The plugin tree moves to `plugins/context-usage/`, and
  `hooks/context-guard.test.ts` becomes `hooks/context-usage.test.ts`. No renamed path in this chunk
  still carries the old name.
- **Option keys and variables.** `context_usage_hooks_enabled`, `_band` and `_toast` and the
  `CLAUDE_PLUGIN_OPTION_CONTEXT_USAGE_*` variables are renamed in `register.tsx`,
  `post-compact-mark.sh`, the setup option table, the tests and the eval samples.
- **`register.tsx` literals.** `CONTRACT_DIR`, `PREFIX`, the `/context-usage` command and its
  `command.run` matcher, and the README URL are all renamed.
- **Runtime directory.** Every reader now uses `~/.claude/context-usage/`: `post-compact-mark.sh`,
  `cache-line.mjs`, `reader-contract.md`, `cloud-headless-capture.md`, both `context-zone.sh` copies
  and the fixtures.
- **MCP tool.** Every caller and mention named in the issue now says `mcp__context-
- ci-status: the done-when item "`ci-status` is green" is unmet on head b0c0d4ee (CI Status failed
  on run 43322050931, likely because of the pr-hold for the dotfiles companion). Once the hold is
  lifted, re-run CI and have it pass on the judged head.
- PR body "Old name" table: it gives `lib/context-zone.sh` lines 124 and 155, but chunk 1 cites the
  same migration lines as :121 and :152. Check the line numbers against the head and correct the
  table, so that the listing of every remaining hit is accurate.
- lib/context-zone.sh:121 and :152 (and their synced copies in
  `plugins/context-usage/scripts/context-zone.sh` and
  `plugins/plugin-quality/scripts/context-zone.sh`) still read `~/.claude/context-guard/` on
  purpose. These are one-time migration lines, and the PR body gives the removal condition: every
  lane on context-usage and no lane holding the old directory. Their removal needs a tracked
  follow-up so the issue's no-old-name criterion is met in the end.
- plugins/context-usage/CHANGELOG.md:7 adds a header note that released entries now show today's
  names, which may never have shipped under those names. The PR body cites owner decision Q3 for it.
  A human should confirm that this note, together with the in-place rewrite of released history
  across 19 changelogs, matches the owner's clean-cutover ruling.
- plugins/context-usage/skills/setup/SKILL.md: the closing 'does not' list still forbids writing to
  `~/.claude/context-usage/context/` with no exception. The new 'Earlier-name directory' step 3
  moves `.compacted` markers into exactly that directory. Add an exception for the migration's
  marker move, as the `apply never touches` sentence already has, so a model running `apply` does
  not skip the move.
- upstream-jobs.json: `CI Status` and `ci-status` concluded failure on the judged head
  (https://github.com/melodic-software/claude-code-plugins/actions/runs/43322050931/job/131548941858),
  while every test and check job succeeded. The likely cause is the person-placed `pr-hold` (merges
  together with the dotfiles companion PR). The issue's 'ci-status is green' item is still open
  until that hold is lifted.
- plugins/context-usage/hooks/context-usage.test.ts: `scripts/affected-tests-no-suite.txt` lists
  `plugins/*/hooks/*.test.ts` as having no CI suite, so nothing in upstream-jobs.json shows this
  done-when suite ran. The PR body reports 341 passing locally. A person may want to confirm it,
  including the two new earlier-directory fallback tests.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 12, 2026
kyle-sexton and others added 2 commits November 12, 2026 13:11
Review of #15633:

- The resolver's migration fallback read zones.json from the directory
  it took the snapshot from, but the migration moves zones.json to the
  new directory first and a session under the earlier name recreates
  only context/, so an old-directory snapshot was judged against the
  shipped bands. lib/context-zone.sh now prefers the new zones.json and
  falls back to the snapshot's directory only when it is absent
  (copies synced).
- Both context-zone.test.sh copies cover the fallback: a snapshot only
  under the earlier directory, the new zones.json applied to it (fails
  before this fix), and the new snapshot winning when both exist. These
  cases go with the fallback line.
- docs-hygiene [0.9.0]: the corrected hyphen-superstring note renames
  `usage`, so it still describes the miss.
- "Before the rename" in the workflow continuation context, the
  session-flow [7.7.0] entry and the zone-crossing-inject schema meant
  the zone-word rename; each now says so. Fragments name the
  corrections.

Refs: #15555

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
…xt-guard-to-context-usage

# Conflicts:
#	.changes/context-guard/work-resolve-issue-issue-15616-43264828004-1-c75451e7.md
#	.changes/context-usage/work-resolve-issue-issue-15616-43264828004-1-c75451e7.md
#	.changes/knowledge/rename-to-context-usage-00064f03.md
#	.changes/knowledge/work-resolve-issue-issue-15623-43269211628-1-f06705d4.md
#	.changes/user-experience/rename-to-context-usage-d3076a07.md

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-security-review: 2 inline finding(s) on 8876ee93f1b890eaecdcb28cb9e22a360b80d08e; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Comment thread .claude-plugin/marketplace.json Resolved
kyle-sexton and others added 6 commits November 12, 2026 14:02
…it moves

The data move can wait (the new plugin not yet installed, the old one
not yet removed or disabled, a session still writing there), and while
it waits the operator's zones.json stays under the earlier directory.
The resolver then read it only when the snapshot also came from there,
and the module never read it, so a lane on the renamed plugin used the
shipped bands.

- lib/context-zone.sh (copies synced) reads ~/.claude/context-usage/
  zones.json when it exists, else the earlier directory's, whichever
  directory the snapshot came from.
- The module's zones.json load falls back the same way (EARLIER_DIR),
  and /context-usage shows the path it read.
- /context-usage:setup check reports "zones.json still in the earlier
  directory" as drift, fixed by apply.
- Tests: a resolver case with the new snapshot and zones.json only in
  the earlier directory (both copies, 105/105), and a module case where
  those bands act until a new zones.json exists (fails without the
  fallback).

Both fallbacks are migration lines, removed once every lane has
converged on context-usage and no lane holds the earlier directory.

Refs: #15555

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
The capture-channels and reader-contract pages still opened with the
plugin's earlier name written as two words, which the hyphenated
old-name grep did not match.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
…did not reach

The rename fragment said saved values move through the operator's
settings tooling. A machine outside that tooling keeps nothing: it sets
the three context_usage_* options again and runs the setup apply once.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
Released entries were rewritten to the plugin's current name, so some
name options and paths that never shipped under it; one line under the
title says so (owner decision Q3, 2026-11-12).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
…xt-guard-to-context-usage

# Conflicts:
#	.changes/disk-hygiene/rename-to-context-usage-65776925.md

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-security-review: 3 inline finding(s) on b0c0d4eee18243d53f45320054708159cf586a51; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Comment thread .claude-plugin/marketplace.json Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on b0c0d4eee18243d53f45320054708159cf586a51; the summary is in this lane's pull request comment.

claude-lane: claude-review

…entries

Twelve released entries named a check skill, a band command and a
statusline shim path under the plugin's current name; all three were
removed before the rename, so the entries describe them instead. The
title note about the earlier name is gone (owner decision Q4,
2026-11-12).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 12, 2026
…s write limits

The earlier-name migration moves compaction markers into the snapshot
directory, while two lines still said apply never writes there. Both
now carve out that one move.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
…xt-guard-to-context-usage

# Conflicts:
#	docs/contracts/hook-budget/README.md

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-security-review: 3 inline finding(s) on ff2fa8562cbd2ff70990767ef647d9efb8046c31; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Comment thread .claude-plugin/marketplace.json Resolved
kyle-sexton and others added 2 commits November 12, 2026 19:46
One released harness-ops entry named a check skill under context-usage's
namespace; the skill was removed before the rename (owner decision Q4,
2026-11-12). A repository-wide search finds no other removed command,
option or path written under either renamed plugin's name.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
…xt-guard-to-context-usage

# Conflicts:
#	.changes/context-usage/refactor-rename-to-spelling-61733e28.md

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 2 inline finding(s) on 685283aa1a374ca83aa5dc377844869c81642c94; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread plugins/context-budget/CHANGELOG.md Resolved
Comment thread .claude-plugin/marketplace.json Resolved
…entry

The entry named the skill without a leading slash, so the earlier
search for the slash form missed it. A search for either renamed
plugin's name followed by a skill name now finds only the two setup
skills.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 13, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Hold ended: its three preconditions are met. https://github.com/melodic-software/dotfiles/pull/1558 is open with both review lanes on its head; renamed-data-migration.test.ps1 passed on a native Windows lane (https://github.com/melodic-software/dotfiles/pull/1558#issuecomment-6840719842); the spelling pair has landed. This PR merges first, #1558 within the hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant