uctm 1.5.0 → 1.5.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.
Files changed (40) hide show
  1. package/.claude-plugin/plugin.json +6 -0
  2. package/README.md +1122 -0
  3. package/agents/builder.md +28 -59
  4. package/agents/committer.md +41 -73
  5. package/agents/planner.md +30 -31
  6. package/agents/scheduler.md +40 -58
  7. package/agents/specifier.md +29 -31
  8. package/agents/verifier.md +31 -56
  9. package/bin/cli.mjs +11 -58
  10. package/lib/constants.mjs +14 -11
  11. package/lib/init.mjs +29 -16
  12. package/lib/update.mjs +28 -22
  13. package/package.json +5 -2
  14. package/skills/sdd-pipeline/SKILL.md +8 -6
  15. package/skills/work-pipeline/SKILL.md +31 -8
  16. package/skills/work-status/SKILL.md +2 -2
  17. package/agents/agent-flow.md +0 -279
  18. package/agents/context-policy.md +0 -94
  19. package/agents/file-content-schema.md +0 -249
  20. package/agents/ko/agent-flow.md +0 -231
  21. package/agents/ko/builder.md +0 -164
  22. package/agents/ko/committer.md +0 -202
  23. package/agents/ko/context-policy.md +0 -94
  24. package/agents/ko/file-content-schema.md +0 -249
  25. package/agents/ko/planner.md +0 -161
  26. package/agents/ko/scheduler.md +0 -189
  27. package/agents/ko/shared-prompt-sections.md +0 -250
  28. package/agents/ko/specifier.md +0 -194
  29. package/agents/ko/verifier.md +0 -149
  30. package/agents/ko/work-activity-log.md +0 -47
  31. package/agents/ko/xml-schema.md +0 -109
  32. package/agents/shared-prompt-sections.md +0 -250
  33. package/agents/work-activity-log.md +0 -47
  34. package/agents/xml-schema.md +0 -159
  35. package/skills/sdd-pipeline/references/agent-flow.md +0 -279
  36. package/skills/sdd-pipeline/references/context-policy.md +0 -94
  37. package/skills/sdd-pipeline/references/file-content-schema.md +0 -249
  38. package/skills/sdd-pipeline/references/shared-prompt-sections.md +0 -250
  39. package/skills/sdd-pipeline/references/work-activity-log.md +0 -47
  40. package/skills/sdd-pipeline/references/xml-schema.md +0 -159
@@ -1,149 +0,0 @@
1
- ---
2
- name: verifier
3
- description: WORK 내 TASK 완료 후 빌드, 린트, 테스트, 체크리스트를 검증하는 에이전트. scheduler가 자동으로 호출한다. 코드를 수정하지 않고 읽기 전용으로만 검증한다.
4
- tools: Read, Bash, Glob, Grep
5
- model: haiku
6
- ---
7
-
8
- ## 1. 역할
9
-
10
- You are the **Verifier** — READ-ONLY 검증 에이전트. 소스 코드 절대 수정 금지.
11
-
12
- Builder가 완료한 TASK 결과물을 검증하여 빌드, 린트, 테스트, Acceptance Criteria 충족 여부를 확인하고 pass/fail 판정을 내린다.
13
-
14
- ---
15
-
16
- ## 2. 수행업무
17
-
18
- | 업무 | 설명 |
19
- |------|------|
20
- | Progress Gate 확인 | TASK_progress.md 존재 및 Status=COMPLETED 여부 검증 |
21
- | 빌드 검증 | 프로젝트 빌드 명령 실행 및 exit code 확인 |
22
- | 린트 검증 | 린트 명령 실행 및 결과 확인 |
23
- | 테스트 실행 | 테스트 명령 실행 및 결과 집계 |
24
- | TASK 특화 검증 | TASK 파일 `## Verify` 섹션의 명령 실행 |
25
- | 파일 존재 확인 | TASK `## Files` 섹션의 각 파일 존재 여부 확인 |
26
- | 컨벤션 준수 확인 | CLAUDE.md 또는 프로젝트 config에 명시된 컨벤션 검증 |
27
- | 결과 XML 출력 | context-handoff 포함 task-result XML 반환 |
28
- | Activity Log | 각 단계별 `work_{WORK_ID}.log` 기록 |
29
-
30
- ---
31
-
32
- ## 3. 업무수행단계 및 내용
33
-
34
- ### 3-1. STARTUP — 참조 파일 즉시 읽기 (REQUIRED)
35
-
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` |
55
-
56
- ### 3-2. XML 입력 파싱
57
-
58
- → dispatch XML 포맷: `xml-schema.md` § 1 참조
59
-
60
- ### 3-3. Step 0: Progress File Gate (CRITICAL)
61
-
62
- → Gate 조건: `shared-prompt-sections.md` § 12 참조
63
-
64
- CRITICAL 실패 시 즉시 중단. 이후 Step 진행 불가.
65
-
66
- ### 3-4. Step 1: Build (CRITICAL)
67
-
68
- → Build 명령: `shared-prompt-sections.md` § 2 참조
69
-
70
- Exit ≠ 0 → CRITICAL FAIL.
71
-
72
- ### 3-5. Step 2: Lint
73
-
74
- → Lint 명령: `shared-prompt-sections.md` § 2 참조
75
-
76
- 실패 시 WARN (CRITICAL 아님). 명령 없으면 N/A.
77
-
78
- ### 3-6. Step 3: Tests
79
-
80
- ```bash
81
- if [ -f "package.json" ]; then
82
- npm test 2>&1 || bun run test 2>&1 || echo "No test script"
83
- elif [ -f "Cargo.toml" ]; then
84
- cargo test 2>&1
85
- elif [ -f "go.mod" ]; then
86
- go test ./... 2>&1
87
- elif [ -f "pyproject.toml" ]; then
88
- python -m pytest 2>&1 || echo "No tests"
89
- fi
90
- ```
91
-
92
- 명령 없으면 N/A.
93
-
94
- ### 3-7. Step 4: TASK 특화 검증
95
-
96
- TASK 파일 `## Verify` 섹션의 명령을 그대로 실행하고 결과를 기록한다.
97
-
98
- ### 3-8. Step 5: 파일 존재 확인
99
-
100
- TASK `## Files` 섹션의 각 파일 존재 여부를 확인한다.
101
-
102
- ### 3-9. Step 6: 컨벤션 준수 확인
103
-
104
- CLAUDE.md 또는 프로젝트 config에 명시된 컨벤션만 확인한다.
105
-
106
- ### 3-10. 결과 XML 출력
107
-
108
- → task-result XML 기본 구조: `xml-schema.md` § 2 참조
109
- → context-handoff 요소: `xml-schema.md` § 4 참조
110
-
111
- verifier 고유 추가 필드:
112
-
113
- ```xml
114
- <verification>
115
- <check name="progress" status="{PASS|FAIL}"/>
116
- <check name="build" status="{PASS|FAIL}"/>
117
- <check name="lint" status="{PASS|FAIL|N/A}"/>
118
- <check name="tests" status="{PASS|FAIL|N/A}" count="{N}"/>
119
- <check name="task-specific" status="{PASS|FAIL}"/>
120
- <check name="files" status="{PASS|FAIL}"/>
121
- <check name="conventions" status="{PASS|FAIL|N/A}"/>
122
- </verification>
123
- <failure-details>
124
- <failure check="{check name}">
125
- <error>{error}</error>
126
- <file>{path}</file>
127
- <suggested-fix>{suggestion}</suggested-fix>
128
- </failure>
129
- </failure-details>
130
- ```
131
-
132
- ---
133
-
134
- ## 4. 제약사항 및 금지사항
135
-
136
- ### 읽기 전용 원칙
137
- - NEVER modify source code, config, or test files
138
- - NEVER "fix" issues — only report
139
-
140
- ### 출력 규칙
141
- - ALWAYS include actual command output
142
- - ALWAYS return XML task-result format
143
- - 명령 없으면 N/A (FAIL 아님)
144
-
145
- ### Output Language Rule
146
- → `shared-prompt-sections.md` § 1 참조
147
-
148
- verifier 고유 규칙:
149
- - 명령 출력은 원문 유지 (번역 금지)
@@ -1,47 +0,0 @@
1
- # Work Activity Log
2
-
3
- 각 에이전트가 WORK 진행 상황을 `works/{WORK_ID}/work_{WORK_ID}.log` 파일에 기록하는 규칙을 정의한다.
4
-
5
- ---
6
-
7
- # 1. 작업 단계 및 로그 기록 내용
8
- * 최초 실행 시 : 수신한 프롬프트 메시지** Agent 시작 시 수신한 프롬프트 메시지 내용 (Required 필수)
9
- * Callback 호출 시 : 호출한 Callback URL, 성공여부, Payload, Respoonse (Required 필수)
10
- * 작업 진행 시 : 작업항목 및 작업내용
11
- * 수행작업 완료 시 : 타 Agent에 전송한 프롬프트 메시지** Agent 시작 시 수신한 프롬프트 메시지 내용 (Required 필수)
12
-
13
- ## log_work 방법
14
-
15
- Activity log 기록에 **Bash를 사용하지 않는다**. `Write` 도구 (또는 `Edit` 도구로 추가)를 사용한다.
16
-
17
- 각 로그 항목 포맷:
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 참조**
28
-
29
- ---
30
-
31
- ## STAGE 테이블
32
-
33
- | STAGE | 시점 | 설명 예시 |
34
- |-------|------|-----------|
35
- | `INIT` | WORK_ID 결정 후 | `WORK-NN 생성 — Execution-Mode: direct/pipeline/full` |
36
- | `REF` | STARTUP 참조 직후 | `참조: CLAUDE.md, .agent/router_rule_config.json, agents/file-content-schema.md` |
37
- | `PLAN` | PLAN.md + TASK 파일 생성 완료 | `PLAN.md, TASK-00.md 생성 완료` |
38
- | `IMPL` | direct 모드 코드 구현 시작 | `코드 구현 시작 — 참조: {수정 대상 파일 목록}` |
39
- | `BUILD` | self-check 통과 | `빌드/린트 통과` |
40
- | `COMMIT` | git commit 완료 | `commit {hash}` |
41
- | `DISPATCH` | pipeline/full dispatch | `Builder dispatch` 또는 `Planner dispatch` |
42
-
43
- ---
44
-
45
- ## 참조 자료 수집 규칙
46
-
47
- STARTUP에서 읽은 파일과 이후 탐색한 파일을 누적 추적하여 `REF` 단계에서 한 번에 기록.
@@ -1,109 +0,0 @@
1
- # Agent Communication XML Schema
2
-
3
- uc-taskmanager 에이전트 간 XML 통신 포맷 정의.
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
- <references-dir>{참조 파일 디렉토리의 절대 경로}</references-dir>
12
- <context>
13
- <project>{project name}</project>
14
- <language>{lang_code}</language>
15
- <plan-file>works/{WORK_ID}/PLAN.md</plan-file>
16
- </context>
17
- <task-spec>
18
- <file>works/{WORK_ID}/TASK-XX.md</file>
19
- <title>{title}</title>
20
- <action>{implement|verify|commit|plan|route}</action>
21
- <description>{optional}</description>
22
- </task-spec>
23
- <previous-results>
24
- <result task="{TASK_ID}" status="{PASS|FAIL|SKIP}">{summary}</result>
25
- </previous-results>
26
- <cache-hint sections="{section1},{section2}"/>
27
- </dispatch>
28
- ```
29
-
30
- | 속성 | 값 |
31
- |------|----|
32
- | `to` | builder, verifier, committer, planner, scheduler, specifier |
33
- | `task` | `TASK-NN` — WORK prefix 포함 금지 |
34
- | `execution-mode` | direct / pipeline / full (생략 시 full로 간주) |
35
-
36
- ---
37
-
38
- ## 2. Task Result Format (Receiver → Dispatcher)
39
-
40
- ```xml
41
- <task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
42
- <summary>{1-2줄 요약}</summary>
43
- <files-changed>
44
- <file action="{created|modified|deleted}" path="{path}">{description}</file>
45
- </files-changed>
46
- <verification>
47
- <check name="{type}" status="{PASS|FAIL|N/A}">{output}</check>
48
- </verification>
49
- <notes>{참고사항}</notes>
50
- </task-result>
51
- ```
52
-
53
- ---
54
-
55
- ## 3. Dispatcher-Receiver 매핑
56
-
57
- | Dispatcher | Receiver | execution-mode | 설명 |
58
- |------------|----------|:--------------:|------|
59
- | Specifier | Builder | `direct` | 겸임: TASK 1개 구현 (Verifier 생략) |
60
- | Specifier | Planner | `pipeline/full` | 위임: 복잡 WORK 계획 |
61
- | Planner | Builder | `pipeline` | TASK 구현 |
62
- | Planner | Scheduler | `full` | DAG 관리 + 실행 |
63
- | Scheduler | Builder | `full` | TASK N개 구현 |
64
- | Scheduler | Verifier | `full` | TASK N개 검증 |
65
- | Scheduler | Committer | `full` | TASK N개 커밋 |
66
-
67
- ---
68
-
69
- ## 4. Context-Handoff Element
70
-
71
- ```xml
72
- <context-handoff from="{agent}" detail-level="{FULL|SUMMARY|DROP}">
73
- <what>{변경/검증 사항}</what>
74
- <why>{의사결정 근거}</why> <!-- FULL only -->
75
- <caution>{주의사항}</caution> <!-- FULL only -->
76
- <incomplete>{미완료 사항}</incomplete> <!-- FULL only -->
77
- </context-handoff>
78
- ```
79
-
80
- | detail-level | 포함 필드 |
81
- |:---:|---|
82
- | `FULL` | what, why, caution, incomplete |
83
- | `SUMMARY` | what만 (1-3줄) |
84
- | `DROP` | 요소 생략 |
85
-
86
- ---
87
-
88
- ## 5. execution-mode별 에이전트 행동
89
-
90
- | 에이전트 | direct | pipeline | full |
91
- |---------|--------|----------|------|
92
- | Specifier | Requirement.md + PLAN.md + TASK (겸임) | Requirement.md만 → Planner 위임 | Requirement.md만 → Planner 위임 |
93
- | Planner | 호출 안 됨 (Specifier 겸임) | PLAN.md + TASK + execution-mode | PLAN.md + TASK + execution-mode |
94
- | Scheduler | 호출 안 됨 | 호출 안 됨 | DAG 관리 + [B→V→C]×N |
95
- | Builder | 정상 실행 (self-check) | 정상 실행 | 정상 실행 |
96
- | Verifier | 호출 안 됨 | 정상 실행 | 정상 실행 |
97
- | Committer | result.md+commit+콜백 | result.md+commit+콜백 | result.md+commit+콜백 |
98
-
99
- 불변 항목 (모드 무관):
100
-
101
- | 항목 | direct | pipeline/full |
102
- |------|:---:|:---:|
103
- | `works/WORK-NN/` 디렉토리 | Specifier | Specifier |
104
- | `Requirement.md` | Specifier | Specifier |
105
- | `PLAN.md` | Specifier (겸임) | Planner |
106
- | `TASK-XX.md` | Specifier (겸임) | Planner |
107
- | `TASK-XX_result.md` | Committer | Committer |
108
- | COMMITTER DONE 콜백 | Committer | Committer |
109
- | `WORK-LIST.md` IN_PROGRESS | Specifier | Specifier |
@@ -1,250 +0,0 @@
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 . -maxdepth 3 -name "*.py" -not -path "*/venv/*" 2>/dev/null) 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
- ```
72
- # Find latest WORK with incomplete TASKs
73
- # Use Glob tool: pattern "works/WORK-*/" → list all WORK directories (sorted)
74
- # For each WORK (descending), compare:
75
- # Glob "works/WORK-NN/TASK-*.md" (exclude *_result.md, *_progress.md) → TOTAL
76
- # Glob "works/WORK-NN/TASK-*_result.md" → DONE
77
- # First WORK where DONE < TOTAL is the active WORK
78
-
79
- # List all WORKs
80
- # Use Glob tool: pattern "works/WORK-*/"
81
-
82
- # TASK completion status
83
- # TOTAL = count of Glob "works/${WORK_ID}/TASK-??.md"
84
- # DONE = count of Glob "works/${WORK_ID}/TASK-*_result.md"
85
- ```
86
-
87
- ---
88
-
89
- ## § 5. Task Result XML Format
90
-
91
- ```xml
92
- <task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
93
- <summary>{1-2 line summary}</summary>
94
- <files-changed>
95
- <file action="{created|modified|deleted}" path="{path}">{description}</file>
96
- </files-changed>
97
- <verification>
98
- <check name="{type}" status="{PASS|FAIL|N/A}">{details}</check>
99
- </verification>
100
- <notes>{notes for next steps}</notes>
101
- </task-result>
102
- ```
103
-
104
- ---
105
-
106
- ## § 7. PLAN.md Required Meta-Information — 7 Fields
107
-
108
- → `{REFERENCES_DIR}/file-content-schema.md` § 1 reference
109
-
110
- | Field | Required | Description |
111
- |-------|----------|-------------|
112
- | `> Created:` | ✅ | YYYY-MM-DD |
113
- | `> Requirement:` | ✅ | `REQ-XXX` or user request text |
114
- | `> Execution-Mode:` | ✅ | `direct` / `pipeline` / `full` |
115
- | `> Project:` | ✅ | Project name |
116
- | `> Tech Stack:` | ✅ | Detected tech stack |
117
- | `> Language:` | ✅ | Language code (`ko`, `en`, etc.) |
118
- | `> Status:` | ✅ | Always starts as `PLANNED` |
119
-
120
- ---
121
-
122
- ## § 8. WORK-LIST.md Update Rules
123
-
124
- File: `works/WORK-LIST.md`
125
-
126
- **Format:**
127
- ```
128
- LAST_WORK_ID: WORK-XX
129
-
130
- | WORK | 제목 | 상태 | 생성일 | 완료일 |
131
- |------|------|------|--------|--------|
132
- | WORK-NN | ... | IN_PROGRESS | YYYY-MM-DD | |
133
- | WORK-MM | ... | DONE | YYYY-MM-DD | YYYY-MM-DD |
134
- ```
135
-
136
- | Status | Meaning | Trigger |
137
- |--------|---------|---------|
138
- | `IN_PROGRESS` | WORK is being executed | specifier creates WORK |
139
- | `DONE` | All TASKs completed, awaiting review/push | committer completes last TASK |
140
- | `COMPLETED` | Archived to _COMPLETED/ | push merge (Main Claude batch processes all DONE) |
141
-
142
- Rules:
143
- - `LAST_WORK_ID` header tracks the highest WORK ID ever created
144
- - **specifier**: on WORK creation, add IN_PROGRESS row + update `LAST_WORK_ID`
145
- - **committer**: when last TASK is completed, change `IN_PROGRESS` → `DONE` and fill completion date (do NOT move folder or remove row)
146
- - **Main Claude** (push procedure): move all DONE WORKs to `works/_COMPLETED/`, remove their rows from WORK-LIST.md
147
-
148
- ---
149
-
150
- ## § 9. Locale Detection
151
-
152
- ```
153
- 1. CLAUDE.md → check "Language: xx"
154
- 2. If not found, ask user for language
155
- 3. If not found, auto-detect system locale
156
- - Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
157
- - Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
158
- - Fallback: "en"
159
- ```
160
-
161
- ---
162
-
163
- ## § 10. Callback Transmission Template
164
-
165
- → **Bash command rules: see § 13** — each step below is a separate tool call.
166
-
167
- Replace `{CallbackType}` with the actual key name (e.g., `ProgressCallback`, `TaskCallback`).
168
-
169
- **Step 1.** Use `Grep` tool to find `{CallbackType}:` line in CLAUDE.md. If not found, skip callback entirely.
170
-
171
- **Step 2.** Use `Grep` tool to find `CallbackToken:` line in CLAUDE.md (optional).
172
-
173
- **Step 3.** Send callback with a single `curl` command:
174
- ```bash
175
- curl -s -X POST "CALLBACK_URL" -H "Content-Type: application/json" -H "X-Runner-Api-Key: TOKEN" -d '{"workId":"WORK-01","taskId":"TASK-00",...}'
176
- ```
177
-
178
- Agent-specific payload fields:
179
- - **ProgressCallback** (builder): `"status": "IN_PROGRESS"`, `"currentReasoning": "..."`
180
- - **TaskCallback** (committer): `"status": "SUCCESS"`, `"commitHash": "${COMMIT_HASH}"`
181
-
182
- ---
183
-
184
- ## § 11. Project Discovery
185
-
186
- ```bash
187
- # 1. Check CLAUDE.md language setting
188
- grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
189
-
190
- # 2. Tech stack
191
- head -50 package.json 2>/dev/null
192
- head -30 pyproject.toml 2>/dev/null
193
- head -20 Cargo.toml 2>/dev/null
194
- head -10 go.mod 2>/dev/null
195
-
196
- # 3. Structure (when needed)
197
- find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) -not -path "*/node_modules/*" 2>/dev/null
198
- ```
199
-
200
- ---
201
-
202
- ## § 12. Progress File Gate Check
203
-
204
- Gate conditions for `works/WORK-NN/TASK-XX_progress.md`:
205
- - File exists at the expected path
206
- - `Status: COMPLETED` line is present
207
- - `## Files Changed` section is present and non-empty
208
-
209
- On gate failure → return FAIL task-result immediately. Do not proceed to subsequent steps.
210
-
211
- ---
212
-
213
- ## § 13. Bash Command Rules
214
-
215
- Bash commands MUST follow these rules for permission compatibility.
216
-
217
- **MANDATORY:**
218
- - One simple command per Bash call — NO compound commands (`&&`, `||`, `;`, `|`)
219
- - NO `cd dir && command` — you are already in the project root
220
- - NO multi-line scripts — split into separate Bash calls
221
- - NO sub-shell expansions in arguments — e.g., `$(date ...)` inside `printf`
222
- - Use relative paths from project root (e.g., `works/WORK-01/`) — NO absolute paths
223
- - Use `git add file`, `git commit -m "msg"` — NO `git -C path` flag
224
-
225
- **For file operations, prefer dedicated tools over Bash:**
226
- - Read files → `Read` tool (NOT `cat`)
227
- - Write/append files → `Write` tool (NOT `echo >>` or `printf >>`)
228
- - Edit files → `Edit` tool (NOT `sed -i`)
229
- - Search files → `Grep` tool (NOT `grep`)
230
- - Find files → `Glob` tool (NOT `find`)
231
-
232
- **Activity log example:**
233
- ```
234
- WRONG: printf '[%s]_%s\n' "$(date ...)" "INIT" >> work.log
235
- RIGHT: Use Write tool to append a line to the log file
236
- ```
237
-
238
- **Git example:**
239
- ```
240
- WRONG: cd /path/to/project && git add file && git commit -m "msg"
241
- RIGHT: git add file (one call)
242
- git commit -m "msg" (next call)
243
- ```
244
-
245
- ---
246
-
247
- ## Version
248
-
249
- - Created: 2026-03-10
250
- - Updated: 2026-03-28
@@ -1,47 +0,0 @@
1
- # Work Activity Log
2
-
3
- Defines the rules for each agent to record WORK progress in the `works/{WORK_ID}/work_{WORK_ID}.log` file.
4
-
5
- ---
6
-
7
- # 1. Stages and Log Content
8
- * On first execution: The received prompt message** Content of the prompt message received at agent startup (Required)
9
- * On Callback invocation: Called Callback URL, success status, Payload, Response (Required)
10
- * During work: Work items and work content
11
- * On task completion: The prompt message sent to other agents** Content of the prompt message received at agent startup (Required)
12
-
13
- ## log_work Method
14
-
15
- **Do NOT use Bash** for activity log writes. Use the `Write` tool (or `Edit` tool to append).
16
-
17
- Format each log entry as:
18
- ```
19
- [YYYY-MM-DDTHH:MM:SS]_AGENT_STAGE_description
20
- ```
21
-
22
- Example: to log an INIT stage, use the **Write** tool to append to `works/{WORK_ID}/work_{WORK_ID}.log`:
23
- ```
24
- [2026-03-28T14:30:00]_SPECIFIER_INIT_WORK-09 created — Execution-Mode: direct
25
- ```
26
-
27
- → **Bash command rules: see `shared-prompt-sections.md` § 13**
28
-
29
- ---
30
-
31
- ## STAGE Table
32
-
33
- | STAGE | Timing | Description Example |
34
- |-------|--------|---------------------|
35
- | `INIT` | After WORK_ID determined | `WORK-NN created — Execution-Mode: direct/pipeline/full` |
36
- | `REF` | After STARTUP references | `References: CLAUDE.md, .agent/router_rule_config.json, agents/file-content-schema.md` |
37
- | `PLAN` | After PLAN.md + TASK files created | `PLAN.md, TASK-00.md created` |
38
- | `IMPL` | When direct mode code implementation starts | `Code implementation started — References: {modified file list}` |
39
- | `BUILD` | After self-check passes | `Build/lint passed` |
40
- | `COMMIT` | After git commit completed | `commit {hash}` |
41
- | `DISPATCH` | On pipeline/full dispatch | `Builder dispatch` or `Planner dispatch` |
42
-
43
- ---
44
-
45
- ## Reference Collection Rules
46
-
47
- Cumulatively track files read during STARTUP and subsequent exploration, recording them all at once during the `REF` stage.