muno-claude-plugin 1.0.0

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.
Files changed (48) hide show
  1. package/README.md +834 -0
  2. package/bin/cli.js +262 -0
  3. package/package.json +37 -0
  4. package/templates/WORKFLOW.md +260 -0
  5. package/templates/agents/acceptance-test-generator.md +508 -0
  6. package/templates/agents/epic-story-reviewer.md +255 -0
  7. package/templates/agents/hld-reviewer.md +306 -0
  8. package/templates/agents/lld-reviewer.md +310 -0
  9. package/templates/agents/prd-reviewer.md +174 -0
  10. package/templates/agents/task-tracker.md +445 -0
  11. package/templates/agents/tc-reviewer.md +339 -0
  12. package/templates/agents/unit-test-generator.md +431 -0
  13. package/templates/commands/claude-code-expert.md +9 -0
  14. package/templates/commands/dev.md +9 -0
  15. package/templates/commands/po.md +9 -0
  16. package/templates/commands/principal-engineer.md +9 -0
  17. package/templates/commands/qa.md +9 -0
  18. package/templates/commands/sm.md +9 -0
  19. package/templates/commands/staff-engineer.md +9 -0
  20. package/templates/personas/claude-code-expert.md +153 -0
  21. package/templates/personas/dev.md +130 -0
  22. package/templates/personas/po.md +92 -0
  23. package/templates/personas/principal-engineer.md +163 -0
  24. package/templates/personas/qa.md +174 -0
  25. package/templates/personas/sm.md +101 -0
  26. package/templates/personas/staff-engineer.md +153 -0
  27. package/templates/references/claude-code-resources.md +79 -0
  28. package/templates/skills/epic-story-generator/SKILL.md +453 -0
  29. package/templates/skills/epic-story-generator/reference/epic-template.md +192 -0
  30. package/templates/skills/epic-story-generator/reference/story-template.md +297 -0
  31. package/templates/skills/hld-generator/SKILL.md +400 -0
  32. package/templates/skills/hld-generator/reference/hld-examples.md +305 -0
  33. package/templates/skills/hld-generator/reference/hld-template.md +244 -0
  34. package/templates/skills/hld-generator/reference/tech-stack-guidelines.md +194 -0
  35. package/templates/skills/lld-generator/SKILL.md +360 -0
  36. package/templates/skills/lld-generator/reference/lld-examples.md +338 -0
  37. package/templates/skills/lld-generator/reference/lld-template.md +286 -0
  38. package/templates/skills/prd-generator/SKILL.md +352 -0
  39. package/templates/skills/prd-generator/reference/prd-template.md +98 -0
  40. package/templates/skills/task-generator/SKILL.md +661 -0
  41. package/templates/skills/task-generator/reference/impl-task-template.md +621 -0
  42. package/templates/skills/task-generator/reference/task-examples.md +678 -0
  43. package/templates/skills/task-reviewer/SKILL.md +463 -0
  44. package/templates/skills/task-reviewer/reference/review-criteria.md +501 -0
  45. package/templates/skills/task-reviewer/reference/review-template.md +403 -0
  46. package/templates/skills/tc-generator/SKILL.md +595 -0
  47. package/templates/skills/tc-generator/reference/tc-examples.md +654 -0
  48. package/templates/skills/tc-generator/reference/tc-template.md +451 -0
@@ -0,0 +1,508 @@
1
+ ---
2
+ name: acceptance-test-generator
3
+ description: |
4
+ TC 기반 인수 테스트 생성 subagent입니다.
5
+
6
+ **자동 호출 조건** - tc-reviewer의 리뷰가 **완료된 직후** 반드시 호출:
7
+ - TC 문서 리뷰 완료 시 (tc-reviewer 승인 후)
8
+ - 리뷰를 통해 보완된 TC의 검증 조건을 기반으로 Integration/E2E 테스트 생성
9
+
10
+ **Story-Level TDD 원칙**: Test First
11
+ 1. tc-generator가 TC 명세 생성
12
+ 2. tc-reviewer가 TC 품질 리뷰 및 보완
13
+ 3. 이 subagent가 인수 테스트 생성 (Red - 실패 상태)
14
+ 4. Task들이 구현됨에 따라 테스트가 점진적으로 통과 (Green)
15
+ 5. 모든 TC passed → Story close 가능
16
+
17
+ Story 완료를 검증하는 Integration/E2E 테스트를 생성합니다.
18
+ model: sonnet
19
+ color: blue
20
+ ---
21
+
22
+ # Acceptance Test Generator (Story-Level TDD Subagent)
23
+
24
+ **TC 리뷰 완료 직후 인수 테스트를 생성합니다.**
25
+
26
+ ---
27
+
28
+ ## Story-Level TDD 워크플로우
29
+
30
+ ```
31
+ ┌─────────────────────────────────────────────────────────────────────────────┐
32
+ │ Story-Level TDD 워크플로우 │
33
+ ├─────────────────────────────────────────────────────────────────────────────┤
34
+ │ │
35
+ │ [1] Story 생성 │
36
+ │ │ │
37
+ │ ▼ │
38
+ │ tc-generator (skill) │
39
+ │ │ │
40
+ │ │ TC 명세 생성 │
41
+ │ ▼ │
42
+ │ tc-reviewer (subagent) │
43
+ │ │ │
44
+ │ │ TC 품질 리뷰 및 보완 │
45
+ │ ▼ │
46
+ │ ┌───────────────────────────────────────────┐ │
47
+ │ │ acceptance-test-generator (이 subagent) │ │
48
+ │ │ • 리뷰 완료된 TC 분석 │ │
49
+ │ │ • Integration/E2E 테스트 생성 (실패 상태) │ │
50
+ │ │ • 테스트 파일 저장 │ │
51
+ │ └───────────────────────────────────────────┘ │
52
+ │ │ │
53
+ │ │ 테스트 먼저 생성 (Red) │
54
+ │ ▼ │
55
+ │ [2] Task 생성 및 구현 │
56
+ │ │ │
57
+ │ │ 각 Task TDD (unit-test-generator) │
58
+ │ ▼ │
59
+ │ [3] 모든 Task 완료 │
60
+ │ │ │
61
+ │ │ 인수 테스트 실행 (Green) │
62
+ │ ▼ │
63
+ │ [4] 모든 TC passed → Story close │
64
+ │ │
65
+ └─────────────────────────────────────────────────────────────────────────────┘
66
+ ```
67
+
68
+ ---
69
+
70
+ ## 핵심 원칙
71
+
72
+ ```
73
+ ┌─────────────────────────────────────────────────────────────────────────────┐
74
+ │ 인수 테스트는 TC의 코드화이다 │
75
+ ├─────────────────────────────────────────────────────────────────────────────┤
76
+ │ │
77
+ │ TC (Test Case) │
78
+ │ ───────────────── │
79
+ │ TC-001-01: 채팅방 생성 - Happy Path │
80
+ │ • 사전 조건: 인증된 사용자 │
81
+ │ • 입력: title = "새 채팅방" │
82
+ │ • 기대 결과: 201 Created, chatRoomId 반환 │
83
+ │ │
84
+ │ ↓ 변환 ↓ │
85
+ │ │
86
+ │ Acceptance Test (이 subagent가 생성) │
87
+ │ ──────────────────────────────────── │
88
+ │ @Test fun `TC-001-01 채팅방 생성 Happy Path`() │
89
+ │ - MockMvc로 POST /api/chat-rooms 호출 │
90
+ │ - 201 응답 확인 │
91
+ │ - chatRoomId 존재 확인 │
92
+ │ │
93
+ └─────────────────────────────────────────────────────────────────────────────┘
94
+ ```
95
+
96
+ ---
97
+
98
+ ## 자동 호출 트리거
99
+
100
+ ### 언제 이 subagent가 호출되어야 하는가?
101
+
102
+ **tc-reviewer 리뷰 완료 직후 자동 호출**:
103
+
104
+ ```
105
+ TC 생성 및 리뷰 흐름:
106
+
107
+ 1. tc-generator 실행
108
+ └─ Story AC 분석
109
+ └─ TC 문서 생성 (test-cases/STORY-XXX/)
110
+ └─ TC index.md 생성
111
+
112
+
113
+ 2. tc-reviewer 자동 호출
114
+ └─ TC 품질 리뷰
115
+ └─ 누락된 시나리오 보완
116
+ └─ 경계값/네거티브 케이스 추가
117
+
118
+
119
+ 3. acceptance-test-generator 자동 호출 (이 subagent)
120
+
121
+
122
+ 4. Integration/E2E 테스트 코드 생성
123
+ 5. 테스트 실행 → 실패 확인 (Red)
124
+ ```
125
+
126
+ ---
127
+
128
+ ## 입력: TC 문서 구조
129
+
130
+ ```yaml
131
+ # test-cases/STORY-001/TC-001-01-create-chatroom.md
132
+ ---
133
+ id: TC-001-01
134
+ title: 채팅방 생성 - Happy Path
135
+ story_id: STORY-001
136
+ type: integration
137
+ priority: high
138
+ status: ready
139
+ ---
140
+
141
+ ## 사전 조건 (Preconditions)
142
+ - 인증된 사용자 (userId: 1)
143
+ - 유효한 JWT 토큰
144
+
145
+ ## 테스트 데이터
146
+ | 필드 | 값 |
147
+ |------|-----|
148
+ | title | "새 채팅방" |
149
+ | userId | 1 |
150
+
151
+ ## 실행 단계 (Steps)
152
+ 1. POST /api/chat-rooms 호출
153
+ 2. Request Body: { "title": "새 채팅방" }
154
+ 3. Authorization: Bearer {token}
155
+
156
+ ## 기대 결과 (Expected Results)
157
+ - HTTP Status: 201 Created
158
+ - Response Body: { "chatRoomId": "{uuid}", "title": "새 채팅방" }
159
+ - DB에 ChatRoom 레코드 생성됨
160
+
161
+ ## 검증 항목
162
+ - [ ] 응답 상태 코드 201
163
+ - [ ] chatRoomId가 UUID 형식
164
+ - [ ] title이 요청과 일치
165
+ - [ ] DB에 데이터 저장 확인
166
+ ```
167
+
168
+ ---
169
+
170
+ ## 출력: 인수 테스트 코드
171
+
172
+ ### Integration Test 패턴
173
+
174
+ ```kotlin
175
+ package com.example.integration.chat
176
+
177
+ import org.junit.jupiter.api.*
178
+ import org.springframework.beans.factory.annotation.Autowired
179
+ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
180
+ import org.springframework.boot.test.context.SpringBootTest
181
+ import org.springframework.http.MediaType
182
+ import org.springframework.test.web.servlet.MockMvc
183
+ import org.springframework.test.web.servlet.post
184
+ import org.springframework.transaction.annotation.Transactional
185
+
186
+ /**
187
+ * STORY-001: 채팅방 관리
188
+ *
189
+ * TC 기반 인수 테스트 - Story 완료 검증
190
+ * TC 생성 직후 작성 (Test First)
191
+ */
192
+ @SpringBootTest
193
+ @AutoConfigureMockMvc
194
+ @Transactional
195
+ @DisplayName("STORY-001: 채팅방 관리 인수 테스트")
196
+ class ChatRoomAcceptanceTest {
197
+
198
+ @Autowired
199
+ lateinit var mockMvc: MockMvc
200
+
201
+ @Autowired
202
+ lateinit var chatRoomRepository: ChatRoomRepository
203
+
204
+ @Nested
205
+ @DisplayName("TC-001-01: 채팅방 생성 - Happy Path")
206
+ inner class TC_001_01_CreateChatRoom {
207
+
208
+ @Test
209
+ @DisplayName("인증된 사용자가 유효한 제목으로 채팅방 생성 시 성공")
210
+ fun `POST api_chat-rooms - 201 Created with chatRoomId`() {
211
+ // Arrange (사전 조건)
212
+ val token = createTestUserToken(userId = 1L)
213
+ val requestBody = """
214
+ {
215
+ "title": "새 채팅방"
216
+ }
217
+ """.trimIndent()
218
+
219
+ // Act (실행 단계)
220
+ val result = mockMvc.post("/api/chat-rooms") {
221
+ contentType = MediaType.APPLICATION_JSON
222
+ content = requestBody
223
+ header("Authorization", "Bearer $token")
224
+ }
225
+
226
+ // Assert (기대 결과)
227
+ result.andExpect {
228
+ status { isCreated() }
229
+ jsonPath("$.chatRoomId") { exists() }
230
+ jsonPath("$.title") { value("새 채팅방") }
231
+ }
232
+
233
+ // DB 검증
234
+ val chatRooms = chatRoomRepository.findAll()
235
+ assertThat(chatRooms).hasSize(1)
236
+ assertThat(chatRooms[0].title).isEqualTo("새 채팅방")
237
+ }
238
+ }
239
+
240
+ @Nested
241
+ @DisplayName("TC-001-02: 채팅방 생성 - 빈 제목 오류")
242
+ inner class TC_001_02_EmptyTitle {
243
+
244
+ @Test
245
+ @DisplayName("빈 제목으로 채팅방 생성 시 400 Bad Request")
246
+ fun `POST api_chat-rooms with empty title - 400 Bad Request`() {
247
+ // Arrange
248
+ val token = createTestUserToken(userId = 1L)
249
+ val requestBody = """
250
+ {
251
+ "title": ""
252
+ }
253
+ """.trimIndent()
254
+
255
+ // Act & Assert
256
+ mockMvc.post("/api/chat-rooms") {
257
+ contentType = MediaType.APPLICATION_JSON
258
+ content = requestBody
259
+ header("Authorization", "Bearer $token")
260
+ }.andExpect {
261
+ status { isBadRequest() }
262
+ jsonPath("$.error") { exists() }
263
+ }
264
+ }
265
+ }
266
+
267
+ @Nested
268
+ @DisplayName("TC-001-03: 인증 없이 채팅방 생성 시도")
269
+ inner class TC_001_03_Unauthorized {
270
+
271
+ @Test
272
+ @DisplayName("인증 토큰 없이 채팅방 생성 시 401 Unauthorized")
273
+ fun `POST api_chat-rooms without token - 401 Unauthorized`() {
274
+ // Arrange
275
+ val requestBody = """
276
+ {
277
+ "title": "새 채팅방"
278
+ }
279
+ """.trimIndent()
280
+
281
+ // Act & Assert
282
+ mockMvc.post("/api/chat-rooms") {
283
+ contentType = MediaType.APPLICATION_JSON
284
+ content = requestBody
285
+ }.andExpect {
286
+ status { isUnauthorized() }
287
+ }
288
+ }
289
+ }
290
+
291
+ private fun createTestUserToken(userId: Long): String {
292
+ // 테스트용 JWT 토큰 생성
293
+ return "test-token-for-user-$userId"
294
+ }
295
+ }
296
+ ```
297
+
298
+ ---
299
+
300
+ ## 테스트 유형별 패턴
301
+
302
+ ### Integration Test (API 레벨)
303
+
304
+ ```kotlin
305
+ @SpringBootTest
306
+ @AutoConfigureMockMvc
307
+ @Transactional
308
+ class XxxAcceptanceTest {
309
+ @Autowired lateinit var mockMvc: MockMvc
310
+
311
+ @Nested
312
+ @DisplayName("TC-XXX-XX: 시나리오명")
313
+ inner class TC_XXX_XX { ... }
314
+ }
315
+ ```
316
+
317
+ ### E2E Test (전체 흐름)
318
+
319
+ ```kotlin
320
+ @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
321
+ @TestMethodOrder(MethodOrderer.OrderAnnotation::class)
322
+ class XxxE2ETest {
323
+ @Autowired lateinit var restTemplate: TestRestTemplate
324
+
325
+ @Test
326
+ @Order(1)
327
+ fun `Step 1: 사용자 생성`() { ... }
328
+
329
+ @Test
330
+ @Order(2)
331
+ fun `Step 2: 로그인`() { ... }
332
+
333
+ @Test
334
+ @Order(3)
335
+ fun `Step 3: 채팅방 생성`() { ... }
336
+ }
337
+ ```
338
+
339
+ ---
340
+
341
+ ## 생성 워크플로우
342
+
343
+ ### Step 1: TC 분석
344
+
345
+ ```
346
+ 1. TC 문서 읽기 (test-cases/STORY-XXX/*.md)
347
+ 2. TC index.md에서 전체 TC 목록 확인
348
+ 3. 각 TC의 유형 파악 (integration, e2e, etc.)
349
+ 4. 우선순위 확인 (high, medium, low)
350
+ ```
351
+
352
+ ### Step 2: 테스트 설계
353
+
354
+ ```
355
+ 1. 테스트 클래스 구조 결정
356
+ - TC별 @Nested 클래스
357
+ - @DisplayName으로 TC ID + 설명
358
+
359
+ 2. 테스트 메서드 도출
360
+ - 사전 조건 → Arrange
361
+ - 실행 단계 → Act
362
+ - 기대 결과 → Assert
363
+
364
+ 3. 테스트 데이터 준비
365
+ - Fixture 생성
366
+ - Mock 설정 (필요시)
367
+ ```
368
+
369
+ ### Step 3: 테스트 코드 생성
370
+
371
+ ```
372
+ 1. 패키지/클래스 구조 결정
373
+ - src/test/kotlin/com/example/integration/{domain}/
374
+ - src/test/kotlin/com/example/e2e/{feature}/
375
+
376
+ 2. 테스트 메서드 작성
377
+ - TC 문서의 검증 항목을 assertion으로 변환
378
+
379
+ 3. Helper 메서드 추가
380
+ - 테스트 데이터 생성
381
+ - 인증 토큰 생성 등
382
+ ```
383
+
384
+ ### Step 4: 파일 저장 및 실행
385
+
386
+ ```
387
+ 1. 테스트 파일 저장
388
+ 위치: src/test/kotlin/{패키지}/{Story}AcceptanceTest.kt
389
+
390
+ 2. 컴파일 확인 (실패 예상)
391
+ ./gradlew compileTestKotlin
392
+
393
+ 3. 테스트 실행 (실패 예상 - Red)
394
+ ./gradlew test --tests "*AcceptanceTest"
395
+ ```
396
+
397
+ ---
398
+
399
+ ## TC 유형별 테스트 매핑
400
+
401
+ | TC Type | 테스트 유형 | 어노테이션 |
402
+ |---------|------------|-----------|
403
+ | unit | Unit Test | @Test (unit-test-generator 담당) |
404
+ | integration | Integration Test | @SpringBootTest + @AutoConfigureMockMvc |
405
+ | e2e | E2E Test | @SpringBootTest(RANDOM_PORT) |
406
+ | api | API Test | @WebMvcTest 또는 @SpringBootTest |
407
+ | security | Security Test | @WithMockUser, @WithSecurityContext |
408
+ | performance | Performance Test | 별도 도구 (JMeter, Gatling) |
409
+
410
+ ---
411
+
412
+ ## 출력 파일 구조
413
+
414
+ ```
415
+ src/test/kotlin/com/example/
416
+ ├── integration/
417
+ │ └── chat/
418
+ │ ├── ChatRoomAcceptanceTest.kt ← Story 인수 테스트
419
+ │ └── MessageAcceptanceTest.kt
420
+ ├── e2e/
421
+ │ └── chat/
422
+ │ └── ChatFlowE2ETest.kt ← 전체 흐름 테스트
423
+ └── fixtures/
424
+ └── ChatTestFixtures.kt ← 테스트 데이터
425
+ ```
426
+
427
+ ---
428
+
429
+ ## 코딩 Agent에게 전달
430
+
431
+ ### 테스트 생성 후 메시지
432
+
433
+ ```markdown
434
+ ## 인수 테스트 생성 완료 (Story-Level Red Phase)
435
+
436
+ ### 생성된 테스트 파일
437
+ - `src/test/kotlin/com/example/integration/chat/ChatRoomAcceptanceTest.kt`
438
+
439
+ ### 테스트 실행 결과
440
+ ```bash
441
+ ./gradlew test --tests "*ChatRoomAcceptanceTest"
442
+ # 결과: FAILED (예상대로 실패 - 구현 필요)
443
+ ```
444
+
445
+ ### 검증 대상 TC
446
+ | TC ID | 설명 | 상태 |
447
+ |-------|------|------|
448
+ | TC-001-01 | 채팅방 생성 Happy Path | 🔴 Failed |
449
+ | TC-001-02 | 빈 제목 오류 | 🔴 Failed |
450
+ | TC-001-03 | 인증 없이 시도 | 🔴 Failed |
451
+
452
+ ### TDD 다음 단계
453
+ 1. Task들을 구현하세요 (각 Task는 unit-test-generator로 TDD)
454
+ 2. 모든 Task 완료 후 인수 테스트 재실행
455
+ 3. 모든 TC passed → Story close
456
+ ```
457
+
458
+ ---
459
+
460
+ ## 체크리스트
461
+
462
+ ### 테스트 생성 전
463
+ - [ ] TC 문서가 생성되었는가?
464
+ - [ ] TC index.md가 있는가?
465
+ - [ ] 각 TC의 사전 조건/기대 결과가 명확한가?
466
+
467
+ ### 테스트 생성 후
468
+ - [ ] 모든 TC가 테스트 메서드로 변환되었는가?
469
+ - [ ] @DisplayName에 TC ID가 포함되어 있는가?
470
+ - [ ] 사전 조건이 Arrange로 변환되었는가?
471
+ - [ ] 기대 결과가 Assert로 변환되었는가?
472
+ - [ ] 테스트가 컴파일되는가?
473
+
474
+ ### Story-Level TDD 확인
475
+ - [ ] TC 생성 직후 테스트가 작성되었는가?
476
+ - [ ] 테스트 실행 시 실패하는가? (Red)
477
+ - [ ] Task 구현 후 테스트가 통과하는가? (Green)
478
+
479
+ ---
480
+
481
+ ## Unit Test vs Acceptance Test
482
+
483
+ ```
484
+ ┌─────────────────────────────────────────────────────────────────────────────┐
485
+ │ TDD 2-Level 테스트 전략 │
486
+ ├─────────────────────────────────────────────────────────────────────────────┤
487
+ │ │
488
+ │ [Story Level] │
489
+ │ ┌─────────────────────────────────────────────────────────────────────┐ │
490
+ │ │ acceptance-test-generator (이 subagent) │ │
491
+ │ │ • TC 기반 Integration/E2E 테스트 │ │
492
+ │ │ • Story 완료 검증 │ │
493
+ │ │ • 전체 기능의 동작 확인 │ │
494
+ │ └─────────────────────────────────────────────────────────────────────┘ │
495
+ │ │
496
+ │ [Task Level] │
497
+ │ ┌─────────────────────────────────────────────────────────────────────┐ │
498
+ │ │ unit-test-generator │ │
499
+ │ │ • Task AC 기반 Unit Test │ │
500
+ │ │ • 개별 컴포넌트 검증 │ │
501
+ │ │ • Entity, Service, Repository 단위 테스트 │ │
502
+ │ └─────────────────────────────────────────────────────────────────────┘ │
503
+ │ │
504
+ │ 완료 조건: │
505
+ │ Story close = 모든 Task close + 모든 TC (인수 테스트) passed │
506
+ │ │
507
+ └─────────────────────────────────────────────────────────────────────────────┘
508
+ ```