uctm 1.1.1 → 1.3.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 CHANGED
@@ -37,7 +37,7 @@ claude --dangerously-skip-permissions
37
37
 
38
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
39
 
40
- That's it. The router analyzes your request, plans the work, and executes through isolated subagent pipelines.
40
+ That's it. The specifier analyzes your request, plans the work, and executes through isolated subagent pipelines.
41
41
 
42
42
  ---
43
43
 
@@ -66,7 +66,7 @@ Six subagents work across any project and any language, automatically handling *
66
66
 
67
67
  ```
68
68
  "[new-feature] Build a user authentication feature"
69
- router decides WORK, planner creates WORK-01 with 5 TASKs, pipeline executes
69
+ specifier decides WORK, planner creates WORK-01 with 5 TASKs, pipeline executes
70
70
  ```
71
71
 
72
72
  ---
@@ -79,7 +79,7 @@ Six subagents work across any project and any language, automatically handling *
79
79
  > [bugfix] Fix typo in login error message
80
80
  ```
81
81
 
82
- Main Claude calls router, which selects `execution-mode: direct` and handles everything in its session. No additional subagent spawned. Creates WORK-NN directory + PLAN + result.md + commit.
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
83
 
84
84
  ### Quick Task (pipeline mode)
85
85
 
@@ -87,7 +87,7 @@ Main Claude calls router, which selects `execution-mode: direct` and handles eve
87
87
  > [bugfix] Fix the login button not responding on mobile
88
88
  ```
89
89
 
90
- Main Claude calls router, which selects `execution-mode: pipeline` and creates PLAN. Then Main Claude calls builder → verifier → committer in sequence.
90
+ Main Claude calls specifier, which selects `execution-mode: pipeline` and creates PLAN. Then Main Claude calls builder → verifier → committer in sequence.
91
91
 
92
92
  ### Complex Feature (WORK)
93
93
 
@@ -121,7 +121,7 @@ The scheduler executes WORK-01's TASKs in dependency order.
121
121
 
122
122
  #### 3. Add to Existing WORK
123
123
 
124
- If WORK-01 is IN_PROGRESS, the router asks:
124
+ If WORK-01 is IN_PROGRESS, the specifier asks:
125
125
  > "WORK-01 (User Authentication) is in progress. Add as a new TASK or create a new WORK?"
126
126
 
127
127
  #### 4. Check Status
@@ -183,7 +183,7 @@ Or fix the issue and re-run:
183
183
  > [enhancement] Add rate limiting to the auth API
184
184
  ```
185
185
 
186
- If WORK-02 is `IN_PROGRESS`, the router asks:
186
+ If WORK-02 is `IN_PROGRESS`, the specifier asks:
187
187
  > "WORK-02 (Auth Module) is in progress. Add as a new TASK, or create a new WORK?"
188
188
 
189
189
  #### 10. Check Individual TASK Status
@@ -215,10 +215,10 @@ To register this rule in your project, add the following to your `CLAUDE.md`:
215
215
  ```markdown
216
216
  ## Agent 호출 규칙
217
217
 
218
- `[]` 태그로 시작하는 요청 → router 에이전트 호출 (WORK 파이프라인 시작)
218
+ `[]` 태그로 시작하는 요청 → specifier 에이전트 호출 (WORK 파이프라인 시작)
219
219
  ```
220
220
 
221
- This ensures Claude automatically delegates `[]`-tagged requests to the router agent without manual invocation.
221
+ This ensures Claude automatically delegates `[]`-tagged requests to the specifier agent without manual invocation.
222
222
 
223
223
  ---
224
224
 
@@ -257,27 +257,27 @@ git add .claude/agents/ && git commit -m "chore: add uc-taskmanager agents"
257
257
  ```bash
258
258
  claude
259
259
  > /agents
260
- # router, planner, scheduler, builder, verifier, committer → confirm all 6
260
+ # specifier, planner, scheduler, builder, verifier, committer → confirm all 6
261
261
  ```
262
262
 
263
263
  ---
264
264
 
265
265
  ## Concept: Three Execution Modes
266
266
 
267
- Main Claude detects the `[]` tag and calls the **router** subagent, which selects one of three `execution-mode` values:
267
+ Main Claude detects the `[]` tag and calls the **specifier** subagent, which selects one of three `execution-mode` values:
268
268
 
269
269
  ```
270
270
  User Request → Main Claude (orchestrator)
271
271
 
272
272
 
273
- ┌────────┐
274
- router │ (called by Main Claude)
275
- └───┬────┘
276
-
277
- execution-mode returned
278
-
273
+ ┌───────────┐
274
+ specifier │ (called by Main Claude)
275
+ └─────┬─────┘
276
+
277
+ execution-mode returned
278
+
279
279
  ├─ direct (no build/test required)
280
- │ → router handles everything 0 additional subagent calls
280
+ │ → specifier acts as builder + Main Claude calls committer
281
281
 
282
282
  ├─ pipeline (build/test required, single domain, sequential)
283
283
  │ → Main Claude calls: builder → verifier → committer (in sequence)
@@ -300,7 +300,7 @@ WORK (unit of work) A single goal. The unit requested by the user.
300
300
 
301
301
  ### pipeline mode (Single Task, Delegated)
302
302
 
303
- Subagent-delegated path for moderate single tasks. Main Claude calls each agent in sequence. Router stays clean.
303
+ Subagent-delegated path for moderate single tasks. Main Claude calls each agent in sequence. Specifier stays clean.
304
304
 
305
305
  ```
306
306
  Main Claude → builder(sonnet) → verifier(haiku) → committer(haiku)
@@ -309,10 +309,11 @@ Main Claude → builder(sonnet) → verifier(haiku) → committer(haiku)
309
309
 
310
310
  ### direct mode (Trivial)
311
311
 
312
- Main Claude calls router, which handles everything in its own session. No additional subagent calls.
312
+ Main Claude calls specifier, which determines direct mode and implements the change itself. Main Claude then calls committer.
313
313
 
314
314
  ```
315
- Main Claude → router: Analyze → Implement → Self-verify → Commit result.md
315
+ Main Claude → specifier: Analyze → Implement → Self-verify → [back to Main Claude]
316
+ Main Claude → committer: Commit → result.md
316
317
  ```
317
318
 
318
319
  ---
@@ -324,28 +325,28 @@ Main Claude → router: Analyze → Implement → Self-verify → Commit → res
324
325
  > Subagents cannot nest — Main Claude (CLI terminal) orchestrates every call.
325
326
 
326
327
  ```
327
- Main Claude (orchestrator)
328
- ┌──────────┼──────────────────────┐
329
- │ │
330
- router planner scheduler builder verifier committer
331
- ┌────────┐ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
332
- │Request │────▶│Create │────▶│Dependency │────▶│Code │────▶│Build/Test│────▶│Result │
333
- │Analysis │ │WORK/TASK │ │DAG + Order│ │Implement │ │Verify │ │→ git │
334
- └────────┘ └─────────┘ └──────────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘
335
- │ │ │
336
- └── Retry on fail┘ │
337
- (max 3 times) │
338
- Next TASK loop ◀┘
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 ◀┘
339
340
  ```
340
341
 
341
342
  ### pipeline mode (Simple → Delegated)
342
343
 
343
344
  ```
344
- router builder verifier committer
345
- ┌────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
346
- │PLAN │─────▶│Code │────▶│Build/Test│────▶│Result │
347
- │+TASK │ │Implement │ │Verify │ │→ git │
348
- └────────┘ └──────────┘ └──────────┘ └──────────┘
345
+ specifier builder verifier committer
346
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
347
+ │PLAN │─────▶│Code │────▶│Build/Test│────▶│Result │
348
+ │+TASK │ │Implement │ │Verify │ │→ git │
349
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘
349
350
  (sonnet) (haiku) (haiku)
350
351
  ← each called by Main Claude →
351
352
  ```
@@ -353,18 +354,18 @@ Main Claude → router: Analyze → Implement → Self-verify → Commit → res
353
354
  ### direct mode (Trivial)
354
355
 
355
356
  ```
356
- router
357
- ┌──────────────────────────────────────────────────┐
358
- │ Analyze → Implement → Self-check Commit → result
359
- └──────────────────────────────────────────────────┘
360
- (no build/test required — no subagent overhead, 0 extra sessions)
357
+ specifier committer
358
+ ┌──────────────────────────────────┐ ┌──────────┐
359
+ │ Analyze → Implement → Self-check │──────────────▶│Commit
360
+ └──────────────────────────────────┘ │→ result │
361
+ (no build/test required) └──────────┘
361
362
  ```
362
363
 
363
364
  ### Agents
364
365
 
365
366
  | Agent | Role | Model | Permission | MCP |
366
367
  |-------|------|-------|------------|-----|
367
- | **router** | `[]` tag detection, execution-mode판정(direct/pipeline/full), PLAN생성, WORK-LIST관리 | **opus** | read + dispatch | Serena(direct 코드수정), sequential-thinking(복잡도판정) |
368
+ | **specifier** | `[]` tag detection, execution-mode판정(direct/pipeline/full), PLAN생성, WORK-LIST관리, direct 모드 구현(builder 겸임) | **opus** | read + dispatch + write | Serena(direct 코드수정), sequential-thinking(복잡도판정) |
368
369
  | **planner** | Create WORK + decompose TASKs + generate PLAN.md(Execution-Mode:full) + pre-create progress templates | **opus** | read-only | Serena(코드베이스탐색), sequential-thinking(TASK분해) |
369
370
  | **scheduler** | Manage DAG for a specific WORK + run pipeline with sliding window context | **haiku** | read + dispatch | — |
370
371
  | **builder** | Code implementation + progress.md checkpoint recording | **sonnet** | full access | Serena(심볼단위탐색/편집) |
@@ -377,7 +378,7 @@ Main Claude → router: Analyze → Implement → Self-verify → Commit → res
377
378
 
378
379
  ```
379
380
  works/
380
- ├── WORK-LIST.md ← Master list of all WORKs (managed by router)
381
+ ├── WORK-LIST.md ← Master list of all WORKs (managed by specifier)
381
382
  ├── WORK-01/ ← "User Authentication"
382
383
  │ ├── PLAN.md ← Plan + dependency graph
383
384
  │ ├── PROGRESS.md ← Progress tracking (auto-updated)
@@ -402,7 +403,7 @@ works/
402
403
 
403
404
  ### WORK-LIST.md
404
405
 
405
- The router maintains `works/WORK-LIST.md` as the master index:
406
+ The specifier maintains `works/WORK-LIST.md` as the master index:
406
407
 
407
408
  | WORK ID | Title | Status | Created |
408
409
  |---------|-------|--------|---------|
@@ -414,7 +415,7 @@ The router maintains `works/WORK-LIST.md` as the master index:
414
415
  | `IN_PROGRESS` | TASKs in progress — not yet pushed |
415
416
  | `COMPLETED` | All TASKs committed + git push done |
416
417
 
417
- - **IN_PROGRESS**: router checks this before creating new WORKs
418
+ - **IN_PROGRESS**: specifier checks this before creating new WORKs
418
419
  - **COMPLETED**: updated at `git push` time — **not by agents**
419
420
 
420
421
  #### git push Procedure
@@ -470,7 +471,7 @@ The scheduler reads `PROGRESS.md` to determine the last completed TASK and conti
470
471
  ```
471
472
  User: [new-feature] Build a comment feature for the blog system.
472
473
 
473
- Claude: [router → WORK path]
474
+ Claude: [specifier → WORK path]
474
475
  Complexity: 4+ files, DB schema change, multiple modules
475
476
  → Creating new WORK
476
477
 
@@ -539,7 +540,7 @@ WORK IDs are assigned based on a **filesystem-first approach**:
539
540
 
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.
541
542
  2. **MEMORY.md NOT used**: Project memory (MEMORY.md) is never referenced for WORK numbering. Only the filesystem is the authoritative source.
542
- 3. **Consistency Check**: The router validates WORK ID consistency by checking both the filesystem and WORK-LIST.md before dispatching to the planner.
543
+ 3. **Consistency Check**: The specifier validates WORK ID consistency by checking both the filesystem and WORK-LIST.md before dispatching to the planner.
543
544
 
544
545
  This ensures:
545
546
  - No duplicate WORK IDs even if MEMORY.md is stale or corrupted
@@ -575,7 +576,7 @@ scheduler's context after 5 TASKs:
575
576
 
576
577
  ### Router Rule Config (`.agent/router_rule_config.json`)
577
578
 
578
- The router reads `.agent/router_rule_config.json` from the project root to determine routing criteria. If the file is absent, the router uses its built-in defaults.
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.
579
580
 
580
581
  **File location:**
581
582
  ```
@@ -585,9 +586,9 @@ The router reads `.agent/router_rule_config.json` from the project root to deter
585
586
  **JSON structure:**
586
587
  ```json
587
588
  {
588
- "$schema": "http://uc-taskmanager.local/schemas/router-rules/v1.0.json",
589
+ "$schema": "http://uc-taskmanager.local/schemas/specifier-rules/v1.0.json",
589
590
  "version": "1.1.0",
590
- "description": "Router execution-mode decision criteria. Customize per project.",
591
+ "description": "Specifier execution-mode decision criteria. Customize per project.",
591
592
  "decision_flow": [
592
593
  "1. build_test_required? → false → direct",
593
594
  "2. single_domain + sequential DAG → pipeline",
@@ -631,12 +632,12 @@ The router reads `.agent/router_rule_config.json` from the project root to deter
631
632
  **Key fields:**
632
633
  | Field | Description |
633
634
  |-------|-------------|
634
- | `rules.direct.criteria.build_test_required` | `false` → router handles entirely without spawning subagents |
635
+ | `rules.direct.criteria.build_test_required` | `false` → specifier handles implementation, then committer commits |
635
636
  | `rules.pipeline.criteria.max_tasks` | Max task count before escalating to full (default: 5) |
636
637
  | `rules.pipeline.criteria.dag_complexity` | `sequential` only; complex DAG → escalates to full |
637
638
  | `rules.full.criteria.any_of` | List of conditions — any match triggers full mode |
638
639
 
639
- **Fallback behavior:** If `.agent/router_rule_config.json` is absent or malformed, the router falls back to its built-in defaults (equivalent to the structure above).
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).
640
641
 
641
642
  **Per-project customization example:**
642
643
 
@@ -672,8 +673,8 @@ For a monorepo with strict build requirements:
672
673
 
673
674
  ### Three Execution Modes
674
675
 
675
- The router matches effort to complexity via `execution-mode`:
676
- - **direct**: 1-line typo fix — Main Claude calls router, which handles everything. 0 additional subagent sessions.
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.
677
678
  - **pipeline**: Moderate fix — Main Claude calls builder → verifier → committer in sequence. Main Claude only orchestrates, minimizing its own context usage
678
679
  - **full**: Complex features — full planning, decomposition, and tracking
679
680
 
@@ -820,7 +821,7 @@ Place a file with the same name in `.claude/agents/` to override.
820
821
 
821
822
  | What | File | Section |
822
823
  |------|------|---------|
823
- | Routing criteria | `router.md` | 3-2. Execution-Mode 결정 |
824
+ | Routing criteria | `specifier.md` | 3-2. Execution-Mode 결정 |
824
825
  | Approval policy | `scheduler.md` | Phase 1: User Approval |
825
826
  | Commit message format | `committer.md` | Step 3: Stage + Commit |
826
827
  | Verification steps | `verifier.md` | Verification Pipeline |
@@ -859,7 +860,7 @@ uc-taskmanager/
859
860
  ├── LICENSE
860
861
  ├── agents/ ← Distribution: copy these to install
861
862
  │ ├── ko/ ← Korean agent prompts (12 files)
862
- │ │ ├── router.md, planner.md, scheduler.md, builder.md,
863
+ │ │ ├── specifier.md, planner.md, scheduler.md, builder.md,
863
864
  │ │ ├── verifier.md, committer.md, agent-flow.md,
864
865
  │ │ ├── context-policy.md, xml-schema.md, shared-prompt-sections.md,
865
866
  │ │ ├── file-content-schema.md, work-activity-log.md
@@ -1,106 +1,152 @@
1
- # Agent Flow — Main Claude Orchestration Guide
2
-
3
- > **All agent invocations are performed by Main Claude.**
4
- > Subagents only return results (dispatch XML or task-result XML) after completing their work.
5
- > Main Claude receives the return values and invokes the next agent.
6
-
7
- ---
8
-
9
- ## Execution Mode Decision
10
-
11
- ```
12
- [] tag detected → invoke router
13
-
14
- Check router return value (execution-mode)
15
-
16
- ├─ direct router handles everything (no additional invocations)
17
- ├─ pipeline Execute § pipeline procedure
18
- └─ full Execute § full procedure
19
- ```
20
-
21
- ---
22
-
23
- ## direct Mode
24
-
25
- Router handles everything on its own. No additional invocations by Main Claude.
26
-
27
- ---
28
-
29
- ## pipeline Mode
30
-
31
- ```
32
- 1. Invoke router creates PLAN.md + TASK-00.md + returns builder dispatch XML
33
- 2. Invoke builder (dispatch XML as prompt)
34
- 3. Invoke verifier (builder result as prompt)
35
- 4. Invoke committer (verifier result as prompt)
36
- ```
37
-
38
- ---
39
-
40
- ## full Mode
41
-
42
- ```
43
- 1. Invoke router → creates WORK directory + returns planner dispatch XML
44
- 2. Invoke planner (dispatch XML as prompt) → creates PLAN.md + TASK files
45
- 3. Invoke schedulerDAG analysis + READY TASK + returns builder dispatch XML
46
- 4. Invoke builder (dispatch XML as prompt) → implementation
47
- 5. Invoke verifier (builder result as prompt) → verification
48
- 6. Invoke committer (verifier result as prompt) → commit
49
- 7. If incomplete TASKs remain, return to step 3
50
- ```
51
-
52
- Parallel execution: If scheduler returns multiple READY TASKs, invoke builders concurrently.
53
-
54
- ---
55
-
56
- ## Agent Role Summary
57
-
58
- | Agent | Return Value | Invoked By |
59
- |-------|-------------|------------|
60
- | router | execution-mode + dispatch XML | Main Claude |
61
- | planner | PLAN.md/TASK file creation completion report | Main Claude |
62
- | scheduler | READY TASK + dispatch XML | Main Claude |
63
- | builder | task-result XML (includes context-handoff) | Main Claude |
64
- | verifier | task-result XML | Main Claude |
65
- | committer | task-result XML + commit hash | Main Claude |
66
-
67
- ---
68
-
69
- ## Bash CLI Execution (Server Automation)
70
-
71
- Method to run pipeline independently without an interactive session. `claude -p` acts as Main Claude.
72
-
73
- ```bash
74
- env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
75
- "[new-work] {task description}" \
76
- --dangerously-skip-permissions \
77
- --output-format stream-json \
78
- --verbose \
79
- 2>&1 | tee /tmp/pipeline.log
80
- ```
81
-
82
- | Option | Purpose |
83
- |--------|---------|
84
- | `env -u CLAUDECODE` | Bypass nested execution blocking |
85
- | `env -u ANTHROPIC_API_KEY` | Use subscription auth (Max) instead of API key |
86
- | `--dangerously-skip-permissions` | Skip permission prompts for unattended execution |
87
- | `--output-format stream-json --verbose` | Streaming for real-time monitoring |
88
-
89
- Resume interrupted pipeline:
90
- ```bash
91
- env -u CLAUDECODE -u ANTHROPIC_API_KEY claude -p \
92
- "Resume WORK-XX pipeline." \
93
- --dangerously-skip-permissions
94
- ```
95
-
96
- Verification result (WORK-24): `claude -p` → 9 Task tool invocations → full auto-completion of router/planner/scheduler/builder/verifier/committer confirmed.
97
-
98
- ---
99
-
100
- ## Context Transfer (Sliding Window)
101
-
102
- | Distance | Level | Content |
103
- |----------|-------|---------|
104
- | Immediate predecessor | FULL | what + why + caution + incomplete |
105
- | 2 steps back | SUMMARY | what only, 1-2 lines |
106
- | 3+ steps back | DROP | Not transmitted |
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 |
@@ -155,7 +155,23 @@ Committer-specific additional fields:
155
155
  </next-tasks>
156
156
  ```
157
157
 
158
- Do not change WORK-LIST.md to COMPLETED — changed only at git push time.
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
+
159
175
  → see `.claude/agents/shared-prompt-sections.md` § 8
160
176
 
161
177
  ---
@@ -173,7 +189,7 @@ Do not change WORK-LIST.md to COMPLETED — changed only at git push time.
173
189
  - If Files changed is empty → immediately return FAIL
174
190
 
175
191
  ### WORK-LIST.md Rules
176
- - Changing to COMPLETED is prohibited changed only at git push time
192
+ - Automatically change WORK-LIST.md from `IN_PROGRESS` to `COMPLETED` when the last TASK is completed
177
193
 
178
194
  ### Output Language Rule
179
195
  → see `shared-prompt-sections.md` § 1