Skip to content

claude-ops inventory: replace the regex bundle reader with a JavaScript parser #5640

Description

@kyle-sexton

Problem

plugins/claude-ops/skills/inventory/scripts/inventory.py resolves built-in tool descriptions from the Claude Code bundle with regexes and a brace map. Review of #5619 ran about 20 rounds, each raising a new JavaScript-semantics corner (hoisted var, shadowing, nested functions, comments, template masking, number rendering, import matching). On 2.1.285 no displayed description changed after the first round.

The reader is now fail-closed by policy: a corner may leave a value unresolved, never produce a wrong one, and unresolved names reach drift intake through native_drift.py.

Proposal

If corner cases keep appearing, replace the regex reader with a real parser (for example acorn or esbuild run through node) and resolve bindings from its scope analysis.

Open question

Is node acceptable as a runtime dependency of the inventory skill? Today it needs only Python. The answer decides between a node-based parser and a pure-Python one.

Related

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageNot yet classified. Floor until a type and one priority tier are set.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions