npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@quarkos/pi-fusion

v1.0.1

Published

Multi-model deliberation harness (OpenRouter Fusion pattern) for OpenCode Go

Downloads

260

Readme

Pi Fusion

Pi Fusion is an orchestration harness and agent extension that implements a multi-model deliberation pipeline. Inspired by the OpenRouter Fusion design pattern, it takes any complex technical request or coding query and runs it through a three-tier process: parallel expert panels, a structured comparative analysis, and a final grounded synthesis.

It is written in Node.js with native ES Modules, requires no build steps, and features out-of-the-box configuration for OpenCode Go subscription models.


How It Works

The deliberation pipeline consists of three sequential stages:

                  [User Query]
                       |
         +-------------+-------------+
         |             |             |
         v             v             v
    [Technical]    [Devil's]     [Systems]       Tier 1: Parallel Panel
     [Expert]     [Advocate]    [Thinker]        (System Prompt Personas)
         |             |             |
         +-------------+-------------+
                       |
                       v
               [Deliberation]                    Tier 2: Judge
                  [Judge]                        (Structured JSON output)
                       |
                       v
                 [Synthesis]                     Tier 3: Synthesis
                   [Model]                       (Grounded final answer)
                       |
                       v
                [Final Answer]

Tier 1: Panel (Parallel Execution)

The user query is sent to three separate expert models in parallel:

  • Technical Expert (qwen3.7-plus): Evaluates correctness, architectural patterns, performance, and security.
  • Devil's Advocate (deepseek-v4-pro): Challenges assumptions, identifies edge cases, highlights risks, and evaluates simpler alternatives.
  • Systems Thinker (glm-5.1): Focuses on integration, API design, testing strategies, long-term technical debt, and maintainability.

Tier 2: Judge (Deliberative Analysis)

A comparison model (qwen3.7-plus) reviews the panel responses to find agreements and conflicts. It produces a structured JSON output with five keys:

  • consensus: Core technical decisions where the experts agree.
  • contradictions: Specific design conflicts or tradeoffs.
  • partial_coverage: Points raised by some but not all models.
  • unique_insights: Non-obvious optimizations or approaches.
  • blind_spots: Critical omissions or risks that none of the models addressed.

Tier 3: Synthesis (Final Grounded Answer)

A final model (qwen3.7-plus) synthesizes the user query, the panel responses, and the Judge's structured JSON analysis into a comprehensive markdown answer.


Configuration and Setup

  1. Install dependencies in your project directory:

    npm install
  2. Set your OpenCode Go API key:

    • Windows (PowerShell):
      $env:OC_GO_CC_API_KEY="sk-opencode-..."
    • Linux/macOS:
      export OC_GO_CC_API_KEY="sk-opencode-..."

If no OpenCode Go key is found, the client looks for a standard OPENAI_API_KEY and falls back to standard OpenAI endpoints.


Command Line Usage

You can run Pi Fusion directly as a command-line tool.

Direct Run

Submit a query from the terminal:

node bin/pi-harness.js "Explain the tradeoffs between microservices and monoliths"

Verbose Mode

Use the --verbose or -v flag to inspect the individual panel responses:

node bin/pi-harness.js "Write a thread-safe singleton pattern in Go" --verbose

Interactive Mode (REPL)

Launch a persistent chat session to run multiple queries:

node bin/pi-harness.js --interactive

Model Overrides

You can override default models for any tier using the --models flag:

node bin/pi-harness.js "Test query" --models "technical_expert=deepseek-v4-pro,judge=glm-5.1"

Installing as a Pi Agent Extension

Pi Fusion is designed to be fully compatible with the Pi Coding Agent (pi.dev). When installed, it adds a /fusion command and a deliberate tool to the agent.

Install the extension from GitHub:

pi install git:github.com/QuarkOS/Pi-Fusion.git

Or install it locally from your project folder:

pi install .

Registered Features inside Pi:

  • Slash Command: /fusion <prompt> — Runs the multi-model deliberation pipeline directly in your Pi terminal session.
  • Agent Tool: deliberate — Allows the Pi Coding Agent to call this deliberation process programmatically when solving complex coding problems.