.png&w=828&q=75)
Problem JavaScript codebases age quickly. Millions of lines still use var declarations, error-first callbacks, and raw http.get() calls — patterns that are harder to read, harder to test, and incompatible with modern async tooling. Manually refactoring these files is tedious, error-prone, and provides no guarantee the result actually works. Solution BobMigrate Lite is an IBM Bob 2.0 extension that automates the full migration pipeline in a single command: Modernize sample-app/user_service.js. It combines a custom Python MCP server (two deterministic static-analysis tools) with a 9-step agent skill that orchestrates the entire workflow — analyze, refactor, test, self-heal, and audit. How it works The MCP tool detect_legacy_patterns scans the target file with regex, returning structured JSON findings with line numbers, severity ratings (low/medium/high), and fix suggestions — consuming zero LLM tokens. The skill then rewrites the file: replacing every var with const/let, converting callbacks to async/await Promises, and wrapping http.get() calls. After refactoring, Bob executes node sample-app/test.js in the shell — a real runtime assertion that the function returns a Promise. If the test fails, the skill enters a self-healing loop, patching and retrying up to three times. Finally, the MCP tool security_audit performs an OWASP baseline scan for eval() usage and hardcoded credentials, and Bob prints a full migration report. Target users JavaScript developers and teams with legacy Node.js codebases who want a repeatable, auditable modernization workflow directly inside their IBM Bob 2.0 workspace — with no external services and no manual steps. What makes it unique Validation is deterministic: pass/fail is decided by actual code execution, not LLM opinion. Both analysis tools run entirely in Python off-LLM, so token cost for scanning is zero. The self-healing loop makes the skill robust to imperfect first-pass refactors. The entire solution is workspace-local — one bash setup.sh and it's ready.
27 Sep 2026