timsquad 2.0.0 → 2.1.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 (56) hide show
  1. package/README.md +688 -154
  2. package/dist/commands/feedback.d.ts.map +1 -1
  3. package/dist/commands/feedback.js +21 -2
  4. package/dist/commands/feedback.js.map +1 -1
  5. package/dist/commands/git/commit.d.ts.map +1 -1
  6. package/dist/commands/git/commit.js +1 -4
  7. package/dist/commands/git/commit.js.map +1 -1
  8. package/dist/commands/improve.d.ts +3 -0
  9. package/dist/commands/improve.d.ts.map +1 -0
  10. package/dist/commands/improve.js +286 -0
  11. package/dist/commands/improve.js.map +1 -0
  12. package/dist/commands/init.js +3 -2
  13. package/dist/commands/init.js.map +1 -1
  14. package/dist/commands/log.d.ts.map +1 -1
  15. package/dist/commands/log.js +202 -2
  16. package/dist/commands/log.js.map +1 -1
  17. package/dist/commands/metrics.d.ts.map +1 -1
  18. package/dist/commands/metrics.js +404 -99
  19. package/dist/commands/metrics.js.map +1 -1
  20. package/dist/commands/retro.d.ts.map +1 -1
  21. package/dist/commands/retro.js +454 -54
  22. package/dist/commands/retro.js.map +1 -1
  23. package/dist/commands/session.d.ts +3 -0
  24. package/dist/commands/session.d.ts.map +1 -0
  25. package/dist/commands/session.js +346 -0
  26. package/dist/commands/session.js.map +1 -0
  27. package/dist/index.js +4 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/lib/template.d.ts.map +1 -1
  30. package/dist/lib/template.js +66 -1
  31. package/dist/lib/template.js.map +1 -1
  32. package/dist/types/feedback.d.ts +52 -1
  33. package/dist/types/feedback.d.ts.map +1 -1
  34. package/dist/types/feedback.js +0 -3
  35. package/dist/types/feedback.js.map +1 -1
  36. package/dist/types/project.d.ts +1 -1
  37. package/dist/types/project.d.ts.map +1 -1
  38. package/dist/types/project.js +3 -1
  39. package/dist/types/project.js.map +1 -1
  40. package/package.json +1 -1
  41. package/templates/common/claude/agents/tsq-dba.md +21 -0
  42. package/templates/common/claude/agents/tsq-designer.md +19 -0
  43. package/templates/common/claude/agents/tsq-developer.md +59 -0
  44. package/templates/common/claude/agents/tsq-planner.md +101 -1
  45. package/templates/common/claude/agents/tsq-prompter.md +20 -0
  46. package/templates/common/claude/agents/tsq-qa.md +38 -4
  47. package/templates/common/claude/agents/tsq-retro.md +25 -0
  48. package/templates/common/claude/agents/tsq-security.md +31 -0
  49. package/templates/common/claude/hooks/auto-metrics.sh +165 -0
  50. package/templates/common/claude/hooks/auto-worklog.sh +245 -0
  51. package/templates/common/claude/hooks/event-logger.sh +208 -0
  52. package/templates/common/claude/settings.json +86 -0
  53. package/templates/common/config.template.yaml +2 -1
  54. package/templates/common/timsquad/process/phase-checklist.yaml +174 -0
  55. package/templates/common/timsquad/process/state-machine.xml +12 -0
  56. package/templates/common/timsquad/process/workflow-base.xml +124 -0
@@ -0,0 +1,86 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/event-logger.sh\"",
9
+ "timeout": 5
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "PostToolUse": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/event-logger.sh\"",
20
+ "timeout": 5,
21
+ "async": true
22
+ }
23
+ ]
24
+ }
25
+ ],
26
+ "PostToolUseFailure": [
27
+ {
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/event-logger.sh\"",
32
+ "timeout": 5,
33
+ "async": true
34
+ }
35
+ ]
36
+ }
37
+ ],
38
+ "Stop": [
39
+ {
40
+ "hooks": [
41
+ {
42
+ "type": "command",
43
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/event-logger.sh\"",
44
+ "timeout": 5,
45
+ "async": true
46
+ }
47
+ ]
48
+ }
49
+ ],
50
+ "SubagentStart": [
51
+ {
52
+ "hooks": [
53
+ {
54
+ "type": "command",
55
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/event-logger.sh\"",
56
+ "timeout": 5,
57
+ "async": true
58
+ }
59
+ ]
60
+ }
61
+ ],
62
+ "SubagentStop": [
63
+ {
64
+ "hooks": [
65
+ {
66
+ "type": "command",
67
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/event-logger.sh\"",
68
+ "timeout": 5,
69
+ "async": true
70
+ }
71
+ ]
72
+ }
73
+ ],
74
+ "SessionEnd": [
75
+ {
76
+ "hooks": [
77
+ {
78
+ "type": "command",
79
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/event-logger.sh\"",
80
+ "timeout": 10
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ }
@@ -6,8 +6,9 @@
6
6
  # ============================================================
7
7
  project:
8
8
  name: my-project
9
- type: web-service # web-service | api-backend | platform | fintech | infra
9
+ type: web-service # web-service | web-app | api-backend | platform | fintech | infra
10
10
  level: 2 # 1=MVP | 2=Standard | 3=Enterprise
11
+ architecture: traditional # traditional | baas | microservices
11
12
  description: ""
12
13
 
13
14
  # ============================================================
@@ -0,0 +1,174 @@
1
+ # TimSquad Phase 전환 체크리스트
2
+ # 각 Phase 전환 시 반드시 확인해야 할 항목
3
+ # 에이전트는 이 체크리스트를 모두 통과해야 다음 Phase로 진행 가능
4
+
5
+ version: "1.0"
6
+
7
+ # ============================================================
8
+ # Planning → Implementation
9
+ # ============================================================
10
+ planning_to_implementation:
11
+ description: "기획/설계 완료 → 구현 시작"
12
+ checklist:
13
+ # SSOT 문서 완성 확인
14
+ - id: ssot-complete
15
+ check: "필수 SSOT 문서가 모두 작성되었는가?"
16
+ required: true
17
+ validation:
18
+ - "prd.md 존재 및 내용 작성됨"
19
+ - "requirements.md 존재 및 내용 작성됨"
20
+ - "service-spec.md 존재 및 내용 작성됨"
21
+ - "프로젝트 타입별 필수 문서 확인 (REQUIRED_SSOT_BY_TYPE)"
22
+ - "프로젝트 레벨별 필수 문서 확인 (REQUIRED_SSOT_BY_LEVEL)"
23
+
24
+ # workspace.xml 동기화 확인
25
+ - id: workspace-synced
26
+ check: "workspace.xml이 최신 상태인가?"
27
+ required: true
28
+ validation:
29
+ - "모든 Planning TASK가 completed-tasks에 존재"
30
+ - "pending-tasks에 미완료 Planning 작업 없음"
31
+ - "current-task가 비어있거나 Implementation 첫 TASK"
32
+
33
+ # Handoff 작성 확인
34
+ - id: handoff-written
35
+ check: "workspace.xml의 handoff 섹션이 작성되었는가?"
36
+ required: true
37
+ validation:
38
+ - "from: tsq-planner"
39
+ - "to: tsq-developer"
40
+ - "message: 인수인계 내용 작성됨"
41
+ - "attachments: 참조할 SSOT 문서 목록"
42
+ - "action-items: 구현 우선순위 목록"
43
+
44
+ # 사용자 승인
45
+ - id: user-approval
46
+ check: "사용자가 구현 진행을 승인했는가?"
47
+ required: true
48
+ validation:
49
+ - "pending-approvals에 승인 요청 기록"
50
+ - "사용자 승인 응답 수신"
51
+
52
+ on_failure:
53
+ - "미완료 항목 목록 표시"
54
+ - "Phase 전환 차단"
55
+ - "누락된 문서 작성 안내"
56
+
57
+ # ============================================================
58
+ # Implementation → Review
59
+ # ============================================================
60
+ implementation_to_review:
61
+ description: "구현 완료 → 검증 시작"
62
+ checklist:
63
+ - id: tests-pass
64
+ check: "모든 테스트가 통과하는가?"
65
+ required: true
66
+ validation:
67
+ - "npm run test 성공"
68
+ - "커버리지 최소 기준 충족 (L1: 60%, L2: 80%, L3: 90%)"
69
+
70
+ - id: no-lint-errors
71
+ check: "린트 에러가 없는가?"
72
+ required: true
73
+ validation:
74
+ - "npm run lint 성공"
75
+
76
+ - id: no-type-errors
77
+ check: "타입 에러가 없는가?"
78
+ required: true
79
+ validation:
80
+ - "npm run type-check 성공"
81
+
82
+ - id: work-log
83
+ check: "작업 로그가 기록되었는가?"
84
+ required: true
85
+ validation:
86
+ - ".timsquad/logs/ 에 최신 로그 존재"
87
+
88
+ - id: workspace-synced
89
+ check: "workspace.xml이 최신 상태인가?"
90
+ required: true
91
+ validation:
92
+ - "모든 Implementation TASK가 completed-tasks에 존재"
93
+ - "구현 결과 output 기록됨"
94
+
95
+ on_failure:
96
+ - "실패 항목 상세 표시"
97
+ - "Phase 전환 차단"
98
+ - "수정 필요 항목 안내"
99
+
100
+ # ============================================================
101
+ # Review → Security (Level 3 / fintech 필수)
102
+ # ============================================================
103
+ review_to_security:
104
+ description: "검증 완료 → 보안 검토"
105
+ required_for: ["level-3", "fintech"]
106
+ optional_for: ["level-1", "level-2"]
107
+ checklist:
108
+ - id: no-critical-issues
109
+ check: "Critical/Major 이슈가 모두 해결되었는가?"
110
+ required: true
111
+
112
+ - id: qa-checklist
113
+ check: "QA 체크리스트를 모두 통과했는가?"
114
+ required: true
115
+
116
+ - id: feedback-resolved
117
+ check: "미해결 피드백이 없는가?"
118
+ required: true
119
+ validation:
120
+ - "feedback-queue에 pending 항목 없음"
121
+
122
+ # ============================================================
123
+ # Review → Complete (보안 생략 시, Level 1/2만)
124
+ # ============================================================
125
+ review_to_complete:
126
+ description: "검증 완료 → 완료 (보안 생략)"
127
+ allowed_for: ["level-1", "level-2"]
128
+ forbidden_for: ["level-3", "fintech"]
129
+ checklist:
130
+ - id: no-critical-issues
131
+ check: "Critical/Major 이슈가 모두 해결되었는가?"
132
+ required: true
133
+
134
+ - id: qa-checklist
135
+ check: "QA 체크리스트를 모두 통과했는가?"
136
+ required: true
137
+
138
+ # ============================================================
139
+ # Security → Complete
140
+ # ============================================================
141
+ security_to_complete:
142
+ description: "보안 검토 완료 → 완료"
143
+ checklist:
144
+ - id: no-critical-vuln
145
+ check: "Critical 취약점이 없는가?"
146
+ required: true
147
+
148
+ - id: high-vuln-resolved
149
+ check: "High 취약점이 모두 해결되었는가?"
150
+ required: true
151
+
152
+ - id: user-approval
153
+ check: "사용자 승인을 받았는가? (Level 3 / fintech)"
154
+ required_for: ["level-3", "fintech"]
155
+
156
+ # ============================================================
157
+ # 공통 규칙
158
+ # ============================================================
159
+ common_rules:
160
+ # 체크리스트 미통과 시 행동
161
+ on_checklist_failure:
162
+ action: block_transition
163
+ message: "Phase 전환 조건이 충족되지 않았습니다."
164
+ show: "미충족 항목 목록"
165
+
166
+ # workspace.xml 업데이트는 모든 전환의 공통 조건
167
+ workspace_sync:
168
+ required: true
169
+ description: "모든 Phase 전환 시 workspace.xml이 최신 상태여야 합니다."
170
+
171
+ # 로그 기록은 모든 전환의 공통 조건
172
+ logging:
173
+ required: true
174
+ description: "Phase 전환 시 전환 사유와 결과를 로그에 기록합니다."
@@ -109,6 +109,12 @@
109
109
  <condition type="required">
110
110
  <check>service-spec.md 존재</check>
111
111
  </condition>
112
+ <condition type="required">
113
+ <check>workspace.xml 동기화 완료 (모든 Planning TASK가 completed-tasks에 존재)</check>
114
+ </condition>
115
+ <condition type="required">
116
+ <check>workspace.xml handoff 섹션 작성 완료</check>
117
+ </condition>
112
118
  <condition type="required">
113
119
  <check>User 승인 완료</check>
114
120
  </condition>
@@ -116,6 +122,7 @@
116
122
 
117
123
  <on-transition>
118
124
  <action>상태 파일 업데이트</action>
125
+ <action>workspace.xml active-session을 tsq-developer로 변경</action>
119
126
  <action>Planning Phase 완료 로그 기록</action>
120
127
  <notification>User에게 구현 시작 알림</notification>
121
128
  </on-transition>
@@ -123,6 +130,7 @@
123
130
  <on-failure>
124
131
  <action>차단 사유 표시</action>
125
132
  <suggestion>누락된 SSOT 문서 작성 필요</suggestion>
133
+ <suggestion>workspace.xml 동기화 필요</suggestion>
126
134
  </on-failure>
127
135
  </transition>
128
136
 
@@ -149,10 +157,14 @@
149
157
  <condition type="required">
150
158
  <check>작업 로그 기록 완료</check>
151
159
  </condition>
160
+ <condition type="required">
161
+ <check>workspace.xml 동기화 완료 (모든 Implementation TASK가 completed-tasks에 존재)</check>
162
+ </condition>
152
163
  </conditions>
153
164
 
154
165
  <on-transition>
155
166
  <action>상태 파일 업데이트</action>
167
+ <action>workspace.xml active-session을 tsq-qa로 변경</action>
156
168
  <action>QA 에이전트에게 리뷰 요청 전달</action>
157
169
  </on-transition>
158
170
  </transition>
@@ -165,8 +165,132 @@
165
165
  <rule id="mandatory-logging">
166
166
  모든 작업은 로그 기록 필수. 미기록 시 작업 미완료로 간주.
167
167
  </rule>
168
+ <rule id="mandatory-workspace-sync">
169
+ 모든 TASK 완료 시 workspace.xml 업데이트 필수. 미동기화 시 작업 미완료로 간주.
170
+ </rule>
171
+ <rule id="phase-checklist">
172
+ Phase 전환 시 phase-checklist.yaml의 해당 체크리스트를 모두 통과해야 함.
173
+ </rule>
168
174
  </global-rules>
169
175
 
176
+ <!-- 에이전트 위임 실패 폴백 전략 -->
177
+ <agent-fallback-strategy>
178
+ <description>
179
+ 서브에이전트 실행 실패 시 (Bash 권한 거부, 환경 미설정 등) 자동 폴백 전략.
180
+ 역할 분리 원칙을 최대한 유지하되, 프로세스 중단을 방지.
181
+ </description>
182
+
183
+ <fallback-chain>
184
+ <step id="1" action="retry">
185
+ <description>동일 에이전트로 1회 재시도</description>
186
+ <max-retries>1</max-retries>
187
+ <wait>5s</wait>
188
+ </step>
189
+ <step id="2" action="fallback-agent">
190
+ <description>폴백 에이전트로 위임 (workflow에 정의된 fallback)</description>
191
+ <example>tsq-frontend 실패 → tsq-developer로 폴백</example>
192
+ <example>tsq-dba 실패 → tsq-planner(architect)로 폴백</example>
193
+ </step>
194
+ <step id="3" action="pm-direct">
195
+ <description>PM(현재 에이전트)이 직접 처리</description>
196
+ <conditions>
197
+ <condition>폴백 에이전트도 실패한 경우</condition>
198
+ <condition>환경 자체 문제 (권한, 의존성 미설치)</condition>
199
+ </conditions>
200
+ <logging>
201
+ 역할 분리 원칙 위반 사유를 로그에 기록.
202
+ 회고 시 개선 대상으로 플래그.
203
+ </logging>
204
+ </step>
205
+ <step id="4" action="user-notify">
206
+ <description>모든 폴백 실패 시 사용자에게 알림</description>
207
+ <message>에이전트 실행 환경 문제 보고. 수동 개입 요청.</message>
208
+ </step>
209
+ </fallback-chain>
210
+
211
+ <!-- 환경 사전 요구사항 -->
212
+ <environment-prerequisites>
213
+ <instruction>
214
+ .timsquad/knowledge/setup.md에 프로젝트 환경 요구사항을 문서화하세요.
215
+ 에이전트 실행 전 이 파일을 확인하여 누락된 의존성을 사전 설치합니다.
216
+ </instruction>
217
+ <common-requirements>
218
+ <requirement>Node.js 18+</requirement>
219
+ <requirement>패키지 매니저 (npm/pnpm/bun)</requirement>
220
+ <requirement>corepack enable (pnpm 사용 시)</requirement>
221
+ </common-requirements>
222
+ </environment-prerequisites>
223
+ </agent-fallback-strategy>
224
+
225
+ <!-- 대용량 문서 분할 가이드 -->
226
+ <large-document-guide>
227
+ <description>
228
+ 1,000 lines 이상 예상되는 SSOT 문서는 토큰 초과를 방지하기 위해 분할 작성합니다.
229
+ </description>
230
+ <rules>
231
+ <rule id="split-threshold">
232
+ 단일 문서가 800 lines 이상 예상되면 섹션별 분할 작성
233
+ </rule>
234
+ <rule id="domain-split">
235
+ 도메인별 분리: 예) functional-spec.md → FS-AUTH.md, FS-MATCH.md, FS-PAYMENT.md
236
+ </rule>
237
+ <rule id="sequential-append">
238
+ 분할 문서는 순차 append 방식으로 작성 (한 번에 전체 작성 금지)
239
+ </rule>
240
+ <rule id="index-file">
241
+ 분할된 문서들의 인덱스 파일 유지 (예: functional-spec.md에 각 분할 파일 링크)
242
+ </rule>
243
+ </rules>
244
+ <split-patterns>
245
+ <pattern document="functional-spec.md">
246
+ <split-by>도메인 (인증, 매칭, 결제 등)</split-by>
247
+ <naming>FS-{DOMAIN}.md (예: FS-AUTH.md)</naming>
248
+ </pattern>
249
+ <pattern document="service-spec.md">
250
+ <split-by>API 그룹 (auth, users, resources 등)</split-by>
251
+ <naming>API-{GROUP}.md (예: API-AUTH.md)</naming>
252
+ </pattern>
253
+ <pattern document="data-design.md">
254
+ <split-by>도메인 (사용자, 매칭, 트랜잭션 등)</split-by>
255
+ <naming>DD-{DOMAIN}.md (예: DD-USERS.md)</naming>
256
+ </pattern>
257
+ </split-patterns>
258
+ </large-document-guide>
259
+
260
+ <!-- SSOT 교차 검증 규칙 -->
261
+ <ssot-cross-validation>
262
+ <description>
263
+ SSOT 문서 간 일관성을 검증하는 규칙.
264
+ 에이전트(특히 tsq-qa)가 검증 시 적용.
265
+ </description>
266
+ <rules>
267
+ <rule id="fr-id-consistency">
268
+ <check>requirements.md의 FR-XXX ID가 functional-spec.md에서 참조됨</check>
269
+ <severity>Major</severity>
270
+ </rule>
271
+ <rule id="api-endpoint-match">
272
+ <check>service-spec.md의 API 엔드포인트가 구현 코드와 일치</check>
273
+ <severity>Critical</severity>
274
+ </rule>
275
+ <rule id="error-code-match">
276
+ <check>error-codes.md의 에러 코드가 구현 코드에서 올바르게 사용됨</check>
277
+ <severity>Major</severity>
278
+ </rule>
279
+ <rule id="data-model-match">
280
+ <check>data-design.md의 테이블/필드가 실제 스키마(마이그레이션)와 일치</check>
281
+ <severity>Critical</severity>
282
+ </rule>
283
+ <rule id="glossary-consistency">
284
+ <check>glossary.md의 용어가 모든 SSOT 문서에서 일관되게 사용됨</check>
285
+ <severity>Minor</severity>
286
+ </rule>
287
+ <rule id="req-to-test-traceability">
288
+ <check>requirements.md의 각 FR이 test-spec.md에서 테스트 케이스로 매핑됨</check>
289
+ <severity>Major</severity>
290
+ </rule>
291
+ </rules>
292
+ </ssot-cross-validation>
293
+
170
294
  <!-- User 승인 필요 지점 -->
171
295
  <user-checkpoints>
172
296
  <checkpoint phase="planning" event="SSOT 완료">User 승인 필요</checkpoint>