uctm 1.5.3 → 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.
- package/.claude-plugin/plugin.json +3 -3
- package/README.md +162 -284
- package/agents/builder.md +87 -89
- package/agents/committer.md +90 -96
- package/agents/orchestrator.md +228 -0
- package/agents/planner.md +60 -112
- package/agents/specifier.md +277 -116
- package/agents/verifier.md +61 -66
- package/lib/constants.mjs +1 -5
- package/lib/init.mjs +0 -18
- package/lib/update.mjs +1 -1
- package/package.json +2 -6
- package/references/agent-flow.md +120 -141
- package/references/context-policy.md +39 -37
- package/references/file-content-schema.md +164 -75
- package/references/ref-cache-protocol.md +31 -31
- package/references/shared-prompt-sections.md +104 -202
- package/references/work-activity-log.md +33 -26
- package/references/xml-schema.md +151 -54
- package/skills/sdd-pipeline/SKILL.md +1 -1
- package/skills/uctm-init/SKILL.md +94 -0
- package/skills/work-pipeline/SKILL.md +33 -41
- package/skills/work-status/SKILL.md +17 -17
- package/.agent/router_rule_config.json +0 -47
- package/agents/scheduler.md +0 -171
- package/skills/init/SKILL.md +0 -95
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 공유 프롬프트 섹션
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
각 에이전트가 `cache_control` 마커를 통해 참조하는 공통 재사용 섹션.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## § 1.
|
|
7
|
+
## § 1. 출력 언어 규칙
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
|
|
10
|
+
우선순위: PLAN.md > Language: → CLAUDE.md ## Language → en (기본값)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
디스패치 시: <context><language> 필드에 결정된 언어 코드 전달
|
|
13
|
+
섹션 헤더(##)도 결정된 언어로 작성 (언어 매핑 표 참조)
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## § 2.
|
|
18
|
+
## § 2. 빌드 및 린트 명령
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
#
|
|
21
|
+
# 빌드 자동 감지 (스크립트가 있을 때만 실행)
|
|
22
22
|
if [ -f "package.json" ]; then
|
|
23
23
|
if node -e "const p=JSON.parse(require('fs').readFileSync('package.json','utf8')); process.exit(p.scripts&&p.scripts.build?0:1)" 2>/dev/null; then
|
|
24
24
|
npm run build 2>&1 || bun run build 2>&1 || yarn build 2>&1
|
|
@@ -33,7 +33,7 @@ elif [ -f "Makefile" ]; then
|
|
|
33
33
|
make build 2>&1 || make 2>&1
|
|
34
34
|
fi
|
|
35
35
|
|
|
36
|
-
#
|
|
36
|
+
# 린트 자동 감지 (스크립트가 있을 때만 실행)
|
|
37
37
|
if [ -f "package.json" ]; then
|
|
38
38
|
if node -e "const p=JSON.parse(require('fs').readFileSync('package.json','utf8')); process.exit(p.scripts&&p.scripts.lint?0:1)" 2>/dev/null; then
|
|
39
39
|
npm run lint 2>&1 || bun run lint 2>&1 || true
|
|
@@ -43,99 +43,107 @@ elif [ -f "pyproject.toml" ]; then
|
|
|
43
43
|
fi
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
-
|
|
47
|
-
-
|
|
46
|
+
- 빌드/린트 스크립트가 없으면 → **생략 (N/A로 처리)**.
|
|
47
|
+
- 빌드/린트 실패 시 보고 전에 항상 수정.
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
51
|
-
## § 3. WORK
|
|
51
|
+
## § 3. WORK 및 TASK 파일 경로 패턴
|
|
52
52
|
|
|
53
53
|
```
|
|
54
54
|
works/{WORK_ID}/
|
|
55
|
-
├─ Requirement.md #
|
|
55
|
+
├─ Requirement.md # Specifier가 생성 (필수)
|
|
56
56
|
├─ PLAN.md
|
|
57
|
-
├─ TASK-00.md #
|
|
58
|
-
├─ TASK-00_result.md #
|
|
57
|
+
├─ TASK-00.md # WORK 접두사 없음
|
|
58
|
+
├─ TASK-00_result.md # 구분자: 언더스코어
|
|
59
59
|
└─ TASK-01.md ...
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
- WORK ID: `WORK-NN` (
|
|
63
|
-
- TASK ID: `TASK-NN` (
|
|
62
|
+
- WORK ID: `WORK-NN` (예: `WORK-03`)
|
|
63
|
+
- TASK ID: `TASK-NN` (예: `TASK-00`) — WORK 접두사 포함 금지
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
67
|
-
## § 4.
|
|
67
|
+
## § 4. 파일 시스템 Discovery 스크립트
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
#
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
# -
|
|
74
|
-
# -
|
|
75
|
-
#
|
|
76
|
-
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
# WORK/TASK
|
|
81
|
-
#
|
|
82
|
-
#
|
|
70
|
+
# 미완료 TASK가 있는 최신 WORK 찾기
|
|
71
|
+
# Glob 도구 사용: pattern "works/WORK-*/" → 모든 WORK 디렉토리 목록 (정렬)
|
|
72
|
+
# 각 WORK (내림차순)에 대해 works/WORK-NN/work_WORK-NN.log 마지막 줄 읽기
|
|
73
|
+
# - 로그 파일 없음 → 시작 안 됨
|
|
74
|
+
# - 마지막 줄이 "ORCHESTRATOR_DONE" → 완료됨
|
|
75
|
+
# 완전히 완료되지 않은 첫 번째 WORK가 활성 WORK
|
|
76
|
+
|
|
77
|
+
# 모든 WORK 목록
|
|
78
|
+
# Glob 도구 사용: pattern "works/WORK-*/"
|
|
79
|
+
|
|
80
|
+
# 활동 로그의 마지막 줄로 WORK/TASK 상태 파악 (orchestrator가 일괄 기록 → work-activity-log.md 참조)
|
|
81
|
+
# works/${WORK_ID}/work_${WORK_ID}.log 마지막 줄 읽기
|
|
82
|
+
# 형식: [timestamp] EVENT — description
|
|
83
83
|
#
|
|
84
|
-
#
|
|
84
|
+
# 핵심 규칙: STAGE_START에 대응하는 STAGE_DONE/GATE_WAIT/DECISION_WAIT가 없으면 = 자식 실행 중 중단됨, 해당 단계 재수행 필요
|
|
85
85
|
#
|
|
86
|
-
#
|
|
87
|
-
#
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
#
|
|
91
|
-
#
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
# SPECIFIER_DONE → specifier done, needs planner
|
|
95
|
-
# SPECIFIER_START → specifier interrupted, redo specifier+planner
|
|
96
|
-
# No log file → start from scratch
|
|
86
|
+
# ORCHESTRATOR_DONE → WORK 전체 완료
|
|
87
|
+
# STAGE_DONE — stage=X[ task=TASK-NN] → 해당 단계 완료(게이트 통과됨), 다음 단계로
|
|
88
|
+
# GATE_WAIT — stage=X → 게이트 미승인, 자식 재실행 없이 동일 게이트 재제시
|
|
89
|
+
# DECISION_WAIT — stage=X[ task=TASK-NN] → 결정 미확정, DECISIONS.md의 PENDING 항목 재제시
|
|
90
|
+
# DECISION — stage=X by=user|auto → 결정 확정됨, 후속 STAGE_DONE 없으면 해당 단계 이어서 진행
|
|
91
|
+
# STAGE_START — stage=X[ task=TASK-NN] → (대응 DONE/WAIT 없으면) 자식 실행 중 중단됨, 재실행
|
|
92
|
+
# ORCHESTRATOR_START → orchestrator 시작됨, 하위 이벤트로 세부 판정
|
|
93
|
+
# 로그 파일 없음 → 처음부터 시작 (신규 WORK)
|
|
97
94
|
```
|
|
98
95
|
|
|
99
96
|
---
|
|
100
97
|
|
|
101
|
-
## § 5. Task Result XML
|
|
98
|
+
## § 5. Task Result XML 형식
|
|
102
99
|
|
|
103
100
|
```xml
|
|
104
101
|
<task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
|
|
105
|
-
<summary>{1-2
|
|
102
|
+
<summary>{1-2줄 요약}</summary>
|
|
106
103
|
<files-changed>
|
|
107
|
-
<file action="{created|modified|deleted}" path="{path}">{
|
|
104
|
+
<file action="{created|modified|deleted}" path="{path}">{설명}</file>
|
|
108
105
|
</files-changed>
|
|
109
106
|
<verification>
|
|
110
|
-
<check name="{type}" status="{PASS|FAIL|N/A}">{
|
|
107
|
+
<check name="{type}" status="{PASS|FAIL|N/A}">{상세}</check>
|
|
111
108
|
</verification>
|
|
112
|
-
<notes>{
|
|
109
|
+
<notes>{다음 단계를 위한 메모}</notes>
|
|
113
110
|
</task-result>
|
|
114
111
|
```
|
|
115
112
|
|
|
116
113
|
---
|
|
117
114
|
|
|
118
|
-
## §
|
|
115
|
+
## § 6. 자동결정 기록 관례
|
|
116
|
+
|
|
117
|
+
권고안을 자동결정(결정주체 `auto`)한 경우, 판단 근거를 남겨 추적 가능하게 한다.
|
|
118
|
+
|
|
119
|
+
- **기록 위치**: `works/{WORK_ID}/DECISIONS.md`(항목별 배경/선택지/권고안/확정값/결정주체/상태) + 최종 결과보고서 `## 자동 결정 사항` 목록.
|
|
120
|
+
- **기록 시점**: 결정 확정 즉시 `RESOLVED`로 기록. `mode=auto`뿐 아니라 `mode=gated`에서 orchestrator가 경미한 사항으로 판단해 게이트 없이 자체 확정(`by=auto`)한 경우도 동일하게 기록.
|
|
121
|
+
- **최소 기재 항목**: 대상(stage 또는 task) · 확정값 · 근거 1줄.
|
|
122
|
+
|
|
123
|
+
→ 상세 포맷: `file-content-schema.md` § 4 참조. 기록 주체·이벤트: `work-activity-log.md`의 `DECISION` 이벤트 참조.
|
|
124
|
+
|
|
125
|
+
---
|
|
119
126
|
|
|
120
|
-
|
|
127
|
+
## § 7. PLAN.md 필수 메타 정보 — 7개 필드
|
|
121
128
|
|
|
122
|
-
|
|
123
|
-
|
|
129
|
+
→ `{REFERENCES_DIR}/file-content-schema.md` § 1 참조
|
|
130
|
+
|
|
131
|
+
| 필드 | 필수 | 설명 |
|
|
132
|
+
|------|------|------|
|
|
124
133
|
| `> Created:` | ✅ | YYYY-MM-DD |
|
|
125
|
-
| `> Requirement:` | ✅ | `REQ-XXX`
|
|
126
|
-
| `>
|
|
127
|
-
| `>
|
|
128
|
-
| `>
|
|
129
|
-
| `>
|
|
130
|
-
| `> Status:` | ✅ | Always starts as `PLANNED` |
|
|
134
|
+
| `> Requirement:` | ✅ | `REQ-XXX` 또는 사용자 요청 텍스트 |
|
|
135
|
+
| `> Project:` | ✅ | 프로젝트 이름 |
|
|
136
|
+
| `> Tech Stack:` | ✅ | 감지된 기술 스택 |
|
|
137
|
+
| `> Language:` | ✅ | 언어 코드 (`ko`, `en` 등) |
|
|
138
|
+
| `> Status:` | ✅ | 항상 `PLANNED`로 시작 |
|
|
131
139
|
|
|
132
140
|
---
|
|
133
141
|
|
|
134
|
-
## § 8. WORK-LIST.md
|
|
142
|
+
## § 8. WORK-LIST.md 업데이트 규칙
|
|
135
143
|
|
|
136
|
-
|
|
144
|
+
파일: `works/WORK-LIST.md`
|
|
137
145
|
|
|
138
|
-
|
|
146
|
+
**형식:**
|
|
139
147
|
```
|
|
140
148
|
LAST_WORK_ID: WORK-XX
|
|
141
149
|
|
|
@@ -145,163 +153,57 @@ LAST_WORK_ID: WORK-XX
|
|
|
145
153
|
| WORK-MM | ... | DONE | YYYY-MM-DD | YYYY-MM-DD |
|
|
146
154
|
```
|
|
147
155
|
|
|
148
|
-
|
|
|
149
|
-
|
|
150
|
-
| `IN_PROGRESS` | WORK
|
|
151
|
-
| `DONE` |
|
|
152
|
-
| `COMPLETED` |
|
|
156
|
+
| 상태 | 의미 | 트리거 |
|
|
157
|
+
|------|------|--------|
|
|
158
|
+
| `IN_PROGRESS` | WORK 실행 중 | specifier가 WORK 생성 |
|
|
159
|
+
| `DONE` | 모든 TASK 완료, 리뷰/push 대기 | committer가 마지막 TASK 완료 |
|
|
160
|
+
| `COMPLETED` | _COMPLETED/로 아카이빙됨 | push 머지 (Main Claude가 모든 DONE 일괄 처리) |
|
|
153
161
|
|
|
154
|
-
|
|
155
|
-
- `LAST_WORK_ID`
|
|
156
|
-
- **specifier**:
|
|
157
|
-
- **committer**:
|
|
158
|
-
- **Main Claude** (push
|
|
162
|
+
규칙:
|
|
163
|
+
- `LAST_WORK_ID` 헤더는 지금까지 생성된 가장 높은 WORK ID를 추적
|
|
164
|
+
- **specifier**: WORK 생성 시 IN_PROGRESS 행 추가 + `LAST_WORK_ID` 업데이트
|
|
165
|
+
- **committer**: 마지막 TASK 완료 시 `IN_PROGRESS` → `DONE`으로 변경하고 완료일 기입 (폴더 이동이나 행 제거 금지)
|
|
166
|
+
- **Main Claude** (push 절차): 모든 DONE WORK를 `works/_COMPLETED/`로 이동, WORK-LIST.md에서 해당 행 제거
|
|
159
167
|
|
|
160
168
|
---
|
|
161
169
|
|
|
162
|
-
## § 9.
|
|
170
|
+
## § 9. 로케일 감지
|
|
163
171
|
|
|
164
172
|
```
|
|
165
|
-
1.
|
|
166
|
-
2.
|
|
167
|
-
3.
|
|
173
|
+
1. Grep 도구 사용: pattern "Language:\s*[a-z]{2}" path="CLAUDE.md" → 언어 코드 추출
|
|
174
|
+
2. 없으면 사용자에게 언어 확인
|
|
175
|
+
3. 없으면 Bash로 시스템 로케일 자동 감지:
|
|
168
176
|
- Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
|
|
169
177
|
- Linux/Mac: locale | grep LANG
|
|
170
|
-
-
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## § 10. Callback & Activity Log
|
|
176
|
-
|
|
177
|
-
### 10-1. Callback (CE7)
|
|
178
|
-
|
|
179
|
-
Each agent sends START/DONE/FAILED events to the server via CE7 API.
|
|
180
|
-
|
|
181
|
-
**Activation condition:** Only when `CALLBACK_URL` is available. Check in order:
|
|
182
|
-
1. Dispatch XML `<callback-url>` element (passed from Main Claude)
|
|
183
|
-
2. Prompt text containing `CALLBACK_URL=...` line
|
|
184
|
-
3. If neither found → **skip all callbacks**
|
|
185
|
-
|
|
186
|
-
**How to resolve CALLBACK_URL and CALLBACK_TOKEN:**
|
|
187
|
-
|
|
188
|
-
The runner injects callback info directly into the prompt:
|
|
189
|
-
```
|
|
190
|
-
POST {CALLBACK_URL}
|
|
191
|
-
Authorization: Bearer {CALLBACK_TOKEN}
|
|
192
|
-
```
|
|
193
|
-
The first agent (specifier) extracts these and passes them via dispatch XML to subsequent agents.
|
|
194
|
-
|
|
195
|
-
**When to send:**
|
|
196
|
-
- **START**: At the very beginning of agent execution (after STARTUP)
|
|
197
|
-
- **DONE**: At the very end, before returning task-result XML
|
|
198
|
-
- **FAILED**: On unrecoverable failure, before returning FAIL task-result
|
|
199
|
-
|
|
200
|
-
**How to send** (single curl command):
|
|
201
|
-
```bash
|
|
202
|
-
curl -s --connect-timeout 3 --max-time 5 -X POST "$CALLBACK_URL" \
|
|
203
|
-
-H "Authorization: Bearer $CALLBACK_TOKEN" \
|
|
204
|
-
-H "Content-Type: application/json" \
|
|
205
|
-
-d '{"stage":"BUILDER","event":"START","workId":"WORK-09","taskId":"TASK-01"}' \
|
|
206
|
-
2>/dev/null || true
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
- `--connect-timeout 3`: 연결 대기 최대 3초
|
|
210
|
-
- `--max-time 5`: 전체 요청 최대 5초
|
|
211
|
-
- `|| true`: 실패해도 agent 실행 계속
|
|
212
|
-
|
|
213
|
-
**Include docs (actual file content, not references):**
|
|
214
|
-
- specifier DONE: `"docs": {"requirementContent": "<Requirement.md content>"}`
|
|
215
|
-
- planner DONE: `"docs": {"planContent": "<PLAN.md content>"}`
|
|
216
|
-
- builder START: `"docs": {"taskContent": "<TASK-NN.md content>"}`
|
|
217
|
-
- committer DONE: `"docs": {"resultContent": "<TASK-NN_result.md content>"}`
|
|
218
|
-
|
|
219
|
-
**Token usage** (DONE event only, optional):
|
|
220
|
-
```json
|
|
221
|
-
{"inputTokens": 1234, "outputTokens": 567, "cacheCreationTokens": 890, "cacheReadTokens": 456}
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Callback failure must NOT block agent execution. Always continue.
|
|
225
|
-
|
|
226
|
-
### 10-2. Activity Log
|
|
227
|
-
|
|
228
|
-
Each agent records start/end to `works/{WORK_ID}/work_{WORK_ID}.log`.
|
|
229
|
-
|
|
230
|
-
**All WORKs** — no CALLBACK_URL condition.
|
|
231
|
-
|
|
232
|
-
**Timestamp:** Run `date -u +"%Y-%m-%dT%H:%M:%SZ"` via Bash tool to get the real UTC time. Do NOT use dummy/placeholder timestamps.
|
|
233
|
-
|
|
234
|
-
**Format:**
|
|
235
|
-
```
|
|
236
|
-
[2026-03-30T14:30:00Z] AGENT_EVENT — description
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**How to write:** Use Bash `echo "[timestamp] EVENT — description" >> works/{WORK_ID}/work_{WORK_ID}.log`
|
|
240
|
-
|
|
241
|
-
**Required entries per agent (START and DONE only):**
|
|
242
|
-
```
|
|
243
|
-
[{timestamp}] SPECIFIER_START — WORK-NN specifier started
|
|
244
|
-
[{timestamp}] SPECIFIER_DONE — WORK-NN specifier completed
|
|
245
|
-
[{timestamp}] BUILDER_START — TASK-NN implement
|
|
246
|
-
[{timestamp}] BUILDER_DONE — TASK-NN complete
|
|
247
|
-
[{timestamp}] VERIFIER_START — TASK-NN verification
|
|
248
|
-
[{timestamp}] VERIFIER_DONE — TASK-NN verified
|
|
249
|
-
[{timestamp}] COMMITTER_START — TASK-NN commit
|
|
250
|
-
[{timestamp}] COMMITTER_DONE — TASK-NN committed
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
Do NOT write INIT, REF, PLAN, DISPATCH or other intermediate entries. Only START and DONE per agent role.
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## § 11. Project Discovery
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
# 1. Check CLAUDE.md language setting
|
|
261
|
-
Use Grep tool: pattern "Language:\s*[a-z]{2}" path="CLAUDE.md"
|
|
262
|
-
|
|
263
|
-
# 2. Tech stack (read first 50/30/20/10 lines if file exists)
|
|
264
|
-
Use Read tool: "package.json" (limit=50)
|
|
265
|
-
Use Read tool: "pyproject.toml" (limit=30)
|
|
266
|
-
Use Read tool: "Cargo.toml" (limit=20)
|
|
267
|
-
Use Read tool: "go.mod" (limit=10)
|
|
268
|
-
|
|
269
|
-
# 3. Structure (when needed)
|
|
270
|
-
Use Glob tool: pattern "**/*.{md,json,toml}" (exclude node_modules)
|
|
178
|
+
- 폴백: "en"
|
|
271
179
|
```
|
|
272
180
|
|
|
273
181
|
---
|
|
274
182
|
|
|
275
|
-
## § 12. Bash
|
|
183
|
+
## § 12. Bash 명령 규칙
|
|
276
184
|
|
|
277
|
-
Bash
|
|
185
|
+
Bash 명령은 권한 호환성을 위해 다음 규칙을 반드시 따라야 합니다.
|
|
278
186
|
|
|
279
|
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
-
|
|
284
|
-
-
|
|
285
|
-
-
|
|
187
|
+
**필수:**
|
|
188
|
+
- Bash 호출당 단순 명령 하나 — 복합 명령 금지 (`&&`, `||`, `;`, `|`)
|
|
189
|
+
- `cd` 금지 — Bash 도구의 cwd는 항상 프로젝트 루트. `cd dir &&`, `cd dir ;`, `cd dir` 어떤 형태든 사용 금지. 프로젝트 루트 기준 상대 경로 사용
|
|
190
|
+
- 멀티라인 스크립트 금지 — 별도 Bash 호출로 분할
|
|
191
|
+
- 인수 내 서브셸 확장 금지 — 예: `printf` 안의 `$(date ...)`
|
|
192
|
+
- 프로젝트 루트 기준 상대 경로 사용 (예: `works/WORK-01/`) — 절대 경로 금지
|
|
193
|
+
- `git add file`, `git commit -m "msg"` 사용 — `git -C path` 플래그 금지
|
|
286
194
|
|
|
287
|
-
|
|
288
|
-
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
-
|
|
292
|
-
-
|
|
293
|
-
|
|
294
|
-
**Activity log example:**
|
|
295
|
-
```
|
|
296
|
-
WRONG: printf '[%s]_%s\n' "$(date ...)" "INIT" >> work.log
|
|
297
|
-
RIGHT: Use Write tool to append a line to the log file
|
|
298
|
-
```
|
|
195
|
+
**파일 작업에는 Bash 대신 전용 도구를 우선 사용:**
|
|
196
|
+
- 파일 읽기 → `Read` 도구 (`cat` 아님)
|
|
197
|
+
- 파일 쓰기/추가 → `Write` 도구 (`echo >>` 또는 `printf >>` 아님)
|
|
198
|
+
- 파일 편집 → `Edit` 도구 (`sed -i` 아님)
|
|
199
|
+
- 파일 검색 → `Grep` 도구 (`grep` 아님)
|
|
200
|
+
- 파일 찾기 → `Glob` 도구 (`find` 아님)
|
|
299
201
|
|
|
300
|
-
**Git
|
|
202
|
+
**Git 예시:**
|
|
301
203
|
```
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
git commit -m "msg" (
|
|
204
|
+
잘못됨: cd /path/to/project && git add file && git commit -m "msg"
|
|
205
|
+
올바름: git add file (한 번의 호출)
|
|
206
|
+
git commit -m "msg" (다음 호출)
|
|
305
207
|
```
|
|
306
208
|
|
|
307
209
|
---
|
|
@@ -309,4 +211,4 @@ RIGHT: git add file (one call)
|
|
|
309
211
|
## Version
|
|
310
212
|
|
|
311
213
|
- Created: 2026-03-10
|
|
312
|
-
- Updated: 2026-03-
|
|
214
|
+
- Updated: 2026-03-31
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
1. **
|
|
8
|
-
2.
|
|
9
|
-
3.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
1
|
+
# 작업 활동 로그
|
|
2
|
+
|
|
3
|
+
`works/{WORK_ID}/work_{WORK_ID}.log`에 실행 이벤트를 기록.
|
|
4
|
+
|
|
5
|
+
## 규칙
|
|
6
|
+
|
|
7
|
+
1. **기록 주체**: **orchestrator**. 자식의 spawn/완료를 `STAGE_START`/`STAGE_DONE`으로 기록한다.
|
|
8
|
+
2. **타임스탬프**: Bash로 `date -u +"%Y-%m-%dT%H:%M:%SZ"` 실행하여 실제 UTC 시간 획득. 더미 값 사용 금지.
|
|
9
|
+
3. **기록 방법**: Bash `echo` 로 추가.
|
|
10
|
+
4. **`STAGE_DONE`은 게이트 통과 후에 기록한다.** 해당 단계에 게이트(`<gate type="stage">` 또는 `<gate type="decision">`)가 있는 경우, Main Claude/사용자의 승인·결정으로 게이트가 해소(RESOLVED)된 시점에만 `STAGE_DONE`을 남긴다. 게이트 대기 중에는 `GATE_WAIT`/`DECISION_WAIT`만 기록되고, `STAGE_DONE`은 아직 기록되지 않은 상태로 남는다.
|
|
11
|
+
- **근거(재개 판정)**: 파이프라인이 중단 후 재개(resume)될 때 orchestrator는 로그의 마지막 이벤트로 재개 지점을 판정한다. 특정 단계에 `STAGE_START`만 있고 `STAGE_DONE`이 없다면 "그 단계의 게이트가 아직 승인/결정되지 않았다"는 뜻이므로, orchestrator는 다음 단계로 건너뛰지 않고 동일 게이트를 다시 제시해야 한다. `STAGE_DONE`을 게이트 통과 이전에 기록하면 재개 시 미승인 게이트를 건너뛰는 사고로 이어진다.
|
|
12
|
+
|
|
13
|
+
## 형식
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
[YYYY-MM-DDTHH:MM:SSZ] EVENT — description
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 이벤트 체계 (orchestrator 기록)
|
|
20
|
+
|
|
21
|
+
| 이벤트 | 기록 시점 | 예시 |
|
|
22
|
+
|--------|----------|------|
|
|
23
|
+
| `ORCHESTRATOR_START` | orchestrator 실행 시작 | `ORCHESTRATOR_START — WORK-NN orchestrator started` |
|
|
24
|
+
| `STAGE_START` | 자식 에이전트(specifier/planner/builder/verifier/committer) spawn 직전 | `STAGE_START — stage=specifier` |
|
|
25
|
+
| `GATE_WAIT` | `<gate type="stage">`에서 정지, Main Claude 승인 대기 | `GATE_WAIT — stage=specifier` |
|
|
26
|
+
| `DECISION_WAIT` | `<gate type="decision">` 또는 자식의 `<needs-decision>` 수신 후 결정 대기 | `DECISION_WAIT — stage=planner` |
|
|
27
|
+
| `DECISION` | 결정 확정 — 주체는 `user`(사용자 승인) 또는 `auto`(orchestrator 자동결정) | `DECISION — stage=planner by=user` / `DECISION — task=TASK-03 by=auto` |
|
|
28
|
+
| `STAGE_DONE` | 게이트 해소(RESOLVED) 후, 또는 게이트가 없는 단계는 완료 즉시 | `STAGE_DONE — stage=specifier` |
|
|
29
|
+
| `ORCHESTRATOR_DONE` | orchestrator 실행 종료 (WORK 완료) | `ORCHESTRATOR_DONE — WORK-NN orchestrator completed` |
|
|
30
|
+
|
|
31
|
+
- `stage` 값: `specifier`/`planner`/`builder`/`verifier`/`committer`.
|
|
32
|
+
- `by` 값: `user`/`auto`. `<decision>`(§ 7, `xml-schema.md`)의 `by` 속성과 동일한 값 체계를 사용.
|
|
33
|
+
- 확정된 결정의 상세 내용(배경/선택지/권고안/확정값)은 로그가 아니라 `works/{WORK_ID}/DECISIONS.md`에 기록한다 → `file-content-schema.md` § 4 참조. 로그의 `DECISION` 이벤트는 "언제·누가 결정했는지"만 남긴다.
|