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/README.md DELETED
@@ -1,947 +0,0 @@
1
- <p align="center">
2
- <img src="https://img.shields.io/badge/Claude_Code-Subagents-6b5ce7?style=for-the-badge&logo=anthropic&logoColor=white" />
3
- <img src="https://img.shields.io/badge/Language_Agnostic-Any_Stack-27ae60?style=for-the-badge" />
4
- <img src="https://img.shields.io/badge/License-GPLv3-f5a623?style=for-the-badge" />
5
- </p>
6
-
7
- # uc-taskmanager
8
-
9
- **Universal Claude Task Manager** — A general-purpose task pipeline subagent system for Claude Code CLI.
10
-
11
- **[한국어 문서 (Korean)](README_KO.md)**
12
-
13
- ---
14
-
15
- ## Quick Start
16
-
17
- ```bash
18
- npm install -g uctm
19
- cd your-project
20
- uctm init --lang en # English agents
21
- uctm init --lang ko # 한국어 에이전트
22
- uctm init # Interactive language selection
23
- ```
24
-
25
- Then start Claude Code and use pipeline tags:
26
-
27
- ```
28
- claude
29
- > [new-feature] Add a hello world feature
30
- ```
31
-
32
- To run without permission prompts (file creation, shell commands, etc.), use bypass mode:
33
-
34
- ```bash
35
- claude --dangerously-skip-permissions
36
- ```
37
-
38
- > **Warning**: Only use bypass mode in isolated environments or when you trust the pipeline fully. See [Claude Code Permissions](https://code.claude.com/docs/en/permissions) for details.
39
-
40
- That's it. The specifier analyzes your request, plans the work, and executes through isolated subagent pipelines.
41
-
42
- ---
43
-
44
- ## Why This Project Exists
45
-
46
- The pitfalls of **vibe coding** with AI agents are already well known. You hand your brain to the AI, the code gets written, but nothing remains — no requirements, no execution plan, no design rationale. The software you built cannot be maintained because it was never truly *yours* to begin with.
47
-
48
- **SDD (Specification-Driven Development)** flips the value hierarchy:
49
-
50
- > Code is no longer the asset.
51
- > **Requirements → Architecture → Design** — these are the real assets now.
52
- > Code is just the output.
53
-
54
- uc-taskmanager was built to solve this. When you provide a requirement as input, the system:
55
-
56
- 1. **Plans** — creates an execution plan with dependency graphs
57
- 2. **Decomposes** — breaks the plan into concrete TASKs
58
- 3. **Executes** — runs each TASK through isolated Claude AI subagents (build → verify → commit)
59
- 4. **Accumulates** — every requirement, plan, and result is preserved as a traceable artifact
60
-
61
- Each step runs in an **isolated subagent pipeline**, so your context stays clean and every decision is documented.
62
-
63
- ---
64
-
65
- Six subagents work across any project and any language, automatically handling **request routing → task decomposition → dependency management → code implementation → verification → commit**.
66
-
67
- ```
68
- "[new-feature] Build a user authentication feature"
69
- → specifier decides WORK, planner creates WORK-01 with 5 TASKs, pipeline executes
70
- ```
71
-
72
- ---
73
-
74
- ## Usage
75
-
76
- ### Trivial Fix (direct mode)
77
-
78
- ```
79
- > [bugfix] Fix typo in login error message
80
- ```
81
-
82
- Main Claude calls specifier, which selects `execution-mode: direct`. Specifier itself (acting as builder) implements the change + committer commits. Creates WORK-NN directory + PLAN + result.md + commit.
83
-
84
- ### Quick Task (pipeline mode)
85
-
86
- ```
87
- > [bugfix] Fix the login button not responding on mobile
88
- ```
89
-
90
- Main Claude calls specifier, which selects `execution-mode: pipeline` and creates PLAN. Then Main Claude calls builder → verifier → committer in sequence.
91
-
92
- ### Complex Feature (WORK)
93
-
94
- #### 1. Create WORK (Planning)
95
-
96
- ```
97
- > [new-feature] Build a user authentication feature. Plan it.
98
- ```
99
-
100
- The planner analyzes the project and creates WORK-01:
101
-
102
- ```
103
- WORK-01: User Authentication
104
-
105
- WORK-01: TASK-00: Project initialization ← no dependencies
106
- WORK-01: TASK-01: DB schema design ← TASK-00
107
- WORK-01: TASK-02: JWT auth API ← TASK-01
108
- WORK-01: TASK-03: User CRUD ← TASK-02
109
- WORK-01: TASK-04: Tests + documentation ← TASK-03
110
-
111
- Do you approve this plan?
112
- ```
113
-
114
- #### 2. Execute WORK
115
-
116
- ```
117
- > Run WORK-01 pipeline
118
- ```
119
-
120
- The scheduler executes WORK-01's TASKs in dependency order.
121
-
122
- #### 3. Add to Existing WORK
123
-
124
- If WORK-01 is IN_PROGRESS, the specifier asks:
125
- > "WORK-01 (User Authentication) is in progress. Add as a new TASK or create a new WORK?"
126
-
127
- #### 4. Check Status
128
-
129
- ```
130
- > WORK list
131
- ```
132
-
133
- ```
134
- WORK Status
135
- WORK-01: User Authentication ✅ 5/5 completed
136
- WORK-02: Payment Integration 🔄 2/4 in progress
137
- WORK-03: Admin Dashboard ⬜ 0/6 pending
138
- ```
139
-
140
- #### 5. Auto Mode / Resume
141
-
142
- ```
143
- > Run WORK-02 automatically
144
- > Resume WORK-02
145
- ```
146
-
147
- #### 6. Run a Specific TASK
148
-
149
- Skip to a specific TASK within a WORK (e.g., retry after a failure):
150
-
151
- ```
152
- > Run WORK-02: TASK-02
153
- ```
154
-
155
- The scheduler returns the next TASK, then Main Claude calls builder → verifier → committer in sequence.
156
-
157
- #### 7. Force WORK Creation (Skip Complexity Check)
158
-
159
- Use the `[new-work]` tag to always create a new WORK regardless of complexity:
160
-
161
- ```
162
- > [new-work] Refactor the auth module
163
- ```
164
-
165
- #### 8. Handle Failure / Retry
166
-
167
- If a TASK fails during the pipeline, the scheduler retries up to 3 times automatically.
168
- If it still fails, you can inspect the result file and retry manually:
169
-
170
- ```
171
- > WORK-02: TASK-01 failed. Retry it.
172
- ```
173
-
174
- Or fix the issue and re-run:
175
-
176
- ```
177
- > Fix the issue in src/auth.ts, then retry WORK-02: TASK-01
178
- ```
179
-
180
- #### 9. Add a TASK to an In-Progress WORK
181
-
182
- ```
183
- > [enhancement] Add rate limiting to the auth API
184
- ```
185
-
186
- If WORK-02 is `IN_PROGRESS`, the specifier asks:
187
- > "WORK-02 (Auth Module) is in progress. Add as a new TASK, or create a new WORK?"
188
-
189
- #### 10. Check Individual TASK Status
190
-
191
- ```
192
- > Show WORK-02 progress
193
- > What's the status of WORK-03: TASK-02?
194
- ```
195
-
196
- The scheduler reads `PROGRESS.md` and `result.md` files to report current state.
197
-
198
- ---
199
-
200
- ## The `[]` Tag System
201
-
202
- Prefix your request with a `[]` tag to trigger the pipeline:
203
-
204
- | Tag | Meaning |
205
- |-----|---------|
206
- | `[new-feature]` | New feature |
207
- | `[enhancement]` | Enhancement |
208
- | `[bugfix]` | Bug fix |
209
- | `[new-work]` | Always create new WORK (skip complexity check) |
210
-
211
- No `[]` tag = handled directly without pipeline.
212
-
213
- To register this rule in your project, add the following to your `CLAUDE.md`:
214
-
215
- ```markdown
216
- ## Agent 호출 규칙
217
-
218
- `[]` 태그로 시작하는 요청 → specifier 에이전트 호출 (WORK 파이프라인 시작)
219
- ```
220
-
221
- This ensures Claude automatically delegates `[]`-tagged requests to the specifier agent without manual invocation.
222
-
223
- ---
224
-
225
- ## Installation
226
-
227
- ### npm (Recommended)
228
-
229
- ```bash
230
- npm install -g uctm
231
-
232
- # Per-project (copies agents + config + updates CLAUDE.md)
233
- cd your-project
234
- uctm init --lang en # English agents
235
- uctm init --lang ko # 한국어 에이전트
236
- uctm init # Interactive language selection
237
-
238
- # Global (copies agents to ~/.claude/agents/)
239
- uctm init --global --lang en
240
-
241
- # Update agents after upgrading uctm (--lang required)
242
- uctm update --lang en
243
- ```
244
-
245
- ### Manual
246
-
247
- ```bash
248
- git clone https://github.com/UCJung/uc-taskmanager-claude-agent.git /tmp/uc-tm
249
- mkdir -p .claude/agents
250
- cp /tmp/uc-tm/agents/en/*.md .claude/agents/ # or agents/ko/ for Korean
251
- rm -rf /tmp/uc-tm
252
- git add .claude/agents/ && git commit -m "chore: add uc-taskmanager agents"
253
- ```
254
-
255
- ### Verify
256
-
257
- ```bash
258
- claude
259
- > /agents
260
- # specifier, planner, scheduler, builder, verifier, committer → confirm all 6
261
- ```
262
-
263
- ---
264
-
265
- ## Concept: Three Execution Modes
266
-
267
- Main Claude detects the `[]` tag and calls the **specifier** subagent, which selects one of three `execution-mode` values:
268
-
269
- ```
270
- User Request → Main Claude (orchestrator)
271
-
272
-
273
- ┌───────────┐
274
- │ specifier │ (called by Main Claude)
275
- └─────┬─────┘
276
-
277
- execution-mode returned
278
-
279
- ├─ direct (no build/test required)
280
- │ → specifier acts as builder + Main Claude calls committer
281
-
282
- ├─ pipeline (build/test required, single domain, sequential)
283
- │ → Main Claude calls: builder → verifier → committer (in sequence)
284
-
285
- └─ full (multi-domain / complex DAG / new module / 5+ tasks)
286
- → Main Claude calls: planner → scheduler → [builder → verifier → committer] × N
287
- ```
288
-
289
- All three modes output to `works/WORK-NN/` and guarantee `result.md` + `COMMITTER DONE` callback.
290
-
291
- ### WORK (Multi-Task, full mode)
292
-
293
- A two-level hierarchy for complex features:
294
-
295
- ```
296
- WORK (unit of work) A single goal. The unit requested by the user.
297
- └── TASK (unit of task) An individual execution unit to achieve the WORK.
298
- └── result Completion proof. Auto-generated after verification.
299
- ```
300
-
301
- ### pipeline mode (Single Task, Delegated)
302
-
303
- Subagent-delegated path for moderate single tasks. Main Claude calls each agent in sequence. Specifier stays clean.
304
-
305
- ```
306
- Main Claude → builder(sonnet) → verifier(haiku) → committer(haiku)
307
- (each called individually by Main Claude)
308
- ```
309
-
310
- ### direct mode (Trivial)
311
-
312
- Main Claude calls specifier, which determines direct mode and implements the change itself. Main Claude then calls committer.
313
-
314
- ```
315
- Main Claude → specifier: Analyze → Implement → Self-verify → [back to Main Claude]
316
- Main Claude → committer: Commit → result.md
317
- ```
318
-
319
- ---
320
-
321
- ## Pipeline
322
-
323
- ### WORK Pipeline (Complex)
324
-
325
- > Subagents cannot nest — Main Claude (CLI terminal) orchestrates every call.
326
-
327
- ```
328
- Main Claude (orchestrator)
329
- ┌─────────────┼──────────────────────┐
330
- │ │ │
331
- specifier planner scheduler builder verifier committer
332
- ┌──────────┐ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
333
- │Request │────▶│Create │────▶│Dependency│────▶│Code │────▶│Build/Test│────▶│Result │
334
- │Analysis │ │WORK/TASK│ │DAG+Order │ │Implement │ │Verify │ │→ git │
335
- └──────────┘ └─────────┘ └──────────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘
336
- │ │ │
337
- └── Retry on fail┘ │
338
- (max 3 times) │
339
- Next TASK loop ◀┘
340
- ```
341
-
342
- ### pipeline mode (Simple → Delegated)
343
-
344
- ```
345
- specifier builder verifier committer
346
- ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
347
- │PLAN │─────▶│Code │────▶│Build/Test│────▶│Result │
348
- │+TASK │ │Implement │ │Verify │ │→ git │
349
- └──────────┘ └──────────┘ └──────────┘ └──────────┘
350
- (sonnet) (haiku) (haiku)
351
- ← each called by Main Claude →
352
- ```
353
-
354
- ### direct mode (Trivial)
355
-
356
- ```
357
- specifier committer
358
- ┌──────────────────────────────────┐ ┌──────────┐
359
- │ Analyze → Implement → Self-check │──────────────▶│Commit │
360
- └──────────────────────────────────┘ │→ result │
361
- (no build/test required) └──────────┘
362
- ```
363
-
364
- ### Agents
365
-
366
- | Agent | Role | Model | Permission | MCP |
367
- |-------|------|-------|------------|-----|
368
- | **specifier** | `[]` tag detection, execution-mode판정(direct/pipeline/full), PLAN생성, WORK-LIST관리, direct 모드 구현(builder 겸임) | **opus** | read + dispatch + write | Serena(direct 코드수정), sequential-thinking(복잡도판정) |
369
- | **planner** | Create WORK + decompose TASKs + generate PLAN.md(Execution-Mode:full) + pre-create progress templates | **opus** | read-only | Serena(코드베이스탐색), sequential-thinking(TASK분해) |
370
- | **scheduler** | Manage DAG for a specific WORK + run pipeline with sliding window context | **haiku** | read + dispatch | — |
371
- | **builder** | Code implementation + progress.md checkpoint recording | **sonnet** | full access | Serena(심볼단위탐색/편집) |
372
- | **verifier** | Progress gate (Status=COMPLETED) → build/lint/test verification (read-only) | **haiku** | read + execute | — |
373
- | **committer** | Gate check (progress.md) → write result.md → git commit → COMMITTER DONE callback | **haiku** | read + write + git | — |
374
-
375
- ---
376
-
377
- ## File Structure
378
-
379
- ```
380
- works/
381
- ├── WORK-LIST.md ← Master list of all WORKs (managed by specifier)
382
- ├── WORK-01/ ← "User Authentication"
383
- │ ├── PLAN.md ← Plan + dependency graph
384
- │ ├── PROGRESS.md ← Progress tracking (auto-updated)
385
- │ ├── TASK-00.md ← Task specification
386
- │ ├── TASK-00_progress.md ← Real-time checkpoint (builder writes)
387
- │ ├── TASK-00_result.md ← Completion report (committer writes)
388
- │ ├── TASK-01.md
389
- │ └── ...
390
- └── WORK-02/
391
- └── ...
392
- ```
393
-
394
- ### File Naming Convention
395
-
396
- | File | Naming Rule |
397
- |------|-------------|
398
- | Task spec | `TASK-NN.md` (no prefix) |
399
- | Progress checkpoint | `TASK-NN_progress.md` (underscore separator) |
400
- | Completion report | `TASK-NN_result.md` |
401
- | Plan | `PLAN.md` |
402
- | Work progress | `PROGRESS.md` |
403
-
404
- ### WORK-LIST.md
405
-
406
- The specifier maintains `works/WORK-LIST.md` as the master index:
407
-
408
- | WORK ID | Title | Status | Created |
409
- |---------|-------|--------|---------|
410
- | WORK-01 | User Authentication | COMPLETED | 2026-03-01 |
411
- | WORK-02 | Payment Integration | IN_PROGRESS | 2026-03-05 |
412
-
413
- | Status | Meaning |
414
- |--------|---------|
415
- | `IN_PROGRESS` | TASKs in progress — not yet pushed |
416
- | `COMPLETED` | All TASKs committed + git push done |
417
-
418
- - **IN_PROGRESS**: specifier checks this before creating new WORKs
419
- - **COMPLETED**: updated at `git push` time — **not by agents**
420
-
421
- #### git push Procedure
422
-
423
- When you ask Claude to push (`"push this"`, `"git push"`), Claude handles the full sequence automatically:
424
-
425
- ```
426
- 1. Open works/WORK-LIST.md
427
- 2. Find all IN_PROGRESS WORKs
428
- 3. Change status → COMPLETED, update date
429
- 4. git add works/WORK-LIST.md
430
- 5. git commit -m "chore: update WORK-LIST — WORK-XX COMPLETED"
431
- 6. git push
432
- ```
433
-
434
- > **Agents (builder / committer / scheduler) never update WORK-LIST to COMPLETED.**
435
- > COMPLETED is only set at push time. If an agent outputs `🎉 WORK complete!`, that is a status message — not a WORK-LIST update.
436
-
437
- ---
438
-
439
- ## Tips
440
-
441
- ### Keep CLAUDE.md Up to Date
442
-
443
- The language setting and project context live in `CLAUDE.md`. Agents read this on every invocation — keeping it accurate reduces back-and-forth.
444
-
445
- ### Use `[]` Tags Consistently
446
-
447
- Requests without `[]` tags are handled directly by Claude without routing. If you want guaranteed pipeline behavior, always use a tag.
448
-
449
- ### Parallel TASKs
450
-
451
- The planner creates dependency-aware TASK graphs. Independent TASKs (same `blockedBy` set) can be dispatched concurrently by the scheduler — mention it when approving:
452
-
453
- ```
454
- > Approve. Run independent tasks in parallel.
455
- ```
456
-
457
- ### Resume After Context Reset
458
-
459
- If Claude loses context mid-pipeline, you can always resume:
460
-
461
- ```
462
- > Resume WORK-02 from where it stopped
463
- ```
464
-
465
- The scheduler reads `PROGRESS.md` to determine the last completed TASK and continues.
466
-
467
- ---
468
-
469
- ## Example Session
470
-
471
- ```
472
- User: [new-feature] Build a comment feature for the blog system.
473
-
474
- Claude: [specifier → WORK path]
475
- Complexity: 4+ files, DB schema change, multiple modules
476
- → Creating new WORK
477
-
478
- Claude: [planner]
479
- Project analysis
480
- Tech Stack: Next.js + Prisma + PostgreSQL
481
- Existing code: Post CRUD done, Auth done
482
-
483
- WORK-03: Comment Feature
484
-
485
- WORK-03: TASK-00: Comment model + migration ← no dependencies
486
- WORK-03: TASK-01: Comment CRUD API ← TASK-00
487
- WORK-03: TASK-02: Nested comments (self-relation) ← TASK-01
488
- WORK-03: TASK-03: Frontend comment component ← TASK-00 (parallelizable)
489
- WORK-03: TASK-04: Integration + notifications ← TASK-02, TASK-03
490
-
491
- Do you approve?
492
-
493
- User: Approve. Run automatically.
494
-
495
- Claude: [scheduler → auto mode]
496
- WORK-03: TASK-00 → builder → verifier ✅ → committer [a1b2c3d]
497
- WORK-03: TASK-01 → builder → verifier ✅ → committer [d4e5f6g]
498
- WORK-03: TASK-02 → builder → verifier ✅ → committer [h7i8j9k]
499
- WORK-03: TASK-03 → builder → verifier ✅ → committer [l0m1n2o]
500
- WORK-03: TASK-04 → builder → verifier ✅ → committer [p3q4r5s]
501
-
502
- 🎉 WORK-03 completed! 5 tasks, 5 commits
503
- ```
504
-
505
- ---
506
-
507
- ## Why This Approach?
508
-
509
- ### Agent File Design
510
-
511
- All agent files (`agents/*.md`) are written with a single principle: **core content only, no decoration**. Descriptions, emphasis markers, and redundant examples have been removed. The result is ~1,600 lines total across all agents — less than half the original size — while covering the same functional scope.
512
-
513
- Each agent file follows a consistent four-section structure:
514
-
515
- ```
516
- ## 1. 역할 (Role)
517
- Agent's purpose and responsibility declaration.
518
- Single paragraph stating what the agent is and what it owns.
519
-
520
- ## 2. 수행업무 (Responsibilities)
521
- Flat table of owned tasks.
522
- | 업무 (Task) | 설명 (Description) |
523
-
524
- ## 3. 업무수행단계 및 내용 (Execution Steps)
525
- Step-by-step procedure for each task listed in § 2.
526
- Always starts with a STARTUP block listing required files to read on boot.
527
- References file formats via file-content-schema.md (single source of truth).
528
- References inter-agent communication via xml-schema.md.
529
-
530
- ## 4. 제약사항 및 금지사항 (Constraints and Prohibitions)
531
- Immutable rules the agent must always follow.
532
- Written as a flat prohibition/constraint list.
533
- ```
534
-
535
- `file-content-schema.md` is the single authoritative definition for all file formats (PLAN.md, TASK.md, progress.md, result.md). Agents reference it instead of embedding format specs inline — eliminating duplication across 6 agent files.
536
-
537
- ### WORK ID Assignment Strategy
538
-
539
- WORK IDs are assigned based on a **filesystem-first approach**:
540
-
541
- 1. **Filesystem Source**: The planner scans `works/` directory to find existing WORK directories and determines the next WORK ID based on the latest directory found.
542
- 2. **MEMORY.md NOT used**: Project memory (MEMORY.md) is never referenced for WORK numbering. Only the filesystem is the authoritative source.
543
- 3. **Consistency Check**: The specifier validates WORK ID consistency by checking both the filesystem and WORK-LIST.md before dispatching to the planner.
544
-
545
- This ensures:
546
- - No duplicate WORK IDs even if MEMORY.md is stale or corrupted
547
- - Reliable resumption across sessions
548
- - Clear traceability: WORK-NN directly corresponds to `works/WORK-NN/`
549
-
550
- ### Context Isolation
551
-
552
- Each subagent runs in an independent context. Even if the builder creates 50 files using 20,000 tokens, the scheduler only receives a 3-line summary.
553
-
554
- ```
555
- scheduler's context after 5 TASKs:
556
-
557
- PLAN.md (loaded once) ~500 tokens
558
- WORK-01: TASK-00 result: "20 files, PASS" ~200 tokens
559
- WORK-01: TASK-01 result: "15 files, PASS" ~200 tokens
560
- WORK-01: TASK-02 result: "8 files, PASS" ~200 tokens
561
- WORK-01: TASK-03 result: "12 files, PASS" ~200 tokens
562
- WORK-01: TASK-04 result: "5 files, PASS" ~200 tokens
563
- ────────────────────────────────────────
564
- Total: ~1,500 tokens (stays flat)
565
- ```
566
-
567
- ### Single Session vs uc-taskmanager
568
-
569
- | | Single Session | uc-taskmanager |
570
- |---|---|---|
571
- | Context per TASK | All code + logs stacked | Summary only (~200 tokens) |
572
- | After 10 TASKs | 50K~100K tokens, quality degrades | ~3K tokens, quality stable |
573
- | Failure recovery | Start over | Resume from last result file |
574
- | Tracking | Scroll chat history | File-based (PLAN.md, result.md) |
575
- | Verification | Manual | Automated (build/lint/test) |
576
-
577
- ### Router Rule Config (`.agent/router_rule_config.json`)
578
-
579
- The specifier reads `.agent/router_rule_config.json` from the project root to determine routing criteria. If the file is absent, the specifier uses its built-in defaults.
580
-
581
- **File location:**
582
- ```
583
- {project-root}/.agent/router_rule_config.json
584
- ```
585
-
586
- **JSON structure:**
587
- ```json
588
- {
589
- "$schema": "http://uc-taskmanager.local/schemas/specifier-rules/v1.0.json",
590
- "version": "1.1.0",
591
- "description": "Specifier execution-mode decision criteria. Customize per project.",
592
- "decision_flow": [
593
- "1. build_test_required? → false → direct",
594
- "2. single_domain + sequential DAG → pipeline",
595
- "3. any full_conditions met → full"
596
- ],
597
- "rules": {
598
- "direct": {
599
- "criteria": {
600
- "build_test_required": false,
601
- "note": "File/line count irrelevant. If no build/test needed → direct (text edits, config changes, simple substitutions)"
602
- }
603
- },
604
- "pipeline": {
605
- "criteria": {
606
- "build_test_required": true,
607
- "single_domain_only": true,
608
- "max_tasks": 5,
609
- "dag_complexity": "sequential"
610
- }
611
- },
612
- "full": {
613
- "criteria": {
614
- "any_of": [
615
- "task_count > 5",
616
- "dag_complexity == complex (2+ dependency levels)",
617
- "multi_domain == true (BE + FE simultaneously)",
618
- "new_module == true (design → implement → verify multi-phase)",
619
- "partial_rollback_needed == true"
620
- ]
621
- }
622
- }
623
- },
624
- "customization_guide": {
625
- "doc-heavy projects (md edits)": "Widen direct scope. Most build_test_required=false cases → direct",
626
- "code-heavy projects": "Center on pipeline/full. Simple bug fixes → pipeline, multi-domain → full",
627
- "max_tasks tuning": "Adjust pipeline max_tasks between 3–7 based on team size or context limits"
628
- }
629
- }
630
- ```
631
-
632
- **Key fields:**
633
- | Field | Description |
634
- |-------|-------------|
635
- | `rules.direct.criteria.build_test_required` | `false` → specifier handles implementation, then committer commits |
636
- | `rules.pipeline.criteria.max_tasks` | Max task count before escalating to full (default: 5) |
637
- | `rules.pipeline.criteria.dag_complexity` | `sequential` only; complex DAG → escalates to full |
638
- | `rules.full.criteria.any_of` | List of conditions — any match triggers full mode |
639
-
640
- **Fallback behavior:** If `.agent/router_rule_config.json` is absent or malformed, the specifier falls back to its built-in defaults (equivalent to the structure above).
641
-
642
- **Per-project customization example:**
643
-
644
- For a documentation-heavy project where most changes are text edits:
645
- ```json
646
- {
647
- "rules": {
648
- "direct": {
649
- "criteria": { "build_test_required": false }
650
- },
651
- "pipeline": {
652
- "criteria": { "max_tasks": 3, "single_domain_only": true, "dag_complexity": "sequential" }
653
- }
654
- }
655
- }
656
- ```
657
-
658
- For a monorepo with strict build requirements:
659
- ```json
660
- {
661
- "rules": {
662
- "pipeline": {
663
- "criteria": { "max_tasks": 7 }
664
- },
665
- "full": {
666
- "criteria": {
667
- "any_of": ["task_count > 7", "multi_domain == true"]
668
- }
669
- }
670
- }
671
- }
672
- ```
673
-
674
- ### Three Execution Modes
675
-
676
- The specifier matches effort to complexity via `execution-mode`:
677
- - **direct**: 1-line typo fix — Main Claude calls specifier, which implements the change itself + committer commits. Minimal subagent overhead.
678
- - **pipeline**: Moderate fix — Main Claude calls builder → verifier → committer in sequence. Main Claude only orchestrates, minimizing its own context usage
679
- - **full**: Complex features — full planning, decomposition, and tracking
680
-
681
- All three modes output to `works/WORK-NN/` with identical artifact structure (PLAN.md + result.md + COMMITTER DONE callback), ensuring Runner integration works regardless of mode.
682
-
683
- ### Structured Agent Communication
684
-
685
- Instead of ambiguous natural language prompts, agents communicate using structured XML format:
686
-
687
- **Dispatch Format** (Caller → Receiver):
688
- ```xml
689
- <dispatch to="builder" work="WORK-03" task="TASK-00" execution-mode="pipeline">
690
- <context>
691
- <project>uc-taskmanager</project>
692
- <language>ko</language>
693
- <plan-file>works/WORK-03/PLAN.md</plan-file>
694
- </context>
695
- <task-spec>
696
- <file>works/WORK-03/TASK-00.md</file>
697
- <title>공통 시스템 프롬프트 섹션 식별 및 XML 스키마 설계</title>
698
- <action>implement</action>
699
- </task-spec>
700
- <cache-hint sections="output-language-rule,build-commands"/>
701
- </dispatch>
702
- ```
703
-
704
- **Result Format** (Receiver → Caller):
705
- ```xml
706
- <task-result work="WORK-03" task="TASK-00" agent="builder" status="PASS">
707
- <summary>Created shared-prompt-sections.md and xml-schema.md</summary>
708
- <files-changed>
709
- <file action="created" path="agents/shared-prompt-sections.md">Common sections with cache_control</file>
710
- </files-changed>
711
- <verification>
712
- <check name="file_existence" status="PASS">Both files created</check>
713
- </verification>
714
- </task-result>
715
- ```
716
-
717
- **Benefits**:
718
- - **Clarity**: Explicit XML structure eliminates ambiguous natural language ("Pass the context" ← confusing vs. `<context>` ← explicit)
719
- - **Lower Output Tokens**: Agents don't generate clarification questions; receivers parse XML directly
720
- - **Prompt Caching**: Common sections (Output Language Rule, Build Commands) are marked with Anthropic API `cache_control`, saving up to **90% on repeated tokens**
721
- - **Scalability**: Cache hit rates improve with WORK count (5 TASKs at ~0.03 tokens/token vs 2K+ tokens without cache)
722
-
723
- See `agents/xml-schema.md` for complete format, and `agents/shared-prompt-sections.md` for cacheable sections.
724
-
725
- ### Sliding Window Context Transfer
726
-
727
- Each subagent starts with an empty context — the cost of isolation. The **sliding window** system minimizes token waste when passing context between agents and across dependent TASKs.
728
-
729
- **Rule**: the further back, the less detail:
730
-
731
- | Distance | Detail Level | Content |
732
- |----------|-------------|---------|
733
- | Immediate predecessor | `FULL` | what + why + caution + incomplete |
734
- | 2 steps back | `SUMMARY` | what only (1–3 lines) |
735
- | 3+ steps back | `DROP` | not transmitted |
736
-
737
- Each agent outputs a **context-handoff** — a structured reasoning document, not just a result log:
738
-
739
- ```xml
740
- <context-handoff from="builder" detail-level="FULL">
741
- <what>auth.ts modified — added JWT silent refresh logic</what>
742
- <why>Previous code returned 401 immediately on expiry. Silent refresh improves UX.</why>
743
- <caution>Coupled to session.ts setSession(). Changes there may cause side effects.</caution>
744
- <incomplete>Unit tests not written. Verifier should check.</incomplete>
745
- </context-handoff>
746
- ```
747
-
748
- **Result responsibility shift**: builder focuses on implementation only, writing a `progress.md` checkpoint. The **committer** synthesizes builder + verifier context-handoffs into the final `result.md`. This prevents result files from being skipped when builder is context-pressured.
749
-
750
- **Estimated token savings**: ~48% on a 3-TASK dependency chain vs. the naive approach of passing full results forward.
751
-
752
- See `docs/spec_sliding-window-context.md` for full design details.
753
-
754
- ### External System Callback (Optional)
755
-
756
- uc-taskmanager is generic by default. To integrate with an external system (e.g., a CI/CD backend), add callback URLs to `CLAUDE.md`:
757
-
758
- ```markdown
759
- ## Task Callbacks
760
- TaskCallback: http://localhost:3000/api/v1/runner/{{executionId}}/task-result
761
- ProgressCallback: http://localhost:3000/api/v1/runner/{{executionId}}/task-progress
762
- CallbackToken: <your-token>
763
- ```
764
-
765
- - **No config** → works as-is, no external calls made
766
- - **TaskCallback** → committer POSTs result after each TASK commit
767
- - **ProgressCallback** → builder POSTs checkpoint after each progress.md update
768
- - Callback failures are non-fatal — a warning is printed and the pipeline continues
769
-
770
- See `docs/spec_callback-integration.md` for payload schema and implementation guide.
771
-
772
- ---
773
-
774
- ## Output Language
775
-
776
- Output language is resolved from **CLAUDE.md** in your project. No manual configuration needed after first setup.
777
-
778
- ```
779
- 1. Check CLAUDE.md for "Language: xx"
780
- ├─ Found → use that language
781
- └─ Not found ↓
782
-
783
- 2. Ask: "Would you like to set the output language? (e.g., ko, en, ja)"
784
- ├─ User specifies → write to CLAUDE.md + use it
785
- └─ User declines ↓
786
-
787
- 3. Auto-detect system locale → write to CLAUDE.md as default
788
- ```
789
-
790
- Once set, stored in CLAUDE.md and never asked again. Priority: `PLAN.md > CLAUDE.md > en`
791
-
792
- By default, **all output** including git commit messages and code comments uses the configured language:
793
-
794
- | Item | Default | Override |
795
- |------|---------|----------|
796
- | PLAN.md / TASK descriptions | Language | — |
797
- | Result reports | Language | — |
798
- | Git commit messages (title/body) | Language | `CommitLanguage: en` |
799
- | Code comments | Language | `CommentLanguage: en` |
800
- | Commit type prefix (`feat`, `fix`...) | Always English | — |
801
- | File names, paths, commands | Always English | — |
802
-
803
- ### Per-Category Override
804
-
805
- Add to CLAUDE.md to override specific categories:
806
-
807
- ```markdown
808
- ## Language
809
- ko
810
- CommitLanguage: en
811
- CommentLanguage: en
812
- ```
813
-
814
- This gives you `ko` for plans/reports but `en` for commits and code comments — useful for open-source projects or global teams.
815
-
816
- ---
817
-
818
- ## Customization
819
-
820
- Place a file with the same name in `.claude/agents/` to override.
821
-
822
- | What | File | Section |
823
- |------|------|---------|
824
- | Routing criteria | `specifier.md` | 3-2. Execution-Mode 결정 |
825
- | Approval policy | `scheduler.md` | Phase 1: User Approval |
826
- | Commit message format | `committer.md` | Step 3: Stage + Commit |
827
- | Verification steps | `verifier.md` | Verification Pipeline |
828
- | Task granularity | `planner.md` | Task Decomposition Rules |
829
- | Build/lint commands | `builder.md` + `verifier.md` | Self-Check / Step 1-2 |
830
- | Output language | `planner.md` | Output Language Rule |
831
-
832
- ---
833
-
834
- ## Supported Stacks
835
-
836
- Auto-detected from project files. No configuration needed.
837
-
838
- | File | Stack |
839
- |------|-------|
840
- | `package.json` | Node.js / TypeScript / React / NestJS / Next.js |
841
- | `pyproject.toml` / `setup.py` | Python / FastAPI / Django |
842
- | `Cargo.toml` | Rust |
843
- | `go.mod` | Go |
844
- | `build.gradle` / `pom.xml` | Java / Kotlin |
845
- | `Gemfile` | Ruby |
846
- | `Makefile` | Generic |
847
-
848
- ---
849
-
850
- ## Repository Structure
851
-
852
- ```
853
- uc-taskmanager/
854
- ├── package.json ← npm package config (uctm)
855
- ├── bin/cli.mjs ← CLI entry point (uctm init/update)
856
- ├── lib/ ← CLI implementation (constants, init, update)
857
- ├── README.md ← English (default)
858
- ├── README_KO.md ← Korean
859
- ├── CLAUDE.md ← Project-level Claude instructions (push procedure, language, agent call rules)
860
- ├── LICENSE
861
- ├── agents/ ← Distribution: copy these to install
862
- │ ├── ko/ ← Korean agent prompts (12 files)
863
- │ │ ├── specifier.md, planner.md, scheduler.md, builder.md,
864
- │ │ ├── verifier.md, committer.md, agent-flow.md,
865
- │ │ ├── context-policy.md, xml-schema.md, shared-prompt-sections.md,
866
- │ │ ├── file-content-schema.md, work-activity-log.md
867
- │ └── en/ ← English agent prompts (12 files, same structure)
868
- ├── .agent/ ← Per-project configuration
869
- │ └── router_rule_config.json ← Router execution-mode decision criteria
870
- ├── docs/ ← Design specifications
871
- │ ├── spec_pipeline-architecture.md ← Pipeline structure & agent roles (v1.2)
872
- │ ├── spec_pipeline-architecture_v1.1.md ← Pipeline architecture spec v1.1
873
- │ ├── spec_sliding-window-context.md ← Sliding window context design
874
- │ ├── spec_callback-integration.md ← External system callback integration
875
- │ ├── pipeline-architecture-visual.html ← Interactive pipeline visualization
876
- │ └── sliding-window-context-visual.html ← Interactive sliding window visualization
877
- ├── _TODO/ ← Pending tasks and experiments
878
- │ └── bash-cli-pipeline-automation.md ← Server automation via claude -p (verified)
879
- └── works/ ← WORK directories (auto-generated)
880
- ├── WORK-LIST.md ← Master index
881
- ├── WORK-01/ ← all modes output here (direct/pipeline/full)
882
- └── ...
883
- ```
884
-
885
- ---
886
-
887
- ## Requirements
888
-
889
- - [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code)
890
- - Git initialized (`git init`)
891
- - No other dependencies.
892
-
893
- ---
894
-
895
- ## Optional: MCP Configuration
896
-
897
- ### Serena MCP — Symbol-Level Code Navigation
898
-
899
- Special thanks to the [Oraios](https://github.com/oraios) team for building and open-sourcing [Serena](https://github.com/oraios/serena). Their symbol-level code navigation tools make a real difference in reducing token usage and improving edit precision for AI agents.
900
-
901
- The **builder** agent integrates with [Serena MCP](https://github.com/oraios/serena) for symbol-level code exploration. When Serena is available, builder follows this exploration hierarchy instead of reading entire files:
902
-
903
- | Step | Tool | Purpose |
904
- |------|------|---------|
905
- | 1 | `list_dir` | Directory structure (replaces `find`) |
906
- | 2 | `get_symbols_overview` | File symbol map before any file read |
907
- | 3 | `find_symbol(depth=1)` | Class/module method list |
908
- | 4 | `find_symbol(include_body=true)` | Precise body read for target symbol only |
909
- | 5 | `find_referencing_symbols` | Impact analysis before editing |
910
- | 6 | `Read` | Last resort when above tools are insufficient |
911
-
912
- This reduces read tokens by 30–50% on large codebases by reading only the symbols needed, not entire files.
913
-
914
- #### Disable Auto Browser Launch
915
-
916
- Serena opens a web dashboard in your browser on every startup. To disable this, add `--open-web-dashboard False` to your `~/.claude.json`:
917
-
918
- ```json
919
- {
920
- "mcpServers": {
921
- "serena": {
922
- "command": "uvx",
923
- "args": [
924
- "--from", "git+https://github.com/oraios/serena",
925
- "serena", "start-mcp-server",
926
- "--context", "ide-assistant",
927
- "--project", ".",
928
- "--open-web-dashboard", "False"
929
- ]
930
- }
931
- }
932
- }
933
- ```
934
-
935
- The dashboard is still available at `http://localhost:PORT` — it just won't auto-open on startup.
936
-
937
- ---
938
-
939
- ## The Bigger Picture
940
-
941
- This agent is designed to work with an **SDD-based requirement management and automated development system** — a server application that links requirement management → automated development → plans and artifacts. The full system architecture is documented in [`docs/spec_SDD_with_ucagent_requirement.md`](docs/spec_SDD_with_ucagent_requirement.md). Use it as a reference to build your own system tailored to your needs.
942
-
943
- ---
944
-
945
- ## License
946
-
947
- GPL-3.0