ai-bot: render markdown skills in the prompt (CS-11555)#5396
Draft
jurgenwerk wants to merge 2 commits into
Draft
ai-bot: render markdown skills in the prompt (CS-11555)#5396jurgenwerk wants to merge 2 commits into
jurgenwerk wants to merge 2 commits into
Conversation
getEnabledSkills assumed every enabled skill was a Skill card and JSON-parsed its downloaded content, so a skill enabled as a SKILL.md file broke prompt assembly. Detect markdown skills by file extension and present them in the same card-shaped form the pipeline already expects — title from the frontmatter name (falling back to the file name), instructions from the body after the frontmatter block. skillCardsToMessages and getTools need no changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stop pushing source-code-editing as a Skill card in code mode; enable it by URL as the markdown SKILL.md in the skills realm instead. UpdateRoomSkillsCommand already loads .md skills, and the bot now renders them, so its instructions flow the same way while the source of truth moves to the markdown file. The other two code-mode skills stay as cards for now. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Preview deploymentsHost Test Results 1 files 1 suites 2h 15m 26s ⏱️ Results for commit e4d81c2. For more details on these errors, see this check. Realm Server Test Results 1 files 1 suites 9m 10s ⏱️ Results for commit e4d81c2. |
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.
This makes the assistant get the
source-code-editingskill from a markdownSKILL.mdfile in the skills realm instead of a Skill card, and teaches the bot how to read markdown skills in general.Two things were needed. First,
getEnabledSkillsassumed every enabled skill was a card and tried toJSON.parseits content, which blew up on a plain markdown file — so now it recognizes aSKILL.md, uses its body as the instructions and the frontmatternameas the title, and hands it back in the same shape everything downstream already expects (so nothing else had to change). Second, code mode no longer pushessource-code-editingas a card; it enables the markdown file by URL, which the existing skill-enable command already knows how to load.The other two code-mode skills stay as cards for now. The markdown skill's body is still pushed into the prompt like before — loading it on demand is a later step. And markdown-skill commands aren't wired yet, which is fine here since
source-code-editinghas none.Pairs with cardstack/boxel-skills#84 (the skills converted to markdown). Covered by unit tests for the markdown parsing; host and ai-bot type-check clean.