@silbaram/artifact-driven-agent 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +250 -21
- package/ai-dev-team/.ada-status.template.json +10 -0
- package/bin/cli.js +76 -75
- package/core/roles/analyzer.md +270 -0
- package/core/roles/architect.md +33 -4
- package/core/roles/developer.md +50 -7
- package/core/roles/manager.md +189 -6
- package/core/roles/planner.md +31 -2
- package/core/roles/qa.md +45 -6
- package/core/roles/reviewer.md +44 -5
- package/core/rules/role-state-protocol.md +281 -0
- package/core/rules/session-state.md +255 -0
- package/package.json +1 -2
- package/src/commands/logs.js +81 -81
- package/src/commands/run.js +445 -202
- package/src/commands/sessions.js +426 -70
- package/src/utils/sessionState.js +350 -0
- package/docs/feature-structure.md +0 -36
package/README.md
CHANGED
|
@@ -11,9 +11,26 @@ CLI 기반 멀티 AI 에이전트를 사용해 기획 → 설계 → 개발 →
|
|
|
11
11
|
|
|
12
12
|
## 💡 핵심 개념
|
|
13
13
|
|
|
14
|
-
이 구조는 AI가 똑똑해서 돌아가는 시스템이 아니다.
|
|
14
|
+
이 구조는 AI가 똑똑해서 돌아가는 시스템이 아니다.
|
|
15
15
|
**AI가 규칙을 어기지 못해서** 안정적으로 돌아간다.
|
|
16
16
|
|
|
17
|
+
### 문서 기반 제약 구현
|
|
18
|
+
|
|
19
|
+
AI 에이전트 실행 시, 시스템 프롬프트에 다음을 포함합니다:
|
|
20
|
+
|
|
21
|
+
1. **모든 규칙 파일 내용** (rules/*.md) - 규칙을 반드시 알아야 함
|
|
22
|
+
2. **핵심 산출물 내용** (decision.md, project.md, current-sprint.md, plan.md, backlog.md)
|
|
23
|
+
3. **인터페이스 문서 내용** (api.md, ui.md, public-api.md 등)
|
|
24
|
+
4. **멀티 세션 상태 관리 안내** (.ada-status.json 사용법)
|
|
25
|
+
|
|
26
|
+
이를 통해 AI는:
|
|
27
|
+
- 문서에 명시된 규칙을 따라야만 함
|
|
28
|
+
- 현재 작업 범위(current-sprint.md)를 벗어날 수 없음
|
|
29
|
+
- 기술 기준(project.md)에 없는 기술을 추가할 수 없음
|
|
30
|
+
- 다른 세션과 상태를 공유하며 협업
|
|
31
|
+
|
|
32
|
+
**파일명만 나열하지 않고, 내용을 포함**하는 것이 핵심입니다.
|
|
33
|
+
|
|
17
34
|
---
|
|
18
35
|
|
|
19
36
|
## 📁 디렉토리 구조
|
|
@@ -37,7 +54,8 @@ artifact-driven-agent/
|
|
|
37
54
|
│ │ ├── run.js # AI 에이전트 실행
|
|
38
55
|
│ │ └── interactive.js # 대화형 모드
|
|
39
56
|
│ └── utils/
|
|
40
|
-
│
|
|
57
|
+
│ ├── files.js # 파일/경로 유틸리티
|
|
58
|
+
│ └── sessionState.js # 멀티 세션 상태 관리
|
|
41
59
|
│
|
|
42
60
|
├── core/ # 범용 핵심 (6역할, 8산출물, 5규칙)
|
|
43
61
|
│ ├── roles/
|
|
@@ -51,7 +69,6 @@ artifact-driven-agent/
|
|
|
51
69
|
│ └── cli/
|
|
52
70
|
│
|
|
53
71
|
├── ai-dev-team/ # 작업 디렉토리 (setup 후 사용)
|
|
54
|
-
├── docs/ # 가이드 문서
|
|
55
72
|
├── examples/ # 예제 프로젝트
|
|
56
73
|
└── scripts/ # 쉘 스크립트 (레거시)
|
|
57
74
|
```
|
|
@@ -100,6 +117,7 @@ ada --help
|
|
|
100
117
|
| `ada reset [-f]` | 초기화 |
|
|
101
118
|
| `ada validate [doc]` | 문서 검증 |
|
|
102
119
|
| `ada sessions` | 세션 목록 |
|
|
120
|
+
| `ada sessions -w` | Watch 모드 (실시간 모니터링) |
|
|
103
121
|
| `ada logs [id]` | 로그 확인 |
|
|
104
122
|
| `ada run <role> <tool>` | AI 실행 |
|
|
105
123
|
| `ada <role> <tool>` | AI 실행 (단축) |
|
|
@@ -202,20 +220,73 @@ ada frontend gemini
|
|
|
202
220
|
|
|
203
221
|
**동작:**
|
|
204
222
|
1. 세션 ID 생성 (YYYYMMDD-HHMMSS-random)
|
|
205
|
-
2.
|
|
206
|
-
3.
|
|
207
|
-
|
|
223
|
+
2. `.ada-status.json`에 세션 등록 (멀티 세션 지원)
|
|
224
|
+
3. 역할 파일 로드 → 시스템 프롬프트 생성
|
|
225
|
+
- 모든 규칙(rules/) 파일 내용 포함
|
|
226
|
+
- 핵심 산출물(decision.md, project.md 등) 내용 포함
|
|
227
|
+
- 인터페이스 문서(api.md, ui.md 등) 내용 포함
|
|
228
|
+
4. 활성 세션 및 대기 질문 표시
|
|
229
|
+
5. AI CLI 도구 실행 또는 프롬프트 출력
|
|
230
|
+
6. 세션 종료 시 상태 파일에서 제거
|
|
231
|
+
7. 세션/로그 기록
|
|
208
232
|
|
|
209
233
|
---
|
|
210
234
|
|
|
211
|
-
### `ada sessions` - 세션
|
|
235
|
+
### `ada sessions` - 실시간 세션 상태
|
|
212
236
|
|
|
213
237
|
**소스:** `src/commands/sessions.js`
|
|
214
238
|
|
|
215
|
-
|
|
239
|
+
**실시간 멀티 세션 상태**와 세션 기록을 확인합니다.
|
|
216
240
|
|
|
217
241
|
```bash
|
|
242
|
+
# 기본 모드
|
|
218
243
|
ada sessions
|
|
244
|
+
|
|
245
|
+
# Watch 모드 (실시간 모니터링 대시보드)
|
|
246
|
+
ada sessions --watch
|
|
247
|
+
ada sessions -w
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### 기본 모드 출력 내용:
|
|
251
|
+
|
|
252
|
+
1. **🟢 활성 세션 (실시간)**: 현재 실행 중인 역할 목록
|
|
253
|
+
2. **⚠️ 대기 질문**: Manager에게 응답 대기 중인 질문
|
|
254
|
+
3. **📊 진행 중인 Task**: Task별 진행률 및 담당자
|
|
255
|
+
4. **📜 최근 세션 기록**: 완료된 세션 히스토리
|
|
256
|
+
|
|
257
|
+
이 명령어는 멀티 터미널 환경에서 다른 세션들의 작업 상태를 실시간으로 확인할 때 유용합니다.
|
|
258
|
+
|
|
259
|
+
#### Watch 모드 (Manager 전용):
|
|
260
|
+
|
|
261
|
+
**실시간 모니터링 대시보드**로, Manager 역할 수행 시 유용합니다.
|
|
262
|
+
|
|
263
|
+
**주요 기능:**
|
|
264
|
+
- 📊 **통계 패널**: 활성 세션, 대기 질문, 진행 Task, 알림 요약
|
|
265
|
+
- 🟢 **활성 세션**: 각 세션의 역할, 도구, 실행 시간 표시
|
|
266
|
+
- ⚠️ **대기 질문**: 응답이 필요한 질문 강조 표시 (대기 시간 포함)
|
|
267
|
+
- 📊 **진행 Task**: 진행률 바와 색상으로 상태 시각화
|
|
268
|
+
- 🔔 **최근 알림**: 읽음/안읽음 표시
|
|
269
|
+
|
|
270
|
+
**자동 갱신:**
|
|
271
|
+
- `.ada-status.json` 파일 변경 시 즉시 갱신
|
|
272
|
+
- 2초마다 시간 정보 자동 갱신
|
|
273
|
+
|
|
274
|
+
**키보드 단축키:**
|
|
275
|
+
- `q` - 종료
|
|
276
|
+
- `r` - 수동 새로고침
|
|
277
|
+
- `c` - 화면 지우기
|
|
278
|
+
- `h` - 도움말
|
|
279
|
+
- `Ctrl+C` - 강제 종료
|
|
280
|
+
|
|
281
|
+
**사용 시나리오:**
|
|
282
|
+
```bash
|
|
283
|
+
# 터미널 1: Manager Watch 모드 (모니터링)
|
|
284
|
+
ada sessions --watch
|
|
285
|
+
|
|
286
|
+
# 터미널 2-4: 여러 개발 세션
|
|
287
|
+
ada developer codex
|
|
288
|
+
ada reviewer gemini
|
|
289
|
+
ada qa claude
|
|
219
290
|
```
|
|
220
291
|
|
|
221
292
|
---
|
|
@@ -273,10 +344,11 @@ ada
|
|
|
273
344
|
|
|
274
345
|
## 👥 역할 (Roles)
|
|
275
346
|
|
|
276
|
-
### Core 역할 (
|
|
347
|
+
### Core 역할 (7개)
|
|
277
348
|
|
|
278
349
|
| 역할 | 파일 | 책임 |
|
|
279
350
|
|------|------|------|
|
|
351
|
+
| **Analyzer** | analyzer.md | 기존 프로젝트 분석, project.md/plan.md 역생성 |
|
|
280
352
|
| **Planner** | planner.md | 요구사항 수집, Task 분해, plan.md/backlog.md 작성 |
|
|
281
353
|
| **Architect** | architect.md | 규모 예측, 기술 스택 결정, project.md 작성 |
|
|
282
354
|
| **Developer** | developer.md | 코드 구현 (범용) |
|
|
@@ -579,17 +651,22 @@ CLI 명령어 변경 절차를 정의합니다.
|
|
|
579
651
|
### 전체 흐름
|
|
580
652
|
|
|
581
653
|
```
|
|
654
|
+
[신규 프로젝트] [기존 프로젝트]
|
|
655
|
+
│ │
|
|
656
|
+
│ Analyzer (분석)
|
|
657
|
+
│ │
|
|
658
|
+
↓ ↓
|
|
582
659
|
Planner (plan.md + backlog.md)
|
|
583
|
-
|
|
660
|
+
↓
|
|
584
661
|
Architect (project.md → Frozen)
|
|
585
|
-
|
|
662
|
+
↓
|
|
586
663
|
Manager (스프린트 시작)
|
|
587
|
-
|
|
664
|
+
↓
|
|
588
665
|
[Sprint Loop]
|
|
589
666
|
Developer → Reviewer → QA → Manager (Task 완료)
|
|
590
|
-
|
|
667
|
+
↓
|
|
591
668
|
Manager (스프린트 종료)
|
|
592
|
-
|
|
669
|
+
↓
|
|
593
670
|
(다음 스프린트 또는 완료)
|
|
594
671
|
```
|
|
595
672
|
|
|
@@ -601,21 +678,173 @@ BACKLOG → READY → IN_SPRINT → IN_DEV → IN_REVIEW → IN_QA → DONE
|
|
|
601
678
|
|
|
602
679
|
---
|
|
603
680
|
|
|
681
|
+
## 🖥️ 멀티 세션 모드
|
|
682
|
+
|
|
683
|
+
여러 터미널에서 동시에 다른 역할을 실행할 수 있습니다. 각 세션은 자동으로 등록되고, 상태를 실시간으로 공유합니다.
|
|
684
|
+
|
|
685
|
+
### 사용 예시
|
|
686
|
+
|
|
687
|
+
```bash
|
|
688
|
+
# 터미널 1: Manager (오케스트레이터)
|
|
689
|
+
ada manager claude
|
|
690
|
+
|
|
691
|
+
# 터미널 2: Developer
|
|
692
|
+
ada developer codex
|
|
693
|
+
|
|
694
|
+
# 터미널 3: Reviewer
|
|
695
|
+
ada reviewer gemini
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
### 자동 세션 관리
|
|
699
|
+
|
|
700
|
+
**세션 시작 시:**
|
|
701
|
+
- `.ada-status.json`에 자동 등록
|
|
702
|
+
- 다른 활성 세션 목록 표시
|
|
703
|
+
- 대기 중인 질문 알림
|
|
704
|
+
|
|
705
|
+
**세션 종료 시:**
|
|
706
|
+
- 상태 파일에서 자동 제거
|
|
707
|
+
- 보유한 파일 잠금 해제
|
|
708
|
+
|
|
709
|
+
### 상태 파일
|
|
710
|
+
|
|
711
|
+
```
|
|
712
|
+
ai-dev-team/.ada-status.json
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
모든 세션이 이 파일을 통해 상태를 공유합니다.
|
|
716
|
+
|
|
717
|
+
**스키마 구성:**
|
|
718
|
+
- `activeSessions[]`: 현재 실행 중인 세션
|
|
719
|
+
- `pendingQuestions[]`: 응답 대기 중인 질문
|
|
720
|
+
- `taskProgress{}`: Task별 진행률
|
|
721
|
+
- `notifications[]`: 세션 간 알림
|
|
722
|
+
- `locks{}`: 파일 잠금 상태
|
|
723
|
+
|
|
724
|
+
### 실시간 모니터링
|
|
725
|
+
|
|
726
|
+
어느 터미널에서든 실시간 상태를 확인할 수 있습니다:
|
|
727
|
+
|
|
728
|
+
```bash
|
|
729
|
+
ada sessions
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
**출력 예시:**
|
|
733
|
+
|
|
734
|
+
```
|
|
735
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
736
|
+
📋 세션 상태
|
|
737
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
738
|
+
|
|
739
|
+
🟢 활성 세션 (실시간)
|
|
740
|
+
|
|
741
|
+
역할 도구 시작 시간 상태
|
|
742
|
+
developer codex 2024-12-29 14:20 🟢 active
|
|
743
|
+
reviewer gemini 2024-12-29 14:25 🟢 active
|
|
744
|
+
|
|
745
|
+
⚠️ 대기 질문
|
|
746
|
+
|
|
747
|
+
[QD001] developer → manager
|
|
748
|
+
질문: Redis 캐시를 적용할까요?
|
|
749
|
+
옵션: y: 적용, n: 미적용
|
|
750
|
+
|
|
751
|
+
📊 진행 중인 Task
|
|
752
|
+
|
|
753
|
+
T001: ████████░░ 80% (IN_REVIEW)
|
|
754
|
+
담당: developer
|
|
755
|
+
메모: API 구현 완료, 리뷰 대기 중
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
### 질문/응답 프로토콜
|
|
759
|
+
|
|
760
|
+
AI 에이전트가 Manager에게 질문해야 할 때, `.ada-status.json`의 `pendingQuestions`에 질문을 추가합니다.
|
|
761
|
+
|
|
762
|
+
**질문 등록 (AI가 수행):**
|
|
763
|
+
|
|
764
|
+
```javascript
|
|
765
|
+
// AI가 .ada-status.json 파일을 직접 수정
|
|
766
|
+
{
|
|
767
|
+
"pendingQuestions": [
|
|
768
|
+
{
|
|
769
|
+
"id": "QD001",
|
|
770
|
+
"from": "developer",
|
|
771
|
+
"to": "manager",
|
|
772
|
+
"question": "Redis 캐시를 적용할까요?",
|
|
773
|
+
"options": ["y: 적용", "n: 미적용"],
|
|
774
|
+
"status": "waiting",
|
|
775
|
+
"createdAt": "2024-12-29T14:30:00Z"
|
|
776
|
+
}
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
**응답 확인:**
|
|
782
|
+
|
|
783
|
+
Manager 역할(또는 사용자)이 상태 파일을 업데이트하면, Developer 역할이 응답을 읽어서 작업을 계속합니다.
|
|
784
|
+
|
|
785
|
+
**모니터링:**
|
|
786
|
+
|
|
787
|
+
```bash
|
|
788
|
+
# 어느 터미널에서든 확인 가능
|
|
789
|
+
ada sessions
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
### AI 에이전트의 상태 관리
|
|
793
|
+
|
|
794
|
+
AI 에이전트는 시스템 프롬프트를 통해 다음 작업을 수행하도록 안내받습니다:
|
|
795
|
+
|
|
796
|
+
1. **Task 진행 상황 업데이트**: `taskProgress` 섹션 수정
|
|
797
|
+
2. **질문 등록**: `pendingQuestions` 배열에 추가
|
|
798
|
+
3. **알림 전송**: `notifications` 배열에 추가
|
|
799
|
+
4. **파일 잠금**: `locks` 객체로 동시 수정 방지
|
|
800
|
+
|
|
801
|
+
### 관련 문서
|
|
802
|
+
|
|
803
|
+
- `core/rules/session-state.md` - 상태 파일 스키마
|
|
804
|
+
- `core/rules/role-state-protocol.md` - 역할별 프로토콜
|
|
805
|
+
- `src/utils/sessionState.js` - 상태 관리 유틸리티 구현
|
|
806
|
+
|
|
807
|
+
---
|
|
808
|
+
|
|
604
809
|
## 📦 Feature 단위 구조 (대규모)
|
|
605
810
|
|
|
606
|
-
|
|
811
|
+
대규모 프로젝트에서 병렬 개발을 위한 Feature 분리 구조입니다.
|
|
812
|
+
|
|
813
|
+
### 디렉토리 구조
|
|
607
814
|
|
|
608
815
|
```
|
|
609
816
|
ai-dev-team/artifacts/features/
|
|
610
817
|
├── F001-user-auth/
|
|
611
|
-
│ ├── spec.md
|
|
612
|
-
│ ├── api.md
|
|
613
|
-
│ ├── ui.md
|
|
614
|
-
│ ├── review.md
|
|
615
|
-
│ └── qa.md
|
|
616
|
-
└── _template/
|
|
818
|
+
│ ├── spec.md # Feature 스펙
|
|
819
|
+
│ ├── api.md # Feature API
|
|
820
|
+
│ ├── ui.md # Feature UI
|
|
821
|
+
│ ├── review.md # 리뷰 기록
|
|
822
|
+
│ └── qa.md # QA 기록
|
|
823
|
+
└── _template/ # 템플릿
|
|
617
824
|
```
|
|
618
825
|
|
|
826
|
+
### 사용 시점
|
|
827
|
+
|
|
828
|
+
**사용 권장:**
|
|
829
|
+
- 프로젝트 규모 M 이상
|
|
830
|
+
- 기능 3개 이상
|
|
831
|
+
- 병렬 개발 필요
|
|
832
|
+
|
|
833
|
+
**사용 불필요:**
|
|
834
|
+
- 프로젝트 규모 S
|
|
835
|
+
- 기능 2개 이하
|
|
836
|
+
- 순차 개발
|
|
837
|
+
|
|
838
|
+
### 명명 규칙
|
|
839
|
+
|
|
840
|
+
```
|
|
841
|
+
<Feature-ID>-<feature-name>/
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
**예시:** `F001-user-auth/`, `F002-dashboard/`
|
|
845
|
+
|
|
846
|
+
각 Feature는 독립적으로 개발/리뷰/QA 가능합니다.
|
|
847
|
+
|
|
619
848
|
---
|
|
620
849
|
|
|
621
850
|
## 📊 템플릿 비교
|
package/bin/cli.js
CHANGED
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { program } from 'commander';
|
|
4
|
-
import { setup } from '../src/commands/setup.js';
|
|
5
|
-
import { status } from '../src/commands/status.js';
|
|
6
|
-
import { reset } from '../src/commands/reset.js';
|
|
7
|
-
import { validate } from '../src/commands/validate.js';
|
|
8
|
-
import { sessions } from '../src/commands/sessions.js';
|
|
9
|
-
import { logs } from '../src/commands/logs.js';
|
|
10
|
-
import { run } from '../src/commands/run.js';
|
|
11
|
-
import { interactive } from '../src/commands/interactive.js';
|
|
12
|
-
import { createRequire } from 'node:module';
|
|
13
|
-
|
|
14
|
-
const require = createRequire(import.meta.url);
|
|
15
|
-
const { version } = require('../package.json');
|
|
16
|
-
program
|
|
17
|
-
.name('ada')
|
|
18
|
-
.description('Artifact-Driven AI Agent Framework\nAI가 규칙을 어기지 못하게 하는 문서 기반 개발')
|
|
19
|
-
.version(version);
|
|
20
|
-
|
|
21
|
-
// Setup command
|
|
22
|
-
program
|
|
23
|
-
.command('setup [template]')
|
|
24
|
-
.description('프로젝트 템플릿 세팅 (web, library, game, cli)')
|
|
25
|
-
.action(setup);
|
|
26
|
-
|
|
27
|
-
// Status command
|
|
28
|
-
program
|
|
29
|
-
.command('status')
|
|
30
|
-
.description('현재 세팅 상태 확인')
|
|
31
|
-
.action(status);
|
|
32
|
-
|
|
33
|
-
// Reset command
|
|
34
|
-
program
|
|
35
|
-
.command('reset')
|
|
36
|
-
.description('ai-dev-team 초기화')
|
|
37
|
-
.option('-f, --force', '확인 없이 강제 초기화')
|
|
38
|
-
.action(reset);
|
|
39
|
-
|
|
40
|
-
// Validate command
|
|
41
|
-
program
|
|
42
|
-
.command('validate [doc]')
|
|
43
|
-
.description('문서 검증 (plan, project, backlog, sprint 또는 전체)')
|
|
44
|
-
.action(validate);
|
|
45
|
-
|
|
46
|
-
// Sessions command
|
|
47
|
-
program
|
|
48
|
-
.command('sessions')
|
|
49
|
-
.description('AI 실행 세션 목록')
|
|
50
|
-
.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.
|
|
62
|
-
.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { program } from 'commander';
|
|
4
|
+
import { setup } from '../src/commands/setup.js';
|
|
5
|
+
import { status } from '../src/commands/status.js';
|
|
6
|
+
import { reset } from '../src/commands/reset.js';
|
|
7
|
+
import { validate } from '../src/commands/validate.js';
|
|
8
|
+
import { sessions } from '../src/commands/sessions.js';
|
|
9
|
+
import { logs } from '../src/commands/logs.js';
|
|
10
|
+
import { run } from '../src/commands/run.js';
|
|
11
|
+
import { interactive } from '../src/commands/interactive.js';
|
|
12
|
+
import { createRequire } from 'node:module';
|
|
13
|
+
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
const { version } = require('../package.json');
|
|
16
|
+
program
|
|
17
|
+
.name('ada')
|
|
18
|
+
.description('Artifact-Driven AI Agent Framework\nAI가 규칙을 어기지 못하게 하는 문서 기반 개발')
|
|
19
|
+
.version(version);
|
|
20
|
+
|
|
21
|
+
// Setup command
|
|
22
|
+
program
|
|
23
|
+
.command('setup [template]')
|
|
24
|
+
.description('프로젝트 템플릿 세팅 (web, library, game, cli)')
|
|
25
|
+
.action(setup);
|
|
26
|
+
|
|
27
|
+
// Status command
|
|
28
|
+
program
|
|
29
|
+
.command('status')
|
|
30
|
+
.description('현재 세팅 상태 확인')
|
|
31
|
+
.action(status);
|
|
32
|
+
|
|
33
|
+
// Reset command
|
|
34
|
+
program
|
|
35
|
+
.command('reset')
|
|
36
|
+
.description('ai-dev-team 초기화')
|
|
37
|
+
.option('-f, --force', '확인 없이 강제 초기화')
|
|
38
|
+
.action(reset);
|
|
39
|
+
|
|
40
|
+
// Validate command
|
|
41
|
+
program
|
|
42
|
+
.command('validate [doc]')
|
|
43
|
+
.description('문서 검증 (plan, project, backlog, sprint 또는 전체)')
|
|
44
|
+
.action(validate);
|
|
45
|
+
|
|
46
|
+
// Sessions command
|
|
47
|
+
program
|
|
48
|
+
.command('sessions')
|
|
49
|
+
.description('AI 실행 세션 목록')
|
|
50
|
+
.option('-w, --watch', '실시간 모니터링 모드')
|
|
51
|
+
.action(sessions);
|
|
52
|
+
|
|
53
|
+
// Logs command
|
|
54
|
+
program
|
|
55
|
+
.command('logs [sessionId]')
|
|
56
|
+
.description('세션 로그 확인')
|
|
57
|
+
.action(logs);
|
|
58
|
+
|
|
59
|
+
// Run command
|
|
60
|
+
program
|
|
61
|
+
.command('run <role> <tool>')
|
|
62
|
+
.description('AI 에이전트 실행 (예: run backend claude)')
|
|
63
|
+
.action(run);
|
|
64
|
+
|
|
65
|
+
// Parse arguments
|
|
66
|
+
const args = process.argv.slice(2);
|
|
67
|
+
|
|
68
|
+
if (args.length === 0) {
|
|
69
|
+
// 인자 없으면 대화형 모드
|
|
70
|
+
interactive();
|
|
71
|
+
} else if (args.length === 2 && !args[0].startsWith('-') && !['setup', 'status', 'reset', 'validate', 'sessions', 'logs', 'run'].includes(args[0])) {
|
|
72
|
+
// 두 개의 인자가 명령어가 아니면 role tool로 간주
|
|
73
|
+
run(args[0], args[1]);
|
|
74
|
+
} else {
|
|
75
|
+
program.parse();
|
|
76
|
+
}
|