triflux 10.48.0 → 10.49.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 +173 -348
- package/README.md +168 -364
- package/bin/triflux.mjs +9 -39
- package/hooks/hook-orchestrator.mjs +1 -1
- package/hooks/keyword-rules.json +147 -349
- package/hub/server.mjs +0 -122
- package/package.json +2 -2
- package/scripts/__tests__/keyword-detector.test.mjs +47 -50
- package/scripts/__tests__/setup-cleanup-stale-skills.test.mjs +110 -3
- package/scripts/__tests__/skill-surface.test.mjs +81 -0
- package/scripts/__tests__/tfx-route-node-entry.test.mjs +6 -4
- package/scripts/completions/tfx.bash +2 -2
- package/scripts/completions/tfx.fish +2 -3
- package/scripts/completions/tfx.zsh +0 -1
- package/scripts/keyword-detector.mjs +175 -63
- package/scripts/lib/keyword-rules.mjs +83 -6
- package/scripts/pack.mjs +0 -6
- package/scripts/setup.mjs +240 -4
- package/scripts/tfx-route.mjs +1 -1
- package/scripts/tfx-route.sh +55 -10
- package/skills/tfx-auto/SKILL.md +9 -2
- package/skills/tfx-doctor/SKILL.md +46 -3
- package/skills/tfx-doctor/skill.json +2 -2
- package/skills/tfx-interview/SKILL.md +64 -2
- package/skills/tfx-interview/skill.json +2 -2
- package/skills/tfx-review/SKILL.md +11 -1
- package/skills/tfx-review/skill.json +1 -1
- package/skills/tfx-setup/SKILL.md +34 -8
- package/skills/tfx-setup/skill.json +2 -2
- package/skills/tfx-wt/SKILL.md +4 -0
- package/docs/assets/architecture.svg +0 -211
- package/hub/mac-focus.mjs +0 -94
- package/hub/mac-tray.swift +0 -144
- package/hub/public/tray-icon.ico +0 -0
- package/hub/public/tray-icon.png +0 -0
- package/hub/public/tray.html +0 -756
- package/hub/tray-lifecycle.mjs +0 -138
- package/hub/tray-runtime.mjs +0 -265
- package/hub/tray-state.mjs +0 -524
- package/hub/tray.mjs +0 -527
- package/skills/tfx-analysis/SKILL.md +0 -193
- package/skills/tfx-analysis/skill.json +0 -6
- package/skills/tfx-find/SKILL.md +0 -125
- package/skills/tfx-find/skill.json +0 -6
- package/skills/tfx-forge/SKILL.md +0 -177
- package/skills/tfx-forge/skill.json +0 -5
- package/skills/tfx-goal-clarify/SKILL.md +0 -373
- package/skills/tfx-goal-clarify/skill.json +0 -5
- package/skills/tfx-hooks/SKILL.md +0 -212
- package/skills/tfx-hooks/skill.json +0 -5
- package/skills/tfx-hub/SKILL.md +0 -205
- package/skills/tfx-hub/skill.json +0 -5
- package/skills/tfx-index/SKILL.md +0 -146
- package/skills/tfx-index/skill.json +0 -5
- package/skills/tfx-prune/SKILL.md +0 -196
- package/skills/tfx-prune/skill.json +0 -6
- package/skills/tfx-qa/SKILL.md +0 -162
- package/skills/tfx-qa/skill.json +0 -6
- package/skills/tfx-ralph/SKILL.md +0 -25
- package/skills/tfx-ralph/skill.json +0 -9
package/README.md
CHANGED
|
@@ -10,18 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
<h3 align="center">CLI-first multi-model orchestration for Claude Code, Codex, and Antigravity</h3>
|
|
12
12
|
|
|
13
|
-
<p align="center">
|
|
14
|
-
One front door for routing work, coordinating agents, running local/remote teams,<br>
|
|
15
|
-
and keeping Codex/Antigravity/Claude execution behind auditable guards.
|
|
16
|
-
</p>
|
|
17
|
-
|
|
18
13
|
<p align="center">
|
|
19
14
|
<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
15
|
<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
16
|
<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/
|
|
23
|
-
<sub>11 compatibility aliases are deprecated</sub>
|
|
24
|
-
<img src="https://img.shields.io/badge/node-%3E%3D18-374151?style=flat-square" alt="Node >= 18">
|
|
17
|
+
<img src="https://img.shields.io/badge/node-%3E%3D20-374151?style=flat-square" alt="Node >= 20">
|
|
25
18
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-374151?style=flat-square" alt="License: MIT"></a>
|
|
26
19
|
</p>
|
|
27
20
|
|
|
@@ -29,409 +22,220 @@
|
|
|
29
22
|
<img alt="triflux demo" src="docs/assets/demo-multi.gif" width="680">
|
|
30
23
|
</p>
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<a href="#security-and-guards">Security</a>
|
|
39
|
-
</p>
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## What is triflux?
|
|
44
|
-
|
|
45
|
-
triflux is a **Claude Code plugin + npm CLI** for routing AI coding work across
|
|
46
|
-
Claude, Codex, and Antigravity without letting ad-hoc shell commands or stale skill
|
|
47
|
-
aliases become the control plane.
|
|
25
|
+
triflux is a Claude Code plugin and npm CLI that routes coding work across Claude, Codex,
|
|
26
|
+
and Antigravity. You describe the task once with `/tfx-auto`; triflux picks the CLI lane
|
|
27
|
+
(Codex by default), runs it through managed routes instead of ad-hoc shell commands, and
|
|
28
|
+
can fan the work out to parallel workers, worktree-isolated swarms, live Claude↔Codex
|
|
29
|
+
sessions, or remote hosts. The `tfx` shell CLI covers setup, diagnostics, the local Hub,
|
|
30
|
+
and team orchestration.
|
|
48
31
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- **`/tfx-auto` is the canonical Claude Code skill front door.** Use flags to
|
|
52
|
-
express quick/deep/consensus/parallel/retry behavior.
|
|
53
|
-
- **`tfx` is the shell CLI.** Use it for setup, diagnostics, hub lifecycle,
|
|
54
|
-
MCP sync, team/swarm orchestration, and handoffs.
|
|
55
|
-
- **Compatibility aliases still exist, but they are not the primary API.** They
|
|
56
|
-
are documented in [`docs/legacy-skill-aliases.md`](https://github.com/tellang/triflux/blob/main/docs/legacy-skill-aliases.md)
|
|
57
|
-
so the main README stays focused on the supported path.
|
|
58
|
-
- **Host-local Codex harnesses are out of package scope.** For example, a local
|
|
59
|
-
`~/.codex/skills/tfx-harness` can recommend workflows on one machine, but it
|
|
60
|
-
is not shipped in this repository, npm package, or Claude plugin.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Quick Start
|
|
65
|
-
|
|
66
|
-
### 1. Install
|
|
67
|
-
|
|
68
|
-
Claude Code plugin install:
|
|
69
|
-
|
|
70
|
-
```text
|
|
71
|
-
/plugin marketplace add tellang/triflux
|
|
72
|
-
/plugin install triflux@tellang
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
npm install:
|
|
32
|
+
## Install
|
|
76
33
|
|
|
77
34
|
```bash
|
|
78
|
-
npm install -g triflux
|
|
35
|
+
npm install -g triflux # postinstall runs the setup script
|
|
36
|
+
tfx doctor # check CLIs, tmux, Hub, MCP, profiles, skills
|
|
79
37
|
```
|
|
80
38
|
|
|
81
|
-
|
|
39
|
+
Or install the Claude Code plugin from this repository's marketplace:
|
|
82
40
|
|
|
83
41
|
```bash
|
|
84
|
-
|
|
85
|
-
|
|
42
|
+
claude plugin marketplace add tellang/triflux
|
|
43
|
+
claude plugin install triflux@triflux
|
|
86
44
|
```
|
|
87
45
|
|
|
88
|
-
|
|
46
|
+
`tfx doctor --fix` repairs common drift; `tfx doctor --json` is for automation.
|
|
89
47
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Claude Code slash skills:
|
|
48
|
+
## First steps
|
|
93
49
|
|
|
94
50
|
```text
|
|
95
|
-
/tfx-auto "
|
|
96
|
-
/tfx-auto "
|
|
97
|
-
/tfx-auto "
|
|
98
|
-
/tfx-remote spawn ryzen5-7600 "run a security review"
|
|
99
|
-
/tfx-doctor
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Shell CLI:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
tfx list
|
|
106
|
-
tfx hub ensure
|
|
107
|
-
tfx mcp list
|
|
108
|
-
tfx handoff --target remote --output .omx/handoff.md
|
|
109
|
-
tfx swarm preflight docs/prd/example.md --json
|
|
110
|
-
tfx codex-team "refactor auth + add tests"
|
|
51
|
+
/tfx-auto "fix the failing auth tests"
|
|
52
|
+
/tfx-auto "review this change for trust-boundary issues" --mode consensus
|
|
53
|
+
/tfx-auto "finish the migration and verify it" --mode deep --retry ralph --max-iterations 10
|
|
111
54
|
```
|
|
112
55
|
|
|
113
|
-
>
|
|
114
|
-
> multiplexer. Run `tfx doctor` first; it reports missing Codex/Antigravity/Claude,
|
|
115
|
-
> psmux/tmux, Hub, MCP, profile, and stale-skill issues.
|
|
116
|
-
|
|
117
|
-
---
|
|
56
|
+
Run `tfx auto "<task>" --json` in a shell to preview the routing decision without executing it.
|
|
118
57
|
|
|
119
|
-
##
|
|
58
|
+
## Skills
|
|
120
59
|
|
|
121
|
-
|
|
60
|
+
Skills you invoke directly:
|
|
122
61
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
| Command | Use |
|
|
62
|
+
| Skill | Use |
|
|
126
63
|
| --- | --- |
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
|
139
|
-
| `tfx synapse` | Inspect swarm registry and leases. |
|
|
140
|
-
| `tfx review` | Run Codex-backed git diff review. |
|
|
141
|
-
| `tfx codex-team` | Codex-led team mode convenience wrapper. |
|
|
142
|
-
| `tfx notion-read` | Convert Notion pages to Markdown through configured MCP clients. |
|
|
143
|
-
| `tfx why` | Read intent trailers from the last commit touching a path. |
|
|
144
|
-
| `tfx update` | Update to the latest stable or dev package. |
|
|
145
|
-
| `tfx monitor` | Open the terminal TUI monitor. |
|
|
146
|
-
| `tfx version` | Print version information. |
|
|
147
|
-
| `tfx-profile` | Convenience binary for interactive Codex profile management. |
|
|
148
|
-
|
|
149
|
-
Run `tfx schema <command>` for the exact argument contract.
|
|
150
|
-
|
|
151
|
-
### Claude Code skills
|
|
152
|
-
|
|
153
|
-
The package ships **34 skill files**. The important split is:
|
|
154
|
-
|
|
155
|
-
- **Canonical entrypoints**: `tfx-auto`, `tfx-remote`, `tfx-doctor`,
|
|
156
|
-
`tfx-setup`, `tfx-profile`, `tfx-hub`, `tfx-hooks`, `tfx-ship`, `tfx-wt`.
|
|
157
|
-
- **Task helpers**: `tfx-plan`, `tfx-review`, `tfx-qa`, `tfx-research`,
|
|
158
|
-
`tfx-analysis`, `tfx-find`, `tfx-index`, `tfx-interview`, `tfx-prune`,
|
|
159
|
-
`tfx-forge`, `merge-worktree`, `star-prompt`.
|
|
160
|
-
- **Deprecated compatibility aliases**: 11 legacy names remain only as transition
|
|
161
|
-
shims. Prefer the canonical commands above and see the alias table only when
|
|
162
|
-
migrating old prompts.
|
|
163
|
-
|
|
164
|
-
### Canonical flag map
|
|
165
|
-
|
|
166
|
-
Most old skill names now map to explicit `tfx-auto` flags:
|
|
167
|
-
|
|
168
|
-
| Intent | Canonical form |
|
|
64
|
+
| `/tfx-auto` | Front door for implementing, fixing, reviewing, and parallel work. Behavior is set by flags (below). |
|
|
65
|
+
| `/tfx-live` | Live Claude↔Codex sessions: `start`/`ask`/`stop`, `peer` relay, `orchestrate`, `list-sessions`. |
|
|
66
|
+
| `/tfx-remote` | Remote Claude Code sessions over SSH: `setup`, `spawn`, `list`, `attach`, `send`, `resume`, `probe`, `kill`. |
|
|
67
|
+
| `/tfx-setup` | Interactive setup: file sync, HUD, Codex profiles, MCP, hook priority. |
|
|
68
|
+
| `/tfx-doctor` | Diagnose and repair; also starts, stops, and checks the Hub. |
|
|
69
|
+
| `/tfx-profile` | Manage Codex profiles. |
|
|
70
|
+
| `/tfx-ship` | triflux release flow (maintainers). |
|
|
71
|
+
| `/tfx-wt` | Windows Terminal tabs and panes. `tfx setup` installs it on Windows only. |
|
|
72
|
+
|
|
73
|
+
Internal lanes (marked `internal: true`; other skills and the router call them, but you can name them explicitly):
|
|
74
|
+
|
|
75
|
+
| Skill | Use |
|
|
169
76
|
| --- | --- |
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
| local parallel work | `/tfx-auto "task" --parallel N --mode deep` or shell `tfx multi ...` |
|
|
176
|
-
| PRD/worktree swarm | `/tfx-auto "task" --parallel swarm --mode consensus --isolation worktree` or shell `tfx swarm ...` |
|
|
177
|
-
| force a CLI lane | `/tfx-auto "task" --cli codex|antigravity|claude` |
|
|
77
|
+
| `tfx-harness` | Meta routing: returns which skill or path fits a request, without running it. |
|
|
78
|
+
| `tfx-plan` | Multi-model implementation plan (`--quick` for a lighter pass). |
|
|
79
|
+
| `tfx-review` | Code review verdict (`--quick` for a lighter pass). |
|
|
80
|
+
| `tfx-research` | Web research with cross-checked sources (`--quick`, `--auto`, `--depth`). |
|
|
81
|
+
| `tfx-interview` | Requirements interview; `--format goal` turns an idea into a Claude Code `/goal` block. |
|
|
178
82
|
|
|
179
|
-
|
|
83
|
+
The package also bundles two general helpers, `merge-worktree` and `star-prompt`.
|
|
84
|
+
A keyword hook may suggest a skill from your prompt; invoke `/tfx-*` explicitly when you want a predictable route.
|
|
180
85
|
|
|
181
|
-
|
|
86
|
+
## `/tfx-auto` flags
|
|
182
87
|
|
|
183
|
-
|
|
|
88
|
+
| Flag | Values | Effect |
|
|
184
89
|
| --- | --- | --- |
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
/
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
`--max-iterations` when the loop must be bounded.
|
|
217
|
-
|
|
218
|
-
### Consensus, debate, or panel output
|
|
219
|
-
|
|
220
|
-
```text
|
|
221
|
-
/tfx-auto "Postgres LISTEN/NOTIFY vs Redis Streams" --mode consensus --shape debate
|
|
222
|
-
/tfx-auto "review the migration strategy" --mode consensus --shape panel
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Consensus participants are the configured Claude/Codex/Antigravity lanes. If a lane is
|
|
226
|
-
unavailable, the result should report partial/degraded status instead of hiding it.
|
|
227
|
-
|
|
228
|
-
### Local team or PRD swarm
|
|
229
|
-
|
|
230
|
-
```text
|
|
231
|
-
# Local team mode
|
|
232
|
-
tfx multi "refactor auth + update UI + add tests"
|
|
233
|
-
|
|
234
|
-
# Worktree-isolated PRD swarm
|
|
235
|
-
tfx swarm preflight docs/prd/my-feature.md --json
|
|
236
|
-
tfx swarm run docs/prd/my-feature.md
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Swarm work uses isolated worktrees and file leases. Use preflight before running a
|
|
240
|
-
large PRD so missing hosts, CLI profiles, and lease conflicts are caught first.
|
|
241
|
-
|
|
242
|
-
### Remote sessions
|
|
243
|
-
|
|
244
|
-
```text
|
|
245
|
-
/tfx-remote setup
|
|
246
|
-
/tfx-remote spawn ryzen5-7600 "run security review"
|
|
247
|
-
/tfx-remote list
|
|
248
|
-
/tfx-remote attach <session>
|
|
249
|
-
/tfx-remote send <session> "continue with fixes"
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
`tfx-remote` is the consolidated Claude skill surface for setup/spawn/list/attach/send/resume/probe/kill flows.
|
|
253
|
-
|
|
254
|
-
### Save or restore context
|
|
90
|
+
| `--mode` | `quick` (default), `deep`, `consensus`, `live` | `deep` = plan → execute → verify loop; `consensus` = multi-CLI agreement; `live` = hand off to `tfx-live peer` |
|
|
91
|
+
| `--shape` | `consensus`, `debate`, `panel` | Output shape for `--mode consensus` |
|
|
92
|
+
| `--cli` | `auto`, `codex`, `antigravity`, `claude` | Force a CLI lane |
|
|
93
|
+
| `--cli-set` | `triad`, `no-antigravity`, `custom` | Consensus participants |
|
|
94
|
+
| `--parallel` | `1`, `N`, `swarm` | `N` = local workers (`tfx multi`); `swarm` = PRD shards in worktrees (`tfx swarm`) |
|
|
95
|
+
| `--isolation` | `none`, `worktree` | Worktree isolation per shard (forced on with `swarm`) |
|
|
96
|
+
| `--remote` | `<host>` | Send swarm shards to a host from `hosts.json` |
|
|
97
|
+
| `--retry` | `0`, `1` (default), `ralph`, `auto-escalate` | `ralph` = retry state machine with stuck detection; `auto-escalate` = move up the model chain |
|
|
98
|
+
| `--max-iterations` | `N` | Cap for `ralph` / `auto-escalate` (`0` = unlimited) |
|
|
99
|
+
| `--rounds` | `N` (default 4) | Round trips for `--mode live` |
|
|
100
|
+
| `--risk-tier` | `auto`, `low`, `medium`, `high` | Pick verification strength from the change; ignored when `--mode` is set |
|
|
101
|
+
| `--skill` | `<name>` | Prepend `skills/<name>/SKILL.md` to the Codex/Antigravity prompt |
|
|
102
|
+
| `--no-native-bridge-ui` | | Hide headless workers from the `claude agents` panel |
|
|
103
|
+
|
|
104
|
+
The full contract, including `--lead`, `--options`, `--experts`, and conflict rules, lives in
|
|
105
|
+
[`skills/tfx-auto/SKILL.md`](skills/tfx-auto/SKILL.md).
|
|
106
|
+
|
|
107
|
+
## Models and profiles
|
|
108
|
+
|
|
109
|
+
Codex runs through named profiles; model IDs live in `~/.codex/<profile>.config.toml`, and the
|
|
110
|
+
role → profile map lives in [`scripts/lib/agent-route-policy.mjs`](scripts/lib/agent-route-policy.mjs).
|
|
111
|
+
Claude is called by alias, so the newest model in each tier is picked up automatically.
|
|
112
|
+
|
|
113
|
+
| Profile / alias | Lanes |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `gpt6_astra_xhigh` | Architecture, planning, critique, debugging, security review, deep execution |
|
|
116
|
+
| `gpt6_astra_max`, `gpt6_astra_ultra` | Hardest single tasks (`TFX_CODEX_PROFILE=max\|ultra`); `max` is the first `auto-escalate` step |
|
|
117
|
+
| `gpt61_sol_high` / `gpt61_sol_med` | Default implementation, review, verification, tests, docs / cleanup |
|
|
118
|
+
| `gpt6_luna_high` / `gpt6_luna_low` | Build fixes, writing / latency-first lookups |
|
|
119
|
+
| Claude `fable` | Final `--retry auto-escalate` step |
|
|
120
|
+
| Claude `opus` / `sonnet` / `haiku` | Meta routing and planning gates / Claude-native QA and verification / fast exploration |
|
|
255
121
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
```
|
|
122
|
+
Routing policy: [`.claude/rules/tfx-routing.md`](.claude/rules/tfx-routing.md) ·
|
|
123
|
+
escalation chain: [`.claude/rules/tfx-escalation-chain.md`](.claude/rules/tfx-escalation-chain.md).
|
|
259
124
|
|
|
260
|
-
|
|
261
|
-
state without replaying the entire conversation.
|
|
125
|
+
## Shell CLI
|
|
262
126
|
|
|
263
|
-
|
|
127
|
+
| Command | Use |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| `tfx setup` / `tfx doctor` | Sync files, hooks, HUD, MCP, profiles / diagnose and repair (`--fix`, `--json`) |
|
|
130
|
+
| `tfx auto` | Preview the `tfx-auto` routing decision |
|
|
131
|
+
| `tfx multi` | Local multi-CLI team in tmux + Hub |
|
|
132
|
+
| `tfx swarm` | PRD-based, worktree-isolated work: `plan`, `preflight`, `run`, `list` |
|
|
133
|
+
| `tfx synapse` | Swarm session registry and leases |
|
|
134
|
+
| `tfx hub` | Local Hub: `start`, `stop`, `status`, `ensure` |
|
|
135
|
+
| `tfx mcp` | Managed MCP registry: `list`, `sync`, `add`, `remove` |
|
|
136
|
+
| `tfx hooks` | Hook orchestrator: scan, diff, apply, status |
|
|
137
|
+
| `tfx handoff` | Serialize the current context for another session or host |
|
|
138
|
+
| `tfx cto` | Repo-local authority console: `collect`, `status`, `dashboard`, `hygiene`, `steward`, `event` |
|
|
139
|
+
| `tfx review` / `tfx codex-team` | Codex git-diff review / Codex-led team mode |
|
|
140
|
+
| `tfx stealth-fetch <url>` | Fetch one URL through cloakbrowser (JSON on stdout) |
|
|
141
|
+
| `tfx notion-read`, `tfx why`, `tfx schema`, `tfx list`, `tfx monitor`, `tfx update`, `tfx version` | Notion → Markdown, commit intent trailers, CLI schemas, installed skills, TUI monitor, update, version |
|
|
142
|
+
| `tfx-live` | Live session bridge (same as the `/tfx-live` skill) |
|
|
143
|
+
| `tfx-profile` | Interactive Codex profile manager |
|
|
144
|
+
|
|
145
|
+
`tfx <command> --help` and `tfx schema <command>` print the exact arguments.
|
|
146
|
+
|
|
147
|
+
## Runtime features
|
|
148
|
+
|
|
149
|
+
**Live sessions.** `tfx-live` drives Claude Code and Codex TUI sessions. Claude daemon targets
|
|
150
|
+
(`--short`/`--session-id`) try UDS first and fall back to tmux when `--session` is also given;
|
|
151
|
+
Codex uses tmux, or UDS with
|
|
152
|
+
`--transport uds --thread <id|auto>`. `peer` relays between two sessions for `--rounds`, and
|
|
153
|
+
`orchestrate` runs Claude + Codex on one task. triflux's Codex hook records running Codex
|
|
154
|
+
sessions under `~/.local/state/triflux/codex-sessions/`, so `tfx-live list-sessions --cli codex|claude`
|
|
155
|
+
also finds sessions you started yourself in tmux.
|
|
156
|
+
|
|
157
|
+
**Long jobs.** `scripts/tfx-route.sh --async <agent> "<prompt>"` returns a job id at once, which
|
|
158
|
+
gets past Claude Code's 600-second Bash limit. Follow up with `--job-status`, `--job-wait`, and
|
|
159
|
+
`--job-result`.
|
|
160
|
+
|
|
161
|
+
**Hub.** A local message bus for teams, remote sessions, MCP tools, and status surfaces. It binds
|
|
162
|
+
to `127.0.0.1:27888` by default (`TFX_HUB_PORT` overrides) and accepts a bearer token from
|
|
163
|
+
`TFX_HUB_TOKEN`. Headless workers from `tfx-auto`, `tfx multi`, and local swarm shards appear in
|
|
164
|
+
the `claude agents` panel unless you pass `--no-native-bridge-ui`.
|
|
165
|
+
|
|
166
|
+
**Retry and escalation.** `--retry ralph` loops until done or stuck (three identical failures).
|
|
167
|
+
`--retry auto-escalate` steps from Codex `gpt6_astra_max` to Claude `fable`; override the chain in
|
|
168
|
+
`.triflux/config/escalation-chain.json`.
|
|
169
|
+
|
|
170
|
+
**Machine profile.** Setup records which CLIs this machine may use and its timeout policy in
|
|
171
|
+
`~/.config/triflux/machine-profile.env`. `TFX_DISABLE_CODEX=1` or `TFX_DISABLE_ANTIGRAVITY=1`
|
|
172
|
+
removes a CLI from routing; if no allowed CLI is available the route fails instead of silently
|
|
173
|
+
falling back. Details: [`.claude/rules/tfx-machine-profile.md`](.claude/rules/tfx-machine-profile.md).
|
|
174
|
+
|
|
175
|
+
**CTO lake.** `tfx cto` keeps an append-only history of the repo in `.triflux/lake/`. Automatic
|
|
176
|
+
behavior is off by default; opt in with `TFX_CTO_AUTO_COLLECT=1` or `TFX_CTO_NORTH_STAR=1`
|
|
177
|
+
([ADR-0018](docs/adr/0018-cto-auto-behaviors-opt-in.md)). The old tray UI was removed
|
|
178
|
+
([ADR-0022](docs/adr/0022-remove-cto-tray.md)).
|
|
179
|
+
|
|
180
|
+
**Remote hosts.** `/tfx-remote` and `--remote <host>` read hosts from `~/.config/triflux/hosts.json`
|
|
181
|
+
(Windows: `%APPDATA%\triflux\hosts.json`). Run `/tfx-remote setup` to add one, then
|
|
182
|
+
`/tfx-remote spawn <host> "run a security review"`.
|
|
264
183
|
|
|
265
184
|
## Architecture
|
|
266
185
|
|
|
267
|
-
> 상세 구조·패키지 레이아웃·실행 경로는 [ARCHITECTURE.md](ARCHITECTURE.md), 문서 전체 지도는 [docs/README.md](docs/README.md) 참조.
|
|
268
|
-
|
|
269
|
-
<p align="center">
|
|
270
|
-
<img src="docs/assets/architecture.svg" alt="triflux architecture" width="680">
|
|
271
|
-
</p>
|
|
272
|
-
|
|
273
186
|
```mermaid
|
|
274
187
|
graph TD
|
|
275
|
-
User([
|
|
188
|
+
User([Claude Code prompt / shell]) --> Skills["/tfx-auto · /tfx-live · /tfx-remote"]
|
|
276
189
|
User --> CLI[tfx CLI]
|
|
277
|
-
Skills -->
|
|
278
|
-
Skills -->
|
|
279
|
-
CLI -->
|
|
280
|
-
CLI --> Team[tfx multi / swarm]
|
|
281
|
-
Auto --> Route[tfx-route.sh + guards]
|
|
282
|
-
Team --> Hub
|
|
283
|
-
Remote --> Hub
|
|
190
|
+
Skills --> Route[tfx-route.sh]
|
|
191
|
+
Skills --> Live[tfx-live]
|
|
192
|
+
CLI --> Team["tfx multi · tfx swarm"]
|
|
284
193
|
Route --> Codex[Codex CLI]
|
|
285
|
-
Route -->
|
|
194
|
+
Route --> Agy[Antigravity agy]
|
|
286
195
|
Route --> Claude[Claude Code]
|
|
287
|
-
|
|
196
|
+
Team --> Route
|
|
197
|
+
Team --> WT[(git worktrees)]
|
|
198
|
+
Live -->|UDS or tmux| Sessions[Claude / Codex TUI sessions]
|
|
199
|
+
Route --> Hub["Hub 127.0.0.1:27888"]
|
|
200
|
+
Team --> Hub
|
|
288
201
|
Hub --> Store[(SQLite or memory store)]
|
|
289
|
-
Hub -->
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
The common routing path is:
|
|
293
|
-
|
|
294
|
-
1. Claude Code prompt or explicit skill invocation.
|
|
295
|
-
2. Keyword/routing hooks may add context or choose a skill.
|
|
296
|
-
3. `tfx-auto` normalizes intent into mode, retry, parallelism, risk tier, and
|
|
297
|
-
target CLI lane.
|
|
298
|
-
4. `tfx-route.sh`, Hub workers, or the `tfx` CLI execute the actual Codex/Antigravity/
|
|
299
|
-
Claude-backed work.
|
|
300
|
-
5. Hub records team messages, leases, retries, handoffs, and status surfaces.
|
|
301
|
-
|
|
302
|
-
### Hub
|
|
303
|
-
|
|
304
|
-
The Hub is the local message bus for teams, remote sessions, MCP tools, and
|
|
305
|
-
status surfaces. It binds to localhost, uses pipe/HTTP transports, and can be
|
|
306
|
-
managed with:
|
|
307
|
-
|
|
308
|
-
```bash
|
|
309
|
-
tfx hub ensure
|
|
310
|
-
tfx hub status --json
|
|
311
|
-
tfx hub stop
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
macOS may show a firewall prompt when tests or Hub startup open a localhost port
|
|
315
|
-
through `node`. For normal documentation work this is not needed; for active Hub,
|
|
316
|
-
team, or MCP workflows allow localhost access if your environment requires it.
|
|
317
|
-
|
|
318
|
-
### Guards
|
|
319
|
-
|
|
320
|
-
triflux keeps risky execution behind managed routes:
|
|
321
|
-
|
|
322
|
-
- CLI calls should flow through `tfx-route.sh`, Hub workers, or the `tfx` CLI.
|
|
323
|
-
- Direct `codex exec`, unmanaged `agy`, and deprecated `gemini` routes are guarded in the installed workflow.
|
|
324
|
-
- psmux/Windows Terminal flows must use the managed API and documented rules, not
|
|
325
|
-
ad-hoc `wt.exe` or `psmux send-keys` snippets.
|
|
326
|
-
|
|
327
|
-
### Profiles and model routing
|
|
328
|
-
|
|
329
|
-
Use `tfx-profile` for Codex profiles and `tfx setup`/`tfx doctor` for Antigravity plus legacy Gemini compatibility state. Do not hardcode
|
|
330
|
-
model and effort flags in launcher scripts when a profile already owns them.
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
|
-
## Operations
|
|
335
|
-
|
|
336
|
-
### Diagnostics
|
|
337
|
-
|
|
338
|
-
```bash
|
|
339
|
-
tfx doctor
|
|
340
|
-
tfx doctor --json
|
|
341
|
-
tfx doctor --fix
|
|
342
|
-
tfx doctor --diagnose
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
`doctor` checks CLI availability, profiles, hooks, skills, Hub, MCP registry,
|
|
346
|
-
route-script sync, stale teams, and common local configuration drift.
|
|
347
|
-
|
|
348
|
-
### MCP registry
|
|
349
|
-
|
|
350
|
-
```bash
|
|
351
|
-
tfx mcp list
|
|
352
|
-
tfx mcp sync
|
|
353
|
-
tfx mcp add context7 --url https://mcp.context7.com/mcp
|
|
354
|
-
tfx mcp remove context7
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
The registry is the source of truth for managed MCP targets. Avoid hand-editing
|
|
358
|
-
Codex/Antigravity/Claude MCP files unless you are intentionally debugging drift.
|
|
359
|
-
|
|
360
|
-
### State snapshots
|
|
361
|
-
|
|
362
|
-
Hub startup can take best-effort daily snapshots of selected `~/.codex/` and Antigravity/Gemini `~/.gemini/` state into ignored `references/*-snapshots/` folders. Manual helpers:
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
npm run snapshot:codex
|
|
366
|
-
npm run snapshot:gemini
|
|
367
|
-
npm run snapshot:all
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### Release and mirror checks
|
|
371
|
-
|
|
372
|
-
For repository changes that affect package contents, run the release gates before
|
|
373
|
-
shipping:
|
|
374
|
-
|
|
375
|
-
```bash
|
|
376
|
-
npm run lint:skills
|
|
377
|
-
npm run gen:skill-manifest
|
|
378
|
-
npm run release:check-sync
|
|
379
|
-
npm run release:check-mirror
|
|
380
|
-
npm run lint
|
|
202
|
+
Hub --> MCP[MCP tools]
|
|
203
|
+
Hub --> UI["HUD · claude agents panel"]
|
|
204
|
+
CLI --> Lake[(".triflux/lake (tfx cto)")]
|
|
381
205
|
```
|
|
382
206
|
|
|
383
|
-
|
|
384
|
-
|
|
207
|
+
Package layout and execution paths: [ARCHITECTURE.md](ARCHITECTURE.md). Documentation map:
|
|
208
|
+
[docs/README.md](docs/README.md).
|
|
385
209
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
## Platform Support
|
|
210
|
+
## Platforms
|
|
389
211
|
|
|
390
212
|
| Platform | Multiplexer | Notes |
|
|
391
213
|
| --- | --- | --- |
|
|
392
|
-
| macOS | tmux |
|
|
214
|
+
| macOS | tmux | Default path. Install `coreutils` (`gtimeout`) if you keep a positive hard ceiling. |
|
|
393
215
|
| Linux | tmux | Supported. |
|
|
394
|
-
| Windows | psmux + Windows Terminal |
|
|
395
|
-
|
|
396
|
-
See `.claude/rules/tfx-psmux.md` for the stricter Windows/psmux
|
|
397
|
-
rules used by agents and launch scripts.
|
|
216
|
+
| Windows | psmux + Windows Terminal | See below. |
|
|
398
217
|
|
|
399
|
-
|
|
218
|
+
**Windows.** psmux (a tmux fork) runs PowerShell by default. safety-guard blocks direct `wt.exe`
|
|
219
|
+
and raw `psmux kill-session`, so tabs and panes go through the `tfx-wt` skill (set up only on
|
|
220
|
+
Windows) and `hub/team/wt-manager.mjs`. Agent rules:
|
|
221
|
+
[`.claude/rules/tfx-psmux.md`](.claude/rules/tfx-psmux.md).
|
|
400
222
|
|
|
401
|
-
## Security and
|
|
223
|
+
## Security and guards
|
|
402
224
|
|
|
403
225
|
| Layer | Protection |
|
|
404
226
|
| --- | --- |
|
|
405
|
-
| Hub
|
|
406
|
-
|
|
|
407
|
-
|
|
|
408
|
-
|
|
|
409
|
-
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
npm ci
|
|
418
|
-
npm test
|
|
419
|
-
npm run lint
|
|
420
|
-
npm run release:check-sync
|
|
421
|
-
npm run release:check-mirror
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
Notes for contributors:
|
|
425
|
-
|
|
426
|
-
- Keep deprecated alias details out of the main README; update
|
|
427
|
-
[`docs/legacy-skill-aliases.md`](https://github.com/tellang/triflux/blob/main/docs/legacy-skill-aliases.md) instead.
|
|
428
|
-
- Keep Codex-local experiments under `~/.codex/skills`, not in this package,
|
|
429
|
-
unless the package boundary is intentionally changed.
|
|
430
|
-
- For docs-only changes, targeted checks such as `npm run lint` and release sync
|
|
431
|
-
checks are usually enough; full integration tests may start Hub servers and
|
|
432
|
-
local listener prompts.
|
|
433
|
-
|
|
434
|
-
---
|
|
227
|
+
| Managed routes | Codex and Antigravity are called through `tfx-route.sh`, Hub workers, or `tfx`, never through a bare `codex exec` or `agy`. This is a rule for callers; no hook enforces it. |
|
|
228
|
+
| safety-guard hook | Blocks destructive shell commands (root `rm -rf`, force push to main, `git clean -fd`, SQL `DROP`), direct `wt.exe`, raw psmux kill, and bash syntax sent over SSH to Windows hosts, and points to the managed alternative. |
|
|
229
|
+
| Hub | Binds to localhost; optional bearer token (`TFX_HUB_TOKEN`). |
|
|
230
|
+
| MCP registry | Replaces stale or unsupported MCP entries with managed ones. |
|
|
231
|
+
| Consensus | Deep and consensus runs report degraded or disputed results instead of hiding them. |
|
|
232
|
+
|
|
233
|
+
## Contributing
|
|
234
|
+
|
|
235
|
+
Node 20 or newer. See [CONTRIBUTING.md](CONTRIBUTING.md) for tests, lint, package boundaries,
|
|
236
|
+
mirror and release checks, and state snapshots. Releases are automated: merging a version-bump
|
|
237
|
+
commit to `main` runs `release.yml` after CI passes; it tags, creates the GitHub release, and publishes to npm
|
|
238
|
+
through OIDC Trusted Publishing. Decisions are recorded in [docs/adr/](docs/adr/README.md).
|
|
435
239
|
|
|
436
240
|
<p align="center">
|
|
437
241
|
<sub>MIT License · Made by <a href="https://github.com/tellang">tellang</a></sub>
|