Skip to content

feat(tools): consolidate legacy tool names into CQRS pattern (#149)#166

Merged
polaz merged 3 commits intomainfrom
feat/#149-refactortools-consolidate-legacy-tool-names-into-c
Jan 24, 2026
Merged

feat(tools): consolidate legacy tool names into CQRS pattern (#149)#166
polaz merged 3 commits intomainfrom
feat/#149-refactortools-consolidate-legacy-tool-names-into-c

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 24, 2026

Summary

  • Consolidate 8 legacy-named tools into consistent browse_* / manage_* CQRS naming pattern
  • Remove 3 duplicate tools (create_branch, list_project_members, download_attachment — already exist as actions in consolidated tools)
  • Rename 5 tools: get_usersbrowse_users, list_todosbrowse_todos, list_group_iterationsbrowse_iterations, create_groupmanage_namespace, manage_repositorymanage_project
  • Remove entire legacy toolRequirements map (~430 lines of dead code) from ToolAvailability.ts — all tier/version gating now uses actionRequirements exclusively
  • Add new iterations entity directory with browse_iterations tool (actions: list, get)
  • Update all tool descriptions to intent-first format
  • Reorganize CLI categories and setup wizard presets
  • Update documentation (TOOLS.md, llms.txt, guides, tool reference)

Result: 44 tools (down from 47), 18 entity types, all following CQRS naming convention.

Test plan

  • yarn lint — 0 errors
  • yarn test — 123 suites, 3779 tests passing
  • yarn build — successful
  • Tool count verified: 44 via list-tools --json
  • No legacy tool names remain in src/ (grep verified)
  • No toolRequirements references remain in src/

Closes #149

Consolidate 8 legacy-named tools into consistent browse_*/manage_* naming:
- Remove duplicates: create_branch, list_project_members
- Rename: get_users→browse_users, list_todos→browse_todos,
  list_group_iterations→browse_iterations, create_group→manage_namespace,
  manage_repository→manage_project, download_attachment→browse_files action
- Remove legacy toolRequirements map (~430 lines dead code)
- All methods now use actionRequirements exclusively
- Update tool descriptions to intent-first format
- Add iterations entity (new directory)
- Update categories in CLI and setup wizard
- Update documentation and tests

Result: 44 tools (down from 47), all following CQRS naming convention.
Copilot AI review requested due to automatic review settings January 24, 2026 09:00
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 24, 2026

Test Coverage Report

Overall Coverage: 93.47%

Metric Percentage
Statements 92.99%
Branches 84.75%
Functions 82.83%
Lines 93.47%

View detailed coverage report

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 24, 2026

Codecov Report

❌ Patch coverage is 94.61883% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/entities/core/registry.ts 93.54% 1 Missing and 7 partials ⚠️
src/registry-manager.ts 57.14% 0 Missing and 3 partials ⚠️
src/entities/iterations/registry.ts 97.43% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

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 consolidates legacy tool names into a consistent CQRS naming pattern, reducing the tool count from 47 to 44 while improving maintainability and consistency.

Changes:

  • Renamed 5 legacy tools to follow browse_*/manage_* convention (get_usersbrowse_users, list_todosbrowse_todos, list_group_iterationsbrowse_iterations, create_groupmanage_namespace, manage_repositorymanage_project)
  • Removed 3 duplicate tools by consolidating their functionality into existing tools (create_branch, list_project_members, download_attachment)
  • Created new iterations entity directory with browse_iterations tool supporting list and get actions
  • Removed ~430 lines of legacy toolRequirements map from ToolAvailability.ts, now using actionRequirements exclusively

Reviewed changes

Copilot reviewed 43 out of 44 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/entities/iterations/* New iterations entity with browse_iterations tool (list/get actions)
src/entities/core/registry.ts Renamed manage_repository→manage_project, create_group→manage_namespace, get_users→browse_users, list_todos→browse_todos; removed duplicate tools
src/entities/core/schema*.ts Updated schemas for renamed tools with expanded actions (manage_project now has update/delete/archive/transfer)
src/entities/files/* Consolidated download_attachment action into browse_files tool
src/services/ToolAvailability.ts Removed legacy toolRequirements map (~430 lines), using actionRequirements exclusively
tests/unit/* Updated 10 test files with renamed tool names and adjusted action parameters
tests/integration/* Updated integration tests to use new tool names and action parameters
src/profiles/builtin/* Updated denied_actions to reference manage_project instead of manage_repository
docs/* Updated documentation to reflect 44 tools across 18 entity types
src/config.ts, src/registry-manager.ts Added USE_ITERATIONS feature flag and registry integration
Comments suppressed due to low confidence (2)

src/entities/core/schema-readonly.ts:1

  • Parameter renamed from action to todo_action to avoid collision with the discriminated union's action field. Consider documenting this naming choice in a comment to clarify why the API parameter 'action' maps to 'todo_action' in the schema.
import { z } from "zod";

tests/unit/cli/setup/presets.test.ts:1

  • Temporary workaround skipping validation for the 'commits' category. The comment indicates this should be cleaned up in src. This technical debt should be tracked and resolved to remove the special case handling.

…rowse_users

- Test manage_project actions: update, delete, archive, unarchive, transfer
- Test manage_namespace actions: update, delete with encoding
- Test browse_users: smart search path, get action, isActionDenied
- Test browse_todos and manage_todos isActionDenied paths
- Remove stale "commits" category from readonly preset
- Document todo_action naming in schema
Copy link
Copy Markdown

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

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

…aming tests

- Add browse_files download_attachment action tests (success, null content-type, error)
- Add manage_namespace create with all optional parameters test
- Add manage_namespace isActionDenied test
- Update handlers.test.ts: replace legacy list_/get_ tool names with browse_ CQRS pattern
- Add iterations registry mock and USE_ITERATIONS flag to RegistryManager tests
Copy link
Copy Markdown

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

Copilot reviewed 45 out of 46 changed files in this pull request and generated no new comments.

@polaz polaz merged commit 82718ab into main Jan 24, 2026
22 checks passed
@polaz polaz deleted the feat/#149-refactortools-consolidate-legacy-tool-names-into-c branch January 24, 2026 09:34
sw-release-bot bot pushed a commit that referenced this pull request Jan 24, 2026
## [6.38.0](v6.37.0...v6.38.0) (2026-01-24)

### Features

* **tools:** consolidate legacy tool names into CQRS pattern ([#149](#149)) ([#166](#166)) ([82718ab](82718ab))
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.38.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(tools): consolidate legacy tool names into CQRS pattern

2 participants