uctm 1.3.0 → 1.4.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.
- package/agents/agent-flow.md +236 -0
- package/agents/{en/builder.md → builder.md} +30 -28
- package/agents/committer.md +209 -0
- package/agents/{en/context-policy.md → context-policy.md} +1 -1
- package/agents/{en/file-content-schema.md → file-content-schema.md} +0 -1
- package/agents/ko/agent-flow.md +43 -11
- package/agents/ko/builder.md +23 -28
- package/agents/ko/committer.md +75 -75
- package/agents/ko/context-policy.md +1 -1
- package/agents/ko/file-content-schema.md +0 -1
- package/agents/ko/planner.md +25 -32
- package/agents/ko/scheduler.md +26 -10
- package/agents/ko/shared-prompt-sections.md +119 -8
- package/agents/ko/specifier.md +34 -42
- package/agents/ko/verifier.md +20 -7
- package/agents/ko/work-activity-log.md +14 -12
- package/agents/ko/xml-schema.md +1 -0
- package/agents/{en/planner.md → planner.md} +25 -32
- package/agents/{en/scheduler.md → scheduler.md} +26 -10
- package/agents/shared-prompt-sections.md +252 -0
- package/agents/{en/specifier.md → specifier.md} +34 -42
- package/agents/{en/verifier.md → verifier.md} +27 -7
- package/agents/{en/work-activity-log.md → work-activity-log.md} +14 -12
- package/agents/{en/xml-schema.md → xml-schema.md} +51 -0
- package/bin/cli.mjs +2 -2
- package/lib/constants.mjs +66 -0
- package/lib/init.mjs +64 -2
- package/package.json +2 -3
- package/README.md +0 -947
- package/agents/en/agent-flow.md +0 -152
- package/agents/en/committer.md +0 -202
- package/agents/en/shared-prompt-sections.md +0 -141
|
@@ -32,44 +32,43 @@ You are the **Specifier** — the agent that transforms user requests into requi
|
|
|
32
32
|
|
|
33
33
|
### 3-1. STARTUP — Read Reference Files Immediately (REQUIRED)
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
**Resolve REFERENCES_DIR**: Check your input for `REFERENCES_DIR=...` line. Use that absolute path. If not provided, default to `.claude/agents`.
|
|
36
|
+
|
|
37
|
+
#### Reference Loading (ref-cache)
|
|
38
|
+
|
|
39
|
+
1. Check if `<ref-cache>` exists in the received dispatch XML
|
|
40
|
+
2. For each required reference file:
|
|
41
|
+
- If present in ref-cache → **SKIP file read**, use cached content
|
|
42
|
+
- If absent from ref-cache → Read from `{REFERENCES_DIR}/{filename}.md` and add to ref-cache
|
|
43
|
+
3. On task completion, include the merged `<ref-cache>` in the returned task-result XML
|
|
44
|
+
4. **Backward compatibility**: If dispatch contains no `<ref-cache>`, read all reference files normally (existing behavior)
|
|
45
|
+
|
|
46
|
+
Required reference files for this agent:
|
|
47
|
+
|
|
48
|
+
| File | ref-cache key |
|
|
49
|
+
|------|---------------|
|
|
50
|
+
| `{REFERENCES_DIR}/file-content-schema.md` | `file-content-schema` |
|
|
51
|
+
| `{REFERENCES_DIR}/shared-prompt-sections.md` | `shared-prompt-sections` |
|
|
52
|
+
| `{REFERENCES_DIR}/xml-schema.md` | `xml-schema` |
|
|
53
|
+
| `{REFERENCES_DIR}/work-activity-log.md` | `work-activity-log` |
|
|
41
54
|
|
|
42
55
|
### 3-2. WORK ID Determination
|
|
43
56
|
|
|
44
57
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
WORK_MAX=$(( WORK_FS > WORK_LIST ? WORK_FS : WORK_LIST ))
|
|
50
|
-
echo "WORK-$(printf "%02d" $((WORK_MAX + 1)))"
|
|
51
|
-
[ "$WORK_FS" != "$WORK_LIST" ] && echo "WARNING: FS=$WORK_FS, LIST=$WORK_LIST mismatch"
|
|
58
|
+
LAST_ID=$(grep -oP 'LAST_WORK_ID: WORK-\K\d+' works/WORK-LIST.md 2>/dev/null)
|
|
59
|
+
LAST_ID=${LAST_ID:-0}
|
|
60
|
+
NEW_ID=$(printf "%02d" $((LAST_ID + 1)))
|
|
61
|
+
echo "WORK-${NEW_ID}"
|
|
52
62
|
```
|
|
53
63
|
|
|
54
|
-
When IN_PROGRESS WORK exists:
|
|
55
|
-
> "There is an ongoing WORK-XX. Would you like to add TASKs to it, or create a new WORK?"
|
|
64
|
+
When IN_PROGRESS or DONE WORK exists:
|
|
65
|
+
> "There is an ongoing WORK-XX (IN_PROGRESS) or completed WORK-XX (DONE). Would you like to add TASKs to it, or create a new WORK?"
|
|
56
66
|
|
|
57
67
|
### 3-3. Project Exploration (Discovery)
|
|
58
68
|
|
|
59
|
-
|
|
60
|
-
# 1. Check CLAUDE.md language setting
|
|
61
|
-
grep -oP '(?<=Language:\s?)[a-z]{2}' CLAUDE.md 2>/dev/null
|
|
62
|
-
|
|
63
|
-
# 2. Project information
|
|
64
|
-
cat CLAUDE.md 2>/dev/null || cat README.md 2>/dev/null
|
|
69
|
+
→ Project discovery commands: see `shared-prompt-sections.md` § 11
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
cat package.json 2>/dev/null | head -50
|
|
68
|
-
cat pyproject.toml 2>/dev/null | head -30
|
|
69
|
-
|
|
70
|
-
# 4. Structure (only when assuming Planner — skip for simple requirements)
|
|
71
|
-
find . -maxdepth 3 -type f \( -name "*.md" -o -name "*.json" -o -name "*.toml" \) | grep -v node_modules | head -30
|
|
72
|
-
```
|
|
71
|
+
Note: Step 3 (Structure) is only needed when assuming Planner role — skip for simple requirements.
|
|
73
72
|
|
|
74
73
|
### 3-4. Requirement.md Creation
|
|
75
74
|
|
|
@@ -120,7 +119,7 @@ Requirement complexity assessment:
|
|
|
120
119
|
5. Create PLAN.md (Execution-Mode: direct) → file-content-schema.md § 1
|
|
121
120
|
6. Create TASK-00.md → file-content-schema.md § 2
|
|
122
121
|
7. Create TASK-00_progress.md (Status: PENDING) → file-content-schema.md § 3
|
|
123
|
-
8. Add IN_PROGRESS to WORK-LIST.md
|
|
122
|
+
8. Add IN_PROGRESS row to WORK-LIST.md + update LAST_WORK_ID
|
|
124
123
|
9. log_work PLAN "Requirement.md, PLAN.md, TASK-00.md created (assumed)"
|
|
125
124
|
10. Present deliverable summary to user and request approval (integrated requirement + design review)
|
|
126
125
|
11. Return dispatch XML. **Invocation is performed by Main Claude.**
|
|
@@ -128,6 +127,7 @@ Requirement complexity assessment:
|
|
|
128
127
|
```
|
|
129
128
|
|
|
130
129
|
→ dispatch XML format: see `xml-schema.md` § 1 (to="builder", task="TASK-00", execution-mode="direct")
|
|
130
|
+
→ Include `<ref-cache>` with all reference files loaded (see `xml-schema.md` § 6)
|
|
131
131
|
|
|
132
132
|
### 3-7. Planner Delegation — Complex Requirements (pipeline/full)
|
|
133
133
|
|
|
@@ -140,7 +140,7 @@ Requirement complexity assessment:
|
|
|
140
140
|
1. mkdir works/WORK-NN/
|
|
141
141
|
2. log_work INIT "WORK-NN created — Planner delegation"
|
|
142
142
|
3. Create Requirement.md → § 3-4
|
|
143
|
-
4. Add IN_PROGRESS to WORK-LIST.md
|
|
143
|
+
4. Add IN_PROGRESS row to WORK-LIST.md + update LAST_WORK_ID
|
|
144
144
|
5. log_work REF "References: ..."
|
|
145
145
|
6. Present Requirement.md summary to user and request planning approval
|
|
146
146
|
7. Return Planner dispatch XML. **Invocation is performed by Main Claude.**
|
|
@@ -148,25 +148,17 @@ Requirement complexity assessment:
|
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
→ dispatch XML format: see `xml-schema.md` § 1 (to="planner", execution-mode="full")
|
|
151
|
+
→ Include `<ref-cache>` with all reference files loaded (see `xml-schema.md` § 6)
|
|
151
152
|
|
|
152
153
|
### 3-8. Output Language Rule
|
|
153
154
|
|
|
154
155
|
→ Priority rules: see `shared-prompt-sections.md` § 1
|
|
156
|
+
→ Locale detection: see `shared-prompt-sections.md` § 9
|
|
155
157
|
|
|
156
158
|
Specifier-specific rules:
|
|
157
159
|
- Pass resolved language via dispatch `<context><language>` field
|
|
158
160
|
- Write both Requirement.md and PLAN.md in resolved language
|
|
159
161
|
|
|
160
|
-
Locale detection:
|
|
161
|
-
```
|
|
162
|
-
1. CLAUDE.md → check "Language: xx"
|
|
163
|
-
2. If not found, ask user for language
|
|
164
|
-
3. If not found, auto-detect system locale
|
|
165
|
-
- Windows: powershell -c "[CultureInfo]::CurrentCulture.TwoLetterISOLanguageName"
|
|
166
|
-
- Linux/Mac: locale | grep LANG | grep -oP '[a-z]{2}' | head -1
|
|
167
|
-
- Fallback: "en"
|
|
168
|
-
```
|
|
169
|
-
|
|
170
162
|
---
|
|
171
163
|
|
|
172
164
|
## 4. Constraints and Prohibitions
|
|
@@ -191,9 +183,9 @@ Locale detection:
|
|
|
191
183
|
- Auto mode only when "proceed automatically" is explicitly stated (valid only within current WORK)
|
|
192
184
|
|
|
193
185
|
### WORK-LIST.md Rules
|
|
194
|
-
→ see
|
|
186
|
+
→ see `{REFERENCES_DIR}/shared-prompt-sections.md` § 8
|
|
195
187
|
|
|
196
|
-
- On WORK creation: add `IN_PROGRESS`
|
|
188
|
+
- On WORK creation: add `IN_PROGRESS` row + update `LAST_WORK_ID` header
|
|
197
189
|
|
|
198
190
|
### Filename Rules
|
|
199
191
|
- TASK filenames: `TASK-XX.md` format
|
|
@@ -33,12 +33,25 @@ Verifies the results of TASKs completed by the Builder, checking build, lint, te
|
|
|
33
33
|
|
|
34
34
|
### 3-1. STARTUP — Read Reference Files Immediately (REQUIRED)
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
**Resolve REFERENCES_DIR**: Check your input for `REFERENCES_DIR=...` line or `<references-dir>` XML element. Use that absolute path. If not provided, default to `.claude/agents`.
|
|
37
|
+
|
|
38
|
+
#### Reference Loading (ref-cache)
|
|
39
|
+
|
|
40
|
+
1. Check if `<ref-cache>` exists in the received dispatch XML
|
|
41
|
+
2. For each required reference file:
|
|
42
|
+
- If present in ref-cache → **SKIP file read**, use cached content
|
|
43
|
+
- If absent from ref-cache → Read from `{REFERENCES_DIR}/{filename}.md` and add to ref-cache
|
|
44
|
+
3. On task completion, include the merged `<ref-cache>` in the returned task-result XML
|
|
45
|
+
4. **Backward compatibility**: If dispatch contains no `<ref-cache>`, read all reference files normally (existing behavior)
|
|
46
|
+
|
|
47
|
+
Required reference files for this agent:
|
|
48
|
+
|
|
49
|
+
| File | ref-cache key |
|
|
50
|
+
|------|---------------|
|
|
51
|
+
| `{REFERENCES_DIR}/shared-prompt-sections.md` | `shared-prompt-sections` |
|
|
52
|
+
| `{REFERENCES_DIR}/xml-schema.md` | `xml-schema` |
|
|
53
|
+
| `{REFERENCES_DIR}/context-policy.md` | `context-policy` |
|
|
54
|
+
| `{REFERENCES_DIR}/work-activity-log.md` | `work-activity-log` |
|
|
42
55
|
|
|
43
56
|
### 3-2. XML Input Parsing
|
|
44
57
|
|
|
@@ -46,7 +59,7 @@ Verifies the results of TASKs completed by the Builder, checking build, lint, te
|
|
|
46
59
|
|
|
47
60
|
### 3-3. Step 0: Progress File Gate (CRITICAL)
|
|
48
61
|
|
|
49
|
-
→ Gate conditions: see `
|
|
62
|
+
→ Gate conditions: see `shared-prompt-sections.md` § 12
|
|
50
63
|
|
|
51
64
|
On CRITICAL failure, halt immediately. Cannot proceed to subsequent steps.
|
|
52
65
|
|
|
@@ -94,6 +107,7 @@ Only check conventions specified in CLAUDE.md or project config.
|
|
|
94
107
|
|
|
95
108
|
→ task-result XML base structure: see `xml-schema.md` § 2
|
|
96
109
|
→ context-handoff element: see `xml-schema.md` § 4
|
|
110
|
+
→ ref-cache element: see `xml-schema.md` § 6
|
|
97
111
|
|
|
98
112
|
Verifier-specific additional fields:
|
|
99
113
|
|
|
@@ -114,6 +128,12 @@ Verifier-specific additional fields:
|
|
|
114
128
|
<suggested-fix>{suggestion}</suggested-fix>
|
|
115
129
|
</failure>
|
|
116
130
|
</failure-details>
|
|
131
|
+
<ref-cache>
|
|
132
|
+
<!-- Include all reference files loaded during this execution (from disk or received ref-cache) -->
|
|
133
|
+
<ref key="shared-prompt-sections">{content}</ref>
|
|
134
|
+
<ref key="xml-schema">{content}</ref>
|
|
135
|
+
<!-- ... other keys loaded ... -->
|
|
136
|
+
</ref-cache>
|
|
117
137
|
```
|
|
118
138
|
|
|
119
139
|
---
|
|
@@ -10,19 +10,21 @@ Defines the rules for each agent to record WORK progress in the `works/{WORK_ID}
|
|
|
10
10
|
* During work: Work items and work content
|
|
11
11
|
* On task completion: The prompt message sent to other agents** Content of the prompt message received at agent startup (Required)
|
|
12
12
|
|
|
13
|
-
## log_work
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
log_work() {
|
|
19
|
-
local WORK_ID="$1" AGENT="$2" STAGE="$3" DESC="$4"
|
|
20
|
-
mkdir -p "works/${WORK_ID}"
|
|
21
|
-
printf '[%s]_%s_%s_%s\n' \
|
|
22
|
-
"$(date '+%Y-%m-%dT%H:%M:%S')" "$AGENT" "$STAGE" "$DESC" \
|
|
23
|
-
>> "works/${WORK_ID}/work_${WORK_ID}.log"
|
|
24
|
-
}
|
|
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:
|
|
25
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**
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
|
@@ -8,6 +8,14 @@ XML communication format definition for uc-taskmanager agents.
|
|
|
8
8
|
|
|
9
9
|
```xml
|
|
10
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>
|
|
11
19
|
<context>
|
|
12
20
|
<project>{project name}</project>
|
|
13
21
|
<language>{lang_code}</language>
|
|
@@ -46,6 +54,13 @@ XML communication format definition for uc-taskmanager agents.
|
|
|
46
54
|
<check name="{type}" status="{PASS|FAIL|N/A}">{output}</check>
|
|
47
55
|
</verification>
|
|
48
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>
|
|
49
64
|
</task-result>
|
|
50
65
|
```
|
|
51
66
|
|
|
@@ -106,3 +121,39 @@ Invariants (regardless of mode):
|
|
|
106
121
|
| `TASK-XX_result.md` | Committer | Committer |
|
|
107
122
|
| COMMITTER DONE callback | Committer | Committer |
|
|
108
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.
|
package/bin/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { createInterface } from 'node:readline';
|
|
4
4
|
import { VERSION, SUPPORTED_LANGS } from '../lib/constants.mjs';
|
|
@@ -100,7 +100,7 @@ async function main() {
|
|
|
100
100
|
lang = await promptLang();
|
|
101
101
|
}
|
|
102
102
|
const { init } = await import('../lib/init.mjs');
|
|
103
|
-
init(isGlobal, lang);
|
|
103
|
+
await init(isGlobal, lang);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
|
package/lib/constants.mjs
CHANGED
|
@@ -25,6 +25,9 @@ export const AGENT_FILES = [
|
|
|
25
25
|
];
|
|
26
26
|
|
|
27
27
|
export function getAgentsSrcDir(lang) {
|
|
28
|
+
if (lang === 'en') {
|
|
29
|
+
return join(__dirname, '..', 'agents');
|
|
30
|
+
}
|
|
28
31
|
return join(__dirname, '..', 'agents', lang);
|
|
29
32
|
}
|
|
30
33
|
|
|
@@ -59,3 +62,66 @@ Examples: \`[new-feature]\`, \`[bugfix]\`, \`[enhancement]\`, \`[new-work]\`, et
|
|
|
59
62
|
export function getClaudeMdSection(lang) {
|
|
60
63
|
return lang === 'ko' ? CLAUDE_MD_SECTION_KO : CLAUDE_MD_SECTION_EN;
|
|
61
64
|
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Bash permissions required by uc-taskmanager agents.
|
|
68
|
+
* Merged into .claude/settings.local.json during init.
|
|
69
|
+
*
|
|
70
|
+
* Categories:
|
|
71
|
+
* - File discovery: ls, cat, basename, find, wc, sort, tail, head
|
|
72
|
+
* - Pattern matching: grep, sed, cut, tr
|
|
73
|
+
* - Formatting: printf, echo
|
|
74
|
+
* - Build/Lint: node, npm, bun, yarn, cargo, go, python, ruff, make
|
|
75
|
+
* - Git: git add, git commit, git log, git rev-parse
|
|
76
|
+
* - Network: curl (callback)
|
|
77
|
+
*/
|
|
78
|
+
export const REQUIRED_PERMISSIONS = [
|
|
79
|
+
// File read/write tools (project-root scoped)
|
|
80
|
+
'Read(/**)',
|
|
81
|
+
'Edit(/**)',
|
|
82
|
+
'Write(/**)',
|
|
83
|
+
'Read(**)',
|
|
84
|
+
'Edit(**)',
|
|
85
|
+
'Write(**)',
|
|
86
|
+
|
|
87
|
+
// File discovery & text utilities
|
|
88
|
+
'Bash(ls:*)',
|
|
89
|
+
'Bash(cat:*)',
|
|
90
|
+
'Bash(mkdir:*)',
|
|
91
|
+
'Bash(basename:*)',
|
|
92
|
+
'Bash(find:*)',
|
|
93
|
+
'Bash(wc:*)',
|
|
94
|
+
'Bash(sort:*)',
|
|
95
|
+
'Bash(tail:*)',
|
|
96
|
+
'Bash(head:*)',
|
|
97
|
+
'Bash(echo:*)',
|
|
98
|
+
'Bash(printf:*)',
|
|
99
|
+
|
|
100
|
+
// Pattern matching & text processing
|
|
101
|
+
'Bash(grep:*)',
|
|
102
|
+
'Bash(sed:*)',
|
|
103
|
+
'Bash(cut:*)',
|
|
104
|
+
'Bash(tr:*)',
|
|
105
|
+
|
|
106
|
+
// Build & Lint (auto-detect per project type)
|
|
107
|
+
'Bash(node:*)',
|
|
108
|
+
'Bash(npm run:*)',
|
|
109
|
+
'Bash(npm test:*)',
|
|
110
|
+
'Bash(bun run:*)',
|
|
111
|
+
'Bash(yarn:*)',
|
|
112
|
+
'Bash(cargo:*)',
|
|
113
|
+
'Bash(go build:*)',
|
|
114
|
+
'Bash(go test:*)',
|
|
115
|
+
'Bash(python:*)',
|
|
116
|
+
'Bash(ruff:*)',
|
|
117
|
+
'Bash(make:*)',
|
|
118
|
+
|
|
119
|
+
// Git operations (committer)
|
|
120
|
+
'Bash(git add:*)',
|
|
121
|
+
'Bash(git commit:*)',
|
|
122
|
+
'Bash(git log:*)',
|
|
123
|
+
'Bash(git rev-parse:*)',
|
|
124
|
+
|
|
125
|
+
// Network (callback transmission)
|
|
126
|
+
'Bash(curl:*)',
|
|
127
|
+
];
|
package/lib/init.mjs
CHANGED
|
@@ -2,12 +2,15 @@ import { existsSync, mkdirSync, copyFileSync, readFileSync, writeFileSync } from
|
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
|
-
import { AGENT_FILES, getAgentsSrcDir, getClaudeMdSection } from './constants.mjs';
|
|
5
|
+
import { AGENT_FILES, getAgentsSrcDir, getClaudeMdSection, REQUIRED_PERMISSIONS } from './constants.mjs';
|
|
6
6
|
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
8
|
|
|
9
|
+
import { createInterface } from 'node:readline';
|
|
10
|
+
|
|
9
11
|
const green = (s) => `\x1b[32m${s}\x1b[0m`;
|
|
10
12
|
const dim = (s) => `\x1b[2m${s}\x1b[0m`;
|
|
13
|
+
const yellow = (s) => `\x1b[33m${s}\x1b[0m`;
|
|
11
14
|
|
|
12
15
|
function copyAgents(destDir, lang) {
|
|
13
16
|
const srcDir = getAgentsSrcDir(lang);
|
|
@@ -56,7 +59,54 @@ function updateClaudeMd(projectDir, lang) {
|
|
|
56
59
|
return true;
|
|
57
60
|
}
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
function mergePermissions(projectDir) {
|
|
63
|
+
const settingsPath = join(projectDir, '.claude', 'settings.local.json');
|
|
64
|
+
let settings = {};
|
|
65
|
+
|
|
66
|
+
if (existsSync(settingsPath)) {
|
|
67
|
+
try {
|
|
68
|
+
settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
|
|
69
|
+
} catch {
|
|
70
|
+
settings = {};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (!settings.permissions) settings.permissions = {};
|
|
75
|
+
if (!Array.isArray(settings.permissions.allow)) settings.permissions.allow = [];
|
|
76
|
+
|
|
77
|
+
const existing = new Set(settings.permissions.allow);
|
|
78
|
+
let added = 0;
|
|
79
|
+
|
|
80
|
+
for (const perm of REQUIRED_PERMISSIONS) {
|
|
81
|
+
if (!existing.has(perm)) {
|
|
82
|
+
settings.permissions.allow.push(perm);
|
|
83
|
+
added++;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (added > 0) {
|
|
88
|
+
const dir = dirname(settingsPath);
|
|
89
|
+
mkdirSync(dir, { recursive: true });
|
|
90
|
+
writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return { added, total: settings.permissions.allow.length };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async function promptPermissions() {
|
|
97
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
98
|
+
return new Promise((resolve) => {
|
|
99
|
+
console.log(`\n ${yellow('?')} Auto-configure Bash permissions for agents? (recommended)`);
|
|
100
|
+
console.log(` ${dim('Adds required permissions to .claude/settings.local.json')}`);
|
|
101
|
+
rl.question(' [Y/n] ', (answer) => {
|
|
102
|
+
rl.close();
|
|
103
|
+
const choice = answer.trim().toLowerCase();
|
|
104
|
+
resolve(choice === '' || choice === 'y' || choice === 'yes');
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export async function init(isGlobal, lang) {
|
|
60
110
|
const exampleTag = lang === 'ko'
|
|
61
111
|
? `[추가기능] Add a hello world feature`
|
|
62
112
|
: `[new-feature] Add a hello world feature`;
|
|
@@ -98,6 +148,18 @@ export function init(isGlobal, lang) {
|
|
|
98
148
|
console.log(` ${dim('-')} works/ directory already exists`);
|
|
99
149
|
}
|
|
100
150
|
|
|
151
|
+
const wantPermissions = await promptPermissions();
|
|
152
|
+
if (wantPermissions) {
|
|
153
|
+
const { added, total } = mergePermissions(projectDir);
|
|
154
|
+
if (added > 0) {
|
|
155
|
+
console.log(` ${green('✓')} ${added} permissions added to .claude/settings.local.json (total: ${total})`);
|
|
156
|
+
} else {
|
|
157
|
+
console.log(` ${dim('-')} All permissions already configured (${total})`);
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
console.log(` ${dim('-')} Skipped permission setup`);
|
|
161
|
+
}
|
|
162
|
+
|
|
101
163
|
console.log(`\n ${dim('Next steps:')}`);
|
|
102
164
|
console.log(` 1. Run ${dim("'claude'")} to start Claude Code`);
|
|
103
165
|
console.log(` 2. Type: ${dim(exampleTag)}\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uctm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Universal Claude Task Manager — SDD-based task pipeline subagent system for Claude Code CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
11
11
|
"lib/",
|
|
12
|
-
"agents/
|
|
13
|
-
"agents/en/",
|
|
12
|
+
"agents/",
|
|
14
13
|
".agent/"
|
|
15
14
|
],
|
|
16
15
|
"engines": {
|