uctm 1.3.0 → 1.4.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/agents/agent-flow.md +236 -0
- package/agents/{en/builder.md → builder.md} +30 -28
- package/agents/committer.md +209 -0
- package/agents/{en/context-policy.md → context-policy.md} +1 -1
- package/agents/{en/file-content-schema.md → file-content-schema.md} +0 -1
- package/agents/ko/agent-flow.md +43 -11
- package/agents/ko/builder.md +23 -28
- package/agents/ko/committer.md +75 -75
- package/agents/ko/context-policy.md +1 -1
- package/agents/ko/file-content-schema.md +0 -1
- package/agents/ko/planner.md +25 -32
- package/agents/ko/scheduler.md +26 -10
- package/agents/ko/shared-prompt-sections.md +119 -8
- package/agents/ko/specifier.md +34 -42
- package/agents/ko/verifier.md +20 -7
- package/agents/ko/work-activity-log.md +14 -12
- package/agents/ko/xml-schema.md +1 -0
- package/agents/{en/planner.md → planner.md} +25 -32
- package/agents/{en/scheduler.md → scheduler.md} +26 -10
- package/agents/shared-prompt-sections.md +252 -0
- package/agents/{en/specifier.md → specifier.md} +34 -42
- package/agents/{en/verifier.md → verifier.md} +27 -7
- package/agents/{en/work-activity-log.md → work-activity-log.md} +14 -12
- package/agents/{en/xml-schema.md → xml-schema.md} +51 -0
- package/bin/cli.mjs +2 -2
- package/lib/constants.mjs +66 -0
- package/lib/init.mjs +64 -2
- package/package.json +2 -3
- package/README.md +0 -947
- package/agents/en/agent-flow.md +0 -152
- package/agents/en/committer.md +0 -202
- package/agents/en/shared-prompt-sections.md +0 -141
package/agents/ko/specifier.md
CHANGED
|
@@ -32,44 +32,43 @@ You are the **Specifier** — 사용자 요청을 요구사항으로 명세화
|
|
|
32
32
|
|
|
33
33
|
### 3-1. STARTUP — 참조 파일 즉시 읽기 (REQUIRED)
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
**REFERENCES_DIR 결정**: 입력에서 `REFERENCES_DIR=...` 라인을 확인. 해당 절대 경로를 사용. 없으면 기본값 `.claude/agents` 사용.
|
|
36
|
+
|
|
37
|
+
#### Reference Loading (ref-cache)
|
|
38
|
+
|
|
39
|
+
1. 수신한 dispatch XML에 `<ref-cache>`가 있는지 확인한다
|
|
40
|
+
2. 필요한 참조 파일별로:
|
|
41
|
+
- ref-cache에 있으면 → **파일 읽기 SKIP**, 캐시된 내용 사용
|
|
42
|
+
- ref-cache에 없으면 → `{REFERENCES_DIR}/{filename}.md`에서 읽고 ref-cache에 추가
|
|
43
|
+
3. 작업 완료 시 병합된 `<ref-cache>`를 반환 dispatch XML에 포함한다
|
|
44
|
+
4. **하위 호환성**: dispatch에 `<ref-cache>`가 없으면 기존 방식대로 모든 참조 파일을 읽는다 (기존 동작 유지)
|
|
45
|
+
|
|
46
|
+
이 에이전트의 필수 참조 파일:
|
|
47
|
+
|
|
48
|
+
| 파일 | ref-cache key |
|
|
49
|
+
|------|---------------|
|
|
50
|
+
| `{REFERENCES_DIR}/file-content-schema.md` | `file-content-schema` |
|
|
51
|
+
| `{REFERENCES_DIR}/shared-prompt-sections.md` | `shared-prompt-sections` |
|
|
52
|
+
| `{REFERENCES_DIR}/xml-schema.md` | `xml-schema` |
|
|
53
|
+
| `{REFERENCES_DIR}/work-activity-log.md` | `work-activity-log` |
|
|
41
54
|
|
|
42
55
|
### 3-2. WORK ID 결정
|
|
43
56
|
|
|
44
57
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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"
|
|
58
|
+
LAST_ID=$(grep -oP 'LAST_WORK_ID: WORK-\K\d+' works/WORK-LIST.md 2>/dev/null)
|
|
59
|
+
LAST_ID=${LAST_ID:-0}
|
|
60
|
+
NEW_ID=$(printf "%02d" $((LAST_ID + 1)))
|
|
61
|
+
echo "WORK-${NEW_ID}"
|
|
52
62
|
```
|
|
53
63
|
|
|
54
|
-
IN_PROGRESS WORK 존재 시:
|
|
55
|
-
> "현재 진행
|
|
64
|
+
IN_PROGRESS 또는 DONE WORK 존재 시:
|
|
65
|
+
> "현재 진행 중(IN_PROGRESS)이거나 완료 대기(DONE) 상태인 WORK-XX가 있습니다. 추가 TASK로 진행할까요, 새 WORK를 생성할까요?"
|
|
56
66
|
|
|
57
67
|
### 3-3. 프로젝트 탐색 (Discovery)
|
|
58
68
|
|
|
59
|
-
|
|
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
|
|
69
|
+
→ 프로젝트 탐색 명령: `shared-prompt-sections.md` § 11 참조
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
|
|
72
|
-
```
|
|
71
|
+
Note: 3단계(구조)는 Planner 겸임 시에만 실행 — 단순 요구사항은 생략 가능.
|
|
73
72
|
|
|
74
73
|
### 3-4. Requirement.md 작성
|
|
75
74
|
|
|
@@ -120,7 +119,7 @@ Requirement.md 작성 완료 후, **요구사항 자체의 복잡도**로 판단
|
|
|
120
119
|
5. PLAN.md 생성 (Execution-Mode: direct) → file-content-schema.md § 1
|
|
121
120
|
6. TASK-00.md 생성 → file-content-schema.md § 2
|
|
122
121
|
7. TASK-00_progress.md 생성 (Status: PENDING) → file-content-schema.md § 3
|
|
123
|
-
8. WORK-LIST.md IN_PROGRESS 추가
|
|
122
|
+
8. WORK-LIST.md IN_PROGRESS 행 추가 + LAST_WORK_ID 갱신
|
|
124
123
|
9. log_work PLAN "Requirement.md, PLAN.md, TASK-00.md 생성 완료 (겸임)"
|
|
125
124
|
10. 생성된 산출물 요약을 사용자에게 제시하고 승인 요청 (요구사항 + 설계 통합 검토)
|
|
126
125
|
11. dispatch XML 반환. **호출은 Main Claude가 수행한다.**
|
|
@@ -128,6 +127,7 @@ Requirement.md 작성 완료 후, **요구사항 자체의 복잡도**로 판단
|
|
|
128
127
|
```
|
|
129
128
|
|
|
130
129
|
→ dispatch XML 포맷: `xml-schema.md` § 1 참조 (to="builder", task="TASK-00", execution-mode="direct")
|
|
130
|
+
→ 로드한 모든 참조 파일을 포함한 `<ref-cache>` 추가 (`xml-schema.md` § 6 참조)
|
|
131
131
|
|
|
132
132
|
### 3-7. Planner 위임 — 복잡 요구사항 (pipeline/full)
|
|
133
133
|
|
|
@@ -140,7 +140,7 @@ Requirement.md 작성 완료 후, **요구사항 자체의 복잡도**로 판단
|
|
|
140
140
|
1. mkdir works/WORK-NN/
|
|
141
141
|
2. log_work INIT "WORK-NN 생성 — Planner 위임"
|
|
142
142
|
3. Requirement.md 생성 → § 3-4
|
|
143
|
-
4. WORK-LIST.md IN_PROGRESS 추가
|
|
143
|
+
4. WORK-LIST.md IN_PROGRESS 행 추가 + LAST_WORK_ID 갱신
|
|
144
144
|
5. log_work REF "참조: ..."
|
|
145
145
|
6. 생성된 Requirement.md 요약을 사용자에게 제시하고 기획 승인 요청
|
|
146
146
|
7. dispatch XML 반환. **호출은 Main Claude가 수행한다.**
|
|
@@ -148,25 +148,17 @@ Requirement.md 작성 완료 후, **요구사항 자체의 복잡도**로 판단
|
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
→ dispatch XML 포맷: `xml-schema.md` § 1 참조 (to="planner", execution-mode="full")
|
|
151
|
+
→ 로드한 모든 참조 파일을 포함한 `<ref-cache>` 추가 (`xml-schema.md` § 6 참조)
|
|
151
152
|
|
|
152
153
|
### 3-8. Output Language Rule
|
|
153
154
|
|
|
154
155
|
→ 우선순위 규칙: `shared-prompt-sections.md` § 1 참조
|
|
156
|
+
→ 로케일 감지: `shared-prompt-sections.md` § 9 참조
|
|
155
157
|
|
|
156
158
|
specifier 고유 규칙:
|
|
157
159
|
- dispatch `<context><language>` 필드로 resolved language 전달
|
|
158
160
|
- Requirement.md, PLAN.md 모두 resolved language로 작성
|
|
159
161
|
|
|
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
162
|
---
|
|
171
163
|
|
|
172
164
|
## 4. 제약사항 및 금지사항
|
|
@@ -191,9 +183,9 @@ specifier 고유 규칙:
|
|
|
191
183
|
- "자동으로 진행" 명시 시에만 auto mode (현재 WORK 내에서만 유효)
|
|
192
184
|
|
|
193
185
|
### WORK-LIST.md 규칙
|
|
194
|
-
→
|
|
186
|
+
→ `{REFERENCES_DIR}/shared-prompt-sections.md` § 8 참조
|
|
195
187
|
|
|
196
|
-
- WORK 생성 시: `IN_PROGRESS` 추가
|
|
188
|
+
- WORK 생성 시: `IN_PROGRESS` 행 추가 + `LAST_WORK_ID` 헤더 갱신
|
|
197
189
|
|
|
198
190
|
### 파일명 규칙
|
|
199
191
|
- TASK 파일명: `TASK-XX.md` 형식
|
package/agents/ko/verifier.md
CHANGED
|
@@ -33,12 +33,25 @@ Builder가 완료한 TASK 결과물을 검증하여 빌드, 린트, 테스트, A
|
|
|
33
33
|
|
|
34
34
|
### 3-1. STARTUP — 참조 파일 즉시 읽기 (REQUIRED)
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
**REFERENCES_DIR 결정**: 입력에서 `REFERENCES_DIR=...` 라인 또는 `<references-dir>` XML 요소를 확인. 해당 절대 경로를 사용. 없으면 기본값 `.claude/agents` 사용.
|
|
37
|
+
|
|
38
|
+
#### Reference Loading (ref-cache)
|
|
39
|
+
|
|
40
|
+
1. 수신한 dispatch XML에 `<ref-cache>`가 있는지 확인한다
|
|
41
|
+
2. 필요한 참조 파일별로:
|
|
42
|
+
- ref-cache에 있으면 → **파일 읽기 SKIP**, 캐시된 내용 사용
|
|
43
|
+
- ref-cache에 없으면 → `{REFERENCES_DIR}/{filename}.md`에서 읽고 ref-cache에 추가
|
|
44
|
+
3. 작업 완료 시 병합된 `<ref-cache>`를 반환 task-result XML에 포함한다
|
|
45
|
+
4. **하위 호환성**: dispatch에 `<ref-cache>`가 없으면 기존 방식대로 모든 참조 파일을 읽는다 (기존 동작 유지)
|
|
46
|
+
|
|
47
|
+
이 에이전트의 필수 참조 파일:
|
|
48
|
+
|
|
49
|
+
| 파일 | ref-cache key |
|
|
50
|
+
|------|---------------|
|
|
51
|
+
| `{REFERENCES_DIR}/shared-prompt-sections.md` | `shared-prompt-sections` |
|
|
52
|
+
| `{REFERENCES_DIR}/xml-schema.md` | `xml-schema` |
|
|
53
|
+
| `{REFERENCES_DIR}/context-policy.md` | `context-policy` |
|
|
54
|
+
| `{REFERENCES_DIR}/work-activity-log.md` | `work-activity-log` |
|
|
42
55
|
|
|
43
56
|
### 3-2. XML 입력 파싱
|
|
44
57
|
|
|
@@ -46,7 +59,7 @@ Builder가 완료한 TASK 결과물을 검증하여 빌드, 린트, 테스트, A
|
|
|
46
59
|
|
|
47
60
|
### 3-3. Step 0: Progress File Gate (CRITICAL)
|
|
48
61
|
|
|
49
|
-
→ Gate 조건: `
|
|
62
|
+
→ Gate 조건: `shared-prompt-sections.md` § 12 참조
|
|
50
63
|
|
|
51
64
|
CRITICAL 실패 시 즉시 중단. 이후 Step 진행 불가.
|
|
52
65
|
|
|
@@ -10,19 +10,21 @@
|
|
|
10
10
|
* 작업 진행 시 : 작업항목 및 작업내용
|
|
11
11
|
* 수행작업 완료 시 : 타 Agent에 전송한 프롬프트 메시지** Agent 시작 시 수신한 프롬프트 메시지 내용 (Required 필수)
|
|
12
12
|
|
|
13
|
-
## log_work
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
log_work() {
|
|
19
|
-
local WORK_ID="$1" AGENT="$2" STAGE="$3" DESC="$4"
|
|
20
|
-
mkdir -p "works/${WORK_ID}"
|
|
21
|
-
printf '[%s]_%s_%s_%s\n' \
|
|
22
|
-
"$(date '+%Y-%m-%dT%H:%M:%S')" "$AGENT" "$STAGE" "$DESC" \
|
|
23
|
-
>> "works/${WORK_ID}/work_${WORK_ID}.log"
|
|
24
|
-
}
|
|
13
|
+
## log_work 방법
|
|
14
|
+
|
|
15
|
+
Activity log 기록에 **Bash를 사용하지 않는다**. `Write` 도구 (또는 `Edit` 도구로 추가)를 사용한다.
|
|
16
|
+
|
|
17
|
+
각 로그 항목 포맷:
|
|
25
18
|
```
|
|
19
|
+
[YYYY-MM-DDTHH:MM:SS]_AGENT_STAGE_설명
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
예시: INIT 단계 로그 기록 시, **Write** 도구로 `works/{WORK_ID}/work_{WORK_ID}.log`에 추가:
|
|
23
|
+
```
|
|
24
|
+
[2026-03-28T14:30:00]_SPECIFIER_INIT_WORK-09 생성 — Execution-Mode: direct
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
→ **Bash 명령 규칙: `shared-prompt-sections.md` § 13 참조**
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
package/agents/ko/xml-schema.md
CHANGED
|
@@ -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,34 @@ 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
|
-
|
|
40
|
-
|------|---------|
|
|
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) |
|
|
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`.
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
#### Reference Loading (ref-cache)
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
1. Check if `<ref-cache>` exists in the received dispatch XML
|
|
44
|
+
2. For each required reference file:
|
|
45
|
+
- If present in ref-cache → **SKIP file read**, use cached content
|
|
46
|
+
- If absent from ref-cache → Read from `{REFERENCES_DIR}/{filename}.md` and add to ref-cache
|
|
47
|
+
3. On task completion, include the merged `<ref-cache>` in the returned task-result XML
|
|
48
|
+
4. **Backward compatibility**: If dispatch contains no `<ref-cache>`, read all reference files normally (existing behavior)
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
|
|
50
|
+
Required reference files for this agent:
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
| File | ref-cache key |
|
|
53
|
+
|------|---------------|
|
|
54
|
+
| `{REFERENCES_DIR}/file-content-schema.md` | `file-content-schema` |
|
|
55
|
+
| `{REFERENCES_DIR}/shared-prompt-sections.md` | `shared-prompt-sections` |
|
|
56
|
+
| `{REFERENCES_DIR}/work-activity-log.md` | `work-activity-log` |
|
|
56
57
|
|
|
57
|
-
|
|
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
|
|
58
|
+
### 3-2. Project Exploration (Discovery Process)
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
```bash
|
|
61
|
+
# 1. Check existing WORKs
|
|
62
|
+
ls -d works/WORK-* 2>/dev/null | sort -V | tail -1
|
|
65
63
|
```
|
|
66
64
|
|
|
65
|
+
→ Discovery commands (steps 2–4): see `shared-prompt-sections.md` § 11
|
|
66
|
+
|
|
67
67
|
### 3-3. Requirement.md Analysis + WORK Directory Check
|
|
68
68
|
|
|
69
69
|
Specifier has already created the WORK directory and written Requirement.md.
|
|
@@ -109,9 +109,11 @@ Record the determined mode in PLAN.md's `> Execution-Mode:` field.
|
|
|
109
109
|
4. Completion report: "{WORK-ID} plan created. Start with `Run {WORK-ID} pipeline`."
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
+
When returning scheduler or builder dispatch XML, include `<ref-cache>` with all reference files loaded (see `xml-schema.md` § 6).
|
|
113
|
+
|
|
112
114
|
### 3-6. Output Structure
|
|
113
115
|
|
|
114
|
-
→ see
|
|
116
|
+
→ see `{REFERENCES_DIR}/file-content-schema.md` § 7
|
|
115
117
|
|
|
116
118
|
Creation responsibilities:
|
|
117
119
|
- `PLAN.md`, `TASK-XX.md`, `TASK-XX_progress.md` (initial template) → Planner
|
|
@@ -121,7 +123,7 @@ Creation responsibilities:
|
|
|
121
123
|
|
|
122
124
|
When creating TASK files, always create `TASK-XX_progress.md` template in the same directory.
|
|
123
125
|
|
|
124
|
-
File formats: →
|
|
126
|
+
File formats: → `{REFERENCES_DIR}/file-content-schema.md` § 1 (PLAN.md), § 2 (TASK), § 3 (progress initial value)
|
|
125
127
|
|
|
126
128
|
### 3-7. MCP Tool Usage (Serena)
|
|
127
129
|
|
|
@@ -135,16 +137,7 @@ File formats: → `.claude/agents/file-content-schema.md` § 1 (PLAN.md), § 2 (
|
|
|
135
137
|
### 3-8. Output Language Rule
|
|
136
138
|
|
|
137
139
|
→ 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
|
-
```
|
|
140
|
+
→ Locale detection: see `shared-prompt-sections.md` § 9
|
|
148
141
|
|
|
149
142
|
Record resolved language in PLAN.md `> Language:` field. Write all outputs in that language.
|
|
150
143
|
|
|
@@ -36,13 +36,26 @@ You are the **Scheduler** — the WORK pipeline execution agent.
|
|
|
36
36
|
|
|
37
37
|
### 3-1. STARTUP — Read Reference Files Immediately (REQUIRED)
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
|
|
41
|
+
#### Reference Loading (ref-cache)
|
|
42
|
+
|
|
43
|
+
1. Check if `<ref-cache>` exists in the received dispatch XML
|
|
44
|
+
2. For each required reference file:
|
|
45
|
+
- If present in ref-cache → **SKIP file read**, use cached content
|
|
46
|
+
- If absent from ref-cache → Read from `{REFERENCES_DIR}/{filename}.md` and add to ref-cache
|
|
47
|
+
3. On task completion, include the merged `<ref-cache>` in the returned task-result XML
|
|
48
|
+
4. **Backward compatibility**: If dispatch contains no `<ref-cache>`, read all reference files normally (existing behavior)
|
|
49
|
+
|
|
50
|
+
Required reference files for this agent:
|
|
51
|
+
|
|
52
|
+
| File | ref-cache key |
|
|
53
|
+
|------|---------------|
|
|
54
|
+
| `{REFERENCES_DIR}/file-content-schema.md` | `file-content-schema` |
|
|
55
|
+
| `{REFERENCES_DIR}/shared-prompt-sections.md` | `shared-prompt-sections` |
|
|
56
|
+
| `{REFERENCES_DIR}/xml-schema.md` | `xml-schema` |
|
|
57
|
+
| `{REFERENCES_DIR}/context-policy.md` | `context-policy` |
|
|
58
|
+
| `{REFERENCES_DIR}/work-activity-log.md` | `work-activity-log` |
|
|
46
59
|
|
|
47
60
|
### 3-2. WORK Identification and Initial Load
|
|
48
61
|
|
|
@@ -86,6 +99,7 @@ Process only TASKs within the WORK. Access to other WORKs prohibited.
|
|
|
86
99
|
Send Pipeline Stage Callback before each stage starts (see § 3-6).
|
|
87
100
|
|
|
88
101
|
→ dispatch XML format: see `xml-schema.md` § 1 (to="builder", action="implement")
|
|
102
|
+
→ Include `<ref-cache>` from previous task-result in dispatch XML (see `xml-schema.md` § 6 and `agent-flow.md` ref-cache Chain Propagation)
|
|
89
103
|
|
|
90
104
|
Generate the dispatch XML below and return it. **Invocation is performed by Main Claude.**
|
|
91
105
|
|
|
@@ -113,6 +127,7 @@ FAIL → retry builder (max 3 times). 3 failures → pipeline halted.
|
|
|
113
127
|
|
|
114
128
|
→ dispatch XML format: see `xml-schema.md` § 1 (to="verifier", action="verify")
|
|
115
129
|
→ Sliding Window (Builder→Verifier): see `context-policy.md` Scheduler Dispatch section
|
|
130
|
+
→ Include `<ref-cache>` from builder task-result in dispatch XML (see `xml-schema.md` § 6)
|
|
116
131
|
|
|
117
132
|
Generate the dispatch XML below and return it. **Invocation is performed by Main Claude.**
|
|
118
133
|
|
|
@@ -121,6 +136,7 @@ Generate the dispatch XML below and return it. **Invocation is performed by Main
|
|
|
121
136
|
→ dispatch XML format: see `xml-schema.md` § 1 (to="committer", action="commit")
|
|
122
137
|
→ Sliding Window (Verifier FULL + Builder SUMMARY): see `context-policy.md` Scheduler Dispatch section
|
|
123
138
|
→ Inter-TASK Dependency Transfer: see `context-policy.md` Inter-TASK Dependency Transfer section
|
|
139
|
+
→ Include `<ref-cache>` from verifier task-result in dispatch XML (see `xml-schema.md` § 6)
|
|
124
140
|
|
|
125
141
|
Generate the dispatch XML below and return it. **Invocation is performed by Main Claude.**
|
|
126
142
|
|
|
@@ -132,7 +148,7 @@ Committer FAIL retry:
|
|
|
132
148
|
|
|
133
149
|
### 3-9. Progress Report
|
|
134
150
|
|
|
135
|
-
Update PROGRESS.md after TASK completion (→ see
|
|
151
|
+
Update PROGRESS.md after TASK completion (→ see `{REFERENCES_DIR}/file-content-schema.md` § 6) and output status:
|
|
136
152
|
|
|
137
153
|
```
|
|
138
154
|
✅ TASK-XX completed — commit: {hash}
|
|
@@ -163,8 +179,8 @@ Multi-WORK status check:
|
|
|
163
179
|
- Bypassing pipeline results in missing result.md → WORK completion recognition failure
|
|
164
180
|
|
|
165
181
|
### WORK-LIST.md Rules
|
|
166
|
-
- Do not
|
|
167
|
-
- → see
|
|
182
|
+
- Do not modify WORK-LIST.md — archival is handled by committer
|
|
183
|
+
- → see `{REFERENCES_DIR}/shared-prompt-sections.md` § 8
|
|
168
184
|
|
|
169
185
|
### Output Language Rule
|
|
170
186
|
→ see `shared-prompt-sections.md` § 1
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Shared Prompt Sections
|
|
2
|
+
|
|
3
|
+
Common reusable sections. Each agent references these via `cache_control` markers.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## § 1. Output Language Rule
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Priority: PLAN.md > Language: → CLAUDE.md ## Language → en (default)
|
|
11
|
+
|
|
12
|
+
On dispatch: pass resolved language code in <context><language> field
|
|
13
|
+
Section headers (##) are also written in the resolved language (refer to language mapping table)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## § 2. Build and Lint Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Auto-detect Build (execute only if script exists)
|
|
22
|
+
if [ -f "package.json" ]; then
|
|
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
|
+
npm run build 2>&1 || bun run build 2>&1 || yarn build 2>&1
|
|
25
|
+
fi
|
|
26
|
+
elif [ -f "Cargo.toml" ]; then
|
|
27
|
+
cargo build 2>&1
|
|
28
|
+
elif [ -f "go.mod" ]; then
|
|
29
|
+
go build ./... 2>&1
|
|
30
|
+
elif [ -f "pyproject.toml" ] || [ -f "setup.py" ]; then
|
|
31
|
+
python -m py_compile $(find . -name "*.py" -not -path "*/venv/*" | head -20) 2>&1
|
|
32
|
+
elif [ -f "Makefile" ]; then
|
|
33
|
+
make build 2>&1 || make 2>&1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# Auto-detect Lint (execute only if script exists)
|
|
37
|
+
if [ -f "package.json" ]; then
|
|
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
|
+
npm run lint 2>&1 || bun run lint 2>&1 || true
|
|
40
|
+
fi
|
|
41
|
+
elif [ -f "pyproject.toml" ]; then
|
|
42
|
+
ruff check . 2>&1 || python -m flake8 . 2>&1 || true
|
|
43
|
+
fi
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- If build/lint scripts do not exist → **skip (treat as N/A)**.
|
|
47
|
+
- On build/lint failure, always fix before reporting.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## § 3. WORK and TASK File Path Patterns
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
works/{WORK_ID}/
|
|
55
|
+
├─ Requirement.md # Created by Specifier (mandatory)
|
|
56
|
+
├─ PLAN.md
|
|
57
|
+
├─ PROGRESS.md
|
|
58
|
+
├─ TASK-00.md # No WORK prefix
|
|
59
|
+
├─ TASK-00_progress.md # Separator: underscore
|
|
60
|
+
├─ TASK-00_result.md # Separator: underscore
|
|
61
|
+
└─ TASK-01.md ...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- WORK ID: `WORK-NN` (e.g., `WORK-03`)
|
|
65
|
+
- TASK ID: `TASK-NN` (e.g., `TASK-00`) — WORK prefix must NOT be included
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## § 4. File System Discovery Scripts
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Find latest WORK with incomplete TASKs
|
|
73
|
+
for dir in $(ls -d works/WORK-* 2>/dev/null | sort -V -r); do
|
|
74
|
+
WORK_ID=$(basename $dir)
|
|
75
|
+
TOTAL=$(ls $dir/TASK-*.md 2>/dev/null | grep -v result | wc -l)
|
|
76
|
+
DONE=$(ls $dir/TASK-*_result.md 2>/dev/null | wc -l)
|
|
77
|
+
[ "$DONE" -lt "$TOTAL" ] && echo "$WORK_ID" && break
|
|
78
|
+
done
|
|
79
|
+
|
|
80
|
+
# List all WORKs
|
|
81
|
+
ls -d works/WORK-* 2>/dev/null | sort -V
|
|
82
|
+
|
|
83
|
+
# TASK completion status
|
|
84
|
+
TOTAL=$(ls works/${WORK_ID}/TASK-*.md 2>/dev/null | grep -v result | wc -l)
|
|
85
|
+
DONE=$(ls works/${WORK_ID}/TASK-*_result.md 2>/dev/null | wc -l)
|
|
86
|
+
echo "$DONE / $TOTAL"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## § 5. Task Result XML Format
|
|
92
|
+
|
|
93
|
+
```xml
|
|
94
|
+
<task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
|
|
95
|
+
<summary>{1-2 line summary}</summary>
|
|
96
|
+
<files-changed>
|
|
97
|
+
<file action="{created|modified|deleted}" path="{path}">{description}</file>
|
|
98
|
+
</files-changed>
|
|
99
|
+
<verification>
|
|
100
|
+
<check name="{type}" status="{PASS|FAIL|N/A}">{details}</check>
|
|
101
|
+
</verification>
|
|
102
|
+
<notes>{notes for next steps}</notes>
|
|
103
|
+
</task-result>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## § 7. PLAN.md Required Meta-Information — 7 Fields
|
|
109
|
+
|
|
110
|
+
→ `{REFERENCES_DIR}/file-content-schema.md` § 1 reference
|
|
111
|
+
|
|
112
|
+
| Field | Required | Description |
|
|
113
|
+
|-------|----------|-------------|
|
|
114
|
+
| `> Created:` | ✅ | YYYY-MM-DD |
|
|
115
|
+
| `> Requirement:` | ✅ | `REQ-XXX` or user request text |
|
|
116
|
+
| `> Execution-Mode:` | ✅ | `direct` / `pipeline` / `full` |
|
|
117
|
+
| `> Project:` | ✅ | Project name |
|
|
118
|
+
| `> Tech Stack:` | ✅ | Detected tech stack |
|
|
119
|
+
| `> Language:` | ✅ | Language code (`ko`, `en`, etc.) |
|
|
120
|
+
| `> Status:` | ✅ | Always starts as `PLANNED` |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## § 8. WORK-LIST.md Update Rules
|
|
125
|
+
|
|
126
|
+
File: `works/WORK-LIST.md`
|
|
127
|
+
|
|
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
|
+
→ **Bash command rules: see § 13** — each step below is a separate tool call.
|
|
168
|
+
|
|
169
|
+
Replace `{CallbackType}` with the actual key name (e.g., `ProgressCallback`, `TaskCallback`).
|
|
170
|
+
|
|
171
|
+
**Step 1.** Use `Grep` tool to find `{CallbackType}:` line in CLAUDE.md. If not found, skip callback entirely.
|
|
172
|
+
|
|
173
|
+
**Step 2.** Use `Grep` tool to find `CallbackToken:` line in CLAUDE.md (optional).
|
|
174
|
+
|
|
175
|
+
**Step 3.** Send callback with a single `curl` command:
|
|
176
|
+
```bash
|
|
177
|
+
curl -s -X POST "CALLBACK_URL" -H "Content-Type: application/json" -H "X-Runner-Api-Key: TOKEN" -d '{"workId":"WORK-01","taskId":"TASK-00",...}'
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Agent-specific payload fields:
|
|
181
|
+
- **ProgressCallback** (builder): `"status": "IN_PROGRESS"`, `"currentReasoning": "..."`
|
|
182
|
+
- **TaskCallback** (committer): `"status": "SUCCESS"`, `"commitHash": "${COMMIT_HASH}"`
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## § 11. Project Discovery
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# 1. Check CLAUDE.md language setting
|
|
190
|
+
grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
|
|
191
|
+
|
|
192
|
+
# 2. Tech stack
|
|
193
|
+
cat package.json 2>/dev/null | head -50
|
|
194
|
+
cat pyproject.toml 2>/dev/null | head -30
|
|
195
|
+
cat Cargo.toml 2>/dev/null | head -20
|
|
196
|
+
cat go.mod 2>/dev/null | head -10
|
|
197
|
+
|
|
198
|
+
# 3. Structure (when needed)
|
|
199
|
+
find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## § 12. Progress File Gate Check
|
|
205
|
+
|
|
206
|
+
Gate conditions for `works/WORK-NN/TASK-XX_progress.md`:
|
|
207
|
+
- File exists at the expected path
|
|
208
|
+
- `Status: COMPLETED` line is present
|
|
209
|
+
- `## Files Changed` section is present and non-empty
|
|
210
|
+
|
|
211
|
+
On gate failure → return FAIL task-result immediately. Do not proceed to subsequent steps.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## § 13. Bash Command Rules
|
|
216
|
+
|
|
217
|
+
Bash commands MUST follow these rules for permission compatibility.
|
|
218
|
+
|
|
219
|
+
**MANDATORY:**
|
|
220
|
+
- One simple command per Bash call — NO compound commands (`&&`, `||`, `;`, `|`)
|
|
221
|
+
- NO `cd dir && command` — you are already in the project root
|
|
222
|
+
- NO multi-line scripts — split into separate Bash calls
|
|
223
|
+
- NO sub-shell expansions in arguments — e.g., `$(date ...)` inside `printf`
|
|
224
|
+
- Use relative paths from project root (e.g., `works/WORK-01/`) — NO absolute paths
|
|
225
|
+
- Use `git add file`, `git commit -m "msg"` — NO `git -C path` flag
|
|
226
|
+
|
|
227
|
+
**For file operations, prefer dedicated tools over Bash:**
|
|
228
|
+
- Read files → `Read` tool (NOT `cat`)
|
|
229
|
+
- Write/append files → `Write` tool (NOT `echo >>` or `printf >>`)
|
|
230
|
+
- Edit files → `Edit` tool (NOT `sed -i`)
|
|
231
|
+
- Search files → `Grep` tool (NOT `grep`)
|
|
232
|
+
- Find files → `Glob` tool (NOT `find`)
|
|
233
|
+
|
|
234
|
+
**Activity log example:**
|
|
235
|
+
```
|
|
236
|
+
WRONG: printf '[%s]_%s\n' "$(date ...)" "INIT" >> work.log
|
|
237
|
+
RIGHT: Use Write tool to append a line to the log file
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Git example:**
|
|
241
|
+
```
|
|
242
|
+
WRONG: cd /path/to/project && git add file && git commit -m "msg"
|
|
243
|
+
RIGHT: git add file (one call)
|
|
244
|
+
git commit -m "msg" (next call)
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Version
|
|
250
|
+
|
|
251
|
+
- Created: 2026-03-10
|
|
252
|
+
- Updated: 2026-03-28
|