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

deliberate-ai

v1.0.2

Published

Deep Ideation, Multi-Agent Deliberation & Systematic Thinking Engine for AI Coding Agents

Readme

Deliberate ⚡

Deep Ideation, Multi-Agent Deliberation & Systematic Thinking Engine for AI Coding Agents.
Empowers Claude Code, Antigravity, Codex, Devin, and Cursor with structured "System 2" reasoning before writing code.

npm version License: MIT MCP Protocol Architecture Deliberated PRs Welcome


🚀 Quick Run in 15 Seconds (Zero Install)

# 1. Multi-round dialectical brainstorm with visual browser dashboard & ADR
npx deliberate-ai brainstorm "Designing a lock-free distributed ring buffer" \
  --rounds 2 \
  --show-debate \
  --adr ./docs/adr/ADR-001.md \
  --ui

# 2. Automated Git Pre-Push Protection Hook
npx deliberate-ai hook install

# 3. Pre-PR Git diff adversarial red-teaming
npx deliberate-ai red-team --git --export ./audit-report.md

# 4. Interactive council interview Q&A ("Grill Me" mode)
npx deliberate-ai interview "Real-time collaborative canvas with 10k users"

📖 Table of Contents


🎯 The Problem: "First-Token Greediness"

When AI coding agents (Claude Code, Antigravity, Devin, Codex) tackle non-trivial architecture or migration tasks, they typically suffer from First-Token Greediness—immediately generating standard boilerplate on token #1 without exploring alternative paradigms, stress-testing edge cases, or weighing Pareto trade-offs.

Deliberate is a dedicated open-source deliberation library, CLI, and Model Context Protocol (MCP) server that injects systematic, high-order thinking into any AI coding workflow.

 User Goal ──► [ Systematic Ideation Topologies ] ──► [ Adversarial Council ] ──► [ Dialectical Synthesis ]
                • First-Principles                     • The Principal Architect   • Pareto Trade-Off Matrix
                • Inversion (Anti-Problem)             • The Ruthless Contrarian   • Hard Invariants
                • TRIZ Contradictions                  • The Performance Hacker    • Actionable Blueprint
                • SCAMPER Mutations                    • The DX Purist             • Implementation Steps
                • Tree-of-Thoughts                     • The Security Auditor
                                                       • The Pragmatist (YAGNI)

⚡ Quickstart in 30 Seconds

Export your preferred LLM key and run instantly with npx:

# 1. Set your API key
export GEMINI_API_KEY="your-gemini-key"      # or ANTHROPIC_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY

# 2. Run Deliberate Brainstorming
npx deliberate-ai brainstorm "Real-time state sync for collaborative canvas with 10k users"

(Or install globally: npm install -g deliberate-ai)


🎛️ Interactive Model & Council Persona Selector

Deliberate comes with an interactive terminal wizard that lets you configure your models:

# Launch the interactive configuration wizard
npx deliberate-ai config

# Or pass -i to configure before running a brainstorm
npx deliberate-ai brainstorm "Multi-tenant auth engine" -i

You can choose between two modes:

  1. Unified (One Model for All): Uses a single provider (e.g. Gemini 2.5 Flash, Claude 3.7, or GPT-4o) across all topologies and council debates.
  2. Council Mix-and-Match (Elite Multi-Agent Diversity): Assign specialized models to different personas for maximum cognitive diversity:
    • 🏛️ The Principal ArchitectAnthropic Claude 3.7 Sonnet
    • 🥊 The Ruthless ContrarianDeepSeek-R1 Reasoner
    • The Performance HackerGoogle Gemini 2.5 Flash
    • 💎 The DX & Ergonomics PuristAnthropic Claude 3.7 Sonnet
    • 🛡️ The Security AuditorOpenAI GPT-4o
    • 🔨 The PragmatistLocal Ollama / Llama 3.3
    • Master SynthesizerAnthropic Claude 3.7 Sonnet

(Configurations are saved automatically to ./deliberate.config.json or ~/.deliberaterc)


🔑 How to Configure Your LLM Provider

Deliberate natively connects directly to frontier LLMs or free local models:

1. Cloud Providers

| Provider | Environment Variable | Default Model | Flag Override | | :--- | :--- | :--- | :--- | | Google Gemini | export GEMINI_API_KEY="..." | gemini-2.5-flash | --provider gemini --model gemini-2.5-pro | | Anthropic Claude | export ANTHROPIC_API_KEY="..." | claude-3-7-sonnet-20250219 | --provider anthropic | | OpenAI / Codex | export OPENAI_API_KEY="..." | gpt-4o | --provider openai --model o3-mini | | DeepSeek | export DEEPSEEK_API_KEY="..." | deepseek-reasoner | --provider deepseek |

2. Free & 100% Offline Local Models (Ollama)

If you don't want to use API keys, start Ollama locally:

ollama run deepseek-r1:14b
# Deliberate auto-detects localhost:11434 with zero configuration!
npx deliberate-ai brainstorm "Design an in-memory ring buffer" --provider ollama

🛠️ Detailed How-To Guides

1. How to Brainstorm a System Architecture

Use brainstorm when designing new features, services, or data pipelines:

# Standard Balanced Deliberation (Topologies + 6 Personas)
npx deliberate-ai brainstorm "Multi-tenant auth engine with row-level security"

# Deep Tree-of-Thoughts Exploration with hard constraints
npx deliberate-ai brainstorm "Distributed cache with sub-ms p99 latency" \
  --mode deep-explore \
  --constraints "Zero external Redis daemons" "Memory bounded at 128MB"

# Fast 10-Second Sanity Check
npx deliberate-ai brainstorm "State management for offline-first React app" --mode flash

2. How to Red-Team Existing Source Code

Use red-team to find race conditions, security vulnerabilities, memory leaks, and missing invariants in an existing file:

npx deliberate-ai red-team ./src/billing/transfer.ts \
  --goal "Ensure zero double-spending under concurrent API requests"

3. How to Summon Specific Council Personas

If you only want specific expert viewpoints (e.g. Security + Performance):

npx deliberate-ai council "Migrate SQLite to distributed Raft" \
  --personas architect performance security

4. How to Connect to Claude Code (MCP)

Add deliberate-ai to Claude Code so Claude automatically deliberates before generating code:

claude mcp add deliberate npx -y deliberate-ai mcp

Now in Claude Code:

"Claude, re-architect our WebSocket ingestion layer to handle 50,000 concurrent connections."
Claude will automatically call deliberate_brainstorm and follow the synthesized Pareto blueprint!


5. How to Install into Google Antigravity

Install the Deliberate skill into Antigravity with 1 command:

mkdir -p ~/.gemini/antigravity/skills/deliberate
curl -sSL https://raw.githubusercontent.com/shanmukhaditya/deliberate/main/integrations/antigravity/SKILL.md > ~/.gemini/antigravity/skills/deliberate/SKILL.md

Now in Antigravity chat:

"Use deliberate to brainstorm a zero-downtime database partitioning strategy."


6. How to Use in Cursor, Windsurf & GitHub Copilot

For Cursor / Windsurf:

Drop the rules into your project:

curl -sSL https://raw.githubusercontent.com/shanmukhaditya/deliberate/main/integrations/cursor/.cursorrules > .cursorrules

For GitHub Copilot & Codex:

Add instructions to your repo:

mkdir -p .github
curl -sSL https://raw.githubusercontent.com/shanmukhaditya/deliberate/main/integrations/antigravity/SKILL.md > .github/copilot-instructions.md

7. How to Use the Programmatic SDK

In TypeScript / Node.js:

import { deliberate } from 'deliberate-ai';

const result = await deliberate.brainstorm({
  goal: "Design high-throughput event streamer with zero external dependencies",
  mode: "council",
  provider: "gemini", // or "anthropic", "openai", "deepseek", "ollama"
  constraints: ["p99 < 1ms", "Bounded memory at 64MB"]
});

console.log("Winning Architecture:", result.blueprint.winningArchitecture.title);
console.log("Hard Invariants:", result.blueprint.coreInvariants);
console.log("Implementation Steps:", result.blueprint.implementationSteps);

In Python / OpenAI Codex:

from deliberate_codex import Deliberate

result = Deliberate.brainstorm(
    goal="Design an in-memory lockless ring buffer",
    mode="council",
    provider="gemini"
)
print(result["stdout"])

🧠 The 6 Adversarial Personas

Unlike polite chat models that agree with everything, Deliberate personas enforce strict, anti-sycophantic loss functions:

| Persona | Title | Stance & Cognitive Duty | | :--- | :--- | :--- | | 🏛️ The Principal Architect | Staff Systems Architect | Demands modularity, clean domain boundaries, and long-term evolvability. | | 🥊 The Ruthless Contrarian | Adversarial Red-Teamer | Unforgivingly attacks the happy-path; hunts catastrophic edge cases & race conditions. | | ⚡ The Performance Hacker | Systems Optimization Guru | Obsessed with mechanical sympathy, zero-allocation data structures, and sub-millisecond p99. | | 💎 The DX & Ergonomics Purist | API Designer | Enforces the "Rule of 3 Seconds"; eliminates ceremony, cognitive load, and boilerplate. | | 🛡️ The Security Auditor | Zero-Trust Architect | Audits trust boundaries, injection surfaces, privilege escalation, and memory safety. | | 🔨 The Pragmatist | KISS & YAGNI Enforcer | Cuts over-engineering; favors boring, proven primitives over distributed complexity. |


🔬 The 5 Systematic Ideation Topologies

Deliberate replaces vague prompting with formal inventive heuristics:

  1. First-Principles Deconstruction: Strips framework assumptions down to raw I/O, memory bandwidth, and computational constraints.
  2. Inversion (The Anti-Problem / Jacobi's Rule): Simulates worst-case catastrophic failure modes, then inverts every failure into a non-negotiable Architectural Invariant.
  3. TRIZ Contradiction Resolution: Eliminates inherent engineering trade-offs (e.g. Query Latency vs. Memory Overhead) using inventive principles.
  4. SCAMPER Architectural Mutation: Mutates designs through 7 operators (Substitute, Combine, Adapt, Modify, Put to use, Eliminate, Reverse).
  5. Tree-of-Thoughts Pareto Exploration: Generates 3-4 distinct architectural branches and computes Pareto scores across DX, Performance, Simplicity, and Security.

🔒 Privacy & Security FAQ

Where do my prompts and code go?

Prompts go directly and only to your chosen LLM provider (Google, Anthropic, OpenAI, DeepSeek) over encrypted HTTPS using your own API key. If you use Ollama, zero data leaves your laptop. There are no middleman servers, no proxy relays, and no telemetry.

Can I use this without any API keys?

Yes! Install Ollama and run ollama run deepseek-r1:14b (or llama3.3). Deliberate auto-detects local Ollama on localhost:11434.


📄 License

MIT © Shanmukh Aditya