brainstorming 0.1.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +133 -0
  3. package/dist/index.js +1495 -0
  4. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ali Ildan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ <div align="center">
2
+
3
+ <img src="https://raw.githubusercontent.com/aliildan/brainstorming/main/logo.png" alt="brainstorming" width="360" />
4
+
5
+ ### One terminal. Every AI coding agent. Same conversation.
6
+
7
+ **brainstorming** is a TUI where Claude Code, OpenAI Codex, Google Antigravity and Ollama models
8
+ sit in **one shared chat** over your codebase — trading opinions, taking on tasks you @-mention,
9
+ and consulting each other while you steer.
10
+
11
+ [![npm](https://img.shields.io/npm/v/brainstorming.svg)](https://www.npmjs.com/package/brainstorming)
12
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
13
+ [![node](https://img.shields.io/badge/node-%E2%89%A520-brightgreen.svg)](https://nodejs.org)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## Why
20
+
21
+ You already pay for Claude, ChatGPT/Codex, Gemini/Antigravity and run Ollama. But they each live in
22
+ their own window, blind to each other. So you become a human clipboard — pasting Claude's plan into
23
+ Codex, Codex's diff into Gemini, and back again, at 3AM.
24
+
25
+ <div align="center">
26
+ <img src="https://raw.githubusercontent.com/aliildan/brainstorming/main/brainstroming_meme.png" alt="Developers with AI at 3AM" width="320" />
27
+ </div>
28
+
29
+ **brainstorming** puts them in the same room. One shared transcript is the source of truth. Everyone
30
+ sees every message and decision. You @-mention who should act, they can @-mention each other to
31
+ consult, and the whole group converges — with you holding the remote.
32
+
33
+ ## Features
34
+
35
+ - **One shared conversation** — every agent reads the same transcript, so context is never re-pasted.
36
+ - **@-mention routing** — `@codex build the parser`, `@all what do you think?`, or just keep talking to whoever answered last (sticky targets).
37
+ - **Agent-to-agent consultation** — an agent can `@claude` another for a second opinion, bounded by a per-message **round budget** so loops can't burn your quota. Out of budget? `/continue` or let it rest.
38
+ - **Real work, with your approval** — Claude and Codex tool actions surface as a single **permission card** in the TUI; you press `i` / `o` / `r` to allow / allow-for-session / deny.
39
+ - **Persistent & resumable** — the transcript and each backend's native session are saved under `.brainstorming/`; reopen the room and everyone remembers.
40
+ - **Uses your existing logins** — no API keys. It drives the CLIs/SDKs you're already signed into.
41
+ - **`/decide`** — record a group decision to `DECISIONS.md`; it's surfaced to every agent afterwards.
42
+ - **Try it free** — `--demo` runs the whole experience with scripted agents and zero quota.
43
+
44
+ ## Install
45
+
46
+ ```bash
47
+ npm install -g brainstorming
48
+ ```
49
+
50
+ **Prerequisites** — install and sign into the agents you want in the room (each optional; enable/disable in config):
51
+
52
+ | Agent | CLI / backend | Sign in with |
53
+ | --- | --- | --- |
54
+ | `@claude` | [`claude`](https://claude.com/claude-code) (Claude Agent SDK) | `claude` → `/login` (Pro/Max subscription) |
55
+ | `@codex` | [`codex`](https://developers.openai.com/codex) (`codex app-server`) | `codex login` (ChatGPT subscription) |
56
+ | `@antigravity` | [`agy`](https://antigravity.google) (Antigravity CLI) | Google sign-in on first run |
57
+ | `@ollama` | [`ollama`](https://ollama.com) (local or `*-cloud` models) | `ollama signin` for cloud models |
58
+
59
+ Node ≥ 20 required. No `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` needed — subscriptions are used.
60
+
61
+ ## Quick start
62
+
63
+ ```bash
64
+ cd your-project # a git repo (Codex needs one)
65
+ brainstorming # opens the shared chat in the current directory
66
+ ```
67
+
68
+ Try it with no setup and no quota:
69
+
70
+ ```bash
71
+ brainstorming --demo
72
+ ```
73
+
74
+ In the chat:
75
+
76
+ - `@all which API style should we use?` — everyone weighs in; Claude may consult Codex automatically.
77
+ - `@codex scaffold the endpoints` — delegate real work; approve its edits from the permission card.
78
+ - `@claude pingpong` (demo) — watch the round budget stop an infinite agent loop, then `/continue`.
79
+ - `/decide use versioned REST + OpenAPI` — record the call to `DECISIONS.md`.
80
+ - `/help` for all commands · `Tab` to autocomplete `@names` · `Esc` to interrupt · `/quit` to exit.
81
+
82
+ ## How it works
83
+
84
+ ```
85
+ ┌──────────────── brainstorming (Ink TUI) ────────────────┐
86
+ │ shared transcript · router · round-budget engine │
87
+ └───────────────────────────┬─────────────────────────────┘
88
+ one common AgentAdapter interface
89
+ ┌───────────┬───────────────┼───────────────┬─────────────┐
90
+ Claude Codex Antigravity Ollama
91
+ agent-sdk app-server agy CLI /api/chat
92
+ (resume) (JSON-RPC/stdio) (stream-json) (client history)
93
+ ```
94
+
95
+ - The **transcript** (`.brainstorming/room.jsonl`) is the single source of truth; every agent is briefed from it, so any one can be restarted and re-briefed.
96
+ - The **router** delivers each message to its `@mentioned` targets (or the previous ones), and `@all` fans out in parallel.
97
+ - The **cascade engine** lets agents mention each other, bounded by the round budget, with `/continue` and `Esc` in your hands.
98
+ - Each agent is a thin **adapter** behind one interface — streaming text, tool activity, permission requests, and session resume — so new backends slot in without touching the core.
99
+
100
+ ## Configuration
101
+
102
+ A config file is created on first run at `~/.config/brainstorming/config.json`:
103
+
104
+ ```json
105
+ {
106
+ "roundBudget": 3,
107
+ "agents": {
108
+ "claude": { "enabled": true },
109
+ "codex": { "enabled": true },
110
+ "antigravity": { "enabled": true },
111
+ "ollama": { "enabled": true, "model": "qwen3.5:cloud" }
112
+ }
113
+ }
114
+ ```
115
+
116
+ Disable an agent with `"enabled": false`, pin a `model`, or add `personaExtra` to shape how one behaves in the room. If Ollama has no `model`, brainstorming auto-picks an available `*-cloud` model.
117
+
118
+ ## Development
119
+
120
+ ```bash
121
+ git clone https://github.com/aliildan/brainstorming.git
122
+ cd brainstorming
123
+ pnpm install
124
+ pnpm test # unit + end-to-end tests (no quota)
125
+ pnpm typecheck
126
+ pnpm demo # run the demo from source
127
+ ```
128
+
129
+ Monorepo layout: `packages/core` (kernel), `packages/adapters` (per-agent backends), `packages/tui` (Ink UI), `apps/cli` (the `brainstorming` binary).
130
+
131
+ ## License
132
+
133
+ MIT © Ali Ildan