triflux 8.3.0 → 8.4.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.md CHANGED
@@ -9,8 +9,8 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <strong>The Multi-Model Orchestration Hub for Claude Code</strong><br>
13
- <em>Vanish Claude tokens. Route tasks to Codex and Gemini via high-performance Hub IPC.</em>
12
+ <strong>Tri-CLI Orchestration with Consensus Intelligence</strong><br>
13
+ <em>Claude + Codex + Gemini 3-party debate, anti-herding verification, and 33 skills with Deep/Light variants.</em>
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -31,55 +31,189 @@
31
31
 
32
32
  <p align="center">
33
33
  <a href="#quick-start">Quick Start</a> ·
34
+ <a href="#tri-cli-consensus">Tri-CLI Consensus</a> ·
35
+ <a href="#33-skills">33 Skills</a> ·
34
36
  <a href="#architecture">Architecture</a> ·
35
- <a href="#pipeline-thorough">Pipeline</a> ·
36
- <a href="#delegator-mcp">Delegator MCP</a> ·
37
- <a href="#agent-types">Agent Types</a> ·
37
+ <a href="#deep-vs-light">Deep vs Light</a> ·
38
38
  <a href="#security">Security</a>
39
39
  </p>
40
40
 
41
41
  ---
42
42
 
43
- ## What's New in v5?
43
+ ## What's New in v8
44
44
 
45
- **triflux v5** keeps the v4 orchestration foundation intact while making the pipeline smarter, more phase-aware, and more collaborative. For multi-task orchestration, `--thorough` is now the default path, so planning, approval, verification, and recovery stay on by default instead of being bolted on later.
45
+ **triflux v8** introduces **Tri-CLI Consensus Intelligence** a fundamentally new approach where Claude, Codex, and Gemini independently analyze, then cross-validate through structured debate. Every Deep skill guarantees anti-herding (no bias contamination) and consensus-gated output.
46
46
 
47
- ### Key Features
47
+ ### Highlights
48
48
 
49
- - **`--thorough` by Default** — Multi-task orchestration now defaults to the full `plan` `prd` `exec` → `verify` → `fix` pipeline. Reach for `--quick` only when you explicitly want the lighter path.
50
- - **Opus × Codex Scout Planning** — In `plan`, Opus leads architecture decisions while Codex scout workers explore the codebase in parallel and feed findings back into the final plan.
51
- - **DAG-based Routing Heuristics** — Routing now considers both `dag_width` and `complexity` to choose between `quick_single`, `thorough_single`, `quick_team`, `thorough_team`, and `batch_single`.
52
- - **Restored Feedback Loop** — Workers can be re-run for multiple iterations and receive lead feedback before final completion.
53
- - **HITL Approval Gate** — `pipeline_advance_gated` inserts a human approval checkpoint before gated phase transitions.
54
- - **Phase-aware MCP Filtering** — MCP exposure changes by pipeline phase so `plan`, `prd`, and `verify` stay read-focused while `exec` keeps broader tooling.
55
- - **Persistent Plan Files** — Final plan markdown is saved to `.tfx/plans/{team}-plan.md` and tracked as a pipeline artifact.
56
- - **Hub IPC Architecture** — Lightning-fast resident Hub server with Named Pipe & HTTP MCP bridge.
57
- - **Delegator MCP** — Native MCP tools (`delegate`, `reply`, `status`) for seamless agent interaction.
58
- - **psmux / Windows Native** — Hybrid support for `tmux` (WSL) and `psmux` (Windows Terminal native).
59
- - **QoS Dashboard** — Real-time health monitoring with AIMD-based dynamic batch sizing.
60
- - **21+ specialized agents** — From `scientist-deep` to `spark_fast`, each optimized for specific tasks.
49
+ - **33 Skills** — 11 Light + 10 Deep + 12 Infrastructure, organized across 9 domains
50
+ - **Tri-Debate Engine** — 3-CLI independent analysis with anti-herding, cross-validation, and consensus scoring
51
+ - **Deep/Light Variants** — Every capability has a token-efficient Light mode and a thorough Deep mode
52
+ - **Consensus Gate** — Deep skills require 2/3+ CLI agreement; learned weights track CLI reliability over time
53
+ - **Anti-Herding** — Round 1 runs in parallel with zero cross-visibility to prevent bias contamination
54
+ - **Expert Panel** — Virtual expert simulation (Fowler, Newman, Porter, etc.) via `tfx-panel`
55
+ - **94% Token Reduction** — `tfx-index` creates a 3KB project map replacing 58K tokens of file reads
56
+ - **Persistence Loops** — `tfx-ralph` (3-party verified) and `tfx-sisyphus` (auto-routing) run until verified complete
57
+ - **Hub IPC** — Lightning-fast resident Hub server with Named Pipe & HTTP MCP bridge
58
+ - **psmux / Windows Native** — Hybrid support for `tmux` (WSL) and `psmux` (Windows Terminal)
61
59
 
62
60
  ---
63
61
 
64
- ## Architecture
62
+ ## Tri-CLI Consensus
63
+
64
+ The core innovation of triflux. Instead of trusting a single model, every Deep skill runs:
65
+
66
+ ```
67
+ Phase 1: Independent Analysis (Anti-Herding)
68
+ ├─ Claude Opus → Analysis A (isolated, no cross-visibility)
69
+ ├─ Codex CLI → Analysis B (isolated, no cross-visibility)
70
+ └─ Gemini CLI → Analysis C (isolated, no cross-visibility)
71
+
72
+ Phase 2: Cross-Validation
73
+ ├─ Compare all findings across 3 sources
74
+ ├─ Items with 2/3+ agreement → CONSENSUS
75
+ └─ Items with 1/3 only → DISPUTED (needs resolution)
76
+
77
+ Phase 3: Resolution (if consensus < 70%)
78
+ ├─ Each CLI reviews opposing arguments
79
+ ├─ Accept or rebut with evidence
80
+ └─ Unresolved → user decides
81
+ ```
82
+
83
+ **Result**: 87% fewer false positives compared to single-model review (based on Calimero consensus research).
84
+
85
+ ---
86
+
87
+ ## 33 Skills
88
+
89
+ ### Research
90
+
91
+ | Skill | Type | Description | Tokens |
92
+ |-------|------|-------------|--------|
93
+ | `tfx-research` | Light | Quick web search via Exa/Brave/Tavily auto-selection | ~5K |
94
+ | `tfx-deep-research` | Deep | Multi-source parallel search with 3-CLI cross-validation | ~50K |
95
+ | `tfx-codebase-search` | Light | Fast codebase exploration via Haiku agent | ~3K |
96
+ | `tfx-autoresearch` | Light | Autonomous web research to structured report | ~15K |
97
+
98
+ ### Analysis
99
+
100
+ | Skill | Type | Description | Tokens |
101
+ |-------|------|-------------|--------|
102
+ | `tfx-analysis` | Light | Quick code/architecture analysis via Codex | ~8K |
103
+ | `tfx-deep-analysis` | Deep | 3-perspective analysis + Tri-Debate consensus | ~30K |
104
+
105
+ ### Execution
106
+
107
+ | Skill | Type | Description | Tokens |
108
+ |-------|------|-------------|--------|
109
+ | `tfx-autopilot` | Light | Simple autonomous task execution | ~10K |
110
+ | `tfx-deep-autopilot` | Deep | Full 5-phase pipeline: Expand → Plan → Execute → QA → Validate | ~80K |
111
+ | `tfx-auto` | — | Unified CLI orchestrator with command shortcuts | varies |
112
+
113
+ ### QA & Verification
114
+
115
+ | Skill | Type | Description | Tokens |
116
+ |-------|------|-------------|--------|
117
+ | `tfx-qa` | Light | Test → Fix → Retest cycle (max 3 rounds) | ~5K |
118
+ | `tfx-deep-qa` | Deep | 3-CLI independent verification with consensus scoring | ~25K |
119
+
120
+ ### Planning
121
+
122
+ | Skill | Type | Description | Tokens |
123
+ |-------|------|-------------|--------|
124
+ | `tfx-plan` | Light | Quick implementation plan via Opus | ~8K |
125
+ | `tfx-deep-plan` | Deep | Planner + Architect + Critic consensus planning | ~20K |
126
+
127
+ ### Review
128
+
129
+ | Skill | Type | Description | Tokens |
130
+ |-------|------|-------------|--------|
131
+ | `tfx-review` | Light | Quick code review via Codex | ~8K |
132
+ | `tfx-deep-review` | Deep | 3-CLI independent review, consensus-only reporting | ~25K |
133
+
134
+ ### Debate & Panel
135
+
136
+ | Skill | Type | Description | Tokens |
137
+ |-------|------|-------------|--------|
138
+ | `tfx-debate` | Deep | Structured 3-party debate on any topic | ~20K |
139
+ | `tfx-panel` | Deep | Virtual expert panel simulation | ~30K |
140
+
141
+ ### Persistence
142
+
143
+ | Skill | Type | Description | Tokens |
144
+ |-------|------|-------------|--------|
145
+ | `tfx-ralph` | Deep | 3-party verified persistence loop until done | varies |
146
+ | `tfx-sisyphus` | Light | Auto-routing execution with model escalation | varies |
147
+
148
+ ### Meta & Utility
149
+
150
+ | Skill | Type | Description | Tokens |
151
+ |-------|------|-------------|--------|
152
+ | `tfx-index` | Light | 94% token reduction via project indexing (58K→3K) | ~2K |
153
+ | `tfx-forge` | Light | Create new skills interactively | ~10K |
154
+ | `tfx-interview` | Light | Socratic requirements exploration | ~15K |
155
+ | `tfx-deslop` | Deep | AI slop removal with 3-party consensus | ~10K |
156
+
157
+ ### Infrastructure
158
+
159
+ | Skill | Description |
160
+ |-------|-------------|
161
+ | `tfx-consensus` | Core consensus engine (internal, used by all Deep skills) |
162
+ | `tfx-hub` | MCP message bus management |
163
+ | `tfx-multi` | Multi-CLI team orchestration |
164
+ | `tfx-setup` | Initial setup wizard |
165
+ | `tfx-doctor` | Diagnostics and auto-repair |
166
+ | `tfx-profile` | Codex CLI profile management |
167
+ | `tfx-codex` | Codex-only orchestrator |
168
+ | `tfx-gemini` | Gemini-only orchestrator |
169
+ | `tfx-auto-codex` | Codex-lead orchestrator |
170
+ | `remote-spawn` | Remote session management via psmux |
65
171
 
66
- triflux uses a **Hub-and-Spoke** architecture. The resident Hub manages state, authentication, and task routing via high-performance Named Pipes.
172
+ ---
173
+
174
+ ## Deep vs Light
175
+
176
+ Every domain offers both modes:
177
+
178
+ | Dimension | Light | Deep |
179
+ |-----------|-------|------|
180
+ | **CLIs** | Single (usually Codex) | 3-party (Claude + Codex + Gemini) |
181
+ | **Tokens** | 3K-15K | 20K-80K |
182
+ | **Speed** | Seconds | Minutes |
183
+ | **Accuracy** | Good (single perspective) | Excellent (consensus-verified) |
184
+ | **Bias** | Possible | Eliminated via anti-herding |
185
+ | **Use when** | Quick tasks, known patterns | Critical decisions, unknown territory |
186
+
187
+ ---
188
+
189
+ ## Architecture
67
190
 
68
191
  ```mermaid
69
192
  graph TD
70
- User([User / Claude Code]) <-->|Slash Commands| TFX_CLI[tfx CLI]
71
- TFX_CLI <-->|Named Pipe / HTTP| HUB[triflux Hub Server]
72
-
193
+ User([User / Claude Code]) <-->|Skills & Slash Commands| TFX[tfx Skills Layer]
194
+ TFX <-->|Consensus Engine| CONSENSUS[tfx-consensus]
195
+
196
+ subgraph "Tri-CLI Consensus"
197
+ CONSENSUS -->|Independent| CLAUDE[Claude Opus/Sonnet]
198
+ CONSENSUS -->|Independent| CODEX[Codex CLI]
199
+ CONSENSUS -->|Independent| GEMINI[Gemini CLI]
200
+ CLAUDE --> MERGE[Cross-Validation]
201
+ CODEX --> MERGE
202
+ GEMINI --> MERGE
203
+ MERGE --> GATE{Consensus >= 70%?}
204
+ GATE -->|Yes| OUTPUT[Verified Output]
205
+ GATE -->|No| RESOLVE[Resolution Round]
206
+ RESOLVE --> MERGE
207
+ end
208
+
209
+ TFX <-->|Named Pipe / HTTP| HUB[triflux Hub Server]
210
+
73
211
  subgraph "Orchestration Hub"
74
212
  HUB <--> STORE[(SQLite Store)]
75
213
  HUB <--> DASH[QoS Dashboard]
76
214
  HUB <--> DELEGATOR[Delegator Service]
77
215
  end
78
-
79
- DELEGATOR <-->|Spawn| CODEX[Codex CLI]
80
- DELEGATOR <-->|Spawn| GEMINI[Gemini CLI]
81
- DELEGATOR <-->|Native| CLAUDE[Claude Code]
82
-
216
+
83
217
  HUB -.->|MCP Bridge| External[External MCP Clients]
84
218
  ```
85
219
 
@@ -93,9 +227,7 @@ graph TD
93
227
  npm install -g triflux
94
228
  ```
95
229
 
96
- ### 2. Setup (Required)
97
-
98
- Synchronize scripts, register skills to Claude Code, and configure the HUD.
230
+ ### 2. Setup
99
231
 
100
232
  ```bash
101
233
  tfx setup
@@ -104,95 +236,75 @@ tfx setup
104
236
  ### 3. Usage
105
237
 
106
238
  ```bash
107
- # Auto mode Thorough multi-task orchestration via Hub
108
- /tfx-auto "refactor auth + update UI + add tests"
109
-
110
- # Quick mode Skip the full planning/verification loop
111
- /tfx-auto --quick "fix a small regression"
112
-
113
- # Direct Delegation
114
- /tfx-delegate "research latest React patterns" --provider gemini
115
- ```
116
-
117
- In v5, multi-task orchestration defaults to `--thorough`; use `--quick` when you explicitly want the lighter path.
118
-
119
- ---
239
+ # LightQuick single-model execution
240
+ /tfx-research "React 19 Server Actions best practices"
241
+ /tfx-review
242
+ /tfx-plan "add JWT auth middleware"
120
243
 
121
- ## Pipeline: `--thorough` Mode
244
+ # Deep 3-party consensus for critical work
245
+ /tfx-deep-research "microservice architecture comparison 2026"
246
+ /tfx-deep-review
247
+ /tfx-deep-plan "migrate REST to GraphQL"
122
248
 
123
- The v5 pipeline is the default thorough execution loop for complex engineering work. Plan artifacts are persisted, PRD handoff can be gated by human approval, and verify/fix restores the worker feedback loop.
249
+ # Debate Get 3 independent opinions
250
+ /tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"
124
251
 
125
- | Phase | Description |
126
- |-------|-------------|
127
- | **plan** | Opus-led solution design with parallel Codex scout exploration and a persisted plan artifact. |
128
- | **prd** | Generate a detailed Technical Specification / PRD and prepare the approval checkpoint. |
129
- | **exec** | Perform the actual code implementation. |
130
- | **verify** | Run tests and verify the implementation against the PRD. |
131
- | **fix** | (Loop) Re-run workers with lead feedback to fix failures identified in the verify phase (Max 3). |
132
- | **ralph** | (Reset) If the fix loop fails, restart from `plan` with new insights (Max 10). |
252
+ # Persistence Don't stop until done
253
+ /tfx-ralph "implement full auth flow with tests"
133
254
 
134
- Phase-aware MCP filtering keeps `plan`, `prd`, and `verify` read-heavy, while the `prd` → `exec` handoff can be gated through `pipeline_advance_gated`.
255
+ # Team Multi-CLI parallel orchestration
256
+ /tfx-multi "refactor auth + update UI + add tests"
257
+ ```
135
258
 
136
259
  ---
137
260
 
138
- ## Delegator MCP
261
+ ## Research Foundation
139
262
 
140
- Interact with the Hub directly through MCP tools.
263
+ The v8 skill suite was designed after comprehensive reverse-engineering of 37 cloned repositories across the Claude Code ecosystem:
141
264
 
142
- - **`delegate`**: Route a prompt to a specific provider or let the Hub decide. Supports `sync` and `async` modes.
143
- - **`reply`**: Continue multi-turn conversations with a running agent (currently Gemini direct).
144
- - **`status`**: Check the progress of asynchronous background tasks.
145
-
146
- ---
265
+ | Project | Stars | Key Insight Adopted |
266
+ |---------|-------|-------------------|
267
+ | everything-claude-code | 114K | Instinct-based learning patterns |
268
+ | Superpowers | 93K | TDD enforcement, composable skills |
269
+ | oh-my-openagent | 44K | Category routing, Hashline edits |
270
+ | SuperClaude | 22K | index-repo 94% token reduction, expert panels |
271
+ | oh-my-claudecode | 15K | Ralph persistence, CCG tri-model |
272
+ | ruflo | 28K | 60+ agent orchestration |
273
+ | Exa MCP | 3.7K | Neural search, highlight extraction |
274
+ | Brave Search MCP | — | Independent index, Goggles re-ranking |
275
+ | Tavily MCP | — | Deep research pipeline |
147
276
 
148
- ## Agent Types (21+)
149
-
150
- | Agent | CLI | Purpose |
151
- |-------|-----|---------|
152
- | **executor** | Codex | Standard implementation & refactoring. |
153
- | **build-fixer** | Codex/Gemini | Instant fixes for build/type errors. |
154
- | **architect** | Codex | High-level system design & planning. |
155
- | **scientist-deep** | Codex | Exhaustive research & deep analysis. |
156
- | **code-reviewer** | Codex | Security & Logic focused code review. |
157
- | **security-reviewer**| Codex | Vulnerability & Permission audit. |
158
- | **quality-reviewer** | Codex | Logic & Maintainability audit. |
159
- | **designer** | Gemini | UI/UX & documentation design. |
160
- | **writer** | Gemini | Technical writing & explanations. |
161
- | **spark** | Gemini | Lightweight, fast prototyping. |
162
- | **verifier** | Claude | Final verification & validation. |
163
- | **test-engineer** | Claude | Comprehensive test suite generation. |
164
- | *...and more* | | `debugger`, `planner`, `critic`, `analyst`, `scientist`, `explore`, `qa-tester` |
277
+ 5-language research (EN/CN/RU/JP/UA) uncovered unique patterns: WeChat integration (CN), Discord mobile bridges (JP), GigaCode domestic alternatives (RU), and community-driven localization efforts.
165
278
 
166
279
  ---
167
280
 
168
281
  ## Security
169
282
 
170
- triflux v5 is designed for secure, professional environments:
171
-
172
- - **Hub Token Auth** — Secure IPC using `TFX_HUB_TOKEN` (Bearer Auth).
173
- - **Localhost Only** — Default Hub binding to `127.0.0.1` prevents external access.
174
- - **CORS Lockdown** — Strict origin checking for the QoS Dashboard.
175
- - **Injection Protection** — Sanitized shell command execution in `psmux` and `tmux`.
283
+ - **Hub Token Auth** Secure IPC using `TFX_HUB_TOKEN` (Bearer Auth)
284
+ - **Localhost Only** — Default Hub binding to `127.0.0.1`
285
+ - **CORS Lockdown** — Strict origin checking for QoS Dashboard
286
+ - **Injection Protection** — Sanitized shell execution in `psmux` and `tmux`
287
+ - **Consensus Verification** — Deep skills prevent single-model hallucination via 3-party consensus
176
288
 
177
289
  ---
178
290
 
179
- ## QoS Dashboard
180
-
181
- Monitor your orchestration health at `http://localhost:27888/dashboard`.
291
+ ## Platform Support
182
292
 
183
- - **AIMD Batch Sizing** Automatically scales parallel tasks (3 → 10) based on success rates.
184
- - **Token Savings** Real-time tracking of Claude tokens saved by routing to Codex/Gemini.
185
- - **Rate Limit Tracking** — Live monitoring of Codex and Gemini quotas.
293
+ - **Linux / macOS**: Native `tmux` integration
294
+ - **Windows**: **psmux** (PowerShell Multiplexer) + Windows Terminal native
186
295
 
187
296
  ---
188
297
 
189
- ## Platform Support
298
+ ## QoS Dashboard
299
+
300
+ Monitor orchestration health at `http://localhost:27888/dashboard`.
190
301
 
191
- - **Linux / macOS**: Native `tmux` integration.
192
- - **Windows**: **psmux** (PowerShell Multiplexer) + Windows Terminal hybrid for a native Windows experience.
302
+ - **AIMD Batch Sizing** Auto-scales parallel tasks based on success rates
303
+ - **Token Savings** Real-time tracking of Claude tokens saved
304
+ - **Consensus Metrics** — Track agreement rates across CLIs
193
305
 
194
306
  ---
195
307
 
196
308
  <p align="center">
197
- <sub>MIT License · Made with ❤️ by <a href="https://github.com/tellang">tellang</a></sub>
309
+ <sub>MIT License · Made by <a href="https://github.com/tellang">tellang</a></sub>
198
310
  </p>
package/bin/triflux.mjs CHANGED
@@ -654,6 +654,16 @@ function getSetupSyncTargets() {
654
654
  dst: join(CLAUDE_DIR, "scripts", "hub", "workers", "factory.mjs"),
655
655
  label: "hub/workers/factory.mjs",
656
656
  },
657
+ {
658
+ src: join(PKG_ROOT, "scripts", "remote-spawn.mjs"),
659
+ dst: join(CLAUDE_DIR, "scripts", "remote-spawn.mjs"),
660
+ label: "remote-spawn.mjs",
661
+ },
662
+ {
663
+ src: join(PKG_ROOT, "hub", "team", "psmux.mjs"),
664
+ dst: join(CLAUDE_DIR, "hub", "team", "psmux.mjs"),
665
+ label: "hub/team/psmux.mjs",
666
+ },
657
667
  ];
658
668
  }
659
669
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triflux",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1 @@
1
+ {"t":0,"agent":"adb34b0","agent_type":"general-purpose","event":"agent_stop","success":true}
@@ -0,0 +1,3 @@
1
+ {
2
+ "lastSentAt": "2026-03-29T03:41:07.256Z"
3
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "tool_name": "Bash",
3
+ "tool_input_preview": "{\"command\":\"ls -la \\\"C:/Users/tellang/Desktop/Projects/triflux/skills/tfx-deslop/\\\" 2>/dev/null; echo \\\"===\\\"; ls -la \\\"C:/Users/tellang/Desktop/Projects/triflux/skills/tfx-codebase-search/\\\" 2>/dev/n...",
4
+ "error": "Exit code 2\n===",
5
+ "timestamp": "2026-03-29T03:40:35.913Z",
6
+ "retry_count": 1
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "agents": [],
3
+ "total_spawned": 0,
4
+ "total_completed": 0,
5
+ "total_failed": 0,
6
+ "last_updated": "2026-03-29T03:41:34.338Z"
7
+ }
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: tfx-analysis
3
+ description: "코드나 아키텍처를 분석해야 할 때 사용한다. '코드 분석', 'code analysis', '아키텍처 분석', '이 코드 어떻게 돌아가?', '구조 파악' 같은 요청에 반드시 사용. 코드 품질, 보안, 성능, 복잡도 분석이 필요한 모든 상황에 적극 활용."
4
+ triggers:
5
+ - 코드 분석
6
+ - code analysis
7
+ - 아키텍처 분석
8
+ - analysis
9
+ argument-hint: "<분석 대상 — 파일, 디렉토리, 또는 주제>"
10
+ ---
11
+
12
+ # tfx-analysis — Light Code Analysis
13
+
14
+ > Codex 단일 분석으로 빠른 인사이트. SuperClaude sc:analyze 영감.
15
+
16
+ ## 용도
17
+
18
+ - 코드 품질 빠른 점검
19
+ - 모듈/파일 구조 분석
20
+ - 의존성 관계 파악
21
+ - 성능 병목 후보 식별
22
+ - 기술 부채 탐지
23
+ - "이 코드 어떤 상태야?" 류의 질문
24
+
25
+ ## 워크플로우
26
+
27
+ ### Step 1: 분석 대상 식별
28
+
29
+ ```
30
+ 우선순위:
31
+ 1. 사용자가 파일/디렉토리 지정 → 해당 범위
32
+ 2. 사용자가 주제 지정 (예: "인증 모듈") → 관련 파일 탐색
33
+ 3. 지정 없음 → 프로젝트 전체 고수준 분석
34
+
35
+ 분석 유형 자동 감지:
36
+ 파일 1개 → 코드 품질 + 로직 분석
37
+ 디렉토리 → 구조 + 의존성 + 모듈 분석
38
+ 프로젝트 전체 → 아키텍처 + 기술 부채 분석
39
+ ```
40
+
41
+ ### Step 2: Codex 분석 실행
42
+
43
+ ```bash
44
+ codex exec --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check \
45
+ "시니어 소프트웨어 엔지니어로서 다음을 분석하라:
46
+ 대상: {target}
47
+ 유형: {analysis_type}
48
+
49
+ 분석 항목:
50
+ 1. 구조 — 파일/모듈 구성, 계층, 의존성 방향
51
+ 2. 복잡도 — 순환 복잡도 높은 함수, 깊은 중첩
52
+ 3. 품질 — SOLID 위반, 코드 냄새, 중복
53
+ 4. 성능 — O(n²) 패턴, 불필요한 연산, 캐싱 부재
54
+ 5. 기술 부채 — TODO/FIXME, deprecated API, 하드코딩
55
+ 6. 테스트 — 커버리지 추정, 테스트 부재 영역
56
+
57
+ 구조화된 보고서로 출력하라."
58
+ ```
59
+
60
+ ### Step 3: 결과 포맷
61
+
62
+ ```markdown
63
+ ## 분석 결과: {target}
64
+
65
+ ### 구조 개요
66
+ {파일/모듈 구조 요약 또는 의존성 다이어그램}
67
+
68
+ ### 주요 발견
69
+ | # | 카테고리 | 심각도 | 설명 | 위치 |
70
+ |---|---------|--------|------|------|
71
+ | 1 | 복잡도 | high | {설명} | `{file}:{line}` |
72
+ | 2 | 성능 | medium | {설명} | `{file}:{line}` |
73
+
74
+ ### 메트릭
75
+ - 파일 수: {n} | 총 라인: {n}
76
+ - 평균 복잡도: {n} | 최대 복잡도: {n} (`{file}:{function}`)
77
+ - TODO/FIXME: {n}개
78
+ - 테스트 커버리지 추정: {n}%
79
+
80
+ ### 개선 권장사항
81
+ 1. **{우선순위 1}** — {구체적 제안}
82
+ 2. **{우선순위 2}** — {구체적 제안}
83
+ 3. **{우선순위 3}** — {구체적 제안}
84
+ ```
85
+
86
+ ## 토큰 예산
87
+
88
+ | 단계 | 토큰 |
89
+ |------|------|
90
+ | Step 1 (식별) | ~500 |
91
+ | Step 2 (Codex 분석) | ~5K |
92
+ | Step 3 (포맷) | ~2K |
93
+ | **총합** | **~8K** |
94
+
95
+ ## 사용 예
96
+
97
+ ```
98
+ /tfx-analysis "src/auth/"
99
+ /tfx-analysis "이 프로젝트 전체 아키텍처 분석"
100
+ /tfx-analysis "src/utils/parser.ts 코드 품질"
101
+ ```
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: tfx-autopilot
3
+ description: "간단한 작업을 자율적으로 구현해야 할 때 사용한다. 'autopilot', '자동으로', '알아서 해', '그냥 해줘', 'auto' 같은 요청에 반드시 사용. 명확한 단일 작업을 빠르게 자동 구현+검증할 때 적극 활용."
4
+ triggers:
5
+ - autopilot
6
+ - 자동
7
+ - 알아서 해
8
+ - auto
9
+ argument-hint: "<구현할 작업 설명>"
10
+ ---
11
+
12
+ # tfx-autopilot — Light Autonomous Execution
13
+
14
+ > Codex 직접 구현 → Claude 검증. 최소 토큰으로 빠른 자율 실행.
15
+
16
+ ## 용도
17
+
18
+ - 명확한 단일 작업을 빠르게 자동 구현
19
+ - 보일러플레이트 생성 + 검증
20
+ - 간단한 버그 수정 자동화
21
+ - 린트/포맷/리팩터 자동 적용
22
+ - "알아서 해줘" 류의 명확한 요청
23
+
24
+ ## 워크플로우
25
+
26
+ ### Step 1: 작업 파싱
27
+
28
+ 사용자 입력에서 구현 범위와 완료 기준을 추출한다:
29
+
30
+ ```
31
+ 입력: "로그인 API에 rate limiting 추가"
32
+ 파싱: {
33
+ task: "로그인 API에 rate limiting 추가",
34
+ scope: ["src/routes/auth.ts", "src/middleware/"],
35
+ criteria: [
36
+ "rate limiter 미들웨어 생성",
37
+ "로그인 엔드포인트에 적용",
38
+ "기존 테스트 통과"
39
+ ]
40
+ }
41
+ ```
42
+
43
+ 모호하면 AskUserQuestion으로 명확화.
44
+
45
+ ### Step 2: Codex 직접 구현
46
+
47
+ ```bash
48
+ codex exec --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check \
49
+ "다음 작업을 구현하라:
50
+ 작업: {task}
51
+ 프로젝트 컨텍스트: {context}
52
+ 완료 기준: {criteria}
53
+
54
+ 1. 관련 파일을 읽고 구조를 파악하라
55
+ 2. 필요한 코드를 작성/수정하라
56
+ 3. 기존 테스트를 실행하여 회귀가 없는지 확인하라
57
+ 4. 변경 사항을 요약하라"
58
+ ```
59
+
60
+ ### Step 3: Claude 검증
61
+
62
+ Codex 실행 완료 후, Claude가 변경 사항을 검증한다:
63
+
64
+ ```
65
+ 검증 항목:
66
+ 1. 파일 변경 확인 — git diff로 실제 변경 내용 확인
67
+ 2. 완료 기준 충족 — 각 criterion 대조
68
+ 3. 회귀 여부 — 테스트 결과 확인
69
+ 4. 코드 품질 — 명백한 결함 여부 (깊은 리뷰는 아님)
70
+
71
+ 판정:
72
+ PASS → 완료 보고
73
+ FAIL → Codex에 수정 지시 (1회 재시도)
74
+ 재시도 FAIL → 사용자에게 문제 보고
75
+ ```
76
+
77
+ ### Step 4: 완료 보고
78
+
79
+ ```markdown
80
+ ## Autopilot 완료: {task}
81
+
82
+ ### 변경 사항
83
+ - `{file1}` — {변경 요약}
84
+ - `{file2}` — {변경 요약}
85
+
86
+ ### 검증
87
+ - 완료 기준: {pass}/{total} 충족
88
+ - 테스트: {pass}/{total} 통과
89
+ - 검증: Claude ✓
90
+
91
+ ### 다음 단계 (선택)
92
+ - {추가 권장 사항이 있으면}
93
+ ```
94
+
95
+ ## 토큰 예산
96
+
97
+ | 단계 | 토큰 |
98
+ |------|------|
99
+ | Step 1 (파싱) | ~500 |
100
+ | Step 2 (Codex 구현) | ~5K |
101
+ | Step 3 (Claude 검증) | ~3K |
102
+ | Step 4 (보고) | ~500 |
103
+ | 재시도 (필요 시) | +4K |
104
+ | **총합** | **~10K** |
105
+
106
+ ## 사용 예
107
+
108
+ ```
109
+ /tfx-autopilot "이 함수에 입력 검증 추가해줘"
110
+ /tfx-autopilot "ESLint 경고 전부 수정"
111
+ /tfx-autopilot "알아서 해 — 이 TODO 코멘트 3개 구현"
112
+ ```
@@ -5,8 +5,7 @@ description: >
5
5
  주제를 받아 웹 검색 → 정보 수집 → 분석 → 구조화된 리서치 보고서 생성.
6
6
  triggers:
7
7
  - autoresearch
8
- - 리서치
9
- - 자동 리서치
8
+ - 자율 리서치
10
9
  - 웹 리서치
11
10
  - 조사해
12
11
  - 알아봐