Skip to content

Commit cee24a0

Browse files
authored
feat: add convention and category CRUD operations via MCP and CLI (#54)
* refactor: extract UpdateDefaultsLanguages to policy package * feat: add convention CRUD operations - rename query_conventions to list_convention - add add_convention, edit_convention, remove_convention MCP tools - add sym convention list|add|edit|remove CLI commands - auto-update defaults.languages on convention add/edit * feat: add MCP convert tool - Add convert tool to generate linter configs from user-policy.json - Update tool descriptions to indicate convert is needed after rule changes * fix: update MCP prompt for convention queries and tool usage * docs: update convention management documentation
1 parent 586e9c7 commit cee24a0

20 files changed

Lines changed: 1789 additions & 77 deletions

README.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@ Symphony는 AI 개발환경(IDE, MCP 기반 LLM Tooling)을 위한 정책 기반
1313
- [목차](#목차)
1414
- [주요 기능](#주요-기능)
1515
- [빠른 시작](#빠른-시작)
16+
- [컨벤션 관리](#컨벤션-관리)
1617
- [MCP 설정](#mcp-설정)
1718
- [사용 가능한 MCP 도구](#사용-가능한-mcp-도구)
18-
- [`query_conventions`](#query_conventions)
19+
- [`list_convention`](#list_convention)
1920
- [`validate_code`](#validate_code)
2021
- [`list_category`](#list_category)
2122
- [`add_category`](#add_category)
2223
- [`edit_category`](#edit_category)
2324
- [`remove_category`](#remove_category)
2425
- [`import_convention`](#import_convention)
26+
- [`add_convention`](#add_convention)
27+
- [`edit_convention`](#edit_convention)
28+
- [`remove_convention`](#remove_convention)
29+
- [`convert`](#convert)
2530
- [컨벤션 파일](#컨벤션-파일)
2631
- [요구사항](#요구사항)
2732
- [지원 플랫폼](#지원-플랫폼)
@@ -47,15 +52,24 @@ npm install -g @dev-symphony/sym
4752

4853
# 2. 프로젝트 초기화 (.sym/ 폴더 생성 + MCP 설정)
4954
sym init
50-
51-
# 3. 대시보드 실행 및 컨벤션 편집
52-
sym dashboard
53-
54-
# 4. MCP 서버를 LLM IDE 내부에서 사용
5555
```
5656

5757
---
5858

59+
## 컨벤션 관리
60+
61+
컨벤션은 아래 3가지 방식으로 관리할 수 있습니다:
62+
63+
- **CLI 명령어**: `sym category|convention|import|convert`
64+
- **MCP 도구(권장)**: `list_*`, `add_*`, `edit_*`, `remove_*`, `import_convention`, `convert`
65+
- **Dashboard**: `sym dash`로 웹에서 편집
66+
67+
권장사항: **LLM IDE(Cursor/Claude Code 등)를 사용한다면 MCP 기반 관리**를 권장합니다(조회/편집/변환/검증을 일관된 플로우로 자동화 가능).
68+
69+
예시 문장: “`docs/team-standards.md`를 컨벤션에 반영해줘.”
70+
71+
자세한 내용은 [`docs/CONVENTION_MANAGEMENT.md`](docs/CONVENTION_MANAGEMENT.md)를 참고하세요.
72+
5973
## MCP 설정
6074

6175
`sym init` 명령은 MCP 서버 구성을 자동으로 설정합니다.
@@ -76,10 +90,10 @@ sym dashboard
7690

7791
## 사용 가능한 MCP 도구
7892

79-
### `query_conventions`
93+
### `list_convention`
8094

8195
- 프로젝트 컨벤션을 조회합니다.
82-
- 카테고리, 파일 목록, 언어 등의 파라미터는 모두 optional입니다.
96+
- 카테고리, 언어 등의 파라미터는 모두 optional입니다.
8397

8498
### `validate_code`
8599

@@ -113,6 +127,27 @@ sym dashboard
113127
- 필수 파라미터: `path`
114128
- 선택 파라미터: `mode` (`append` 또는 `clear`, 기본값: `append`)
115129

130+
### `add_convention`
131+
132+
- 새 컨벤션(규칙)을 추가합니다 (배치 지원).
133+
- 필수 파라미터: `conventions` (배열)
134+
- 컨벤션에 포함된 언어는 자동으로 `defaults.languages`에 추가됩니다.
135+
136+
### `edit_convention`
137+
138+
- 기존 컨벤션을 편집합니다 (배치 지원).
139+
- 필수 파라미터: `edits` (배열)
140+
141+
### `remove_convention`
142+
143+
- 컨벤션을 삭제합니다 (배치 지원).
144+
- 필수 파라미터: `ids` (배열)
145+
146+
### `convert`
147+
148+
- user-policy.json(Schema A)에서 code-policy.json(Schema B) 및 린터 설정 파일을 생성/갱신합니다.
149+
- 컨벤션/카테고리를 추가/편집/삭제한 뒤 실행하는 것을 권장합니다.
150+
116151
---
117152

118153
## 컨벤션 파일
@@ -124,6 +159,14 @@ Symphony는 프로젝트 컨벤션을 **정책 파일(`.sym/user-policy.json`)**
124159
sym dashboard
125160
```
126161

162+
컨벤션/카테고리를 수정한 후에는 아래 명령으로 린터 설정을 갱신하세요:
163+
164+
```bash
165+
sym convert
166+
```
167+
168+
자세한 관리 방법은 문서에서 확인할 수 있습니다: [`docs/CONVENTION_MANAGEMENT.md`](docs/CONVENTION_MANAGEMENT.md)
169+
127170
예시 정책 파일:
128171

129172
```json

docs/ARCHITECTURE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,17 @@ AI 코딩 도구(Claude Code, Cursor 등)와 stdio를 통해 통신합니다.
140140

141141
| Tool | Description |
142142
|------|-------------|
143-
| `query_conventions` | 프로젝트 컨벤션 조회 |
143+
| `list_convention` | 프로젝트 컨벤션 조회 |
144144
| `validate_code` | 코드 변경사항 검증 |
145145
| `list_category` | 카테고리 목록 조회 |
146146
| `add_category` | 카테고리 추가 (배치 지원) |
147147
| `edit_category` | 카테고리 편집 (배치 지원) |
148148
| `remove_category` | 카테고리 삭제 (배치 지원) |
149149
| `import_convention` | 외부 문서에서 컨벤션 추출 |
150+
| `add_convention` | 컨벤션 추가 (배치 지원) |
151+
| `edit_convention` | 컨벤션 편집 (배치 지원) |
152+
| `remove_convention` | 컨벤션 삭제 (배치 지원) |
153+
| `convert` | user-policy.json → code-policy.json + 린터 설정 생성/갱신 |
150154

151155
#### HTTP Server (`internal/server`)
152156

0 commit comments

Comments
 (0)