Skip to content

Commit e7d092a

Browse files
kyle-sextonclaude
andauthored
fix(claude-ops): recover the bundled-skill lane on 2.1.263 and report integrity per lane (#4092)
Closes #4048 The inventory extractor's bundled-skill lane returned empty on Claude Code 2.1.263 (a bytecode-fragmented bundle with an ESM export list), so every native-overlap run reported broken. inventory.py now reads every printable run above a 256-byte floor from the first bundle marker, discovers the registrar by three routes, resolves computed names by locality, keeps same-name registrations as a collision list, reads the invocation-control fields, and reports integrity per lane. overlap.py reads the lanes, marks candidates re_derivable, flags ungated presence mentions, and accepts one --upstream-sha per upstream repository. Two seeded pairs (doctor and skill-doctor against audit-skill-visibility), the graduated plan and design resolution under docs/specs/, a trimmed audit-native-overlap description, and claude-ops 0.54.0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEFsqe8fDbDjSFx79hVB9e
1 parent 32eb246 commit e7d092a

14 files changed

Lines changed: 2142 additions & 201 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
outcome: early-exit
3+
tier: B
4+
reason: one new store field with a closed enum, one new convention grammar, and a per-lane integrity shape inside existing scripts; every contract decision was locked in the Brief, so a full design pass would re-derive settled threads
5+
---
6+
7+
# Design resolution, audit-native-overlap
8+
9+
## Type sketch
10+
11+
### Store row (`docs/native-surfaces/records.json`, schema 1, additive)
12+
13+
```text
14+
row.integration : "route" | "wrap" | "suggest" required on every row
15+
invariants (enforced by overlap.py validate_row):
16+
native.class == "builtin-command" -> integration in {route, suggest}
17+
native.class == "bundled-skill" -> integration in {route, wrap}
18+
native.class == "bundled-skill" and "model-invocation-disabled" in native.markers
19+
-> integration == "suggest" (the model never lists it, so a route phrase is dead text)
20+
native.class == "plugin-backed-builtin"-> integration in {route, wrap}
21+
native.class == "marketplace-plugin" -> integration in {route, wrap} (wrap grammar owned by seam-phrasing)
22+
native.class == "session-skill" -> integration == "route"
23+
verdict == "defer" -> integration == "route" (nothing is baked from a defer row)
24+
integration in {wrap, suggest} -> an evidence line names the observed invocation mode
25+
(Skill-tool reach is per surface: /init and /security-review are
26+
reachable built-ins; /export and /skill-doctor are non-prompt
27+
command types; the class rules are a floor, not the determinant)
28+
marker source: the registration the row's evidence names, never the bare name
29+
(on 2.1.263 "design" is two bundled registrations: the canvas, model-invocable; the hub, model-disabled)
30+
row.baked : {description_phrase, boundary_section, native_step, suggest_sentence} two flags added
31+
native_step: true only when integration == "wrap" and the body carries "## Native step: <name> (<class>)"
32+
suggest_sentence: true only when integration == "suggest" and the body carries the suggest token
33+
```
34+
35+
### Inventory integrity (`inventory.py`, schema 1, additive)
36+
37+
```text
38+
integrity.status : "ok" | "degraded" | "broken" unchanged, now the worst lane
39+
integrity.lanes : { builtin_commands: LaneStatus, bundled_skills: LaneStatus, plugin_backed: LaneStatus }
40+
LaneStatus : { status: "ok" | "degraded" | "broken", problems: [str], advisories: [str] }
41+
```
42+
43+
`overlap.py detect` reads `integrity.lanes` when present and falls back to the top-level status when absent, so an older inventory file still parses.
44+
45+
### Convention grammars (`docs/conventions/native-references`)
46+
47+
```text
48+
route : description phrase carrying the gate token "resolves in your session" (existing)
49+
wrap : body section "## Native step: <name> (<class>)" carrying the gate token, the identity
50+
check by class, the mutation clause, the skip-and-report contract for five states
51+
(does not resolve, invocation refused with the reason named, identity mismatch,
52+
mutation detected after a scoped invocation, resolved but degraded with the surface's
53+
own disclosure relayed), and the enable path (new)
54+
suggest : body sentence "If /<command> is available in your session (<basis>), run it for <job>."
55+
carrying the token "available in your session", the basis pointing at a same-file
56+
four-part verification record (new)
57+
```
58+
59+
Class table: bundled-skill, plugin-backed-builtin, and marketplace-plugin may take route or wrap (the marketplace-plugin wrap grammar is seam-phrasing's, per the playgrounds precedent); a bundled-skill row marked model-invocation-disabled takes suggest; builtin-command may take route or suggest; session-skill may take route only. Amended 2026-09-11 after the round-4 validation pass.
60+
61+
## Threads resolved in the Brief
62+
63+
Wrap semantics, degradation contract, identity verification, suggestion placement, per-row field placement, description trimming, and filing shape are all locked in `../PLAN.md` `## Brief`. No thread is open.

docs/specs/native-overlap-route-to-compose.md

Lines changed: 433 additions & 0 deletions
Large diffs are not rendered by default.

plugins/claude-ops/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
33
"name": "claude-ops",
4-
"version": "0.53.0",
4+
"version": "0.54.0",
55
"description": "Claude Code operations toolkit. Twelve skills: audit-skill-visibility (audit whether each installed skill is actually VISIBLE to the model, and diagnose why most of a fleet never gets used: a skill is invisible when its description is dropped by Claude Code's skill-listing context budget, which sheds descriptions lowest-score-first so an unused skill loses the keywords that would let it be matched, from skills genuinely not wanted, from skills the run cannot observe at all; computes whether the listing overflows from documented settings, and withholds every cold verdict the data cannot support rather than reporting absence of data as absence of use), inventory (read-only enumeration of the complete invocable surface: every built-in CLI command with aliases and hidden/gated status, every bundled skill, and every component of every installed plugin across all marketplaces; reads the shipped binary because upstream publishes no built-in command list, and carries an integrity verdict so a drifted build reports counts as floors rather than silently short totals), audit-install-state (read-only audit of the machine-scope ~/.claude installation directory and ~/.claude.json: full inventory split into an authored surface and rolled-up bulk trees, product-managed retention vs genuinely unmanaged state, filename-scheme resolution before any process-liveness check, and deliberate/mid-experiment detection; reports, never deletes), audit-performance (read-only slowness-diagnostic capture run at the moment the machine or a session feels slow: CLI version, retention-sweep health including the silent unparsable-settings pause, a timed census walk of the install tree as a sweep-cost proxy, active-session and plugin-fleet counts, a process census, and the fan-out layer, which covers a load-labelled no-op spawn baseline, every hook that will fire bucketed per-tool-call versus per-turn with its invocation shape, the configured statusline, subagent concurrency and spawn-depth ceilings against documented defaults, whether running sessions predate the settings file they are judged by, and orphan attribution by parent liveness rather than age, plus on Windows a kernel-object census (Token objects against uptime, paged pool) that names a host-level leak beneath all four suspects; read against a bundled known-performance-issues reference that also records the causes tested and cleared; separates the four documented suspects of accumulated state, version regression, component bloat, and per-spawn fan-out cost, and routes remediation out; reports, never mutates, and never executes a discovered hook or statusline command), audit-native-overlap (map native Claude Code surfaces, namely built-in CLI commands, bundled skills, plugin-backed built-ins, and session-provided skills, against the current repo's plugin skills and agents, so a custom component never silently duplicates what Claude Code itself ships; bare invocation is a read-only overlap report carrying the extraction's integrity floors and a shared-listing-budget exposure section, verdicts are human-gated in a committed store rendered into a generated registry whose every row carries an observable recheck trigger, and only an explicit apply step bakes presence-gated native references into descriptions and Boundary sections), observability (read locally captured telemetry from the OTEL store, the collector, the per-session hook event log and hook-event JSONL, and ccusage, with trend reports, a per-session report of what fired, what was blocked and the event timeline, and store pruning), known-issues (search known Claude product GitHub bugs, check service health, maintain a persistent tracked-issue registry), changelog (ingest Claude Code changelog entries and integrate them into the current repo), plugins (bring a machine's plugin fleet current on demand: marketplace refresh, effective-scope updates including in-repo project/local installs, new-plugin install per policy, scope-divergence detection and explicit convergence), morning-brief (read-only gh-based operator morning view: queue-label counts, merge-ready PRs, parked decisions with their RECOMMENDED lines, and loop-lane telemetry freshness), lanes (start/restart/stop/status loop lanes as named background Claude Code sessions seeded from canonical prompt files, with per-lane model/effort, a repo-pull + marketplace-refresh launch step, and a consume-restarts action, an OS-schedulable reader that relaunches stopped lanes whose telemetry carries a restart_request), and a re-runnable setup action that settles where the known-issues registry, the skill-usage log and the hook log root live, places the root's self-ignoring guard, and detects retired conventions. Plus an opt-in, default-off per-session hook event log (one JSON line per hook event on every event the generated registry marks observable, written to <root>/sessions/<session_id>.jsonl, with SessionEnd retention by session count or age and an optional detached pre-prune command), a family of eight advisory *-audit hooks (API errors, config changes, instruction loads, permission denials, pre-compaction, skill usage, tool failures, and unsurfaced hook failures. The last also warns the user via systemMessage, since a hook that fails to launch enforces nothing and Claude Code surfaces the failure to nobody) that emit the shared hook-telemetry envelope, and a reference sink that routes envelopes under the same root: per session when the envelope carries a session id, else into the shared hook-events.jsonl the observability skill reads.",
66
"author": {
77
"name": "Melodic Software",

plugins/claude-ops/CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,63 @@
33
All notable changes to the `claude-ops` plugin are documented here. Format follows
44
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning.
55

6+
## [0.54.0]
7+
8+
### Added
9+
10+
- **`inventory.py` reads a bytecode-fragmented bundle.** Region rule: from the first bundle marker
11+
to end of file, every printable run of at least 256 bytes, joined with newlines, in one regex
12+
pass; `sources.binary` records `runs`, `joined_bytes`, `region_rule`, `runs_below_floor`
13+
(registration tokens sitting under the floor, counted rather than lost, and degrading the
14+
bundled-skill lane when positive), and `elapsed_seconds`. A build with no marker keeps the
15+
largest-run fallback.
16+
- **Three registrar discovery routes.** The CJS getter, then the ESM export list
17+
(`<ident> as registerBundledSkill`), then the canary registration; `bundled_skill_notes` records
18+
`registrar_route`. The registrar-shaped-export advisory sees both export shapes, and the known
19+
set gains `registerDesignCanvasSkill` and `registerWorkflowAuthoringSkill`.
20+
- **Computed names resolve by locality.** A hoisted constant resolves to its nearest preceding
21+
binding, never a farther one, so an unrelated module's binding of the same identifier cannot
22+
shadow the real one; a single-character identifier is trusted only within a locality window; a
23+
loop or template-literal registration is a `dynamic_roster` note, not an unresolved name; a call
24+
whose object carries no `name:` is another module's function and is counted apart.
25+
- **Per-registration invocation fields.** `user_invocable`, `disable_model_invocation`,
26+
`terminal_oriented`, and `survives_kill_switch` when present; a function-valued field reads as
27+
true with the key listed under `flag_driven`.
28+
- **Same-name registrations are both kept.** Two distinct bundled registrations sharing a name are
29+
a list under that name with `collision: true` and are named in `bundled_skill_notes.collisions`;
30+
`registrations_of(entry)` reads either shape.
31+
- **Integrity per lane.** `integrity.lanes` carries `builtin_commands`, `bundled_skills`, and
32+
`plugin_backed`, each with its own status, problems, and advisories; the top-level status is the
33+
worst lane, and top-level `broken` means every lane is broken or the binary is unreadable, so one
34+
broken lane is a named `degraded` rather than a run with no counts. `plugin_backed` gains a canary
35+
(`security-review`). Exit mappings are unchanged in both `inventory.py --self-check` (which now
36+
prints each lane) and `overlap.py detect`.
37+
- **`overlap.py detect` reads the lanes.** The candidate report carries per-lane floors (a lane's
38+
counts are totals only when the lane is ok and no run-wide advisory such as an unvalidated CLI
39+
version stands; a lane-attributed advisory degrades only its own lane), and every
40+
candidate carries `re_derivable`: false when the lane its seeded or observed class maps to is
41+
broken (both directions on a class collision), null for session-provided and marketplace classes,
42+
which have no lane. A name collision lists every registration with its invocation mode. An
43+
inventory without `lanes` keeps the previous reading.
44+
- **`overlap.py self-check` flags a presence-gated native mention without the gate token.** A
45+
description that names a native surface by class and kind inside a `when`, `where`, or `if`
46+
clause with an availability word, and carries no gate token in that clause, is an advisory (exit
47+
3) naming the row to add or the token to use. Judged per clause, so a gated marketplace clause
48+
never excuses an ungated native clause beside it.
49+
- **`--upstream-sha` repeats.** One value per upstream repository the store cites; a recorded
50+
commit matches when any provided value matches it.
51+
- **Seeded pairs** gain `doctor` and `skill-doctor` against `claude-ops:audit-skill-visibility`.
52+
53+
### Changed
54+
55+
- `VALIDATED_AGAINST` is `2.1.263`, validated on the Linux ELF build in a container; the PE
56+
container path is covered by a byte-layout fixture, not a Windows run.
57+
- The audit-native-overlap description is under the 1,024-character Skills API cap: the same
58+
claims and every trigger phrase, in fewer words.
59+
- The inventory skill's integrity table, the audit-native-overlap detection posture, and
60+
`reference/extraction.md` describe the lanes, the region rule, the locality rule, and the
61+
collision list; the inventory eval for degraded counts names dynamic rosters and lane statuses.
62+
663
## [0.53.0]
764

865
### Added

plugins/claude-ops/skills/audit-native-overlap/SKILL.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Map native Claude Code surfaces (built-in CLI commands, bundled skills, plugin-backed built-ins, session-provided skills) against the current repo's plugin skills and agents, so a custom component never silently duplicates what Claude Code itself now ships. Bare invocation is a READ-ONLY report: overlap candidates with evidence, detection integrity floors, and a listing-budget exposure section. Verdicts are human-gated and recorded in a committed store rendered into a generated registry; only an explicit `apply` argument edits a component, baking presence-gated native references into descriptions and Boundary sections. Use when: 'does this skill duplicate a built-in', 'what does Claude Code already ship for this', 'audit native overlap', 'is our install-state audit the same as /doctor', 'refresh the native-surfaces registry', 'bake the native reference into this skill', 'which of our skills overlap bundled skills'. Not for: enumerating what this machine can invoke (use /claude-ops:inventory), MCP tool overlap (use /mcp-tools:audit), plugin fleet currency (use /claude-ops:plugins), or ingesting a CLI release (use /claude-ops:changelog)."
2+
description: "Map native Claude Code surfaces (built-in commands, bundled skills, plugin-backed built-ins, session skills) against this repo's skills and agents, so no component silently duplicates what Claude Code ships. Bare invocation is READ-ONLY: overlap candidates with evidence, per-lane integrity floors, and listing-budget exposure. Verdicts are human-gated in a committed store rendered to a generated registry; only an explicit `apply` argument edits a component, baking presence-gated native references into it. Use when: 'does this skill duplicate a built-in', 'what does Claude Code already ship for this', 'audit native overlap', 'is our install-state audit the same as /doctor', 'refresh the native-surfaces registry', 'bake the native reference into this skill', 'which of our skills overlap bundled skills'. Not for: enumerating what this machine can invoke (/claude-ops:inventory), MCP tool overlap (/mcp-tools:audit), plugin fleet currency (/claude-ops:plugins), or ingesting a CLI release (/claude-ops:changelog)."
33
argument-hint: "[report|apply <plugin>] [--store <path>] [--inventory <path>]. Bare runs the read-only report"
44
user-invocable: true
55
disable-model-invocation: false
@@ -96,9 +96,13 @@ for the repo's test discovery.
9696

9797
Under-recall stated honestly beats confident completeness. Three rules:
9898

99-
- **Carry the integrity floor through.** If the inventory reports `degraded`, every native-side
100-
count in the report is a floor and the report says so in the same sentence as the number. If it
101-
reports `broken`, the report carries no native-side counts at all.
99+
- **Carry the integrity floor through, per lane.** The inventory reports integrity per lane
100+
(`builtin_commands`, `bundled_skills`, `plugin_backed`). A `degraded` lane makes every count from
101+
that lane a floor, and the report says so in the same sentence as the number. A `broken` lane's
102+
counts are omitted, the report names the lane and its cause, and every candidate whose lane is
103+
broken is marked `re_derivable: false` (its presence or absence in that lane proves nothing
104+
this run); the other lanes' counts stand. Only when every lane is broken does the report omit
105+
every native-side count.
102106
- **Never auto-verdict.** Detection emits candidates with evidence. The verdict column is empty
103107
until a human fills it.
104108
- **Accept human-added candidates.** A pair nobody's heuristic found is a first-class row; add it
@@ -110,8 +114,8 @@ Under-recall stated honestly beats confident completeness. Three rules:
110114
# Native overlap — <repo>, <date>
111115
112116
## Detection integrity
113-
Inventory status (ok | degraded | broken), cli_version vs validated_against, and what that
114-
means for every count below.
117+
Inventory status per lane (ok | degraded | broken), cli_version vs validated_against, and what
118+
that means for every count below; a broken lane is named with its cause.
115119
116120
## Overlap candidates
117121
One row per (native surface, our component): native name + provenance class + hidden/gated

plugins/claude-ops/skills/audit-native-overlap/reference/canonical-pairs.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@
3737
"component": { "plugin": "claude-ops", "skill": "audit-performance", "kind": "skill" },
3838
"why": "Both diagnose a slow or unhealthy install; doctor also offers to fix."
3939
},
40+
{
41+
"native": { "name": "doctor", "class": "bundled-skill" },
42+
"component": { "plugin": "claude-ops", "skill": "audit-skill-visibility", "kind": "skill" },
43+
"why": "doctor's checkup covers unused extensions and skill visibility as one pass of a broader health check; the audit asks the whole-fleet visibility question."
44+
},
45+
{
46+
"native": { "name": "skill-doctor", "class": "builtin-command" },
47+
"component": { "plugin": "claude-ops", "skill": "audit-skill-visibility", "kind": "skill" },
48+
"why": "Both ask which loaded skills go unused and what each costs; the built-in is a one-shot report that excludes bundled skills, the audit is the fleet-wide visibility question."
49+
},
4050
{
4151
"native": { "name": "morning", "class": "session-skill" },
4252
"component": { "plugin": "claude-ops", "skill": "morning-brief", "kind": "skill" },

0 commit comments

Comments
 (0)