triflux 3.2.0-dev.11 → 3.2.0-dev.13

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.
@@ -6,17 +6,18 @@ triggers:
6
6
  argument-hint: '"작업 설명" | --agents codex,gemini "작업" | --tmux "작업" | status | stop'
7
7
  ---
8
8
 
9
- # tfx-multi v2.2슬림 래퍼 + 네비게이션 복원 기반 멀티-CLI 팀 오케스트레이터
9
+ # tfx-multi v3파이프라인 기반 멀티-CLI 팀 오케스트레이터
10
10
 
11
11
  > Claude Code Native Teams의 Shift+Down 네비게이션을 복원한다.
12
12
  > Codex/Gemini 워커마다 최소 프롬프트(~100 토큰)의 슬림 Agent 래퍼를 spawn하여 네비게이션에 등록하고,
13
13
  > 실제 작업은 `tfx-route.sh`가 수행한다. task 상태는 `team_task_list`를 truth source로 검증한다.
14
- > v2.2 현재 슬림 래퍼 Agent로 Shift+Down 네비게이션 복원, Opus 토큰 77% 절감.
14
+ > v3`--quick`(기본, v2.2 호환) + `--thorough`(전체 파이프라인: plan→prd→exec→verify→fix loop).
15
15
 
16
16
  ## 사용법
17
17
 
18
18
  ```
19
- /tfx-multi "인증 리팩터링 + UI 개선 + 보안 리뷰"
19
+ /tfx-multi "인증 리팩터링 + UI 개선 + 보안 리뷰" # --quick (기본)
20
+ /tfx-multi --thorough "인증 리팩터링 + UI 개선 + 보안 리뷰" # 전체 파이프라인
20
21
  /tfx-multi --agents codex,gemini "프론트+백엔드"
21
22
  /tfx-multi --tmux "작업" # 레거시 tmux 모드
22
23
  /tfx-multi status
@@ -60,7 +61,7 @@ argument-hint: '"작업 설명" | --agents codex,gemini "작업" | --tmux "작
60
61
  (`bin/triflux.mjs` 절대경로는 triflux 패키지 루트 기준)
61
62
  - 그 외 → Phase 2 트리아지
62
63
 
63
- **--tmux 감지:** 입력에 `--tmux`가 포함되면 Phase 3-tmux로 분기.
64
+ **--tmux/--psmux 감지:** 입력에 `--tmux` 또는 `--psmux`가 포함되면 Phase 3-mux로 분기. psmux가 primary (Windows).
64
65
 
65
66
  ### Phase 2: 트리아지 (tfx-auto와 동일)
66
67
 
@@ -96,6 +97,32 @@ Bash("codex exec --full-auto --skip-git-repo-check '다음 작업을 분석하
96
97
 
97
98
  Codex 분류 건너뜀 → Opus가 직접 N개 서브태스크 분해.
98
99
 
100
+ ### Phase 2.5–2.6: 파이프라인 Plan/PRD (`--thorough` 전용)
101
+
102
+ > `--quick`(기본) 모드에서는 이 단계를 건너뛰고 Phase 3으로 직행한다.
103
+ > `--thorough` 모드에서만 실행된다.
104
+
105
+ ```
106
+ [--thorough 모드 감지]
107
+
108
+ Phase 2.5: Plan (Codex architect)
109
+ 1. Hub pipeline 초기화:
110
+ Bash("node hub/bridge.mjs pipeline-advance --team ${teamName} --status plan")
111
+ — 또는 createPipeline(db, teamName) 직접 호출
112
+ 2. Codex architect로 작업 분석 + 접근법 설계:
113
+ bash ~/.claude/scripts/tfx-route.sh architect "${task}" analyze
114
+ 3. 결과를 파이프라인 artifact에 저장:
115
+ pipeline.setArtifact('plan_path', planOutputPath)
116
+ 4. pipeline advance: plan → prd
117
+
118
+ Phase 2.6: PRD (Codex analyst)
119
+ 1. Codex analyst로 수용 기준 확정:
120
+ bash ~/.claude/scripts/tfx-route.sh analyst "${task}" analyze
121
+ 2. 결과를 파이프라인 artifact에 저장:
122
+ pipeline.setArtifact('prd_path', prdOutputPath)
123
+ 3. pipeline advance: prd → exec
124
+ ```
125
+
99
126
  ### Phase 3: Native Teams 실행 (v2.1 개편)
100
127
 
101
128
  트리아지 결과를 Claude Code 네이티브 Agent Teams로 실행한다.
@@ -212,6 +239,37 @@ Shift+Down으로 다음 워커 (마지막→리드 wrap), Shift+Tab으로 이전
212
239
  (Shift+Up은 Claude Code 미지원 — 대부분 터미널에서 scroll-up으로 먹힘)"
213
240
  ```
214
241
 
242
+ ### Phase 3.5–3.7: Verify/Fix Loop (`--thorough` 전용)
243
+
244
+ > `--quick`(기본) 모드에서는 이 단계를 건너뛰고 Phase 4로 직행한다.
245
+ > `--thorough` 모드에서만 실행된다.
246
+
247
+ ```
248
+ Phase 3.5: Verify (Codex review)
249
+ 1. pipeline advance: exec → verify
250
+ 2. Codex verifier로 결과 검증:
251
+ bash ~/.claude/scripts/tfx-route.sh verifier "결과 검증: ${task}" review
252
+ — verifier는 Codex --profile thorough review로 실행됨
253
+ 3. 검증 결과를 파이프라인 artifact에 저장:
254
+ pipeline.setArtifact('verify_report', verifyOutputPath)
255
+ 4. 통과 → pipeline advance: verify → complete → Phase 5 (cleanup)
256
+ 5. 실패 → Phase 3.6
257
+
258
+ Phase 3.6: Fix (Codex executor, max 3회)
259
+ 1. pipeline advance: verify → fix
260
+ — fix_attempt 자동 증가, fix_max(3) 초과 시 전이 거부
261
+ 2. fix_attempt > fix_max → Phase 3.7 (ralph loop) 또는 failed 보고 → Phase 5
262
+ 3. Codex executor로 실패 항목 수정:
263
+ bash ~/.claude/scripts/tfx-route.sh executor "실패 항목 수정: ${failedItems}" implement
264
+ 4. pipeline advance: fix → exec (재실행)
265
+ 5. → Phase 3 (exec) → Phase 3.5 (verify) 재실행
266
+
267
+ Phase 3.7: Ralph Loop (fix 3회 초과 시)
268
+ 1. ralph_iteration 증가 (pipeline.restart())
269
+ 2. ralph_iteration > ralph_max(10) → 최종 failed → Phase 5
270
+ 3. fix_attempt 리셋, 전체 파이프라인 재시작 (Phase 2.5 plan부터)
271
+ ```
272
+
215
273
  ### Phase 4: 결과 수집 (truth source = team_task_list)
216
274
 
217
275
  1. 리드가 Step 3c에서 실행한 모든 백그라운드 Bash 프로세스 완료를 대기한다.
@@ -254,9 +312,12 @@ Bash("node hub/bridge.mjs team-task-list --team ${teamName}")
254
312
  ```
255
313
  5. 종합 보고서를 출력한다.
256
314
 
257
- ### Phase 3-tmux: 레거시 tmux 모드
258
- --tmux 플래그 시 기존 v1 방식으로 실행: Bash("node {PKG_ROOT}/bin/triflux.mjs multi --no-attach --agents {agents} \\\"{task}\\\"")
259
- 이후 사용자에게 tmux 세션 연결 안내.
315
+ ### Phase 3-mux: 레거시 psmux/tmux 모드
316
+ `--tmux` 또는 `--psmux` 플래그 시 pane 기반 실행. `detectMultiplexer()`가 psmux tmux → wsl-tmux git-bash-tmux 순으로 자동 감지.
317
+ Windows에서는 **psmux가 1순위** (ADR-001).
318
+
319
+ Bash("node {PKG_ROOT}/bin/triflux.mjs multi --no-attach --agents {agents} \\\"{task}\\\"")
320
+ 이후 사용자에게 세션 연결 안내.
260
321
 
261
322
  ## 에이전트 매핑
262
323
  > 에이전트 매핑: codex/gemini → tfx-route.sh, claude → Agent(subagent_type) 직접 실행. 상세는 Phase 3c/3d 참조.
@@ -266,14 +327,15 @@ Bash("node hub/bridge.mjs team-task-list --team ${teamName}")
266
327
  - **CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1** — settings.json env에 설정 (`tfx setup`이 자동 설정)
267
328
  - **codex/gemini CLI** — 해당 에이전트 사용 시
268
329
  - **tfx setup** — tfx-route.sh 동기화 + AGENT_TEAMS 자동 설정 (사전 실행 권장)
269
- - **Hub 활성 상태** — Named Pipe(`\\.\pipe\triflux-{pid}`) 우선, HTTP `127.0.0.1:27888` fallback. `bridge.mjs`가 자동 선택.
330
+ - **Hub 활성 상태** — Named Pipe(`\\.\pipe\triflux-{pid}`) 우선, HTTP `127.0.0.1:27888` fallback. `bridge.mjs`가 자동 선택. Hub 미실행 시 nativeProxy fallback.
331
+ - **멀티플렉서** — psmux(Windows 1순위) / tmux / wsl-tmux / git-bash-tmux 자동 감지 (`--tmux`/`--psmux` 모드)
270
332
  - **출력 정책** — preflight는 비동기/요약 출력이 기본이며, 실패 시에만 상세 출력
271
333
 
272
334
  ## 에러 처리
273
335
 
274
336
  | 에러 | 처리 |
275
337
  |------|------|
276
- | TeamCreate 실패 / Agent Teams 비활성 | `--tmux` 폴백 (Phase 3-tmux로 전환) |
338
+ | TeamCreate 실패 / Agent Teams 비활성 | `--psmux/--tmux` 폴백 (Phase 3-mux로 전환) |
277
339
  | tfx-route.sh 없음 | `tfx setup` 실행 안내 |
278
340
  | CLI 미설치 (codex/gemini) | 해당 서브태스크를 claude 워커로 대체 |
279
341
  | Codex 분류 실패 | Opus 직접 분류+분해 |
@@ -292,5 +354,6 @@ Bash("node hub/bridge.mjs team-task-list --team ${teamName}")
292
354
  | `scripts/tfx-route.sh` | 팀 통합 라우터 (`TFX_TEAM_*`, task claim/complete, send-message, Named Pipe/HTTP bridge) |
293
355
  | `hub/team/native.mjs` | Native Teams 래퍼 (프롬프트 템플릿, 팀 설정 빌더) |
294
356
  | `hub/team/cli.mjs` | tmux 팀 CLI (`--tmux` 레거시 모드) |
357
+ | `hub/pipeline/` | 파이프라인 상태 기계 (transitions, state, index) — `--thorough` 모드 |
295
358
  | `tfx-auto` | one-shot 실행 오케스트레이터 (병행 유지) |
296
359
  | `tfx-hub` | MCP 메시지 버스 관리 (tmux 모드용) |