uctm 1.3.2 → 1.5.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.
@@ -0,0 +1,249 @@
1
+ # File Content Schema
2
+
3
+ Single source of truth for pipeline artifact file formats.
4
+
5
+ ## COMPLIANCE
6
+
7
+ | Generated File | Reference Section | Violation Consequence |
8
+ |----------------|-------------------|----------------------|
9
+ | `PLAN.md` | § 1 | `parsePlanMd()` parsing failure, scheduler inoperable |
10
+ | `TASK-XX.md` | § 2 | `parseTaskFilename()` DB registration missed |
11
+ | `TASK-XX_progress.md` | § 3 | committer gate FAIL |
12
+ | `TASK-XX_result.md` | § 4 | context-handoff missing |
13
+ | `TASK-XX_result.md` (direct) | § 5 | result.md recognition failure |
14
+ | `PROGRESS.md` | § 6 | scheduler progress tracking inoperable |
15
+
16
+ ---
17
+
18
+ ## § 0. Requirement.md
19
+
20
+ Path: `works/{WORK_ID}/Requirement.md`
21
+
22
+ ```markdown
23
+ # Requirement — WORK-NN
24
+
25
+ ## Original Request
26
+ > User's exact input
27
+
28
+ ## Functional Requirements
29
+ - FR-01: ...
30
+ - FR-02: ...
31
+
32
+ ## Non-Functional Requirements
33
+ - NFR-01: ...
34
+
35
+ ## Acceptance Criteria
36
+ - [ ] Verifiable criteria
37
+ ```
38
+
39
+ Created by: Specifier (mandatory for all requests)
40
+
41
+ ---
42
+
43
+ ## § 1. PLAN.md
44
+
45
+ Path: `works/{WORK_ID}/PLAN.md`
46
+
47
+ ```markdown
48
+ # WORK-01: {title}
49
+
50
+ > Created: {YYYY-MM-DD}
51
+ > Requirement: {REQ-XXX | user request text}
52
+ > Execution-Mode: {direct | pipeline | full}
53
+ > Project: {project name}
54
+ > Tech Stack: {stack}
55
+ > Language: {lang_code}
56
+ > Status: PLANNED
57
+
58
+ ## Goal
59
+ {1-2 sentences}
60
+
61
+ ## Task Dependency Graph
62
+ {ASCII diagram}
63
+
64
+ ## Tasks
65
+
66
+ ### TASK-00: {title}
67
+ - **Depends on**: (none)
68
+ - **Scope**: {description}
69
+ - **Files**:
70
+ - `path/to/file` — {description}
71
+
72
+ ### TASK-01: {title}
73
+ - **Depends on**: TASK-00
74
+ ```
75
+
76
+ Title format: `# WORK-NN: title` — `# PLAN WORK-NN:` is prohibited (`parsePlanMd()` error)
77
+
78
+ ---
79
+
80
+ ## § 2. TASK-XX.md
81
+
82
+ Path: `works/{WORK_ID}/TASK-XX.md`
83
+
84
+ > `parseTaskFilename()` regex: `/^TASK-(\d+)\.md$/` — WORK prefix prohibited
85
+
86
+ ```markdown
87
+ # TASK-XX: {title}
88
+
89
+ ## WORK
90
+ {WORK_ID}: {WORK title}
91
+
92
+ ## Dependencies
93
+ - TASK-YY (required)
94
+
95
+ ## Scope
96
+ {description}
97
+
98
+ ## Files
99
+ | Path | Action | Description |
100
+ |------|--------|-------------|
101
+ | `src/file.ts` | CREATE | description |
102
+
103
+ ## Acceptance Criteria
104
+ - [ ] {criterion}
105
+
106
+ ## Verify
107
+ ```bash
108
+ {verification commands}
109
+ ```
110
+ ```
111
+
112
+ ---
113
+
114
+ ## § 3. TASK-XX_progress.md
115
+
116
+ Path: `works/{WORK_ID}/TASK-XX_progress.md`
117
+
118
+ ```markdown
119
+ # TASK-XX Progress
120
+
121
+ - Status: {PENDING | STARTED | IN_PROGRESS | COMPLETED}
122
+ - Started: {ISO 8601}
123
+ - Updated: {ISO 8601}
124
+ - Files changed:
125
+ - `path/to/file` — {CREATE | MODIFY | DELETE}
126
+ ```
127
+
128
+ | Timing | Status |
129
+ |--------|--------|
130
+ | planner template | `PENDING` |
131
+ | builder starts | `STARTED` |
132
+ | file changes in progress | `IN_PROGRESS` |
133
+ | completed | `COMPLETED` |
134
+
135
+ committer gate: file exists + `Status: COMPLETED` + Files changed is not empty
136
+
137
+ ---
138
+
139
+ ## § 4. TASK-XX_result.md (full / pipeline)
140
+
141
+ Path: `works/{WORK_ID}/TASK-XX_result.md`
142
+
143
+ ```markdown
144
+ # TASK-XX Result
145
+
146
+ > WORK: {WORK_ID} — {title}
147
+ > Completed: {YYYY-MM-DD HH:MM}
148
+ > Status: **DONE**
149
+
150
+ {## Summary | ## 요약 | ## サマリー}
151
+ {1-2 lines}
152
+
153
+ {## Completed Checklist | ## 완료 체크리스트 | ## 完了チェックリスト}
154
+ - [x] {item}
155
+
156
+ {## Verification Results | ## 검증 결과 | ## 検証結果}
157
+ - Build: ✅
158
+ - Lint: ✅
159
+ - Tests: ✅ (N passed)
160
+
161
+ {## Files Changed | ## 변경 파일 | ## 変更ファイル}
162
+ ### Created
163
+ - `path` — {description}
164
+
165
+ {## Issues Encountered | ## 발생 이슈 | ## 発生した問題}
166
+ None
167
+
168
+ {## Notes for Subsequent Tasks | ## 후속 TASK 참고사항 | ## 後続タスクへの注記}
169
+ None
170
+
171
+ {## Context Handoff | ## 컨텍스트 핸드오프 | ## コンテキスト引き継ぎ}
172
+
173
+ ### Builder Context (SUMMARY)
174
+ {builder what field 1-3 lines}
175
+
176
+ ### Verifier Context (FULL)
177
+ {verifier context-handoff 4 fields}
178
+ ```
179
+
180
+ | Section | en | ko | ja |
181
+ |---------|----|----|-----|
182
+ | Summary | `## Summary` | `## 요약` | `## サマリー` |
183
+ | Completed Checklist | `## Completed Checklist` | `## 완료 체크리스트` | `## 完了チェックリスト` |
184
+ | Verification Results | `## Verification Results` | `## 검증 결과` | `## 検証結果` |
185
+ | Files Changed | `## Files Changed` | `## 변경 파일` | `## 変更ファイル` |
186
+ | Issues Encountered | `## Issues Encountered` | `## 발생 이슈` | `## 発生した問題` |
187
+ | Notes for Subsequent Tasks | `## Notes for Subsequent Tasks` | `## 후속 TASK 참고사항` | `## 後続タスクへの注記` |
188
+ | Context Handoff | `## Context Handoff` | `## 컨텍스트 핸드오프` | `## コンテキスト引き継ぎ` |
189
+
190
+ ---
191
+
192
+ ## § 5. TASK-XX_result.md (direct mode)
193
+
194
+ ```markdown
195
+ # TASK-00 Result
196
+
197
+ > WORK: WORK-NN — {title}
198
+ > Completed: {YYYY-MM-DD HH:MM}
199
+ > Execution-Mode: direct
200
+ > Status: **DONE**
201
+
202
+ ## Summary
203
+ {1 line}
204
+
205
+ ## Files Changed
206
+ - `{path}` — {description}
207
+
208
+ ## Verification
209
+ - Build: PASS (self-check)
210
+ - Lint: PASS (self-check)
211
+ ```
212
+
213
+ ---
214
+
215
+ ## § 6. PROGRESS.md
216
+
217
+ Path: `works/{WORK_ID}/PROGRESS.md`
218
+
219
+ ```markdown
220
+ # {WORK_ID} Progress
221
+
222
+ > WORK: {title}
223
+ > Last updated: {timestamp}
224
+ > Mode: manual | auto
225
+
226
+ | TASK | Title | Status | Commit | Duration |
227
+ |------|-------|--------|--------|----------|
228
+ | TASK-00 | {title} | ✅ Done | abc1234 | 12min |
229
+ | TASK-01 | {title} | 🔄 In Progress | — | — |
230
+
231
+ ## Log
232
+ - [10:00] TASK-00 started
233
+ - [10:12] TASK-00 verified ✅, committed abc1234
234
+ ```
235
+
236
+ ---
237
+
238
+ ## § 7. File Naming Rules
239
+
240
+ | Type | Format | Created By |
241
+ |------|--------|------------|
242
+ | Requirement | `Requirement.md` | specifier |
243
+ | WORK plan | `PLAN.md` | planner / specifier |
244
+ | TASK plan | `TASK-NN.md` | planner / specifier |
245
+ | TASK progress | `TASK-NN_progress.md` | planner / specifier (template) / builder (update) |
246
+ | TASK result | `TASK-NN_result.md` | committer |
247
+ | WORK progress | `PROGRESS.md` | scheduler |
248
+
249
+ `WORK-NN-TASK-NN.md` format prohibited → `parseTaskFilename()` cannot recognize it.
@@ -0,0 +1,250 @@
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
@@ -0,0 +1,47 @@
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.
@@ -0,0 +1,159 @@
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
+ <ref-cache> <!-- optional -->
12
+ <ref key="shared-prompt-sections">{file content}</ref>
13
+ <ref key="file-content-schema">{file content}</ref>
14
+ <ref key="xml-schema">{file content}</ref>
15
+ <ref key="context-policy">{file content}</ref>
16
+ <ref key="work-activity-log">{file content}</ref>
17
+ </ref-cache>
18
+ <references-dir>{absolute path to references directory}</references-dir>
19
+ <context>
20
+ <project>{project name}</project>
21
+ <language>{lang_code}</language>
22
+ <plan-file>works/{WORK_ID}/PLAN.md</plan-file>
23
+ </context>
24
+ <task-spec>
25
+ <file>works/{WORK_ID}/TASK-XX.md</file>
26
+ <title>{title}</title>
27
+ <action>{implement|verify|commit|plan|route}</action>
28
+ <description>{optional}</description>
29
+ </task-spec>
30
+ <previous-results>
31
+ <result task="{TASK_ID}" status="{PASS|FAIL|SKIP}">{summary}</result>
32
+ </previous-results>
33
+ <cache-hint sections="{section1},{section2}"/>
34
+ </dispatch>
35
+ ```
36
+
37
+ | Attribute | Value |
38
+ |-----------|-------|
39
+ | `to` | builder, verifier, committer, planner, scheduler, specifier |
40
+ | `task` | `TASK-NN` — WORK prefix must NOT be included |
41
+ | `execution-mode` | direct / pipeline / full (defaults to full if omitted) |
42
+
43
+ ---
44
+
45
+ ## 2. Task Result Format (Receiver → Dispatcher)
46
+
47
+ ```xml
48
+ <task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
49
+ <summary>{1-2 line summary}</summary>
50
+ <files-changed>
51
+ <file action="{created|modified|deleted}" path="{path}">{description}</file>
52
+ </files-changed>
53
+ <verification>
54
+ <check name="{type}" status="{PASS|FAIL|N/A}">{output}</check>
55
+ </verification>
56
+ <notes>{notes}</notes>
57
+ <ref-cache> <!-- optional -->
58
+ <ref key="shared-prompt-sections">{file content}</ref>
59
+ <ref key="file-content-schema">{file content}</ref>
60
+ <ref key="xml-schema">{file content}</ref>
61
+ <ref key="context-policy">{file content}</ref>
62
+ <ref key="work-activity-log">{file content}</ref>
63
+ </ref-cache>
64
+ </task-result>
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 3. Dispatcher-Receiver Mapping
70
+
71
+ | Dispatcher | Receiver | execution-mode | Description |
72
+ |------------|----------|:--------------:|-------------|
73
+ | Specifier | Builder | `direct` | Assumed: single TASK implementation (Verifier skipped) |
74
+ | Specifier | Planner | `pipeline/full` | Delegated: complex WORK planning |
75
+ | Planner | Builder | `pipeline` | TASK implementation |
76
+ | Planner | Scheduler | `full` | DAG management + execution |
77
+ | Scheduler | Builder | `full` | N TASK implementation |
78
+ | Scheduler | Verifier | `full` | N TASK verification |
79
+ | Scheduler | Committer | `full` | N TASK commit |
80
+
81
+ ---
82
+
83
+ ## 4. Context-Handoff Element
84
+
85
+ ```xml
86
+ <context-handoff from="{agent}" detail-level="{FULL|SUMMARY|DROP}">
87
+ <what>{changes/verification details}</what>
88
+ <why>{decision rationale}</why> <!-- FULL only -->
89
+ <caution>{caveats}</caution> <!-- FULL only -->
90
+ <incomplete>{incomplete items}</incomplete> <!-- FULL only -->
91
+ </context-handoff>
92
+ ```
93
+
94
+ | detail-level | Included Fields |
95
+ |:---:|---|
96
+ | `FULL` | what, why, caution, incomplete |
97
+ | `SUMMARY` | what only (1-3 lines) |
98
+ | `DROP` | Element omitted |
99
+
100
+ ---
101
+
102
+ ## 5. Agent Behavior by execution-mode
103
+
104
+ | Agent | direct | pipeline | full |
105
+ |-------|--------|----------|------|
106
+ | Specifier | Requirement.md + PLAN.md + TASK (assumed) | Requirement.md only → delegate to Planner | Requirement.md only → delegate to Planner |
107
+ | Planner | Not invoked (Specifier assumed) | PLAN.md + TASK + execution-mode | PLAN.md + TASK + execution-mode |
108
+ | Scheduler | Not invoked | Not invoked | DAG management + [B→V→C]×N |
109
+ | Builder | Normal execution (self-check) | Normal execution | Normal execution |
110
+ | Verifier | Not invoked | Normal execution | Normal execution |
111
+ | Committer | result.md+commit+callback | result.md+commit+callback | result.md+commit+callback |
112
+
113
+ Invariants (regardless of mode):
114
+
115
+ | Item | direct | pipeline/full |
116
+ |------|:---:|:---:|
117
+ | `works/WORK-NN/` directory | Specifier | Specifier |
118
+ | `Requirement.md` | Specifier | Specifier |
119
+ | `PLAN.md` | Specifier (assumed) | Planner |
120
+ | `TASK-XX.md` | Specifier (assumed) | Planner |
121
+ | `TASK-XX_result.md` | Committer | Committer |
122
+ | COMMITTER DONE callback | Committer | Committer |
123
+ | `WORK-LIST.md` IN_PROGRESS | Specifier | Specifier |
124
+
125
+ ---
126
+
127
+ ## 6. ref-cache Element Definition
128
+
129
+ `<ref-cache>` is an optional container element that carries pre-loaded reference file contents within dispatch and task-result XML. When present, receiving agents MUST use these contents instead of reading files from disk.
130
+
131
+ ### Structure
132
+
133
+ ```xml
134
+ <ref-cache>
135
+ <ref key="{filename-without-extension}">{full file content}</ref>
136
+ ...
137
+ </ref-cache>
138
+ ```
139
+
140
+ | Element | Required | Description |
141
+ |---------|----------|-------------|
142
+ | `<ref-cache>` | Optional | Container for cached reference files. Omit entirely if no cache is available. |
143
+ | `<ref key="...">` | — | Individual reference file. `key` is the filename without extension (e.g., `shared-prompt-sections`). |
144
+
145
+ ### Recognized Keys
146
+
147
+ | Key | Corresponding File |
148
+ |-----|--------------------|
149
+ | `shared-prompt-sections` | `{REFERENCES_DIR}/shared-prompt-sections.md` |
150
+ | `file-content-schema` | `{REFERENCES_DIR}/file-content-schema.md` |
151
+ | `xml-schema` | `{REFERENCES_DIR}/xml-schema.md` |
152
+ | `context-policy` | `{REFERENCES_DIR}/context-policy.md` |
153
+ | `work-activity-log` | `{REFERENCES_DIR}/work-activity-log.md` |
154
+
155
+ ### Backward Compatibility
156
+
157
+ - Dispatch or task-result XML without `<ref-cache>` is fully valid — agents fall back to reading files from `REFERENCES_DIR`.
158
+ - Agents that do not yet support ref-cache simply ignore the element and read files normally.
159
+ - Partial ref-cache (only some keys present) is allowed — missing keys are read from disk.