name: updating-lief
description: Updates LIEF submodule to match Node.js deps version, performs API compatibility audit across 20+ source files. Use after Node.js updates or when LIEF version drifts from Node.js deps.
user-invocable: true
allowed-tools: Task, Bash(pnpm:), Bash(npm:), Bash(git:), Bash(node:), Bash(rg:), Bash(grep:), Bash(find:), Bash(ls:), Bash(cat:), Bash(head:), Bash(tail:), Bash(wc:), Bash(diff:*), Read, Edit, Grep, Glob---
updating-lief
Update the LIEF library submodule to match the version in Node.js deps, then audit all LIEF API usage for compatibility.
- Submodule:
packages/lief-builder/upstream/lief (lief-project/LIEF)
- Version source of truth:
packages/node-smol-builder/upstream/node/deps/LIEF/include/LIEF/version.h
- Cache bumps:
lief, binject, binpress, node-smol (binflate does NOT link LIEF; matches CASCADE_RULES)
LIEF version is driven by Node.js deps. Update Node.js first (updating-node), then run this skill. Do not update LIEF independently.
Process
Phase 1: Validate
Clean working directory, verify LIEF submodule exists.
Phase 2: Determine Version
Extract target from Node.js deps:
grep '#define LIEF_VERSION "' packages/node-smol-builder/upstream/node/deps/LIEF/include/LIEF/version.h
Parse base version (strip trailing -). Compare with current submodule tag. Exit if already matching.
If user specifies a version override, warn that it may mismatch Node.js deps.
Phase 3: Spawn Agent
Spawn a Task agent with the full workflow from reference.md. The agent:
- Updates submodule to target version
- Updates
.gitmodules version comment
- Audits all C++ files using LIEF API for compatibility with new version
- Fixes any API incompatibilities found
- Bumps cache versions: lief, binject, binpress, node-smol
- Validates build and tests (skip in CI)
- Creates commits (version update + API fixes if needed)
See reference.md for the complete agent prompt template.
Phase 4: Verify
Check agent output for completion, verify commits created, report results.