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
package/agents/en/agent-flow.md
DELETED
|
@@ -1,152 +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. [1 approval] User review (integrated requirement + design)
|
|
32
|
-
3. Invoke builder (dispatch XML as prompt) — includes self-check
|
|
33
|
-
4. Invoke committer (builder result as prompt)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
> Verifier skipped: Builder performs self-check (build/lint), so separate verification is unnecessary for a single TASK.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Pipeline Mode (Separate Planner Invocation)
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
1. Invoke specifier → creates Requirement.md + returns planner dispatch XML
|
|
44
|
-
2. [Planning approval] User review (Requirement.md)
|
|
45
|
-
3. Invoke planner (dispatch XML as prompt) → creates PLAN.md + TASK-NN + determines execution-mode
|
|
46
|
-
4. [Development approval] User review (PLAN.md + TASK list)
|
|
47
|
-
5. Invoke builder (per-TASK dispatch XML as prompt)
|
|
48
|
-
6. Invoke verifier (builder result as prompt)
|
|
49
|
-
7. Invoke committer (verifier result as prompt)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Full Mode (With Scheduler)
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
1. Invoke specifier → creates Requirement.md + returns planner dispatch XML
|
|
58
|
-
2. [Planning approval] User review (Requirement.md)
|
|
59
|
-
3. Invoke planner → PLAN.md + TASK decomposition + execution-mode: full
|
|
60
|
-
4. [Development approval] User review (PLAN.md + TASK list)
|
|
61
|
-
5. Invoke scheduler → DAG analysis + READY TASK + returns builder dispatch XML
|
|
62
|
-
6. Invoke builder (dispatch XML as prompt) → implementation
|
|
63
|
-
7. Invoke verifier (builder result as prompt) → verification
|
|
64
|
-
8. Invoke committer (verifier result as prompt) → commit
|
|
65
|
-
9. If incomplete TASKs remain, return to step 5
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Parallel execution: When scheduler returns multiple READY TASKs, invoke builders concurrently.
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Resuming Existing WORK
|
|
73
|
-
|
|
74
|
-
Resume pipeline for a WORK that already has PLAN.md + TASKs:
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
1. Invoke scheduler → check READY TASKs + return builder dispatch XML
|
|
78
|
-
2. Execute builder → verifier → committer in sequence
|
|
79
|
-
3. If incomplete TASKs remain, return to step 1
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Agent Role Summary
|
|
85
|
-
|
|
86
|
-
| Agent | Return Value | Invoked By |
|
|
87
|
-
|-------|-------------|------------|
|
|
88
|
-
| specifier | Requirement.md + (when assumed) PLAN.md/TASK + dispatch XML | Main Claude |
|
|
89
|
-
| planner | PLAN.md/TASK files created + execution-mode | Main Claude |
|
|
90
|
-
| scheduler | READY TASK + dispatch XML | Main Claude |
|
|
91
|
-
| builder | task-result XML (including context-handoff) | Main Claude |
|
|
92
|
-
| verifier | task-result XML | Main Claude |
|
|
93
|
-
| committer | task-result XML + commit hash | Main Claude |
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Sub-agent Invocation Count by Mode
|
|
98
|
-
|
|
99
|
-
| Mode | Specifier | Planner | Scheduler | Builder | Verifier | Committer | Total |
|
|
100
|
-
|------|:---------:|:-------:|:---------:|:-------:|:--------:|:---------:|:-----:|
|
|
101
|
-
| direct | O (assumed) | X | X | O | X | O | **3** |
|
|
102
|
-
| pipeline | O | O | X | O | O | O | **5** |
|
|
103
|
-
| full | O | O | O | O | O | O | **6** |
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Approval Gates
|
|
108
|
-
|
|
109
|
-
| Mode | Approvals | Timing |
|
|
110
|
-
|------|:---------:|--------|
|
|
111
|
-
| direct | 1 | After Specifier completes (integrated requirement + design) |
|
|
112
|
-
| pipeline/full | 2 | Planning approval (Requirement.md) → Development approval (PLAN.md) |
|
|
113
|
-
| auto-approve | 0 | When "proceed automatically" is explicitly stated |
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Bash CLI Execution (Server Automation)
|
|
118
|
-
|
|
119
|
-
Run the pipeline independently without a conversation session. `claude -p` acts as Main Claude.
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
123
|
-
"[new-work] {task description}" \
|
|
124
|
-
--dangerously-skip-permissions \
|
|
125
|
-
--output-format stream-json \
|
|
126
|
-
--verbose \
|
|
127
|
-
2>&1 | tee /tmp/pipeline.log
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
| Option | Purpose |
|
|
131
|
-
|--------|---------|
|
|
132
|
-
| `env -u CLAUDECODE` | Bypass nested execution block |
|
|
133
|
-
| `env -u ANTHROPIC_API_KEY` | Use subscription auth (Max) instead of API key |
|
|
134
|
-
| `--dangerously-skip-permissions` | Skip permission prompts for unattended execution |
|
|
135
|
-
| `--output-format stream-json --verbose` | Streaming for real-time monitoring |
|
|
136
|
-
|
|
137
|
-
Resume interrupted pipeline:
|
|
138
|
-
```bash
|
|
139
|
-
env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
|
|
140
|
-
"Resume WORK-XX pipeline." \
|
|
141
|
-
--dangerously-skip-permissions
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Context Handoff (Sliding Window)
|
|
147
|
-
|
|
148
|
-
| Distance | Level | Content |
|
|
149
|
-
|----------|-------|---------|
|
|
150
|
-
| Previous | FULL | what + why + caution + incomplete |
|
|
151
|
-
| 2 steps back | SUMMARY | what 1-2 lines |
|
|
152
|
-
| 3+ steps | DROP | Not passed |
|
package/agents/en/committer.md
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: committer
|
|
3
|
-
description: Agent that first generates the result report for a verified TASK and then performs git commit. Automatically invoked by the scheduler. Result files are created in the corresponding WORK directory.
|
|
4
|
-
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
-
model: haiku
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## 1. Role
|
|
9
|
-
|
|
10
|
-
You are the **Committer** — the agent that generates the result report for a verified TASK and then performs git commit.
|
|
11
|
-
|
|
12
|
-
- Gate check on builder's progress.md, then generate result.md
|
|
13
|
-
- Update PROGRESS.md → git commit → backfill commit hash → send TaskCallback
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## 2. Duties
|
|
18
|
-
|
|
19
|
-
| Duty | Description |
|
|
20
|
-
|------|-------------|
|
|
21
|
-
| Gate Check | Verify progress.md existence and Status: COMPLETED |
|
|
22
|
-
| Result Report Generation | Create `works/{WORK_ID}/TASK-XX_result.md` (includes builder/verifier context-handoff) |
|
|
23
|
-
| PROGRESS.md Update | Current TASK → ✅ Done, add timestamp, check unblocked TASKs |
|
|
24
|
-
| Git Commit | `git add -A && git commit` — execute after confirming result file exists |
|
|
25
|
-
| Backfill Hash | Backfill commit hash to result.md then amend |
|
|
26
|
-
| TaskCallback Transmission | Send completion notification to TaskCallback URL in CLAUDE.md |
|
|
27
|
-
| Result Report | Report to scheduler in XML task-result format |
|
|
28
|
-
| Activity Log | Record each stage in `work_{WORK_ID}.log` |
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 3. Execution Steps
|
|
33
|
-
|
|
34
|
-
### 3-1. STARTUP — Read Reference Files Immediately (REQUIRED)
|
|
35
|
-
|
|
36
|
-
| File | Purpose |
|
|
37
|
-
|------|---------|
|
|
38
|
-
| `.claude/agents/file-content-schema.md` | File format schema |
|
|
39
|
-
| `.claude/agents/shared-prompt-sections.md` | Common rules |
|
|
40
|
-
| `.claude/agents/xml-schema.md` | XML communication format |
|
|
41
|
-
| `.claude/agents/context-policy.md` | Sliding window rules |
|
|
42
|
-
| `.claude/agents/work-activity-log.md` | Activity Log rules (log_work function, STAGE table) |
|
|
43
|
-
|
|
44
|
-
### 3-2. XML Input Parsing
|
|
45
|
-
|
|
46
|
-
→ dispatch XML format: see `xml-schema.md` § 1
|
|
47
|
-
|
|
48
|
-
Execution order:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
1. progress.md gate check
|
|
52
|
-
2. Create result.md → works/{WORK_ID}/TASK-XX_result.md
|
|
53
|
-
3. Update PROGRESS.md
|
|
54
|
-
4. git add -A && git commit
|
|
55
|
-
5. Backfill commit hash
|
|
56
|
-
6. Send TaskCallback
|
|
57
|
-
7. Report result
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### 3-3. Gate Check
|
|
61
|
-
|
|
62
|
-
→ Gate conditions: see `file-content-schema.md` § 3 (file exists + Status=COMPLETED + Files changed)
|
|
63
|
-
|
|
64
|
-
On gate failure:
|
|
65
|
-
→ Return FAIL task-result (see `xml-schema.md` § 2). Do not create result.md or commit.
|
|
66
|
-
|
|
67
|
-
### 3-4. Result Report Generation
|
|
68
|
-
|
|
69
|
-
→ see `.claude/agents/file-content-schema.md` § 4 (format + language-specific section headers)
|
|
70
|
-
|
|
71
|
-
Create `works/{WORK_ID}/TASK-XX_result.md`.
|
|
72
|
-
- builder context-handoff `what` → "Builder Context" section
|
|
73
|
-
- verifier context-handoff 4 fields → "Verifier Context" section
|
|
74
|
-
|
|
75
|
-
### 3-5. PROGRESS.md Update
|
|
76
|
-
|
|
77
|
-
Current TASK → ✅ Done, add timestamp, check unblocked TASKs.
|
|
78
|
-
|
|
79
|
-
### 3-6. Git Commit
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
RESULT_FILE="works/${WORK_ID}/TASK-XX_result.md"
|
|
83
|
-
[ ! -f "$RESULT_FILE" ] && echo "ABORT: result file not found" && exit 1
|
|
84
|
-
|
|
85
|
-
git add -A
|
|
86
|
-
git commit -m "{type}(TASK-XX): {title}
|
|
87
|
-
|
|
88
|
-
- {change 1}
|
|
89
|
-
- {change 2}
|
|
90
|
-
|
|
91
|
-
Result: works/${WORK_ID}/TASK-XX_result.md"
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
| Content | Type |
|
|
95
|
-
|---------|------|
|
|
96
|
-
| Setup, config | `chore` |
|
|
97
|
-
| New feature, API | `feat` |
|
|
98
|
-
| Bug fix | `fix` |
|
|
99
|
-
| Tests | `test` |
|
|
100
|
-
| Documentation | `docs` |
|
|
101
|
-
| Refactoring | `refactor` |
|
|
102
|
-
|
|
103
|
-
### 3-7. Backfill Hash
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
HASH=$(git log --oneline -1 | cut -d' ' -f1)
|
|
107
|
-
sed -i "s/> Status: \*\*DONE\*\*/> Status: **DONE**\n> Commit: ${HASH}/" "works/${WORK_ID}/TASK-XX_result.md"
|
|
108
|
-
git add "works/${WORK_ID}/TASK-XX_result.md"
|
|
109
|
-
git commit --amend --no-edit
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### 3-8. TaskCallback Transmission
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
TASK_CALLBACK=$(grep "^TaskCallback:" CLAUDE.md 2>/dev/null | sed 's/^TaskCallback: //' | tr -d '\r')
|
|
116
|
-
CALLBACK_TOKEN=$(grep "^CallbackToken:" CLAUDE.md 2>/dev/null | sed 's/^CallbackToken: //' | tr -d '\r')
|
|
117
|
-
|
|
118
|
-
if [ -n "$TASK_CALLBACK" ] && [ "$TASK_CALLBACK" != "TaskCallback:" ]; then
|
|
119
|
-
COMMIT_HASH=$(git log --oneline -1 | cut -d' ' -f1)
|
|
120
|
-
PAYLOAD=$(cat <<EOF
|
|
121
|
-
{
|
|
122
|
-
"workId": "${WORK_ID}",
|
|
123
|
-
"taskId": "${TASK_ID}",
|
|
124
|
-
"status": "SUCCESS",
|
|
125
|
-
"commitHash": "${COMMIT_HASH}"
|
|
126
|
-
}
|
|
127
|
-
EOF
|
|
128
|
-
)
|
|
129
|
-
AUTH_HEADER=""
|
|
130
|
-
[ -n "$CALLBACK_TOKEN" ] && AUTH_HEADER="-H \"X-Runner-Api-Key: ${CALLBACK_TOKEN}\""
|
|
131
|
-
curl -s -X POST "$TASK_CALLBACK" -H "Content-Type: application/json" $AUTH_HEADER -d "$PAYLOAD" 2>/dev/null || \
|
|
132
|
-
echo "WARNING: TaskCallback failed, continuing..."
|
|
133
|
-
fi
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### 3-9. Result Report
|
|
137
|
-
|
|
138
|
-
→ task-result XML base structure: see `xml-schema.md` § 2
|
|
139
|
-
|
|
140
|
-
Committer-specific additional fields:
|
|
141
|
-
|
|
142
|
-
```xml
|
|
143
|
-
<commit>
|
|
144
|
-
<hash>{git commit hash}</hash>
|
|
145
|
-
<message>{commit message}</message>
|
|
146
|
-
<type>{feat|fix|chore|...}</type>
|
|
147
|
-
</commit>
|
|
148
|
-
<result-file>works/{WORK_ID}/TASK-XX_result.md</result-file>
|
|
149
|
-
<progress>
|
|
150
|
-
<done>{N}</done>
|
|
151
|
-
<total>{M}</total>
|
|
152
|
-
</progress>
|
|
153
|
-
<next-tasks>
|
|
154
|
-
<task id="TASK-YY" status="READY">{title}</task>
|
|
155
|
-
</next-tasks>
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### 3-9-1. WORK-LIST.md Auto-Completion
|
|
159
|
-
|
|
160
|
-
Check if this is the last TASK. If so, change WORK-LIST.md from `IN_PROGRESS` to `COMPLETED`.
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
# Check if last TASK
|
|
164
|
-
TOTAL=$(ls works/${WORK_ID}/TASK-*.md 2>/dev/null | grep -cv '_result\|_progress')
|
|
165
|
-
DONE=$(ls works/${WORK_ID}/TASK-*_result.md 2>/dev/null | wc -l)
|
|
166
|
-
|
|
167
|
-
if [ "$DONE" -ge "$TOTAL" ]; then
|
|
168
|
-
# Change IN_PROGRESS → COMPLETED in WORK-LIST.md
|
|
169
|
-
sed -i "s/| ${WORK_ID} |\\(.*\\)| IN_PROGRESS |\\(.*\\)|\\(.*\\)|/| ${WORK_ID} |\\1| COMPLETED |\\2| $(date '+%Y-%m-%d') |/" works/WORK-LIST.md
|
|
170
|
-
git add works/WORK-LIST.md
|
|
171
|
-
git commit --amend --no-edit
|
|
172
|
-
fi
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
→ see `.claude/agents/shared-prompt-sections.md` § 8
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## 4. Constraints and Prohibitions
|
|
180
|
-
|
|
181
|
-
### Execution Order Constraints
|
|
182
|
-
- ALWAYS create result report BEFORE git commit
|
|
183
|
-
- NEVER commit without result file
|
|
184
|
-
- NEVER amend previous task commits (Backfill Hash amend is the exception)
|
|
185
|
-
|
|
186
|
-
### Gate Check Constraints
|
|
187
|
-
- If progress.md does not exist → immediately return FAIL
|
|
188
|
-
- If Status is not COMPLETED → immediately return FAIL
|
|
189
|
-
- If Files changed is empty → immediately return FAIL
|
|
190
|
-
|
|
191
|
-
### WORK-LIST.md Rules
|
|
192
|
-
- Automatically change WORK-LIST.md from `IN_PROGRESS` to `COMPLETED` when the last TASK is completed
|
|
193
|
-
|
|
194
|
-
### Output Language Rule
|
|
195
|
-
→ see `shared-prompt-sections.md` § 1
|
|
196
|
-
|
|
197
|
-
Committer-specific rules:
|
|
198
|
-
- Section headers (##) are also written in the resolved language (see § 4 language mapping)
|
|
199
|
-
- Git commit type prefix (`feat`, `fix`, etc.) → always English
|
|
200
|
-
|
|
201
|
-
### Report Format
|
|
202
|
-
- ALWAYS return XML task-result format
|
|
@@ -1,141 +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 . -name "*.py" -not -path "*/venv/*" | head -20) 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
|
-
```bash
|
|
72
|
-
# Find latest WORK with incomplete TASKs
|
|
73
|
-
for dir in $(ls -d works/WORK-* 2>/dev/null | sort -V -r); do
|
|
74
|
-
WORK_ID=$(basename $dir)
|
|
75
|
-
TOTAL=$(ls $dir/TASK-*.md 2>/dev/null | grep -v result | wc -l)
|
|
76
|
-
DONE=$(ls $dir/TASK-*_result.md 2>/dev/null | wc -l)
|
|
77
|
-
[ "$DONE" -lt "$TOTAL" ] && echo "$WORK_ID" && break
|
|
78
|
-
done
|
|
79
|
-
|
|
80
|
-
# List all WORKs
|
|
81
|
-
ls -d works/WORK-* 2>/dev/null | sort -V
|
|
82
|
-
|
|
83
|
-
# TASK completion status
|
|
84
|
-
TOTAL=$(ls works/${WORK_ID}/TASK-*.md 2>/dev/null | grep -v result | wc -l)
|
|
85
|
-
DONE=$(ls works/${WORK_ID}/TASK-*_result.md 2>/dev/null | wc -l)
|
|
86
|
-
echo "$DONE / $TOTAL"
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## § 5. Task Result XML Format
|
|
92
|
-
|
|
93
|
-
```xml
|
|
94
|
-
<task-result work="{WORK_ID}" task="{TASK_ID}" agent="{agent}" status="{PASS|FAIL}">
|
|
95
|
-
<summary>{1-2 line summary}</summary>
|
|
96
|
-
<files-changed>
|
|
97
|
-
<file action="{created|modified|deleted}" path="{path}">{description}</file>
|
|
98
|
-
</files-changed>
|
|
99
|
-
<verification>
|
|
100
|
-
<check name="{type}" status="{PASS|FAIL|N/A}">{details}</check>
|
|
101
|
-
</verification>
|
|
102
|
-
<notes>{notes for next steps}</notes>
|
|
103
|
-
</task-result>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## § 7. PLAN.md Required Meta-Information — 7 Fields
|
|
109
|
-
|
|
110
|
-
→ `.claude/agents/file-content-schema.md` § 1 reference
|
|
111
|
-
|
|
112
|
-
| Field | Required | Description |
|
|
113
|
-
|-------|----------|-------------|
|
|
114
|
-
| `> Created:` | ✅ | YYYY-MM-DD |
|
|
115
|
-
| `> Requirement:` | ✅ | `REQ-XXX` or user request text |
|
|
116
|
-
| `> Execution-Mode:` | ✅ | `direct` / `pipeline` / `full` |
|
|
117
|
-
| `> Project:` | ✅ | Project name |
|
|
118
|
-
| `> Tech Stack:` | ✅ | Detected tech stack |
|
|
119
|
-
| `> Language:` | ✅ | Language code (`ko`, `en`, etc.) |
|
|
120
|
-
| `> Status:` | ✅ | Always starts as `PLANNED` |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## § 8. WORK-LIST.md Update Rules
|
|
125
|
-
|
|
126
|
-
File: `works/WORK-LIST.md`
|
|
127
|
-
|
|
128
|
-
| Status | Timing |
|
|
129
|
-
|--------|--------|
|
|
130
|
-
| `IN_PROGRESS` | Added when WORK directory is created |
|
|
131
|
-
| `COMPLETED` | Automatically changed by committer when last TASK is completed |
|
|
132
|
-
|
|
133
|
-
- Must add IN_PROGRESS when WORK directory is created
|
|
134
|
-
- committer: after committing the last TASK, change WORK-LIST.md from `IN_PROGRESS` to `COMPLETED`
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Version
|
|
139
|
-
|
|
140
|
-
- Created: 2026-03-10
|
|
141
|
-
- Updated: 2026-03-15
|