triflux 10.50.2 → 10.52.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.
Files changed (263) hide show
  1. package/CLAUDE.md +57 -41
  2. package/README.ko.md +41 -45
  3. package/README.md +41 -45
  4. package/adapters/codex/skills/tfx-live/SKILL.md +25 -11
  5. package/bin/tfx-live.mjs +341 -104
  6. package/bin/triflux.mjs +147 -2624
  7. package/config/mcp-registry.json +3 -12
  8. package/cto/brief.mjs +0 -20
  9. package/cto/collect.mjs +1 -200
  10. package/cto/current.schema.json +2 -23
  11. package/cto/hygiene.mjs +2 -61
  12. package/cto/lake-root.mjs +0 -56
  13. package/cto/status.mjs +5 -187
  14. package/hooks/agy-session-hook.mjs +11 -56
  15. package/hooks/codex-session-hook.mjs +11 -101
  16. package/hub/bridge.mjs +65 -1250
  17. package/hub/cli-adapter-base.mjs +12 -90
  18. package/hub/codex-adapter.mjs +0 -1
  19. package/hub/codex-preflight.mjs +5 -28
  20. package/hub/lib/process-utils.mjs +1 -156
  21. package/hub/lib/spawn-trace.mjs +3 -2
  22. package/hub/lib/timeout-defaults.mjs +0 -1
  23. package/hub/team/agent-map.json +0 -1
  24. package/hub/team/agents-row-attach.py +120 -0
  25. package/hub/team/agents-row.mjs +200 -0
  26. package/hub/team/ansi.mjs +1 -35
  27. package/hub/team/backend.mjs +9 -145
  28. package/hub/team/claude-daemon-control.mjs +1 -2
  29. package/hub/team/claude-session-projection.mjs +5 -73
  30. package/hub/team/cli/commands/attach.mjs +1 -17
  31. package/hub/team/cli/commands/control.mjs +12 -38
  32. package/hub/team/cli/commands/debug.mjs +2 -39
  33. package/hub/team/cli/commands/focus.mjs +5 -31
  34. package/hub/team/cli/commands/interrupt.mjs +6 -25
  35. package/hub/team/cli/commands/kill.mjs +1 -30
  36. package/hub/team/cli/commands/list.mjs +0 -16
  37. package/hub/team/cli/commands/send.mjs +6 -26
  38. package/hub/team/cli/commands/start/index.mjs +42 -133
  39. package/hub/team/cli/commands/start/parse-args.mjs +15 -40
  40. package/hub/team/cli/commands/start/start-headless.mjs +138 -105
  41. package/hub/team/cli/commands/start/start-mux.mjs +2 -7
  42. package/hub/team/cli/commands/status.mjs +2 -57
  43. package/hub/team/cli/commands/stop.mjs +14 -19
  44. package/hub/team/cli/help.mjs +4 -5
  45. package/hub/team/cli/manifest.mjs +5 -1
  46. package/hub/team/cli/render.mjs +0 -12
  47. package/hub/team/cli/services/runtime-mode.mjs +27 -98
  48. package/hub/team/cli/services/state-store.mjs +5 -20
  49. package/hub/team/codex-queue.mjs +385 -0
  50. package/hub/team/handoff.mjs +3 -34
  51. package/hub/team/headless.mjs +108 -1296
  52. package/hub/team/orchestrator.mjs +4 -30
  53. package/hub/team/pane.mjs +6 -28
  54. package/hub/team/psmux.mjs +3 -34
  55. package/hub/team/remote-session.mjs +1 -2
  56. package/hub/team/session-context.mjs +1 -1
  57. package/hub/team/session.mjs +7 -91
  58. package/hub/team/tui-core.mjs +1 -1
  59. package/hub/team/tui-viewer.mjs +11 -58
  60. package/hub/team/tui.mjs +8 -306
  61. package/hub/team/uds-orchestrator.mjs +2 -580
  62. package/hub/team/wt-manager.mjs +2 -2
  63. package/hub/workers/factory.mjs +6 -84
  64. package/hub/workers/interface.mjs +1 -7
  65. package/hub/workers/lib/jsonrpc-core.mjs +11 -0
  66. package/hub/workers/lib/jsonrpc-ws-uds.mjs +5 -8
  67. package/hud/cli-policy.mjs +0 -22
  68. package/hud/constants.mjs +13 -26
  69. package/hud/hud-qos-status.mjs +42 -54
  70. package/hud/providers/gemini.mjs +125 -20
  71. package/hud/renderers.mjs +101 -122
  72. package/hud/utils.mjs +10 -6
  73. package/package.json +7 -12
  74. package/scripts/__tests__/mcp-guard-engine-http-headers.test.mjs +6 -6
  75. package/scripts/__tests__/mcp-guard-engine-policy-sync.test.mjs +1 -4
  76. package/scripts/__tests__/mcp-guard-engine-proactive-sync.test.mjs +16 -21
  77. package/scripts/__tests__/mcp-guard-engine-stdio-sync.test.mjs +1 -1
  78. package/scripts/__tests__/mcp-guard-engine-sync-http-headers.test.mjs +2 -2
  79. package/scripts/__tests__/mcp-guard-engine.test.mjs +56 -63
  80. package/scripts/__tests__/spawn-trace.test.mjs +16 -0
  81. package/scripts/check-codex-config-stable.mjs +4 -37
  82. package/scripts/claude-login-detect.mjs +0 -1
  83. package/scripts/claudemd-sync.mjs +1 -28
  84. package/scripts/lib/agent-route-policy.mjs +143 -62
  85. package/scripts/lib/cli-claude.mjs +0 -14
  86. package/scripts/lib/env-probe.mjs +2 -131
  87. package/scripts/lib/gemini-profiles.mjs +2 -69
  88. package/scripts/lib/legacy-mcp-cleanup.mjs +283 -0
  89. package/scripts/lib/machine-profile.mjs +3 -17
  90. package/scripts/lib/mcp-filter.mjs +109 -53
  91. package/scripts/lib/mcp-guard-engine.mjs +40 -98
  92. package/scripts/lib/mcp-health.mjs +2 -2
  93. package/scripts/lib/mcp-server-catalog.mjs +2 -2
  94. package/scripts/lib/psmux-info.mjs +11 -59
  95. package/scripts/lib/session-presence.mjs +2 -100
  96. package/scripts/lib/skill-template.mjs +0 -245
  97. package/scripts/pack.mjs +8 -83
  98. package/scripts/preflight-cache.mjs +5 -18
  99. package/scripts/release/check-packages-mirror.mjs +2 -8
  100. package/scripts/release/version-manifest.json +9 -1
  101. package/scripts/setup.mjs +100 -417
  102. package/scripts/test-lock.mjs +0 -1
  103. package/scripts/tfx-route-post.mjs +5 -69
  104. package/scripts/tfx-route-worker.mjs +4 -79
  105. package/scripts/tfx-route.sh +169 -1495
  106. package/scripts/wt-cli.mjs +1 -2
  107. package/skills/tfx-auto/SKILL.md +123 -741
  108. package/skills/tfx-auto/references/consensus-schema.md +161 -0
  109. package/skills/tfx-auto/references/tmux-observation.md +97 -0
  110. package/skills/tfx-doctor/SKILL.md +5 -6
  111. package/skills/tfx-lead/SKILL.md +195 -0
  112. package/skills/tfx-live/SKILL.md +25 -11
  113. package/skills/tfx-remote/SKILL.md +24 -87
  114. package/skills/tfx-research/SKILL.md +13 -20
  115. package/skills/tfx-review/SKILL.md +33 -35
  116. package/skills/tfx-setup/SKILL.md +1 -1
  117. package/skills/tfx-ship/SKILL.md +6 -27
  118. package/skills/tfx-wt/SKILL.md +34 -68
  119. package/bin/tfx-doctor-tui.mjs +0 -7
  120. package/bin/tfx-setup-tui.mjs +0 -7
  121. package/config/routing-policy.json +0 -124
  122. package/docs/assets/consensus-flow.svg +0 -125
  123. package/docs/assets/deep-vs-light.svg +0 -193
  124. package/docs/assets/demo-dark.gif +0 -0
  125. package/docs/assets/demo-light.gif +0 -0
  126. package/docs/assets/demo-psmux.gif +0 -0
  127. package/hub/adaptive-diagnostic.mjs +0 -350
  128. package/hub/adaptive-inject.mjs +0 -224
  129. package/hub/adaptive-memory.mjs +0 -277
  130. package/hub/adaptive.mjs +0 -172
  131. package/hub/assign-callbacks.mjs +0 -170
  132. package/hub/delegator/contracts.mjs +0 -38
  133. package/hub/delegator/index.mjs +0 -14
  134. package/hub/delegator/schema/delegator-tools.schema.json +0 -250
  135. package/hub/delegator/service.mjs +0 -336
  136. package/hub/delegator/tool-definitions.mjs +0 -35
  137. package/hub/dynamic-routing-engine.mjs +0 -511
  138. package/hub/hitl.mjs +0 -202
  139. package/hub/hub-lifecycle.mjs +0 -248
  140. package/hub/lib/known-errors.json +0 -72
  141. package/hub/lib/memory-store.mjs +0 -1001
  142. package/hub/lib/phase-manager.mjs +0 -493
  143. package/hub/lib/risk-tier.mjs +0 -53
  144. package/hub/lib/ssh-command.mjs +0 -231
  145. package/hub/lib/staged-file-detect.mjs +0 -43
  146. package/hub/lib/state-snapshot.mjs +0 -293
  147. package/hub/lib/tfx-route-args.mjs +0 -353
  148. package/hub/lib/trace-recorder.mjs +0 -153
  149. package/hub/lib/uuidv7.mjs +0 -45
  150. package/hub/memory-doctor.mjs +0 -640
  151. package/hub/middleware/quota-middleware.mjs +0 -70
  152. package/hub/middleware/request-logger.mjs +0 -191
  153. package/hub/paths.mjs +0 -24
  154. package/hub/pipe.mjs +0 -825
  155. package/hub/pipeline/index.mjs +0 -163
  156. package/hub/pipeline/state.mjs +0 -191
  157. package/hub/pipeline/transitions.mjs +0 -131
  158. package/hub/promote-penalties.mjs +0 -138
  159. package/hub/public/dashboard.html +0 -416
  160. package/hub/reflexion.mjs +0 -290
  161. package/hub/role-contract.mjs +0 -314
  162. package/hub/router.mjs +0 -2026
  163. package/hub/routing-snapshot.mjs +0 -261
  164. package/hub/schema.sql +0 -209
  165. package/hub/server.mjs +0 -3048
  166. package/hub/session-fingerprint.mjs +0 -418
  167. package/hub/state.mjs +0 -300
  168. package/hub/store-adapter.mjs +0 -182
  169. package/hub/store.mjs +0 -1736
  170. package/hub/team/build-worker-prompt.mjs +0 -92
  171. package/hub/team/check-mcp-hub.mjs +0 -49
  172. package/hub/team/claude-native-bridge.mjs +0 -987
  173. package/hub/team/cli/commands/start/start-in-process.mjs +0 -50
  174. package/hub/team/cli/commands/start/start-wt.mjs +0 -86
  175. package/hub/team/cli/services/hub-client.mjs +0 -264
  176. package/hub/team/cli/services/native-control.mjs +0 -145
  177. package/hub/team/codex-review.mjs +0 -520
  178. package/hub/team/conductor-mesh-bridge.mjs +0 -122
  179. package/hub/team/conductor-registry.mjs +0 -121
  180. package/hub/team/conductor.mjs +0 -1529
  181. package/hub/team/consensus-meta.mjs +0 -176
  182. package/hub/team/cto-auto-collect.mjs +0 -115
  183. package/hub/team/cto-pull.mjs +0 -31
  184. package/hub/team/daemon-pty-tmux-bridge.mjs +0 -146
  185. package/hub/team/dashboard.mjs +0 -322
  186. package/hub/team/event-log.mjs +0 -84
  187. package/hub/team/execution-mode.mjs +0 -324
  188. package/hub/team/extract-completion-payload.mjs +0 -110
  189. package/hub/team/headless-bridge-session.mjs +0 -17
  190. package/hub/team/health-probe.mjs +0 -435
  191. package/hub/team/interactive-native-launcher.mjs +0 -119
  192. package/hub/team/interactive-native-worker.mjs +0 -80
  193. package/hub/team/interactive-tui-transport.mjs +0 -479
  194. package/hub/team/launcher-template.mjs +0 -144
  195. package/hub/team/lead-control.mjs +0 -191
  196. package/hub/team/mcp-selector.mjs +0 -145
  197. package/hub/team/native-supervisor.mjs +0 -460
  198. package/hub/team/native.mjs +0 -727
  199. package/hub/team/recovery-store.mjs +0 -149
  200. package/hub/team/remote-probe.mjs +0 -292
  201. package/hub/team/remote-watcher.mjs +0 -506
  202. package/hub/team/runtime-strategy.mjs +0 -200
  203. package/hub/team/schemas/worker-completion.json +0 -39
  204. package/hub/team/sentinel-capture.mjs +0 -127
  205. package/hub/team/session-sync.mjs +0 -316
  206. package/hub/team/swarm-cli.mjs +0 -390
  207. package/hub/team/swarm-hypervisor.mjs +0 -2206
  208. package/hub/team/swarm-intent.mjs +0 -216
  209. package/hub/team/swarm-locks.mjs +0 -335
  210. package/hub/team/swarm-planner.mjs +0 -371
  211. package/hub/team/swarm-preflight.mjs +0 -366
  212. package/hub/team/swarm-reconciler.mjs +0 -242
  213. package/hub/team/synapse-cli.mjs +0 -458
  214. package/hub/team/synapse-http.mjs +0 -311
  215. package/hub/team/synapse-registry.mjs +0 -618
  216. package/hub/team/tui-remote-adapter.mjs +0 -377
  217. package/hub/team/tui-synapse.mjs +0 -223
  218. package/hub/team/worker-completion-validator.mjs +0 -79
  219. package/hub/team/worker-sandbox.mjs +0 -125
  220. package/hub/team/worktree-lifecycle.mjs +0 -639
  221. package/hub/team/wt-templates.json +0 -43
  222. package/hub/team-bridge.mjs +0 -27
  223. package/hub/tools.mjs +0 -900
  224. package/hub/workers/antigravity-route-worker.mjs +0 -179
  225. package/hub/workers/codex-app-server-worker.mjs +0 -1067
  226. package/hub/workers/delegator-mcp.mjs +0 -1098
  227. package/hub/workers/lib/jsonrpc-stdio.mjs +0 -204
  228. package/mesh/index.mjs +0 -69
  229. package/mesh/mesh-budget.mjs +0 -137
  230. package/mesh/mesh-heartbeat.mjs +0 -100
  231. package/mesh/mesh-protocol.mjs +0 -96
  232. package/mesh/mesh-queue.mjs +0 -163
  233. package/mesh/mesh-registry.mjs +0 -78
  234. package/mesh/mesh-router.mjs +0 -77
  235. package/scripts/__tests__/skill-surface.test.mjs +0 -93
  236. package/scripts/cache-doctor.mjs +0 -156
  237. package/scripts/cache-warmup.mjs +0 -630
  238. package/scripts/completions/tfx.bash +0 -74
  239. package/scripts/completions/tfx.fish +0 -57
  240. package/scripts/completions/tfx.zsh +0 -98
  241. package/scripts/demo.mjs +0 -197
  242. package/scripts/doctor-dynamic-routing.mjs +0 -87
  243. package/scripts/hub-ensure.mjs +0 -842
  244. package/scripts/hub-watchdog.mjs +0 -90
  245. package/scripts/lib/claudemd-scanner.mjs +0 -223
  246. package/scripts/lib/context.mjs +0 -67
  247. package/scripts/lib/dynamic-route-cli.mjs +0 -107
  248. package/scripts/lib/handoff.mjs +0 -187
  249. package/scripts/lib/logger.mjs +0 -122
  250. package/scripts/lib/stealth-fetch.mjs +0 -176
  251. package/scripts/notion-read.mjs +0 -686
  252. package/scripts/snapshot-codex-state.mjs +0 -37
  253. package/scripts/snapshot-gemini-state.mjs +0 -37
  254. package/scripts/sync-codex-auth.mjs +0 -71
  255. package/scripts/sync-hub-mcp-settings.mjs +0 -697
  256. package/skills/_templates/base.md +0 -4
  257. package/skills/_templates/deep.md +0 -6
  258. package/skills/shared/telemetry-segment.md +0 -6
  259. package/tui/core.mjs +0 -266
  260. package/tui/doctor.mjs +0 -375
  261. package/tui/monitor-data.mjs +0 -152
  262. package/tui/monitor.mjs +0 -318
  263. package/tui/setup.mjs +0 -506
package/CLAUDE.md CHANGED
@@ -1,20 +1,25 @@
1
- # triflux — Claude Code 운영 가이드
1
+ # triflux Claude Code 운영 가이드
2
2
 
3
3
  <core-systems>
4
- ## 핵심 스킬 시스템 (항상 인지)
4
+ ## 스킬 시스템
5
5
 
6
6
  이 프로젝트는 3개의 스킬 시스템을 동시에 사용한다. 어떤 작업이든 해당 시스템의 스킬이 있는지 먼저 확인한다.
7
7
 
8
8
  | 시스템 | 접두사 | 용도 | 스킬 수 |
9
9
  |--------|--------|------|---------|
10
- | **triflux** | `/tfx-*` | CLI 라우팅·다중 모델 조정·스웜·원격 실행 | ~40개 |
10
+ | **triflux** | `/tfx-*` | CLI 라우팅·다중 모델 조정·원격 실행 | 10개 |
11
11
  | **gstack** | `/` (접두사 없음) | QA·출시·조사·설계·검토·점검 지점 | ~35개 |
12
12
  | **omc** | `/oh-my-claudecode:*` | autopilot·ralph·team·execute·ultragoal | ~37개 |
13
13
 
14
- 스킬을 모르면 자연어 라우팅(`.claude/rules/tfx-routing.md`)으로 자동 매핑된다.
15
- 세션 종료 전 메모리 파일이 3개+ 변경됐으면 `/memory-hygiene` 제안을 검토한다.
14
+ 필요한 스킬은 이름으로 호출한다.
16
15
  </core-systems>
17
16
 
17
+ <code-principles>
18
+ ## 코드 작성 원칙
19
+
20
+ 코드는 간결하게 쓰고 의미 있는 이름을 쓴다. 주석은 이유만 짧게 한국어로 쓴다. 테스트는 회귀를 막는 핵심 경로만 최소한으로 둔다. 제거 여부는 해당 파일을 끝까지 직접 읽고 판단한다.
21
+ </code-principles>
22
+
18
23
  <psmux-wt>
19
24
  ## psmux/WT 규칙 (Windows 한정)
20
25
 
@@ -28,7 +33,7 @@ macOS/Linux는 플랫폼 보호기가 아무 작업도 하지 않게 처리하
28
33
 
29
34
  위 `<psmux-wt>` 룰셋은 Windows 전용이다. macOS/Linux 환경에서 triflux가 터미널/세션을 다루는 방식.
30
35
 
31
- ### terminal-opener.mjs 3단계 대체 경로(`hub/team/terminal-opener.mjs` 의 `openCommand`)
36
+ ### 터미널 실행 경로
32
37
 
33
38
  `openCommand()` 가 순차 평가하는 분기:
34
39
 
@@ -37,9 +42,9 @@ macOS/Linux는 플랫폼 보호기가 아무 작업도 하지 않게 처리하
37
42
  | 1 | `platform === "win32"` | `wt-manager.createTab` | `hub/team/wt-manager.mjs` |
38
43
  | 2 | `isTmuxLikeMux(mux)` (`detectMultiplexer()` → `getMultiplexerType()`/`hasMultiplexer()`/`hasTmux()`) | `tmux new-window -n <title> <command>` | 셸 직접 호출 |
39
44
  | 3 | `platform === "darwin"` (대체 경로) | `open -a Terminal` | macOS `open` 명령 |
40
- | — | Linux(멀티플렉서 없음) | 미지원(`false` 반환) | — |
45
+ | 없음 | Linux(멀티플렉서 없음) | 미지원(`false` 반환) | 없음 |
41
46
 
42
- ### 별도 mac 매니저 불필요
47
+ ### 터미널 관리 방식
43
48
 
44
49
  | 후보 | 필요성 | 이유 |
45
50
  |------|--------|------|
@@ -47,21 +52,19 @@ macOS/Linux는 플랫폼 보호기가 아무 작업도 하지 않게 처리하
47
52
  | tmux 관리자 | **불필요** | `terminal-opener.mjs`가 `tmux new-window`로 직접 호출한다. |
48
53
  | psmux 관리자 | **이미 있음** | `hub/team/psmux.mjs`가 Windows에서는 psmux, macOS/Linux에서는 tmux를 사용한다. |
49
54
 
50
- 참고 사례: OMC(`oh-my-claudecode`)도 운영체제별 관리자를 만들지 않고 Tmux 관리자·워크트리 관리자·Claude 실행기 세 구성 요소로 정리한다. 이 저장소 결정의 외부 근거가 아니라 비교 참고로만 본다.
51
-
52
- ### 플랫폼 보호기 위치(참고)
55
+ ### 플랫폼 보호기
53
56
 
54
- | 파일 | 줄 | 보호기 |
57
+ | 파일 | 함수 | 보호기 |
55
58
  |------|------|-------|
56
- | `hub/team/wt-manager.mjs` | 199 | `if (platform() !== "win32") return createNonWindowsStubManager();` |
57
- | `hub/team/headless.mjs` | 1725-1726 | `if (process.platform !== "win32") return false;` + `WT_SESSION` 체크 |
58
- | `tfx-route.sh` | 86, 1662, 1681 | `case "$(uname -s)"` 분기 |
59
+ | `hub/team/wt-manager.mjs` | `createWtManager` | `if (platform() !== "win32") return createNonWindowsStubManager();` |
60
+ | `hub/team/headless.mjs` | `autoAttachTerminal` | `if (process.platform !== "win32") return false;` + `WT_SESSION` 체크 |
61
+ | `scripts/tfx-route.sh` | `resolve_machine_profile_path`, `heartbeat_monitor` | `case "$(uname -s)"` 분기 |
59
62
 
60
- mac에서 위 코드가 호출돼도 일찍 반환하므로 실행되지 않는 코드가 동작하지 않는다. **실행되지 않는 문서만 주입되는 것이 남은 불일치다.**
63
+ Windows 전용 경로는 플랫폼과 `WT_SESSION` 조건을 확인한다.
61
64
 
62
- ### macOS 알림(참고)
65
+ ### macOS 알림
63
66
 
64
- `hub/team/notify.mjs:221~234`가 `osascript`로 macOS 기본 알림을 보낸다. 별도 의존성은 없다.
67
+ `hub/team/notify.mjs`의 `sendToast`가 `osascript`로 macOS 기본 알림을 보낸다. 별도 의존성은 없다.
65
68
  </macos-terminal>
66
69
 
67
70
  <codex-config>
@@ -74,25 +77,24 @@ mac에서 위 코드가 호출돼도 일찍 반환하므로 실행되지 않는
74
77
  | `approval_policy` (`on-request` / `never` / granular) | `--dangerously-bypass-approvals-and-sandbox` |
75
78
  | `sandbox_mode` (`read-only` / `workspace-write` / `danger-full-access`) | `-s`, `--sandbox` |
76
79
 
77
- `--full-auto` 는 Codex 0.147 에서 제거됐다. 안전한 방식: `config.toml`에 기본값을 두고 CLI에서는 `--profile`만 선택한다.
80
+ `--full-auto` 는 Codex 0.147 에서 제거되었다. 안전한 방식: `config.toml`에 기본값을 두고 CLI에서는 `--profile`만 선택한다.
78
81
  프로필은 `$CODEX_HOME/<이름>.config.toml` 파일이다(인라인 `[profiles.*]` 아님).
79
82
  </codex-config>
80
83
 
81
84
  <account-broker>
82
85
  ## AccountBroker (계정 브로커)
83
86
 
84
- conductor·headless·swarm-hypervisor가 하나의 AccountBroker 단일 인스턴스를 공유한다.
87
+ headless 워커는 AccountBroker를 사용한다.
85
88
 
86
89
  | 항목 | 설명 |
87
90
  |------|------|
88
- | 계정별 회로 차단기 | 장애 격리 — 한 계정 오류가 다른 계정에 전파되지 않음 |
91
+ | 계정별 회로 차단기 | 장애 격리: 한 계정 오류가 다른 계정에 전파되지 않음 |
89
92
  | 사용 중 플래그 | 동일 계정 이중 임대 방지 |
90
- | `/broker/reload` | 장시간 세션 중 accounts.json을 다시 불러온다. 활성 임대 소유권은 다시 불러온 뒤에도 보존한다. |
93
+ | `reloadBroker()` | accounts.json을 다시 불러온다. 활성 임대 소유권은 다시 불러온 뒤에도 보존한다. 허브가 없어 HTTP 엔드포인트는 없고 모듈 함수로만 부를 수 있다. |
91
94
  | 어댑터의 임대 없음 정책 | headless 어댑터는 브로커가 비활성·비어 있음이면 기본 CLI 인증 경로로 실행하고, 브로커가 활성인데 임대가 없으면 `circuit_open`으로 실패한다. |
92
- | Conductor의 임대 없음 정책 | 로컬 Conductor 세션은 `broker_no_lease`를 이벤트 로그에 남기고 생성을 계속한다. accountId가 없으므로 해제는 호출하지 않는다. |
93
- | 공개 스냅숏 정책 | `/broker/snapshot`과 대시보드는 `publicSnapshot()`만 사용한다. `env`, `authFile`, `profile`, `host`, 파일 경로, 가공하지 않은 실패 시각은 공개하지 않는다. |
94
- | 진단 이벤트 | `securityViolation`, `authSyncError`는 허브가 가린 경고 로그(`broker.security_violation`, `broker.auth_sync_error`)로 처리한다. |
95
- | EventEmitter 이벤트 | `lease`, `release`, `cooldown`, `tierFallback`, `circuitOpen`, `circuitClose`, `noAvailableAccounts` — HUD 연동용 |
95
+ | 공개 스냅숏 정책 | 밖에 보여 줄 때는 `publicSnapshot()`만 쓴다. `env`, `authFile`, `profile`, `host`, 파일 경로, 가공하지 않은 실패 시각은 공개하지 않는다. |
96
+ | 진단 이벤트 | `securityViolation`, `authSyncError`는 이벤트로만 내보낸다. 구독하는 쪽이 없으면 기록되지 않는다. |
97
+ | EventEmitter 이벤트 | `lease`, `release`, `cooldown`, `tierFallback`, `circuitOpen`, `circuitClose`, `noAvailableAccounts`: HUD 연동용 |
96
98
  </account-broker>
97
99
 
98
100
  <remote>
@@ -102,7 +104,6 @@ conductor·headless·swarm-hypervisor가 하나의 AccountBroker 단일 인스
102
104
 
103
105
  | 스킬 | 대상 | 방식 |
104
106
  |------|------|------|
105
- | tfx-swarm | 로컬 worktree + shard `host:` 원격 분배 | PRD별 worktree, 다중 모델·기기 |
106
107
  | tfx-remote | Claude Code 원격 | SSH → Claude Code 세션 → 내부 tfx 라우팅 |
107
108
 
108
109
  Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TTY 문제가 있다.
@@ -137,18 +138,30 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
137
138
  </headless-retrieval>
138
139
 
139
140
  <native-bridge>
141
+ ## 팀 실행 모드
142
+
143
+ `tfx multi`는 tmux/psmux와 headless를 지원한다. in-process와 WT 팀 모드는 지원하지 않는다.
144
+ headless 워커도 tmux/psmux 방에서 돈다. 멀티플렉서가 없으면 모드와 관계없이 설치 안내 오류로 끝난다.
145
+ Windows Terminal의 독립 탭 열기는 유지한다.
146
+
140
147
  ## 기본 연결 UI(`claude agents` 노출)
141
148
 
142
- 비대화식 워커는 기본적으로 `claude agents` 패널에 행으로 나타난다. 제외하려면 `--no-native-bridge-ui`를 쓴다.
149
+ 워커는 tmux 방에서 돌고, `claude agents` 행은 그 방에 붙는 attach client다. 행에서 Enter를 누르면
150
+ 워커가 도는 tmux pane이 열린다. 행은 공식 `claude --bg --exec`로 만든다(macOS/Linux).
151
+
152
+ | 대상 | 기본값 | 행에서 할 수 있는 것 |
153
+ |------|--------|----------------------|
154
+ | `tfx-auto` / `tfx multi` headless 워커 | 켬, `--no-native-bridge-ui`로 끔 | 읽기 전용 관찰 |
155
+ | `tfx-live start` 로 띄운 Claude 외 세션 | 켬 | 입력 가능. python3가 없으면 읽기 전용이고 행 이름에 `[read-only]`가 붙음 |
156
+ | 대화형 `tfx multi`(tmux/psmux) | 끔 | 해당 없음 |
143
157
 
144
- | 모드 | 기본값 | 행이 보이는 위치 |
145
- |------|---------|--------------------|
146
- | `tfx-auto` / `tfx multi`(비대화식) | 켬 | 로컬 `claude agents` |
147
- | `tfx swarm` 로컬 조각 | 켬 | 로컬 `claude agents`(`Triflux swarm <shard-name>`) |
148
- | `tfx swarm` 원격 조각 | **건너뛰고 경고** | 해당 없음 — `registerSwarmShard()`가 host!=local일 때 `{ ok: true, skipped: true }`를 반환하고 `"remote launcher must register on that host"`만 경고한다. 원격 데몬 실제 등록은 후속 PRD다. |
149
- | 대화식(tmux/wt) | 끔 | 해당 없음 |
158
+ - 행을 닫거나 Ctrl+Z로 목록에 돌아가도 워커는 계속 돈다.
159
+ - headless 워커 여럿이 한 방을 나눠 쓰면 행마다 방 전체가 보이고, 활성 pane은 행끼리 공유한다.
160
+ - 방이 사라지면 행이 스스로 지워진다. headless 실행은 끝날 때 자기가 연 행을 직접 지운다.
161
+ - 바깥 터미널의 질의 응답이 방 입력으로 새지 않게, 읽기 전용 attach 또는 `hub/team/agents-row-attach.py` 중계를 쓴다.
162
+ - 행 생성에는 cwd가 Claude에서 trust 된 워크스페이스여야 한다. 실패하면 워커는 그대로 돌고 경고만 남는다.
150
163
 
151
- 감시자가 종료되면 즉시 데몬의 `sendKillBySessionId`를 실행해 오래된 행을 남기지 않는다. PRD: `.triflux/plans/native-bridge-ui-default-expansion.md`(PR #323으로 병합).
164
+ 근거: [ADR-0026](docs/adr/0026-agents-row-tmux-attach.md).
152
165
  </native-bridge>
153
166
 
154
167
  <cross-review>
@@ -176,19 +189,22 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
176
189
 
177
190
  | 파일 | 내용 |
178
191
  |------|------|
179
- | `.claude/rules/tfx-routing.md` | 자연어 → 스킬 라우팅, CLI 라우팅 Layer 1~3, 충돌 해소 |
180
- | `.claude/rules/tfx-execution-skill-map.md` | tfx-auto / multi / swarm 실행 엔진 매핑, 격리 기준, 안티패턴 |
181
- | `.claude/rules/tfx-autoplan-principles.md` | gstack autoplan의 여섯 가지 결정 원칙·단계 우선순위·충돌 해소 규칙 추출본 |
192
+ | `.claude/rules/tfx-execution-skill-map.md` | tfx-auto / multi 실행 경로와 코드 변경 병렬 작업의 worktree 격리 기준 |
182
193
  | `.claude/rules/tfx-update-logic.md` | triflux / OMC / gstack / Codex / Antigravity 업데이트 로직 |
183
194
  | `.claude/rules/tfx-stack-coexistence.md` | gstack / superpowers / triflux 공존 원칙, 레이어 분리, 의존 방향, 충돌 해소 |
184
195
  | `.claude/rules/tfx-mirror-policy.md` | packages/ 3계층 미러 정책(핵심 단순 복사 / 원격 가져오기 변환 / triflux 바이트 동일), 테스트 제외 규칙, 불일치 차단 |
196
+ | `.claude/rules/tfx-cto-hub-boundary.md` | CTO lake 조회 표면과 의존 방향 |
197
+ | `.claude/rules/tfx-doc-governance.md` | 실행 규칙, ADR, 설계, 계획 문서의 배치 |
198
+ | `.claude/rules/tfx-escalation-chain.md` | 자동 재시도와 CLI 전환 체인 |
199
+ | `.claude/rules/tfx-machine-profile.md` | 기기 프로필 우선순위와 실행 정책 |
200
+ | `.claude/rules/tfx-psmux.md` | Windows psmux와 WT 실행 규칙 |
201
+ | `.claude/rules/tfx-routing.md` | 역할별 CLI 라우팅과 직접 호출 제한 |
202
+ | `.claude/rules/tfx-skill-authoring.md` | 스킬 frontmatter, 프로필 표기, 검증 규약 |
185
203
 
186
204
  Claude Code는 `.claude/rules/*.md`를 자동으로 불러온다. Codex CLI는 `@import`를 지원하지 않으므로 필요하면 `AGENTS.md`를 독립적으로 유지한다.
187
205
 
188
206
  ## GBrain
189
207
 
190
- 설정 정본은 `~/Projects/CLAUDE.md` 한 곳이다. 여기 있던 사본은 `engine=pglite` /
191
- `2026-04-25`로 오래되어 전역·Projects 블록과 서로 모순됐다(2026-07-26 제거).
192
- 실제 엔진은 postgres(Supabase), gbrain 0.42.51.0이다.
208
+ 설정 정본은 `~/Projects/CLAUDE.md`다.
193
209
 
194
210
  - 이 저장소 정책: 읽기·쓰기(github.com/tellang/triflux)
package/README.ko.md CHANGED
@@ -24,15 +24,28 @@
24
24
 
25
25
  triflux는 코딩 작업을 Claude, Codex, Antigravity 사이에서 나눠 맡기는 Claude Code 플러그인이자
26
26
  npm CLI다. `/tfx-auto`에 할 일을 한 번 적으면 triflux가 CLI 레인(기본은 Codex)을 고르고, 임의
27
- 셸 명령 대신 관리된 경로로 실행한다. 필요하면 로컬 병렬 워커, worktree로 격리한 스웜,
28
- Claude↔Codex 라이브 세션, 원격 호스트로 작업을 나눈다. 설치, 진단, 로컬 Hub, 팀 실행은 `tfx`
27
+ 셸 명령 대신 관리된 경로로 실행한다. 필요하면 로컬 병렬 워커, Claude↔Codex 라이브 세션, 원격 호스트로 작업을 나눈다.
28
+ 코드 변경을 병렬로 진행할 때는 작업별 worktree와 세션을 분리한다. 설치, 진단, 팀 실행은 `tfx`
29
29
  셸 CLI가 맡는다.
30
30
 
31
31
  ## 설치
32
32
 
33
33
  ```bash
34
34
  npm install -g triflux # postinstall이 setup 스크립트를 실행한다
35
- tfx doctor # CLI, tmux, Hub, MCP, 프로필, 스킬 점검
35
+ tfx doctor # CLI, tmux, MCP, 프로필, 스킬 점검
36
+ ```
37
+
38
+ npm 12 이상은 기본적으로 설치 스크립트를 막는다. setup 스크립트를 허용해 설치한다.
39
+
40
+ ```bash
41
+ npm i -g triflux --allow-scripts=triflux
42
+ ```
43
+
44
+ 기본 setup은 `triflux` 마켓플레이스를 등록하고 mods 설치 안내만 출력한다. 사용량 band와
45
+ 서브에이전트 effort 강제 기능은 따로 설치한다(Claude Code 2.1.287 이상).
46
+
47
+ ```bash
48
+ tfx setup --mods
36
49
  ```
37
50
 
38
51
  이 저장소의 마켓플레이스에서 Claude Code 플러그인으로 설치할 수도 있다.
@@ -52,8 +65,6 @@ claude plugin install triflux@triflux
52
65
  /tfx-auto "마이그레이션 끝내고 검증까지" --mode deep --retry ralph --max-iterations 10
53
66
  ```
54
67
 
55
- 실행하지 않고 라우팅 판정만 보려면 셸에서 `tfx auto "<작업>" --json`을 실행한다.
56
-
57
68
  ## 스킬
58
69
 
59
70
  직접 쓰는 스킬:
@@ -61,10 +72,10 @@ claude plugin install triflux@triflux
61
72
  | 스킬 | 용도 |
62
73
  | --- | --- |
63
74
  | `/tfx-auto` | 구현, 수정, 리뷰, 병렬 작업의 진입점. 동작은 아래 플래그로 정한다. |
64
- | `/tfx-live` | Claude↔Codex 라이브 세션. `start`/`ask`/`stop`, `peer` 중계, `orchestrate`, `list-sessions`. |
65
- | `/tfx-remote` | SSH 너머 원격 Claude Code 세션. `setup`, `spawn`, `list`, `attach`, `send`, `resume`, `probe`, `kill`. |
75
+ | `/tfx-live` | Claude↔Codex 라이브 세션. `start`/`ask`/`wait`/`stop`, `peer` 중계, `list-sessions`. |
76
+ | `/tfx-remote` | SSH 원격 Claude Code 세션 시작, 조회, 재부착, 메시지 전송, 준비 상태 확인, 모니터링, 종료. |
66
77
  | `/tfx-setup` | 대화형 설정. 파일 동기화, HUD, Codex 프로필, MCP, 훅 우선순위. |
67
- | `/tfx-doctor` | 진단과 복구. Hub 시작·중지·상태 확인도 여기서 한다. |
78
+ | `/tfx-doctor` | 진단과 복구. |
68
79
  | `/tfx-ship` | triflux 릴리즈 절차(메인테이너용). |
69
80
  | `/tfx-wt` | Windows Terminal 탭·패인 조작. `tfx setup`은 Windows에만 설치한다. |
70
81
 
@@ -88,13 +99,10 @@ Codex 프로필은 `~/.codex/<프로필>.config.toml`에서 직접 관리한다.
88
99
  | `--shape` | `consensus`, `debate`, `panel` | `--mode consensus`의 결과 형태 |
89
100
  | `--cli` | `auto`, `codex`, `antigravity`, `claude` | CLI 레인 고정 |
90
101
  | `--cli-set` | `triad`, `no-antigravity`, `custom` | 합의 참여자 구성 |
91
- | `--parallel` | `1`, `N`, `swarm` | `N` = 로컬 워커(`tfx multi`), `swarm` = worktree별 PRD 샤드(`tfx swarm`) |
92
- | `--isolation` | `none`, `worktree` | 샤드별 worktree 격리(`swarm`이면 강제) |
93
- | `--remote` | `<host>` | 스웜 샤드를 `hosts.json`의 호스트로 보냄 |
102
+ | `--parallel` | `1`, `N` | `N` = 로컬 워커(`tfx multi`) |
94
103
  | `--retry` | `0`, `1`(기본), `ralph`, `auto-escalate` | `ralph` = 막힘 감지가 있는 재시도 상태 기계, `auto-escalate` = 모델 체인을 한 단계씩 올림 |
95
104
  | `--max-iterations` | `N` | `ralph`/`auto-escalate` 상한(`0`은 무제한) |
96
105
  | `--rounds` | `N`(기본 4) | `--mode live` 왕복 횟수 |
97
- | `--risk-tier` | `auto`, `low`, `medium`, `high` | 변경 범위로 검증 강도를 정함. `--mode`가 있으면 무시 |
98
106
  | `--skill` | `<name>` | `skills/<name>/SKILL.md`를 Codex/Antigravity 프롬프트 앞에 붙임 |
99
107
  | `--no-native-bridge-ui` | | headless 워커를 `claude agents` 패널에 띄우지 않음 |
100
108
 
@@ -124,27 +132,22 @@ Codex는 이름 붙은 프로필로 실행한다. 모델 ID는 `~/.codex/<프로
124
132
  | 명령 | 용도 |
125
133
  | --- | --- |
126
134
  | `tfx setup` / `tfx doctor` | 파일·HUD·MCP·프로필 동기화 / 진단과 복구(`--fix`, `--json`) |
127
- | `tfx auto` | `tfx-auto` 라우팅 판정 미리 보기 |
128
- | `tfx multi` | tmux + Hub 기반 로컬 멀티 CLI 팀 |
129
- | `tfx swarm` | PRD 기반 worktree 격리 실행: `plan`, `preflight`, `run`, `list` |
130
- | `tfx synapse` | 스웜 세션 레지스트리와 lease |
131
- | `tfx hub` | 로컬 Hub: `start`, `stop`, `status`, `ensure` |
135
+ | `tfx multi` | tmux 기반 로컬 멀티 CLI 팀 |
132
136
  | `tfx mcp` | 관리형 MCP 레지스트리: `list`, `sync`, `add`, `remove` |
133
- | `tfx handoff` | 현재 맥락을 다른 세션이나 호스트로 넘길 프롬프트로 묶음 |
134
137
  | `tfx cto` | 저장소 단위 권위 콘솔: `collect`, `status`, `hygiene`(dry-run) |
135
- | `tfx review` / `tfx codex-team` | Codex git diff 리뷰 / Codex 주도 팀 모드 |
136
- | `tfx stealth-fetch <url>` | cloakbrowser로 URL 하나를 가져옴(JSON을 stdout으로) |
137
- | `tfx notion-read`, `tfx why`, `tfx schema`, `tfx list`, `tfx monitor`, `tfx update`, `tfx version` | Notion → Markdown, 커밋 intent 트레일러, CLI 스키마, 설치된 스킬, TUI 모니터, 업데이트, 버전 |
138
+ | `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<지시>"` | 정책에 따라 `codex exec review`로 리뷰 전달 |
139
+ | `tfx list`, `tfx update`, `tfx version` | 설치된 스킬, 업데이트, 버전 |
138
140
  | `tfx-live` | 라이브 세션 브리지(`/tfx-live` 스킬과 같은 명령) |
139
141
 
140
- 정확한 인자는 `tfx <명령> --help`나 `tfx schema <명령>`으로 확인한다.
142
+ 정확한 인자는 `tfx <명령> --help`로 확인한다.
141
143
 
142
144
  ## 런타임 기능
143
145
 
144
146
  **라이브 세션.** `tfx-live`는 Claude Code와 Codex TUI 세션을 조종한다. Claude 데몬 대상
145
147
  (`--short`/`--session-id`)은 UDS를 먼저 시도하고, `--session`도 주면 실패 시 tmux로 넘어간다.
146
- Codex는 tmux를 쓰거나 `--transport uds --thread <id|auto>`로 UDS를 쓴다. `peer`는 두 세션 사이를
147
- `--rounds`만큼 중계하고, `orchestrate`는 한 작업에 Claude와 Codex를 함께 붙인다. triflux의 Codex
148
+ Codex `ask`는 `codex queue`로 메시지를 쌓고(TUI에 `[from <보낸 세션>]` 첫 줄로 보인다) 못 쓰면 이유를
149
+ 남기고 tmux로 보낸다. `--transport uds --thread <id|auto>`로 UDS도 쓸 수 있다. `peer`는 두 세션 사이를
150
+ `--rounds`만큼 중계한다. triflux의 Codex
148
151
  훅이 실행 중인 Codex 세션을 `~/.local/state/triflux/codex-sessions/`에 기록하므로
149
152
  `tfx-live list-sessions --cli codex|claude`로 직접 띄운 tmux 세션도 찾을 수 있다.
150
153
 
@@ -152,10 +155,8 @@ Codex는 tmux를 쓰거나 `--transport uds --thread <id|auto>`로 UDS를 쓴다
152
155
  Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-status`, `--job-wait`,
153
156
  `--job-result`로 확인한다.
154
157
 
155
- **Hub.** 팀, 원격 세션, MCP 도구, 상태 표시를 잇는 로컬 메시지 버스다. 기본으로
156
- `127.0.0.1:27888`에 붙고(`TFX_HUB_PORT`로 변경), `TFX_HUB_TOKEN`이 있으면 bearer 토큰을 요구한다.
157
- `tfx-auto`, `tfx multi`, 로컬 스웜 샤드의 headless 워커는 `claude agents` 패널에 행으로 보인다.
158
- 끄려면 `--no-native-bridge-ui`를 준다.
158
+ **Headless 워커.** `tfx-auto`, `tfx multi`의 headless 워커는 `claude agents` 패널에 행으로 보인다.
159
+ 행에서 Enter를 누르면 그 워커가 도는 tmux pane이 열린다. 끄려면 `--no-native-bridge-ui`를 준다.
159
160
 
160
161
  **재시도와 승격.** `--retry ralph`는 끝나거나 막힐 때(같은 실패 3회 연속)까지 반복한다.
161
162
  `--retry auto-escalate`는 Codex `gpt6_astra_max`에서 Claude `fable`로 올라간다. 체인은
@@ -169,12 +170,13 @@ Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-s
169
170
 
170
171
  **CTO lake.** `tfx cto collect`로 `.triflux/lake/`의 저장소 스냅샷을 갱신하고,
171
172
  `tfx cto status`로 생성 시각과 경과 시간을 확인한다. `tfx cto hygiene --dry-run`는 dry-run 결과를
172
- 보고한다. 트레이와 쓰이지 않는 CTO 운영 명령은 제거했다
173
- ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). 자동 수집은 기본으로 꺼져 있고 `TFX_CTO_AUTO_COLLECT=1` 로 켠다([ADR-0018](docs/adr/0018-cto-auto-behaviors-opt-in.md)).
173
+ 보고한다. 트레이와 쓰이지 않는 CTO 운영 명령은 제거하였다
174
+ ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). 자동 수집은 기본으로 꺼져 있고 `TFX_CTO_AUTO_COLLECT=1` 로 켠다([ADR-0018](docs/_archive/adr/0018-cto-auto-behaviors-opt-in.md)).
174
175
 
175
- **원격 호스트.** `/tfx-remote`와 `--remote <host>`는 `~/.config/triflux/hosts.json`
176
- (Windows는 `%APPDATA%\triflux\hosts.json`)에서 호스트를 읽는다. `/tfx-remote setup`으로 호스트를
177
- 추가한 뒤 `/tfx-remote spawn <host> "보안 리뷰 실행"`처럼 쓴다.
176
+ **원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`
177
+ (Windows는 `%APPDATA%\triflux\hosts.json`)에서 호스트를 읽는다. 세션 시작은
178
+ `remote-spawn.mjs`의 `--host <host> --prompt "<요청>"` 옵션을 사용한다.
179
+ [실행 옵션](skills/tfx-remote/SKILL.md)을 따른다.
178
180
 
179
181
  ## 구조
180
182
 
@@ -184,18 +186,14 @@ graph TD
184
186
  User --> CLI[tfx CLI]
185
187
  Skills --> Route[tfx-route.sh]
186
188
  Skills --> Live[tfx-live]
187
- CLI --> Team["tfx multi · tfx swarm"]
189
+ CLI --> Team["tfx multi"]
188
190
  Route --> Codex[Codex CLI]
189
191
  Route --> Agy[Antigravity agy]
190
192
  Route --> Claude[Claude Code]
191
193
  Team --> Route
192
- Team --> WT[(git worktrees)]
193
194
  Live -->|UDS 또는 tmux| Sessions[Claude / Codex TUI 세션]
194
- Route --> Hub["Hub 127.0.0.1:27888"]
195
- Team --> Hub
196
- Hub --> Store[(SQLite 또는 메모리 저장소)]
197
- Hub --> MCP[MCP 도구]
198
- Hub --> UI["HUD · claude agents 패널"]
195
+ Route --> UI["HUD · claude agents 패널"]
196
+ Team --> UI
199
197
  CLI --> Lake[(".triflux/lake (tfx cto)")]
200
198
  ```
201
199
 
@@ -210,8 +208,8 @@ graph TD
210
208
  | Linux | tmux | 지원. |
211
209
  | Windows | psmux + Windows Terminal | 아래 참고. |
212
210
 
213
- **Windows.** psmux(tmux 포크)의 기본 셸은 PowerShell이다. safety-guard가 `wt.exe`와 psmux `kill-session`
214
- 직접 호출을 막으므로 탭과 패인은 `tfx-wt` 스킬(Windows에만 설치)과
211
+ **Windows.** psmux(tmux 포크)의 기본 셸은 PowerShell이다. `wt.exe`와 psmux `kill-session`은 직접 호출하지
212
+ 않고, 탭과 패인은 `tfx-wt` 스킬(Windows에만 설치)과
215
213
  `hub/team/wt-manager.mjs`를 거친다. 에이전트 규칙은
216
214
  [`.claude/rules/tfx-psmux.md`](.claude/rules/tfx-psmux.md).
217
215
 
@@ -219,9 +217,7 @@ graph TD
219
217
 
220
218
  | 층 | 보호 |
221
219
  | --- | --- |
222
- | 관리된 경로 | Codex와 Antigravity는 `tfx-route.sh`, Hub 워커, `tfx`로만 부르고 맨 `codex exec`나 `agy`로 부르지 않는다. 호출자가 지키는 규칙이며 이를 막는 훅은 없다. |
223
- | safety-guard 훅 | 위험한 셸 명령(루트 `rm -rf`, main 강제 push, `git clean -fd`, SQL `DROP`), `wt.exe`·psmux 종료 직접 호출, Windows 호스트로 SSH 보내는 bash 문법을 막고 관리된 대안을 알려 준다. |
224
- | Hub | localhost에만 붙는다. bearer 토큰(`TFX_HUB_TOKEN`)은 선택. |
220
+ | 관리된 경로 | Codex와 Antigravity는 `tfx-route.sh`, headless 워커, `tfx`로만 부르고 맨 `codex exec`나 `agy`로 부르지 않는다. 호출자가 지키는 규칙이며 이를 막는 훅은 없다. |
225
221
  | MCP 레지스트리 | 낡았거나 지원하지 않는 MCP 항목을 관리형 항목으로 바꾼다. |
226
222
  | 합의 결과 | deep·consensus 실행은 일부 레인이 빠졌거나 의견이 갈린 결과를 숨기지 않고 표시한다. |
227
223
 
package/README.md CHANGED
@@ -25,15 +25,29 @@
25
25
  triflux is a Claude Code plugin and npm CLI that routes coding work across Claude, Codex,
26
26
  and Antigravity. You describe the task once with `/tfx-auto`; triflux picks the CLI lane
27
27
  (Codex by default), runs it through managed routes instead of ad-hoc shell commands, and
28
- can fan the work out to parallel workers, worktree-isolated swarms, live Claude↔Codex
29
- sessions, or remote hosts. The `tfx` shell CLI covers setup, diagnostics, the local Hub,
28
+ can fan the work out to parallel workers, live Claude↔Codex sessions, or remote
29
+ hosts. Parallel code changes use separate worktrees and one session per worktree.
30
+ The `tfx` shell CLI covers setup, diagnostics,
30
31
  and team orchestration.
31
32
 
32
33
  ## Install
33
34
 
34
35
  ```bash
35
36
  npm install -g triflux # postinstall runs the setup script
36
- tfx doctor # check CLIs, tmux, Hub, MCP, profiles, skills
37
+ tfx doctor # check CLIs, tmux, MCP, profiles, skills
38
+ ```
39
+
40
+ npm 12 and newer block install scripts by default. Allow the setup script:
41
+
42
+ ```bash
43
+ npm i -g triflux --allow-scripts=triflux
44
+ ```
45
+
46
+ Setup registers the `triflux` marketplace and prints a mods installation hint. To install
47
+ usage bands and subagent effort enforcement (Claude Code 2.1.287 or newer):
48
+
49
+ ```bash
50
+ tfx setup --mods
37
51
  ```
38
52
 
39
53
  Or install the Claude Code plugin from this repository's marketplace:
@@ -53,8 +67,6 @@ claude plugin install triflux@triflux
53
67
  /tfx-auto "finish the migration and verify it" --mode deep --retry ralph --max-iterations 10
54
68
  ```
55
69
 
56
- Run `tfx auto "<task>" --json` in a shell to preview the routing decision without executing it.
57
-
58
70
  ## Skills
59
71
 
60
72
  Skills you invoke directly:
@@ -62,10 +74,10 @@ Skills you invoke directly:
62
74
  | Skill | Use |
63
75
  | --- | --- |
64
76
  | `/tfx-auto` | Front door for implementing, fixing, reviewing, and parallel work. Behavior is set by flags (below). |
65
- | `/tfx-live` | Live Claude↔Codex sessions: `start`/`ask`/`stop`, `peer` relay, `orchestrate`, `list-sessions`. |
66
- | `/tfx-remote` | Remote Claude Code sessions over SSH: `setup`, `spawn`, `list`, `attach`, `send`, `resume`, `probe`, `kill`. |
77
+ | `/tfx-live` | Live Claude↔Codex sessions: `start`/`ask`/`wait`/`stop`, `peer` relay, `list-sessions`. |
78
+ | `/tfx-remote` | SSH 원격 Claude Code 세션 시작, 조회, 재부착, 메시지 전송, 준비 상태 확인, 모니터링, 종료. |
67
79
  | `/tfx-setup` | Interactive setup: file sync, HUD, Codex profiles, MCP, hook priority. |
68
- | `/tfx-doctor` | Diagnose and repair; also starts, stops, and checks the Hub. |
80
+ | `/tfx-doctor` | Diagnose and repair. |
69
81
  | `/tfx-ship` | triflux release flow (maintainers). |
70
82
  | `/tfx-wt` | Windows Terminal tabs and panes. `tfx setup` installs it on Windows only. |
71
83
 
@@ -89,13 +101,10 @@ and execution. Manage Codex profiles directly in `~/.codex/<profile>.config.toml
89
101
  | `--shape` | `consensus`, `debate`, `panel` | Output shape for `--mode consensus` |
90
102
  | `--cli` | `auto`, `codex`, `antigravity`, `claude` | Force a CLI lane |
91
103
  | `--cli-set` | `triad`, `no-antigravity`, `custom` | Consensus participants |
92
- | `--parallel` | `1`, `N`, `swarm` | `N` = local workers (`tfx multi`); `swarm` = PRD shards in worktrees (`tfx swarm`) |
93
- | `--isolation` | `none`, `worktree` | Worktree isolation per shard (forced on with `swarm`) |
94
- | `--remote` | `<host>` | Send swarm shards to a host from `hosts.json` |
104
+ | `--parallel` | `1`, `N` | `N` = local workers (`tfx multi`) |
95
105
  | `--retry` | `0`, `1` (default), `ralph`, `auto-escalate` | `ralph` = retry state machine with stuck detection; `auto-escalate` = move up the model chain |
96
106
  | `--max-iterations` | `N` | Cap for `ralph` / `auto-escalate` (`0` = unlimited) |
97
107
  | `--rounds` | `N` (default 4) | Round trips for `--mode live` |
98
- | `--risk-tier` | `auto`, `low`, `medium`, `high` | Pick verification strength from the change; ignored when `--mode` is set |
99
108
  | `--skill` | `<name>` | Prepend `skills/<name>/SKILL.md` to the Codex/Antigravity prompt |
100
109
  | `--no-native-bridge-ui` | | Hide headless workers from the `claude agents` panel |
101
110
 
@@ -125,28 +134,22 @@ escalation chain: [`.claude/rules/tfx-escalation-chain.md`](.claude/rules/tfx-es
125
134
  | Command | Use |
126
135
  | --- | --- |
127
136
  | `tfx setup` / `tfx doctor` | Sync files, HUD, MCP, profiles / diagnose and repair (`--fix`, `--json`) |
128
- | `tfx auto` | Preview the `tfx-auto` routing decision |
129
- | `tfx multi` | Local multi-CLI team in tmux + Hub |
130
- | `tfx swarm` | PRD-based, worktree-isolated work: `plan`, `preflight`, `run`, `list` |
131
- | `tfx synapse` | Swarm session registry and leases |
132
- | `tfx hub` | Local Hub: `start`, `stop`, `status`, `ensure` |
137
+ | `tfx multi` | Local multi-CLI team in tmux |
133
138
  | `tfx mcp` | Managed MCP registry: `list`, `sync`, `add`, `remove` |
134
- | `tfx handoff` | Serialize the current context for another session or host |
135
139
  | `tfx cto` | Repo-local authority console: `collect`, `status`, `hygiene` (dry-run) |
136
- | `tfx review` / `tfx codex-team` | Codex git-diff review / Codex-led team mode |
137
- | `tfx stealth-fetch <url>` | Fetch one URL through cloakbrowser (JSON on stdout) |
138
- | `tfx notion-read`, `tfx why`, `tfx schema`, `tfx list`, `tfx monitor`, `tfx update`, `tfx version` | Notion → Markdown, commit intent trailers, CLI schemas, installed skills, TUI monitor, update, version |
140
+ | `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<instruction>"` | Send review to Codex (`codex exec review` via policy) |
141
+ | `tfx list`, `tfx update`, `tfx version` | Installed skills, update, version |
139
142
  | `tfx-live` | Live session bridge (same as the `/tfx-live` skill) |
140
143
 
141
- `tfx <command> --help` and `tfx schema <command>` print the exact arguments.
144
+ `tfx <command> --help` prints the exact arguments.
142
145
 
143
146
  ## Runtime features
144
147
 
145
148
  **Live sessions.** `tfx-live` drives Claude Code and Codex TUI sessions. Claude daemon targets
146
149
  (`--short`/`--session-id`) try UDS first and fall back to tmux when `--session` is also given;
147
- Codex uses tmux, or UDS with
148
- `--transport uds --thread <id|auto>`. `peer` relays between two sessions for `--rounds`, and
149
- `orchestrate` runs Claude + Codex on one task. triflux's Codex hook records running Codex
150
+ Codex `ask` queues the message with `codex queue` (shown in the TUI with a
151
+ `[from <sender>]` first line) and falls back to tmux with a reported reason; UDS stays available with
152
+ `--transport uds --thread <id|auto>`. `peer` relays between two sessions for `--rounds`. triflux's Codex hook records running Codex
150
153
  sessions under `~/.local/state/triflux/codex-sessions/`, so `tfx-live list-sessions --cli codex|claude`
151
154
  also finds sessions you started yourself in tmux.
152
155
 
@@ -154,10 +157,9 @@ also finds sessions you started yourself in tmux.
154
157
  gets past Claude Code's 600-second Bash limit. Follow up with `--job-status`, `--job-wait`, and
155
158
  `--job-result`.
156
159
 
157
- **Hub.** A local message bus for teams, remote sessions, MCP tools, and status surfaces. It binds
158
- to `127.0.0.1:27888` by default (`TFX_HUB_PORT` overrides) and accepts a bearer token from
159
- `TFX_HUB_TOKEN`. Headless workers from `tfx-auto`, `tfx multi`, and local swarm shards appear in
160
- the `claude agents` panel unless you pass `--no-native-bridge-ui`.
160
+ **Headless workers.** Workers from `tfx-auto` and `tfx multi` appear in
161
+ the `claude agents` panel unless you pass `--no-native-bridge-ui`. Press Enter on a row to open the
162
+ tmux pane the worker runs in.
161
163
 
162
164
  **Retry and escalation.** `--retry ralph` loops until done or stuck (three identical failures).
163
165
  `--retry auto-escalate` steps from Codex `gpt6_astra_max` to Claude `fable`; override the chain in
@@ -171,11 +173,11 @@ falling back. Details: [`.claude/rules/tfx-machine-profile.md`](.claude/rules/tf
171
173
  **CTO lake.** Run `tfx cto collect` to refresh the repo snapshot in `.triflux/lake/`, then
172
174
  `tfx cto status` to inspect it with its generation time and age. `tfx cto hygiene --dry-run` reports
173
175
  dry-run findings. The tray and unused CTO operating commands were removed
174
- ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). Automatic collection stays off unless `TFX_CTO_AUTO_COLLECT=1` is set ([ADR-0018](docs/adr/0018-cto-auto-behaviors-opt-in.md)).
176
+ ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). Automatic collection stays off unless `TFX_CTO_AUTO_COLLECT=1` is set ([ADR-0018](docs/_archive/adr/0018-cto-auto-behaviors-opt-in.md)).
175
177
 
176
- **Remote hosts.** `/tfx-remote` and `--remote <host>` read hosts from `~/.config/triflux/hosts.json`
177
- (Windows: `%APPDATA%\triflux\hosts.json`). Run `/tfx-remote setup` to add one, then
178
- `/tfx-remote spawn <host> "run a security review"`.
178
+ **원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`에서 호스트를 읽는다
179
+ (Windows: `%APPDATA%\triflux\hosts.json`). 세션 시작은 `remote-spawn.mjs`의
180
+ `--host <host> --prompt "<요청>"` 옵션을 사용한다. [실행 옵션](skills/tfx-remote/SKILL.md)을 따른다.
179
181
 
180
182
  ## Architecture
181
183
 
@@ -185,18 +187,14 @@ graph TD
185
187
  User --> CLI[tfx CLI]
186
188
  Skills --> Route[tfx-route.sh]
187
189
  Skills --> Live[tfx-live]
188
- CLI --> Team["tfx multi · tfx swarm"]
190
+ CLI --> Team["tfx multi"]
189
191
  Route --> Codex[Codex CLI]
190
192
  Route --> Agy[Antigravity agy]
191
193
  Route --> Claude[Claude Code]
192
194
  Team --> Route
193
- Team --> WT[(git worktrees)]
194
195
  Live -->|UDS or tmux| Sessions[Claude / Codex TUI sessions]
195
- Route --> Hub["Hub 127.0.0.1:27888"]
196
- Team --> Hub
197
- Hub --> Store[(SQLite or memory store)]
198
- Hub --> MCP[MCP tools]
199
- Hub --> UI["HUD · claude agents panel"]
196
+ Route --> UI["HUD · claude agents panel"]
197
+ Team --> UI
200
198
  CLI --> Lake[(".triflux/lake (tfx cto)")]
201
199
  ```
202
200
 
@@ -211,8 +209,8 @@ Package layout and execution paths: [ARCHITECTURE.md](ARCHITECTURE.md). Document
211
209
  | Linux | tmux | Supported. |
212
210
  | Windows | psmux + Windows Terminal | See below. |
213
211
 
214
- **Windows.** psmux (a tmux fork) runs PowerShell by default. safety-guard blocks direct `wt.exe`
215
- and raw `psmux kill-session`, so tabs and panes go through the `tfx-wt` skill (set up only on
212
+ **Windows.** psmux (a tmux fork) runs PowerShell by default. Callers do not run `wt.exe` or raw
213
+ `psmux kill-session` directly; tabs and panes go through the `tfx-wt` skill (set up only on
216
214
  Windows) and `hub/team/wt-manager.mjs`. Agent rules:
217
215
  [`.claude/rules/tfx-psmux.md`](.claude/rules/tfx-psmux.md).
218
216
 
@@ -220,9 +218,7 @@ Windows) and `hub/team/wt-manager.mjs`. Agent rules:
220
218
 
221
219
  | Layer | Protection |
222
220
  | --- | --- |
223
- | Managed routes | Codex and Antigravity are called through `tfx-route.sh`, Hub workers, or `tfx`, never through a bare `codex exec` or `agy`. This is a rule for callers; no hook enforces it. |
224
- | safety-guard hook | Blocks destructive shell commands (root `rm -rf`, force push to main, `git clean -fd`, SQL `DROP`), direct `wt.exe`, raw psmux kill, and bash syntax sent over SSH to Windows hosts, and points to the managed alternative. |
225
- | Hub | Binds to localhost; optional bearer token (`TFX_HUB_TOKEN`). |
221
+ | Managed routes | Codex and Antigravity are called through `tfx-route.sh`, headless workers, or `tfx`, never through a bare `codex exec` or `agy`. This is a rule for callers; no hook enforces it. |
226
222
  | MCP registry | Replaces stale or unsupported MCP entries with managed ones. |
227
223
  | Consensus | Deep and consensus runs report degraded or disputed results instead of hiding them. |
228
224