fix: reconcile Fusion two-segment skill names with pi-coding-agent bare names

pi-coding-agent sets Skill.name to the parent directory (e.g. 'web-research'),
while Fusion uses two-segment names everywhere (e.g. 'web-research/SKILL.md')
from extractSkillName(), normalizeAgentSkills(), and toggleExecutionSkill().

The previous fix (f2afc7f0) correctly switched matching from skill.filePath to
skill.name, but that only works when both sides use the same format. Since they
don't, all pattern/requested-name comparisons still failed, producing the
spurious 'not found in discovered skills' warnings.

Fix: add bareSkillName() helper that strips the /SKILL.md suffix before
comparison. Applied to all five comparison points in skill-resolver.ts:
  - skillNameMatches() (pattern filtering)
  - requestedSkillNames set lookup (name filtering)
  - hasDiscoveredMatch() (configured-pattern diagnostic)
  - discoveredBareNamesLower (requested-name diagnostic)
  - excluded-path discovery check
This commit is contained in:
Harry Cordewener
2026-05-03 02:15:53 -05:00
parent f2afc7f0c4
commit 3afb62be29
3 changed files with 118 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Fix skill name matching between Fusion's two-segment names (e.g. `web-research/SKILL.md`) and pi-coding-agent's bare directory names (e.g. `web-research`). Patterns and requested skill names now strip the `/SKILL.md` suffix before comparison, eliminating spurious "not found in discovered skills" warnings.