uctm 1.1.0 → 1.2.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/README.md +7 -19
- package/agents/en/agent-flow.md +106 -106
- package/agents/en/builder.md +5 -5
- package/agents/en/committer.md +25 -9
- package/agents/en/context-policy.md +1 -1
- package/agents/en/file-content-schema.md +1 -1
- package/agents/en/planner.md +6 -6
- package/agents/en/router.md +20 -8
- package/agents/en/scheduler.md +7 -7
- package/agents/en/shared-prompt-sections.md +4 -5
- package/agents/en/verifier.md +4 -4
- package/agents/en/work-activity-log.md +45 -45
- package/agents/en/xml-schema.md +109 -109
- package/agents/ko/agent-flow.md +106 -106
- package/agents/ko/builder.md +5 -5
- package/agents/ko/committer.md +25 -9
- package/agents/ko/context-policy.md +1 -1
- package/agents/ko/file-content-schema.md +1 -1
- package/agents/ko/planner.md +6 -6
- package/agents/ko/router.md +19 -7
- package/agents/ko/scheduler.md +7 -7
- package/agents/ko/shared-prompt-sections.md +4 -5
- package/agents/ko/verifier.md +4 -4
- package/agents/ko/work-activity-log.md +45 -45
- package/agents/ko/xml-schema.md +109 -109
- package/lib/constants.mjs +4 -4
- package/package.json +1 -1
package/agents/en/xml-schema.md
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
# Agent Communication XML Schema
|
|
2
|
-
|
|
3
|
-
XML communication format definition for uc-taskmanager agents.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Dispatch Format (Dispatcher → Receiver)
|
|
8
|
-
|
|
9
|
-
```xml
|
|
10
|
-
<dispatch to="{receiver}" work="{WORK_ID}" task="{TASK_ID}" execution-mode="{direct|pipeline|full}">
|
|
11
|
-
<context>
|
|
12
|
-
<project>{project name}</project>
|
|
13
|
-
<language>{lang_code}</language>
|
|
14
|
-
<plan-file>works/{WORK_ID}/PLAN.md</plan-file>
|
|
15
|
-
</context>
|
|
16
|
-
<task-spec>
|
|
17
|
-
<file>works/{WORK_ID}/TASK-XX.md</file>
|
|
18
|
-
<title>{title}</title>
|
|
19
|
-
<action>{implement|verify|commit|plan|route}</action>
|
|
20
|
-
<description>{optional}</description>
|
|
21
|
-
</task-spec>
|
|
22
|
-
<previous-results>
|
|
23
|
-
<result task="{TASK_ID}" status="{PASS|FAIL|SKIP}">{summary}</result>
|
|
24
|
-
</previous-results>
|
|
25
|
-
<cache-hint sections="{section1},{section2}"/>
|
|
26
|
-
</dispatch>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
| Attribute | Value |
|
|
30
|
-
|-----------|-------|
|
|
31
|
-
| `to` | builder, verifier, committer, planner, scheduler, router |
|
|
32
|
-
| `task` | `TASK-NN` — WORK prefix must NOT be included |
|
|
33
|
-
| `execution-mode` | direct / pipeline / full (defaults to full if omitted) |
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 2. Task Result Format (Receiver → Dispatcher)
|
|
38
|
-
|
|
39
|
-
```xml
|
|
40
|
-
<task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
|
|
41
|
-
<summary>{1-2 line summary}</summary>
|
|
42
|
-
<files-changed>
|
|
43
|
-
<file action="{created|modified|deleted}" path="{path}">{description}</file>
|
|
44
|
-
</files-changed>
|
|
45
|
-
<verification>
|
|
46
|
-
<check name="{type}" status="{PASS|FAIL|N/A}">{output}</check>
|
|
47
|
-
</verification>
|
|
48
|
-
<notes>{notes}</notes>
|
|
49
|
-
</task-result>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 3. Dispatcher-Receiver Mapping
|
|
55
|
-
|
|
56
|
-
| Dispatcher | Receiver | execution-mode | Description |
|
|
57
|
-
|------------|----------|:--------------:|-------------|
|
|
58
|
-
| Router | (self) | `direct` | No subagents. Router implements+commits+callbacks directly |
|
|
59
|
-
| Router | Planner | `full` | Complex WORK planning |
|
|
60
|
-
| Router | Scheduler | `full` | Planned WORK execution |
|
|
61
|
-
| Router | Builder | `pipeline` | Single TASK implementation |
|
|
62
|
-
| Router | Verifier | `pipeline` | Single TASK verification |
|
|
63
|
-
| Router | Committer | `pipeline` | Single TASK commit |
|
|
64
|
-
| Scheduler | Builder | `full` | N TASK implementation |
|
|
65
|
-
| Scheduler | Verifier | `full` | N TASK verification |
|
|
66
|
-
| Scheduler | Committer | `full` | N TASK commit |
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## 4. Context-Handoff Element
|
|
71
|
-
|
|
72
|
-
```xml
|
|
73
|
-
<context-handoff from="{agent}" detail-level="{FULL|SUMMARY|DROP}">
|
|
74
|
-
<what>{changes/verification details}</what>
|
|
75
|
-
<why>{decision rationale}</why> <!-- FULL only -->
|
|
76
|
-
<caution>{caveats}</caution> <!-- FULL only -->
|
|
77
|
-
<incomplete>{incomplete items}</incomplete> <!-- FULL only -->
|
|
78
|
-
</context-handoff>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
| detail-level | Included Fields |
|
|
82
|
-
|:---:|---|
|
|
83
|
-
| `FULL` | what, why, caution, incomplete |
|
|
84
|
-
| `SUMMARY` | what only (1-3 lines) |
|
|
85
|
-
| `DROP` | Element omitted |
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## 5. Agent Behavior by execution-mode
|
|
90
|
-
|
|
91
|
-
| Agent | direct | pipeline | full |
|
|
92
|
-
|-------|--------|----------|------|
|
|
93
|
-
| Router | implement+self-check+result.md+commit+callback directly | Create PLAN then dispatch B→V→C | Dispatch to Planner |
|
|
94
|
-
| Planner | Not invoked | Not invoked | Create PLAN.md |
|
|
95
|
-
| Scheduler | Not invoked | Not invoked | DAG management + [B→V→C]×N |
|
|
96
|
-
| Builder | Not invoked | Normal execution | Normal execution |
|
|
97
|
-
| Verifier | Not invoked | Normal execution | Normal execution |
|
|
98
|
-
| Committer | Not invoked | result.md+commit+callback | result.md+commit+callback |
|
|
99
|
-
|
|
100
|
-
Invariants (regardless of mode):
|
|
101
|
-
|
|
102
|
-
| Item | direct | pipeline/full |
|
|
103
|
-
|------|:---:|:---:|
|
|
104
|
-
| `works/WORK-NN/` directory | Router | Router/Planner |
|
|
105
|
-
| `PLAN.md` | Router | Router/Planner |
|
|
106
|
-
| `TASK-XX.md` | Router | Router/Planner |
|
|
107
|
-
| `TASK-XX_result.md` | Router | Committer |
|
|
108
|
-
| COMMITTER DONE callback | Router | Committer |
|
|
109
|
-
| `WORK-LIST.md` IN_PROGRESS | Router | Router |
|
|
1
|
+
# Agent Communication XML Schema
|
|
2
|
+
|
|
3
|
+
XML communication format definition for uc-taskmanager agents.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Dispatch Format (Dispatcher → Receiver)
|
|
8
|
+
|
|
9
|
+
```xml
|
|
10
|
+
<dispatch to="{receiver}" work="{WORK_ID}" task="{TASK_ID}" execution-mode="{direct|pipeline|full}">
|
|
11
|
+
<context>
|
|
12
|
+
<project>{project name}</project>
|
|
13
|
+
<language>{lang_code}</language>
|
|
14
|
+
<plan-file>works/{WORK_ID}/PLAN.md</plan-file>
|
|
15
|
+
</context>
|
|
16
|
+
<task-spec>
|
|
17
|
+
<file>works/{WORK_ID}/TASK-XX.md</file>
|
|
18
|
+
<title>{title}</title>
|
|
19
|
+
<action>{implement|verify|commit|plan|route}</action>
|
|
20
|
+
<description>{optional}</description>
|
|
21
|
+
</task-spec>
|
|
22
|
+
<previous-results>
|
|
23
|
+
<result task="{TASK_ID}" status="{PASS|FAIL|SKIP}">{summary}</result>
|
|
24
|
+
</previous-results>
|
|
25
|
+
<cache-hint sections="{section1},{section2}"/>
|
|
26
|
+
</dispatch>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Attribute | Value |
|
|
30
|
+
|-----------|-------|
|
|
31
|
+
| `to` | builder, verifier, committer, planner, scheduler, router |
|
|
32
|
+
| `task` | `TASK-NN` — WORK prefix must NOT be included |
|
|
33
|
+
| `execution-mode` | direct / pipeline / full (defaults to full if omitted) |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. Task Result Format (Receiver → Dispatcher)
|
|
38
|
+
|
|
39
|
+
```xml
|
|
40
|
+
<task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
|
|
41
|
+
<summary>{1-2 line summary}</summary>
|
|
42
|
+
<files-changed>
|
|
43
|
+
<file action="{created|modified|deleted}" path="{path}">{description}</file>
|
|
44
|
+
</files-changed>
|
|
45
|
+
<verification>
|
|
46
|
+
<check name="{type}" status="{PASS|FAIL|N/A}">{output}</check>
|
|
47
|
+
</verification>
|
|
48
|
+
<notes>{notes}</notes>
|
|
49
|
+
</task-result>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 3. Dispatcher-Receiver Mapping
|
|
55
|
+
|
|
56
|
+
| Dispatcher | Receiver | execution-mode | Description |
|
|
57
|
+
|------------|----------|:--------------:|-------------|
|
|
58
|
+
| Router | (self) | `direct` | No subagents. Router implements+commits+callbacks directly |
|
|
59
|
+
| Router | Planner | `full` | Complex WORK planning |
|
|
60
|
+
| Router | Scheduler | `full` | Planned WORK execution |
|
|
61
|
+
| Router | Builder | `pipeline` | Single TASK implementation |
|
|
62
|
+
| Router | Verifier | `pipeline` | Single TASK verification |
|
|
63
|
+
| Router | Committer | `pipeline` | Single TASK commit |
|
|
64
|
+
| Scheduler | Builder | `full` | N TASK implementation |
|
|
65
|
+
| Scheduler | Verifier | `full` | N TASK verification |
|
|
66
|
+
| Scheduler | Committer | `full` | N TASK commit |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 4. Context-Handoff Element
|
|
71
|
+
|
|
72
|
+
```xml
|
|
73
|
+
<context-handoff from="{agent}" detail-level="{FULL|SUMMARY|DROP}">
|
|
74
|
+
<what>{changes/verification details}</what>
|
|
75
|
+
<why>{decision rationale}</why> <!-- FULL only -->
|
|
76
|
+
<caution>{caveats}</caution> <!-- FULL only -->
|
|
77
|
+
<incomplete>{incomplete items}</incomplete> <!-- FULL only -->
|
|
78
|
+
</context-handoff>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
| detail-level | Included Fields |
|
|
82
|
+
|:---:|---|
|
|
83
|
+
| `FULL` | what, why, caution, incomplete |
|
|
84
|
+
| `SUMMARY` | what only (1-3 lines) |
|
|
85
|
+
| `DROP` | Element omitted |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 5. Agent Behavior by execution-mode
|
|
90
|
+
|
|
91
|
+
| Agent | direct | pipeline | full |
|
|
92
|
+
|-------|--------|----------|------|
|
|
93
|
+
| Router | implement+self-check+result.md+commit+callback directly | Create PLAN then dispatch B→V→C | Dispatch to Planner |
|
|
94
|
+
| Planner | Not invoked | Not invoked | Create PLAN.md |
|
|
95
|
+
| Scheduler | Not invoked | Not invoked | DAG management + [B→V→C]×N |
|
|
96
|
+
| Builder | Not invoked | Normal execution | Normal execution |
|
|
97
|
+
| Verifier | Not invoked | Normal execution | Normal execution |
|
|
98
|
+
| Committer | Not invoked | result.md+commit+callback | result.md+commit+callback |
|
|
99
|
+
|
|
100
|
+
Invariants (regardless of mode):
|
|
101
|
+
|
|
102
|
+
| Item | direct | pipeline/full |
|
|
103
|
+
|------|:---:|:---:|
|
|
104
|
+
| `works/WORK-NN/` directory | Router | Router/Planner |
|
|
105
|
+
| `PLAN.md` | Router | Router/Planner |
|
|
106
|
+
| `TASK-XX.md` | Router | Router/Planner |
|
|
107
|
+
| `TASK-XX_result.md` | Router | Committer |
|
|
108
|
+
| COMMITTER DONE callback | Router | Committer |
|
|
109
|
+
| `WORK-LIST.md` IN_PROGRESS | Router | Router |
|
package/agents/ko/agent-flow.md
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
# Agent Flow — Main Claude 오케스트레이션 가이드
|
|
2
|
-
|
|
3
|
-
> **모든 에이전트 호출은 Main Claude가 수행한다.**
|
|
4
|
-
> 서브에이전트는 작업 완료 후 결과(dispatch XML 또는 task-result XML)만 반환한다.
|
|
5
|
-
> Main Claude가 반환값을 받아 다음 에이전트를 호출한다.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 실행 모드 결정
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
[] 태그 감지 → router 호출
|
|
13
|
-
│
|
|
14
|
-
router 반환값(execution-mode) 확인
|
|
15
|
-
│
|
|
16
|
-
├─ direct → router가 직접 처리 완료 (추가 호출 없음)
|
|
17
|
-
├─ pipeline → § pipeline 절차 실행
|
|
18
|
-
└─ full → § full 절차 실행
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## direct 모드
|
|
24
|
-
|
|
25
|
-
router가 단독으로 처리 완료. Main Claude 추가 호출 없음.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## pipeline 모드
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
1. router 호출 → PLAN.md + TASK-00.md 생성 + builder dispatch XML 반환
|
|
33
|
-
2. builder 호출 (dispatch XML을 prompt로)
|
|
34
|
-
3. verifier 호출 (builder 결과를 prompt로)
|
|
35
|
-
4. committer 호출 (verifier 결과를 prompt로)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## full 모드
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
1. router 호출 → WORK 디렉토리 생성 + planner dispatch XML 반환
|
|
44
|
-
2. planner 호출 (dispatch XML을 prompt로) → PLAN.md + TASK 파일 생성
|
|
45
|
-
3. scheduler 호출 → DAG 분석 + READY TASK + builder dispatch XML 반환
|
|
46
|
-
4. builder 호출 (dispatch XML을 prompt로) → 구현
|
|
47
|
-
5. verifier 호출 (builder 결과를 prompt로) → 검증
|
|
48
|
-
6. committer 호출 (verifier 결과를 prompt로) → commit
|
|
49
|
-
7. 미완료 TASK 있으면 3번으로 돌아감
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
병렬 실행: scheduler가 복수의 READY TASK를 반환하면 builder를 동시에 호출한다.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## 에이전트 역할 요약
|
|
57
|
-
|
|
58
|
-
| 에이전트 | 반환값 | 호출 주체 |
|
|
59
|
-
|---------|-------|---------|
|
|
60
|
-
| router | execution-mode + dispatch XML | Main Claude |
|
|
61
|
-
| planner | PLAN.md/TASK 파일 생성 완료 보고 | Main Claude |
|
|
62
|
-
| scheduler | READY TASK + dispatch XML | Main Claude |
|
|
63
|
-
| builder | task-result XML (context-handoff 포함) | Main Claude |
|
|
64
|
-
| verifier | task-result XML | Main Claude |
|
|
65
|
-
| committer | task-result XML + commit hash | Main Claude |
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Bash CLI 실행 (서버 자동화)
|
|
70
|
-
|
|
71
|
-
대화 세션 없이 파이프라인을 독립 실행하는 방법. `claude -p`가 Main Claude 역할을 수행한다.
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
75
|
-
"[WORK 시작] {작업 내용}" \
|
|
76
|
-
--dangerously-skip-permissions \
|
|
77
|
-
--output-format stream-json \
|
|
78
|
-
--verbose \
|
|
79
|
-
2>&1 | tee /tmp/pipeline.log
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
| 옵션 | 목적 |
|
|
83
|
-
|------|------|
|
|
84
|
-
| `env -u CLAUDECODE` | 중첩 실행 차단 우회 |
|
|
85
|
-
| `env -u ANTHROPIC_API_KEY` | API 키 대신 구독 인증(Max) 사용 |
|
|
86
|
-
| `--dangerously-skip-permissions` | 무인 실행 시 권한 프롬프트 스킵 |
|
|
87
|
-
| `--output-format stream-json --verbose` | 실시간 모니터링용 스트리밍 |
|
|
88
|
-
|
|
89
|
-
중단된 파이프라인 재개:
|
|
90
|
-
```bash
|
|
91
|
-
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
92
|
-
"WORK-XX 파이프라인을 이어서 실행하라." \
|
|
93
|
-
--dangerously-skip-permissions
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
검증 결과 (WORK-24): `claude -p` → Task tool 9회 호출 → router/planner/scheduler/builder/verifier/committer 전체 자동 완주 확인됨.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## 컨텍스트 전달 (슬라이딩 윈도우)
|
|
101
|
-
|
|
102
|
-
| 거리 | Level | 내용 |
|
|
103
|
-
|------|-------|------|
|
|
104
|
-
| 직전 | FULL | what + why + caution + incomplete |
|
|
105
|
-
| 2단계 전 | SUMMARY | what 1~2줄 |
|
|
106
|
-
| 3단계+ | DROP | 전달 안 함 |
|
|
1
|
+
# Agent Flow — Main Claude 오케스트레이션 가이드
|
|
2
|
+
|
|
3
|
+
> **모든 에이전트 호출은 Main Claude가 수행한다.**
|
|
4
|
+
> 서브에이전트는 작업 완료 후 결과(dispatch XML 또는 task-result XML)만 반환한다.
|
|
5
|
+
> Main Claude가 반환값을 받아 다음 에이전트를 호출한다.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 실행 모드 결정
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
[] 태그 감지 → router 호출
|
|
13
|
+
│
|
|
14
|
+
router 반환값(execution-mode) 확인
|
|
15
|
+
│
|
|
16
|
+
├─ direct → router가 직접 처리 완료 (추가 호출 없음)
|
|
17
|
+
├─ pipeline → § pipeline 절차 실행
|
|
18
|
+
└─ full → § full 절차 실행
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## direct 모드
|
|
24
|
+
|
|
25
|
+
router가 단독으로 처리 완료. Main Claude 추가 호출 없음.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## pipeline 모드
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
1. router 호출 → PLAN.md + TASK-00.md 생성 + builder dispatch XML 반환
|
|
33
|
+
2. builder 호출 (dispatch XML을 prompt로)
|
|
34
|
+
3. verifier 호출 (builder 결과를 prompt로)
|
|
35
|
+
4. committer 호출 (verifier 결과를 prompt로)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## full 모드
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
1. router 호출 → WORK 디렉토리 생성 + planner dispatch XML 반환
|
|
44
|
+
2. planner 호출 (dispatch XML을 prompt로) → PLAN.md + TASK 파일 생성
|
|
45
|
+
3. scheduler 호출 → DAG 분석 + READY TASK + builder dispatch XML 반환
|
|
46
|
+
4. builder 호출 (dispatch XML을 prompt로) → 구현
|
|
47
|
+
5. verifier 호출 (builder 결과를 prompt로) → 검증
|
|
48
|
+
6. committer 호출 (verifier 결과를 prompt로) → commit
|
|
49
|
+
7. 미완료 TASK 있으면 3번으로 돌아감
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
병렬 실행: scheduler가 복수의 READY TASK를 반환하면 builder를 동시에 호출한다.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 에이전트 역할 요약
|
|
57
|
+
|
|
58
|
+
| 에이전트 | 반환값 | 호출 주체 |
|
|
59
|
+
|---------|-------|---------|
|
|
60
|
+
| router | execution-mode + dispatch XML | Main Claude |
|
|
61
|
+
| planner | PLAN.md/TASK 파일 생성 완료 보고 | Main Claude |
|
|
62
|
+
| scheduler | READY TASK + dispatch XML | Main Claude |
|
|
63
|
+
| builder | task-result XML (context-handoff 포함) | Main Claude |
|
|
64
|
+
| verifier | task-result XML | Main Claude |
|
|
65
|
+
| committer | task-result XML + commit hash | Main Claude |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Bash CLI 실행 (서버 자동화)
|
|
70
|
+
|
|
71
|
+
대화 세션 없이 파이프라인을 독립 실행하는 방법. `claude -p`가 Main Claude 역할을 수행한다.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
75
|
+
"[WORK 시작] {작업 내용}" \
|
|
76
|
+
--dangerously-skip-permissions \
|
|
77
|
+
--output-format stream-json \
|
|
78
|
+
--verbose \
|
|
79
|
+
2>&1 | tee /tmp/pipeline.log
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| 옵션 | 목적 |
|
|
83
|
+
|------|------|
|
|
84
|
+
| `env -u CLAUDECODE` | 중첩 실행 차단 우회 |
|
|
85
|
+
| `env -u ANTHROPIC_API_KEY` | API 키 대신 구독 인증(Max) 사용 |
|
|
86
|
+
| `--dangerously-skip-permissions` | 무인 실행 시 권한 프롬프트 스킵 |
|
|
87
|
+
| `--output-format stream-json --verbose` | 실시간 모니터링용 스트리밍 |
|
|
88
|
+
|
|
89
|
+
중단된 파이프라인 재개:
|
|
90
|
+
```bash
|
|
91
|
+
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
92
|
+
"WORK-XX 파이프라인을 이어서 실행하라." \
|
|
93
|
+
--dangerously-skip-permissions
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
검증 결과 (WORK-24): `claude -p` → Task tool 9회 호출 → router/planner/scheduler/builder/verifier/committer 전체 자동 완주 확인됨.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 컨텍스트 전달 (슬라이딩 윈도우)
|
|
101
|
+
|
|
102
|
+
| 거리 | Level | 내용 |
|
|
103
|
+
|------|-------|------|
|
|
104
|
+
| 직전 | FULL | what + why + caution + incomplete |
|
|
105
|
+
| 2단계 전 | SUMMARY | what 1~2줄 |
|
|
106
|
+
| 3단계+ | DROP | 전달 안 함 |
|
package/agents/ko/builder.md
CHANGED
|
@@ -35,11 +35,11 @@ You are the **Builder** — TASK 명세를 받아 실제 코드를 구현하고
|
|
|
35
35
|
|
|
36
36
|
| 파일 | 목적 |
|
|
37
37
|
|------|------|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
38
|
+
| `.claude/agents/file-content-schema.md` | 파일 포맷 스키마 |
|
|
39
|
+
| `.claude/agents/shared-prompt-sections.md` | 공통 규칙 (TASK ID, PLAN.md 7개 필드, WORK-LIST) |
|
|
40
|
+
| `.claude/agents/xml-schema.md` | XML 통신 포맷 |
|
|
41
|
+
| `.claude/agents/context-policy.md` | 슬라이딩 윈도우 규칙 |
|
|
42
|
+
| `.claude/agents/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
|
|
43
43
|
|
|
44
44
|
### 3-2. XML Input 파싱
|
|
45
45
|
|
package/agents/ko/committer.md
CHANGED
|
@@ -35,11 +35,11 @@ You are the **Committer** — 검증 완료된 TASK의 result report를 생성
|
|
|
35
35
|
|
|
36
36
|
| 파일 | 목적 |
|
|
37
37
|
|------|------|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
38
|
+
| `.claude/agents/file-content-schema.md` | 파일 포맷 스키마 |
|
|
39
|
+
| `.claude/agents/shared-prompt-sections.md` | 공통 규칙 |
|
|
40
|
+
| `.claude/agents/xml-schema.md` | XML 통신 포맷 |
|
|
41
|
+
| `.claude/agents/context-policy.md` | 슬라이딩 윈도우 규칙 |
|
|
42
|
+
| `.claude/agents/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
|
|
43
43
|
|
|
44
44
|
### 3-2. XML Input 파싱
|
|
45
45
|
|
|
@@ -66,7 +66,7 @@ Gate 실패 시:
|
|
|
66
66
|
|
|
67
67
|
### 3-4. Result Report 생성
|
|
68
68
|
|
|
69
|
-
→
|
|
69
|
+
→ `.claude/agents/file-content-schema.md` § 4 참조 (포맷 + 언어별 섹션 헤더)
|
|
70
70
|
|
|
71
71
|
`works/{WORK_ID}/TASK-XX_result.md` 생성.
|
|
72
72
|
- builder context-handoff `what` → "Builder Context" 섹션
|
|
@@ -155,8 +155,24 @@ committer 고유 추가 필드:
|
|
|
155
155
|
</next-tasks>
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
WORK-LIST.md
|
|
159
|
-
|
|
158
|
+
### 3-9-1. WORK-LIST.md 자동 완료 처리
|
|
159
|
+
|
|
160
|
+
마지막 TASK인지 확인 후, 마지막 TASK이면 WORK-LIST.md를 `IN_PROGRESS` → `COMPLETED`로 변경한다.
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# 마지막 TASK 확인
|
|
164
|
+
TOTAL=$(ls works/${WORK_ID}/TASK-*.md 2>/dev/null | grep -cv '_result\|_progress')
|
|
165
|
+
DONE=$(ls works/${WORK_ID}/TASK-*_result.md 2>/dev/null | wc -l)
|
|
166
|
+
|
|
167
|
+
if [ "$DONE" -ge "$TOTAL" ]; then
|
|
168
|
+
# WORK-LIST.md에서 해당 WORK의 IN_PROGRESS → COMPLETED 변경
|
|
169
|
+
sed -i "s/| ${WORK_ID} |\\(.*\\)| IN_PROGRESS |\\(.*\\)|\\(.*\\)|/| ${WORK_ID} |\\1| COMPLETED |\\2| $(date '+%Y-%m-%d') |/" works/WORK-LIST.md
|
|
170
|
+
git add works/WORK-LIST.md
|
|
171
|
+
git commit --amend --no-edit
|
|
172
|
+
fi
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
→ `.claude/agents/shared-prompt-sections.md` § 8 참조
|
|
160
176
|
|
|
161
177
|
---
|
|
162
178
|
|
|
@@ -173,7 +189,7 @@ WORK-LIST.md를 COMPLETED로 변경하지 않는다 — git push 시에만 변
|
|
|
173
189
|
- Files changed 없으면 즉시 FAIL 반환
|
|
174
190
|
|
|
175
191
|
### WORK-LIST.md 규칙
|
|
176
|
-
-
|
|
192
|
+
- 마지막 TASK 완료 시 WORK-LIST.md를 `IN_PROGRESS` → `COMPLETED`로 자동 변경
|
|
177
193
|
|
|
178
194
|
### Output Language Rule
|
|
179
195
|
→ `shared-prompt-sections.md` § 1 참조
|
package/agents/ko/planner.md
CHANGED
|
@@ -37,9 +37,9 @@ WORK (일) — 사용자 요청의 목표 단위
|
|
|
37
37
|
|
|
38
38
|
| 파일 | 목적 |
|
|
39
39
|
|------|------|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
40
|
+
| `.claude/agents/file-content-schema.md` | 파일 포맷 스키마 (PLAN.md 7개 필드, TASK 포맷) |
|
|
41
|
+
| `.claude/agents/shared-prompt-sections.md` | 공통 규칙 (TASK ID, WORK-LIST 규칙) |
|
|
42
|
+
| `.claude/agents/work-activity-log.md` | Activity Log 규칙 (log_work 함수, STAGE 테이블) |
|
|
43
43
|
|
|
44
44
|
### 3-2. 프로젝트 탐색 (Discovery Process)
|
|
45
45
|
|
|
@@ -103,7 +103,7 @@ TASK 수 4개 이상이거나 의존성이 복잡한 경우 `mcp__sequential-thi
|
|
|
103
103
|
|
|
104
104
|
### 3-6. 산출물 구조
|
|
105
105
|
|
|
106
|
-
→
|
|
106
|
+
→ `.claude/agents/file-content-schema.md` § 7 참조
|
|
107
107
|
|
|
108
108
|
생성 책임:
|
|
109
109
|
- `PLAN.md`, `TASK-XX.md`, `TASK-XX_progress.md` (초기 템플릿) → Planner
|
|
@@ -113,7 +113,7 @@ TASK 수 4개 이상이거나 의존성이 복잡한 경우 `mcp__sequential-thi
|
|
|
113
113
|
|
|
114
114
|
TASK 파일 생성 시 반드시 동일 디렉토리에 `TASK-XX_progress.md` 템플릿도 함께 생성.
|
|
115
115
|
|
|
116
|
-
파일 포맷: →
|
|
116
|
+
파일 포맷: → `.claude/agents/file-content-schema.md` § 1 (PLAN.md), § 2 (TASK), § 3 (progress 초기값)
|
|
117
117
|
|
|
118
118
|
### 3-7. MCP Tool 활용 (Serena)
|
|
119
119
|
|
|
@@ -143,7 +143,7 @@ PLAN.md `> Language:` 필드에 resolved language 기록. 모든 산출물을
|
|
|
143
143
|
### 3-9. 요구사항 코드(REQ) 기록
|
|
144
144
|
|
|
145
145
|
- `REQ-XXX` 패턴 존재: `> 요구사항: REQ-XXX`
|
|
146
|
-
- 없는 경우: `> 요구사항:
|
|
146
|
+
- 없는 경우: `> 요구사항: {사용자 요청 텍스트}` — 사용자가 입력한 요청 내용을 그대로 기록
|
|
147
147
|
|
|
148
148
|
---
|
|
149
149
|
|
package/agents/ko/router.md
CHANGED
|
@@ -34,10 +34,10 @@ You are the **Router** — 사용자 요청을 분석하여 실행 전략을 결
|
|
|
34
34
|
|
|
35
35
|
| 파일 | 목적 |
|
|
36
36
|
|------|------|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
37
|
+
| `.claude/agents/file-content-schema.md` | 파일 포맷 스키마 (PLAN.md 7개 필드, TASK 포맷, result.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 테이블, 참조 자료 수집) |
|
|
41
41
|
|
|
42
42
|
### 3-2. Execution-Mode 결정
|
|
43
43
|
|
|
@@ -104,7 +104,19 @@ Router가 단독 수행. 코드 탐색 시 Serena MCP 우선 사용:
|
|
|
104
104
|
```
|
|
105
105
|
### 3-5. pipeline 모드 일때 실행
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
> ⚠️ pipeline 모드에서 Router는 PLAN.md + TASK-NN.md 생성까지만 수행한다.
|
|
108
|
+
> 코드 수정, builder 호출, commit 등은 절대 금지. dispatch XML만 반환하라.
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
1. WORK ID 결정
|
|
112
|
+
2. mkdir works/WORK-NN/
|
|
113
|
+
3. log_work INIT "WORK-NN 생성 — Execution-Mode: pipeline"
|
|
114
|
+
4. PLAN.md 생성 (Execution-Mode: pipeline) → file-content-schema.md § 1
|
|
115
|
+
5. TASK-NN.md 생성 (필요 시 복수) → file-content-schema.md § 2
|
|
116
|
+
6. WORK-LIST.md IN_PROGRESS 추가
|
|
117
|
+
7. 아래 dispatch XML을 생성하여 반환한다. **호출은 Main Claude가 수행한다.**
|
|
118
|
+
8. log_work DISPATCH "Builder dispatch XML 반환"
|
|
119
|
+
```
|
|
108
120
|
|
|
109
121
|
→ dispatch XML 포맷: `xml-schema.md` § 1 참조 (to="builder", task="TASK-00", execution-mode="pipeline")
|
|
110
122
|
|
|
@@ -137,10 +149,10 @@ Router가 단독 수행. 코드 탐색 시 Serena MCP 우선 사용:
|
|
|
137
149
|
- "자동으로 진행" 명시 시에만 auto mode (현재 WORK 내에서만 유효)
|
|
138
150
|
|
|
139
151
|
### WORK-LIST.md 규칙
|
|
140
|
-
→
|
|
152
|
+
→ `.claude/agents/shared-prompt-sections.md` § 8 참조
|
|
141
153
|
|
|
142
154
|
- WORK 생성 시: `IN_PROGRESS` 추가
|
|
143
|
-
- COMPLETED 변경:
|
|
155
|
+
- COMPLETED 변경: 마지막 TASK 완료 시 committer가 자동 변경
|
|
144
156
|
|
|
145
157
|
### 파일명 규칙
|
|
146
158
|
- TASK 파일명: `TASK-XX.md` 형식
|
package/agents/ko/scheduler.md
CHANGED
|
@@ -38,11 +38,11 @@ You are the **Scheduler** — WORK 파이프라인 실행 에이전트.
|
|
|
38
38
|
|
|
39
39
|
| 파일 | 목적 |
|
|
40
40
|
|------|------|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
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 테이블) |
|
|
46
46
|
|
|
47
47
|
### 3-2. WORK 식별 및 초기 로드
|
|
48
48
|
|
|
@@ -132,7 +132,7 @@ Committer FAIL 재시도:
|
|
|
132
132
|
|
|
133
133
|
### 3-9. 진행 보고
|
|
134
134
|
|
|
135
|
-
TASK 완료 후 PROGRESS.md 업데이트 (→
|
|
135
|
+
TASK 완료 후 PROGRESS.md 업데이트 (→ `.claude/agents/file-content-schema.md` § 6 참조) 및 상태 출력:
|
|
136
136
|
|
|
137
137
|
```
|
|
138
138
|
✅ TASK-XX 완료 — commit: {hash}
|
|
@@ -164,7 +164,7 @@ Multi-WORK 현황 확인:
|
|
|
164
164
|
|
|
165
165
|
### WORK-LIST.md 규칙
|
|
166
166
|
- WORK-LIST.md를 COMPLETED로 변경하지 않는다 — git push 시에만 변경
|
|
167
|
-
- →
|
|
167
|
+
- → `.claude/agents/shared-prompt-sections.md` § 8 참조
|
|
168
168
|
|
|
169
169
|
### Output Language Rule
|
|
170
170
|
→ `shared-prompt-sections.md` § 1 참조
|