✨ Skill loader and prompt builder integration#1354
Closed
ibolton336 wants to merge 1 commit into
Closed
Conversation
Add a skill loader module that reads SKILL.md files from three layers in priority order (package defaults, hub-distributed profiles, and workspace-local). Update the prompt builder to optionally use skill content when available, falling back to the hardcoded prompt. - Add skillLoader.ts with buildSkillIndex, loadSkillContent, loadPrompt, and getSkillWithContent functions - Update promptBuilder.ts to load execute-migration-phase skill - Update ProfileSyncClient.ts to log extracted skills/prompts - Export skill loader types and functions from agent index Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires the migration intelligence package (#1353) into the extension by replacing hardcoded prompt strings with skill-based loading. Introduces a three-layer skill discovery system following the architecture described in konveyor/enhancements#274.
What this PR adds
skillLoader.ts— new moduleThree-layer skill discovery (later layers override earlier):
<extensionPath>/packages/migration-intelligence/skills/.konveyor/profiles/<id>/skills/(all profiles).konveyor/skills/Key exports:
buildSkillIndex(extensionPath, workspaceRoot)— scans all layers, returnsMap<name, SkillEntry>loadSkillContent(skillMdPath)— reads full SKILL.md on activationloadPrompt(name, extensionPath, workspaceRoot)— loads prompt templates (workspace overrides package)getSkillWithContent(index, skillName)— convenience: lookup + load in one callYAML frontmatter parsing uses a simple regex (no extra deps). Missing directories are handled gracefully.
promptBuilder.ts— updatedAccepts optional
extensionPathviaBuildMigrationPromptOptions. When provided:execute-migration-phaseskillThe incident/file block building logic is unchanged.
ProfileSyncClient.ts— updatedAdded logging when profile bundles include
skills/orprompts/directories. The existing TAR extract pipeline already handles all file types — no filter changes needed.Depends on
What`s still deferred
extensionPathfrom the orchestrator tobuildMigrationPrompt(needs call-site update inagentOrchestrator.ts)