feat: add category management with CLI command and MCP tool#43
Merged
Conversation
- Add CategoryDef struct with name and description fields - Add Category field to UserPolicy for user-defined categories
- Add sym category CLI command to list categories - Add list_category MCP tool for AI tools integration - Add default categories (7) to sym init
- Update sym category and list_category descriptions - Add list_category to MCP tool lists - Add CategoryDef type documentation
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
list_category도구 추가sym init시 7개의 기본 카테고리를 user-policy.json에 자동 생성Changes
CategoryDef타입 및UserPolicy.Category필드 추가 (pkg/schema/types.go)sym categoryCLI 명령어 추가 (internal/cmd/category.go)list_categoryMCP 도구 추가 (internal/mcp/server.go)sym init에서 기본 카테고리 7개 생성 (internal/cmd/init.go)TestListCategory테스트 추가 (internal/mcp/server_test.go)Feature: Category Management
개요
컨벤션 카테고리는 규칙을 분류하는 데 사용됩니다. 이 PR은 사용자와 AI 도구가 사용 가능한 카테고리를 조회할 수 있는 기능을 추가합니다.
기본 카테고리 (7개)
sym init실행 시 다음 카테고리가 자동 생성됩니다:securitystyledocumentationerror_handlingarchitectureperformancetesting사용자 정의 카테고리
사용자는
user-policy.json에서 카테고리를 직접 수정, 추가, 삭제할 수 있습니다:{ "category": [ {"name": "security", "description": "보안 관련 규칙 (한국어 설명으로 변경)"}, {"name": "naming", "description": "네이밍 컨벤션 규칙 (새로 추가)"} ] }Endpoints
1. CLI Command: sym category
터미널에서 카테고리 목록을 조회합니다.
Usage:
sym category
Output:
[Convention Categories] 7 categories available
• security
Security rules (authentication, authorization, vulnerability prevention, etc.)
• style
Code style and formatting rules
• documentation
Documentation rules (comments, docstrings, etc.)
...
2. MCP Tool: list_category
AI 코딩 도구(Claude Code, Cursor 등)에서 MCP를 통해 카테고리를 조회합니다.
Tool Name: list_category
Input Schema: 파라미터 없음
Output Example:
Available categories (7):
• security
Security rules (authentication, authorization, vulnerability prevention, etc.)
• style
Code style and formatting rules
...
Use query_conventions with a specific category to get rules for that category.
Use Case - AI 워크플로우: