timsquad 2.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 (181) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +347 -0
  3. package/bin/tsq.js +6 -0
  4. package/dist/commands/feedback.d.ts +3 -0
  5. package/dist/commands/feedback.d.ts.map +1 -0
  6. package/dist/commands/feedback.js +142 -0
  7. package/dist/commands/feedback.js.map +1 -0
  8. package/dist/commands/full.d.ts +3 -0
  9. package/dist/commands/full.d.ts.map +1 -0
  10. package/dist/commands/full.js +87 -0
  11. package/dist/commands/full.js.map +1 -0
  12. package/dist/commands/git/commit.d.ts +3 -0
  13. package/dist/commands/git/commit.d.ts.map +1 -0
  14. package/dist/commands/git/commit.js +88 -0
  15. package/dist/commands/git/commit.js.map +1 -0
  16. package/dist/commands/git/index.d.ts +5 -0
  17. package/dist/commands/git/index.d.ts.map +1 -0
  18. package/dist/commands/git/index.js +5 -0
  19. package/dist/commands/git/index.js.map +1 -0
  20. package/dist/commands/git/pr.d.ts +3 -0
  21. package/dist/commands/git/pr.d.ts.map +1 -0
  22. package/dist/commands/git/pr.js +138 -0
  23. package/dist/commands/git/pr.js.map +1 -0
  24. package/dist/commands/git/release.d.ts +3 -0
  25. package/dist/commands/git/release.d.ts.map +1 -0
  26. package/dist/commands/git/release.js +158 -0
  27. package/dist/commands/git/release.js.map +1 -0
  28. package/dist/commands/git/sync.d.ts +3 -0
  29. package/dist/commands/git/sync.d.ts.map +1 -0
  30. package/dist/commands/git/sync.js +132 -0
  31. package/dist/commands/git/sync.js.map +1 -0
  32. package/dist/commands/init.d.ts +3 -0
  33. package/dist/commands/init.d.ts.map +1 -0
  34. package/dist/commands/init.js +150 -0
  35. package/dist/commands/init.js.map +1 -0
  36. package/dist/commands/log.d.ts +3 -0
  37. package/dist/commands/log.d.ts.map +1 -0
  38. package/dist/commands/log.js +271 -0
  39. package/dist/commands/log.js.map +1 -0
  40. package/dist/commands/metrics.d.ts +3 -0
  41. package/dist/commands/metrics.d.ts.map +1 -0
  42. package/dist/commands/metrics.js +299 -0
  43. package/dist/commands/metrics.js.map +1 -0
  44. package/dist/commands/quick.d.ts +3 -0
  45. package/dist/commands/quick.d.ts.map +1 -0
  46. package/dist/commands/quick.js +136 -0
  47. package/dist/commands/quick.js.map +1 -0
  48. package/dist/commands/retro.d.ts +3 -0
  49. package/dist/commands/retro.d.ts.map +1 -0
  50. package/dist/commands/retro.js +280 -0
  51. package/dist/commands/retro.js.map +1 -0
  52. package/dist/commands/status.d.ts +3 -0
  53. package/dist/commands/status.d.ts.map +1 -0
  54. package/dist/commands/status.js +127 -0
  55. package/dist/commands/status.js.map +1 -0
  56. package/dist/commands/watch.d.ts +3 -0
  57. package/dist/commands/watch.d.ts.map +1 -0
  58. package/dist/commands/watch.js +213 -0
  59. package/dist/commands/watch.js.map +1 -0
  60. package/dist/index.d.ts +3 -0
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/index.js +50 -0
  63. package/dist/index.js.map +1 -0
  64. package/dist/lib/config.d.ts +34 -0
  65. package/dist/lib/config.d.ts.map +1 -0
  66. package/dist/lib/config.js +108 -0
  67. package/dist/lib/config.js.map +1 -0
  68. package/dist/lib/project.d.ts +47 -0
  69. package/dist/lib/project.d.ts.map +1 -0
  70. package/dist/lib/project.js +191 -0
  71. package/dist/lib/project.js.map +1 -0
  72. package/dist/lib/template.d.ts +33 -0
  73. package/dist/lib/template.d.ts.map +1 -0
  74. package/dist/lib/template.js +151 -0
  75. package/dist/lib/template.js.map +1 -0
  76. package/dist/types/config.d.ts +75 -0
  77. package/dist/types/config.d.ts.map +1 -0
  78. package/dist/types/config.js +66 -0
  79. package/dist/types/config.js.map +1 -0
  80. package/dist/types/feedback.d.ts +59 -0
  81. package/dist/types/feedback.d.ts.map +1 -0
  82. package/dist/types/feedback.js +26 -0
  83. package/dist/types/feedback.js.map +1 -0
  84. package/dist/types/index.d.ts +4 -0
  85. package/dist/types/index.d.ts.map +1 -0
  86. package/dist/types/index.js +5 -0
  87. package/dist/types/index.js.map +1 -0
  88. package/dist/types/project.d.ts +89 -0
  89. package/dist/types/project.d.ts.map +1 -0
  90. package/dist/types/project.js +44 -0
  91. package/dist/types/project.js.map +1 -0
  92. package/dist/utils/colors.d.ts +30 -0
  93. package/dist/utils/colors.d.ts.map +1 -0
  94. package/dist/utils/colors.js +54 -0
  95. package/dist/utils/colors.js.map +1 -0
  96. package/dist/utils/date.d.ts +25 -0
  97. package/dist/utils/date.d.ts.map +1 -0
  98. package/dist/utils/date.js +65 -0
  99. package/dist/utils/date.js.map +1 -0
  100. package/dist/utils/fs.d.ts +49 -0
  101. package/dist/utils/fs.d.ts.map +1 -0
  102. package/dist/utils/fs.js +84 -0
  103. package/dist/utils/fs.js.map +1 -0
  104. package/dist/utils/prompts.d.ts +31 -0
  105. package/dist/utils/prompts.d.ts.map +1 -0
  106. package/dist/utils/prompts.js +95 -0
  107. package/dist/utils/prompts.js.map +1 -0
  108. package/dist/utils/yaml.d.ts +21 -0
  109. package/dist/utils/yaml.d.ts.map +1 -0
  110. package/dist/utils/yaml.js +40 -0
  111. package/dist/utils/yaml.js.map +1 -0
  112. package/package.json +71 -0
  113. package/templates/common/CLAUDE.md.template +254 -0
  114. package/templates/common/claude/agents/tsq-dba.md +290 -0
  115. package/templates/common/claude/agents/tsq-designer.md +304 -0
  116. package/templates/common/claude/agents/tsq-developer.md +118 -0
  117. package/templates/common/claude/agents/tsq-planner.md +90 -0
  118. package/templates/common/claude/agents/tsq-prompter.md +336 -0
  119. package/templates/common/claude/agents/tsq-qa.md +134 -0
  120. package/templates/common/claude/agents/tsq-retro.md +168 -0
  121. package/templates/common/claude/agents/tsq-security.md +190 -0
  122. package/templates/common/claude/skills/architecture/SKILL.md +123 -0
  123. package/templates/common/claude/skills/backend/node/SKILL.md +1015 -0
  124. package/templates/common/claude/skills/coding/SKILL.md +171 -0
  125. package/templates/common/claude/skills/database/prisma/SKILL.md +357 -0
  126. package/templates/common/claude/skills/frontend/nextjs/SKILL.md +279 -0
  127. package/templates/common/claude/skills/frontend/react/SKILL.md +1729 -0
  128. package/templates/common/claude/skills/methodology/bdd/SKILL.md +234 -0
  129. package/templates/common/claude/skills/methodology/ddd/SKILL.md +311 -0
  130. package/templates/common/claude/skills/methodology/tdd/SKILL.md +512 -0
  131. package/templates/common/claude/skills/planning/SKILL.md +90 -0
  132. package/templates/common/claude/skills/security/SKILL.md +234 -0
  133. package/templates/common/claude/skills/testing/SKILL.md +146 -0
  134. package/templates/common/claude/skills/typescript/SKILL.md +435 -0
  135. package/templates/common/config.template.yaml +131 -0
  136. package/templates/common/timsquad/architectures/clean/ARCHITECTURE.md +49 -0
  137. package/templates/common/timsquad/architectures/clean/backend.xml +210 -0
  138. package/templates/common/timsquad/architectures/clean/frontend.xml +148 -0
  139. package/templates/common/timsquad/architectures/fsd/ARCHITECTURE.md +67 -0
  140. package/templates/common/timsquad/architectures/fsd/frontend.xml +288 -0
  141. package/templates/common/timsquad/architectures/hexagonal/ARCHITECTURE.md +60 -0
  142. package/templates/common/timsquad/architectures/hexagonal/backend.xml +300 -0
  143. package/templates/common/timsquad/constraints/competency-framework.xml +501 -0
  144. package/templates/common/timsquad/constraints/ssot-schema.xml +433 -0
  145. package/templates/common/timsquad/feedback/feedback-router.sh +341 -0
  146. package/templates/common/timsquad/feedback/routing-rules.yaml +352 -0
  147. package/templates/common/timsquad/generators/data-design.xml +290 -0
  148. package/templates/common/timsquad/generators/prd.xml +280 -0
  149. package/templates/common/timsquad/generators/requirements.xml +220 -0
  150. package/templates/common/timsquad/generators/service-spec.xml +266 -0
  151. package/templates/common/timsquad/logs/_example.md +81 -0
  152. package/templates/common/timsquad/logs/_template.md +46 -0
  153. package/templates/common/timsquad/patterns/cqrs.xml +127 -0
  154. package/templates/common/timsquad/patterns/event-sourcing.xml +85 -0
  155. package/templates/common/timsquad/patterns/repository.xml +64 -0
  156. package/templates/common/timsquad/process/state-machine.xml +343 -0
  157. package/templates/common/timsquad/process/validation-rules.xml +308 -0
  158. package/templates/common/timsquad/process/workflow-base.xml +202 -0
  159. package/templates/common/timsquad/retrospective/cycle-report.template.md +205 -0
  160. package/templates/common/timsquad/retrospective/metrics/metrics-schema.json +203 -0
  161. package/templates/common/timsquad/retrospective/patterns/failure-patterns.md +199 -0
  162. package/templates/common/timsquad/retrospective/patterns/success-patterns.md +262 -0
  163. package/templates/common/timsquad/retrospective/retrospective-config.xml +294 -0
  164. package/templates/common/timsquad/retrospective/retrospective-state.xml +210 -0
  165. package/templates/common/timsquad/ssot/adr/ADR-000-template.md +121 -0
  166. package/templates/common/timsquad/ssot/adr/ADR-001-example.md +115 -0
  167. package/templates/common/timsquad/ssot/data-design.template.md +132 -0
  168. package/templates/common/timsquad/ssot/deployment-spec.template.md +384 -0
  169. package/templates/common/timsquad/ssot/env-config.template.md +346 -0
  170. package/templates/common/timsquad/ssot/error-codes.template.md +114 -0
  171. package/templates/common/timsquad/ssot/functional-spec.template.md +185 -0
  172. package/templates/common/timsquad/ssot/glossary.template.md +148 -0
  173. package/templates/common/timsquad/ssot/integration-spec.template.md +391 -0
  174. package/templates/common/timsquad/ssot/planning.template.md +94 -0
  175. package/templates/common/timsquad/ssot/prd.template.md +102 -0
  176. package/templates/common/timsquad/ssot/requirements.template.md +117 -0
  177. package/templates/common/timsquad/ssot/security-spec.template.md +309 -0
  178. package/templates/common/timsquad/ssot/service-spec.template.md +194 -0
  179. package/templates/common/timsquad/ssot/test-spec.template.md +264 -0
  180. package/templates/common/timsquad/ssot/ui-ux-spec.template.md +262 -0
  181. package/templates/common/timsquad/state/workspace.xml +217 -0
@@ -0,0 +1,308 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <validation-rules>
3
+ <metadata>
4
+ <description>TimSquad 작업 검증 규칙</description>
5
+ <version>1.0</version>
6
+ </metadata>
7
+
8
+ <!-- ============================================================
9
+ 시스템 검증 (모든 작업 전 필수)
10
+ ============================================================ -->
11
+ <system-validation>
12
+ <rule id="SYS-001" severity="critical">
13
+ <name>TimSquad 초기화 확인</name>
14
+ <check>`.timsquad/` 디렉토리 존재</check>
15
+ <error-message>
16
+ TimSquad 프로젝트가 아닙니다.
17
+ 먼저 `tsq init --type {type}`을 실행하세요.
18
+ </error-message>
19
+ <action-on-fail>block</action-on-fail>
20
+ </rule>
21
+
22
+ <rule id="SYS-002" severity="critical">
23
+ <name>설정 파일 확인</name>
24
+ <check>`.timsquad/config.yaml` 존재 및 유효</check>
25
+ <error-message>설정 파일이 없거나 손상되었습니다.</error-message>
26
+ <action-on-fail>block</action-on-fail>
27
+ </rule>
28
+
29
+ <rule id="SYS-003" severity="warning">
30
+ <name>현재 Phase 확인</name>
31
+ <check>`.timsquad/state/current-phase.json` 존재</check>
32
+ <error-message>Phase 상태를 확인할 수 없습니다. planning으로 초기화합니다.</error-message>
33
+ <action-on-fail>initialize</action-on-fail>
34
+ <default-value>planning</default-value>
35
+ </rule>
36
+ </system-validation>
37
+
38
+ <!-- ============================================================
39
+ Phase별 Pre-condition
40
+ ============================================================ -->
41
+ <phase-preconditions>
42
+ <!-- Planning Phase -->
43
+ <phase id="planning">
44
+ <precondition id="PLAN-PRE-001" severity="info">
45
+ <name>기존 SSOT 확인</name>
46
+ <check>`.timsquad/ssot/` 디렉토리 내용 확인</check>
47
+ <description>기존 문서가 있으면 읽고 컨텍스트 파악</description>
48
+ </precondition>
49
+ </phase>
50
+
51
+ <!-- Implementation Phase -->
52
+ <phase id="implementation">
53
+ <precondition id="IMPL-PRE-001" severity="critical">
54
+ <name>필수 SSOT 존재</name>
55
+ <check>
56
+ <file required="true">.timsquad/ssot/prd.md</file>
57
+ <file required="true">.timsquad/ssot/requirements.md</file>
58
+ <file required="true">.timsquad/ssot/service-spec.md</file>
59
+ </check>
60
+ <error-message>
61
+ 구현에 필요한 SSOT 문서가 없습니다.
62
+ Planning Phase를 먼저 완료하세요.
63
+ </error-message>
64
+ <action-on-fail>block</action-on-fail>
65
+ <route-to>tsq-planner</route-to>
66
+ </precondition>
67
+
68
+ <precondition id="IMPL-PRE-002" severity="critical">
69
+ <name>SSOT 문서 읽기</name>
70
+ <check>에이전트가 SSOT 문서를 읽었는지 확인</check>
71
+ <instruction>
72
+ 작업 시작 전 반드시 다음 문서를 읽으세요:
73
+ 1. .timsquad/ssot/service-spec.md (API 명세)
74
+ 2. .timsquad/ssot/data-design.md (데이터 설계)
75
+ 3. .timsquad/ssot/error-codes.md (에러 코드)
76
+ </instruction>
77
+ <action-on-fail>warn-and-continue</action-on-fail>
78
+ </precondition>
79
+
80
+ <precondition id="IMPL-PRE-003" severity="warning">
81
+ <name>스킬 파일 로드</name>
82
+ <check>mandatory-skills 섹션의 스킬 파일 로드</check>
83
+ <instruction>에이전트 정의의 mandatory-skills를 읽고 적용</instruction>
84
+ </precondition>
85
+ </phase>
86
+
87
+ <!-- Review Phase -->
88
+ <phase id="review">
89
+ <precondition id="REV-PRE-001" severity="critical">
90
+ <name>구현 완료 확인</name>
91
+ <check>Implementation Phase의 exit-criteria 충족</check>
92
+ <required-criteria>
93
+ <criterion>테스트 통과</criterion>
94
+ <criterion>린트/타입 에러 없음</criterion>
95
+ <criterion>작업 로그 기록</criterion>
96
+ </required-criteria>
97
+ <action-on-fail>block</action-on-fail>
98
+ <route-to>tsq-developer</route-to>
99
+ </precondition>
100
+ </phase>
101
+
102
+ <!-- Security Phase -->
103
+ <phase id="security">
104
+ <precondition id="SEC-PRE-001" severity="critical">
105
+ <name>Review 통과</name>
106
+ <check>Review Phase의 exit-criteria 충족</check>
107
+ <action-on-fail>block</action-on-fail>
108
+ <route-to>tsq-qa</route-to>
109
+ </precondition>
110
+
111
+ <precondition id="SEC-PRE-002" severity="warning">
112
+ <name>보안 명세 확인</name>
113
+ <check>.timsquad/ssot/security-spec.md 존재 (있는 경우)</check>
114
+ <description>보안 명세가 있으면 참조</description>
115
+ </precondition>
116
+ </phase>
117
+ </phase-preconditions>
118
+
119
+ <!-- ============================================================
120
+ 에이전트별 Pre-condition
121
+ ============================================================ -->
122
+ <agent-preconditions>
123
+ <agent id="tsq-planner">
124
+ <precondition id="PLN-PRE-001">
125
+ <name>기존 결정 확인</name>
126
+ <check>.timsquad/ssot/adr/ 디렉토리 확인</check>
127
+ <instruction>기존 ADR이 있으면 읽고 일관성 유지</instruction>
128
+ </precondition>
129
+
130
+ <precondition id="PLN-PRE-002">
131
+ <name>프로젝트 지식 확인</name>
132
+ <check>.timsquad/knowledge/ 디렉토리 확인</check>
133
+ <instruction>
134
+ 다음 파일이 있으면 읽고 컨텍스트 파악:
135
+ - tribal.md (팀 컨벤션)
136
+ - lessons.md (과거 교훈)
137
+ - constraints.md (제약사항)
138
+ </instruction>
139
+ </precondition>
140
+ </agent>
141
+
142
+ <agent id="tsq-developer">
143
+ <precondition id="DEV-PRE-001" severity="critical">
144
+ <name>SSOT 참조 필수</name>
145
+ <instruction>
146
+ 코드 작성 전 반드시 확인:
147
+ 1. service-spec.md의 API 명세
148
+ 2. data-design.md의 데이터 모델
149
+ 3. error-codes.md의 에러 코드
150
+
151
+ SSOT와 다르게 구현하면 즉시 중단하고 tsq-planner에게 보고
152
+ </instruction>
153
+ </precondition>
154
+ </agent>
155
+
156
+ <agent id="tsq-qa">
157
+ <precondition id="QA-PRE-001" severity="critical">
158
+ <name>검증 기준 확인</name>
159
+ <instruction>
160
+ 검증 전 반드시 확인:
161
+ 1. service-spec.md (API 일치 여부)
162
+ 2. test-spec.md (테스트 기준, 있는 경우)
163
+ 3. security-spec.md (보안 기준, 있는 경우)
164
+ </instruction>
165
+ </precondition>
166
+ </agent>
167
+
168
+ <agent id="tsq-security">
169
+ <precondition id="SEC-PRE-001" severity="critical">
170
+ <name>보안 체크리스트 로드</name>
171
+ <instruction>
172
+ skills/security/SKILL.md의 체크리스트 로드 필수
173
+ </instruction>
174
+ </precondition>
175
+ </agent>
176
+ </agent-preconditions>
177
+
178
+ <!-- ============================================================
179
+ Post-condition (작업 후 검증)
180
+ ============================================================ -->
181
+ <post-conditions>
182
+ <!-- 공통 -->
183
+ <condition id="POST-001" applies-to="all" severity="critical">
184
+ <name>작업 로그 기록</name>
185
+ <check>.timsquad/logs/ 에 로그 기록</check>
186
+ <template>
187
+ ## {timestamp} | {agent} | {task_title}
188
+ ### What (작업 내용)
189
+ ### Why (작업 이유)
190
+ ### Changes (변경 파일)
191
+ ### Result (결과)
192
+ </template>
193
+ <error-message>로그 없이 작업 완료 불가</error-message>
194
+ <action-on-fail>block-completion</action-on-fail>
195
+ </condition>
196
+
197
+ <!-- Planner -->
198
+ <condition id="POST-PLN-001" applies-to="tsq-planner" severity="critical">
199
+ <name>SSOT 문서 생성/수정</name>
200
+ <check>SSOT 파일 생성 또는 수정됨</check>
201
+ <validation>
202
+ <rule>필수 섹션 존재 (ssot-schema.xml 참조)</rule>
203
+ <rule>버전 정보 업데이트</rule>
204
+ </validation>
205
+ </condition>
206
+
207
+ <condition id="POST-PLN-002" applies-to="tsq-planner">
208
+ <name>주요 결정 ADR 기록</name>
209
+ <check>아키텍처/설계 결정 시 ADR 생성</check>
210
+ <triggers>
211
+ <trigger>기술 스택 선택</trigger>
212
+ <trigger>아키텍처 패턴 선택</trigger>
213
+ <trigger>데이터베이스 설계</trigger>
214
+ <trigger>인증/인가 방식</trigger>
215
+ </triggers>
216
+ </condition>
217
+
218
+ <!-- Developer -->
219
+ <condition id="POST-DEV-001" applies-to="tsq-developer" severity="critical">
220
+ <name>테스트 작성</name>
221
+ <check>구현 코드에 대한 테스트 존재</check>
222
+ <criteria>
223
+ <criterion>단위 테스트 작성</criterion>
224
+ <criterion>테스트 통과</criterion>
225
+ </criteria>
226
+ <error-message>테스트 없이 구현 완료 불가</error-message>
227
+ </condition>
228
+
229
+ <condition id="POST-DEV-002" applies-to="tsq-developer" severity="critical">
230
+ <name>SSOT 일치 확인</name>
231
+ <check>구현이 SSOT와 일치</check>
232
+ <validation>
233
+ <rule>API 엔드포인트 일치 (service-spec.md)</rule>
234
+ <rule>데이터 모델 일치 (data-design.md)</rule>
235
+ <rule>에러 코드 일치 (error-codes.md)</rule>
236
+ </validation>
237
+ <on-mismatch>
238
+ <action>작업 중단</action>
239
+ <route-to>tsq-planner</route-to>
240
+ <report>SSOT 불일치 내용 보고</report>
241
+ </on-mismatch>
242
+ </condition>
243
+
244
+ <condition id="POST-DEV-003" applies-to="tsq-developer" severity="warning">
245
+ <name>코드 품질</name>
246
+ <check>린트/타입 에러 없음</check>
247
+ <commands>
248
+ <command>npm run lint</command>
249
+ <command>npm run type-check</command>
250
+ </commands>
251
+ </condition>
252
+
253
+ <!-- QA -->
254
+ <condition id="POST-QA-001" applies-to="tsq-qa" severity="critical">
255
+ <name>피드백 레벨 분류</name>
256
+ <check>모든 피드백에 레벨(1/2/3) 지정</check>
257
+ <error-message>레벨 분류 없이 피드백 불가</error-message>
258
+ </condition>
259
+
260
+ <condition id="POST-QA-002" applies-to="tsq-qa" severity="critical">
261
+ <name>리포트 형식</name>
262
+ <check>정해진 리포트 형식 준수</check>
263
+ <template-ref>agents/tsq-qa.md#report-format</template-ref>
264
+ </condition>
265
+
266
+ <!-- Security -->
267
+ <condition id="POST-SEC-001" applies-to="tsq-security" severity="critical">
268
+ <name>취약점 심각도 분류</name>
269
+ <check>모든 발견 사항에 심각도 지정</check>
270
+ <levels>Critical, High, Medium, Low</levels>
271
+ </condition>
272
+
273
+ <condition id="POST-SEC-002" applies-to="tsq-security" severity="critical">
274
+ <name>OWASP/CWE 참조</name>
275
+ <check>취약점에 OWASP/CWE 번호 포함</check>
276
+ </condition>
277
+ </post-conditions>
278
+
279
+ <!-- ============================================================
280
+ Invariant (항상 유지해야 하는 규칙)
281
+ ============================================================ -->
282
+ <invariants>
283
+ <invariant id="INV-001" severity="critical">
284
+ <name>SSOT는 진실의 원천</name>
285
+ <rule>SSOT 문서와 구현이 항상 일치해야 함</rule>
286
+ <on-violation>
287
+ <action>작업 중단</action>
288
+ <report>불일치 내용을 tsq-planner에게 보고</report>
289
+ </on-violation>
290
+ </invariant>
291
+
292
+ <invariant id="INV-002" severity="critical">
293
+ <name>에이전트 간 직접 통신 금지</name>
294
+ <rule>모든 에스컬레이션은 명시적 라우팅 규칙을 따름</rule>
295
+ </invariant>
296
+
297
+ <invariant id="INV-003" severity="critical">
298
+ <name>User 승인 지점 준수</name>
299
+ <rule>Level 3 피드백, Critical 보안 이슈는 User 승인 필수</rule>
300
+ </invariant>
301
+
302
+ <invariant id="INV-004" severity="warning">
303
+ <name>로그 기록 필수</name>
304
+ <rule>모든 작업은 로그 기록이 필수</rule>
305
+ <exception>단순 조회, 질문 응답</exception>
306
+ </invariant>
307
+ </invariants>
308
+ </validation-rules>
@@ -0,0 +1,202 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <workflow-definitions>
3
+ <metadata>
4
+ <description>TimSquad 기본 워크플로우 정의</description>
5
+ <version>1.0</version>
6
+ </metadata>
7
+
8
+ <!-- 공통 Phase 정의 -->
9
+ <phases>
10
+ <phase id="planning" name="기획/설계">
11
+ <primary-agent>tsq-planner</primary-agent>
12
+ <description>요구사항 분석, SSOT 문서 작성, 아키텍처 설계</description>
13
+
14
+ <tasks>
15
+ <task id="analyze">요구사항 분석</task>
16
+ <task id="ssot">SSOT 문서 작성 (prd, requirements, service-spec, data-design)</task>
17
+ <task id="adr">아키텍처 결정 기록 (ADR)</task>
18
+ </tasks>
19
+
20
+ <methodology-tasks>
21
+ <task methodology="ddd">Bounded Context 정의, 용어 사전 작성</task>
22
+ <task methodology="bdd">Feature 시나리오 작성 (Gherkin)</task>
23
+ </methodology-tasks>
24
+
25
+ <mandatory-outputs>
26
+ <output>ssot/prd.md</output>
27
+ <output>ssot/requirements.md</output>
28
+ <output>ssot/service-spec.md</output>
29
+ </mandatory-outputs>
30
+
31
+ <exit-criteria>
32
+ <criterion>필수 SSOT 문서 완성</criterion>
33
+ <criterion>User 승인</criterion>
34
+ </exit-criteria>
35
+ </phase>
36
+
37
+ <phase id="implementation" name="구현">
38
+ <primary-agent>tsq-developer</primary-agent>
39
+ <description>SSOT 기반 코드 구현, 테스트 작성</description>
40
+
41
+ <pre-conditions>
42
+ <condition required="true">SSOT 문서 확인</condition>
43
+ <condition required="true">스킬 파일 로드</condition>
44
+ <condition required="true">아키텍처 파일 참조</condition>
45
+ </pre-conditions>
46
+
47
+ <tasks>
48
+ <task id="read-ssot">SSOT 문서 읽기 및 요약</task>
49
+ <task id="plan">구현 계획 수립</task>
50
+ <task id="implement">코드 구현</task>
51
+ <task id="test">테스트 작성</task>
52
+ <task id="log">작업 로그 기록</task>
53
+ </tasks>
54
+
55
+ <methodology-tasks>
56
+ <task methodology="tdd" order="before-implement">테스트 먼저 작성</task>
57
+ <task methodology="bdd" order="before-implement">Step Definition 작성</task>
58
+ </methodology-tasks>
59
+
60
+ <escalation-rules>
61
+ <rule trigger="SSOT 불일치" route="tsq-planner" action="작업 중단">
62
+ SSOT와 요구사항이 맞지 않으면 즉시 중단하고 Planner에게 보고
63
+ </rule>
64
+ <rule trigger="요구사항 불명확" route="User" action="질문">
65
+ 불명확한 부분은 User에게 직접 질문
66
+ </rule>
67
+ <rule trigger="보안 우려" route="tsq-security" action="검토 요청">
68
+ 보안 관련 우려 발견 시 Security에게 검토 요청
69
+ </rule>
70
+ </escalation-rules>
71
+
72
+ <exit-criteria>
73
+ <criterion>테스트 통과 (커버리지 80% 이상)</criterion>
74
+ <criterion>린트/타입 에러 없음</criterion>
75
+ <criterion>작업 로그 작성 완료</criterion>
76
+ </exit-criteria>
77
+ </phase>
78
+
79
+ <phase id="review" name="검증">
80
+ <primary-agent>tsq-qa</primary-agent>
81
+ <description>코드 리뷰, 테스트 검증, SSOT 일치 확인</description>
82
+
83
+ <tasks>
84
+ <task id="code-review">코드 리뷰</task>
85
+ <task id="test-verify">테스트 커버리지 검증</task>
86
+ <task id="ssot-check">SSOT 일치 확인</task>
87
+ <task id="basic-security">기본 보안 체크</task>
88
+ </tasks>
89
+
90
+ <feedback-routing>
91
+ <level id="1" severity="Minor,Major" route="tsq-developer">
92
+ <triggers>코드 스타일, 테스트 누락, 린트 오류, 타입 에러</triggers>
93
+ <action>Developer에게 수정 요청</action>
94
+ <return-to-phase>implementation</return-to-phase>
95
+ </level>
96
+ <level id="2" severity="Major" route="tsq-planner">
97
+ <triggers>API 명세 불일치, 데이터 모델 불일치, 설계 문제</triggers>
98
+ <action>Planner에게 SSOT 수정 요청</action>
99
+ <return-to-phase>planning</return-to-phase>
100
+ </level>
101
+ <level id="3" severity="Critical" route="User">
102
+ <triggers>요구사항 오류, 비즈니스 로직 문제, 스코프 변경</triggers>
103
+ <action>User 승인 필요</action>
104
+ <requires-approval>true</requires-approval>
105
+ <return-to-phase>planning</return-to-phase>
106
+ </level>
107
+ </feedback-routing>
108
+
109
+ <exit-criteria>
110
+ <criterion>모든 체크리스트 통과</criterion>
111
+ <criterion>Critical/Major 이슈 해결됨</criterion>
112
+ </exit-criteria>
113
+ </phase>
114
+
115
+ <phase id="security" name="보안 검토">
116
+ <primary-agent>tsq-security</primary-agent>
117
+ <description>보안 취약점 분석, 컴플라이언스 체크</description>
118
+
119
+ <tasks>
120
+ <task id="owasp">OWASP Top 10 체크</task>
121
+ <task id="secrets">시크릿 노출 검사</task>
122
+ <task id="deps">의존성 취약점 검사</task>
123
+ <task id="auth">인증/인가 검토</task>
124
+ </tasks>
125
+
126
+ <feedback-routing>
127
+ <level id="1" severity="Low,Medium" route="tsq-developer">
128
+ <triggers>코드 수준 보안 이슈</triggers>
129
+ </level>
130
+ <level id="2" severity="High" route="tsq-planner">
131
+ <triggers>설계 수준 보안 이슈</triggers>
132
+ </level>
133
+ <level id="3" severity="Critical" route="User">
134
+ <triggers>심각한 취약점, 컴플라이언스 위반</triggers>
135
+ <action>즉시 알림, 배포 중단</action>
136
+ <requires-approval>true</requires-approval>
137
+ </level>
138
+ </feedback-routing>
139
+
140
+ <exit-criteria>
141
+ <criterion>Critical 취약점 없음</criterion>
142
+ <criterion>High 취약점 해결됨</criterion>
143
+ </exit-criteria>
144
+ </phase>
145
+
146
+ <phase id="complete" name="완료">
147
+ <tasks>
148
+ <task id="final-log">최종 로그 정리</task>
149
+ <task id="retrospective" optional="true">회고 데이터 수집</task>
150
+ </tasks>
151
+ </phase>
152
+ </phases>
153
+
154
+ <!-- 공통 규칙 -->
155
+ <global-rules>
156
+ <rule id="no-direct-communication">
157
+ 에이전트 간 직접 통신 금지. 모든 에스컬레이션은 명시적 라우팅 규칙 따름.
158
+ </rule>
159
+ <rule id="user-can-intervene">
160
+ User는 어느 Phase에서든 개입 가능
161
+ </rule>
162
+ <rule id="phase-regression">
163
+ Phase 회귀 시 해당 Phase부터 재시작
164
+ </rule>
165
+ <rule id="mandatory-logging">
166
+ 모든 작업은 로그 기록 필수. 미기록 시 작업 미완료로 간주.
167
+ </rule>
168
+ </global-rules>
169
+
170
+ <!-- User 승인 필요 지점 -->
171
+ <user-checkpoints>
172
+ <checkpoint phase="planning" event="SSOT 완료">User 승인 필요</checkpoint>
173
+ <checkpoint phase="review" event="Level 3 피드백">User 승인 필요</checkpoint>
174
+ <checkpoint phase="security" event="Critical 발견">User 즉시 알림</checkpoint>
175
+ </user-checkpoints>
176
+
177
+ <!-- 로그 템플릿 -->
178
+ <log-template>
179
+ <![CDATA[
180
+ ## {timestamp} | {agent} | {task_title}
181
+
182
+ ### What (작업 내용)
183
+ {task_description}
184
+
185
+ ### Why (작업 이유)
186
+ {reason}
187
+ - 관련 ADR: {adr_link}
188
+
189
+ ### Reference (참조)
190
+ - SSOT: {ssot_files}
191
+ - 외부: {external_refs}
192
+
193
+ ### Changes (변경 파일)
194
+ {changed_files}
195
+
196
+ ### Result (결과)
197
+ {success|failure}
198
+ - 테스트: {test_result}
199
+ - 비고: {notes}
200
+ ]]>
201
+ </log-template>
202
+ </workflow-definitions>