Skip to content

Extract remaining tools#27

Merged
dominicmacaulay merged 8 commits intomainfrom
extract-remaining-tools
Feb 5, 2026
Merged

Extract remaining tools#27
dominicmacaulay merged 8 commits intomainfrom
extract-remaining-tools

Conversation

@dominicmacaulay
Copy link
Contributor

Why?

Extract Remaining tools into classes.

What Changed

  • Extract remaining tools

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the remaining standalone tool functions into class-based implementations, following the established Tool class pattern. The changes extract 6 tools (validate, theme-generator, accessibility/check-contrast, migration, scaffold, and sticker-sheet) from function-based modules into class-based tool implementations with external markdown template files.

Changes:

  • Migrated 6 remaining tool functions to class-based Tool implementations
  • Introduced markdown template files for tool output formatting
  • Added readToolFile helper function to load markdown templates
  • Updated index.ts to use new tool class instances instead of inline tool registrations

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tools/validate.ts Deleted - functionality moved to validate-token-usage-tool.ts
src/tools/theme-generator.ts Deleted - functionality moved to generate-theme-tool.ts
src/tools/migration.ts Deleted - functionality moved to suggest-token-migration-tool.ts
src/tools/scaffold.ts Deleted - functionality moved to generate-component-scaffold-tool.ts
src/tools/accessibility.ts Deleted - functionality moved to check-contrast-tool.ts
src/tools/sticker-sheet.ts Deleted - functionality moved to generate-sticker-sheet-tool.ts (note: file doesn't exist in diff but referenced in PR)
src/tools/validate-token-usage-tool.ts New class-based implementation with markdown templates
src/tools/generate-theme-tool.ts New class-based implementation with markdown templates
src/tools/suggest-token-migration-tool.ts New class-based implementation with markdown templates
src/tools/generate-component-scaffold-tool.ts New class-based implementation with markdown templates
src/tools/check-contrast-tool.ts New class-based implementation with markdown templates
src/tools/generate-sticker-sheet-tool.ts Refactored to class-based implementation, simplified framework handling
src/tools/*.md (9 files) New markdown template files for tool output formatting
src/tools/replace-hard-coded-values-tool.ts Updated import to include ToolInputSchema type
src/index.ts Removed inline tool registrations, updated to use new tool class instances
src/_internal/resource-path.ts Added readToolFile helper function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dominicmacaulay dominicmacaulay merged commit 7c1d36f into main Feb 5, 2026
2 checks passed
@dominicmacaulay dominicmacaulay deleted the extract-remaining-tools branch February 5, 2026 21:57
dallasbpeters pushed a commit that referenced this pull request Feb 6, 2026
* Create read tool file method

* extract the theme generator

* Finish tool class extractions

* Extract md files

* specifiy import type

* update type

* removed unused parameter

* removed useless variable stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments