-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor: replace fetch_instructions with skill tool and built-in skills #10913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: replace fetch_instructions with skill tool and built-in skills #10913
Conversation
Re-review: 1 new issue found.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
d876abc to
99b424c
Compare
|
|
||
| // Build approval message | ||
| const toolMessage = JSON.stringify({ | ||
| tool: "skill", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SkillTool sends the approval payload as { "tool": "skill", ... }, but ClineSayTool in @roo-code/types does not include a "skill" variant and the webview ChatRow renderer has no case for it. In practice this can render as an unknown tool request (or fail type-safely elsewhere) when the UI tries to parse/display the approval.
Fix it with Roo Code or mention @roomote and request a fix.
b6f7fe0 to
a0d5728
Compare
d83a9c5 to
57f977f
Compare
- Add built-in skills (create-mcp-server, create-mode) following slash commands pattern - Update SkillsManager to merge built-in skills with user skills - Remove FetchInstructionsTool and related infrastructure - Remove enableMcpServerCreation setting and UI checkbox - Remove auto-approval logic for fetchInstructions - Update system prompt sections to remove fetch_instructions references Built-in skills are now available through the skills system with override precedence: project > global > built-in
- Remove <location> from built-in skills in prompt (only show for file-based skills) - Add 'skill' case to ChatRow.tsx for tool approval UI rendering - Add 'skill' to ClineSayTool union type and interface - Update i18n keys from 'instructions' to 'skill'
…L.md files - Add generate-built-in-skills.ts script to parse SKILL.md files and generate TypeScript - Add prebundle npm script to auto-generate before builds - Create built-in/create-mode/SKILL.md for mode creation instructions - Create built-in/mcp-builder/ with comprehensive MCP server development guide - Add project-level .roo/skills/mcp-builder/ skill - Add tests for the generation script - Update built-in-skills.ts to be auto-generated (DO NOT EDIT DIRECTLY) The source of truth is now the SKILL.md files. Run 'pnpm generate:skills' to regenerate.
The generator now runs prettier on the output file after generation. This ensures the generated file is already formatted and won't change when the pre-commit hook runs prettier via lint-staged.
- Rename built-in skill from 'mcp-builder' to 'create-mcp-server' - Replace enhanced skill content with original fetch_instructions content - Convert dynamic paths to static/generic instructions - Remove mcp-builder reference docs, scripts, and LICENSE - Update test to expect create-mcp-server instead of mcp-builder The enhanced mcp-builder skill will be added in a separate PR.
Skills are informational content that don't perform any actions, so they should be auto-approved like updateTodoList.
Skills execute silently without requiring user confirmation, similar to how the old fetch_instructions worked. Removed: - askApproval call from SkillTool - handlePartial method (no streaming UI) - ChatRow UI case for skill - User rejection and partial block tests Skills are read-only informational content that don't perform actions, so they don't need approval.
This reverts commit 40dd577.
…proval comment - Replace fetchInstructions/fetch_instructions with skill in CLI types.ts - Update CLI utils.ts display names for skill tool - Add explanatory comment for skill auto-approval policy
8c2fe4d to
3d07128
Compare
| * Whether diff-based editing tools are enabled. | ||
| * When disabled, the extension should avoid providing diff strategies / diff-based tooling. | ||
| */ | ||
| diffEnabled: z.boolean().optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we got rid of diffEnabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roomote get rid of any references to diffEnabled in this PR, we got rid of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Roo Code PR Fixer
Fixed: Removed all diffEnabled references from this PR.
Changes Made:
Type definitions:
packages/types/src/global-settings.ts: RemoveddiffEnabledfrom Zod schemapackages/types/src/vscode-extension-host.ts: RemoveddiffEnabledfrom ExtensionState Pick type
Implementation files:
src/core/prompts/system.ts: RemoveddiffEnabledparameter from SYSTEM_PROMPT function signaturesrc/core/webview/ClineProvider.ts: RemoveddiffEnabledfrom destructuring, getState(), and getStateToPostToWebview()src/core/webview/generateSystemPrompt.ts: RemoveddiffEnabledargument from SYSTEM_PROMPT callsrc/core/task/Task.ts: RemoveddiffEnabledargument from getSystemPrompt() call
Test files:
src/core/webview/__tests__/ClineProvider.spec.ts: RemoveddiffEnabledfrom mock state, removed property expectation, removed 3 test cases for diff enabled/disabledsrc/core/prompts/__tests__/system-prompt.spec.ts: RemoveddiffEnabledparameter from all SYSTEM_PROMPT calls, removed 3 test cases specifically testing diffEnabled behaviorsrc/core/prompts/__tests__/add-custom-instructions.spec.ts: RemoveddiffEnabledparameter from all SYSTEM_PROMPT calls
Verification:
- TypeScript type check: Passed
- All tests pass: 117 tests passed (6 skipped - pre-existing)
- ESLint: No warnings or errors
Commit: f997890
- Remove diffEnabled from global-settings.ts Zod schema - Remove diffEnabled from ExtensionState Pick type in vscode-extension-host.ts - Remove diffEnabled parameter from SYSTEM_PROMPT function signature in system.ts - Remove diffEnabled from ClineProvider.ts (destructuring, getState, getStateToPostToWebview) - Remove diffEnabled from generateSystemPrompt.ts - Remove diffEnabled from Task.ts getSystemPrompt call - Remove diffEnabled from test files (ClineProvider.spec.ts, system-prompt.spec.ts, add-custom-instructions.spec.ts) - Remove test cases specifically testing diffEnabled behavior
|
@roomote please resolve the merge conflicts with origin/main |
Resolved merge conflicts with origin/main. All local checks passed. |
|
🚀 Preview deployed! Your changes have been deployed to Vercel: Preview URL: https://roo-code-website-ild3l82xi-roo-code.vercel.app This preview will be updated automatically when you push new commits to this PR. |
| description: ARGS_PARAMETER_DESCRIPTION, | ||
| }, | ||
| }, | ||
| required: ["skill", "args"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the OpenAI tool schema, args is documented as optional but is currently included in required, which forces callers to always provide it (usually as null). Making args truly optional avoids schema/documentation mismatch and reduces invalid tool payload risk if other tool-callers omit it.
Fix it with Roo Code or mention @roomote and request a fix.
Closes #11062
Summary
This PR replaces the
fetch_instructionstool with a new unified skill tool system, making it easier for Roo to load specialized instructions for common tasks.What Changed
New Skill Tool
skilltool to load instructions for tasks like creating MCP servers or custom modesBuilt-in Skills
Two built-in skills are now included:
Removed Settings
New Diff Toggle Setting
diffEnabledsetting to control whether diff-based editing tools are availableHow This Affects You
For most users: No action required. Roo will automatically use the new skill system when you ask it to create MCP servers or custom modes.
For users with custom skills: Your existing project and global skills continue to work and take priority over built-in skills.
For users who disabled MCP server creation: The toggle has been removed. If you don't want Roo to create MCP servers, simply don't ask it to—the instructions are only loaded on demand.
Why This Change
Follow-up Work