Skip to content

Comments

feat: add convention import feature#50

Merged
ikjeong merged 5 commits intomainfrom
feat/import
Dec 12, 2025
Merged

feat: add convention import feature#50
ikjeong merged 5 commits intomainfrom
feat/import

Conversation

@ikjeong
Copy link
Contributor

@ikjeong ikjeong commented Dec 11, 2025

Summary

  • 외부 문서에서 코딩 컨벤션을 자동으로 추출하여 user-policy.json으로 가져오는 Import 기능 추가
  • LLM을 활용하여 문서 내용을 분석하고 카테고리/규칙을 자동 생성

Changes

  • internal/importer 패키지 추가 (types, reader, extractor, importer)
  • sym import CLI 명령어 추가
  • MCP 서버에 import_convention 도구 등록
  • Dashboard에 Import 모달 UI 및 /api/import 엔드포인트 추가

Feature Details

CLI: sym import

외부 문서에서 코딩 컨벤션을 가져옵니다.

# 기본 사용 (append 모드)
sym import docs/coding-standards.md

# 기존 컨벤션을 삭제하고 새로 가져오기 (clear 모드)
sym import docs/new-rules.md --mode clear

지원 포맷: 텍스트 파일

Import 모드:

모드 설명
append 기존 카테고리/규칙 유지, 새 항목 추가 (기본값)
clear 기존 항목 삭제 후 새로 가져오기

MCP Tool: import_convention

AI 에이전트가 문서에서 컨벤션을 자동으로 가져올 수 있습니다.

{
  "name": "import_convention",
  "arguments": {
    "path": "docs/coding-standards.md",
    "mode": "append"
  }
}

Parameters:

파라미터 필수 설명
path 가져올 문서 파일 경로
mode - append (기본) 또는 clear

Dashboard UI

  1. Import 버튼 클릭 (초록색 📥 버튼)
  2. 파일 경로 입력 (예: docs/coding-standards.md)
  3. Import 모드 선택 (Append/Clear)
  4. Import 실행 클릭

LLM이 문서를 분석하여 카테고리와 규칙을 자동 생성합니다.

- Implement importer package to extract coding conventions from external documents
- Use LLM for automatic category/rule extraction
- Support append/clear import modes
- Add sym import <file> command
- Support --mode flag for append/clear mode selection
- Add user confirmation prompt before clear mode execution
- Register import_convention tool in MCP server
- Enable AI agents to automatically import conventions from documents
- Add /api/import HTTP endpoint
- Implement import modal UI
- Support file path input and mode selection
@ikjeong ikjeong self-assigned this Dec 11, 2025
@ikjeong ikjeong merged commit de0e003 into main Dec 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant