Skip to content

refactor: simplify cmd package and consolidate documentation#39

Merged
ikjeong merged 12 commits intomainfrom
refactor/cmd
Dec 9, 2025
Merged

refactor: simplify cmd package and consolidate documentation#39
ikjeong merged 12 commits intomainfrom
refactor/cmd

Conversation

@ikjeong
Copy link
Contributor

@ikjeong ikjeong commented Dec 9, 2025

Summary

  • cmd 패키지의 코드 구조를 개선하고 중복 코드를 제거하여 유지보수성 향상
  • 분산된 문서를 단일 CLI 레퍼런스로 통합하여 문서 관리 효율화
  • 불필요한 플래그와 기능을 제거하여 CLI 인터페이스 단순화

Changes

패키지 구조 개선

  • internal/ui/colors.gointernal/cmd/colors.go로 이동 및 private 함수로 전환
  • internal/cmd/git.go 삭제, internal/git 패키지 직접 사용으로 변경
  • 중복 래퍼 함수 제거 (saveAPIKeyToEnv, handleError 등)

명령어 인터페이스 단순화

  • init: --register-mcp, --setup-llm 플래그 제거, .sym/config.json 생성 추가
  • convert: --targets 플래그 제거, 언어 기반 라우팅으로 자동 결정
  • mcp: 자동 대시보드 실행 제거
  • mcp register: claude-desktop/cline 지원 제거, Symphony 섹션 마커 추가 (idempotent 업데이트)

UX 개선

  • my-role: bufio.ReadStringsurvey.Select로 변경하여 선택 UX 개선
  • mcp register: claude.mdCLAUDE.md 네이밍 규칙 적용, 불필요한 백업 생성 제거

문서 정리

  • CONVERT_FEATURE.md, CONVERT_USAGE.md, LINTER_VALIDATION.md, LLM_VALIDATOR.md 삭제
  • docs/command.md 추가 (통합 CLI 레퍼런스)

- --targets 플래그 제거, 언어 기반 라우팅으로 단순화
- --register-mcp, --setup-llm 플래그 제거
- .sym/config.json 생성 추가
- Symphony 섹션 마커 추가 (idempotent 업데이트)
- claude.md → CLAUDE.md 네이밍 규칙 적용
- 도움말 텍스트 업데이트
- bufio.ReadString → survey.Select로 변경
- sym init --setup-llm → sym llm setup 안내 수정
- CONVERT_FEATURE.md, CONVERT_USAGE.md 삭제
- LINTER_VALIDATION.md, LLM_VALIDATOR.md 삭제
- command.md 추가 (통합 CLI 레퍼런스)
- Remove cmd/git.go, use internal/git.GetRepoRoot() instead
- Update init and validate commands to use git package
- Apply verbose flag consistently in convert/validate
- Remove auto-dashboard launch from mcp command
- Remove claude-desktop and cline support from mcp register
- Remove unused fileExists and launchDashboard functions
- Remove saveAPIKeyToEnv wrapper, call envutil directly
- Inline handleError in my_role command
- Change appendMode to isSharedFile for clarity
- Remove unnecessary .bak backup for Symphony-dedicated files
- Consistent logic with MCP config handling
- internal/ui/colors.go → internal/cmd/colors.go
- 모든 exported 함수/상수를 private으로 전환
- 미사용 함수 삭제 (Info, PrintInfo, Title, PrintIndent)
- 8개 의존 파일에서 import 및 호출 업데이트
@ikjeong ikjeong self-assigned this Dec 9, 2025
@ikjeong ikjeong merged commit b9ae415 into main Dec 9, 2025
1 check 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