@dmsdc-ai/aigentry-deliberation 0.0.39 → 0.0.40

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,97 +1,63 @@
1
1
  # @dmsdc-ai/aigentry-deliberation
2
2
 
3
- Part of aigentry — the open-source engine that makes AI decisions auditable.
4
-
5
- **The only tool that lets multiple AIs debate before deciding.**
6
-
7
- MCP Deliberation Server — Multi-session AI deliberation with smart speaker ordering and persona roles. No competitor has this: aigentry-deliberation is the killer feature of the aigentry platform, enabling structured multi-AI debate with full audit trails before any decision is committed.
8
-
9
- ## Features
10
-
11
- - **Multi-session** parallel deliberation support
12
- - **Smart speaker ordering**: cyclic, random, weighted-random strategies
13
- - **Persona roles**: critic, implementer, mediator, researcher, free with prompt templates
14
- - **Vote parsing**: [AGREE] / [DISAGREE] / [CONDITIONAL] extraction
15
- - **Browser LLM integration**: CDP-based auto-turn for ChatGPT, Claude, Gemini browser tabs
16
- - **Chrome Extension support**: Side panel detection via title-based matching
17
- - **Cross-platform**: macOS (tmux + Terminal.app), Windows (Windows Terminal), Linux
18
- - **Telepty bus transport**: structured `turn_request` delivery for telepty-managed sessions
19
- - **User-confirmed speaker selection**: candidates must be confirmed before a session can start
20
- - **Obsidian archiving**: Auto-archive deliberation results to Obsidian vault
21
- - **Session monitoring**: Real-time tmux/terminal monitoring
22
- - **Vote enforcement**: Automatic [AGREE]/[DISAGREE]/[CONDITIONAL] vote marker requirement
23
- - **Dynamic CLI timeout**: Smart cold-start handling (180s first turn, 120s subsequent)
24
- - **Split telepty timeouts**: 5s transport ack + 60s semantic response tracking
25
- - **Typed synthesis envelopes**: validated structured payloads for downstream automation
26
- - **Runtime logging**: Session lifecycle event logging for observability
27
- - **Resilient browser automation**: 5-stage degradation state machine with 60s SLO
28
- - **Model routing**: Dynamic per-provider model selection based on prompt analysis
29
- - **Role drift detection**: Structural heading markers + keyword analysis for accurate role inference
3
+ **Structured multi-AI discussions via MCP.**
4
+
5
+ The only MCP server that lets multiple AI agents debate a question before committing to a decision. Run structured discussions across CLI agents (Claude Code, Codex, Gemini) and browser LLMs (ChatGPT, Claude Web, Gemini Web) with full audit trails, vote tracking, and synthesis.
6
+
7
+ ## What it does
8
+
9
+ - **Structured deliberation sessions** — pose a topic, route turns to each speaker, collect [AGREE]/[DISAGREE]/[CONDITIONAL] votes, synthesize consensus
10
+ - **Smart speaker ordering** — cyclic, random, or weighted-random strategies to balance participation
11
+ - **Persona roles** assign critic, implementer, mediator, researcher, or free roles with built-in prompt templates
12
+ - **Browser LLM integration** — CDP-based auto-turn for ChatGPT, Claude Web, Gemini Web and more; clipboard fallback for unsupported providers
13
+ - **Typed synthesis output** structured `ExecutionContractV2` envelopes with decisions, actionable tasks, and optional experiment verdicts for downstream automation
30
14
 
31
15
  ## Installation
32
16
 
33
- 원클릭 설치어떤 프로젝트 환경에서든 동작합니다:
17
+ One-command installregisters the MCP server with Claude Code and Gemini CLI automatically:
34
18
 
35
19
  ```bash
36
20
  npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install
37
21
  ```
38
22
 
39
- 명령은:
40
- 1. `~/.local/lib/mcp-deliberation/`에 서버 파일 설치 (Windows: `%LOCALAPPDATA%/mcp-deliberation/`)
41
- 2. npm 의존성 설치
42
- 3. `~/.claude/.mcp.json`에 MCP 서버 자동 등록
43
- 4. Claude Code 재시작하면 바로 사용 가능
44
- 5. Gemini CLI MCP 서버 자동 등록 (`~/.gemini/settings.json`)
45
- 6. deliberation-gate 스킬 자동 설치 (`~/.claude/skills/deliberation-gate/`)
23
+ This installs the server to `~/.local/lib/mcp-deliberation/` (Windows: `%LOCALAPPDATA%/mcp-deliberation/`), registers it in `~/.claude/.mcp.json` and `~/.gemini/settings.json`, and installs the `deliberation-gate` skill to `~/.claude/skills/`.
24
+
25
+ Restart Claude Code / Gemini CLI after install. That's it.
46
26
 
47
- ### 기타 설치 방법
27
+ **Global install (alternative):**
48
28
 
49
29
  ```bash
50
- # 글로벌 설치
51
- npm install -g @dmsdc-ai/aigentry-deliberation
52
- deliberation-install
30
+ npm install -g @dmsdc-ai/aigentry-deliberation && deliberation-install
31
+ ```
53
32
 
54
- # aigentry-devkit 통합 설치
55
- npx @dmsdc-ai/aigentry-devkit setup
33
+ **Uninstall:**
56
34
 
57
- # 소스에서 직접 설치
58
- git clone https://github.com/dmsdc-ai/aigentry-deliberation.git
59
- cd aigentry-deliberation && npm install && node install.js
35
+ ```bash
36
+ npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install --uninstall
60
37
  ```
61
38
 
62
- ### 제거
39
+ Removes MCP registrations, installed files, and skill files automatically.
40
+
41
+ **Diagnostics:**
63
42
 
64
43
  ```bash
65
- npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install --uninstall
44
+ npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-doctor
66
45
  ```
67
46
 
68
- MCP 서버 등록 해제 + 설치 파일 삭제 + 스킬 파일 정리까지 자동 처리됩니다.
47
+ Auto-diagnoses MCP configuration for Claude Code, Codex CLI, and Gemini CLI.
69
48
 
70
49
  ## Forum Demo
71
50
 
72
- Deliberation이 완료되면 결과를 시각화하는 Forum View를 생성합니다.
51
+ When a deliberation completes, the synthesized result can be visualized as a Forum view.
73
52
 
74
- > **Deliberation = 프로세스, Forum = 출력물.**
75
- > Deliberation이 끝나면 Forum이 생성되고, 그게 끝입니다.
53
+ > Deliberation is the process. Forum is the output. When deliberation ends, the Forum is generated.
76
54
 
77
55
  ![Forum Demo](demo/forum/assets/hero.png)
78
56
 
79
- 정적 데모를 브라우저에서 확인하려면:
80
-
81
57
  ```bash
82
58
  open demo/forum/index.html
83
59
  ```
84
60
 
85
- ## Diagnostics
86
-
87
- MCP 연결 문제 자동 진단:
88
-
89
- ```bash
90
- npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-doctor
91
- ```
92
-
93
- Claude Code, Codex CLI, Gemini CLI의 MCP 설정을 자동 점검하고 문제를 진단합니다.
94
-
95
61
  ## MCP Tools
96
62
 
97
63
  | Tool | Description |
@@ -101,25 +67,25 @@ Claude Code, Codex CLI, Gemini CLI의 MCP 설정을 자동 점검하고 문제
101
67
  | `deliberation_synthesize` | Generate synthesis report |
102
68
  | `deliberation_status` | Check session status |
103
69
  | `deliberation_context` | Load project context |
104
- | `deliberation_inject_context` | Inject structured context or external experiment history into an active session |
70
+ | `deliberation_inject_context` | Inject structured context or experiment history into an active session |
105
71
  | `deliberation_history` | View discussion history |
106
72
  | `deliberation_list_active` | List active sessions |
107
73
  | `deliberation_list` | List archived sessions |
108
74
  | `deliberation_reset` | Reset session(s) |
109
75
  | `deliberation_speaker_candidates` | List available speakers |
110
76
  | `deliberation_confirm_speakers` | Confirm the exact user-selected speaker set |
111
- | `deliberation_browser_llm_tabs` | List browser LLM tabs |
112
- | `deliberation_browser_auto_turn` | Auto-send turn to browser LLM |
77
+ | `deliberation_browser_llm_tabs` | List open browser LLM tabs |
78
+ | `deliberation_browser_auto_turn` | Auto-send turn to a browser LLM via CDP |
113
79
  | `deliberation_route_turn` | Route turn to appropriate transport |
114
80
  | `deliberation_run_until_blocked` | Auto-run mixed transports until completion or a manual block |
115
- | `deliberation_request_review` | Request code review |
116
- | `deliberation_cli_auto_turn` | Auto-send turn to CLI speaker |
117
- | `deliberation_ingest_remote_reply` | Canonical semantic ingress for remote replies with explicit source metadata |
81
+ | `deliberation_request_review` | Request code review from deliberation participants |
82
+ | `deliberation_cli_auto_turn` | Auto-send turn to a CLI speaker |
83
+ | `deliberation_ingest_remote_reply` | Ingest a reply from a remote participant with explicit source metadata |
118
84
  | `deliberation_cli_config` | Configure CLI settings |
119
85
 
120
86
  ## Start Flow
121
87
 
122
- Manual participant selection is enforced for both CLI speakers and telepty sessions.
88
+ Speaker selection is enforced before a session can start. Raw candidate tokens cannot initiate a deliberation.
123
89
 
124
90
  ```text
125
91
  1. deliberation_speaker_candidates(...)
@@ -128,72 +94,65 @@ Manual participant selection is enforced for both CLI speakers and telepty sessi
128
94
  4. deliberation_start(selection_token: "<confirmed-token>", speakers: [...])
129
95
  ```
130
96
 
131
- Raw candidate tokens cannot start a deliberation.
132
-
133
- ## Telepty Transport
134
-
135
- Telepty-managed sessions are now routed through the telepty bus instead of raw PTY inject guidance.
136
-
137
- - `deliberation_route_turn` publishes a typed `turn_request` envelope on `ws://localhost:3848/api/bus`
138
- - `deliberation_run_until_blocked` can continue across `cli_respond`, `browser_auto`, and `telepty_bus` speakers until a manual block is reached
139
- - transport delivery is tracked with a 5-second `inject_written` ack window
140
- - semantic completion is tracked with a 60-second self-submit window
141
- - `session_health` bus events are cached for operator visibility
142
- - `deliberation_synthesize` validates and emits typed `deliberation_completed` envelopes for downstream automation
143
- - telepty envelopes now carry top-level `version: 1` and optional `source_host`
144
-
145
- ### Cross-Machine Event Catalog
146
-
147
- Canonical boundary split with telepty:
148
-
149
- - **Guaranteed (daemon-emitted):** `inject_written`, `session_health`, `session_register`, `session.replaced`, `session.idle`, `thread.opened`, `thread.closed`, `handoff.*`, `message_routed`
150
- - **Best-effort (bus relay only):** `turn_request`, `turn_completed`, `deliberation_completed`
151
- - `kind` is the canonical event discriminator
152
- - `target` identifies the telepty session target
153
- - `payload.prompt` is the canonical prompt field for `turn_request`
154
- - `source_host` is optional transport metadata for cross-machine tracing
155
-
156
- ### Remote Reply Ingress
97
+ ## Speaker Ordering Strategies
157
98
 
158
- If a remote participant cannot call local MCP tools directly, do **not** proxy-synthesize a reply. Use the deliberation-owned semantic ingress:
99
+ | Strategy | Description |
100
+ |----------|-------------|
101
+ | `cyclic` | Sequential round-robin (default) |
102
+ | `random` | Random selection each turn |
103
+ | `weighted-random` | Less-spoken speakers prioritized |
159
104
 
160
- ```text
161
- deliberation_ingest_remote_reply(
162
- session_id: "...",
163
- speaker: "...",
164
- turn_id: "...",
165
- content: "...",
166
- source_machine_id: "peer-01",
167
- source_session_id: "remote-gemini-001",
168
- transport_scope: "remote_mcp",
169
- artifact_refs: ["results.jsonl"]
170
- )
171
- ```
105
+ ## Persona Roles
172
106
 
173
- This preserves explicit provenance instead of inferring semantics from raw bus events.
107
+ | Role | Focus |
108
+ |------|-------|
109
+ | `critic` | Risk analysis, weaknesses, counterarguments |
110
+ | `implementer` | Technical feasibility, code design |
111
+ | `mediator` | Consensus building, synthesis |
112
+ | `researcher` | Data, benchmarks, references |
113
+ | `free` | No role constraint (default) |
174
114
 
175
- ### Gemini Recovery
115
+ ## Supported CLI Speakers
176
116
 
177
- Canonical repair path today is still installer-based:
117
+ | CLI | Command | Status |
118
+ |-----|---------|--------|
119
+ | Claude Code | `claude` | Tested |
120
+ | Codex CLI | `codex` | Tested |
121
+ | Gemini CLI | `gemini` | Tested |
122
+ | Aider | `aider` | Supported |
123
+ | Cursor Agent | `cursor` | Supported |
124
+ | OpenCode | `opencode` | Supported |
125
+ | Continue | `continue` | Supported |
178
126
 
179
- ```bash
180
- npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-doctor
181
- npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install
182
- ```
127
+ ## Supported Browser LLMs
183
128
 
184
- Use doctor first; if Gemini MCP registration/path/runtime drift is detected, rerun install and restart Gemini CLI.
129
+ | Provider | Transport | Status |
130
+ |----------|-----------|--------|
131
+ | ChatGPT | CDP / Clipboard | Tested |
132
+ | Claude Web | CDP / Clipboard | Tested |
133
+ | Gemini Web | CDP / Clipboard | Tested |
134
+ | DeepSeek | CDP / Clipboard | Tested |
135
+ | Qwen | CDP / Clipboard | Tested |
136
+ | Poe | CDP / Clipboard | Tested |
137
+ | Copilot | CDP / Clipboard | Supported |
138
+ | Perplexity | CDP / Clipboard | Supported |
139
+ | Mistral | CDP / Clipboard | Supported |
140
+ | Grok | CDP / Clipboard | Supported |
141
+ | HuggingChat | CDP / Clipboard | Supported |
142
+
143
+ ## Examples
144
+
145
+ See [`examples/`](examples/) for working session scripts and synthesis output samples.
185
146
 
186
147
  ## Experiment Retrospectives
187
148
 
188
149
  For autoresearch-style keep/discard reviews, inject a compact experiment bundle after the session starts instead of bloating `topic`.
189
150
 
190
- Recommended rules:
191
- - keep the injected JSON around `1.5KB` to `2KB`
192
- - include only the last `3-5` relevant experiments
193
- - keep `key_changes` to at most `3` scalar before/after pairs
194
- - reference bulky artifacts (`results.tsv`, full `program.md`, JSONL logs) by path only
195
-
196
- Example:
151
+ Guidelines:
152
+ - Keep injected JSON around 1.5–2KB
153
+ - Include only the last 35 relevant experiments
154
+ - Keep `key_changes` to at most 3 scalar before/after pairs
155
+ - Reference bulky artifacts (`results.tsv`, full `program.md`, JSONL logs) by path only
197
156
 
198
157
  ```text
199
158
  deliberation_start(...)
@@ -204,7 +163,7 @@ deliberation_inject_context(
204
163
  )
205
164
  ```
206
165
 
207
- If your synthesis needs an explicit experiment verdict, `structured` can now include `experiment_outcome`:
166
+ Synthesis output with an explicit experiment verdict:
208
167
 
209
168
  ```json
210
169
  {
@@ -214,7 +173,7 @@ If your synthesis needs an explicit experiment verdict, `structured` can now inc
214
173
  "Retry after restoring the failing test baseline"
215
174
  ],
216
175
  "actionable_tasks": [
217
- { "id": 1, "task": "Tighten editable globs", "project": "aigentry-devkit", "priority": "high" }
176
+ { "id": 1, "task": "Tighten editable globs", "priority": "high" }
218
177
  ],
219
178
  "experiment_outcome": {
220
179
  "verdict": "modify",
@@ -225,123 +184,82 @@ If your synthesis needs an explicit experiment verdict, `structured` can now inc
225
184
  }
226
185
  ```
227
186
 
228
- ## Speaker Ordering Strategies
187
+ ## deliberation-gate (Superpowers Integration)
229
188
 
230
- | Strategy | Description |
231
- |----------|-------------|
232
- | `cyclic` | Sequential round-robin (default) |
233
- | `random` | Random selection each turn |
234
- | `weighted-random` | Less-spoken speakers prioritized |
189
+ Installs a skill that inserts multi-AI verification gates at key [superpowers](https://github.com/obra/superpowers) workflow decision points.
235
190
 
236
- ## Persona Roles
191
+ **Scenarios:**
192
+ - **brainstorming** — multi-AI design validation before writing plans
193
+ - **code-review** — multi-AI review via `deliberation_request_review`
194
+ - **debugging** — multi-AI hypothesis verification when stuck
237
195
 
238
- | Role | Focus |
239
- |------|-------|
240
- | `critic` | Risk analysis, weaknesses, counterarguments |
241
- | `implementer` | Technical feasibility, code design |
242
- | `mediator` | Consensus building, synthesis |
243
- | `researcher` | Data, benchmarks, references |
244
- | `free` | No role constraint (default) |
196
+ **Trigger:** Semi-automatic skill recommends deliberation, user approves.
245
197
 
246
- ### Supported CLI Speakers
198
+ **Fallback:** Without MCP installed, falls back to self-criticism-based verification. With MCP installed, runs full multi-AI discussion.
247
199
 
248
- | CLI | Command | Status |
249
- |-----|---------|--------|
250
- | Claude Code | `claude` | ✅ Tested |
251
- | Codex CLI | `codex` | ✅ Tested |
252
- | Gemini CLI | `gemini` | ✅ Tested |
253
- | Aider | `aider` | 🔧 Supported |
254
- | Cursor Agent | `cursor` | 🔧 Supported |
255
- | OpenCode | `opencode` | 🔧 Supported |
256
- | Continue | `continue` | 🔧 Supported |
200
+ **Auto-installed** by `deliberation-install`. Manual install:
257
201
 
258
- ### Supported Browser LLMs
202
+ ```bash
203
+ cp skills/deliberation-gate/SKILL.md ~/.claude/skills/deliberation-gate/SKILL.md
204
+ ```
259
205
 
260
- | Provider | Transport | Status |
261
- |----------|-----------|--------|
262
- | ChatGPT | CDP / Clipboard | ✅ Tested |
263
- | Claude Web | CDP / Clipboard | ✅ Tested |
264
- | Gemini Web | CDP / Clipboard | ✅ Tested |
265
- | DeepSeek | CDP / Clipboard | ✅ Tested |
266
- | Qwen | CDP / Clipboard | ✅ Tested |
267
- | Poe | CDP / Clipboard | ✅ Tested |
268
- | Copilot | CDP / Clipboard | 🔧 Supported |
269
- | Perplexity | CDP / Clipboard | 🔧 Supported |
270
- | Mistral | CDP / Clipboard | 🔧 Supported |
271
- | Grok | CDP / Clipboard | 🔧 Supported |
272
- | HuggingChat | CDP / Clipboard | 🔧 Supported |
273
-
274
- ### deliberation-gate (Superpowers Integration)
275
-
276
- Inserts multi-AI verification gates at key [superpowers](https://github.com/obra/superpowers) workflow decision points.
206
+ **RFC:** [Prerequisites header for tool-dependent skills](https://github.com/obra/superpowers/issues/589)
277
207
 
278
- **Scenarios:**
279
- - **brainstorming** → multi-AI design validation before writing plans
280
- - **code-review** → multi-AI review via `deliberation_request_review`
281
- - **debugging** → multi-AI hypothesis verification when stuck
208
+ ## Telepty Transport (Advanced)
282
209
 
283
- **Trigger:** Semi-automaticskill recommends deliberation, user approves.
210
+ For teams using [telepty](https://github.com/dmsdc-ai/telepty) to manage AI sessions, deliberation supports routing turns through the telepty bus enabling cross-machine and cross-session deliberation flows.
284
211
 
285
- **Fallback:** MCP 미설치 시 self-criticism 기반 자가 검증으로 대체 (Silver 등급). MCP 설치 시 멀티-AI 토론 (Gold 등급).
212
+ - `deliberation_route_turn` publishes typed `turn_request` envelopes on `ws://localhost:3848/api/bus`
213
+ - `deliberation_run_until_blocked` continues across `cli_respond`, `browser_auto`, and `telepty_bus` speakers until a manual block
214
+ - Transport delivery tracked with a 5-second `inject_written` ack window
215
+ - Semantic completion tracked with a 60-second self-submit window
216
+ - `deliberation_synthesize` validates and emits typed `deliberation_completed` envelopes for downstream automation
286
217
 
287
- **Install:** `npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install` 실행 시 자동 설치됩니다.
218
+ ### Cross-Machine Event Catalog
288
219
 
289
- 수동 설치:
290
- ```bash
291
- cp skills/deliberation-gate/SKILL.md ~/.claude/skills/deliberation-gate/SKILL.md
220
+ - **Guaranteed (daemon-emitted):** `inject_written`, `session_health`, `session_register`, `session.replaced`, `session.idle`, `thread.opened`, `thread.closed`, `handoff.*`, `message_routed`
221
+ - **Best-effort (bus relay only):** `turn_request`, `turn_completed`, `deliberation_completed`
222
+ - `kind` is the canonical event discriminator
223
+ - `target` identifies the telepty session target
224
+ - `payload.prompt` is the canonical prompt field for `turn_request`
225
+ - `source_host` is optional transport metadata for cross-machine tracing
226
+
227
+ ## Remote Reply Ingress
228
+
229
+ For distributed setups where a remote participant cannot call local MCP tools directly, use the deliberation-owned semantic ingress instead of proxying raw bus events:
230
+
231
+ ```text
232
+ deliberation_ingest_remote_reply(
233
+ session_id: "...",
234
+ speaker: "...",
235
+ turn_id: "...",
236
+ content: "...",
237
+ source_machine_id: "peer-01",
238
+ source_session_id: "remote-gemini-001",
239
+ transport_scope: "remote_mcp",
240
+ artifact_refs: ["results.jsonl"]
241
+ )
292
242
  ```
293
243
 
294
- **RFC:** [Prerequisites header for tool-dependent skills](https://github.com/obra/superpowers/issues/589)
244
+ This preserves explicit provenance rather than inferring semantics from raw bus events.
295
245
 
296
246
  ## What's New
297
247
 
248
+ ### v0.0.39
249
+ - Entitlement layer — Free/Pro/Team tier gating for deliberation features
250
+ - Gemini CLI model flags and Codex GPT-5.4 routing improvements
251
+
298
252
  ### v0.0.36
299
- - **README refresh**: clarified the mandatory TUI speaker-selection flow and the confirmed-token handoff before `deliberation_start`
300
- - **Telepty candidate docs**: documented active telepty session discovery with lightweight `session_id` + `host/pid` locators instead of heavy persisted process snapshots
301
- - **Cross-project delivery docs**: clarified that active session lookup now resolves across project state directories, which unblocks cross-project `deliberation_respond` flows
302
- - **Operator guidance**: documented telepty bus transport as the automation path and unmanaged/manual sessions as the fallback path
253
+ - Clarified mandatory TUI speaker-selection flow and confirmed-token handoff before `deliberation_start`
254
+ - Documented active telepty session discovery with lightweight `session_id` + `host/pid` locators
255
+ - Cross-project delivery: active session lookup now resolves across project state directories
303
256
 
304
257
  ### v0.0.35
305
258
  - **Manual selection enforcement**: `deliberation_confirm_speakers` binds a fresh candidate snapshot to the exact user-picked speaker set before `deliberation_start`
306
259
  - **Telepty session candidates**: active telepty sessions appear in speaker discovery with lightweight host/pid locators
307
- - **Cross-project sessions**: session lookup/load/save now resolves active deliberations across project state directories
308
260
  - **Telepty bus routing**: telepty speakers route via typed `turn_request` envelopes with 5s transport and 60s semantic timeout tracking
309
261
  - **Structured synthesis envelopes**: `deliberation_synthesize` validates typed payloads before telepty bus publication
310
- - **Codex CLI hardening**: reduced prompt budgets, lower-friction exec profile, and clearer timeout diagnostics
311
- - **Packaging**: install path now preserves default config and includes required runtime modules (`clipboard.js`, `decision-engine.js`, `i18n.js`)
312
-
313
- ### v0.0.24
314
- - **Role inference**: Heading marker weight increased from +5 to +8, added critic(검증/평가/Review) and researcher(데이터/Data) patterns to reduce false positives
315
- - **Logging payload**: TURN log includes `suggested_role`, `role_drift`; CLI_TURN log includes `prior_turns`, `effective_timeout`
316
- - **Vote marker warning**: WARN-level `INVALID_TURN` logged when response lacks [AGREE]/[DISAGREE]/[CONDITIONAL] markers
317
- - **Auto-deploy**: `postversion` hook auto-installs to MCP server path after `npm version`
318
-
319
- ### v0.0.23
320
- - **Vote enforcement**: Turn prompts now require [AGREE]/[DISAGREE]/[CONDITIONAL] markers for reliable consensus measurement
321
- - **Dynamic CLI timeout**: First CLI invocation gets 180s (cold-start buffer), subsequent turns use default 120s
322
- - **Runtime logging**: INFO-level lifecycle logging (SESSION_CREATED, TURN, CLI_TURN, SYNTHESIZED) to `runtime.log`
323
- - **Role inference improvement**: Structural heading markers (e.g., `## 조사 결과` → researcher) with +5 weight prevent false role drift detection
324
-
325
- ### v0.0.22
326
- - **Security**: CDP `--remote-allow-origins` restricted to `127.0.0.1:9222` (was `*`)
327
- - **Security**: Observer CORS restricted to localhost allowlist, server bound to `127.0.0.1`
328
- - **Performance**: Async sleep for Chrome CDP initialization (was blocking event loop)
329
- - **Bug fix**: Fabrication guard uses `detectCallerSpeaker()` instead of hardcoded `"claude"`
330
- - **Bug fix**: CLI reviewer uses per-CLI invocation flags via `CLI_INVOCATION_HINTS`
331
- - **Bug fix**: Windows monitor state directory path corrected
332
- - **Memory**: SSE client Map cleanup on disconnect prevents memory leak
333
- - **Code quality**: Removed unreachable dead code in browser-control-port
334
-
335
- ## aigentry Ecosystem
336
-
337
- aigentry-deliberation is one component of the unified aigentry platform. All packages work together to make AI decisions transparent and auditable.
338
-
339
- | Package | Description |
340
- |---------|-------------|
341
- | [`@dmsdc-ai/aigentry-brain`](https://github.com/dmsdc-ai/aigentry-brain) | Cross-LLM memory OS |
342
- | [`@dmsdc-ai/aigentry-devkit`](https://github.com/dmsdc-ai/aigentry-devkit) | Developer tools and hooks |
343
- | [`aigentry-registry`](https://github.com/dmsdc-ai/aigentry-registry) | AI agent evaluation (Python) |
344
- | [`aigentry-ssot`](https://github.com/dmsdc-ai/aigentry-ssot) | MCP contract schemas |
262
+ - **Codex CLI hardening**: reduced prompt budgets, lower-friction exec profile, clearer timeout diagnostics
345
263
 
346
264
  ## License
347
265
 
@@ -0,0 +1,25 @@
1
+ # Examples
2
+
3
+ Practical examples for using the aigentry-deliberation MCP server.
4
+
5
+ ## Files
6
+
7
+ | File | Description |
8
+ |------|-------------|
9
+ | `basic-deliberation.md` | Start a session, collect turns, and synthesize a decision |
10
+ | `code-review.md` | Multi-AI code review using `deliberation_request_review` |
11
+ | `structured-synthesis.md` | Structured JSON output (ExecutionContractV2) for automation |
12
+ | `browser-automation.md` | Include ChatGPT / Gemini via CDP browser automation |
13
+
14
+ ## Prerequisites
15
+
16
+ - aigentry-deliberation MCP server registered (`node install.js`)
17
+ - At least one speaker available (CLI session, browser tab, or telepty session)
18
+
19
+ ## Quick Start
20
+
21
+ 1. Call `deliberation_speaker_candidates` to discover available speakers.
22
+ 2. Confirm speakers with `deliberation_confirm_speakers`.
23
+ 3. Start the session with `deliberation_start`.
24
+ 4. Route turns with `deliberation_route_turn` or `deliberation_run_until_blocked`.
25
+ 5. Call `deliberation_synthesize` to get a structured decision.
@@ -0,0 +1,99 @@
1
+ # Basic Deliberation
2
+
3
+ A complete walkthrough of starting a deliberation session from scratch.
4
+
5
+ **Topic:** Should we use REST or GraphQL for our new API?
6
+
7
+ ---
8
+
9
+ ## Step 1 — Discover Available Speakers
10
+
11
+ ```json
12
+ // Tool: deliberation_speaker_candidates
13
+ {}
14
+ ```
15
+
16
+ **Response (example):**
17
+ ```json
18
+ {
19
+ "candidates": [
20
+ { "id": "claude-opus", "name": "Claude Opus", "transport": "cli_respond" },
21
+ { "id": "gemini-pro", "name": "Gemini Pro", "transport": "cli_respond" }
22
+ ]
23
+ }
24
+ ```
25
+
26
+ ---
27
+
28
+ ## Step 2 — Confirm Speakers
29
+
30
+ ```json
31
+ // Tool: deliberation_confirm_speakers
32
+ {
33
+ "speaker_ids": ["claude-opus", "gemini-pro"]
34
+ }
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Step 3 — Start the Session
40
+
41
+ ```json
42
+ // Tool: deliberation_start
43
+ {
44
+ "topic": "Should we use REST or GraphQL for our new API?",
45
+ "context": "We are building a mobile app with complex nested data requirements and 3 client types.",
46
+ "max_turns": 4
47
+ }
48
+ ```
49
+
50
+ **Response:**
51
+ ```json
52
+ { "deliberation_id": "delib-a1b2c3", "status": "active", "turn": 0 }
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Step 4 — Collect Turns (2 speakers)
58
+
59
+ ```json
60
+ // Tool: deliberation_respond (speaker: claude-opus)
61
+ {
62
+ "deliberation_id": "delib-a1b2c3",
63
+ "speaker_id": "claude-opus",
64
+ "content": "GraphQL is the stronger choice here. With 3 client types each needing different fields, GraphQL eliminates over-fetching and lets clients declare exactly what they need. The nested data model maps naturally to GraphQL resolvers."
65
+ }
66
+ ```
67
+
68
+ ```json
69
+ // Tool: deliberation_respond (speaker: gemini-pro)
70
+ {
71
+ "deliberation_id": "delib-a1b2c3",
72
+ "speaker_id": "gemini-pro",
73
+ "content": "REST is simpler to cache and easier for teams already familiar with HTTP conventions. For a mobile app, HTTP/2 with REST and sparse fieldsets can achieve similar efficiency. Consider GraphQL only if query flexibility is genuinely required at launch."
74
+ }
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Step 5 — Synthesize the Decision
80
+
81
+ ```json
82
+ // Tool: deliberation_synthesize
83
+ {
84
+ "deliberation_id": "delib-a1b2c3"
85
+ }
86
+ ```
87
+
88
+ **Response:**
89
+ ```json
90
+ {
91
+ "verdict": "GraphQL recommended with phased rollout",
92
+ "confidence": 0.82,
93
+ "actionable_tasks": [
94
+ { "id": 1, "task": "Set up Apollo Server with schema-first design", "priority": "high" },
95
+ { "id": 2, "task": "Define GraphQL types for core entities", "priority": "high" },
96
+ { "id": 3, "task": "Add REST compatibility layer for legacy clients", "priority": "medium" }
97
+ ]
98
+ }
99
+ ```