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
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: work-pipeline
|
|
3
|
-
description: Triggers the WORK-PIPELINE when
|
|
3
|
+
description: Triggers the WORK-PIPELINE. Use this skill when (1) user request starts with a [] tag (e.g., [new-feature], [bugfix]), or (2) user asks to resume/continue a WORK (e.g., "WORK-01 계속실행", "resume WORK-01", "WORK-01 실행", "continue WORK-01").
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# WORK-PIPELINE Trigger
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Read `../../references/agent-flow.md` and follow the orchestration flow.
|
|
9
9
|
|
|
10
10
|
## Trigger Detection
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**New WORK** — message starts with `[...]` tag:
|
|
13
13
|
- `[new-feature]`, `[enhancement]`, `[bugfix]`, `[new-work]`, `[WORK start]`
|
|
14
14
|
- Or any custom tag in square brackets
|
|
15
15
|
|
|
16
|
+
**Resume WORK** — message mentions existing WORK-ID with execution intent:
|
|
17
|
+
- "WORK-XX 계속실행", "WORK-XX 실행", "resume WORK-XX", "continue WORK-XX"
|
|
18
|
+
- "파이프라인 재개", "WORK 계속"
|
|
19
|
+
- → Follow agent-flow.md § Resuming Existing WORK
|
|
20
|
+
|
|
16
21
|
## References Directory (CRITICAL)
|
|
17
22
|
|
|
18
23
|
When this skill is triggered, Claude Code provides the "Base directory for this skill" as an absolute path.
|
|
19
24
|
Derive the **REFERENCES_DIR** from it:
|
|
20
25
|
|
|
21
26
|
```
|
|
22
|
-
REFERENCES_DIR = {Base directory}
|
|
27
|
+
REFERENCES_DIR = {Base directory}/../../references
|
|
23
28
|
```
|
|
24
29
|
|
|
25
30
|
You MUST pass this absolute path to **every sub-agent invocation** (specifier, planner, scheduler, builder, verifier, committer).
|
|
@@ -31,14 +36,32 @@ REFERENCES_DIR={absolute_path}
|
|
|
31
36
|
|
|
32
37
|
Sub-agents need this path to read their reference files. Without it, they cannot find the files and will loop.
|
|
33
38
|
|
|
39
|
+
## Callback Info Passthrough
|
|
40
|
+
|
|
41
|
+
If the user's prompt contains `CALLBACK_URL=...` and `CALLBACK_TOKEN=...`, extract these values and pass them to **every sub-agent invocation** alongside REFERENCES_DIR:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
CALLBACK_URL={url}
|
|
45
|
+
CALLBACK_TOKEN={token}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Main Claude (this skill) must NEVER send callbacks itself.** Only sub-agents send callbacks.
|
|
49
|
+
|
|
34
50
|
## Pipeline Flow
|
|
35
51
|
|
|
36
|
-
1. **
|
|
52
|
+
1. **Spawn specifier agent** (via Agent tool) — analyzes the requirement, creates `works/WORK-NN/Requirement.md`, determines execution-mode (direct/pipeline/full)
|
|
37
53
|
2. **⛔ STOP — Present the specifier's output summary to the user and WAIT for explicit approval.** Do NOT call the next agent until the user approves. Show what was created (Requirement.md, PLAN.md if direct mode, TASK files) and ask "Proceed?"
|
|
38
54
|
3. **Follow the execution-mode** returned by specifier:
|
|
39
|
-
- `direct`:
|
|
40
|
-
- `pipeline`:
|
|
41
|
-
- `full`:
|
|
55
|
+
- `direct`: spawn builder (Agent tool) → spawn verifier+committer (single Agent tool, see agent-flow.md § Combined Agent Invocation)
|
|
56
|
+
- `pipeline`: for each TASK → spawn builder → spawn verifier+committer (repeat per TASK)
|
|
57
|
+
- `full`: spawn planner → **⛔ STOP for 2nd approval** → spawn scheduler → scheduler handles [builder → verifier+committer] × N
|
|
58
|
+
|
|
59
|
+
## ⚠️ CRITICAL: Agent Spawn Rules
|
|
60
|
+
|
|
61
|
+
- **EVERY agent MUST be spawned via the Agent tool.** Main Claude must NEVER implement code, create files, run git commands, or perform any agent's work directly.
|
|
62
|
+
- In direct mode: spawn specifier → spawn builder → spawn verifier+committer (**3 Agent tool calls**).
|
|
63
|
+
- verifier+committer is a **single spawn** that performs both roles in sequence (see agent-flow.md).
|
|
64
|
+
- If specifier returns builder dispatch XML, pass it to the builder agent — do NOT execute it yourself.
|
|
42
65
|
|
|
43
66
|
## Auto Mode
|
|
44
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: work-status
|
|
3
|
-
description: Shows WORK
|
|
3
|
+
description: Shows WORK status (read-only). Use ONLY when the user asks to VIEW status — not to execute or resume. Matches queries like "WORK 목록", "상태 확인", "WORK-01 상태", "show status". Do NOT use for "실행", "계속", "resume" — those go to work-pipeline.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# WORK Status
|
|
@@ -10,7 +10,7 @@ Check and report the current status of WORKs and TASKs.
|
|
|
10
10
|
## How to Check
|
|
11
11
|
|
|
12
12
|
1. Read `works/WORK-LIST.md` for the master index of all WORKs
|
|
13
|
-
2. For a specific WORK, read `works/WORK-NN/
|
|
13
|
+
2. For a specific WORK, read last line of `works/WORK-NN/work_WORK-NN.log` for current progress
|
|
14
14
|
3. For a specific TASK, read `works/WORK-NN/TASK-NN_result.md` for completion details
|
|
15
15
|
|
|
16
16
|
## Status Values
|
package/agents/agent-flow.md
DELETED
|
@@ -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.
|
package/agents/context-policy.md
DELETED
|
@@ -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
|