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.
- package/.claude-plugin/plugin.json +6 -0
- package/README.md +1122 -0
- package/agents/builder.md +28 -59
- package/agents/committer.md +41 -73
- package/agents/planner.md +30 -31
- package/agents/scheduler.md +40 -58
- package/agents/specifier.md +29 -31
- package/agents/verifier.md +31 -56
- package/bin/cli.mjs +11 -58
- package/lib/constants.mjs +14 -11
- package/lib/init.mjs +29 -16
- package/lib/update.mjs +28 -22
- package/package.json +5 -2
- package/skills/sdd-pipeline/SKILL.md +8 -6
- package/skills/work-pipeline/SKILL.md +31 -8
- package/skills/work-status/SKILL.md +2 -2
- package/agents/agent-flow.md +0 -279
- package/agents/context-policy.md +0 -94
- package/agents/file-content-schema.md +0 -249
- package/agents/ko/agent-flow.md +0 -231
- package/agents/ko/builder.md +0 -164
- package/agents/ko/committer.md +0 -202
- package/agents/ko/context-policy.md +0 -94
- package/agents/ko/file-content-schema.md +0 -249
- package/agents/ko/planner.md +0 -161
- package/agents/ko/scheduler.md +0 -189
- package/agents/ko/shared-prompt-sections.md +0 -250
- package/agents/ko/specifier.md +0 -194
- package/agents/ko/verifier.md +0 -149
- package/agents/ko/work-activity-log.md +0 -47
- package/agents/ko/xml-schema.md +0 -109
- package/agents/shared-prompt-sections.md +0 -250
- package/agents/work-activity-log.md +0 -47
- package/agents/xml-schema.md +0 -159
- package/skills/sdd-pipeline/references/agent-flow.md +0 -279
- package/skills/sdd-pipeline/references/context-policy.md +0 -94
- package/skills/sdd-pipeline/references/file-content-schema.md +0 -249
- package/skills/sdd-pipeline/references/shared-prompt-sections.md +0 -250
- package/skills/sdd-pipeline/references/work-activity-log.md +0 -47
- package/skills/sdd-pipeline/references/xml-schema.md +0 -159
package/agents/xml-schema.md
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
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.
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
# Agent Flow — Main Claude Orchestration Guide
|
|
2
|
-
|
|
3
|
-
> **All agent invocations are performed by Main Claude.**
|
|
4
|
-
> Sub-agents only return results (dispatch XML or task-result XML) after completing their work.
|
|
5
|
-
> Main Claude receives return values and invokes the next agent.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Pipeline Flow
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
[] tag detected → invoke specifier
|
|
13
|
-
│
|
|
14
|
-
Check specifier return value
|
|
15
|
-
│
|
|
16
|
-
├─ Assumed (direct) → specifier creates Requirement.md + PLAN.md + TASK-00
|
|
17
|
-
│ → returns builder dispatch XML
|
|
18
|
-
│ → execute § direct procedure
|
|
19
|
-
│
|
|
20
|
-
└─ Delegated (pipeline/full) → specifier creates Requirement.md only
|
|
21
|
-
→ returns planner dispatch XML
|
|
22
|
-
→ execute § planner-driven procedure
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Direct Mode (Specifier Assumes Planner)
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
1. Invoke specifier → creates Requirement.md + PLAN.md + TASK-00 + returns builder dispatch XML
|
|
31
|
-
2. ⛔ STOP — Present summary to user and WAIT for approval (do NOT invoke builder)
|
|
32
|
-
3. Invoke builder (dispatch XML as prompt) — includes self-check
|
|
33
|
-
4. Invoke verifier+committer (builder result as prompt) — verify then commit in one spawn
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
> Verifier+Committer combined: single spawn performs verification, then creates result.md and git commit.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Pipeline Mode (Separate Planner Invocation)
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
1. Invoke specifier+planner (single spawn) → creates Requirement.md + PLAN.md + TASK-NN + determines execution-mode
|
|
44
|
-
2. ⛔ STOP — Present Requirement.md + PLAN.md + TASK list and WAIT for approval
|
|
45
|
-
3. Invoke builder (per-TASK dispatch XML as prompt)
|
|
46
|
-
4. Invoke verifier+committer (builder result as prompt) — verify then commit in one spawn
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
> Specifier+Planner combined: specifier.md role first (Requirement.md), then planner.md role (PLAN.md + TASKs) in one spawn.
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Full Mode (With Scheduler)
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
1. Invoke specifier+planner (single spawn) → Requirement.md + PLAN.md + TASKs + execution-mode: full
|
|
57
|
-
2. ⛔ STOP — Present Requirement.md + PLAN.md + TASK list and WAIT for approval
|
|
58
|
-
3. Invoke scheduler → DAG analysis + READY TASK + returns builder dispatch XML
|
|
59
|
-
4. Invoke builder (dispatch XML as prompt) → implementation
|
|
60
|
-
5. Invoke verifier+committer (builder result as prompt) → verify then commit in one spawn
|
|
61
|
-
6. If incomplete TASKs remain, return to step 3
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Parallel execution: When scheduler returns multiple READY TASKs, invoke builders concurrently.
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Resuming Existing WORK
|
|
69
|
-
|
|
70
|
-
Resume pipeline for a WORK that already has PLAN.md + TASKs:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
1. Invoke scheduler → check READY TASKs + return builder dispatch XML
|
|
74
|
-
2. Invoke builder → implementation
|
|
75
|
-
3. Invoke verifier+committer → verify then commit in one spawn
|
|
76
|
-
4. If incomplete TASKs remain, return to step 1
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Combined Agent Invocation
|
|
82
|
-
|
|
83
|
-
### Specifier+Planner (single spawn)
|
|
84
|
-
|
|
85
|
-
When invoking specifier in pipeline/full mode, include both agent definitions:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
Prompt to agent:
|
|
89
|
-
"You will perform two roles in sequence.
|
|
90
|
-
|
|
91
|
-
Role 1 — Specifier: Read specifier.md and create Requirement.md.
|
|
92
|
-
Role 2 — Planner: Read planner.md and create PLAN.md + TASK files.
|
|
93
|
-
|
|
94
|
-
Execute Role 1 first, then Role 2. Return the combined result."
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
- Use specifier's model (opus) for the spawn
|
|
98
|
-
- Agent reads both specifier.md and planner.md from REFERENCES_DIR
|
|
99
|
-
- Returns: Requirement.md + PLAN.md + TASK files + execution-mode
|
|
100
|
-
|
|
101
|
-
### Verifier+Committer (single spawn)
|
|
102
|
-
|
|
103
|
-
When invoking verification after builder completes:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
Prompt to agent:
|
|
107
|
-
"You will perform two roles in sequence.
|
|
108
|
-
|
|
109
|
-
Role 1 — Verifier: Read verifier.md and verify build/lint/test.
|
|
110
|
-
Role 2 — Committer: Read committer.md and create result.md + git commit.
|
|
111
|
-
|
|
112
|
-
Execute Role 1 first. If verification PASSES, execute Role 2.
|
|
113
|
-
If verification FAILS, skip Role 2 and return FAIL result."
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
- Use verifier's model (haiku) for the spawn
|
|
117
|
-
- Agent reads both verifier.md and committer.md from REFERENCES_DIR
|
|
118
|
-
- On PASS: returns verification result + commit hash
|
|
119
|
-
- On FAIL: returns verification failure only (no commit)
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Agent Role Summary
|
|
124
|
-
|
|
125
|
-
| Agent | Role | Model | Combined With |
|
|
126
|
-
|-------|------|-------|---------------|
|
|
127
|
-
| specifier | Requirement analysis | opus | + planner (pipeline/full) |
|
|
128
|
-
| planner | PLAN + TASK decomposition | opus | combined into specifier spawn |
|
|
129
|
-
| scheduler | DAG management + dispatch | haiku | standalone |
|
|
130
|
-
| builder | Code implementation | sonnet | standalone |
|
|
131
|
-
| verifier | Build/lint/test verification | haiku | + committer |
|
|
132
|
-
| committer | Result report + git commit | haiku | combined into verifier spawn |
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Sub-agent Spawn Count by Mode
|
|
137
|
-
|
|
138
|
-
| Mode | Spec+Plan | Scheduler | Builder | Veri+Commit | Total |
|
|
139
|
-
|------|:---------:|:---------:|:-------:|:-----------:|:-----:|
|
|
140
|
-
| direct | 1 (assumed) | — | 1 | 1 | **3** |
|
|
141
|
-
| pipeline | 1 (combined) | — | 1 | 1 | **3** |
|
|
142
|
-
| full (N TASKs) | 1 (combined) | 1 | N | N | **2 + 2N** |
|
|
143
|
-
|
|
144
|
-
**Before vs After (6 TASKs):**
|
|
145
|
-
|
|
146
|
-
| | Before | After | Reduction |
|
|
147
|
-
|---|:---:|:---:|:---:|
|
|
148
|
-
| Spawns | 2 + 3×6 = 20 | 2 + 2×6 = 14 | **-30%** |
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Approval Gates (CRITICAL)
|
|
153
|
-
|
|
154
|
-
> **MUST STOP and wait for explicit user approval before invoking the next agent.**
|
|
155
|
-
> Do NOT proceed until the user says "approve", "승인", "proceed", "go ahead", or equivalent.
|
|
156
|
-
> The only exception is auto mode — when the user's original message contains "auto" or "자동으로".
|
|
157
|
-
|
|
158
|
-
| Mode | Approvals | Timing | What to show user |
|
|
159
|
-
|------|:---------:|--------|-------------------|
|
|
160
|
-
| direct | 1 | After Specifier completes | Requirement.md + PLAN.md + TASK-00.md summary |
|
|
161
|
-
| pipeline/full | 1 | After Specifier+Planner completes | Requirement.md + PLAN.md + TASK list |
|
|
162
|
-
| auto-approve | 0 | — | Skip all approval gates |
|
|
163
|
-
|
|
164
|
-
> Note: pipeline/full now has **1 approval** (not 2), since specifier and planner run in one spawn.
|
|
165
|
-
|
|
166
|
-
**How to request approval:**
|
|
167
|
-
1. Present a summary of what the specifier+planner created (files, scope, execution-mode)
|
|
168
|
-
2. Ask: "Proceed?" or equivalent
|
|
169
|
-
3. **WAIT for user response** — do NOT invoke builder until approved
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Bash CLI Execution (Server Automation)
|
|
174
|
-
|
|
175
|
-
Run the pipeline independently without a conversation session. `claude -p` acts as Main Claude.
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
179
|
-
"[new-work] {task description}" \
|
|
180
|
-
--dangerously-skip-permissions \
|
|
181
|
-
--output-format stream-json \
|
|
182
|
-
--verbose \
|
|
183
|
-
2>&1 | tee /tmp/pipeline.log
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
| Option | Purpose |
|
|
187
|
-
|--------|---------|
|
|
188
|
-
| `env -u CLAUDECODE` | Bypass nested execution block |
|
|
189
|
-
| `env -u ANTHROPIC_API_KEY` | Use subscription auth (Max) instead of API key |
|
|
190
|
-
| `--dangerously-skip-permissions` | Skip permission prompts for unattended execution |
|
|
191
|
-
| `--output-format stream-json --verbose` | Streaming for real-time monitoring |
|
|
192
|
-
|
|
193
|
-
Resume interrupted pipeline:
|
|
194
|
-
```bash
|
|
195
|
-
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
196
|
-
"Resume WORK-XX pipeline." \
|
|
197
|
-
--dangerously-skip-permissions
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## References Directory Passing (REQUIRED)
|
|
203
|
-
|
|
204
|
-
Main Claude MUST pass the references directory path to every sub-agent invocation.
|
|
205
|
-
This allows sub-agents to locate their reference files regardless of installation method (npm or plugin).
|
|
206
|
-
|
|
207
|
-
**How to pass:**
|
|
208
|
-
- Prepend `REFERENCES_DIR={absolute_path}` at the top of the prompt for every Task tool call
|
|
209
|
-
- For npm installations: use `.claude/agents` (default, resolved from project root)
|
|
210
|
-
- For plugin installations: derive from the skill's "Base directory" (`{base_dir}/../sdd-pipeline/references`)
|
|
211
|
-
|
|
212
|
-
**Example:**
|
|
213
|
-
```
|
|
214
|
-
REFERENCES_DIR=C:/Users/me/.claude/plugins/cache/uc-taskmanager/abc123/skills/sdd-pipeline/references
|
|
215
|
-
|
|
216
|
-
<dispatch to="builder" ...>
|
|
217
|
-
...
|
|
218
|
-
</dispatch>
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
If REFERENCES_DIR is not available (e.g., npm installation without plugin), sub-agents fall back to `.claude/agents/`.
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## Context Handoff (Sliding Window)
|
|
226
|
-
|
|
227
|
-
| Distance | Level | Content |
|
|
228
|
-
|----------|-------|---------|
|
|
229
|
-
| Previous | FULL | what + why + caution + incomplete |
|
|
230
|
-
| 2 steps back | SUMMARY | what 1-2 lines |
|
|
231
|
-
| 3+ steps | DROP | Not passed |
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## ref-cache Chain Propagation
|
|
236
|
-
|
|
237
|
-
`<ref-cache>` carries pre-loaded reference file contents through the pipeline, eliminating redundant disk reads in each sub-agent.
|
|
238
|
-
|
|
239
|
-
### Rules
|
|
240
|
-
|
|
241
|
-
1. **First agent (typically specifier)** — no ref-cache available on dispatch. Reads reference files from `REFERENCES_DIR` normally.
|
|
242
|
-
|
|
243
|
-
2. **Agent returns task-result** — if the agent supports ref-cache, it includes `<ref-cache>` in its task-result XML containing all reference files it loaded.
|
|
244
|
-
|
|
245
|
-
3. **Main Claude propagates ref-cache** — when dispatching the next agent, copy the `<ref-cache>` block from the previous task-result into the new dispatch XML unchanged.
|
|
246
|
-
|
|
247
|
-
4. **Receiving agent skips file reads** — when `<ref-cache>` is present in the dispatch XML, the agent reads reference content from `<ref>` elements instead of reading files from disk.
|
|
248
|
-
|
|
249
|
-
5. **Missing ref-cache** — if a task-result does not contain `<ref-cache>` (agent does not support it yet), omit `<ref-cache>` from the next dispatch. The receiving agent falls back to reading files from disk.
|
|
250
|
-
|
|
251
|
-
### Flow Example
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
specifier+planner (no ref-cache in) → reads files → returns task-result with <ref-cache>
|
|
255
|
-
↓ Main Claude copies <ref-cache> into dispatch
|
|
256
|
-
builder (ref-cache in) → skips file reads → returns task-result with <ref-cache>
|
|
257
|
-
↓ Main Claude copies <ref-cache> into dispatch
|
|
258
|
-
verifier+committer (ref-cache in) → skips file reads → commit
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### Phase 2: Selective Section Delivery
|
|
262
|
-
|
|
263
|
-
Instead of passing full reference files, Main Claude extracts only the sections each agent needs. This reduces dispatch token size by 50-70%.
|
|
264
|
-
|
|
265
|
-
**Main Claude reads reference files once at pipeline start**, then delivers condensed `<ref-cache>` per agent using this mapping:
|
|
266
|
-
|
|
267
|
-
| Agent | shared-prompt-sections | file-content-schema | xml-schema | context-policy | work-activity-log |
|
|
268
|
-
|-------|:---:|:---:|:---:|:---:|:---:|
|
|
269
|
-
| **specifier+planner** | §1,§2,§7,§8,§9,§11 | §0,§1,§2,§3 | §1,§3 | — | full |
|
|
270
|
-
| **scheduler** | §4,§8,§10 | §1,§6 | §1,§3,§4,§5 | full | full |
|
|
271
|
-
| **builder** | §1,§2,§10,§12 | §2,§3 | §1,§2,§4 | Builder section | full |
|
|
272
|
-
| **verifier+committer** | §1,§2,§8,§10,§12 | §3,§4,§5,§6,§7 | §1,§2,§4 | Verifier+Committer | full |
|
|
273
|
-
|
|
274
|
-
**Delivery format**: Condense each `<ref key="">` to contain only the needed sections, not the full file. Use one-line summaries for simple rules, keep full content only for templates and code blocks.
|
|
275
|
-
|
|
276
|
-
### Constraints
|
|
277
|
-
|
|
278
|
-
- **ref-cache does not replace REFERENCES_DIR** — always pass `REFERENCES_DIR` (or `<references-dir>`) in every dispatch regardless of ref-cache presence, for backward compatibility.
|
|
279
|
-
- **Agents may still read files** — if ref-cache content is insufficient, agents fall back to reading from disk.
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# Context Handoff Policy
|
|
2
|
-
|
|
3
|
-
Sliding window context transfer rules between agents.
|
|
4
|
-
|
|
5
|
-
## Sliding Window
|
|
6
|
-
|
|
7
|
-
| Step Distance | Detail Level | Rule |
|
|
8
|
-
|---------------|-------------|------|
|
|
9
|
-
| Immediate (1 step) | `FULL` | All 4 fields transmitted |
|
|
10
|
-
| 2 steps back | `SUMMARY` | `what` field only, 1-3 lines |
|
|
11
|
-
| 3+ steps back | `DROP` | Omitted |
|
|
12
|
-
|
|
13
|
-
## Context-Handoff 4 Fields
|
|
14
|
-
|
|
15
|
-
| Field | FULL | SUMMARY | Content |
|
|
16
|
-
|-------|:----:|:-------:|---------|
|
|
17
|
-
| `what` | ✅ | ✅ | Summary of changes/verification (2-5 lines) |
|
|
18
|
-
| `why` | ✅ | ❌ | Decision rationale (2-4 lines) |
|
|
19
|
-
| `caution` | ✅ | ❌ | Caveats, conditional completion (1-3 lines) |
|
|
20
|
-
| `incomplete` | ✅ | ❌ | Incomplete items (1-2 lines, "None" if empty) |
|
|
21
|
-
|
|
22
|
-
## Pipeline Stage Input/Output
|
|
23
|
-
|
|
24
|
-
### Builder
|
|
25
|
-
|
|
26
|
-
Input: TASK spec + dependent TASK result.md context-handoff (sliding window)
|
|
27
|
-
|
|
28
|
-
Output:
|
|
29
|
-
```xml
|
|
30
|
-
<task-result status="PASS|FAIL">
|
|
31
|
-
<context-handoff from="builder" detail-level="FULL">
|
|
32
|
-
<what>Changes made</what><why>Rationale</why><caution>Caveats</caution><incomplete>Incomplete items</incomplete>
|
|
33
|
-
</context-handoff>
|
|
34
|
-
</task-result>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Verifier
|
|
38
|
-
|
|
39
|
-
Input: TASK spec + Builder context-handoff (FULL)
|
|
40
|
-
|
|
41
|
-
Output:
|
|
42
|
-
```xml
|
|
43
|
-
<task-result status="PASS|FAIL">
|
|
44
|
-
<context-handoff from="verifier" detail-level="FULL">
|
|
45
|
-
<what>Verification results</what><why>Judgment rationale</why><caution>Manual checks needed</caution><incomplete>Items that could not be verified</incomplete>
|
|
46
|
-
</context-handoff>
|
|
47
|
-
</task-result>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Committer
|
|
51
|
-
|
|
52
|
-
Input: Verifier context-handoff (FULL) + Builder context-handoff (SUMMARY) + progress.md (gate)
|
|
53
|
-
|
|
54
|
-
Processing:
|
|
55
|
-
1. progress.md gate: exists + Status=COMPLETED + Files changed is not empty
|
|
56
|
-
2. Gate passed → write result.md + git commit
|
|
57
|
-
3. Gate failed → return FAIL (triggers scheduler retry)
|
|
58
|
-
|
|
59
|
-
Output: → `{REFERENCES_DIR}/file-content-schema.md` § 4 reference
|
|
60
|
-
|
|
61
|
-
## Inter-TASK Dependency Transfer
|
|
62
|
-
|
|
63
|
-
- Immediate dependent TASK: context-handoff **FULL** (all 4 fields)
|
|
64
|
-
- 2 steps back: **SUMMARY** (what only)
|
|
65
|
-
- 3+ steps back: **DROP**
|
|
66
|
-
|
|
67
|
-
## Scheduler Dispatch
|
|
68
|
-
|
|
69
|
-
```xml
|
|
70
|
-
<!-- Verifier: Builder FULL -->
|
|
71
|
-
<dispatch to="verifier">
|
|
72
|
-
<context-handoff from="builder" detail-level="FULL">...</context-handoff>
|
|
73
|
-
</dispatch>
|
|
74
|
-
|
|
75
|
-
<!-- Committer: Verifier FULL + Builder SUMMARY -->
|
|
76
|
-
<dispatch to="committer">
|
|
77
|
-
<context-handoff from="verifier" detail-level="FULL">...</context-handoff>
|
|
78
|
-
<context-handoff from="builder" detail-level="SUMMARY"><what>...</what></context-handoff>
|
|
79
|
-
</dispatch>
|
|
80
|
-
|
|
81
|
-
<!-- Next TASK Builder: dependency distance applied -->
|
|
82
|
-
<dispatch to="builder" task="TASK-YY">
|
|
83
|
-
<previous-results>
|
|
84
|
-
<context-handoff from="prev-task" task="TASK-XX" detail-level="FULL">...</context-handoff>
|
|
85
|
-
<context-handoff from="prev-prev-task" task="TASK-WW" detail-level="SUMMARY"><what>...</what></context-handoff>
|
|
86
|
-
</previous-results>
|
|
87
|
-
</dispatch>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Committer Retry
|
|
91
|
-
|
|
92
|
-
1. Failure cause: progress.md not found / Status≠COMPLETED / No files changed
|
|
93
|
-
2. Re-dispatch to builder including existing progress.md
|
|
94
|
-
3. Maximum 2 retries (3 attempts total). 3 failures → TASK FAILED, pipeline halted
|