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
Problem
plugins/claude-ops/skills/inventory/scripts/inventory.pyresolves 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 (hoistedvar, 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