triflux 10.50.2 → 10.51.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/CLAUDE.md +41 -33
- package/README.ko.md +27 -20
- package/README.md +26 -19
- package/bin/triflux.mjs +22 -393
- package/cto/brief.mjs +0 -12
- package/cto/collect.mjs +0 -73
- package/cto/current.schema.json +0 -4
- package/cto/status.mjs +2 -50
- package/hooks/agy-session-hook.mjs +11 -56
- package/hooks/codex-session-hook.mjs +11 -101
- package/hub/bridge.mjs +1 -79
- package/hub/cli-adapter-base.mjs +12 -90
- package/hub/codex-adapter.mjs +0 -1
- package/hub/codex-preflight.mjs +5 -28
- package/hub/lib/known-errors.json +2 -2
- package/hub/lib/process-utils.mjs +0 -123
- package/hub/lib/spawn-trace.mjs +3 -2
- package/hub/lib/timeout-defaults.mjs +0 -1
- package/hub/role-contract.mjs +0 -2
- package/hub/team/agent-map.json +0 -1
- package/hub/team/ansi.mjs +1 -35
- package/hub/team/backend.mjs +9 -145
- package/hub/team/cli/commands/attach.mjs +1 -17
- package/hub/team/cli/commands/control.mjs +12 -38
- package/hub/team/cli/commands/debug.mjs +1 -37
- package/hub/team/cli/commands/focus.mjs +5 -31
- package/hub/team/cli/commands/interrupt.mjs +6 -25
- package/hub/team/cli/commands/kill.mjs +1 -30
- package/hub/team/cli/commands/list.mjs +0 -16
- package/hub/team/cli/commands/send.mjs +6 -26
- package/hub/team/cli/commands/start/index.mjs +41 -133
- package/hub/team/cli/commands/start/parse-args.mjs +15 -40
- package/hub/team/cli/commands/start/start-headless.mjs +138 -105
- package/hub/team/cli/commands/start/start-mux.mjs +0 -3
- package/hub/team/cli/commands/status.mjs +2 -57
- package/hub/team/cli/commands/stop.mjs +14 -19
- package/hub/team/cli/help.mjs +4 -5
- package/hub/team/cli/manifest.mjs +5 -1
- package/hub/team/cli/render.mjs +0 -12
- package/hub/team/cli/services/hub-client.mjs +2 -88
- package/hub/team/cli/services/runtime-mode.mjs +27 -98
- package/hub/team/handoff.mjs +3 -34
- package/hub/team/headless.mjs +13 -754
- package/hub/team/orchestrator.mjs +4 -30
- package/hub/team/pane.mjs +6 -28
- package/hub/team/psmux.mjs +0 -1
- package/hub/team/remote-session.mjs +1 -2
- package/hub/team/session.mjs +7 -91
- package/hub/team/swarm-intent.mjs +0 -198
- package/hub/team/tui-core.mjs +1 -1
- package/hub/team/tui-viewer.mjs +2 -2
- package/hub/team/tui.mjs +8 -269
- package/hub/team/wt-manager.mjs +2 -2
- package/hub/workers/factory.mjs +4 -37
- package/hub/workers/lib/jsonrpc-ws-uds.mjs +0 -2
- package/hud/cli-policy.mjs +0 -22
- package/hud/constants.mjs +11 -26
- package/hud/hud-qos-status.mjs +23 -51
- package/hud/providers/gemini.mjs +105 -20
- package/hud/renderers.mjs +50 -104
- package/hud/utils.mjs +2 -2
- package/package.json +6 -3
- package/scripts/__tests__/spawn-trace.test.mjs +16 -0
- package/scripts/cache-warmup.mjs +6 -34
- package/scripts/claude-login-detect.mjs +0 -1
- package/scripts/claudemd-sync.mjs +1 -28
- package/scripts/completions/tfx.bash +3 -12
- package/scripts/completions/tfx.fish +3 -6
- package/scripts/completions/tfx.zsh +4 -13
- package/scripts/lib/agent-route-policy.mjs +162 -14
- package/scripts/lib/claudemd-scanner.mjs +2 -199
- package/scripts/lib/cli-claude.mjs +0 -2
- package/scripts/lib/context.mjs +3 -19
- package/scripts/lib/env-probe.mjs +5 -64
- package/scripts/lib/gemini-profiles.mjs +2 -69
- package/scripts/lib/machine-profile.mjs +3 -17
- package/scripts/lib/mcp-filter.mjs +109 -53
- package/scripts/lib/mcp-health.mjs +2 -2
- package/scripts/lib/mcp-server-catalog.mjs +2 -2
- package/scripts/lib/psmux-info.mjs +11 -59
- package/scripts/lib/session-presence.mjs +1 -1
- package/scripts/lib/skill-template.mjs +0 -245
- package/scripts/pack.mjs +3 -26
- package/scripts/preflight-cache.mjs +5 -18
- package/scripts/release/check-packages-mirror.mjs +0 -1
- package/scripts/release/version-manifest.json +9 -1
- package/scripts/setup.mjs +69 -2
- package/scripts/tfx-route-post.mjs +5 -61
- package/scripts/tfx-route-worker.mjs +4 -79
- package/scripts/tfx-route.sh +161 -1427
- package/skills/tfx-auto/SKILL.md +122 -740
- package/skills/tfx-auto/references/consensus-schema.md +161 -0
- package/skills/tfx-auto/references/tmux-observation.md +97 -0
- package/skills/tfx-remote/SKILL.md +24 -87
- package/skills/tfx-research/SKILL.md +11 -11
- package/skills/tfx-review/SKILL.md +33 -35
- package/skills/tfx-ship/SKILL.md +6 -27
- package/skills/tfx-wt/SKILL.md +34 -68
- package/config/routing-policy.json +0 -124
- package/docs/assets/consensus-flow.svg +0 -125
- package/docs/assets/deep-vs-light.svg +0 -193
- package/docs/assets/demo-dark.gif +0 -0
- package/docs/assets/demo-light.gif +0 -0
- package/docs/assets/demo-psmux.gif +0 -0
- package/hub/dynamic-routing-engine.mjs +0 -511
- package/hub/lib/risk-tier.mjs +0 -53
- package/hub/lib/ssh-command.mjs +0 -231
- package/hub/lib/staged-file-detect.mjs +0 -43
- package/hub/lib/tfx-route-args.mjs +0 -353
- package/hub/routing-snapshot.mjs +0 -261
- package/hub/team/build-worker-prompt.mjs +0 -92
- package/hub/team/check-mcp-hub.mjs +0 -49
- package/hub/team/claude-native-bridge.mjs +0 -987
- package/hub/team/cli/commands/start/start-in-process.mjs +0 -50
- package/hub/team/cli/commands/start/start-wt.mjs +0 -86
- package/hub/team/cli/services/native-control.mjs +0 -145
- package/hub/team/codex-review.mjs +0 -520
- package/hub/team/conductor-mesh-bridge.mjs +0 -122
- package/hub/team/conductor.mjs +0 -1529
- package/hub/team/consensus-meta.mjs +0 -176
- package/hub/team/cto-pull.mjs +0 -31
- package/hub/team/daemon-pty-tmux-bridge.mjs +0 -146
- package/hub/team/dashboard.mjs +0 -322
- package/hub/team/event-log.mjs +0 -84
- package/hub/team/execution-mode.mjs +0 -324
- package/hub/team/extract-completion-payload.mjs +0 -110
- package/hub/team/headless-bridge-session.mjs +0 -17
- package/hub/team/health-probe.mjs +0 -435
- package/hub/team/interactive-native-launcher.mjs +0 -119
- package/hub/team/interactive-native-worker.mjs +0 -80
- package/hub/team/interactive-tui-transport.mjs +0 -479
- package/hub/team/launcher-template.mjs +0 -144
- package/hub/team/mcp-selector.mjs +0 -145
- package/hub/team/native-supervisor.mjs +0 -460
- package/hub/team/native.mjs +0 -727
- package/hub/team/recovery-store.mjs +0 -149
- package/hub/team/remote-probe.mjs +0 -292
- package/hub/team/remote-watcher.mjs +0 -506
- package/hub/team/runtime-strategy.mjs +0 -200
- package/hub/team/schemas/worker-completion.json +0 -39
- package/hub/team/sentinel-capture.mjs +0 -127
- package/hub/team/swarm-cli.mjs +0 -390
- package/hub/team/swarm-hypervisor.mjs +0 -2206
- package/hub/team/swarm-locks.mjs +0 -335
- package/hub/team/swarm-planner.mjs +0 -371
- package/hub/team/swarm-preflight.mjs +0 -366
- package/hub/team/swarm-reconciler.mjs +0 -242
- package/hub/team/tui-remote-adapter.mjs +0 -377
- package/hub/team/worker-completion-validator.mjs +0 -79
- package/hub/team/worktree-lifecycle.mjs +0 -639
- package/hub/team/wt-templates.json +0 -43
- package/hub/workers/antigravity-route-worker.mjs +0 -179
- package/mesh/index.mjs +0 -69
- package/mesh/mesh-budget.mjs +0 -137
- package/mesh/mesh-heartbeat.mjs +0 -100
- package/mesh/mesh-protocol.mjs +0 -96
- package/mesh/mesh-queue.mjs +0 -163
- package/mesh/mesh-registry.mjs +0 -78
- package/mesh/mesh-router.mjs +0 -77
- package/scripts/__tests__/skill-surface.test.mjs +0 -93
- package/scripts/demo.mjs +0 -197
- package/scripts/doctor-dynamic-routing.mjs +0 -87
- package/scripts/lib/dynamic-route-cli.mjs +0 -107
- package/skills/_templates/base.md +0 -4
- package/skills/_templates/deep.md +0 -6
- package/skills/shared/telemetry-segment.md +0 -6
package/CLAUDE.md
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
# triflux
|
|
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 라우팅·다중 모델
|
|
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
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
|
45
|
+
| 없음 | Linux(멀티플렉서 없음) | 미지원(`false` 반환) | 없음 |
|
|
41
46
|
|
|
42
|
-
###
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
### 플랫폼 보호기 위치(참고)
|
|
55
|
+
### 플랫폼 보호기
|
|
53
56
|
|
|
54
|
-
| 파일 |
|
|
57
|
+
| 파일 | 함수 | 보호기 |
|
|
55
58
|
|------|------|-------|
|
|
56
|
-
| `hub/team/wt-manager.mjs` |
|
|
57
|
-
| `hub/team/headless.mjs` |
|
|
58
|
-
| `tfx-route.sh` |
|
|
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
|
-
|
|
63
|
+
Windows 전용 경로는 플랫폼과 `WT_SESSION` 조건을 확인한다.
|
|
61
64
|
|
|
62
|
-
### macOS 알림
|
|
65
|
+
### macOS 알림
|
|
63
66
|
|
|
64
|
-
`hub/team/notify.mjs
|
|
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 에서
|
|
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
|
-
|
|
87
|
+
headless 워커는 AccountBroker를 사용한다.
|
|
85
88
|
|
|
86
89
|
| 항목 | 설명 |
|
|
87
90
|
|------|------|
|
|
88
|
-
| 계정별 회로 차단기 | 장애
|
|
91
|
+
| 계정별 회로 차단기 | 장애 격리: 한 계정 오류가 다른 계정에 전파되지 않음 |
|
|
89
92
|
| 사용 중 플래그 | 동일 계정 이중 임대 방지 |
|
|
90
93
|
| `/broker/reload` | 장시간 세션 중 accounts.json을 다시 불러온다. 활성 임대 소유권은 다시 불러온 뒤에도 보존한다. |
|
|
91
94
|
| 어댑터의 임대 없음 정책 | headless 어댑터는 브로커가 비활성·비어 있음이면 기본 CLI 인증 경로로 실행하고, 브로커가 활성인데 임대가 없으면 `circuit_open`으로 실패한다. |
|
|
92
|
-
| Conductor의 임대 없음 정책 | 로컬 Conductor 세션은 `broker_no_lease`를 이벤트 로그에 남기고 생성을 계속한다. accountId가 없으므로 해제는 호출하지 않는다. |
|
|
93
95
|
| 공개 스냅숏 정책 | `/broker/snapshot`과 대시보드는 `publicSnapshot()`만 사용한다. `env`, `authFile`, `profile`, `host`, 파일 경로, 가공하지 않은 실패 시각은 공개하지 않는다. |
|
|
94
96
|
| 진단 이벤트 | `securityViolation`, `authSyncError`는 허브가 가린 경고 로그(`broker.security_violation`, `broker.auth_sync_error`)로 처리한다. |
|
|
95
|
-
| EventEmitter 이벤트 | `lease`, `release`, `cooldown`, `tierFallback`, `circuitOpen`, `circuitClose`, `noAvailableAccounts
|
|
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,6 +138,12 @@ 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
|
+
대화형 auto 실행에서 멀티플렉서가 없으면 tmux(macOS/Linux) 또는 psmux(Windows) 설치 오류로 끝난다.
|
|
145
|
+
비TTY에서 멀티플렉서가 없으면 headless로 실행한다. Windows Terminal의 독립 탭 열기는 유지한다.
|
|
146
|
+
|
|
140
147
|
## 기본 연결 UI(`claude agents` 노출)
|
|
141
148
|
|
|
142
149
|
비대화식 워커는 기본적으로 `claude agents` 패널에 행으로 나타난다. 제외하려면 `--no-native-bridge-ui`를 쓴다.
|
|
@@ -144,9 +151,7 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
|
|
|
144
151
|
| 모드 | 기본값 | 행이 보이는 위치 |
|
|
145
152
|
|------|---------|--------------------|
|
|
146
153
|
| `tfx-auto` / `tfx multi`(비대화식) | 켬 | 로컬 `claude agents` |
|
|
147
|
-
|
|
|
148
|
-
| `tfx swarm` 원격 조각 | **건너뛰고 경고** | 해당 없음 — `registerSwarmShard()`가 host!=local일 때 `{ ok: true, skipped: true }`를 반환하고 `"remote launcher must register on that host"`만 경고한다. 원격 데몬 실제 등록은 후속 PRD다. |
|
|
149
|
-
| 대화식(tmux/wt) | 끔 | 해당 없음 |
|
|
154
|
+
| 대화식(tmux/psmux) | 끔 | 해당 없음 |
|
|
150
155
|
|
|
151
156
|
감시자가 종료되면 즉시 데몬의 `sendKillBySessionId`를 실행해 오래된 행을 남기지 않는다. PRD: `.triflux/plans/native-bridge-ui-default-expansion.md`(PR #323으로 병합).
|
|
152
157
|
</native-bridge>
|
|
@@ -176,19 +181,22 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
|
|
|
176
181
|
|
|
177
182
|
| 파일 | 내용 |
|
|
178
183
|
|------|------|
|
|
179
|
-
| `.claude/rules/tfx-
|
|
180
|
-
| `.claude/rules/tfx-execution-skill-map.md` | tfx-auto / multi / swarm 실행 엔진 매핑, 격리 기준, 안티패턴 |
|
|
181
|
-
| `.claude/rules/tfx-autoplan-principles.md` | gstack autoplan의 여섯 가지 결정 원칙·단계 우선순위·충돌 해소 규칙 추출본 |
|
|
184
|
+
| `.claude/rules/tfx-execution-skill-map.md` | tfx-auto / multi 실행 경로와 코드 변경 병렬 작업의 worktree 격리 기준 |
|
|
182
185
|
| `.claude/rules/tfx-update-logic.md` | triflux / OMC / gstack / Codex / Antigravity 업데이트 로직 |
|
|
183
186
|
| `.claude/rules/tfx-stack-coexistence.md` | gstack / superpowers / triflux 공존 원칙, 레이어 분리, 의존 방향, 충돌 해소 |
|
|
184
187
|
| `.claude/rules/tfx-mirror-policy.md` | packages/ 3계층 미러 정책(핵심 단순 복사 / 원격 가져오기 변환 / triflux 바이트 동일), 테스트 제외 규칙, 불일치 차단 |
|
|
188
|
+
| `.claude/rules/tfx-cto-hub-boundary.md` | CTO 조회 표면과 Hub 소유권 경계 |
|
|
189
|
+
| `.claude/rules/tfx-doc-governance.md` | 실행 규칙, ADR, 설계, 계획 문서의 배치 |
|
|
190
|
+
| `.claude/rules/tfx-escalation-chain.md` | 자동 재시도와 CLI 전환 체인 |
|
|
191
|
+
| `.claude/rules/tfx-machine-profile.md` | 기기 프로필 우선순위와 실행 정책 |
|
|
192
|
+
| `.claude/rules/tfx-psmux.md` | Windows psmux와 WT 실행 규칙 |
|
|
193
|
+
| `.claude/rules/tfx-routing.md` | 역할별 CLI 라우팅과 직접 호출 제한 |
|
|
194
|
+
| `.claude/rules/tfx-skill-authoring.md` | 스킬 frontmatter, 프로필 표기, 검증 규약 |
|
|
185
195
|
|
|
186
196
|
Claude Code는 `.claude/rules/*.md`를 자동으로 불러온다. Codex CLI는 `@import`를 지원하지 않으므로 필요하면 `AGENTS.md`를 독립적으로 유지한다.
|
|
187
197
|
|
|
188
198
|
## GBrain
|
|
189
199
|
|
|
190
|
-
설정 정본은 `~/Projects/CLAUDE.md
|
|
191
|
-
`2026-04-25`로 오래되어 전역·Projects 블록과 서로 모순됐다(2026-07-26 제거).
|
|
192
|
-
실제 엔진은 postgres(Supabase), gbrain 0.42.51.0이다.
|
|
200
|
+
설정 정본은 `~/Projects/CLAUDE.md`다.
|
|
193
201
|
|
|
194
202
|
- 이 저장소 정책: 읽기·쓰기(github.com/tellang/triflux)
|
package/README.ko.md
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
triflux는 코딩 작업을 Claude, Codex, Antigravity 사이에서 나눠 맡기는 Claude Code 플러그인이자
|
|
26
26
|
npm CLI다. `/tfx-auto`에 할 일을 한 번 적으면 triflux가 CLI 레인(기본은 Codex)을 고르고, 임의
|
|
27
|
-
셸 명령 대신 관리된 경로로 실행한다. 필요하면 로컬 병렬 워커,
|
|
28
|
-
|
|
27
|
+
셸 명령 대신 관리된 경로로 실행한다. 필요하면 로컬 병렬 워커, Claude↔Codex 라이브 세션, 원격 호스트로 작업을 나눈다.
|
|
28
|
+
코드 변경을 병렬로 진행할 때는 작업별 worktree와 세션을 분리한다. 설치, 진단, 로컬 Hub, 팀 실행은 `tfx`
|
|
29
29
|
셸 CLI가 맡는다.
|
|
30
30
|
|
|
31
31
|
## 설치
|
|
@@ -35,6 +35,19 @@ npm install -g triflux # postinstall이 setup 스크립트를 실행한다
|
|
|
35
35
|
tfx doctor # CLI, tmux, Hub, MCP, 프로필, 스킬 점검
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
npm 12 이상은 기본적으로 설치 스크립트를 막는다. setup과 네이티브 의존성의 스크립트를 허용해 설치한다.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm i -g triflux --allow-scripts=triflux,better-sqlite3
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
기본 setup은 `triflux` 마켓플레이스를 등록하고 mods 설치 안내만 출력한다. 사용량 band와
|
|
45
|
+
서브에이전트 effort 강제 기능은 따로 설치한다(Claude Code 2.1.287 이상).
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
tfx setup --mods
|
|
49
|
+
```
|
|
50
|
+
|
|
38
51
|
이 저장소의 마켓플레이스에서 Claude Code 플러그인으로 설치할 수도 있다.
|
|
39
52
|
|
|
40
53
|
```bash
|
|
@@ -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
|
직접 쓰는 스킬:
|
|
@@ -62,7 +73,7 @@ claude plugin install triflux@triflux
|
|
|
62
73
|
| --- | --- |
|
|
63
74
|
| `/tfx-auto` | 구현, 수정, 리뷰, 병렬 작업의 진입점. 동작은 아래 플래그로 정한다. |
|
|
64
75
|
| `/tfx-live` | Claude↔Codex 라이브 세션. `start`/`ask`/`stop`, `peer` 중계, `orchestrate`, `list-sessions`. |
|
|
65
|
-
| `/tfx-remote` | SSH
|
|
76
|
+
| `/tfx-remote` | SSH 원격 Claude Code 세션 시작, 조회, 재부착, 메시지 전송, 준비 상태 확인, 모니터링, 종료. |
|
|
66
77
|
| `/tfx-setup` | 대화형 설정. 파일 동기화, HUD, Codex 프로필, MCP, 훅 우선순위. |
|
|
67
78
|
| `/tfx-doctor` | 진단과 복구. Hub 시작·중지·상태 확인도 여기서 한다. |
|
|
68
79
|
| `/tfx-ship` | triflux 릴리즈 절차(메인테이너용). |
|
|
@@ -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
|
|
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,15 +132,14 @@ Codex는 이름 붙은 프로필로 실행한다. 모델 ID는 `~/.codex/<프로
|
|
|
124
132
|
| 명령 | 용도 |
|
|
125
133
|
| --- | --- |
|
|
126
134
|
| `tfx setup` / `tfx doctor` | 파일·HUD·MCP·프로필 동기화 / 진단과 복구(`--fix`, `--json`) |
|
|
127
|
-
| `tfx auto` | `tfx-auto` 라우팅 판정 미리 보기 |
|
|
128
135
|
| `tfx multi` | tmux + Hub 기반 로컬 멀티 CLI 팀 |
|
|
129
|
-
| `tfx
|
|
130
|
-
| `tfx synapse` | 스웜 세션 레지스트리와 lease |
|
|
136
|
+
| `tfx synapse` | 세션 레지스트리와 lease |
|
|
131
137
|
| `tfx hub` | 로컬 Hub: `start`, `stop`, `status`, `ensure` |
|
|
132
138
|
| `tfx mcp` | 관리형 MCP 레지스트리: `list`, `sync`, `add`, `remove` |
|
|
133
139
|
| `tfx handoff` | 현재 맥락을 다른 세션이나 호스트로 넘길 프롬프트로 묶음 |
|
|
134
140
|
| `tfx cto` | 저장소 단위 권위 콘솔: `collect`, `status`, `hygiene`(dry-run) |
|
|
135
|
-
| `tfx
|
|
141
|
+
| `tfx codex-team` | Codex 주도 팀 모드 |
|
|
142
|
+
| `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<지시>"` | 정책에 따라 `codex exec review`로 리뷰 전달 |
|
|
136
143
|
| `tfx stealth-fetch <url>` | cloakbrowser로 URL 하나를 가져옴(JSON을 stdout으로) |
|
|
137
144
|
| `tfx notion-read`, `tfx why`, `tfx schema`, `tfx list`, `tfx monitor`, `tfx update`, `tfx version` | Notion → Markdown, 커밋 intent 트레일러, CLI 스키마, 설치된 스킬, TUI 모니터, 업데이트, 버전 |
|
|
138
145
|
| `tfx-live` | 라이브 세션 브리지(`/tfx-live` 스킬과 같은 명령) |
|
|
@@ -154,7 +161,7 @@ Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-s
|
|
|
154
161
|
|
|
155
162
|
**Hub.** 팀, 원격 세션, MCP 도구, 상태 표시를 잇는 로컬 메시지 버스다. 기본으로
|
|
156
163
|
`127.0.0.1:27888`에 붙고(`TFX_HUB_PORT`로 변경), `TFX_HUB_TOKEN`이 있으면 bearer 토큰을 요구한다.
|
|
157
|
-
`tfx-auto`, `tfx multi
|
|
164
|
+
`tfx-auto`, `tfx multi`의 headless 워커는 `claude agents` 패널에 행으로 보인다.
|
|
158
165
|
끄려면 `--no-native-bridge-ui`를 준다.
|
|
159
166
|
|
|
160
167
|
**재시도와 승격.** `--retry ralph`는 끝나거나 막힐 때(같은 실패 3회 연속)까지 반복한다.
|
|
@@ -169,12 +176,13 @@ Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-s
|
|
|
169
176
|
|
|
170
177
|
**CTO lake.** `tfx cto collect`로 `.triflux/lake/`의 저장소 스냅샷을 갱신하고,
|
|
171
178
|
`tfx cto status`로 생성 시각과 경과 시간을 확인한다. `tfx cto hygiene --dry-run`는 dry-run 결과를
|
|
172
|
-
보고한다. 트레이와 쓰이지 않는 CTO 운영 명령은
|
|
179
|
+
보고한다. 트레이와 쓰이지 않는 CTO 운영 명령은 제거하였다
|
|
173
180
|
([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)).
|
|
174
181
|
|
|
175
|
-
**원격 호스트.** `/tfx-remote
|
|
176
|
-
(Windows는 `%APPDATA%\triflux\hosts.json`)에서 호스트를 읽는다.
|
|
177
|
-
|
|
182
|
+
**원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`
|
|
183
|
+
(Windows는 `%APPDATA%\triflux\hosts.json`)에서 호스트를 읽는다. 세션 시작은
|
|
184
|
+
`remote-spawn.mjs`의 `--host <host> --prompt "<요청>"` 옵션을 사용한다.
|
|
185
|
+
[실행 옵션](skills/tfx-remote/SKILL.md)을 따른다.
|
|
178
186
|
|
|
179
187
|
## 구조
|
|
180
188
|
|
|
@@ -184,12 +192,11 @@ graph TD
|
|
|
184
192
|
User --> CLI[tfx CLI]
|
|
185
193
|
Skills --> Route[tfx-route.sh]
|
|
186
194
|
Skills --> Live[tfx-live]
|
|
187
|
-
CLI --> Team["tfx multi
|
|
195
|
+
CLI --> Team["tfx multi"]
|
|
188
196
|
Route --> Codex[Codex CLI]
|
|
189
197
|
Route --> Agy[Antigravity agy]
|
|
190
198
|
Route --> Claude[Claude Code]
|
|
191
199
|
Team --> Route
|
|
192
|
-
Team --> WT[(git worktrees)]
|
|
193
200
|
Live -->|UDS 또는 tmux| Sessions[Claude / Codex TUI 세션]
|
|
194
201
|
Route --> Hub["Hub 127.0.0.1:27888"]
|
|
195
202
|
Team --> Hub
|
package/README.md
CHANGED
|
@@ -25,8 +25,9 @@
|
|
|
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,
|
|
29
|
-
|
|
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, the local Hub,
|
|
30
31
|
and team orchestration.
|
|
31
32
|
|
|
32
33
|
## Install
|
|
@@ -36,6 +37,19 @@ npm install -g triflux # postinstall runs the setup script
|
|
|
36
37
|
tfx doctor # check CLIs, tmux, Hub, MCP, profiles, skills
|
|
37
38
|
```
|
|
38
39
|
|
|
40
|
+
npm 12 and newer block install scripts by default. Allow the setup and native dependency scripts:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm i -g triflux --allow-scripts=triflux,better-sqlite3
|
|
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
|
|
51
|
+
```
|
|
52
|
+
|
|
39
53
|
Or install the Claude Code plugin from this repository's marketplace:
|
|
40
54
|
|
|
41
55
|
```bash
|
|
@@ -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:
|
|
@@ -63,7 +75,7 @@ Skills you invoke directly:
|
|
|
63
75
|
| --- | --- |
|
|
64
76
|
| `/tfx-auto` | Front door for implementing, fixing, reviewing, and parallel work. Behavior is set by flags (below). |
|
|
65
77
|
| `/tfx-live` | Live Claude↔Codex sessions: `start`/`ask`/`stop`, `peer` relay, `orchestrate`, `list-sessions`. |
|
|
66
|
-
| `/tfx-remote` |
|
|
78
|
+
| `/tfx-remote` | SSH 원격 Claude Code 세션 시작, 조회, 재부착, 메시지 전송, 준비 상태 확인, 모니터링, 종료. |
|
|
67
79
|
| `/tfx-setup` | Interactive setup: file sync, HUD, Codex profiles, MCP, hook priority. |
|
|
68
80
|
| `/tfx-doctor` | Diagnose and repair; also starts, stops, and checks the Hub. |
|
|
69
81
|
| `/tfx-ship` | triflux release flow (maintainers). |
|
|
@@ -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
|
|
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,15 +134,14 @@ 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
137
|
| `tfx multi` | Local multi-CLI team in tmux + Hub |
|
|
130
|
-
| `tfx
|
|
131
|
-
| `tfx synapse` | Swarm session registry and leases |
|
|
138
|
+
| `tfx synapse` | Session registry and leases |
|
|
132
139
|
| `tfx hub` | Local Hub: `start`, `stop`, `status`, `ensure` |
|
|
133
140
|
| `tfx mcp` | Managed MCP registry: `list`, `sync`, `add`, `remove` |
|
|
134
141
|
| `tfx handoff` | Serialize the current context for another session or host |
|
|
135
142
|
| `tfx cto` | Repo-local authority console: `collect`, `status`, `hygiene` (dry-run) |
|
|
136
|
-
| `tfx
|
|
143
|
+
| `tfx codex-team` | Codex-led team mode |
|
|
144
|
+
| `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<instruction>"` | Send review to Codex (`codex exec review` via policy) |
|
|
137
145
|
| `tfx stealth-fetch <url>` | Fetch one URL through cloakbrowser (JSON on stdout) |
|
|
138
146
|
| `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 |
|
|
139
147
|
| `tfx-live` | Live session bridge (same as the `/tfx-live` skill) |
|
|
@@ -156,7 +164,7 @@ gets past Claude Code's 600-second Bash limit. Follow up with `--job-status`, `-
|
|
|
156
164
|
|
|
157
165
|
**Hub.** A local message bus for teams, remote sessions, MCP tools, and status surfaces. It binds
|
|
158
166
|
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
|
|
167
|
+
`TFX_HUB_TOKEN`. Headless workers from `tfx-auto` and `tfx multi` appear in
|
|
160
168
|
the `claude agents` panel unless you pass `--no-native-bridge-ui`.
|
|
161
169
|
|
|
162
170
|
**Retry and escalation.** `--retry ralph` loops until done or stuck (three identical failures).
|
|
@@ -173,9 +181,9 @@ falling back. Details: [`.claude/rules/tfx-machine-profile.md`](.claude/rules/tf
|
|
|
173
181
|
dry-run findings. The tray and unused CTO operating commands were removed
|
|
174
182
|
([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)).
|
|
175
183
|
|
|
176
|
-
|
|
177
|
-
(Windows: `%APPDATA%\triflux\hosts.json`).
|
|
178
|
-
|
|
184
|
+
**원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`에서 호스트를 읽는다
|
|
185
|
+
(Windows: `%APPDATA%\triflux\hosts.json`). 세션 시작은 `remote-spawn.mjs`의
|
|
186
|
+
`--host <host> --prompt "<요청>"` 옵션을 사용한다. [실행 옵션](skills/tfx-remote/SKILL.md)을 따른다.
|
|
179
187
|
|
|
180
188
|
## Architecture
|
|
181
189
|
|
|
@@ -185,12 +193,11 @@ graph TD
|
|
|
185
193
|
User --> CLI[tfx CLI]
|
|
186
194
|
Skills --> Route[tfx-route.sh]
|
|
187
195
|
Skills --> Live[tfx-live]
|
|
188
|
-
CLI --> Team["tfx multi
|
|
196
|
+
CLI --> Team["tfx multi"]
|
|
189
197
|
Route --> Codex[Codex CLI]
|
|
190
198
|
Route --> Agy[Antigravity agy]
|
|
191
199
|
Route --> Claude[Claude Code]
|
|
192
200
|
Team --> Route
|
|
193
|
-
Team --> WT[(git worktrees)]
|
|
194
201
|
Live -->|UDS or tmux| Sessions[Claude / Codex TUI sessions]
|
|
195
202
|
Route --> Hub["Hub 127.0.0.1:27888"]
|
|
196
203
|
Team --> Hub
|