feat: add category management(add, edit, remove)#44
Merged
Conversation
- Refactor sym category to parent command with subcommands - Add sym category list (moved from sym category) - Add sym category add <name> <description> - Add sym category edit <name> --name/--description - Add sym category remove <name> (blocked if rules reference it)
- add_category: add new category with name and description - edit_category: edit category name/description, updates rule refs - remove_category: remove category (blocked if rules reference it)
- TestAddCategory: success, duplicate, empty name/description - TestEditCategory: description update, rename with rule refs, conflicts - TestRemoveCategory: unused category, rules blocking, not found
- GET /api/categories: list all categories
- POST /api/categories: add new category
- PUT /api/categories/{name}: edit category
- DELETE /api/categories/{name}: remove category (blocked if used)
- MCP tools: batch-only mode (categories[], edits[], names[]) - CLI commands: single + batch mode with --file flag - Partial failure handling with success/fail reporting
- Add category array to template files (node, python, go) - Overwrite categories when applying template (remove merge logic) - Fix LLM provider message in convert dialog
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
Changes
sym category서브커맨드 추가 (list/add/edit/remove) - 배치 모드 지원add_category,edit_category,remove_category도구 추가새로 추가된 기능 상세
1. CLI 카테고리 관리 (
sym category)카테고리를 커맨드라인에서 직접 관리할 수 있습니다.
카테고리 목록 조회
카테고리 추가
카테고리 수정
주의: 카테고리 이름을 변경하면 해당 카테고리를 참조하는 모든 규칙의 카테고리도 자동으로 업데이트됩니다.
카테고리 삭제
주의: 규칙이 참조하고 있는 카테고리는 삭제할 수 없습니다. 먼저 해당 규칙을 삭제하거나 다른 카테고리로 변경해야 합니다.
2. MCP 카테고리 관리 도구
AI 코딩 어시스턴트가 MCP를 통해 카테고리를 직접 관리할 수 있습니다.
add_category - 카테고리 추가
{ "categories": [ {"name": "security", "description": "Security rules"}, {"name": "performance", "description": "Performance rules"} ] }edit_category - 카테고리 수정
{ "edits": [ {"name": "security", "new_name": "sec"}, {"name": "performance", "description": "New description"} ] }remove_category - 카테고리 삭제
{ "names": ["deprecated-cat1", "deprecated-cat2"] }모든 MCP 도구는 배치 처리를 지원하며, 부분 성공/실패 결과를 상세히 반환합니다.
3. Dashboard 카테고리 관리
웹 대시보드의 Global Settings 섹션에서 카테고리를 시각적으로 관리할 수 있습니다.
API 엔드포인트
응답에는 영향받은 규칙 수(affectedRules)가 포함됩니다.
UI 기능
4. LLM 라우팅 개선
규칙을 적절한 린터로 라우팅할 때, LLM 프롬프트에 카테고리 설명이 포함되어 더 정확한 라우팅이 가능합니다.