triflux 10.23.0 → 10.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +281 -258
- package/README.md +277 -442
- package/bin/triflux.mjs +96 -4
- package/hub/lib/staged-file-detect.mjs +43 -0
- package/hub/lib/tfx-route-args.mjs +87 -0
- package/hub/team/agent-map.json +2 -0
- package/hub/team/backend.mjs +44 -6
- package/hub/team/claude-daemon-control.mjs +160 -0
- package/hub/team/claude-native-bridge.mjs +574 -0
- package/hub/team/claude-session-projection.mjs +65 -0
- package/hub/team/cli/commands/start/index.mjs +4 -0
- package/hub/team/cli/commands/start/parse-args.mjs +20 -0
- package/hub/team/cli/commands/start/start-headless.mjs +12 -0
- package/hub/team/headless-bridge-session.mjs +17 -0
- package/hub/team/headless.mjs +400 -50
- package/hud/constants.mjs +6 -0
- package/hud/hud-qos-status.mjs +11 -3
- package/hud/renderers.mjs +5 -11
- package/package.json +4 -2
- package/scripts/__tests__/install-mcp-gateway-startup.test.mjs +343 -0
- package/scripts/__tests__/mcp-guard-engine-http-headers.test.mjs +49 -3
- package/scripts/__tests__/mcp-guard-engine-policy-sync.test.mjs +203 -0
- package/scripts/__tests__/mcp-guard-engine-stdio-sync.test.mjs +171 -0
- package/scripts/__tests__/mcp-guard-engine-sync-http-headers.test.mjs +47 -1
- package/scripts/__tests__/mcp-guard-engine-watch-http-headers.test.mjs +3 -4
- package/scripts/__tests__/mcp-guard-engine.test.mjs +87 -2
- package/scripts/__tests__/tfx-route-bash-node-parity.test.mjs +169 -0
- package/scripts/__tests__/tfx-route-node-entry.test.mjs +403 -0
- package/scripts/__tests__/tfx-route-phase1-modules.test.mjs +268 -0
- package/scripts/codex-mcp-gateway-sync.mjs +1 -1
- package/scripts/headless-guard.mjs +16 -8
- package/scripts/install-mcp-gateway-startup.mjs +501 -0
- package/scripts/lib/agent-json.mjs +27 -0
- package/scripts/lib/async.mjs +174 -0
- package/scripts/lib/cli-agy.mjs +62 -0
- package/scripts/lib/cli-claude.mjs +78 -0
- package/scripts/lib/cli-codex.mjs +199 -0
- package/scripts/lib/cli-gemini.mjs +67 -0
- package/scripts/lib/env.mjs +14 -0
- package/scripts/lib/hub.mjs +48 -0
- package/scripts/lib/mcp-gateway-servers.mjs +70 -0
- package/scripts/lib/mcp-guard-engine.mjs +524 -25
- package/scripts/lib/mcp-manifest.mjs +2 -2
- package/scripts/lib/pid.mjs +63 -0
- package/scripts/lib/quota.mjs +47 -0
- package/scripts/lib/team.mjs +75 -0
- package/scripts/lib/timeout.mjs +66 -0
- package/scripts/lib/tmp.mjs +26 -0
- package/scripts/lib/toml.mjs +113 -0
- package/scripts/mcp-gateway-config.mjs +2 -31
- package/scripts/mcp-gateway-ensure.mjs +24 -6
- package/scripts/mcp-gateway-start.mjs +16 -59
- package/scripts/mcp-safety-guard.mjs +3 -1
- package/scripts/preflight-cache.mjs +79 -9
- package/scripts/setup.mjs +40 -7
- package/scripts/sync-hub-mcp-settings.mjs +353 -28
- package/scripts/tfx-route.mjs +289 -0
- package/scripts/tfx-route.sh +138 -18
- package/CLAUDE.md +0 -175
package/README.ko.md
CHANGED
|
@@ -8,381 +8,404 @@
|
|
|
8
8
|
</picture>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
+
<h3 align="center">Claude Code, Codex, Gemini를 위한 CLI-first 멀티 모델 오케스트레이션</h3>
|
|
12
|
+
|
|
11
13
|
<p align="center">
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
작업 라우팅, 에이전트 조율, 로컬/원격 팀 실행, Codex/Gemini/Claude 실행 경로를<br>
|
|
15
|
+
감사 가능한 guard 뒤에 묶는 하나의 front door입니다.
|
|
14
16
|
</p>
|
|
15
17
|
|
|
16
18
|
<p align="center">
|
|
17
19
|
<a href="https://www.npmjs.com/package/triflux"><img src="https://img.shields.io/npm/v/triflux?style=flat-square&color=FFAF00&label=npm" alt="npm version"></a>
|
|
18
20
|
<a href="https://www.npmjs.com/package/triflux"><img src="https://img.shields.io/npm/dm/triflux?style=flat-square&color=F5C242" alt="npm downloads"></a>
|
|
19
21
|
<a href="https://github.com/tellang/triflux/stargazers"><img src="https://img.shields.io/github/stars/tellang/triflux?style=flat-square&color=FFAF00" alt="GitHub stars"></a>
|
|
20
|
-
<img src="https://img.shields.io/badge/
|
|
21
|
-
<sub
|
|
22
|
+
<img src="https://img.shields.io/badge/skill_files-33-F5C242?style=flat-square" alt="33 skill files">
|
|
23
|
+
<sub>deprecated 호환 alias 11개는 전면 표면이 아닙니다</sub>
|
|
24
|
+
<img src="https://img.shields.io/badge/node-%3E%3D18-374151?style=flat-square" alt="Node >= 18">
|
|
22
25
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-374151?style=flat-square" alt="License: MIT"></a>
|
|
23
26
|
</p>
|
|
24
27
|
|
|
25
28
|
<p align="center">
|
|
26
|
-
<img alt="triflux
|
|
29
|
+
<img alt="triflux demo" src="docs/assets/demo-multi.gif" width="680">
|
|
27
30
|
</p>
|
|
28
31
|
|
|
29
32
|
<p align="center">
|
|
30
|
-
<a href="#빠른-시작">빠른 시작</a>
|
|
31
|
-
<a href="
|
|
32
|
-
<a href="
|
|
33
|
-
<a href="#아키텍처">아키텍처</a>
|
|
34
|
-
<a href="
|
|
35
|
-
<a href="
|
|
33
|
+
<a href="#빠른-시작">빠른 시작</a> ·
|
|
34
|
+
<a href="#현재-표면">현재 표면</a> ·
|
|
35
|
+
<a href="#권장-워크플로우">권장 워크플로우</a> ·
|
|
36
|
+
<a href="#아키텍처">아키텍처</a> ·
|
|
37
|
+
<a href="#운영">운영</a> ·
|
|
38
|
+
<a href="#보안과-guard">보안</a>
|
|
36
39
|
</p>
|
|
37
40
|
|
|
38
41
|
---
|
|
39
42
|
|
|
43
|
+
## triflux란?
|
|
44
|
+
|
|
45
|
+
triflux는 **Claude Code plugin + npm CLI**입니다. Claude, Codex, Gemini를
|
|
46
|
+
오가며 AI 코딩 작업을 라우팅하되, 임의 셸 명령이나 오래된 skill alias가 제어면이
|
|
47
|
+
되지 않도록 현재 표면을 정리합니다.
|
|
48
|
+
|
|
49
|
+
현재 설계는 예전 README보다 단순합니다.
|
|
50
|
+
|
|
51
|
+
- **`/tfx-auto`가 Claude Code skill의 표준 front door입니다.** quick/deep/consensus/parallel/retry 동작은 플래그로 표현합니다.
|
|
52
|
+
- **`tfx`는 셸 CLI입니다.** setup, doctor, Hub, MCP, team/swarm, handoff 같은 운영 작업을 담당합니다.
|
|
53
|
+
- **호환 alias는 남아 있지만 전면 API가 아닙니다.** 마이그레이션 표는 [`docs/legacy-skill-aliases.md`](https://github.com/tellang/triflux/blob/main/docs/legacy-skill-aliases.md)로 분리했습니다.
|
|
54
|
+
- **호스트 로컬 Codex harness는 패키지 범위 밖입니다.** 예를 들어 `~/.codex/skills/tfx-harness`는 특정 머신에서 워크플로우를 추천할 수 있지만, 이 저장소/npm/Claude plugin에 포함되지 않습니다.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
40
58
|
## 빠른 시작
|
|
41
59
|
|
|
42
|
-
|
|
60
|
+
### 1. 설치
|
|
43
61
|
|
|
44
|
-
|
|
62
|
+
Claude Code plugin:
|
|
63
|
+
|
|
64
|
+
```text
|
|
45
65
|
/plugin marketplace add tellang/triflux
|
|
46
66
|
/plugin install triflux@tellang
|
|
47
67
|
```
|
|
48
68
|
|
|
49
|
-
|
|
69
|
+
npm:
|
|
50
70
|
|
|
51
71
|
```bash
|
|
52
72
|
npm install -g triflux
|
|
53
73
|
```
|
|
54
74
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
### 사용법
|
|
75
|
+
터미널에서 setup/doctor를 실행합니다.
|
|
58
76
|
|
|
59
77
|
```bash
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/tfx-plan "add JWT auth middleware"
|
|
64
|
-
|
|
65
|
-
# Quick opt-out — 단일 모델로 빠르게 실행
|
|
66
|
-
/tfx-review --quick
|
|
67
|
-
/tfx-plan "add JWT auth middleware" --quick
|
|
78
|
+
tfx setup
|
|
79
|
+
tfx doctor
|
|
80
|
+
```
|
|
68
81
|
|
|
69
|
-
|
|
70
|
-
/tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"
|
|
82
|
+
자동화에서는 `tfx doctor --json`을 사용하세요.
|
|
71
83
|
|
|
72
|
-
|
|
73
|
-
/tfx-auto "implement full auth flow with tests" --retry ralph
|
|
84
|
+
### 2. 현재 권장 front door 사용
|
|
74
85
|
|
|
75
|
-
|
|
76
|
-
/tfx-multi "refactor auth + update UI + add tests"
|
|
86
|
+
Claude Code slash skill:
|
|
77
87
|
|
|
78
|
-
|
|
79
|
-
/tfx-
|
|
80
|
-
/tfx-
|
|
88
|
+
```text
|
|
89
|
+
/tfx-auto "이 변경 리뷰해줘" --mode consensus
|
|
90
|
+
/tfx-auto "인증 플로우 구현하고 테스트까지" --mode deep --retry ralph
|
|
91
|
+
/tfx-auto "이 PRD를 격리 shard로 나눠 실행" --parallel swarm --mode consensus --isolation worktree
|
|
92
|
+
/tfx-remote spawn ryzen5-7600 "보안 리뷰 실행"
|
|
93
|
+
/tfx-doctor
|
|
81
94
|
```
|
|
82
95
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
## v10.11.0의 새로운 기능
|
|
86
|
-
|
|
87
|
-
**triflux v10.11.0**은 **하나의 front door + 플래그 기반 라우팅**으로 정리됩니다. 자연어 입력은 계속 지원되고, Phase 3/4에서 legacy 표면은 `tfx-auto`와 `tfx-remote` 뒤로 접히며, 기존 스킬명은 thin alias로 계속 동작합니다.
|
|
96
|
+
셸 CLI:
|
|
88
97
|
|
|
89
|
-
|
|
98
|
+
```bash
|
|
99
|
+
tfx list
|
|
100
|
+
tfx hub ensure
|
|
101
|
+
tfx mcp list
|
|
102
|
+
tfx handoff --target remote --output .omx/handoff.md
|
|
103
|
+
tfx swarm preflight docs/prd/example.md --json
|
|
104
|
+
tfx codex-team "auth 리팩터링 + 테스트 추가"
|
|
105
|
+
```
|
|
90
106
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- **Phase 3** — `--retry ralph`, `--retry auto-escalate`, `--lead codex`, `--max-iterations N`, 4단계 `DEFAULT_ESCALATION_CHAIN`
|
|
95
|
-
- **Phase 4** — `tfx-auto --shape debate|panel|consensus`, `tfx-remote` 단일 진입점, `tfx-psmux-rules`는 `.claude/rules/tfx-psmux.md`로 이동
|
|
96
|
-
- **하위 호환성 유지** — `tfx-persist`, `tfx-debate`, `tfx-multi`, `tfx-remote-spawn` 같은 기존 이름은 thin alias로 계속 지원
|
|
107
|
+
> deep, consensus, team, swarm 경로는 관련 CLI와 터미널 multiplexer가 필요합니다.
|
|
108
|
+
> 먼저 `tfx doctor`를 실행하면 Codex/Gemini/Claude, psmux/tmux, Hub, MCP,
|
|
109
|
+
> profile, stale skill 문제를 한 번에 확인할 수 있습니다.
|
|
97
110
|
|
|
98
|
-
|
|
111
|
+
---
|
|
99
112
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
## 현재 표면
|
|
114
|
+
|
|
115
|
+
### 셸 명령
|
|
116
|
+
|
|
117
|
+
`tfx` CLI의 주요 명령은 다음과 같습니다.
|
|
118
|
+
|
|
119
|
+
| 명령 | 용도 |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| `tfx setup` | scripts, HUD, hooks, MCP, profile 동기화. `--dry-run` 지원. |
|
|
122
|
+
| `tfx doctor` | 설치 상태 진단/복구. `--fix`, `--reset`, `--diagnose`, `--json` 지원. |
|
|
123
|
+
| `tfx mcp` | MCP registry 대상을 `list`, `sync`, `add`, `remove`. |
|
|
124
|
+
| `tfx hub` | 로컬 MCP 메시지 버스 시작/중지/보장/상태 확인. |
|
|
125
|
+
| `tfx list` | 설치된 package/user skill 목록. |
|
|
126
|
+
| `tfx handoff` | 현재 컨텍스트를 로컬/원격 이어받기 프롬프트로 직렬화. |
|
|
127
|
+
| `tfx schema` | CLI와 Hub delegator schema 출력. |
|
|
128
|
+
| `tfx multi` | tmux/psmux + Hub 기반 로컬 multi-agent team 실행. |
|
|
129
|
+
| `tfx swarm` | PRD 기반 worktree 격리 swarm의 plan/preflight/run/list. |
|
|
130
|
+
| `tfx synapse` | swarm registry와 lease 상태 확인. |
|
|
131
|
+
| `tfx codex-team` | Codex lead team mode 편의 wrapper. |
|
|
132
|
+
| `tfx notion-read` | MCP client를 통해 Notion 페이지를 Markdown으로 변환. |
|
|
133
|
+
| `tfx why` | 특정 경로의 마지막 커밋 intent trailer 조회. |
|
|
134
|
+
| `tfx update` | 최신 stable/dev 패키지로 업데이트. |
|
|
135
|
+
| `tfx version` | 버전 정보 출력. |
|
|
136
|
+
| `tfx-profile` | Codex/Gemini profile 관리용 편의 binary. |
|
|
137
|
+
|
|
138
|
+
정확한 인자 계약은 `tfx schema <command>`로 확인합니다.
|
|
139
|
+
|
|
140
|
+
### Claude Code skill
|
|
141
|
+
|
|
142
|
+
패키지에는 **33개 skill 파일**이 들어 있습니다. 크게 나누면 다음과 같습니다.
|
|
143
|
+
|
|
144
|
+
- **표준 진입점**: `tfx-auto`, `tfx-remote`, `tfx-doctor`, `tfx-setup`,
|
|
145
|
+
`tfx-profile`, `tfx-hub`, `tfx-hooks`, `tfx-ship`, `tfx-wt`.
|
|
146
|
+
- **작업 helper**: `tfx-plan`, `tfx-review`, `tfx-qa`, `tfx-research`,
|
|
147
|
+
`tfx-analysis`, `tfx-find`, `tfx-index`, `tfx-interview`, `tfx-prune`,
|
|
148
|
+
`tfx-forge`, `merge-worktree`, `star-prompt`.
|
|
149
|
+
- **deprecated 호환 alias**: 11개 legacy 이름은 전환용 shim입니다. 새 문서와 새 프롬프트에서는 위 표준 진입점을 우선 사용하세요.
|
|
150
|
+
|
|
151
|
+
### 표준 플래그 맵
|
|
152
|
+
|
|
153
|
+
대부분의 옛 skill 이름은 이제 명시적인 `tfx-auto` 플래그로 표현할 수 있습니다.
|
|
154
|
+
|
|
155
|
+
| 의도 | 표준 형태 |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| 빠른 단일 lane 작업 | `/tfx-auto "작업" --mode quick` |
|
|
158
|
+
| 더 깊은 계획/실행/검증 루프 | `/tfx-auto "작업" --mode deep` |
|
|
159
|
+
| 지속 retry 루프 | `/tfx-auto "작업" --retry ralph` |
|
|
160
|
+
| consensus 리뷰 | `/tfx-auto "작업" --mode consensus` |
|
|
161
|
+
| debate 또는 panel 보고 | `/tfx-auto "작업" --mode consensus --shape debate|panel` |
|
|
162
|
+
| 로컬 병렬 작업 | `/tfx-auto "작업" --parallel N --mode deep` 또는 shell `tfx multi ...` |
|
|
163
|
+
| PRD/worktree swarm | `/tfx-auto "작업" --parallel swarm --mode consensus --isolation worktree` 또는 shell `tfx swarm ...` |
|
|
164
|
+
| CLI lane 강제 | `/tfx-auto "작업" --cli codex|gemini|claude` |
|
|
165
|
+
|
|
166
|
+
### 제어 표면의 경계
|
|
167
|
+
|
|
168
|
+
triflux를 디버그하거나 확장할 때는 아래 표면을 나눠서 봐야 합니다.
|
|
169
|
+
|
|
170
|
+
| 표면 | 기준 위치 | npm/plugin 포함 여부 |
|
|
171
|
+
| --- | --- | --- |
|
|
172
|
+
| 공개 CLI/runtime | `bin/`, `scripts/`, `hub/`, `hooks/`, `skills/` | 포함 |
|
|
173
|
+
| publish mirror | `packages/triflux/` | 포함. root runtime 파일과 일치해야 함 |
|
|
174
|
+
| Claude plugin metadata | `.claude-plugin/` | 포함. npm package 내용을 가리킴 |
|
|
175
|
+
| Codex-local harness 실험 | `~/.codex/skills/*` | 미포함 |
|
|
176
|
+
| legacy alias | `skills/<alias>/` + `docs/legacy-skill-aliases.md` | 포함되지만 deprecated 상태 |
|
|
177
|
+
|
|
178
|
+
로컬 Codex harness가 workflow를 추천해도 이는 해당 머신의 routing 조언일 뿐입니다.
|
|
179
|
+
패키지의 계약은 위의 CLI, Claude skill, hook, Hub 표면입니다.
|
|
106
180
|
|
|
107
181
|
---
|
|
108
182
|
|
|
109
|
-
##
|
|
183
|
+
## 권장 워크플로우
|
|
110
184
|
|
|
111
|
-
|
|
112
|
-
<img src="docs/assets/consensus-flow.svg" alt="Tri-CLI Consensus 플로우" width="680">
|
|
113
|
-
</p>
|
|
185
|
+
### 직접 구현/리뷰
|
|
114
186
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Phase 1: Independent Analysis (Anti-Herding)
|
|
119
|
-
├─ Claude Opus → Analysis A (격리 실행, 상호 참조 없음)
|
|
120
|
-
├─ Codex CLI → Analysis B (격리 실행, 상호 참조 없음)
|
|
121
|
-
└─ Gemini CLI → Analysis C (격리 실행, 상호 참조 없음)
|
|
122
|
-
|
|
123
|
-
Phase 2: Cross-Validation
|
|
124
|
-
├─ 3개 소스의 모든 발견 사항을 비교
|
|
125
|
-
├─ 2/3 이상 동의 → CONSENSUS (합의)
|
|
126
|
-
└─ 1/3만 동의 → DISPUTED (이의, 해결 필요)
|
|
127
|
-
|
|
128
|
-
Phase 3: Resolution (합의율 < 70%일 경우)
|
|
129
|
-
├─ 각 CLI가 반대 의견을 검토
|
|
130
|
-
├─ 근거를 들어 수용 또는 반박
|
|
131
|
-
└─ 미해결 → 사용자가 최종 판단
|
|
187
|
+
```text
|
|
188
|
+
/tfx-auto "실패하는 auth 테스트 고쳐줘" --risk-tier medium
|
|
189
|
+
/tfx-auto "SQL과 trust-boundary 중심으로 PR 리뷰" --mode consensus
|
|
132
190
|
```
|
|
133
191
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
Phase 4 이후에는 `tfx-auto`가 하나의 front door 역할을 맡습니다. legacy 스킬명은 그대로 받아들이되, 실제 의미는 플래그로 표현됩니다:
|
|
137
|
-
|
|
138
|
-
- `--retry ralph` / `--retry auto-escalate` (Phase 3)
|
|
139
|
-
- `--lead codex` / `--no-claude-native` (Phase 3)
|
|
140
|
-
- `--shape debate|panel|consensus` (Phase 4)
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## 전체 13개 코어 스킬 (호환 alias 포함)
|
|
145
|
-
|
|
146
|
-
### 리서치
|
|
192
|
+
검증 강도를 명시하려면 `--risk-tier low|medium|high`, 모드를 이미 알고 있으면
|
|
193
|
+
`--mode quick|deep|consensus`를 사용합니다.
|
|
147
194
|
|
|
148
|
-
|
|
149
|
-
|------|------|------|
|
|
150
|
-
| `tfx-index` | Core | 프로젝트 인덱싱과 컨텍스트 압축 |
|
|
195
|
+
### 끝까지 완료 루프
|
|
151
196
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
197
|
+
```text
|
|
198
|
+
/tfx-auto "마이그레이션 끝내고 검증까지" --mode deep --retry ralph --max-iterations 10
|
|
199
|
+
```
|
|
155
200
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
| _독립 공개 표면 없음_ | — | 분석, 계획, 인터뷰는 내부 helper로 라우팅 |
|
|
201
|
+
`--retry ralph`는 retry state machine과 stuck detector를 사용합니다. 루프 상한이
|
|
202
|
+
필요하면 `--max-iterations`를 지정하세요.
|
|
159
203
|
|
|
160
|
-
|
|
204
|
+
### consensus/debate/panel 출력
|
|
161
205
|
|
|
162
|
-
|
|
206
|
+
```text
|
|
207
|
+
/tfx-auto "Postgres LISTEN/NOTIFY vs Redis Streams" --mode consensus --shape debate
|
|
208
|
+
/tfx-auto "마이그레이션 전략 리뷰" --mode consensus --shape panel
|
|
209
|
+
```
|
|
163
210
|
|
|
164
|
-
|
|
165
|
-
|------|------|------|
|
|
166
|
-
| `tfx-auto` | Core | 플래그 기반 라우팅과 legacy surface folding을 담당하는 통합 CLI 오케스트레이터 |
|
|
211
|
+
참여 lane은 설정된 Claude/Codex/Gemini입니다. 어떤 lane이 없으면 결과에 partial/degraded 상태가 드러나야 합니다.
|
|
167
212
|
|
|
168
|
-
|
|
213
|
+
### 로컬 팀 또는 PRD swarm
|
|
169
214
|
|
|
170
|
-
|
|
215
|
+
```text
|
|
216
|
+
# 로컬 team mode
|
|
217
|
+
tfx multi "auth 리팩터링 + UI 수정 + 테스트 추가"
|
|
171
218
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
219
|
+
# worktree 격리 PRD swarm
|
|
220
|
+
tfx swarm preflight docs/prd/my-feature.md --json
|
|
221
|
+
tfx swarm run docs/prd/my-feature.md
|
|
222
|
+
```
|
|
175
223
|
|
|
176
|
-
|
|
224
|
+
swarm은 격리 worktree와 file lease를 사용합니다. 큰 PRD는 실행 전에 preflight로 host,
|
|
225
|
+
CLI profile, lease 충돌을 먼저 확인하세요.
|
|
177
226
|
|
|
178
|
-
###
|
|
227
|
+
### 원격 세션
|
|
179
228
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
229
|
+
```text
|
|
230
|
+
/tfx-remote setup
|
|
231
|
+
/tfx-remote spawn ryzen5-7600 "보안 리뷰 실행"
|
|
232
|
+
/tfx-remote list
|
|
233
|
+
/tfx-remote attach <session>
|
|
234
|
+
/tfx-remote send <session> "수정 계속 진행"
|
|
235
|
+
```
|
|
183
236
|
|
|
184
|
-
|
|
237
|
+
`tfx-remote`는 setup/spawn/list/attach/send/resume/probe/kill 흐름을 하나로 묶은 Claude skill 표면입니다.
|
|
185
238
|
|
|
186
|
-
###
|
|
239
|
+
### 컨텍스트 저장/이어받기
|
|
187
240
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
| `tfx-profile` | Core | Codex/Gemini CLI 프로필 관리 |
|
|
241
|
+
```bash
|
|
242
|
+
tfx handoff --target remote --decision "README는 canonical 중심, alias는 docs로 분리" --output .omx/handoff.md
|
|
243
|
+
```
|
|
192
244
|
|
|
193
|
-
|
|
245
|
+
세션을 끝내거나 다른 host/agent가 이어받아야 할 때 사용합니다.
|
|
194
246
|
|
|
195
|
-
|
|
247
|
+
---
|
|
196
248
|
|
|
197
|
-
|
|
198
|
-
|------|------|------|
|
|
199
|
-
| `tfx-hub` | Core | MCP 메시지 버스 관리 |
|
|
200
|
-
| `merge-worktree` | Core | swarm 결과용 worktree merge helper |
|
|
249
|
+
## 아키텍처
|
|
201
250
|
|
|
202
|
-
|
|
251
|
+
<p align="center">
|
|
252
|
+
<img src="docs/assets/architecture.svg" alt="triflux architecture" width="680">
|
|
253
|
+
</p>
|
|
203
254
|
|
|
204
|
-
|
|
255
|
+
```mermaid
|
|
256
|
+
graph TD
|
|
257
|
+
User([User / Claude Code / shell]) --> Skills[Claude skills]
|
|
258
|
+
User --> CLI[tfx CLI]
|
|
259
|
+
Skills --> Auto[/tfx-auto]
|
|
260
|
+
Skills --> Remote[/tfx-remote]
|
|
261
|
+
CLI --> Hub[triflux Hub]
|
|
262
|
+
CLI --> Team[tfx multi / swarm]
|
|
263
|
+
Auto --> Route[tfx-route.sh + guards]
|
|
264
|
+
Team --> Hub
|
|
265
|
+
Remote --> Hub
|
|
266
|
+
Route --> Codex[Codex CLI]
|
|
267
|
+
Route --> Gemini[Gemini CLI]
|
|
268
|
+
Route --> Claude[Claude Code]
|
|
269
|
+
Hub --> MCP[MCP registry + bridge]
|
|
270
|
+
Hub --> Store[(SQLite or memory store)]
|
|
271
|
+
Hub --> Dashboard[HUD / monitor]
|
|
272
|
+
```
|
|
205
273
|
|
|
206
|
-
|
|
207
|
-
|------|------|------|
|
|
208
|
-
| `tfx-remote` | Core | setup, spawn, list, attach, send, resume, probe, rules를 묶는 원격 command family |
|
|
274
|
+
일반적인 라우팅 경로는 다음과 같습니다.
|
|
209
275
|
|
|
210
|
-
|
|
276
|
+
1. Claude Code prompt 또는 명시적 skill 호출.
|
|
277
|
+
2. keyword/routing hook이 context를 추가하거나 skill을 고릅니다.
|
|
278
|
+
3. `tfx-auto`가 intent를 mode, retry, parallelism, risk tier, 대상 CLI lane으로 정규화합니다.
|
|
279
|
+
4. `tfx-route.sh`, Hub worker, 또는 `tfx` CLI가 실제 Codex/Gemini/Claude 기반 작업을 실행합니다.
|
|
280
|
+
5. Hub가 team message, lease, retry, handoff, status surface를 기록합니다.
|
|
211
281
|
|
|
212
|
-
###
|
|
282
|
+
### Hub
|
|
213
283
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
| `tfx-forge` | Active | 대화형 스킬 생성 |
|
|
217
|
-
| `tfx-setup` | Active | 초기 설정 마법사 |
|
|
218
|
-
| `tfx-doctor` | Active | 진단 및 자동 복구 |
|
|
219
|
-
| `tfx-ship` | Active | ship workflow orchestration |
|
|
220
|
-
| `tfx-wt` | Active | Windows Terminal 탭/패인 제어 |
|
|
221
|
-
| `star-prompt` | Active | postinstall GitHub star prompt |
|
|
284
|
+
Hub는 team, remote session, MCP tool, status surface를 위한 로컬 메시지 버스입니다.
|
|
285
|
+
localhost에 bind하며 pipe/HTTP transport를 사용합니다.
|
|
222
286
|
|
|
223
|
-
|
|
287
|
+
```bash
|
|
288
|
+
tfx hub ensure
|
|
289
|
+
tfx hub status --json
|
|
290
|
+
tfx hub stop
|
|
291
|
+
```
|
|
224
292
|
|
|
225
|
-
|
|
293
|
+
macOS에서 test나 Hub 시작이 `node` localhost port를 열면 방화벽 팝업이 뜰 수 있습니다.
|
|
294
|
+
문서 작업에는 필요 없고, 실제 Hub/team/MCP workflow가 필요할 때만 환경 정책에 맞게 허용하세요.
|
|
226
295
|
|
|
227
|
-
|
|
296
|
+
### Guard
|
|
228
297
|
|
|
229
|
-
|
|
230
|
-
<img src="docs/assets/deep-vs-light.svg" alt="Deep vs Light 비교" width="680">
|
|
231
|
-
</p>
|
|
298
|
+
triflux는 위험한 실행을 관리된 경로 뒤에 둡니다.
|
|
232
299
|
|
|
233
|
-
|
|
300
|
+
- CLI 호출은 `tfx-route.sh`, Hub worker, `tfx` CLI를 통과해야 합니다.
|
|
301
|
+
- 직접 `codex exec` / `gemini -y` 경로는 설치된 workflow에서 guard됩니다.
|
|
302
|
+
- psmux/Windows Terminal 흐름은 임의 `wt.exe`/`psmux send-keys`가 아니라 관리 API와 규칙을 사용합니다.
|
|
234
303
|
|
|
235
|
-
|
|
236
|
-
- `--retry ralph` / `--retry auto-escalate` 는 Phase 3의 persistence / escalation 시맨틱
|
|
237
|
-
- `--shape consensus|debate|panel` 은 Phase 4의 consensus output shape 라우팅
|
|
304
|
+
### Profile과 모델 라우팅
|
|
238
305
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
| **CLI** | 단일 (주로 Codex) | 3자 (Claude + Codex + Gemini) |
|
|
242
|
-
| **토큰** | 3K-15K | 20K-80K |
|
|
243
|
-
| **속도** | 수 초 | 수 분 |
|
|
244
|
-
| **정확도** | 양호 (단일 관점) | 우수 (합의 검증 완료) |
|
|
245
|
-
| **편향** | 발생 가능 | Anti-Herding으로 제거 |
|
|
246
|
-
| **적합한 상황** | 빠른 작업, 익숙한 패턴 | 중요한 의사결정, 미지의 영역 |
|
|
306
|
+
Codex/Gemini profile은 `tfx-profile` 또는 `tfx setup`으로 관리합니다. 이미 profile이
|
|
307
|
+
소유한 model/effort 값을 launcher script에 중복 하드코딩하지 마세요.
|
|
247
308
|
|
|
248
309
|
---
|
|
249
310
|
|
|
250
|
-
##
|
|
311
|
+
## 운영
|
|
251
312
|
|
|
252
|
-
|
|
253
|
-
<img src="docs/assets/architecture.svg" alt="triflux 아키텍처" width="680">
|
|
254
|
-
</p>
|
|
255
|
-
|
|
256
|
-
<details>
|
|
257
|
-
<summary>인터랙티브 다이어그램 (GitHub 전용)</summary>
|
|
313
|
+
### 진단
|
|
258
314
|
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
subgraph "Tri-CLI Consensus"
|
|
265
|
-
CONSENSUS -->|Independent| CLAUDE[Claude Opus/Sonnet]
|
|
266
|
-
CONSENSUS -->|Independent| CODEX[Codex CLI]
|
|
267
|
-
CONSENSUS -->|Independent| GEMINI[Gemini CLI]
|
|
268
|
-
CLAUDE --> MERGE[Cross-Validation]
|
|
269
|
-
CODEX --> MERGE
|
|
270
|
-
GEMINI --> MERGE
|
|
271
|
-
MERGE --> GATE{Consensus >= 70%?}
|
|
272
|
-
GATE -->|Yes| OUTPUT[검증된 출력]
|
|
273
|
-
GATE -->|No| RESOLVE[Resolution Round]
|
|
274
|
-
RESOLVE --> MERGE
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
TFX <-->|Named Pipe / HTTP| HUB[triflux Hub 서버]
|
|
278
|
-
|
|
279
|
-
subgraph "오케스트레이션 Hub"
|
|
280
|
-
HUB <--> STORE[(SQLite 저장소)]
|
|
281
|
-
HUB <--> DASH[QoS 대시보드]
|
|
282
|
-
HUB <--> DELEGATOR[Delegator 서비스]
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
HUB -.->|MCP Bridge| External[외부 MCP 클라이언트]
|
|
315
|
+
```bash
|
|
316
|
+
tfx doctor
|
|
317
|
+
tfx doctor --json
|
|
318
|
+
tfx doctor --fix
|
|
319
|
+
tfx doctor --diagnose
|
|
286
320
|
```
|
|
287
321
|
|
|
288
|
-
|
|
322
|
+
`doctor`는 CLI, profile, hook, skill, Hub, MCP registry, route script sync,
|
|
323
|
+
stale team, 로컬 설정 drift를 확인합니다.
|
|
289
324
|
|
|
290
|
-
|
|
325
|
+
### MCP registry
|
|
291
326
|
|
|
292
|
-
|
|
327
|
+
```bash
|
|
328
|
+
tfx mcp list
|
|
329
|
+
tfx mcp sync
|
|
330
|
+
tfx mcp add context7 --url https://mcp.context7.com/mcp
|
|
331
|
+
tfx mcp remove context7
|
|
332
|
+
```
|
|
293
333
|
|
|
294
|
-
|
|
334
|
+
registry가 관리 대상 MCP 설정의 source of truth입니다. Drift 디버깅이 아니라면
|
|
335
|
+
Codex/Gemini/Claude MCP 파일을 직접 수정하지 마세요.
|
|
295
336
|
|
|
296
|
-
|
|
297
|
-
/plugin marketplace add tellang/triflux
|
|
298
|
-
/plugin install triflux@tellang
|
|
299
|
-
```
|
|
337
|
+
### State snapshot
|
|
300
338
|
|
|
301
|
-
|
|
339
|
+
Hub 시작 시 `~/.codex/`, `~/.gemini/` 일부 상태를 ignored `references/*-snapshots/`
|
|
340
|
+
폴더에 best-effort daily snapshot으로 저장할 수 있습니다. 수동 helper:
|
|
302
341
|
|
|
303
342
|
```bash
|
|
304
|
-
npm
|
|
343
|
+
npm run snapshot:codex
|
|
344
|
+
npm run snapshot:gemini
|
|
345
|
+
npm run snapshot:all
|
|
305
346
|
```
|
|
306
347
|
|
|
307
|
-
|
|
348
|
+
### Release/mirror check
|
|
308
349
|
|
|
309
|
-
|
|
350
|
+
패키지 내용에 영향이 있는 저장소 변경은 ship 전에 release gate를 통과시킵니다.
|
|
310
351
|
|
|
311
352
|
```bash
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
# Quick opt-out — 단일 모델로 빠르게 실행
|
|
318
|
-
/tfx-review --quick
|
|
319
|
-
/tfx-plan "add JWT auth middleware" --quick
|
|
320
|
-
|
|
321
|
-
# Debate — 3개의 독립적인 의견을 확보
|
|
322
|
-
/tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"
|
|
323
|
-
|
|
324
|
-
# Persistence — front door에서 직접 호출 가능
|
|
325
|
-
/tfx-auto "implement full auth flow with tests" --retry ralph --max-iterations 10
|
|
326
|
-
|
|
327
|
-
# Team — Multi-CLI 병렬 오케스트레이션
|
|
328
|
-
/tfx-multi "refactor auth + update UI + add tests"
|
|
329
|
-
|
|
330
|
-
# Remote — 단일 진입점
|
|
331
|
-
/tfx-remote spawn ultra4 "보안 리뷰 실행"
|
|
353
|
+
npm run gen:skill-docs
|
|
354
|
+
npm run gen:skill-manifest
|
|
355
|
+
npm run release:check-sync
|
|
356
|
+
npm run release:check-mirror
|
|
357
|
+
npm run lint
|
|
332
358
|
```
|
|
333
|
-
> **참고**: Deep 스킬과 `tfx-auto --mode consensus`, `--retry ralph`, `--shape ...` 경로는 완전한 Tri-CLI 합의(Tier 1)를 위해 **psmux**(또는 tmux), **triflux Hub**, **Codex CLI**, **Gemini CLI**가 필요합니다. 전제조건이 충족되지 않으면 Tier 3(Claude 단독, single-model) 모드로 자동 전환됩니다. `tfx doctor`로 환경을 확인하세요.
|
|
334
|
-
>
|
|
335
|
-
> **Serena 참고**: Serena MCP는 stateful합니다. 따라서 **같은 프로젝트**를 다루는 에이전트끼리만 하나의 Serena 인스턴스를 공유하는 것이 안전합니다. 서로 다른 프로젝트를 병렬로 작업할 때는 Serena 인스턴스를 분리하세요. Serena가 `No active project`를 보고하면 Codex Serena 설정의 `--project-from-cwd`(또는 `--project <path>`)를 확인하고 `tfx doctor`를 다시 실행하세요.
|
|
336
359
|
|
|
337
|
-
|
|
360
|
+
`packages/triflux`는 일부 runtime folder의 npm publish mirror입니다. mirror 대상 파일을
|
|
361
|
+
수정했다면 동기화 상태를 확인하세요.
|
|
338
362
|
|
|
339
|
-
|
|
363
|
+
---
|
|
340
364
|
|
|
341
|
-
|
|
365
|
+
## 플랫폼 지원
|
|
342
366
|
|
|
343
|
-
|
|
|
344
|
-
|
|
345
|
-
|
|
|
346
|
-
|
|
|
347
|
-
|
|
|
348
|
-
| SuperClaude | 22K | index-repo 94% 토큰 절감, 전문가 패널 |
|
|
349
|
-
| oh-my-claudecode | 15K | Ralph 지속 실행, CCG tri-model |
|
|
350
|
-
| ruflo | 28K | 60개 이상의 에이전트 오케스트레이션 |
|
|
351
|
-
| Exa MCP | 3.7K | 뉴럴 검색, 하이라이트 추출 |
|
|
352
|
-
| Brave Search MCP | — | 독립 인덱스, Goggles 재순위 |
|
|
353
|
-
| Tavily MCP | — | Deep Research 파이프라인 |
|
|
367
|
+
| 플랫폼 | Multiplexer | 참고 |
|
|
368
|
+
| --- | --- | --- |
|
|
369
|
+
| macOS | tmux | 지원. 일부 흐름은 `gtimeout` 같은 timeout provider 필요. |
|
|
370
|
+
| Linux | tmux | 지원. |
|
|
371
|
+
| Windows | psmux + Windows Terminal | 관리된 psmux/WT 경로로 지원. psmux 기본 shell은 PowerShell. |
|
|
354
372
|
|
|
355
|
-
|
|
373
|
+
agent/launcher가 따라야 하는 더 엄격한 Windows/psmux 규칙은 `AGENTS.md`와
|
|
374
|
+
`.claude/rules/tfx-psmux.md`를 보세요.
|
|
356
375
|
|
|
357
376
|
---
|
|
358
377
|
|
|
359
|
-
##
|
|
378
|
+
## 보안과 Guard
|
|
360
379
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
380
|
+
| 계층 | 보호 |
|
|
381
|
+
| --- | --- |
|
|
382
|
+
| Hub token auth | 설정된 경우 Hub API에 로컬 bearer token 적용. |
|
|
383
|
+
| Localhost binding | Hub 기본 bind는 `127.0.0.1`. |
|
|
384
|
+
| MCP registry guard | 지원하지 않거나 stale한 MCP record를 관리형 HTTP entry로 교체. |
|
|
385
|
+
| Headless guard | 비관리 Codex/Gemini headless 실행 경로 차단. |
|
|
386
|
+
| Safety guard | psmux/SSH/WT 셸 민감 흐름 sanitizing. |
|
|
387
|
+
| Consensus reporting | deep/consensus workflow는 degraded/disputed 결과를 명시해야 함. |
|
|
366
388
|
|
|
367
389
|
---
|
|
368
390
|
|
|
369
|
-
##
|
|
370
|
-
|
|
371
|
-
- **Linux / macOS**: 네이티브 `tmux` 통합
|
|
372
|
-
- **Windows**: **psmux** (PowerShell Multiplexer) + Windows Terminal 네이티브
|
|
391
|
+
## 개발
|
|
373
392
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
393
|
+
```bash
|
|
394
|
+
npm ci
|
|
395
|
+
npm test
|
|
396
|
+
npm run lint
|
|
397
|
+
npm run release:check-sync
|
|
398
|
+
npm run release:check-mirror
|
|
399
|
+
```
|
|
377
400
|
|
|
378
|
-
|
|
401
|
+
기여자 메모:
|
|
379
402
|
|
|
380
|
-
-
|
|
381
|
-
-
|
|
382
|
-
-
|
|
403
|
+
- deprecated alias 세부사항은 main README에 다시 늘어놓지 말고 [`docs/legacy-skill-aliases.md`](https://github.com/tellang/triflux/blob/main/docs/legacy-skill-aliases.md)를 갱신하세요.
|
|
404
|
+
- Codex-local 실험은 패키지 경계를 의도적으로 바꾸는 경우가 아니라면 `~/.codex/skills` 아래에 둡니다.
|
|
405
|
+
- docs-only 변경은 보통 `npm run lint`, release sync check 같은 targeted check로 충분합니다. full integration test는 Hub 서버와 localhost listener를 띄울 수 있습니다.
|
|
383
406
|
|
|
384
407
|
---
|
|
385
408
|
|
|
386
409
|
<p align="center">
|
|
387
|
-
<sub>MIT License
|
|
410
|
+
<sub>MIT License · Made by <a href="https://github.com/tellang">tellang</a></sub>
|
|
388
411
|
</p>
|