triflux 10.11.0 → 10.13.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 (93) hide show
  1. package/CLAUDE.md +2 -0
  2. package/README.ko.md +95 -81
  3. package/README.md +81 -70
  4. package/bin/triflux.mjs +144 -4
  5. package/hooks/agent-route-guard.mjs +3 -3
  6. package/hooks/keyword-rules.json +4 -4
  7. package/hooks/safety-guard.mjs +6 -16
  8. package/hub/bridge.mjs +47 -0
  9. package/hub/codex-adapter.mjs +5 -1
  10. package/hub/codex-preflight.mjs +50 -0
  11. package/hub/lib/hosts-compat.mjs +241 -0
  12. package/hub/lib/phase-manager.mjs +493 -0
  13. package/hub/lib/risk-tier.mjs +53 -0
  14. package/hub/lib/ssh-command.mjs +8 -12
  15. package/hub/lib/timeline-adapter.mjs +190 -0
  16. package/hub/server.mjs +139 -20
  17. package/hub/team/backend.mjs +11 -4
  18. package/hub/team/build-worker-prompt.mjs +42 -0
  19. package/hub/team/cli/commands/start/index.mjs +7 -16
  20. package/hub/team/cli/services/runtime-mode.mjs +53 -0
  21. package/hub/team/cli/services/state-store.mjs +41 -1
  22. package/hub/team/codex-review.mjs +516 -0
  23. package/hub/team/conductor.mjs +48 -4
  24. package/hub/team/consensus-meta.mjs +176 -0
  25. package/hub/team/execution-mode.mjs +41 -7
  26. package/hub/team/extract-completion-payload.mjs +110 -0
  27. package/hub/team/headless.mjs +10 -0
  28. package/hub/team/orchestrator.mjs +10 -3
  29. package/hub/team/pane.mjs +31 -8
  30. package/hub/team/recovery-store.mjs +149 -0
  31. package/hub/team/schemas/worker-completion.json +39 -0
  32. package/hub/team/sentinel-capture.mjs +127 -0
  33. package/hub/team/swarm-cli.mjs +25 -2
  34. package/hub/team/swarm-hypervisor.mjs +132 -10
  35. package/hub/team/worker-completion-validator.mjs +84 -0
  36. package/hub/team/worktree-lifecycle.mjs +116 -12
  37. package/hud/context-monitor.mjs +9 -6
  38. package/package.json +1 -1
  39. package/scripts/headless-guard.mjs +12 -7
  40. package/scripts/hub-ensure.mjs +3 -0
  41. package/scripts/release/check-packages-mirror.mjs +137 -0
  42. package/scripts/setup.mjs +26 -12
  43. package/scripts/sync-hub-mcp-settings.mjs +115 -2
  44. package/scripts/tfx-gate-activate.mjs +4 -2
  45. package/scripts/tfx-route.sh +34 -6
  46. package/skills/tfx-auto/SKILL.md +439 -6
  47. package/skills/tfx-consensus/SKILL.md +37 -129
  48. package/skills/tfx-debate/SKILL.md +38 -171
  49. package/skills/tfx-panel/SKILL.md +38 -168
  50. package/skills/tfx-psmux-rules/SKILL.md +14 -312
  51. package/skills/tfx-remote/SKILL.md +84 -0
  52. package/skills/tfx-remote-setup/SKILL.md +15 -562
  53. package/skills/tfx-remote-spawn/SKILL.md +17 -250
  54. package/skills/tfx-auto-codex/SKILL.md +0 -45
  55. package/skills/tfx-auto-codex/SKILL.md.tmpl +0 -106
  56. package/skills/tfx-auto-codex/skill.json +0 -7
  57. package/skills/tfx-autoresearch/SKILL.md +0 -24
  58. package/skills/tfx-autoresearch/SKILL.md.tmpl +0 -136
  59. package/skills/tfx-autoresearch/skill.json +0 -15
  60. package/skills/tfx-autoroute/SKILL.md +0 -57
  61. package/skills/tfx-autoroute/SKILL.md.tmpl +0 -189
  62. package/skills/tfx-autoroute/skill.json +0 -7
  63. package/skills/tfx-codex/SKILL.md +0 -38
  64. package/skills/tfx-codex/SKILL.md.tmpl +0 -73
  65. package/skills/tfx-codex/skill.json +0 -7
  66. package/skills/tfx-codex-swarm/SKILL.md +0 -16
  67. package/skills/tfx-codex-swarm/SKILL.md.tmpl +0 -16
  68. package/skills/tfx-codex-swarm/evals/evals.json +0 -26
  69. package/skills/tfx-codex-swarm/mcp-daemon/register-autostart.ps1 +0 -32
  70. package/skills/tfx-codex-swarm/mcp-daemon/start-daemons.ps1 +0 -54
  71. package/skills/tfx-codex-swarm/mcp-daemon/stop-daemons.ps1 +0 -15
  72. package/skills/tfx-codex-swarm/skill.json +0 -5
  73. package/skills/tfx-deep-analysis/SKILL.md +0 -29
  74. package/skills/tfx-deep-analysis/SKILL.md.tmpl +0 -233
  75. package/skills/tfx-deep-analysis/skill.json +0 -7
  76. package/skills/tfx-deep-interview/SKILL.md +0 -23
  77. package/skills/tfx-deep-interview/SKILL.md.tmpl +0 -203
  78. package/skills/tfx-deep-interview/skill.json +0 -12
  79. package/skills/tfx-deep-plan/SKILL.md +0 -23
  80. package/skills/tfx-deep-plan/SKILL.md.tmpl +0 -288
  81. package/skills/tfx-deep-plan/skill.json +0 -14
  82. package/skills/tfx-deep-qa/SKILL.md +0 -24
  83. package/skills/tfx-deep-qa/SKILL.md.tmpl +0 -165
  84. package/skills/tfx-deep-qa/skill.json +0 -7
  85. package/skills/tfx-deep-research/SKILL.md +0 -26
  86. package/skills/tfx-deep-research/SKILL.md.tmpl +0 -217
  87. package/skills/tfx-deep-research/skill.json +0 -15
  88. package/skills/tfx-deep-review/SKILL.md +0 -39
  89. package/skills/tfx-deep-review/SKILL.md.tmpl +0 -185
  90. package/skills/tfx-deep-review/skill.json +0 -13
  91. package/skills/tfx-gemini/SKILL.md +0 -38
  92. package/skills/tfx-gemini/SKILL.md.tmpl +0 -91
  93. package/skills/tfx-gemini/skill.json +0 -7
package/CLAUDE.md CHANGED
@@ -154,6 +154,8 @@ background로 실행한 headless 결과는 **반드시 task-notification 완료
154
154
  |------|------|
155
155
  | `.claude/rules/tfx-routing.md` | 자연어 → 스킬 라우팅, CLI 라우팅 Layer 1~3, 충돌 해소 |
156
156
  | `.claude/rules/tfx-execution-skill-map.md` | tfx-auto / multi / swarm 실행 엔진 매핑, 격리 기준, 안티패턴 |
157
+ | `.claude/rules/tfx-autoplan-principles.md` | gstack autoplan의 6 decision principles, phase 우선순위, 충돌 해소 규칙 추출본 |
157
158
  | `.claude/rules/tfx-update-logic.md` | triflux / OMC / gstack / Codex / Gemini 업데이트 로직 |
159
+ | `.claude/rules/tfx-stack-coexistence.md` | gstack / superpowers / triflux 공존 원칙, 레이어 분리, 의존 방향, 충돌 해소 |
158
160
 
159
161
  Claude Code는 `.claude/rules/*.md` 를 자동 로드한다. Codex CLI는 `@import` 미지원이므로 필요 시 `AGENTS.md` 를 독립 유지한다.
package/README.ko.md CHANGED
@@ -10,13 +10,15 @@
10
10
 
11
11
  <p align="center">
12
12
  <strong>Consensus Intelligence 기반 Tri-CLI 오케스트레이션</strong><br>
13
- <em>Claude + Codex + Gemini — 자연어 라우팅, 교차 모델 리뷰, Deep/Light 변형을 갖춘 38개 스킬.</em>
13
+ <em>Claude + Codex + Gemini — 21개 코어 스킬, 23개 thin alias, 자연어 라우팅, 교차 모델 리뷰.</em>
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
17
  <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
18
  <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
19
  <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/skills-21_core-F5C242?style=flat-square" alt="21개 코어 스킬">
21
+ <sub>+ 23개 thin alias</sub>
20
22
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-374151?style=flat-square" alt="License: MIT"></a>
21
23
  </p>
22
24
 
@@ -27,7 +29,7 @@
27
29
  <p align="center">
28
30
  <a href="#빠른-시작">빠른 시작</a> ·
29
31
  <a href="#tri-cli-합의-엔진">Tri-CLI 합의 엔진</a> ·
30
- <a href="#38개-스킬">38개 스킬</a> ·
32
+ <a href="#전체-21개-스킬-23개-thin-alias-포함">전체 21개 스킬</a> ·
31
33
  <a href="#아키텍처">아키텍처</a> ·
32
34
  <a href="#deep-vs-light">Deep vs Light</a> ·
33
35
  <a href="#보안">보안</a>
@@ -68,33 +70,31 @@ npm install -g triflux
68
70
  # Debate — 3개의 독립적인 의견을 확보
69
71
  /tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"
70
72
 
71
- # Persistence — 완료될 때까지 멈추지 않음
72
- /tfx-persist "implement full auth flow with tests"
73
- # 호환 별칭
74
- /tfx-ralph "implement full auth flow with tests"
73
+ # Persistence — 또는 단일 진입점에서 직접 호출
74
+ /tfx-auto "implement full auth flow with tests" --retry ralph
75
75
 
76
76
  # Team — Multi-CLI 병렬 오케스트레이션
77
77
  /tfx-multi "refactor auth + update UI + add tests"
78
78
 
79
- # Remote — 원격 머신에 Claude 세션 생성
79
+ # Remote — setup, spawn, attach, resume를 하나의 표면으로
80
80
  /tfx-remote-setup # 인터랙티브 호스트 설정 위저드 (Tailscale + SSH)
81
- /tfx-remote-spawn "울트라에서 보안 리뷰 " # 원격 호스트에서 세션 실행
81
+ /tfx-remote spawn ultra4 "보안 리뷰 실행" # 원격 호스트에서 세션 실행
82
82
  ```
83
83
 
84
84
  ---
85
85
 
86
- ## v9의 새로운 기능
86
+ ## v10.11.0의 새로운 기능
87
87
 
88
- **triflux v9**은 **하네스 네이티브 인텔리전스**를 도입합니다. 자연어로 말하면 적절한 스킬로 자동 라우팅되고, 교차 모델 리뷰로 동일 모델의 self-approve를 차단합니다.
88
+ **triflux v10.11.0**은 **하나의 front door + 플래그 기반 라우팅**으로 정리됩니다. 자연어 입력은 계속 지원되고, Phase 3/4에서 legacy 표면은 `tfx-auto`와 `tfx-remote` 뒤로 접히며, 기존 스킬명은 thin alias로 계속 동작합니다.
89
89
 
90
- ### v9 주요 특징
90
+ ### v10.11.0 주요 특징
91
91
 
92
92
  - **자연어 라우팅** — "리뷰해줘"라고 말하면 `/tfx-review`가 자동 호출. "제대로/꼼꼼히" 수정자로 Deep 변형 자동 에스컬레이션
93
93
  - **교차 모델 리뷰** — Claude가 작성하면 Codex가 리뷰, Codex가 작성하면 Claude가 리뷰. 동일 모델 self-approve 차단. 커밋 전 미검증 파일 nudge
94
- - **맥락 격리**현재 맥락과 무관한 요청을 감지하면 별도 psmux 세션으로 분리 제안
95
- - **38개 스킬**Light 14개 + Deep 10개 + Infrastructure 14개, 10개 도메인으로 구성
96
- - **Codex Swarm 강화** PowerShell `.ps1` 런처, 프로파일 기반 실행, `/merge-worktree`로 결과 자동 수집
97
- - **스킬 메타데이터**모든 스킬에 래퍼/인프라/Light-Deep 관계 표기. 트리거 충돌 해소
94
+ - **정확한 카탈로그**44개 스킬 파일 기준 `21 core + 23 thin alias`
95
+ - **Phase 3**`--retry ralph`, `--retry auto-escalate`, `--lead codex`, `--max-iterations N`, 4단계 `DEFAULT_ESCALATION_CHAIN`
96
+ - **Phase 4** — `tfx-auto --shape debate|panel|consensus`, `tfx-remote` 단일 진입점, `tfx-psmux-rules`는 `.claude/rules/tfx-psmux.md`로 이동
97
+ - **하위 호환성 유지** `tfx-persist`, `tfx-debate`, `tfx-multi`, `tfx-remote-spawn` 같은 기존 이름은 thin alias로 계속 지원
98
98
 
99
99
  ### v8 기반 (계속 유지)
100
100
 
@@ -134,93 +134,98 @@ Phase 3: Resolution (합의율 < 70%일 경우)
134
134
 
135
135
  **결과**: 단일 모델 리뷰 대비 오탐(false positive) 87% 감소 (Calimero 합의 연구 기반).
136
136
 
137
+ Phase 4 이후에는 `tfx-auto`가 하나의 front door 역할을 맡습니다. legacy 스킬명은 그대로 받아들이되, 실제 의미는 플래그로 표현됩니다:
138
+
139
+ - `--retry ralph` / `--retry auto-escalate` (Phase 3)
140
+ - `--lead codex` / `--no-claude-native` (Phase 3)
141
+ - `--shape debate|panel|consensus` (Phase 4)
142
+
137
143
  ---
138
144
 
139
- ## 38개 스킬
145
+ ## 전체 21개 스킬 (23개 thin alias 포함)
140
146
 
141
147
  ### 리서치
142
148
 
143
- | 스킬 | 유형 | 설명 | 토큰 |
144
- |------|------|------|------|
145
- | `tfx-research` | Light | Exa/Brave/Tavily 자동 선택을 통한 빠른 웹 검색 | ~5K |
146
- | `tfx-deep-research` | Deep | 다중 소스 병렬 검색 + 3-CLI 교차 검증 | ~50K |
147
- | `tfx-codebase-search` | Light | Haiku 에이전트를 활용한 빠른 코드베이스 탐색 | ~3K |
148
- | `tfx-autoresearch` | Light | 자율 웹 리서치 후 구조화된 리포트 생성 | ~15K |
149
+ | 스킬 | 상태 | 설명 |
150
+ |------|------|------|
151
+ | `tfx-research` | Active | Exa/Brave/Tavily 자동 선택을 통한 빠른 웹 검색 |
152
+ | `tfx-find` | Active | 파일, 심볼, 패턴 중심의 빠른 코드베이스 탐색 |
153
+
154
+ Aliases (fold into `tfx-auto` flags): `tfx-deep-research`, `tfx-autoresearch`
149
155
 
150
- ### 분석
156
+ ### 분석 및 계획
151
157
 
152
- | 스킬 | 유형 | 설명 | 토큰 |
153
- |------|------|------|------|
154
- | `tfx-analysis` | Light | Codex를 통한 빠른 코드/아키텍처 분석 | ~8K |
155
- | `tfx-deep-analysis` | Deep | 3자 관점 분석 + Tri-Debate 합의 도출 | ~30K |
158
+ | 스킬 | 상태 | 설명 |
159
+ |------|------|------|
160
+ | `tfx-analysis` | Active | 빠른 코드/아키텍처 분석 |
161
+ | `tfx-plan` | Active | 빠른 구현 계획 수립 |
162
+ | `tfx-interview` | Active | 소크라테스식 요구사항 탐색 |
163
+
164
+ Aliases (fold into `tfx-auto` flags): `tfx-deep-analysis`, `tfx-deep-plan`, `tfx-deep-interview`
156
165
 
157
166
  ### 실행
158
167
 
159
- | 스킬 | 유형 | 설명 | 토큰 |
160
- |------|------|------|------|
161
- | `tfx-autopilot` | Light | 단순 자율 작업 실행 | ~10K |
162
- | `tfx-deep-autopilot` | Deep | 5단계 전체 파이프라인: Expand → Plan → Execute → QA → Validate | ~80K |
163
- | `tfx-auto` | | 명령어 단축키를 갖춘 통합 CLI 오케스트레이터 | 가변 |
168
+ | 스킬 | 상태 | 설명 |
169
+ |------|------|------|
170
+ | `tfx-auto` | Active | 플래그 기반 라우팅과 legacy surface folding을 담당하는 통합 CLI 오케스트레이터 |
171
+
172
+ Aliases (fold into `tfx-auto` flags): `tfx-autopilot`, `tfx-fullcycle`, `tfx-codex`, `tfx-gemini`
173
+
174
+ ### 리뷰 및 QA
164
175
 
165
- ### QA 검증
176
+ | 스킬 | 상태 | 설명 |
177
+ |------|------|------|
178
+ | `tfx-review` | Active | 빠른 코드 리뷰 |
179
+ | `tfx-qa` | Active | Test → Fix → Retest 순환 (최대 3회) |
180
+ | `tfx-prune` | Active | AI slop 제거, dead code 및 과한 추상화 정리 |
166
181
 
167
- | 스킬 | 유형 | 설명 | 토큰 |
168
- |------|------|------|------|
169
- | `tfx-qa` | Light | Test → Fix → Retest 순환 (최대 3회) | ~5K |
170
- | `tfx-deep-qa` | Deep | 3-CLI 독립 검증 + 합의 점수 산출 | ~25K |
182
+ Aliases (fold into `tfx-auto` flags): `tfx-deep-review`, `tfx-deep-qa`
171
183
 
172
- ### 계획
184
+ ### 토론 및 의사결정
173
185
 
174
- | 스킬 | 유형 | 설명 | 토큰 |
175
- |------|------|------|------|
176
- | `tfx-plan` | Light | Opus를 통한 빠른 구현 계획 수립 | ~8K |
177
- | `tfx-deep-plan` | Deep | Planner + Architect + Critic 합의 기반 계획 | ~20K |
186
+ | 스킬 | 상태 | 설명 |
187
+ |------|------|------|
188
+ | _독립 active 표면 없음_ | | debate, consensus, panel은 이제 `tfx-auto --mode consensus`의 출력 shape로 통합 |
178
189
 
179
- ### 리뷰
190
+ Aliases (fold into `tfx-auto` flags): `tfx-consensus`, `tfx-debate`, `tfx-panel`
180
191
 
181
- | 스킬 | 유형 | 설명 | 토큰 |
182
- |------|------|------|------|
183
- | `tfx-review` | Light | Codex를 통한 빠른 코드 리뷰 | ~8K |
184
- | `tfx-deep-review` | Deep | 3-CLI 독립 리뷰, 합의 항목만 리포팅 | ~25K |
192
+ ### 지속 실행 라우팅
185
193
 
186
- ### 토론 패널
194
+ | 스킬 | 상태 | 설명 |
195
+ |------|------|------|
196
+ | `tfx-index` | Active | 프로젝트 인덱싱으로 94% 토큰 절감 (58K→3K) |
197
+ | `tfx-hooks` | Active | Claude Code hook priority 관리 |
198
+ | `tfx-profile` | Active | Codex/Gemini CLI 프로필 관리 |
187
199
 
188
- | 스킬 | 유형 | 설명 | 토큰 |
189
- |------|------|------|------|
190
- | `tfx-debate` | Deep | 모든 주제에 대한 구조화된 3자 토론 | ~20K |
191
- | `tfx-panel` | Deep | 가상 전문가 패널 시뮬레이션 | ~30K |
200
+ Aliases (fold into `tfx-auto` flags): `tfx-persist`, `tfx-ralph`, `tfx-autoroute`, `tfx-auto-codex`
192
201
 
193
- ### 지속 실행
202
+ ### 오케스트레이션
194
203
 
195
- | 스킬 | 유형 | 설명 | 토큰 |
196
- |------|------|------|------|
197
- | `tfx-persist` | Deep | 완료될 때까지 3자 검증 기반 반복 실행 (`/tfx-ralph` 호환 별칭) | 가변 |
198
- | `tfx-sisyphus` | Light | 모델 에스컬레이션을 갖춘 자동 라우팅 실행 | 가변 |
204
+ | 스킬 | 상태 | 설명 |
205
+ |------|------|------|
206
+ | `tfx-hub` | Active | MCP 메시지 버스 관리 |
207
+ | `tfx-codex-swarm` | Active | Codex swarm 실행 표면 |
208
+ | `merge-worktree` | Active | swarm 결과용 worktree merge helper |
199
209
 
200
- ### 메타 유틸리티
210
+ Aliases (fold into active surfaces): `tfx-multi`, `tfx-swarm`
201
211
 
202
- | 스킬 | 유형 | 설명 | 토큰 |
203
- |------|------|------|------|
204
- | `tfx-index` | Light | 프로젝트 인덱싱으로 94% 토큰 절감 (58K→3K) | ~2K |
205
- | `tfx-forge` | Light | 대화형 스킬 생성 | ~10K |
206
- | `tfx-interview` | Light | 소크라테스식 요구사항 탐색 | ~15K |
207
- | `tfx-deslop` | Deep | 3자 합의 기반 AI slop 제거 | ~10K |
212
+ ### 원격
208
213
 
209
- ### 인프라
214
+ | 스킬 | 상태 | 설명 |
215
+ |------|------|------|
216
+ | `tfx-remote` | Active | setup, spawn, list, attach, send, resume, probe, rules를 묶는 원격 command family |
210
217
 
211
- | 스킬 | 설명 |
212
- |------|------|
213
- | `tfx-consensus` | 핵심 합의 엔진 (내부용, 모든 Deep 스킬이 사용) |
214
- | `tfx-hub` | MCP 메시지 버스 관리 |
215
- | `tfx-multi` | Multi-CLI 오케스트레이션 |
216
- | `tfx-setup` | 초기 설정 마법사 |
217
- | `tfx-doctor` | 진단 자동 복구 |
218
- | `tfx-profile` | Codex CLI 프로필 관리 |
219
- | `tfx-codex` | Codex 전용 오케스트레이터 |
220
- | `tfx-gemini` | Gemini 전용 오케스트레이터 |
221
- | `tfx-auto-codex` | Codex 주도 오케스트레이터 |
222
- | `tfx-remote-spawn` | psmux를 통한 원격 세션 관리 |
223
- | `tfx-remote-setup` | 원격 호스트 설정 위저드 (Tailscale + SSH) |
218
+ Aliases (fold into active surfaces): `tfx-remote-spawn`, `tfx-remote-setup`, `tfx-psmux-rules` — Phase 4에서 `.claude/rules/tfx-psmux.md`로 이동
219
+
220
+ ### 메타
221
+
222
+ | 스킬 | 상태 | 설명 |
223
+ |------|------|------|
224
+ | `tfx-forge` | Active | 대화형 스킬 생성 |
225
+ | `tfx-setup` | Active | 초기 설정 마법사 |
226
+ | `tfx-doctor` | Active | 진단 및 자동 복구 |
227
+ | `tfx-ship` | Active | ship workflow orchestration |
228
+ | `star-prompt` | Active | postinstall GitHub star prompt |
224
229
 
225
230
  ---
226
231
 
@@ -232,6 +237,12 @@ Phase 3: Resolution (합의율 < 70%일 경우)
232
237
  <img src="docs/assets/deep-vs-light.svg" alt="Deep vs Light 비교" width="680">
233
238
  </p>
234
239
 
240
+ Phase 매핑:
241
+
242
+ - `--mode deep` 는 Phase 2의 직접적인 Light → Deep 스위치
243
+ - `--retry ralph` / `--retry auto-escalate` 는 Phase 3의 persistence / escalation 시맨틱
244
+ - `--shape consensus|debate|panel` 은 Phase 4의 consensus output shape 라우팅
245
+
235
246
  | 항목 | Light | Deep |
236
247
  |------|-------|------|
237
248
  | **CLI** | 단일 (주로 Codex) | 3자 (Claude + Codex + Gemini) |
@@ -318,13 +329,16 @@ npm install -g triflux
318
329
  # Debate — 3개의 독립적인 의견을 확보
319
330
  /tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"
320
331
 
321
- # Persistence — 완료될 때까지 멈추지 않음
322
- /tfx-persist "implement full auth flow with tests" # /tfx-ralph 동작
332
+ # Persistence — front door에서 직접 호출 가능
333
+ /tfx-auto "implement full auth flow with tests" --retry ralph --max-iterations 10
323
334
 
324
335
  # Team — Multi-CLI 병렬 오케스트레이션
325
336
  /tfx-multi "refactor auth + update UI + add tests"
337
+
338
+ # Remote — 단일 진입점
339
+ /tfx-remote spawn ultra4 "보안 리뷰 실행"
326
340
  ```
327
- > **참고**: Deep 스킬(`/tfx-deep-*`, `/tfx-persist`, `/tfx-ralph`)은 완전한 Tri-CLI 합의(Tier 1)를 위해 **psmux**(또는 tmux), **triflux Hub**, **Codex CLI**, **Gemini CLI**가 필요합니다. 전제조건이 충족되지 않으면 Tier 3(Claude 단독, single-model) 모드로 자동 전환됩니다. `tfx doctor`로 환경을 확인하세요.
341
+ > **참고**: 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`로 환경을 확인하세요.
328
342
  >
329
343
  > **Serena 참고**: Serena MCP는 stateful합니다. 따라서 **같은 프로젝트**를 다루는 에이전트끼리만 하나의 Serena 인스턴스를 공유하는 것이 안전합니다. 서로 다른 프로젝트를 병렬로 작업할 때는 Serena 인스턴스를 분리하세요. Serena가 `No active project`를 보고하면 Codex Serena 설정의 `--project-from-cwd`(또는 `--project <path>`)를 확인하고 `tfx doctor`를 다시 실행하세요.
330
344
 
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  <h3 align="center">Tri-CLI Orchestration with Consensus Intelligence</h3>
12
12
 
13
13
  <p align="center">
14
- Route tasks across <strong>Claude + Codex + Gemini</strong> — 42 skills, natural language routing,<br>
14
+ Route tasks across <strong>Claude + Codex + Gemini</strong> — 21 core skills, natural language routing,<br>
15
15
  cross-model review, and reflexion-based adaptive learning.
16
16
  </p>
17
17
 
@@ -19,7 +19,8 @@
19
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>
20
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>
21
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>
22
- <img src="https://img.shields.io/badge/skills-42-F5C242?style=flat-square" alt="42 skills">
22
+ <img src="https://img.shields.io/badge/skills-21_core-F5C242?style=flat-square" alt="21 core skills">
23
+ <sub>+ 23 thin aliases</sub>
23
24
  <img src="https://img.shields.io/badge/node-%3E%3D18-374151?style=flat-square" alt="Node >= 18">
24
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>
25
26
  </p>
@@ -32,7 +33,7 @@
32
33
  <a href="#quick-start">Quick Start</a> &middot;
33
34
  <a href="#core-engine">Core Engine</a> &middot;
34
35
  <a href="#killer-skills">Killer Skills</a> &middot;
35
- <a href="#all-42-skills">All 42 Skills</a> &middot;
36
+ <a href="#all-21-skills-plus-23-thin-aliases">All 21 Skills</a> &middot;
36
37
  <a href="#deep-vs-light">Deep vs Light</a> &middot;
37
38
  <a href="#architecture">Architecture</a> &middot;
38
39
  <a href="#security">Security</a>
@@ -44,10 +45,12 @@
44
45
 
45
46
  Most AI coding tools talk to **one model**. triflux talks to **three** — and makes them argue.
46
47
 
47
- triflux is not a collection of skills. It is a **multi-model parallel orchestration harness**. The 42 skills are what it does. The harness — consensus engine, message bus, router, and security guard — is what makes it different.
48
+ triflux is not a collection of skills. It is a **multi-model parallel orchestration harness**. The 21 core skills and 23 thin aliases are what it does. The harness — consensus engine, message bus, router, and security guard — is what makes it different.
48
49
 
49
50
  Every Deep skill runs Claude, Codex, and Gemini **independently** (no cross-visibility), then cross-validates their findings. Only consensus-verified results survive. The result: **87% fewer false positives** compared to single-model review.
50
51
 
52
+ Phase 4 folds the legacy surface into one front door: `tfx-auto` with flag-based routing. Old skill names still work as thin aliases.
53
+
51
54
  You don't need to memorize commands. Say what you want in natural language — triflux routes to the right skill automatically:
52
55
 
53
56
  ```
@@ -89,11 +92,11 @@ Then run `tfx setup` to configure your environment.
89
92
  # Team — Claude + Codex + Gemini on parallel tasks
90
93
  /tfx-multi "refactor auth + update UI + add tests"
91
94
 
92
- # Persist — don't stop until done, 3-party verified
93
- /tfx-persist "implement full auth flow with tests"
95
+ # Persist — or call the front door directly
96
+ /tfx-auto "implement full auth flow with tests" --retry ralph
94
97
 
95
- # Remote — spawn sessions on other machines
96
- /tfx-remote-spawn "run security review on ryzen5-7600"
98
+ # Remote — single front door for setup, spawn, attach, resume
99
+ /tfx-remote spawn ryzen5-7600 "run security review"
97
100
  ```
98
101
 
99
102
  > **Note**: Deep skills require **psmux** (or tmux), **triflux Hub**, **Codex CLI**, and **Gemini CLI** for full Tri-CLI consensus. Without these, skills automatically degrade to Claude-only mode. Run `tfx doctor` to check your environment.
@@ -144,6 +147,11 @@ The bridge client tries Named Pipe first and falls back to HTTP automatically. S
144
147
 
145
148
  `tfx-auto` is the unified entry point. Natural language input → keyword detection → skill routing → CLI dispatch. Depth modifiers ("thoroughly", "제대로") auto-escalate Light skills to Deep. The router handles Korean and English natively.
146
149
 
150
+ tfx-auto flags now express all legacy behaviors:
151
+ - `--retry ralph` / `--retry auto-escalate` (true state machine, Phase 3)
152
+ - `--lead codex` / `--no-claude-native` (Codex-led pipeline, Phase 3)
153
+ - `--shape debate|panel|consensus` (ensemble fold, Phase 4)
154
+
147
155
  ### Guard — Security Perimeter
148
156
 
149
157
  Two layers that enforce the safety boundary:
@@ -196,9 +204,9 @@ plan → PRD → confidence gate → execute → deslop → verify → selfcheck
196
204
 
197
205
  These are why you use triflux. Each one depends on the Core Engine above.
198
206
 
199
- ### Multi-CLI Team Orchestration — `tfx-multi`
207
+ ### Multi-CLI Team Orchestration — `tfx-multi` (alias for `tfx-auto --parallel N`)
200
208
 
201
- Run Claude + Codex + Gemini as a coordinated team on parallel tasks. Say `"refactor auth + update UI + add tests"` and each sub-task is dispatched to the best-fit model, executed in parallel, and results are merged with cross-model review.
209
+ Run Claude + Codex + Gemini as a coordinated team on parallel tasks. Phase 4 keeps `tfx-multi` as a compatibility alias while `tfx-auto --parallel N` becomes the canonical surface.
202
210
 
203
211
  ```bash
204
212
  /tfx-multi "refactor auth + update UI + add tests"
@@ -225,21 +233,22 @@ Example PRD shard:
225
233
 
226
234
  Each shard gets its own git worktree, file-lease enforcement prevents conflicts, and results merge automatically in dependency order. Critical shards run on two different models for redundant verification.
227
235
 
228
- ### Remote Sessions — `tfx-remote-spawn`
236
+ ### Remote Sessions — `tfx-remote`
229
237
 
230
- Spawn Claude Code sessions on remote machines via SSH. Tailscale auto-discovery, host capability probing, session handoff, prompt injection into running sessions, and session re-attachment.
238
+ `tfx-remote` is the consolidated remote surface. Setup, spawn, attach, send, resume, probe, and rules now live behind one command family. `tfx-remote-spawn` remains as a thin alias during the transition.
231
239
 
232
240
  ```bash
233
- /tfx-remote-spawn "run security review on ryzen5-7600"
234
- /tfx-remote-spawn list # see active remote sessions
241
+ /tfx-remote spawn ryzen5-7600 "run security review"
242
+ /tfx-remote list # see active remote sessions
235
243
  ```
236
244
 
237
- ### Persistence Loop — `tfx-persist` (ralph)
245
+ ### Persistence Loop — `tfx-persist` (alias for `tfx-auto --retry ralph`)
238
246
 
239
- "Don't stop until it's done." A 3-party verified execution loop that keeps going until the task passes consensus verification. Bounded at 10 iterations with state persistence for crash recovery.
247
+ "Don't stop until it's done." Phase 3 turns `--retry ralph` into the real persistence state machine, with `--max-iterations N` and the four-step `DEFAULT_ESCALATION_CHAIN` available from the unified surface.
240
248
 
241
249
  ```bash
242
250
  /tfx-persist "implement full auth flow with tests"
251
+ /tfx-auto "implement full auth flow with tests" --retry ralph --max-iterations 10
243
252
  ```
244
253
 
245
254
  ### 3-Party Consensus Reviews — `tfx-deep-review` / `tfx-deep-plan`
@@ -251,9 +260,9 @@ The bread-and-butter Deep skills. Three models independently review your code or
251
260
  /tfx-deep-plan "migrate to GraphQL" # 3-party planning
252
261
  ```
253
262
 
254
- ### Structured Debate — `tfx-debate`
263
+ ### Structured Debate — `tfx-debate` (alias for `tfx-auto --mode consensus --shape debate`)
255
264
 
256
- Three models take independent positions on a technical question, debate, and converge on a recommendation. Anti-herding ensures genuine independence.
265
+ Three models take independent positions on a technical question, debate, and converge on a recommendation. Anti-herding ensures genuine independence, while Phase 4 folds the output shape into `tfx-auto`.
257
266
 
258
267
  ```bash
259
268
  /tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"
@@ -261,7 +270,7 @@ Three models take independent positions on a technical question, debate, and con
261
270
 
262
271
  ---
263
272
 
264
- ## All 42 Skills
273
+ ## All 21 Skills (plus 23 thin aliases)
265
274
 
266
275
  <details>
267
276
  <summary>Expand full skill list</summary>
@@ -270,86 +279,83 @@ Three models take independent positions on a technical question, debate, and con
270
279
 
271
280
  | Skill | Type | Description |
272
281
  |-------|------|-------------|
273
- | `tfx-research` | Light | Quick web search via Exa/Brave/Tavily auto-selection |
274
- | `tfx-deep-research` | Deep | Multi-source parallel search with 3-CLI cross-validation |
275
- | `tfx-find` | Light | Fast codebase search — files, symbols, patterns |
276
- | `tfx-autoresearch` | Light | Autonomous web research to structured report |
282
+ | `tfx-research` | Active | Quick web search via Exa/Brave/Tavily auto-selection |
283
+ | `tfx-find` | Active | Fast codebase search files, symbols, patterns |
284
+
285
+ Aliases (fold into `tfx-auto` flags): `tfx-deep-research`, `tfx-autoresearch`
277
286
 
278
287
  ### Analysis & Planning
279
288
 
280
289
  | Skill | Type | Description |
281
290
  |-------|------|-------------|
282
- | `tfx-analysis` | Light | Quick code/architecture analysis |
283
- | `tfx-deep-analysis` | Deep | 3-perspective analysis with Tri-Debate consensus |
284
- | `tfx-plan` | Light | Quick implementation plan |
285
- | `tfx-deep-plan` | Deep | Planner + Architect + Critic consensus planning |
286
- | `tfx-interview` | Light | Socratic requirements exploration |
287
- | `tfx-deep-interview` | Deep | Deep interview with mathematical ambiguity gating |
291
+ | `tfx-analysis` | Active | Quick code/architecture analysis |
292
+ | `tfx-plan` | Active | Quick implementation plan |
293
+ | `tfx-interview` | Active | Socratic requirements exploration |
294
+
295
+ Aliases (fold into `tfx-auto` flags): `tfx-deep-analysis`, `tfx-deep-plan`, `tfx-deep-interview`
288
296
 
289
297
  ### Execution
290
298
 
291
299
  | Skill | Type | Description |
292
300
  |-------|------|-------------|
293
- | `tfx-auto` | Router | Unified CLI orchestrator — auto-triage + command shortcuts |
294
- | `tfx-autopilot` | Light | Single-file autonomous execution (<5min tasks) |
295
- | `tfx-fullcycle` | Deep | Full pipeline: Design Plan → Execute → QA → Verify |
301
+ | `tfx-auto` | Active | Unified CLI orchestrator — auto-triage, flag-based routing, and legacy surface folding |
302
+
303
+ Aliases (fold into `tfx-auto` flags): `tfx-autopilot`, `tfx-fullcycle`, `tfx-codex`, `tfx-gemini`
296
304
 
297
305
  ### Review & QA
298
306
 
299
307
  | Skill | Type | Description |
300
308
  |-------|------|-------------|
301
- | `tfx-review` | Light | Quick code review |
302
- | `tfx-deep-review` | Deep | 3-CLI independent review, consensus-only reporting |
303
- | `tfx-qa` | Light | Test Fix Retest cycle (max 3 rounds) |
304
- | `tfx-deep-qa` | Deep | 3-CLI independent verification with consensus scoring |
309
+ | `tfx-review` | Active | Quick code review |
310
+ | `tfx-qa` | Active | Test Fix Retest cycle (max 3 rounds) |
311
+ | `tfx-prune` | Active | AI slop removal dead code, over-abstraction cleanup |
312
+
313
+ Aliases (fold into `tfx-auto` flags): `tfx-deep-review`, `tfx-deep-qa`
305
314
 
306
315
  ### Debate & Decision
307
316
 
308
317
  | Skill | Type | Description |
309
318
  |-------|------|-------------|
310
- | `tfx-debate` | Deep | Structured 3-party debate on any topic |
311
- | `tfx-panel` | Deep | Virtual expert panel simulation |
319
+ | _No standalone active surface_ | | Debate, consensus, and panel shapes now route through `tfx-auto --mode consensus` |
320
+
321
+ Aliases (fold into `tfx-auto` flags): `tfx-consensus`, `tfx-debate`, `tfx-panel`
312
322
 
313
323
  ### Persistence & Routing
314
324
 
315
325
  | Skill | Type | Description |
316
326
  |-------|------|-------------|
317
- | `tfx-persist` | Deep | 3-party verified loop until task completion |
318
- | `tfx-ralph` | | Alias for `tfx-persist` |
319
- | `tfx-autoroute` | Light | Auto model escalation on failure |
320
- | `tfx-auto-codex` | — | Codex-lead orchestrator |
327
+ | `tfx-index` | Active | Project indexing 94% token reduction (58K → 3K) |
328
+ | `tfx-hooks` | Active | Claude Code hook priority manager |
329
+ | `tfx-profile` | Active | Codex/Gemini CLI profile management |
330
+
331
+ Aliases (fold into `tfx-auto` flags): `tfx-persist`, `tfx-ralph`, `tfx-autoroute`, `tfx-auto-codex`
321
332
 
322
333
  ### Orchestration & Infrastructure
323
334
 
324
335
  | Skill | Description |
325
336
  |-------|-------------|
326
- | `tfx-consensus` | Core consensus engine (used by all Deep skills) |
327
337
  | `tfx-hub` | MCP message bus — Named Pipe & HTTP bridge |
328
- | `tfx-multi` | Multi-CLI team orchestration (2+ parallel tasks) |
329
- | `tfx-swarm` | Multi-machine x multi-model swarm (PRD → shard → worktree, local+remote) |
330
- | `tfx-codex` | Codex-only orchestrator |
331
- | `tfx-gemini` | Gemini-only orchestrator |
338
+ | `tfx-codex-swarm` | Codex swarm execution surface |
339
+ | `merge-worktree` | Worktree merge helper for swarm results |
340
+
341
+ Aliases (fold into active surfaces): `tfx-multi`, `tfx-swarm`
332
342
 
333
343
  ### Remote
334
344
 
335
345
  | Skill | Description |
336
346
  |-------|-------------|
337
- | `tfx-remote-spawn` | Spawn Claude sessions on remote machines via SSH |
338
- | `tfx-remote-setup` | Interactive host wizard (Tailscale + SSH discovery) |
347
+ | `tfx-remote` | Unified remote command family setup, spawn, list, attach, send, resume, probe, rules |
348
+
349
+ Aliases (fold into active surfaces): `tfx-remote-spawn`, `tfx-remote-setup`, `tfx-psmux-rules` — moved to `.claude/rules/tfx-psmux.md` in Phase 4
339
350
 
340
351
  ### Meta & Tooling
341
352
 
342
353
  | Skill | Description |
343
354
  |-------|-------------|
344
- | `tfx-index` | Project indexing — 94% token reduction (58K → 3K) |
345
355
  | `tfx-forge` | Create new skills interactively |
346
- | `tfx-prune` | AI slop removal — dead code, over-abstraction cleanup |
347
356
  | `tfx-setup` | Initial setup wizard |
348
357
  | `tfx-doctor` | Diagnostics and auto-repair |
349
- | `tfx-hooks` | Claude Code hook priority manager |
350
- | `tfx-profile` | Codex/Gemini CLI profile management |
351
- | `tfx-psmux-rules` | psmux command generation rules |
352
- | `merge-worktree` | Worktree merge helper for swarm results |
358
+ | `tfx-ship` | Ship workflow orchestration |
353
359
  | `star-prompt` | GitHub star prompt for postinstall |
354
360
 
355
361
  </details>
@@ -364,6 +370,11 @@ Three models take independent positions on a technical question, debate, and con
364
370
 
365
371
  Every domain offers both modes. Depth modifiers in natural language auto-escalate:
366
372
 
373
+ Phase mapping:
374
+ - `--mode deep` is the direct Light → Deep switch from Phase 2
375
+ - `--retry ralph` / `--retry auto-escalate` add Phase 3 persistence and escalation semantics
376
+ - `--shape consensus|debate|panel` adds Phase 4 output-shape routing on top of consensus mode
377
+
367
378
  | Dimension | Light | Deep |
368
379
  |-----------|-------|------|
369
380
  | **Models** | Single (usually Codex) | 3-party (Claude + Codex + Gemini) |
@@ -421,7 +432,7 @@ graph TD
421
432
 
422
433
  ## TUI Routing Monitor
423
434
 
424
- **New in v10.1** — `tfx monitor` launches an interactive terminal dashboard:
435
+ **Available in v10.11.0** — `tfx monitor` launches an interactive terminal dashboard:
425
436
 
426
437
  ```
427
438
  ┌─ Routing Monitor ─────────────────────────────────────────┐
@@ -448,27 +459,27 @@ The monitor visualizes:
448
459
 
449
460
  ## What's New
450
461
 
451
- ### v10.1Reflexion Pipeline + TUI Monitor
462
+ ### v10.11.0Phase 3: Retry, Escalation, Codex Lead
452
463
 
453
464
  | Feature | Description |
454
465
  |---------|-------------|
455
- | **TUI Routing Monitor** | `tfx monitor` interactive terminal dashboard showing real-time skill routing, model selection, and success rates |
456
- | **Reflexion Pipeline** | safety-guard events feed into a reflexion store, enabling adaptive learning from past routing decisions |
457
- | **Adaptive Rules API v2** | Penalty promotion pipeline (`pending-penalties` `adaptive_rules`), hit_count isolation, schema v2 with 18 tests |
458
- | **Q-Learning Routing** | Experimental dynamic skill routing via Q-table weight optimization (`TRIFLUX_DYNAMIC_ROUTING=true`) |
459
- | **Security Hardening** | headless-guard: wrapper bypass, pipe bypass, env escape vectors blocked. SSH bash-syntax forwarding prevention |
460
- | **HUD System** | Codex plan-aware status display with correct bucket-to-slot mapping |
466
+ | **True Ralph Retry** | `--retry ralph` now maps to the real persistence state machine instead of a bounded placeholder |
467
+ | **Auto Escalation** | `--retry auto-escalate` enables the four-step `DEFAULT_ESCALATION_CHAIN` |
468
+ | **Codex-Led Pipeline** | `--lead codex` and `--no-claude-native` expose the Codex-first execution lane |
469
+ | **Iteration Budgeting** | `--max-iterations N` makes retry loops explicit and reviewable |
470
+ | **Reflexion + Guards** | safety-guard and headless-guard continue feeding adaptive learning and hard security boundaries |
471
+ | **Routing Monitor** | `tfx monitor` remains the live view over skill routing, model mix, and latency |
461
472
 
462
- ### v10.0 — 4-Lake Roadmap
473
+ ### v10.11.0 — Phase 4: Flag-Based Surface Consolidation
463
474
 
464
475
  <details>
465
- <summary>Expand v10.0 details</summary>
476
+ <summary>Expand Phase 4 details</summary>
466
477
 
467
- - **Lake 1: CLI Stability** — Retry, stall detection, version cache. Zero silent failures
468
- - **Lake 2: Plugin Isolation** — cli-adapter-base, team-bridge, pack.mjs sync
469
- - **Lake 3: Remote Infrastructure** — SSH keepalive/retry, hosts.json capability routing, MCP singleton daemon
470
- - **Lake 4: Token Optimization** — Skill template engine, shared segments, manifest separation. 62% prompt token reduction
471
- - **Lake 5: Agent Mesh** — Message routing, per-agent queues, heartbeat monitoring, Conductor integration
478
+ - **One front door** — `tfx-auto` now absorbs legacy behaviors through flags instead of one-off top-level surfaces
479
+ - **Consensus shapes** — `--shape consensus|debate|panel` folds ensemble behaviors into the main router
480
+ - **Remote consolidation** — `tfx-remote` becomes the single remote surface while `tfx-remote-spawn` remains a thin alias
481
+ - **Rules relocation** — `tfx-psmux-rules` moved out of the skill surface to `.claude/rules/tfx-psmux.md`
482
+ - **Legacy compatibility** — 23 thin aliases remain for transition safety and are slated for later removal
472
483
 
473
484
  </details>
474
485