@statechange/council 0.1.0 → 0.2.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.md CHANGED
@@ -1,124 +1,143 @@
1
1
  # @statechange/council
2
2
 
3
- A CLI + Electron GUI for orchestrating round-robin AI counsellor discussions. Build a council of AI personas each with their own backend, model, personality, and source material and have them debate topics in structured or freeform formats.
3
+ Build a council of AI personas and have them debate any topic. Each counsellor has their own LLM backend, model, personality, and source material. Run discussions in a structured **debate** format or an open **freeform** group chat — via the CLI, an Electron GUI, or Claude Code skills.
4
4
 
5
- ## Quick Start with Claude Code Skills
5
+ ## Getting Started with Claude Code Skills
6
6
 
7
- The fastest way to get started is through [Claude Code](https://claude.com/claude-code) skills. Install the package, and the skills handle the rest:
7
+ The fastest path is to add the skills to [Claude Code](https://claude.com/claude-code). They handle installation, configuration, counsellor creation, and running discussions for you.
8
8
 
9
9
  ```bash
10
- npm install -g @statechange/council
10
+ npx skills add statechangelabs/ai-council
11
11
  ```
12
12
 
13
- Then in Claude Code:
13
+ This gives you two skills:
14
14
 
15
- - **`/council-manage`** Create counsellors, run discussions, manage your council. Ask it to "create a counsellor based on [person]" or "run a debate about [topic]".
16
- - **`/council-setup-keys`** — Find API keys scattered across your env files and shell profiles, then consolidate them into `~/.ai-council/config.json`.
15
+ | Skill | What it does |
16
+ |-------|-------------|
17
+ | `/council-manage` | Create counsellors, run discussions, manage your council. Try: *"create a counsellor based on Warren Buffett"* or *"run a debate about whether AI should be open source"* |
18
+ | `/council-setup-keys` | Finds API keys scattered across your env files and shell profiles, then imports them into `~/.ai-council/config.json` |
17
19
 
18
- The skills know how to use the CLI, create counsellors from source material, and troubleshoot configuration issues.
20
+ The skills will install the `council` CLI automatically if it's not already on your system.
19
21
 
20
22
  ## Install
21
23
 
22
24
  ```bash
23
- # Global install (recommended for CLI use)
25
+ # Global install (gives you the `council` command)
24
26
  npm install -g @statechange/council
25
27
 
26
- # Or run directly
28
+ # Or run one-off without installing
27
29
  npx @statechange/council discuss "Should we adopt microservices?"
28
30
  ```
29
31
 
30
- ## CLI Usage
32
+ ## CLI
33
+
34
+ ### Run a discussion
31
35
 
32
36
  ```bash
33
- # Run a freeform discussion (default)
37
+ # Freeform (default) open group chat, everyone sees everything
34
38
  council discuss "Should we pivot to enterprise?" --rounds 3
35
39
 
36
- # Run a structured debate
40
+ # Debate structured constructive/rebuttal format
37
41
  council discuss "Should AI be open source?" --mode debate --rounds 3
38
42
 
39
- # Use specific counsellors
43
+ # Pick specific counsellors
40
44
  council discuss "Topic" --counsellors ./council/strategist ./council/critic
41
45
 
42
46
  # Topic from a file
43
47
  council discuss ./topics/architecture.md
48
+ ```
44
49
 
45
- # List available counsellors
46
- council list
50
+ ### Manage counsellors
47
51
 
48
- # View past discussions
49
- council history
50
- council history <id>
52
+ ```bash
53
+ council list # Show available counsellors
54
+ council counsellor add ./path/to/counsellor # Register from local directory
55
+ council counsellor add https://github.com/user/counsellors.git # From git
56
+ council counsellor remove my-counsellor # Unregister
51
57
  ```
52
58
 
53
- ### Discussion Modes
59
+ ### View history
60
+
61
+ ```bash
62
+ council history # List past discussions
63
+ council history <id> # View a specific discussion
64
+ ```
54
65
 
55
- **Freeform** (default) — Open group chat. Every counsellor sees the full conversation history on every turn. The first speaker sets the tone and later speakers react.
66
+ ### Configure backends
56
67
 
57
- **Debate** — Structured argument with three key differences:
58
- 1. **Round 1 (Constructive)**: Each counsellor argues their position based only on the question — no visibility into what others said.
59
- 2. **Rebuttal rounds**: Counsellors see the constructives plus only the previous round. Speaker order is shuffled each round.
60
- 3. **Interim summaries**: A brief secretary summary after each round, creating a running debate narrative.
68
+ ```bash
69
+ council config show # See what's configured
70
+ council config scan # Find API keys across your system
71
+ council config scan ~/project/.env # Scan additional paths
72
+ council config import # Import discovered keys into config
73
+ ```
61
74
 
62
- ### Options
75
+ ### All CLI options
63
76
 
64
77
  ```
65
- --council, -c Path to council directory (default: ./council/)
66
- --counsellors Specific counsellor directory paths (space-separated)
67
- --rounds, -r Number of discussion rounds (default: 2)
68
- --mode, -m freeform or debate (default: freeform)
69
- --output, -o Output directory (default: ./output)
70
- --format, -f md, json, or both (default: both)
71
- --infographic, -i Generate an infographic after discussion
78
+ council discuss <topic> [options]
79
+
80
+ --mode, -m freeform or debate (default: freeform)
81
+ --rounds, -r Number of discussion rounds (default: 2)
82
+ --council, -c Path to council directory (default: ./council/)
83
+ --counsellors Specific counsellor directory paths (space-separated)
84
+ --output, -o Output directory (default: ./output)
85
+ --format, -f md, json, or both (default: both)
86
+ --infographic, -i Generate an infographic after discussion
72
87
  ```
73
88
 
74
89
  ## GUI
75
90
 
76
- Launch the Electron app for a visual interface with real-time streaming, counsellor management, and discussion history:
91
+ The Electron app gives you a visual interface with real-time streaming, point-and-click counsellor management, and full discussion history.
77
92
 
78
93
  ```bash
79
- # Development
80
- council-gui # if installed globally
81
- # or from source:
94
+ # From the cloned repo
95
+ git clone https://github.com/statechangelabs/ai-council.git
96
+ cd ai-council
97
+ bun install
82
98
  bun run dev:gui
83
99
  ```
84
100
 
85
- The GUI includes:
86
- - Counsellor selection chips with health indicators
87
- - Freeform/Debate mode toggle with explanatory tooltips
88
- - Real-time streaming of counsellor responses
89
- - Round dividers and interim summaries in debate mode
90
- - Secretary summary with Excalidraw position diagrams
91
- - Infographic generation (OpenAI / Google)
92
- - Full discussion history with search
101
+ ### What you get
93
102
 
94
- ## Configuration
103
+ - **Discussion page** — Topic input with file attachments, counsellor selection chips, freeform/debate mode toggle, real-time streaming of responses, round dividers and interim summaries in debate mode, inject messages mid-discussion
104
+ - **Counsellors page** — Browse, search, create, edit, and delete counsellors with a form editor or raw ABOUT.md editing; register external counsellors from local paths or git repos
105
+ - **History page** — Browse past discussions, view full transcripts with round summaries, copy as markdown, generate infographics
106
+ - **Settings page** — Configure API keys per backend, test connections, see available models
95
107
 
96
- ### API Keys
108
+ ## Discussion Modes
97
109
 
98
- Backends need API keys (except Ollama which runs locally). Keys can come from:
110
+ ### Freeform
99
111
 
100
- 1. **Environment variables**: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`
101
- 2. **Config file**: `~/.ai-council/config.json`
102
- 3. **`.env` file** in the project root
112
+ The default. An open group chat where every counsellor sees the full conversation history on every turn. The first speaker sets the tone and later speakers react to what's been said. Counsellor order stays the same each round.
103
113
 
104
- Use the CLI to find and import keys:
114
+ ### Debate
105
115
 
106
- ```bash
107
- council config show # See what's configured
108
- council config scan # Find keys in env files and shell profiles
109
- council config scan ~/project/.env # Scan additional paths
110
- council config import # Import discovered keys
111
- ```
116
+ A structured argument format designed to prevent pile-on and anchoring bias:
117
+
118
+ 1. **Round 1 Constructive**: Each counsellor argues their position based *only* on the question. They can't see what anyone else said. Even a "critic" persona has to stand up their own argument first.
112
119
 
113
- Or configure in the GUI under Settings.
120
+ 2. **Rebuttal rounds (2+)**: Counsellors now see the constructive round plus *only* the previous rebuttal round — not the entire history. This keeps context growth bounded. Speaker order is shuffled each round so nobody is always first or last.
121
+
122
+ 3. **Interim summaries**: If a secretary is configured, a brief summary is generated after every round, tracking emerging agreements, disagreements, and shifts in position.
123
+
124
+ ## Configuration
125
+
126
+ ### API Keys
127
+
128
+ Each backend needs an API key (except Ollama, which runs locally). Keys are resolved in order:
129
+
130
+ 1. `~/.ai-council/config.json` (managed by `council config import` or the GUI)
131
+ 2. Environment variables: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`
132
+ 3. `.env` file in the working directory
114
133
 
115
134
  ### Secretary
116
135
 
117
- Add a `secretary` block to `~/.ai-council/config.json` to enable post-discussion summaries and debate interim summaries:
136
+ Enable post-discussion summaries (and debate interim summaries) by adding a `secretary` block to `~/.ai-council/config.json`:
118
137
 
119
138
  ```json
120
139
  {
121
- "backends": { ... },
140
+ "backends": { "..." : "..." },
122
141
  "secretary": {
123
142
  "backend": "anthropic",
124
143
  "model": "claude-sonnet-4-5-20250929"
@@ -126,9 +145,18 @@ Add a `secretary` block to `~/.ai-council/config.json` to enable post-discussion
126
145
  }
127
146
  ```
128
147
 
148
+ ### Supported Backends
149
+
150
+ | Backend | Default Model | API Key |
151
+ |---------|--------------|---------|
152
+ | anthropic | claude-sonnet-4-5-20250929 | `ANTHROPIC_API_KEY` |
153
+ | openai | gpt-4o | `OPENAI_API_KEY` |
154
+ | google | gemini-2.0-flash | `GOOGLE_API_KEY` |
155
+ | ollama | llama3.2 | None (local) |
156
+
129
157
  ## Creating Counsellors
130
158
 
131
- Each counsellor is a directory with an `ABOUT.md` file:
159
+ A counsellor is a directory containing an `ABOUT.md` file with YAML frontmatter and a system prompt:
132
160
 
133
161
  ```
134
162
  council/
@@ -137,7 +165,7 @@ council/
137
165
  avatar.jpg # optional
138
166
  ```
139
167
 
140
- ### ABOUT.md Format
168
+ ### ABOUT.md format
141
169
 
142
170
  ```markdown
143
171
  ---
@@ -151,55 +179,58 @@ avatar: "avatar.jpg"
151
179
  ---
152
180
 
153
181
  You are The Strategist. You sit on a council of experts and bring a
154
- strategic lens to every discussion...
182
+ strategic lens to every discussion.
183
+
184
+ When contributing:
185
+ - Think about second and third-order effects
186
+ - Consider offensive and defensive strategic positions
187
+ - Ground your thinking in frameworks when relevant
188
+ - Be direct and opinionated
189
+
190
+ Keep your responses focused. Aim for 2-4 paragraphs per turn.
155
191
  ```
156
192
 
157
- ### Supported Backends
193
+ ### Frontmatter fields
158
194
 
159
- | Backend | Default Model | API Key |
160
- |---------|--------------|---------|
161
- | anthropic | claude-sonnet-4-5-20250929 | `ANTHROPIC_API_KEY` |
162
- | openai | gpt-4o | `OPENAI_API_KEY` |
163
- | google | gemini-2.0-flash | `GOOGLE_API_KEY` |
164
- | ollama | llama3.2 | None (local) |
195
+ | Field | Required | Description |
196
+ |-------|----------|-------------|
197
+ | `name` | Yes | Display name |
198
+ | `description` | Yes | One-line summary of this counsellor's perspective |
199
+ | `backend` | Yes | `anthropic`, `openai`, `google`, or `ollama` |
200
+ | `model` | No | Specific model ID; uses backend default if omitted |
201
+ | `temperature` | No | 0.0–2.0; higher = more creative (default varies by backend) |
202
+ | `interests` | No | Tags shown in the UI |
203
+ | `avatar` | No | Path to local image or URL |
165
204
 
166
- ### Registering External Counsellors
205
+ ### Included counsellors
167
206
 
168
- ```bash
169
- # From a local directory
170
- council counsellor add ./path/to/counsellor
207
+ The package ships with three starter counsellors:
171
208
 
172
- # From a git repository
173
- council counsellor add https://github.com/user/my-counsellors.git
209
+ | Counsellor | Backend | Perspective |
210
+ |-----------|---------|-------------|
211
+ | **The Strategist** | Anthropic (Haiku) | Strategic business advisor — positioning, growth, competitive advantage |
212
+ | **The Creative** | Anthropic (Opus) | Lateral thinker — unexpected analogies, reframing, unconventional connections |
213
+ | **The Critic** | Google (Gemini Flash) | Devil's advocate — stress-tests ideas, surfaces assumptions, finds failure modes |
174
214
 
175
- # List registered counsellors
176
- council counsellor list
215
+ ### Building counsellors from source material
177
216
 
178
- # Remove
179
- council counsellor remove my-counsellor
180
- ```
217
+ You can create counsellors based on real people or bodies of work by appending reference material below the system prompt. The `/council-manage` skill in Claude Code can automate this — ask it to *"create a counsellor based on [person or book]"* and it'll handle downloading source text, writing the system prompt, and assembling the ABOUT.md.
181
218
 
182
219
  ## Logging
183
220
 
184
- Errors are logged to `~/.ai-council/council.log` with timestamps, context, and full stack traces. Check this file when a counsellor fails to respond or a summary doesn't generate.
221
+ Errors are logged to `~/.ai-council/council.log` with timestamps, context tags, and full stack traces. Check this file when a counsellor fails to respond or a summary doesn't generate.
185
222
 
186
223
  ## Development
187
224
 
188
225
  ```bash
189
- # Install dependencies
226
+ git clone https://github.com/statechangelabs/ai-council.git
227
+ cd ai-council
190
228
  bun install
191
229
 
192
- # CLI development
193
- bun run dev -- discuss "topic"
194
-
195
- # GUI development
196
- bun run dev:gui
197
-
198
- # Build CLI
199
- bun run build
200
-
201
- # Build GUI
202
- bun run build:gui
230
+ bun run dev -- discuss "topic" # CLI development
231
+ bun run dev:gui # GUI development
232
+ bun run build # Build CLI
233
+ bun run build:gui # Build GUI
203
234
  ```
204
235
 
205
236
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statechange/council",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "CLI + GUI for orchestrating round-robin AI counsellor discussions with structured debate and freeform modes",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "https://github.com/statechangelabs/council.git"
22
+ "url": "https://github.com/statechangelabs/ai-council.git"
23
23
  },
24
24
  "keywords": [
25
25
  "ai",
@@ -206,7 +206,7 @@ council config import # Import found keys
206
206
 
207
207
  All of the above can also be done in the Electron GUI (requires cloning the repo):
208
208
  ```bash
209
- git clone https://github.com/statechangelabs/council.git && cd council
209
+ git clone https://github.com/statechangelabs/ai-council.git && cd council
210
210
  bun install && bun run dev:gui
211
211
  ```
212
212
  - **Settings page**: Configure API keys, test connections, see available models