uctm 1.5.1 → 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 (41) hide show
  1. package/.claude-plugin/plugin.json +6 -0
  2. package/README.md +16 -14
  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 +1 -1
  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/.claude-plugin/.claude-plugin/plugin.json +0 -29
  18. package/agents/agent-flow.md +0 -279
  19. package/agents/context-policy.md +0 -94
  20. package/agents/file-content-schema.md +0 -249
  21. package/agents/ko/agent-flow.md +0 -231
  22. package/agents/ko/builder.md +0 -164
  23. package/agents/ko/committer.md +0 -202
  24. package/agents/ko/context-policy.md +0 -94
  25. package/agents/ko/file-content-schema.md +0 -249
  26. package/agents/ko/planner.md +0 -161
  27. package/agents/ko/scheduler.md +0 -189
  28. package/agents/ko/shared-prompt-sections.md +0 -250
  29. package/agents/ko/specifier.md +0 -194
  30. package/agents/ko/verifier.md +0 -149
  31. package/agents/ko/work-activity-log.md +0 -47
  32. package/agents/ko/xml-schema.md +0 -109
  33. package/agents/shared-prompt-sections.md +0 -250
  34. package/agents/work-activity-log.md +0 -47
  35. package/agents/xml-schema.md +0 -159
  36. package/skills/sdd-pipeline/references/agent-flow.md +0 -279
  37. package/skills/sdd-pipeline/references/context-policy.md +0 -94
  38. package/skills/sdd-pipeline/references/file-content-schema.md +0 -249
  39. package/skills/sdd-pipeline/references/shared-prompt-sections.md +0 -250
  40. package/skills/sdd-pipeline/references/work-activity-log.md +0 -47
  41. package/skills/sdd-pipeline/references/xml-schema.md +0 -159
@@ -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.
@@ -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.