docs: update to-do list

This commit is contained in:
toki 2026-04-04 13:52:13 +09:00
parent 5066310567
commit fd476df246

View file

@ -23,33 +23,22 @@ AI(Claude 등)가 코드베이스를 더 잘 이해하고 수정할 수 있도
- `util/jira.dart` → 삭제 (`jira/jira.dart`와 중복, import 없음)
- `command.dart` import 경로 5곳 수정
### 3. Self-registering Command 패턴
- **작업**: `command.dart`의 import 40개 + `_commandMap` 리터럴 78줄 제거, registry 패턴 도입
- **결과**:
- `Command.register()` static 메서드 추가
- 커맨드 파일 39개에 `registerXxx()` top-level 함수 추가
- `commands/command_registry.dart` 신규 생성 — 모든 커맨드 등록 중앙화
- `application.dart``build()` 초반에 `registerAllCommands()` 호출
- **새 커맨드 추가 절차**:
1. 커맨드 파일 작성 + 해당 파일의 `registerXxx()`에 1줄 추가
2. `command.dart` enum에 1줄 추가 → `build_runner` 재실행
3. `command_registry.dart`에 import + 함수 호출 추가 (신규 파일인 경우)
---
## 📋 할 일
---
### 3. Self-registering Command 패턴
**우선순위: 최고 / 난이도: 높음**
2번 작업(util/ 정리)과 연계. `commands/` 구조 개편의 마무리 단계.
현재 새 커맨드 추가 시 두 곳을 수정해야 한다:
1. 도메인 데이터 파일 — 데이터 클래스 추가
2. `commands/command.dart` — 130+ case factory switch에 추가
각 Command 클래스가 자신을 등록하는 패턴으로 변경하면
새 커맨드 추가 시 해당 파일 하나만 수정하면 된다.
작업 내용:
- `Command` 클래스에 `registerFactory()` static 메서드 추가
- 각 커맨드 파일에 `static void register()` 메서드 추가
- `application.dart` 또는 별도 registry 파일에서 모든 커맨드 등록
- 기존 switch factory 제거
> ⚠️ 변경 범위가 크므로 2번 완료 후 진행 권장
---
### 4. 태그 시스템 중앙화
**우선순위: 중간 / 난이도: 낮음**