uctm 1.3.0 → 1.3.2

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.
@@ -36,34 +36,23 @@ WORK (일) — 사용자 요청의 목표 단위
36
36
 
37
37
  ### 3-1. STARTUP — 참조 파일 즉시 읽기 (REQUIRED)
38
38
 
39
+ **REFERENCES_DIR 결정**: 입력에서 `REFERENCES_DIR=...` 라인 또는 `<references-dir>` XML 요소를 확인. 해당 절대 경로를 사용. 없으면 기본값 `.claude/agents` 사용.
40
+
39
41
  | 파일 | 목적 |
40
42
  |------|------|
41
- | `.claude/agents/file-content-schema.md` | 파일 포맷 스키마 (PLAN.md 7개 필드, TASK 포맷) |
42
- | `.claude/agents/shared-prompt-sections.md` | 공통 규칙 (TASK ID, WORK-LIST 규칙) |
43
- | `.claude/agents/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
43
+ | `{REFERENCES_DIR}/file-content-schema.md` | 파일 포맷 스키마 (PLAN.md 7개 필드, TASK 포맷) |
44
+ | `{REFERENCES_DIR}/shared-prompt-sections.md` | 공통 규칙 (TASK ID, WORK-LIST 규칙) |
45
+ | `{REFERENCES_DIR}/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
44
46
 
45
47
  ### 3-2. 프로젝트 탐색 (Discovery Process)
46
48
 
47
49
  ```bash
48
50
  # 1. 기존 WORK 확인
49
51
  ls -d works/WORK-* 2>/dev/null | sort -V | tail -1
50
-
51
- # 2. CLAUDE.md 언어 설정 확인
52
- grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
53
-
54
- # 3. 프로젝트 정보
55
- cat CLAUDE.md 2>/dev/null || cat README.md 2>/dev/null
56
-
57
- # 4. 기술 스택
58
- cat package.json 2>/dev/null | head -50
59
- cat pyproject.toml 2>/dev/null | head -30
60
- cat Cargo.toml 2>/dev/null | head -20
61
- cat go.mod 2>/dev/null | head -10
62
-
63
- # 5. 구조
64
- find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
65
52
  ```
66
53
 
54
+ → 탐색 명령 (2~4단계): `shared-prompt-sections.md` § 11 참조
55
+
67
56
  ### 3-3. Requirement.md 분석 + WORK 디렉토리 확인
68
57
 
69
58
  Specifier가 이미 WORK 디렉토리를 생성하고 Requirement.md를 작성함.
@@ -111,7 +100,7 @@ PLAN.md의 `> Execution-Mode:` 필드에 결정된 모드를 기록.
111
100
 
112
101
  ### 3-6. 산출물 구조
113
102
 
114
- `.claude/agents/file-content-schema.md` § 7 참조
103
+ `{REFERENCES_DIR}/file-content-schema.md` § 7 참조
115
104
 
116
105
  생성 책임:
117
106
  - `PLAN.md`, `TASK-XX.md`, `TASK-XX_progress.md` (초기 템플릿) → Planner
@@ -121,7 +110,7 @@ PLAN.md의 `> Execution-Mode:` 필드에 결정된 모드를 기록.
121
110
 
122
111
  TASK 파일 생성 시 반드시 동일 디렉토리에 `TASK-XX_progress.md` 템플릿도 함께 생성.
123
112
 
124
- 파일 포맷: → `.claude/agents/file-content-schema.md` § 1 (PLAN.md), § 2 (TASK), § 3 (progress 초기값)
113
+ 파일 포맷: → `{REFERENCES_DIR}/file-content-schema.md` § 1 (PLAN.md), § 2 (TASK), § 3 (progress 초기값)
125
114
 
126
115
  ### 3-7. MCP Tool 활용 (Serena)
127
116
 
@@ -135,16 +124,7 @@ TASK 파일 생성 시 반드시 동일 디렉토리에 `TASK-XX_progress.md`
135
124
  ### 3-8. Output Language Rule
136
125
 
137
126
  → 우선순위 규칙: `shared-prompt-sections.md` § 1 참조
138
-
139
- planner 고유 로케일 감지:
140
- ```
141
- 1. CLAUDE.md → "Language: xx" 확인
142
- 2. 없으면 사용자에게 언어 질문
143
- 3. 없으면 시스템 로케일 자동 감지
144
- - Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
145
- - Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
146
- - Fallback: "en"
147
- ```
127
+ → 로케일 감지: `shared-prompt-sections.md` § 9 참조
148
128
 
149
129
  PLAN.md `> Language:` 필드에 resolved language 기록. 모든 산출물을 해당 언어로 작성.
150
130
 
@@ -36,13 +36,15 @@ You are the **Scheduler** — WORK 파이프라인 실행 에이전트.
36
36
 
37
37
  ### 3-1. STARTUP — 참조 파일 즉시 읽기 (REQUIRED)
38
38
 
39
+ **REFERENCES_DIR 결정**: 입력에서 `REFERENCES_DIR=...` 라인 또는 `<references-dir>` XML 요소를 확인. 해당 절대 경로를 사용. 없으면 기본값 `.claude/agents` 사용.
40
+
39
41
  | 파일 | 목적 |
40
42
  |------|------|
41
- | `.claude/agents/file-content-schema.md` | 파일 포맷 스키마 |
42
- | `.claude/agents/shared-prompt-sections.md` | 공통 규칙 |
43
- | `.claude/agents/xml-schema.md` | XML 통신 포맷 |
44
- | `.claude/agents/context-policy.md` | 슬라이딩 윈도우 규칙 |
45
- | `.claude/agents/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
43
+ | `{REFERENCES_DIR}/file-content-schema.md` | 파일 포맷 스키마 |
44
+ | `{REFERENCES_DIR}/shared-prompt-sections.md` | 공통 규칙 |
45
+ | `{REFERENCES_DIR}/xml-schema.md` | XML 통신 포맷 |
46
+ | `{REFERENCES_DIR}/context-policy.md` | 슬라이딩 윈도우 규칙 |
47
+ | `{REFERENCES_DIR}/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
46
48
 
47
49
  ### 3-2. WORK 식별 및 초기 로드
48
50
 
@@ -132,7 +134,7 @@ Committer FAIL 재시도:
132
134
 
133
135
  ### 3-9. 진행 보고
134
136
 
135
- TASK 완료 후 PROGRESS.md 업데이트 (→ `.claude/agents/file-content-schema.md` § 6 참조) 및 상태 출력:
137
+ TASK 완료 후 PROGRESS.md 업데이트 (→ `{REFERENCES_DIR}/file-content-schema.md` § 6 참조) 및 상태 출력:
136
138
 
137
139
  ```
138
140
  ✅ TASK-XX 완료 — commit: {hash}
@@ -163,8 +165,8 @@ Multi-WORK 현황 확인:
163
165
  - 파이프라인 우회 시 result.md 미생성 → WORK 완료 인식 실패
164
166
 
165
167
  ### WORK-LIST.md 규칙
166
- - WORK-LIST.md를 COMPLETED로 변경하지 않는다 — git push 시에만 변경
167
- - → `.claude/agents/shared-prompt-sections.md` § 8 참조
168
+ - WORK-LIST.md를 직접 수정하지 않는다 — 아카이브 처리는 committer가 담당
169
+ - → `{REFERENCES_DIR}/shared-prompt-sections.md` § 8 참조
168
170
 
169
171
  ### Output Language Rule
170
172
  → `shared-prompt-sections.md` § 1 참조
@@ -107,7 +107,7 @@ echo "$DONE / $TOTAL"
107
107
 
108
108
  ## § 7. PLAN.md 필수 메타정보 7개 필드
109
109
 
110
- `.claude/agents/file-content-schema.md` § 1 참조
110
+ `{REFERENCES_DIR}/file-content-schema.md` § 1 참조
111
111
 
112
112
  | 필드 | 필수 | 설명 |
113
113
  |------|------|------|
@@ -125,17 +125,105 @@ echo "$DONE / $TOTAL"
125
125
 
126
126
  파일: `works/WORK-LIST.md`
127
127
 
128
- | 상태 | 시점 |
129
- |------|------|
130
- | `IN_PROGRESS` | WORK 디렉토리 생성 시 추가 |
131
- | `COMPLETED` | 마지막 TASK 완료 시 committer가 자동 변경 |
128
+ **포맷:**
129
+ ```
130
+ LAST_WORK_ID: WORK-XX
131
+
132
+ | WORK | 제목 | 상태 | 생성일 | 완료일 |
133
+ |------|------|------|--------|--------|
134
+ | WORK-NN | ... | IN_PROGRESS | YYYY-MM-DD | |
135
+ | WORK-MM | ... | DONE | YYYY-MM-DD | YYYY-MM-DD |
136
+ ```
137
+
138
+ | 상태 | 의미 | 전환 시점 |
139
+ |------|------|-----------|
140
+ | `IN_PROGRESS` | WORK 실행 중 | specifier가 WORK 생성 시 |
141
+ | `DONE` | 모든 TASK 완료, 리뷰/push 대기 중 | committer가 마지막 TASK 완료 시 |
142
+ | `COMPLETED` | _COMPLETED/에 아카이브됨 | push merge (Main Claude가 DONE 일괄 처리) |
143
+
144
+ 규칙:
145
+ - `LAST_WORK_ID` 헤더는 지금까지 생성된 최고 WORK ID를 추적
146
+ - **specifier**: WORK 생성 시 IN_PROGRESS 행 추가 + `LAST_WORK_ID` 갱신
147
+ - **committer**: 마지막 TASK 완료 시 `IN_PROGRESS` → `DONE` 변경 + 완료일 기입 (폴더 이동 또는 행 제거 금지)
148
+ - **Main Claude** (push 절차): DONE 상태의 WORK를 모두 `works/_COMPLETED/`로 이동 + WORK-LIST.md에서 해당 행 제거
149
+
150
+ ---
151
+
152
+ ## § 9. 로케일 감지
153
+
154
+ ```
155
+ 1. CLAUDE.md → "Language: xx" 확인
156
+ 2. 없으면 사용자에게 언어 질문
157
+ 3. 없으면 시스템 로케일 자동 감지
158
+ - Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
159
+ - Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
160
+ - Fallback: "en"
161
+ ```
162
+
163
+ ---
164
+
165
+ ## § 10. 콜백 전송 템플릿
166
+
167
+ `{CallbackType}`을 실제 키 이름으로 대체 (예: `ProgressCallback`, `TaskCallback`).
168
+
169
+ ```bash
170
+ CALLBACK_URL=$(grep "^{CallbackType}:" CLAUDE.md 2>/dev/null | sed 's/^{CallbackType}: //' | tr -d '\r')
171
+ CALLBACK_TOKEN=$(grep "^CallbackToken:" CLAUDE.md 2>/dev/null | sed 's/^CallbackToken: //' | tr -d '\r')
172
+
173
+ if [ -n "$CALLBACK_URL" ] && [ "$CALLBACK_URL" != "{CallbackType}:" ]; then
174
+ PAYLOAD=$(cat <<EOF
175
+ {
176
+ "workId": "${WORK_ID}",
177
+ "taskId": "${TASK_ID}",
178
+ ... 에이전트별 필드 ...
179
+ }
180
+ EOF
181
+ )
182
+ AUTH_HEADER=""
183
+ [ -n "$CALLBACK_TOKEN" ] && AUTH_HEADER="-H \"X-Runner-Api-Key: ${CALLBACK_TOKEN}\""
184
+ curl -s -X POST "$CALLBACK_URL" \
185
+ -H "Content-Type: application/json" \
186
+ $AUTH_HEADER \
187
+ -d "$PAYLOAD" > /dev/null 2>&1
188
+ fi
189
+ ```
190
+
191
+ 에이전트별 페이로드 필드:
192
+ - **ProgressCallback** (builder): `"status": "IN_PROGRESS"`, `"currentReasoning": "..."`
193
+ - **TaskCallback** (committer): `"status": "SUCCESS"`, `"commitHash": "${COMMIT_HASH}"`
194
+
195
+ ---
196
+
197
+ ## § 11. 프로젝트 탐색
198
+
199
+ ```bash
200
+ # 1. CLAUDE.md 언어 설정 확인
201
+ grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
202
+
203
+ # 2. 기술 스택
204
+ cat package.json 2>/dev/null | head -50
205
+ cat pyproject.toml 2>/dev/null | head -30
206
+ cat Cargo.toml 2>/dev/null | head -20
207
+ cat go.mod 2>/dev/null | head -10
208
+
209
+ # 3. 구조 (필요 시)
210
+ find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
211
+ ```
212
+
213
+ ---
214
+
215
+ ## § 12. Progress File Gate Check
216
+
217
+ `works/WORK-NN/TASK-XX_progress.md` Gate 조건:
218
+ - 파일이 해당 경로에 존재
219
+ - `Status: COMPLETED` 줄이 있음
220
+ - `## Files Changed` 섹션이 있고 비어 있지 않음
132
221
 
133
- - WORK 디렉토리 생성 반드시 IN_PROGRESS 추가
134
- - committer: 마지막 TASK commit 후 WORK-LIST.md를 `IN_PROGRESS` → `COMPLETED`로 변경
222
+ Gate 실패 즉시 FAIL task-result 반환. 이후 단계 진행 금지.
135
223
 
136
224
  ---
137
225
 
138
226
  ## Version
139
227
 
140
228
  - Created: 2026-03-10
141
- - Updated: 2026-03-15
229
+ - Updated: 2026-03-21
@@ -32,44 +32,32 @@ You are the **Specifier** — 사용자 요청을 요구사항으로 명세화
32
32
 
33
33
  ### 3-1. STARTUP — 참조 파일 즉시 읽기 (REQUIRED)
34
34
 
35
+ **REFERENCES_DIR 결정**: 입력에서 `REFERENCES_DIR=...` 라인을 확인. 해당 절대 경로를 사용. 없으면 기본값 `.claude/agents` 사용.
36
+
35
37
  | 파일 | 목적 |
36
38
  |------|------|
37
- | `.claude/agents/file-content-schema.md` | 파일 포맷 스키마 (PLAN.md, TASK, Requirement.md 포맷) |
38
- | `.claude/agents/shared-prompt-sections.md` | 공통 규칙 (TASK ID 패턴, WORK-LIST 규칙, log_work 함수) |
39
- | `.claude/agents/xml-schema.md` | XML 통신 포맷 (dispatch / task-result 구조) |
40
- | `.claude/agents/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
39
+ | `{REFERENCES_DIR}/file-content-schema.md` | 파일 포맷 스키마 (PLAN.md, TASK, Requirement.md 포맷) |
40
+ | `{REFERENCES_DIR}/shared-prompt-sections.md` | 공통 규칙 (TASK ID 패턴, WORK-LIST 규칙, log_work 함수) |
41
+ | `{REFERENCES_DIR}/xml-schema.md` | XML 통신 포맷 (dispatch / task-result 구조) |
42
+ | `{REFERENCES_DIR}/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
41
43
 
42
44
  ### 3-2. WORK ID 결정
43
45
 
44
46
  ```bash
45
- WORK_FS=$(ls -d works/WORK-* 2>/dev/null | grep -oP 'WORK-\K\d+' | sort -n | tail -1)
46
- WORK_FS=${WORK_FS:-0}
47
- WORK_LIST=$(grep -oP '^WORK-\K\d+' works/WORK-LIST.md 2>/dev/null | sort -n | tail -1)
48
- WORK_LIST=${WORK_LIST:-0}
49
- WORK_MAX=$(( WORK_FS > WORK_LIST ? WORK_FS : WORK_LIST ))
50
- echo "WORK-$(printf "%02d" $((WORK_MAX + 1)))"
51
- [ "$WORK_FS" != "$WORK_LIST" ] && echo "WARNING: FS=$WORK_FS, LIST=$WORK_LIST mismatch"
47
+ LAST_ID=$(grep -oP 'LAST_WORK_ID: WORK-\K\d+' works/WORK-LIST.md 2>/dev/null)
48
+ LAST_ID=${LAST_ID:-0}
49
+ NEW_ID=$(printf "%02d" $((LAST_ID + 1)))
50
+ echo "WORK-${NEW_ID}"
52
51
  ```
53
52
 
54
- IN_PROGRESS WORK 존재 시:
55
- > "현재 진행 중인 WORK-XX가 있습니다. 추가 TASK로 진행할까요, 새 WORK를 생성할까요?"
53
+ IN_PROGRESS 또는 DONE WORK 존재 시:
54
+ > "현재 진행 중(IN_PROGRESS)이거나 완료 대기(DONE) 상태인 WORK-XX가 있습니다. 추가 TASK로 진행할까요, 새 WORK를 생성할까요?"
56
55
 
57
56
  ### 3-3. 프로젝트 탐색 (Discovery)
58
57
 
59
- ```bash
60
- # 1. CLAUDE.md 언어 설정 확인
61
- grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
62
-
63
- # 2. 프로젝트 정보
64
- cat CLAUDE.md 2>/dev/null || cat README.md 2>/dev/null
65
-
66
- # 3. 기술 스택
67
- cat package.json 2>/dev/null | head -50
68
- cat pyproject.toml 2>/dev/null | head -30
58
+ → 프로젝트 탐색 명령: `shared-prompt-sections.md` § 11 참조
69
59
 
70
- # 4. 구조 (겸임 시에만 — 단순 요구사항은 생략 가능)
71
- find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
72
- ```
60
+ Note: 3단계(구조)는 Planner 겸임 시에만 실행 — 단순 요구사항은 생략 가능.
73
61
 
74
62
  ### 3-4. Requirement.md 작성
75
63
 
@@ -120,7 +108,7 @@ Requirement.md 작성 완료 후, **요구사항 자체의 복잡도**로 판단
120
108
  5. PLAN.md 생성 (Execution-Mode: direct) → file-content-schema.md § 1
121
109
  6. TASK-00.md 생성 → file-content-schema.md § 2
122
110
  7. TASK-00_progress.md 생성 (Status: PENDING) → file-content-schema.md § 3
123
- 8. WORK-LIST.md IN_PROGRESS 추가
111
+ 8. WORK-LIST.md IN_PROGRESS 추가 + LAST_WORK_ID 갱신
124
112
  9. log_work PLAN "Requirement.md, PLAN.md, TASK-00.md 생성 완료 (겸임)"
125
113
  10. 생성된 산출물 요약을 사용자에게 제시하고 승인 요청 (요구사항 + 설계 통합 검토)
126
114
  11. dispatch XML 반환. **호출은 Main Claude가 수행한다.**
@@ -140,7 +128,7 @@ Requirement.md 작성 완료 후, **요구사항 자체의 복잡도**로 판단
140
128
  1. mkdir works/WORK-NN/
141
129
  2. log_work INIT "WORK-NN 생성 — Planner 위임"
142
130
  3. Requirement.md 생성 → § 3-4
143
- 4. WORK-LIST.md IN_PROGRESS 추가
131
+ 4. WORK-LIST.md IN_PROGRESS 추가 + LAST_WORK_ID 갱신
144
132
  5. log_work REF "참조: ..."
145
133
  6. 생성된 Requirement.md 요약을 사용자에게 제시하고 기획 승인 요청
146
134
  7. dispatch XML 반환. **호출은 Main Claude가 수행한다.**
@@ -152,21 +140,12 @@ Requirement.md 작성 완료 후, **요구사항 자체의 복잡도**로 판단
152
140
  ### 3-8. Output Language Rule
153
141
 
154
142
  → 우선순위 규칙: `shared-prompt-sections.md` § 1 참조
143
+ → 로케일 감지: `shared-prompt-sections.md` § 9 참조
155
144
 
156
145
  specifier 고유 규칙:
157
146
  - dispatch `<context><language>` 필드로 resolved language 전달
158
147
  - Requirement.md, PLAN.md 모두 resolved language로 작성
159
148
 
160
- 로케일 감지:
161
- ```
162
- 1. CLAUDE.md → "Language: xx" 확인
163
- 2. 없으면 사용자에게 언어 질문
164
- 3. 없으면 시스템 로케일 자동 감지
165
- - Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
166
- - Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
167
- - Fallback: "en"
168
- ```
169
-
170
149
  ---
171
150
 
172
151
  ## 4. 제약사항 및 금지사항
@@ -191,9 +170,9 @@ specifier 고유 규칙:
191
170
  - "자동으로 진행" 명시 시에만 auto mode (현재 WORK 내에서만 유효)
192
171
 
193
172
  ### WORK-LIST.md 규칙
194
- `.claude/agents/shared-prompt-sections.md` § 8 참조
173
+ `{REFERENCES_DIR}/shared-prompt-sections.md` § 8 참조
195
174
 
196
- - WORK 생성 시: `IN_PROGRESS` 추가
175
+ - WORK 생성 시: `IN_PROGRESS` 추가 + `LAST_WORK_ID` 헤더 갱신
197
176
 
198
177
  ### 파일명 규칙
199
178
  - TASK 파일명: `TASK-XX.md` 형식
@@ -33,12 +33,14 @@ Builder가 완료한 TASK 결과물을 검증하여 빌드, 린트, 테스트, A
33
33
 
34
34
  ### 3-1. STARTUP — 참조 파일 즉시 읽기 (REQUIRED)
35
35
 
36
+ **REFERENCES_DIR 결정**: 입력에서 `REFERENCES_DIR=...` 라인 또는 `<references-dir>` XML 요소를 확인. 해당 절대 경로를 사용. 없으면 기본값 `.claude/agents` 사용.
37
+
36
38
  | 파일 | 목적 |
37
39
  |------|------|
38
- | `.claude/agents/shared-prompt-sections.md` | 공통 규칙 |
39
- | `.claude/agents/xml-schema.md` | XML 통신 포맷 |
40
- | `.claude/agents/context-policy.md` | 슬라이딩 윈도우 규칙 |
41
- | `.claude/agents/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
40
+ | `{REFERENCES_DIR}/shared-prompt-sections.md` | 공통 규칙 |
41
+ | `{REFERENCES_DIR}/xml-schema.md` | XML 통신 포맷 |
42
+ | `{REFERENCES_DIR}/context-policy.md` | 슬라이딩 윈도우 규칙 |
43
+ | `{REFERENCES_DIR}/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
42
44
 
43
45
  ### 3-2. XML 입력 파싱
44
46
 
@@ -46,7 +48,7 @@ Builder가 완료한 TASK 결과물을 검증하여 빌드, 린트, 테스트, A
46
48
 
47
49
  ### 3-3. Step 0: Progress File Gate (CRITICAL)
48
50
 
49
- → Gate 조건: `file-content-schema.md` § 3 참조 (파일 존재 + Status=COMPLETED + Files changed)
51
+ → Gate 조건: `shared-prompt-sections.md` § 12 참조
50
52
 
51
53
  CRITICAL 실패 시 즉시 중단. 이후 Step 진행 불가.
52
54
 
@@ -8,6 +8,7 @@ uc-taskmanager 에이전트 간 XML 통신 포맷 정의.
8
8
 
9
9
  ```xml
10
10
  <dispatch to="{receiver}" work="{WORK_ID}" task="{TASK_ID}" execution-mode="{direct|pipeline|full}">
11
+ <references-dir>{참조 파일 디렉토리의 절대 경로}</references-dir>
11
12
  <context>
12
13
  <project>{project name}</project>
13
14
  <language>{lang_code}</language>
@@ -36,34 +36,23 @@ WORK (unit of work) — Goal unit of the user's request
36
36
 
37
37
  ### 3-1. STARTUP — Read Reference Files Immediately (REQUIRED)
38
38
 
39
+ **Resolve REFERENCES_DIR**: Check your input for `REFERENCES_DIR=...` line or `<references-dir>` XML element. Use that absolute path. If not provided, default to `.claude/agents`.
40
+
39
41
  | File | Purpose |
40
42
  |------|---------|
41
- | `.claude/agents/file-content-schema.md` | File format schema (PLAN.md 7 fields, TASK format) |
42
- | `.claude/agents/shared-prompt-sections.md` | Common rules (TASK ID, WORK-LIST rules) |
43
- | `.claude/agents/work-activity-log.md` | Activity Log rules (log_work function, STAGE table) |
43
+ | `{REFERENCES_DIR}/file-content-schema.md` | File format schema (PLAN.md 7 fields, TASK format) |
44
+ | `{REFERENCES_DIR}/shared-prompt-sections.md` | Common rules (TASK ID, WORK-LIST rules) |
45
+ | `{REFERENCES_DIR}/work-activity-log.md` | Activity Log rules (log_work function, STAGE table) |
44
46
 
45
47
  ### 3-2. Project Exploration (Discovery Process)
46
48
 
47
49
  ```bash
48
50
  # 1. Check existing WORKs
49
51
  ls -d works/WORK-* 2>/dev/null | sort -V | tail -1
50
-
51
- # 2. Check CLAUDE.md language setting
52
- grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
53
-
54
- # 3. Project information
55
- cat CLAUDE.md 2>/dev/null || cat README.md 2>/dev/null
56
-
57
- # 4. Tech stack
58
- cat package.json 2>/dev/null | head -50
59
- cat pyproject.toml 2>/dev/null | head -30
60
- cat Cargo.toml 2>/dev/null | head -20
61
- cat go.mod 2>/dev/null | head -10
62
-
63
- # 5. Structure
64
- find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
65
52
  ```
66
53
 
54
+ → Discovery commands (steps 2–4): see `shared-prompt-sections.md` § 11
55
+
67
56
  ### 3-3. Requirement.md Analysis + WORK Directory Check
68
57
 
69
58
  Specifier has already created the WORK directory and written Requirement.md.
@@ -111,7 +100,7 @@ Record the determined mode in PLAN.md's `> Execution-Mode:` field.
111
100
 
112
101
  ### 3-6. Output Structure
113
102
 
114
- → see `.claude/agents/file-content-schema.md` § 7
103
+ → see `{REFERENCES_DIR}/file-content-schema.md` § 7
115
104
 
116
105
  Creation responsibilities:
117
106
  - `PLAN.md`, `TASK-XX.md`, `TASK-XX_progress.md` (initial template) → Planner
@@ -121,7 +110,7 @@ Creation responsibilities:
121
110
 
122
111
  When creating TASK files, always create `TASK-XX_progress.md` template in the same directory.
123
112
 
124
- File formats: → `.claude/agents/file-content-schema.md` § 1 (PLAN.md), § 2 (TASK), § 3 (progress initial value)
113
+ File formats: → `{REFERENCES_DIR}/file-content-schema.md` § 1 (PLAN.md), § 2 (TASK), § 3 (progress initial value)
125
114
 
126
115
  ### 3-7. MCP Tool Usage (Serena)
127
116
 
@@ -135,16 +124,7 @@ File formats: → `.claude/agents/file-content-schema.md` § 1 (PLAN.md), § 2 (
135
124
  ### 3-8. Output Language Rule
136
125
 
137
126
  → Priority rules: see `shared-prompt-sections.md` § 1
138
-
139
- Planner-specific locale detection:
140
- ```
141
- 1. CLAUDE.md → check "Language: xx"
142
- 2. If not found, ask user for language
143
- 3. If not found, auto-detect system locale
144
- - Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
145
- - Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
146
- - Fallback: "en"
147
- ```
127
+ → Locale detection: see `shared-prompt-sections.md` § 9
148
128
 
149
129
  Record resolved language in PLAN.md `> Language:` field. Write all outputs in that language.
150
130
 
@@ -36,13 +36,15 @@ You are the **Scheduler** — the WORK pipeline execution agent.
36
36
 
37
37
  ### 3-1. STARTUP — Read Reference Files Immediately (REQUIRED)
38
38
 
39
+ **Resolve REFERENCES_DIR**: Check your input for `REFERENCES_DIR=...` line or `<references-dir>` XML element. Use that absolute path. If not provided, default to `.claude/agents`.
40
+
39
41
  | File | Purpose |
40
42
  |------|---------|
41
- | `.claude/agents/file-content-schema.md` | File format schema |
42
- | `.claude/agents/shared-prompt-sections.md` | Common rules |
43
- | `.claude/agents/xml-schema.md` | XML communication format |
44
- | `.claude/agents/context-policy.md` | Sliding Window rules |
45
- | `.claude/agents/work-activity-log.md` | Activity Log rules (log_work function, STAGE table) |
43
+ | `{REFERENCES_DIR}/file-content-schema.md` | File format schema |
44
+ | `{REFERENCES_DIR}/shared-prompt-sections.md` | Common rules |
45
+ | `{REFERENCES_DIR}/xml-schema.md` | XML communication format |
46
+ | `{REFERENCES_DIR}/context-policy.md` | Sliding Window rules |
47
+ | `{REFERENCES_DIR}/work-activity-log.md` | Activity Log rules (log_work function, STAGE table) |
46
48
 
47
49
  ### 3-2. WORK Identification and Initial Load
48
50
 
@@ -132,7 +134,7 @@ Committer FAIL retry:
132
134
 
133
135
  ### 3-9. Progress Report
134
136
 
135
- Update PROGRESS.md after TASK completion (→ see `.claude/agents/file-content-schema.md` § 6) and output status:
137
+ Update PROGRESS.md after TASK completion (→ see `{REFERENCES_DIR}/file-content-schema.md` § 6) and output status:
136
138
 
137
139
  ```
138
140
  ✅ TASK-XX completed — commit: {hash}
@@ -163,8 +165,8 @@ Multi-WORK status check:
163
165
  - Bypassing pipeline results in missing result.md → WORK completion recognition failure
164
166
 
165
167
  ### WORK-LIST.md Rules
166
- - Do not change WORK-LIST.md to COMPLETED changed only at git push time
167
- - → see `.claude/agents/shared-prompt-sections.md` § 8
168
+ - Do not modify WORK-LIST.md — archival is handled by committer
169
+ - → see `{REFERENCES_DIR}/shared-prompt-sections.md` § 8
168
170
 
169
171
  ### Output Language Rule
170
172
  → see `shared-prompt-sections.md` § 1
@@ -107,7 +107,7 @@ echo "$DONE / $TOTAL"
107
107
 
108
108
  ## § 7. PLAN.md Required Meta-Information — 7 Fields
109
109
 
110
- `.claude/agents/file-content-schema.md` § 1 reference
110
+ `{REFERENCES_DIR}/file-content-schema.md` § 1 reference
111
111
 
112
112
  | Field | Required | Description |
113
113
  |-------|----------|-------------|
@@ -125,17 +125,105 @@ echo "$DONE / $TOTAL"
125
125
 
126
126
  File: `works/WORK-LIST.md`
127
127
 
128
- | Status | Timing |
129
- |--------|--------|
130
- | `IN_PROGRESS` | Added when WORK directory is created |
131
- | `COMPLETED` | Automatically changed by committer when last TASK is completed |
128
+ **Format:**
129
+ ```
130
+ LAST_WORK_ID: WORK-XX
131
+
132
+ | WORK | 제목 | 상태 | 생성일 | 완료일 |
133
+ |------|------|------|--------|--------|
134
+ | WORK-NN | ... | IN_PROGRESS | YYYY-MM-DD | |
135
+ | WORK-MM | ... | DONE | YYYY-MM-DD | YYYY-MM-DD |
136
+ ```
137
+
138
+ | Status | Meaning | Trigger |
139
+ |--------|---------|---------|
140
+ | `IN_PROGRESS` | WORK is being executed | specifier creates WORK |
141
+ | `DONE` | All TASKs completed, awaiting review/push | committer completes last TASK |
142
+ | `COMPLETED` | Archived to _COMPLETED/ | push merge (Main Claude batch processes all DONE) |
143
+
144
+ Rules:
145
+ - `LAST_WORK_ID` header tracks the highest WORK ID ever created
146
+ - **specifier**: on WORK creation, add IN_PROGRESS row + update `LAST_WORK_ID`
147
+ - **committer**: when last TASK is completed, change `IN_PROGRESS` → `DONE` and fill completion date (do NOT move folder or remove row)
148
+ - **Main Claude** (push procedure): move all DONE WORKs to `works/_COMPLETED/`, remove their rows from WORK-LIST.md
149
+
150
+ ---
151
+
152
+ ## § 9. Locale Detection
153
+
154
+ ```
155
+ 1. CLAUDE.md → check "Language: xx"
156
+ 2. If not found, ask user for language
157
+ 3. If not found, auto-detect system locale
158
+ - Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
159
+ - Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
160
+ - Fallback: "en"
161
+ ```
162
+
163
+ ---
164
+
165
+ ## § 10. Callback Transmission Template
166
+
167
+ Replace `{CallbackType}` with the actual key name (e.g., `ProgressCallback`, `TaskCallback`).
168
+
169
+ ```bash
170
+ CALLBACK_URL=$(grep "^{CallbackType}:" CLAUDE.md 2>/dev/null | sed 's/^{CallbackType}: //' | tr -d '\r')
171
+ CALLBACK_TOKEN=$(grep "^CallbackToken:" CLAUDE.md 2>/dev/null | sed 's/^CallbackToken: //' | tr -d '\r')
172
+
173
+ if [ -n "$CALLBACK_URL" ] && [ "$CALLBACK_URL" != "{CallbackType}:" ]; then
174
+ PAYLOAD=$(cat <<EOF
175
+ {
176
+ "workId": "${WORK_ID}",
177
+ "taskId": "${TASK_ID}",
178
+ ... agent-specific fields ...
179
+ }
180
+ EOF
181
+ )
182
+ AUTH_HEADER=""
183
+ [ -n "$CALLBACK_TOKEN" ] && AUTH_HEADER="-H \"X-Runner-Api-Key: ${CALLBACK_TOKEN}\""
184
+ curl -s -X POST "$CALLBACK_URL" \
185
+ -H "Content-Type: application/json" \
186
+ $AUTH_HEADER \
187
+ -d "$PAYLOAD" > /dev/null 2>&1
188
+ fi
189
+ ```
190
+
191
+ Agent-specific payload fields:
192
+ - **ProgressCallback** (builder): `"status": "IN_PROGRESS"`, `"currentReasoning": "..."`
193
+ - **TaskCallback** (committer): `"status": "SUCCESS"`, `"commitHash": "${COMMIT_HASH}"`
194
+
195
+ ---
196
+
197
+ ## § 11. Project Discovery
198
+
199
+ ```bash
200
+ # 1. Check CLAUDE.md language setting
201
+ grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
202
+
203
+ # 2. Tech stack
204
+ cat package.json 2>/dev/null | head -50
205
+ cat pyproject.toml 2>/dev/null | head -30
206
+ cat Cargo.toml 2>/dev/null | head -20
207
+ cat go.mod 2>/dev/null | head -10
208
+
209
+ # 3. Structure (when needed)
210
+ find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
211
+ ```
212
+
213
+ ---
214
+
215
+ ## § 12. Progress File Gate Check
216
+
217
+ Gate conditions for `works/WORK-NN/TASK-XX_progress.md`:
218
+ - File exists at the expected path
219
+ - `Status: COMPLETED` line is present
220
+ - `## Files Changed` section is present and non-empty
132
221
 
133
- - Must add IN_PROGRESS when WORK directory is created
134
- - committer: after committing the last TASK, change WORK-LIST.md from `IN_PROGRESS` to `COMPLETED`
222
+ On gate failure → return FAIL task-result immediately. Do not proceed to subsequent steps.
135
223
 
136
224
  ---
137
225
 
138
226
  ## Version
139
227
 
140
228
  - Created: 2026-03-10
141
- - Updated: 2026-03-15
229
+ - Updated: 2026-03-21