triflux 10.9.21 → 10.9.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/.claude-plugin/marketplace.json +34 -0
  2. package/.claude-plugin/plugin.json +22 -0
  3. package/config/mcp-registry.json +29 -0
  4. package/hub/account-broker.mjs +6 -4
  5. package/hub/cli-adapter-base.mjs +14 -14
  6. package/hub/lib/env-detect.mjs +47 -20
  7. package/hub/server.mjs +17 -15
  8. package/hub/team/headless.mjs +10 -0
  9. package/hub/team/swarm-hypervisor.mjs +2 -2
  10. package/hub/workers/delegator-mcp.mjs +129 -1
  11. package/hud/constants.mjs +24 -13
  12. package/hud/renderers.mjs +2 -1
  13. package/package.json +62 -21
  14. package/scripts/__tests__/keyword-detector.test.mjs +4 -4
  15. package/scripts/__tests__/release-governance.test.mjs +148 -0
  16. package/scripts/doctor-diagnose.mjs +6 -7
  17. package/scripts/lib/cross-review-utils.mjs +2 -2
  18. package/scripts/lib/mcp-filter.mjs +12 -24
  19. package/scripts/release/bump-version.mjs +77 -0
  20. package/scripts/release/check-sync.mjs +51 -0
  21. package/scripts/release/lib.mjs +303 -0
  22. package/scripts/release/prepare.mjs +85 -0
  23. package/scripts/release/publish.mjs +87 -0
  24. package/scripts/release/verify.mjs +81 -0
  25. package/scripts/release/version-manifest.json +26 -0
  26. package/scripts/remote-spawn.mjs +3 -3
  27. package/scripts/setup.mjs +18 -15
  28. package/scripts/tfx-route.sh +64 -8
  29. package/tui/codex-profile.mjs +457 -0
  30. package/tui/core.mjs +266 -0
  31. package/tui/doctor.mjs +375 -0
  32. package/tui/gemini-profile.mjs +299 -0
  33. package/tui/monitor-data.mjs +152 -0
  34. package/tui/monitor.mjs +339 -0
  35. package/tui/setup.mjs +598 -0
  36. package/CLAUDE.md +0 -212
  37. package/references/hosts.json +0 -46
  38. package/skills/tfx-workspace/async-tests/run-tests.sh +0 -203
  39. package/skills/tfx-workspace/evals/evals.json +0 -79
  40. package/skills/tfx-workspace/iteration-1/benchmark.json +0 -524
  41. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/eval_metadata.json +0 -11
  42. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/old_skill/grading.json +0 -25
  43. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/old_skill/outputs/analysis.md +0 -154
  44. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/old_skill/timing.json +0 -5
  45. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/with_skill/grading.json +0 -25
  46. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/with_skill/outputs/analysis.md +0 -126
  47. package/skills/tfx-workspace/iteration-1/codex-gemini-remap/with_skill/timing.json +0 -5
  48. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/eval_metadata.json +0 -11
  49. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/old_skill/grading.json +0 -25
  50. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/old_skill/outputs/analysis.md +0 -119
  51. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/old_skill/timing.json +0 -5
  52. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/with_skill/grading.json +0 -25
  53. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/with_skill/outputs/analysis.md +0 -115
  54. package/skills/tfx-workspace/iteration-1/doctor-diagnosis/with_skill/timing.json +0 -5
  55. package/skills/tfx-workspace/iteration-1/hub-start-sequence/eval_metadata.json +0 -10
  56. package/skills/tfx-workspace/iteration-1/hub-start-sequence/old_skill/grading.json +0 -20
  57. package/skills/tfx-workspace/iteration-1/hub-start-sequence/old_skill/outputs/analysis.md +0 -86
  58. package/skills/tfx-workspace/iteration-1/hub-start-sequence/old_skill/timing.json +0 -5
  59. package/skills/tfx-workspace/iteration-1/hub-start-sequence/with_skill/grading.json +0 -20
  60. package/skills/tfx-workspace/iteration-1/hub-start-sequence/with_skill/outputs/analysis.md +0 -81
  61. package/skills/tfx-workspace/iteration-1/hub-start-sequence/with_skill/timing.json +0 -5
  62. package/skills/tfx-workspace/iteration-1/multi-team-creation/eval_metadata.json +0 -12
  63. package/skills/tfx-workspace/iteration-1/multi-team-creation/old_skill/grading.json +0 -30
  64. package/skills/tfx-workspace/iteration-1/multi-team-creation/old_skill/outputs/analysis.md +0 -316
  65. package/skills/tfx-workspace/iteration-1/multi-team-creation/old_skill/timing.json +0 -5
  66. package/skills/tfx-workspace/iteration-1/multi-team-creation/with_skill/grading.json +0 -30
  67. package/skills/tfx-workspace/iteration-1/multi-team-creation/with_skill/outputs/analysis.md +0 -352
  68. package/skills/tfx-workspace/iteration-1/multi-team-creation/with_skill/timing.json +0 -5
  69. package/skills/tfx-workspace/iteration-1/review.html +0 -1325
  70. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/eval_metadata.json +0 -12
  71. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/old_skill/grading.json +0 -30
  72. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/old_skill/outputs/analysis.md +0 -97
  73. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/old_skill/timing.json +0 -5
  74. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/with_skill/grading.json +0 -30
  75. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/with_skill/outputs/analysis.md +0 -94
  76. package/skills/tfx-workspace/iteration-1/routing-implement-shortcut/with_skill/timing.json +0 -5
  77. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/eval_metadata.json +0 -12
  78. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/old_skill/grading.json +0 -30
  79. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/old_skill/outputs/analysis.md +0 -209
  80. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/old_skill/timing.json +0 -5
  81. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/with_skill/grading.json +0 -30
  82. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/with_skill/outputs/analysis.md +0 -193
  83. package/skills/tfx-workspace/iteration-1/routing-multi-task-triage/with_skill/timing.json +0 -5
  84. package/skills/tfx-workspace/iteration-2/benchmark.json +0 -144
  85. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/eval_metadata.json +0 -13
  86. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/old_skill/grading.json +0 -35
  87. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/old_skill/outputs/analysis.md +0 -382
  88. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/old_skill/timing.json +0 -5
  89. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/with_skill/grading.json +0 -35
  90. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/with_skill/outputs/analysis.md +0 -333
  91. package/skills/tfx-workspace/iteration-2/multi-team-creation-refactored/with_skill/timing.json +0 -5
  92. package/skills/tfx-workspace/iteration-2/review.html +0 -1325
  93. package/skills/tfx-workspace/skill-snapshot/tfx-auto/SKILL.md +0 -217
  94. package/skills/tfx-workspace/skill-snapshot/tfx-auto-codex/SKILL.md +0 -77
  95. package/skills/tfx-workspace/skill-snapshot/tfx-codex/SKILL.md +0 -65
  96. package/skills/tfx-workspace/skill-snapshot/tfx-doctor/SKILL.md +0 -94
  97. package/skills/tfx-workspace/skill-snapshot/tfx-gemini/SKILL.md +0 -82
  98. package/skills/tfx-workspace/skill-snapshot/tfx-hub/SKILL.md +0 -133
  99. package/skills/tfx-workspace/skill-snapshot/tfx-multi/SKILL.md +0 -426
  100. package/skills/tfx-workspace/skill-snapshot/tfx-setup/SKILL.md +0 -101
@@ -1,86 +0,0 @@
1
- # Routing Analysis: `/tfx-hub start`
2
-
3
- **Skill source:** `skills/tfx-workspace/skill-snapshot/tfx-hub/SKILL.md`
4
- **Input:** `/tfx-hub start`
5
- **Run mode:** DRY RUN — no commands executed
6
-
7
- ---
8
-
9
- ## 1. Command Match vs. Fallthrough
10
-
11
- This input **matches a command** — specifically the `start` command.
12
-
13
- The skill's input interpretation table explicitly lists:
14
-
15
- ```
16
- /tfx-hub start → 커맨드 매칭 → 허브 시작
17
- ```
18
-
19
- The argument `start` is a recognized command keyword (alongside `stop`, `status`, `--port`). Therefore, the fallthrough path is NOT taken.
20
-
21
- ---
22
-
23
- ## 2. Exact Bash Command That Would Be Run
24
-
25
- ```bash
26
- Bash("node hub/server.mjs", run_in_background=true)
27
- ```
28
-
29
- This is quoted verbatim from the `### start — 허브 시작` section of the skill definition.
30
-
31
- ---
32
-
33
- ## 3. run_in_background Setting
34
-
35
- `run_in_background` would be set to **`true`**.
36
-
37
- The skill definition explicitly passes `run_in_background=true` as a parameter to the `Bash` call for the `start` command. The hub process is a long-running server and must not block the agent thread.
38
-
39
- ---
40
-
41
- ## 4. Port and Endpoint
42
-
43
- - **Port:** `27888`
44
- - **MCP endpoint:** `http://127.0.0.1:27888/mcp`
45
- - **Status endpoint:** `http://127.0.0.1:27888/status`
46
-
47
- The skill states: "Streamable HTTP MCP 서버를 `http://127.0.0.1:27888/mcp` 에서 시작"
48
-
49
- Supporting runtime details:
50
- - SQLite WAL DB: `~/.claude/cache/tfx-hub/state.db`
51
- - PID file: `~/.claude/cache/tfx-hub/hub.pid`
52
- - Port can be overridden via env var `TFX_HUB_PORT`; DB path via `TFX_HUB_DB`
53
-
54
- ---
55
-
56
- ## 5. Post-Start Registration Steps
57
-
58
- The skill documents a section titled **"각 CLI 등록 방법"** (How to register with each CLI) describing steps to run after the hub starts. These are not executed automatically by the `start` command — they are listed as manual follow-up actions:
59
-
60
- ```bash
61
- # Codex
62
- codex mcp add tfx-hub --url http://127.0.0.1:27888/mcp
63
-
64
- # Gemini (settings.json)
65
- # mcpServers.tfx-hub.url = "http://127.0.0.1:27888/mcp"
66
-
67
- # Claude
68
- claude mcp add --transport http tfx-hub http://127.0.0.1:27888/mcp
69
- ```
70
-
71
- The `start` command itself only launches `node hub/server.mjs` in the background. Registration with individual CLI agents is a separate, post-start step described in the skill but not triggered automatically. The skill does not indicate these registration calls are part of the `start` flow — they are presented as supplementary instructions under their own heading.
72
-
73
- ---
74
-
75
- ## Summary Table
76
-
77
- | Field | Value |
78
- |-------------------------|--------------------------------------------|
79
- | Routing outcome | Command match (`start`) |
80
- | Fallthrough triggered | No |
81
- | Exact command | `Bash("node hub/server.mjs", run_in_background=true)` |
82
- | run_in_background | `true` |
83
- | Hub port | `27888` |
84
- | MCP endpoint | `http://127.0.0.1:27888/mcp` |
85
- | Status endpoint | `http://127.0.0.1:27888/status` |
86
- | Post-start registration | Manual — not auto-executed by start command |
@@ -1,5 +0,0 @@
1
- {
2
- "total_tokens": 14904,
3
- "duration_ms": 51754,
4
- "total_duration_seconds": 51.8
5
- }
@@ -1,20 +0,0 @@
1
- {
2
- "expectations": [
3
- {
4
- "text": "Runs 'node hub/server.mjs' with run_in_background=true",
5
- "passed": true,
6
- "evidence": "Agent output: 'Bash(\"node hub/server.mjs\", run_in_background=true)'"
7
- },
8
- {
9
- "text": "Mentions port 27888 and /mcp endpoint",
10
- "passed": true,
11
- "evidence": "Agent output: 'Port 27888, MCP endpoint at http://127.0.0.1:27888/mcp'"
12
- },
13
- {
14
- "text": "Does NOT try to run any triage or routing",
15
- "passed": true,
16
- "evidence": "Agent correctly identified this as a command match (start), not fallthrough to triage"
17
- }
18
- ],
19
- "summary": { "passed": 3, "failed": 0, "total": 3, "pass_rate": 1.0 }
20
- }
@@ -1,81 +0,0 @@
1
- # Routing Analysis: `/tfx-hub start`
2
-
3
- ## Source
4
- Skill definition: `skills/tfx-hub/SKILL.md`
5
-
6
- ---
7
-
8
- ## 1. Command Match vs. Fallthrough
9
-
10
- **Result: Command match — `start`**
11
-
12
- The skill defines an explicit routing table under "입력 해석 규칙":
13
-
14
- ```
15
- /tfx-hub start → 커맨드 매칭 → 허브 시작
16
- ```
17
-
18
- The argument `start` is listed as a command keyword. The fallthrough rule only applies when the argument does NOT match `start`, `stop`, `status`, or `--port`. Therefore `/tfx-hub start` is handled by the `start` command branch, not the free-form fallthrough.
19
-
20
- ---
21
-
22
- ## 2. Exact Bash Command
23
-
24
- ```bash
25
- Bash("node hub/server.mjs", run_in_background=true)
26
- ```
27
-
28
- Quoted verbatim from the skill's `### start — 허브 시작` section.
29
-
30
- ---
31
-
32
- ## 3. `run_in_background`
33
-
34
- **Set to `true`.**
35
-
36
- The skill explicitly passes `run_in_background=true` in the `start` command call. This is the only command in the skill that uses background execution.
37
-
38
- ---
39
-
40
- ## 4. Port and Endpoint
41
-
42
- - **Port:** `27888` (default; overridable via environment variable `TFX_HUB_PORT`)
43
- - **MCP endpoint:** `http://127.0.0.1:27888/mcp`
44
- - **Status endpoint:** `http://127.0.0.1:27888/status`
45
-
46
- Additional runtime artefacts written on start:
47
- - SQLite WAL DB: `~/.claude/cache/tfx-hub/state.db`
48
- - PID file: `~/.claude/cache/tfx-hub/hub.pid`
49
-
50
- ---
51
-
52
- ## 5. Post-Start Registration Steps
53
-
54
- The skill describes registering the running hub with each CLI agent under "각 CLI 등록 방법":
55
-
56
- ```bash
57
- # Codex
58
- codex mcp add tfx-hub --url http://127.0.0.1:27888/mcp
59
-
60
- # Gemini (settings.json)
61
- # mcpServers.tfx-hub.url = "http://127.0.0.1:27888/mcp"
62
-
63
- # Claude
64
- claude mcp add --transport http tfx-hub http://127.0.0.1:27888/mcp
65
- ```
66
-
67
- These steps are documented but are listed as per-CLI manual registration steps — the skill does not show them being executed automatically as part of the `start` command block itself. The `start` block contains only the single `Bash("node hub/server.mjs", run_in_background=true)` call.
68
-
69
- ---
70
-
71
- ## Summary Table
72
-
73
- | Attribute | Value |
74
- |-----------|-------|
75
- | Routing outcome | Command match (`start`) |
76
- | Fallthrough triggered | No |
77
- | Bash command | `Bash("node hub/server.mjs", run_in_background=true)` |
78
- | `run_in_background` | `true` |
79
- | Port | `27888` |
80
- | MCP endpoint | `http://127.0.0.1:27888/mcp` |
81
- | Post-start registration | Documented (manual, per-CLI); not auto-executed by `start` |
@@ -1,5 +0,0 @@
1
- {
2
- "total_tokens": 14821,
3
- "duration_ms": 47208,
4
- "total_duration_seconds": 47.2
5
- }
@@ -1,12 +0,0 @@
1
- {
2
- "eval_id": 3,
3
- "eval_name": "multi-team-creation",
4
- "prompt": "/tfx-multi 인증 리팩터링 + UI 개선 + 보안 리뷰",
5
- "assertions": [
6
- "Creates exactly one TeamCreate with tfx- prefix naming",
7
- "Creates 3 TaskCreate calls (one per subtask)",
8
- "Spawns 3 Agent wrappers with mode: bypassPermissions",
9
- "Uses tfx-route.sh inside Agent wrapper (not direct codex/gemini)",
10
- "Includes Phase 5 cleanup (TeamDelete)"
11
- ]
12
- }
@@ -1,30 +0,0 @@
1
- {
2
- "expectations": [
3
- {
4
- "text": "Creates exactly one TeamCreate with tfx- prefix naming",
5
- "passed": true,
6
- "evidence": "Agent output: TeamCreate({ team_name: 'tfx-<id>' })"
7
- },
8
- {
9
- "text": "Creates 3 TaskCreate calls (one per subtask)",
10
- "passed": true,
11
- "evidence": "Agent output: 'Three TaskCreate calls (one per subtask), preserving taskIds'"
12
- },
13
- {
14
- "text": "Spawns 3 Agent wrappers with mode: bypassPermissions",
15
- "passed": true,
16
- "evidence": "Agent output: 'mode: bypassPermissions — included in all 3 Agent calls. Mandatory.'"
17
- },
18
- {
19
- "text": "Uses tfx-route.sh inside Agent wrapper (not direct codex/gemini)",
20
- "passed": true,
21
- "evidence": "Agent output: 'all wrappers internally call bash ~/.claude/scripts/tfx-route.sh — never direct codex exec or gemini -y -p'"
22
- },
23
- {
24
- "text": "Includes Phase 5 cleanup (TeamDelete)",
25
- "passed": true,
26
- "evidence": "Agent output: 'TeamDelete is called unconditionally (success or failure), with 30-second wait'"
27
- }
28
- ],
29
- "summary": { "passed": 5, "failed": 0, "total": 5, "pass_rate": 1.0 }
30
- }
@@ -1,316 +0,0 @@
1
- # tfx-multi Routing Analysis
2
-
3
- ## Input
4
- ```
5
- /tfx-multi 인증 리팩터링 + UI 개선 + 보안 리뷰
6
- ```
7
-
8
- ---
9
-
10
- ## Phase 0: Preflight Checks
11
-
12
- **Mode determination:** The input has no `--tmux`, `--psmux`, `--agents`, or `N:agent` prefix, and is not a control command (`status`/`stop`/etc.), so this is **auto mode**.
13
-
14
- **Execution order (auto mode):** Phase 0 (preflight) and Phase 2 (triage) run **simultaneously in parallel** (NOT sequentially). Phase 3 starts only after both complete.
15
-
16
- **Single combined Bash check:**
17
- ```bash
18
- Bash({
19
- command: "curl -sf http://127.0.0.1:27888/status >/dev/null && test -f ~/.claude/scripts/tfx-route.sh && echo \"preflight: ok\" || echo \"preflight: FAIL\""
20
- })
21
- ```
22
-
23
- **What is verified:**
24
- - Hub is running and healthy at `http://127.0.0.1:27888/status` (`/status` endpoint — `/health` alone is forbidden)
25
- - `~/.claude/scripts/tfx-route.sh` exists on disk
26
-
27
- **Output policy:** Only a single summary line is shown to the user (e.g., `preflight: ok (route/hub)`). No individual Bash logs are surfaced unless preflight fails.
28
-
29
- **Failure actions (only if preflight fails):**
30
- - `tfx-route.sh` missing → advise user to run `tfx setup`
31
- - Hub not running/unhealthy → surface Hub error detail
32
- - Required CLI not installed → surface missing CLI detail
33
-
34
- ---
35
-
36
- ## Phase 1: Input Parsing
37
-
38
- **Raw input:** `"인증 리팩터링 + UI 개선 + 보안 리뷰"`
39
-
40
- **Parse results:**
41
- - No `--tmux` / `--psmux` flag → NOT routed to Phase 3-mux
42
- - No `--agents` flag
43
- - No `N:agent_type` prefix (e.g., `3:codex`)
44
- - Not a control command (`status`, `stop`, `kill`, `attach`, `list`, `send`)
45
- - Input string is non-empty → no prompt to user required
46
- - No `--thorough` flag → **`--quick` mode (default)**; Phase 2.5, 2.6, 3.5, 3.6, 3.7 are all SKIPPED
47
-
48
- **Determined mode:** Auto mode, `--quick`
49
-
50
- ---
51
-
52
- ## Phase 2: Triage — Decomposition
53
-
54
- ### Step 2a: Codex Classification
55
-
56
- ```bash
57
- Bash({
58
- command: "codex exec --full-auto --skip-git-repo-check '다음 작업을 분석하고 각 부분에 적합한 agent를 분류하라.\n\n agent 선택:\n - codex: 코드 구현/수정/분석/리뷰/디버깅/설계 (기본값)\n - gemini: 문서/UI/디자인/멀티모달\n - claude: 코드베이스 탐색/테스트 실행/검증 (최후 수단)\n\n 모든 역할은 Codex/Gemini 우선 배정:\n - explore, verifier, test-engineer, qa-tester 포함 전 역할이 Codex/Gemini로 라우팅\n - Codex/Gemini 미설치 시에만 claude-native(sonnet/haiku) fallback\n - claude 타입은 최후 수단으로만 사용\n\n 작업: 인증 리팩터링 + UI 개선 + 보안 리뷰\n\n JSON만 출력:\n { \"parts\": [{ \"description\": \"...\", \"agent\": \"codex|gemini|claude\" }] }\n'"
59
- })
60
- ```
61
-
62
- **Expected Codex classification output (JSON):**
63
- ```json
64
- {
65
- "parts": [
66
- { "description": "인증 리팩터링", "agent": "codex" },
67
- { "description": "UI 개선", "agent": "gemini" },
68
- { "description": "보안 리뷰", "agent": "codex" }
69
- ]
70
- }
71
- ```
72
-
73
- Rationale per the skill's agent selection rules:
74
- - "인증 리팩터링" → code refactoring → `codex` (executor)
75
- - "UI 개선" → UI/design → `gemini` (designer)
76
- - "보안 리뷰" → code review/analysis → `codex` (reviewer)
77
-
78
- If Codex classification fails, the Lead (Opus) directly classifies and decomposes inline with the same result.
79
-
80
- ### Step 2b: Inline Decomposition
81
-
82
- ```javascript
83
- assignments = [
84
- { cli: "codex", subtask: "인증 리팩터링", role: "executor" },
85
- { cli: "gemini", subtask: "UI 개선", role: "designer" },
86
- { cli: "codex", subtask: "보안 리뷰", role: "reviewer" }
87
- ]
88
- ```
89
-
90
- **Note:** Phase 2.5 (Plan) and Phase 2.6 (PRD) are SKIPPED because `--thorough` was NOT specified.
91
-
92
- ---
93
-
94
- ## Phase 3: Native Teams Execution
95
-
96
- ### Step 3a: TeamCreate
97
-
98
- ```
99
- teamName = "tfx-" + Date.now().toString(36).slice(-6)
100
- // Example: "tfx-m3x9pq"
101
- ```
102
-
103
- ```javascript
104
- TeamCreate({
105
- team_name: "tfx-m3x9pq",
106
- description: "tfx-multi: 인증 리팩터링 + UI 개선 + 보안 리뷰"
107
- })
108
- ```
109
-
110
- ### Step 3b: TaskCreate (3 tasks, one per subtask)
111
-
112
- **Task 1:**
113
- ```javascript
114
- TaskCreate({
115
- subject: "인증 리팩터링",
116
- description: "CLI: codex, 역할: executor\n\n인증 관련 코드를 리팩터링한다.",
117
- metadata: { cli: "codex", role: "executor" }
118
- })
119
- // → taskId: <task-id-1>
120
- // → agentName: "codex-worker-1"
121
- ```
122
-
123
- **Task 2:**
124
- ```javascript
125
- TaskCreate({
126
- subject: "UI 개선",
127
- description: "CLI: gemini, 역할: designer\n\nUI를 개선한다.",
128
- metadata: { cli: "gemini", role: "designer" }
129
- })
130
- // → taskId: <task-id-2>
131
- // → agentName: "gemini-worker-1"
132
- ```
133
-
134
- **Task 3:**
135
- ```javascript
136
- TaskCreate({
137
- subject: "보안 리뷰",
138
- description: "CLI: codex, 역할: reviewer\n\n보안 관련 코드 리뷰를 수행한다.",
139
- metadata: { cli: "codex", role: "reviewer" }
140
- })
141
- // → taskId: <task-id-3>
142
- // → agentName: "codex-worker-2"
143
- ```
144
-
145
- **runQueue after 3b:**
146
- ```javascript
147
- runQueue = [
148
- { taskId: "<task-id-1>", agentName: "codex-worker-1", cli: "codex", subtask: "인증 리팩터링", role: "executor" },
149
- { taskId: "<task-id-2>", agentName: "gemini-worker-1", cli: "gemini", subtask: "UI 개선", role: "designer" },
150
- { taskId: "<task-id-3>", agentName: "codex-worker-2", cli: "codex", subtask: "보안 리뷰", role: "reviewer" }
151
- ]
152
- ```
153
-
154
- ### Step 3c: Agent Slim-Wrapper Spawn (codex and gemini items)
155
-
156
- All three items use `cli: "codex"` or `cli: "gemini"`, so ALL THREE get slim-wrapper Agents (none are `cli: "claude"`).
157
-
158
- The prompt for each is generated by `buildSlimWrapperPrompt()` in `hub/team/native.mjs`. The wrapper's core behavior:
159
- 1. `TaskUpdate(taskId, status: in_progress)` — claim
160
- 2. `SendMessage(to: "team-lead", "작업 시작: {agentName}")` — start report (creates turn boundary)
161
- 3. `Bash(command: "bash ~/.claude/scripts/tfx-route.sh {role} '{subtask}' {mcp_profile}", timeout: {bashTimeoutMs})` — delegate to tfx-route.sh
162
- 4. `SendMessage(to: "team-lead", "결과: {요약}")` — result report (creates turn boundary)
163
- 5. Await lead feedback; loop back to step 3 if further instructions received
164
- 6. Final: `TaskUpdate(status: completed, metadata: {result: "success"|"failed"})` + `SendMessage` → exit
165
-
166
- **Bash timeout calculation (from `getRouteTimeout`):**
167
- - `executor` role → default 1080 seconds + 60 buffer = **1140 seconds = 1,140,000 ms**
168
- - `designer` role → default 1080 seconds + 60 buffer = **1140 seconds = 1,140,000 ms**
169
- - `reviewer` role → maps to `review` profile → **3600 seconds + 60 buffer = 3,660,000 ms**
170
-
171
- **Agent call 1 — codex-worker-1:**
172
- ```javascript
173
- Agent({
174
- name: "codex-worker-1",
175
- team_name: "tfx-m3x9pq",
176
- mode: "bypassPermissions",
177
- run_in_background: true,
178
- prompt: buildSlimWrapperPrompt("codex", {
179
- subtask: "인증 리팩터링",
180
- role: "executor",
181
- teamName: "tfx-m3x9pq",
182
- taskId: "<task-id-1>",
183
- agentName: "codex-worker-1",
184
- leadName: "team-lead",
185
- mcp_profile: <resolved_mcp_profile>
186
- })
187
- // Internal Bash: "bash ~/.claude/scripts/tfx-route.sh executor '인증 리팩터링' <mcp_profile>"
188
- // Bash timeout: 1,140,000 ms
189
- })
190
- ```
191
-
192
- **Agent call 2 — gemini-worker-1:**
193
- ```javascript
194
- Agent({
195
- name: "gemini-worker-1",
196
- team_name: "tfx-m3x9pq",
197
- mode: "bypassPermissions",
198
- run_in_background: true,
199
- prompt: buildSlimWrapperPrompt("gemini", {
200
- subtask: "UI 개선",
201
- role: "designer",
202
- teamName: "tfx-m3x9pq",
203
- taskId: "<task-id-2>",
204
- agentName: "gemini-worker-1",
205
- leadName: "team-lead",
206
- mcp_profile: <resolved_mcp_profile>
207
- })
208
- // Internal Bash: "bash ~/.claude/scripts/tfx-route.sh designer 'UI 개선' <mcp_profile>"
209
- // Bash timeout: 1,140,000 ms
210
- })
211
- ```
212
-
213
- **Agent call 3 — codex-worker-2:**
214
- ```javascript
215
- Agent({
216
- name: "codex-worker-2",
217
- team_name: "tfx-m3x9pq",
218
- mode: "bypassPermissions",
219
- run_in_background: true,
220
- prompt: buildSlimWrapperPrompt("codex", {
221
- subtask: "보안 리뷰",
222
- role: "reviewer",
223
- teamName: "tfx-m3x9pq",
224
- taskId: "<task-id-3>",
225
- agentName: "codex-worker-2",
226
- leadName: "team-lead",
227
- mcp_profile: <resolved_mcp_profile>
228
- })
229
- // Internal Bash: "bash ~/.claude/scripts/tfx-route.sh reviewer '보안 리뷰' <mcp_profile>"
230
- // Bash timeout: 3,660,000 ms
231
- })
232
- ```
233
-
234
- **`mode: "bypassPermissions"` — YES, included in all three Agent calls.** This is mandatory per the skill definition; without it workers would pause awaiting user approval on every Bash call.
235
-
236
- **`tfx-route.sh` usage — YES.** Workers call `bash ~/.claude/scripts/tfx-route.sh`, never `codex exec ...` or `gemini -y -p ...` directly. Direct calls are explicitly forbidden by the skill.
237
-
238
- ### Step 3d: claude-type Agent — NOT APPLICABLE
239
-
240
- None of the three subtasks were classified as `cli: "claude"`, so Step 3d is skipped entirely.
241
-
242
- ### Step 3e: User Notification
243
-
244
- ```
245
- 팀 'tfx-m3x9pq' 생성 완료.
246
- Codex/Gemini 워커가 슬림 래퍼 Agent로 네비게이션에 등록되었습니다.
247
- Shift+Down으로 다음 워커로 전환 (마지막→리드 wrap). Shift+Tab으로 이전 워커 전환.
248
- ```
249
-
250
- ---
251
-
252
- ## Phase 4: Result Collection
253
-
254
- 1. Lead waits for all three background Agent processes to complete.
255
- 2. Query `team_task_list` as the **single truth source**:
256
-
257
- ```bash
258
- Bash({
259
- command: "node hub/bridge.mjs team-task-list --team tfx-m3x9pq"
260
- })
261
- ```
262
-
263
- 3. For any task where status is `completed` but `metadata.result == "failed"`: trigger Claude fallback retry.
264
- 4. After fallback, re-query `team_task_list` to confirm final state.
265
- 5. `send-message` and `result(task.result)` events are observation channels only; final verdict is always from `team_task_list`.
266
-
267
- **Summary report (example):**
268
- ```markdown
269
- ## tfx-multi 실행 결과
270
-
271
- | # | Worker | CLI | 작업 | 상태 |
272
- |---|----------------|--------|---------------|-----------|
273
- | 1 | codex-worker-1 | codex | 인증 리팩터링 | completed |
274
- | 2 | gemini-worker-1| gemini | UI 개선 | completed |
275
- | 3 | codex-worker-2 | codex | 보안 리뷰 | completed |
276
- ```
277
-
278
- ---
279
-
280
- ## Phase 5: Cleanup (always runs — success or failure)
281
-
282
- 1. Wait up to **30 seconds** for all background Agents to finish.
283
- 2. If any Agent is still running after 30 seconds, proceed with cleanup anyway.
284
- 3. Call `TeamDelete`:
285
-
286
- ```javascript
287
- TeamDelete({
288
- team_name: "tfx-m3x9pq"
289
- })
290
- ```
291
-
292
- 4. If `TeamDelete` fails (active members still present), call `forceCleanupTeam("tfx-m3x9pq")`.
293
- If that also fails, output manual cleanup instructions:
294
- ```
295
- rm -rf ~/.claude/teams/tfx-m3x9pq/ ~/.claude/tasks/tfx-m3x9pq/
296
- ```
297
- 5. Output the final summary report.
298
-
299
- **Reason TeamDelete is mandatory:** Leaving `~/.claude/teams/{teamName}/` on disk causes the OMC hook to repeatedly detect "team executing", creating an infinite loop.
300
-
301
- ---
302
-
303
- ## Key Routing Decisions Summary
304
-
305
- | Question | Answer |
306
- |----------|--------|
307
- | `mode: "bypassPermissions"` in Agent calls? | YES — all three Agent calls include it |
308
- | `tfx-route.sh` used inside Agent wrappers? | YES — `bash ~/.claude/scripts/tfx-route.sh {role} '{subtask}' {mcp_profile}` |
309
- | Direct `codex exec` or `gemini -y -p` calls? | NO — explicitly forbidden |
310
- | Workers use Read/Edit/Write/Grep/Glob tools? | NO — forbidden; all file operations delegated via tfx-route.sh |
311
- | `--thorough` pipeline stages (Phase 2.5, 2.6, 3.5–3.7)? | SKIPPED — `--quick` (default) mode |
312
- | `--tmux`/`--psmux` mode? | NO — not in input |
313
- | Step 3d (claude-type Agent)? | SKIPPED — no subtask has `cli: "claude"` |
314
- | TeamDelete on failure? | YES — Phase 5 is unconditional |
315
- | Preflight and triage run in parallel? | YES — auto mode runs Phase 0 + Phase 2 in parallel |
316
- | Lead directly calling Codex/Gemini Bash? | NO — Lead spawns Agent wrappers; wrappers call tfx-route.sh |
@@ -1,5 +0,0 @@
1
- {
2
- "total_tokens": 26140,
3
- "duration_ms": 100578,
4
- "total_duration_seconds": 100.6
5
- }
@@ -1,30 +0,0 @@
1
- {
2
- "expectations": [
3
- {
4
- "text": "Creates exactly one TeamCreate with tfx- prefix naming",
5
- "passed": true,
6
- "evidence": "Agent output: TeamCreate({ team_name: 'tfx-<6-char-base36>' })"
7
- },
8
- {
9
- "text": "Creates 3 TaskCreate calls (one per subtask)",
10
- "passed": true,
11
- "evidence": "Agent output: '3x TaskCreate(...) with metadata: { cli, role }'"
12
- },
13
- {
14
- "text": "Spawns 3 Agent wrappers with mode: bypassPermissions",
15
- "passed": true,
16
- "evidence": "Agent output: '3x Agent({ mode: bypassPermissions, run_in_background: true })'"
17
- },
18
- {
19
- "text": "Uses tfx-route.sh inside Agent wrapper (not direct codex/gemini)",
20
- "passed": true,
21
- "evidence": "Agent output: 'Each wrapper executes bash ~/.claude/scripts/tfx-route.sh. Direct codex exec or gemini -y -p calls are prohibited.'"
22
- },
23
- {
24
- "text": "Includes Phase 5 cleanup (TeamDelete)",
25
- "passed": true,
26
- "evidence": "Agent output: 'Phase 5: TeamDelete() always runs regardless of success/failure, with max 30s wait'"
27
- }
28
- ],
29
- "summary": { "passed": 5, "failed": 0, "total": 5, "pass_rate": 1.0 }
30
- }