Skip to content

@W-23201206: build-mule-integration — port skill scripts (incl. templates) from bash to Node#147

Open
bpolat1 wants to merge 1 commit into
masterfrom
W-23201206/node-skill-sync
Open

@W-23201206: build-mule-integration — port skill scripts (incl. templates) from bash to Node#147
bpolat1 wants to merge 1 commit into
masterfrom
W-23201206/node-skill-sync

Conversation

@bpolat1

@bpolat1 bpolat1 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What

Ports all of the build-mule-integration skill's bundled helper scripts from bash to Node (OS-agnostic, ESM, zero npm deps). This includes the template-search path — search_templates.shsearch_templates.mjs — so the skill no longer ships any bash. Template functionality is fully preserved; only the implementation language changed.

The Node port is the version validated under W-22940856 in mule-dx-agent-evaluation (full unit + bash↔Node parity suite green), where each .mjs is asserted to produce byte-identical output to the .sh it replaces.

Bash → Node is a breaking change for anything that invoked the .sh files directly, so the skill majors to 2.0.0.

Changes

  • scripts/*.shscripts/*.mjs (11 scripts) + new lib/*.mjs (7 shared modules: Exchange ranking, template ranking, POM editing, nearest-match, platform/anypoint helpers, fs utils). Invocation form changes from bash scripts/<name>.sh to node scripts/<name>.mjs.
  • Template path ported too: search_templates.shsearch_templates.mjs; references/template-project-creation.md node-ified (documents node scripts/search_templates.mjs ...). Step 1b and the Exchange/Local template flows are otherwise unchanged.
  • Drops scripts/_suggest_nearest.py — its only consumer (validate_before_build) now uses lib/nearest.mjs, removing the Python dependency.
  • SKILL.md body synced to the Node version (node invocations, update-mode + Step-8 mule-artifact.json alignment). Version 1.3.02.0.0.
  • package.json: 1.5.02.0.0, and files now includes */lib/** so the imported lib/ modules publish (the Node scripts import from ../lib/*.mjs).
  • CHANGELOG.md: new 2.0.0 entry documenting the breaking script-language switch (Changed / Added / Removed).

Validation

  • make validate-skills (R1–R7) → all skills valid.
  • make validate-jtbd → job valid (18 sequential steps).
  • node --check clean on all 18 .mjs.
  • Source parity suite (in mule-dx-agent-evaluation): 125/125 unit + parity tests green, including a search_templates.shsearch_templates.mjs byte-identical-output parity scenario.

Companion change: the source-of-truth Node skill in mule-dx-agent-evaluation is brought to the same template parity in mulesoft/mule-dx-agent-evaluation!36, and both skills are aligned on version 2.0.0 going forward.

@bpolat1 bpolat1 force-pushed the W-23201206/node-skill-sync branch from f85f828 to 874a8ca Compare June 26, 2026 20:43
@bpolat1 bpolat1 requested a review from shivam-sf June 26, 2026 20:53
@bpolat1 bpolat1 force-pushed the W-23201206/node-skill-sync branch from 874a8ca to 68bfd53 Compare June 26, 2026 20:57
@bpolat1 bpolat1 changed the title @W-23201206: build-mule-integration — port skill scripts bash to Node (hybrid, template-preserving) @W-23201206: build-mule-integration — port skill scripts (incl. templates) from bash to Node Jun 26, 2026
@bpolat1 bpolat1 force-pushed the W-23201206/node-skill-sync branch from 68bfd53 to efaae39 Compare June 27, 2026 06:48
…ates) from bash to Node

Replaces ALL bundled helper scripts with the validated OS-agnostic Node port
from mule-dx-agent-evaluation. Behavior-preserving (byte-identical output,
verified by a .sh<->.mjs parity suite); only the implementation language and
the invocation form (node scripts/<name>.mjs) change.

- scripts/*.sh -> scripts/*.mjs (11 scripts, ESM, zero npm deps) + new lib/*.mjs
  (7 shared modules). The template-search path ports too: search_templates.sh
  -> search_templates.mjs, and references/template-project-creation.md now
  documents the node invocation (Step 1b / Exchange / Local flows unchanged).
- Drops scripts/_suggest_nearest.py (its only consumer, validate_before_build,
  now uses lib/nearest.mjs).
- SKILL.md body synced to the Node version (node scripts invocations, update-mode
  + Step-8 mule-artifact alignment). Bash->Node is breaking for direct script
  callers, so the skill majors: 1.3.0 -> 2.0.0.
- package.json: 1.5.0 -> 2.0.0; files += "*/lib/**" so the imported lib/
  modules publish.
- CHANGELOG.md: 2.0.0 entry documenting the breaking script-language switch.

validate-skills (R1-R7) and validate-jtbd both pass; all 18 .mjs node --check clean.
@bpolat1 bpolat1 force-pushed the W-23201206/node-skill-sync branch from efaae39 to 122e351 Compare June 27, 2026 07:15
@@ -0,0 +1,193 @@
#!/usr/bin/env node

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skills/mule-development/manage-global-configurations/SKILL.md (lines 171, 179, 187, 210)

Issue: Invokes bash scripts/{get_latest_connector,pick_connector,describe_connector,build_gav}.sh but these scripts no longer exist — PR deleted all .sh files and replaced them with .mjs.

Impact: When an agent runs the manage-global-configurations skill (Steps 3-7: connector resolution), all four bash invocations will fail with "No such file or directory". Skill is broken.

Root cause: PR updated build-mule-integration/SKILL.md comprehensively to use node scripts/*.mjs, but manage-global-configurations/SKILL.md shares the same helper scripts (they live in build-mule-integration/scripts/) and was not updated.

Fix required: Update manage-global-configurations/SKILL.md lines 171, 179, 187, and 210 to use node scripts/.mjs instead of bash scripts/.sh.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leandrogilcarrano -

The scripts aren't shared. manage-global-configurations has its own copies of get_latest_connector.sh / pick_connector.sh / describe_connector.sh / build_gav.sh in manage-global-configurations/scripts/, and its SKILL.md explicitly resolves scripts/ against its own skill root ("shell scripts in its own scripts/ directory", line 104/113). This PR doesn't modify anything under manage-global-configurations — those .sh files still exist and still run. So the connector-resolution steps (3–7) are unaffected; nothing is broken.

@bpolat1 bpolat1 requested a review from leandrogilcarrano July 1, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants