pi-brainstorm 0.3.0 → 0.4.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 +4 -4
- package/README.zh-CN.md +5 -5
- package/config/default.yaml +19 -1
- package/extensions/brainstorm.ts +67 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The plugin stores each participant's full contribution in a local meeting blackb
|
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- Multi-model brainstorming with configurable participants (default: GPT, DeepSeek, MiniMax).
|
|
13
|
+
- Multi-model brainstorming with configurable participants (default: GPT, DeepSeek, MiniMax, GLM).
|
|
14
14
|
- Debate / battle mode where agents prosecute, stress-test, and challenge positions.
|
|
15
15
|
- Configuration-driven: add, remove, or customize participants via YAML.
|
|
16
16
|
- Round-by-round summaries focused on consensus, disagreement, and next questions.
|
|
@@ -30,7 +30,7 @@ pi install npm:pi-brainstorm
|
|
|
30
30
|
From GitHub:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
pi install git:github.com/Jarcis-cy/pi-brainstorm@v0.
|
|
33
|
+
pi install git:github.com/Jarcis-cy/pi-brainstorm@v0.4.0
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
For local development:
|
|
@@ -88,7 +88,7 @@ Agent files generated by pi-brainstorm contain `<!-- managed-by: pi-brainstorm -
|
|
|
88
88
|
/debate <topic>
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
`/brainstorm` starts
|
|
91
|
+
`/brainstorm` starts an interactive three-round multi-model brainstorming session. After Round 1 and Round 2, the facilitator should stop, summarize the round, and wait for your feedback or permission before continuing.
|
|
92
92
|
|
|
93
93
|
`/debate` starts an open-ended multi-agent battle that should continue until convergence or user intervention.
|
|
94
94
|
|
|
@@ -98,7 +98,7 @@ Agent files generated by pi-brainstorm contain `<!-- managed-by: pi-brainstorm -
|
|
|
98
98
|
participant model -> meeting_append_entry -> .pi-meetings/... files
|
|
99
99
|
participant model -> short WROTE_ENTRY summary -> facilitator context
|
|
100
100
|
file watcher -> compact visible card -> main chat
|
|
101
|
-
facilitator -> consensus / disagreement / final synthesis
|
|
101
|
+
facilitator -> round checkpoint / consensus / disagreement / final synthesis
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
The blackboard files are the source of truth for the session. The facilitator can read the index or specific entries when producing summaries.
|
package/README.zh-CN.md
CHANGED
|
@@ -10,7 +10,7 @@ English README: [README.md](./README.md).
|
|
|
10
10
|
|
|
11
11
|
## 功能
|
|
12
12
|
|
|
13
|
-
- 多模型头脑风暴:参与者可配置(默认:GPT、DeepSeek、MiniMax)。
|
|
13
|
+
- 多模型头脑风暴:参与者可配置(默认:GPT、DeepSeek、MiniMax、GLM)。
|
|
14
14
|
- 辩论 / battle 模式:Agent 会攻击、审视、反驳彼此的观点。
|
|
15
15
|
- 配置驱动:通过 YAML 添加、删除或自定义参与者。
|
|
16
16
|
- 每轮输出聚焦共识、分歧、关键问题和下一步方向。
|
|
@@ -30,7 +30,7 @@ pi install npm:pi-brainstorm
|
|
|
30
30
|
通过 GitHub 安装:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
pi install git:github.com/Jarcis-cy/pi-brainstorm@v0.
|
|
33
|
+
pi install git:github.com/Jarcis-cy/pi-brainstorm@v0.4.0
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
本地开发安装:
|
|
@@ -83,7 +83,7 @@ participants:
|
|
|
83
83
|
|
|
84
84
|
## 前置条件
|
|
85
85
|
|
|
86
|
-
该扩展依赖 pi 中已有的 `subagent` 工具。命令处理器会先创建本地会议记录,然后让主 Agent 调用配置中定义的参与者(默认:`gpt-brainstormer`、`deepseek-brainstormer`、`minimax-brainstormer`)。
|
|
86
|
+
该扩展依赖 pi 中已有的 `subagent` 工具。命令处理器会先创建本地会议记录,然后让主 Agent 调用配置中定义的参与者(默认:`gpt-brainstormer`、`deepseek-brainstormer`、`minimax-brainstormer`、`glm-brainstormer`)。
|
|
87
87
|
|
|
88
88
|
第一次使用时,如果这些用户级 agent 不存在,扩展会询问是否写入内置默认定义。已有同名且不含托管标记的文件不会被覆盖。
|
|
89
89
|
|
|
@@ -94,7 +94,7 @@ participants:
|
|
|
94
94
|
/debate <主题>
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
`/brainstorm`
|
|
97
|
+
`/brainstorm` 启动交互式三轮多模型头脑风暴。Round 1 和 Round 2 结束后,主持人应停止、总结本轮,并等待你的反馈或继续许可,再进入下一轮。
|
|
98
98
|
|
|
99
99
|
`/debate` 启动开放式多 Agent battle,直到收敛或用户介入为止。
|
|
100
100
|
|
|
@@ -104,7 +104,7 @@ participants:
|
|
|
104
104
|
参与者模型 -> meeting_append_entry -> .pi-meetings/... 文件
|
|
105
105
|
参与者模型 -> 短 WROTE_ENTRY 摘要 -> 主持人上下文
|
|
106
106
|
文件 watcher -> 短卡片 -> 主会话可见区域
|
|
107
|
-
主持人 -> 共识 / 分歧 / 最终综合
|
|
107
|
+
主持人 -> 每轮 checkpoint / 共识 / 分歧 / 最终综合
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
黑板文件是会话事实源。主持人可以按需读取索引或具体条目,然后生成结构化总结。
|
package/config/default.yaml
CHANGED
|
@@ -26,7 +26,7 @@ participants:
|
|
|
26
26
|
- displayName: DeepSeek
|
|
27
27
|
agentName: deepseek-brainstormer
|
|
28
28
|
description: DeepSeek brainstorming consultant. Meticulous systems thinker for multi-model discussion sessions.
|
|
29
|
-
model:
|
|
29
|
+
model: opencode-go/deepseek-v4-pro:xhigh
|
|
30
30
|
roleTitle: Meticulous Systems Thinker
|
|
31
31
|
rolePrompt: |
|
|
32
32
|
你是多模型头脑风暴中的系统思考者。分析结构、依赖、扩展上限和失败模式。用中文回答。
|
|
@@ -56,3 +56,21 @@ participants:
|
|
|
56
56
|
prompt: |
|
|
57
57
|
DEBATE MODE. You are THE CONTRARIAN. Take the opposite position from the dominant view. Expose groupthink. Propose radical alternatives. Challenge the fundamental premise if needed. Use Chinese.
|
|
58
58
|
brainstormRole: Creative lateral thinker
|
|
59
|
+
|
|
60
|
+
- displayName: GLM
|
|
61
|
+
agentName: glm-brainstormer
|
|
62
|
+
description: GLM-5.2 brainstorming consultant. Pragmatic implementer who grounds ideas in feasibility, cost, and real-world constraints.
|
|
63
|
+
model: opencode-go/glm-5.2:xhigh
|
|
64
|
+
roleTitle: Pragmatic Implementer
|
|
65
|
+
rolePrompt: |
|
|
66
|
+
你是多模型头脑风暴中的务实执行者。当别人谈愿景、讲架构、玩创意时,你负责问:「这到底能不能做出来?」「需要多少资源?」「有什么更简单的方案?」你的价值在于把讨论拉回现实。用中文回答。
|
|
67
|
+
whatYouDo:
|
|
68
|
+
- 从可行性、成本、时间和资源角度审视每个提案
|
|
69
|
+
- 指出不切实际的想法——诚实、直接
|
|
70
|
+
- 提出更简单的替代方案,避免过度设计
|
|
71
|
+
- 关注执行路径和最小可行版本
|
|
72
|
+
debatePersona:
|
|
73
|
+
label: THE PRAGMATIST
|
|
74
|
+
prompt: |
|
|
75
|
+
DEBATE MODE. You are THE PRAGMATIST. Challenge every proposal on feasibility, cost, and real-world constraints. Expose impractical ideas. Push for simpler, cheaper, faster solutions. Use Chinese.
|
|
76
|
+
brainstormRole: Pragmatic implementer
|
package/extensions/brainstorm.ts
CHANGED
|
@@ -525,6 +525,7 @@ function buildBrainstormPrompt(
|
|
|
525
525
|
' - phase: "Round 1", "Round 2", or "Round 3"',
|
|
526
526
|
" - summary: a ONE-SENTENCE summary of your contribution",
|
|
527
527
|
" - content: your FULL analysis in Chinese (中文)",
|
|
528
|
+
" - content must contain only the participant's analysis. Do not include wrapper tags, hidden thinking markers, tool-call text, or WROTE_ENTRY text inside content.",
|
|
528
529
|
"2. After writing, your FINAL ANSWER must be ONLY:",
|
|
529
530
|
" `WROTE_ENTRY: <your one-sentence summary>`",
|
|
530
531
|
"3. DO NOT paste your full analysis into the chat. The main agent and user will read it from the blackboard.",
|
|
@@ -538,10 +539,42 @@ function buildBrainstormPrompt(
|
|
|
538
539
|
"",
|
|
539
540
|
"## Protocol",
|
|
540
541
|
"Round 1: Each consultant gives initial analysis on the topic. Run all in parallel.",
|
|
541
|
-
"Round
|
|
542
|
-
"Round
|
|
542
|
+
"After Round 1: read the index, present summaries plus a structural overview, then STOP. Ask the user for feedback or permission to continue. Do NOT start Round 2 in the same assistant turn.",
|
|
543
|
+
"Round 2: only after the user replies, feed Round 1 plus the user's VERBATIM feedback back to each consultant. Ask each to challenge the others and propose improvements.",
|
|
544
|
+
"After Round 2: read the index, present summaries plus an updated structural overview, then STOP. Ask the user for feedback or permission to continue. Do NOT start Round 3 in the same assistant turn.",
|
|
545
|
+
"Round 3: only after the user replies, feed all prior rounds plus the user's VERBATIM feedback back to each consultant. Each gives FINAL recommendation, synthesizing the best ideas.",
|
|
543
546
|
"",
|
|
544
|
-
"After Round 3, present the complete structural overview and
|
|
547
|
+
"After Round 3, present the complete structural overview and ask whether to write the final conclusion. Only write conclusion.md after the user confirms.",
|
|
548
|
+
"",
|
|
549
|
+
"## FAILURE HANDLING",
|
|
550
|
+
"Subagent calls can fail (timeout, API error, model unavailable, crash). You MUST detect and handle failures:",
|
|
551
|
+
"",
|
|
552
|
+
"### Detecting failure",
|
|
553
|
+
"A subagent call has FAILED if:",
|
|
554
|
+
"- The tool result contains error text (\"error\", \"failed\", \"timeout\", \"unavailable\", \"connection\", etc.)",
|
|
555
|
+
"- The subagent returns no output or empty output",
|
|
556
|
+
"- The subagent output does NOT contain \"WROTE_ENTRY:\" (the expected success marker)",
|
|
557
|
+
"- The subagent produced no meeting_append_entry call (check with meeting_read_index after the parallel batch)",
|
|
558
|
+
"",
|
|
559
|
+
"### Retry strategy",
|
|
560
|
+
"When you detect a failure:",
|
|
561
|
+
"1. Wait 5-10 seconds before retrying (API rate limits may have triggered the failure)",
|
|
562
|
+
"2. Retry the SAME consultant with the SAME task up to 2 more times (3 attempts total)",
|
|
563
|
+
"3. On retry, add to the task: \"PREVIOUS ATTEMPT FAILED. This is retry N of 2. Focus only on completing your contribution and writing WROTE_ENTRY.\"",
|
|
564
|
+
"4. If the consultant succeeds on retry, proceed normally",
|
|
565
|
+
"5. If ALL retries are exhausted, treat this consultant as UNAVAILABLE for this round",
|
|
566
|
+
"",
|
|
567
|
+
"### When a consultant is UNAVAILABLE",
|
|
568
|
+
"- Do NOT wait indefinitely or freeze the session",
|
|
569
|
+
"- Proceed with the remaining consultants who succeeded",
|
|
570
|
+
"- In your structural overview, clearly mark the failed participant as: \"[displayName] ([agentName]): 本轮未响应 / did not respond\"",
|
|
571
|
+
"- Continue to the next round normally — do NOT skip the consultant in future rounds (they may recover)",
|
|
572
|
+
"- If the same consultant fails in 2 consecutive rounds, warn the user with the real display name, e.g.: \"DeepSeek 连续两轮失败,建议检查该模型是否可用\"",
|
|
573
|
+
"",
|
|
574
|
+
"### NEVER do this",
|
|
575
|
+
"- Do NOT fabricate or simulate a consultant's response",
|
|
576
|
+
"- Do NOT wait more than 3 minutes total per consultant (including retries)",
|
|
577
|
+
"- Do NOT abort the entire session because one consultant failed",
|
|
545
578
|
"",
|
|
546
579
|
"## IMPORTANT",
|
|
547
580
|
"- All responses in Chinese (中文).",
|
|
@@ -631,6 +664,37 @@ function buildDebatePrompt(
|
|
|
631
664
|
"- If NOT converged: run another cycle. Keep going.",
|
|
632
665
|
"- If converged: present synthesis to me.",
|
|
633
666
|
"",
|
|
667
|
+
"## FAILURE HANDLING",
|
|
668
|
+
"Subagent calls can fail (timeout, API error, model unavailable, crash). You MUST detect and handle failures:",
|
|
669
|
+
"",
|
|
670
|
+
"### Detecting failure",
|
|
671
|
+
"A subagent call has FAILED if:",
|
|
672
|
+
"- The tool result contains error text (\"error\", \"failed\", \"timeout\", \"unavailable\", \"connection\", etc.)",
|
|
673
|
+
"- The subagent returns no output or empty output",
|
|
674
|
+
"- The subagent output does NOT contain \"WROTE_ENTRY:\" (the expected success marker)",
|
|
675
|
+
"- The subagent produced no meeting_append_entry call (check with meeting_read_index after the chain step)",
|
|
676
|
+
"",
|
|
677
|
+
"### Retry strategy",
|
|
678
|
+
"When you detect a failure in a chain step:",
|
|
679
|
+
"1. Wait 5-10 seconds before retrying (API rate limits may have triggered the failure)",
|
|
680
|
+
"2. Retry the SAME debater with the SAME task up to 2 more times (3 attempts total)",
|
|
681
|
+
"3. On retry, add to the task: \"PREVIOUS ATTEMPT FAILED. This is retry N of 2. Focus only on completing your argument and writing WROTE_ENTRY.\"",
|
|
682
|
+
"4. If the debater succeeds on retry, proceed to the next debater in the chain",
|
|
683
|
+
"5. If ALL retries are exhausted, SKIP this debater for this cycle and move to the next debater",
|
|
684
|
+
"",
|
|
685
|
+
"### When a debater is UNAVAILABLE",
|
|
686
|
+
"- Do NOT wait indefinitely or freeze the session",
|
|
687
|
+
"- Skip to the next debater in the cycle",
|
|
688
|
+
"- In your structural overview, clearly mark the failed participant as: \"[displayName] ([agentName]): 本轮未响应 / did not respond\"",
|
|
689
|
+
"- Continue the debate with remaining debaters — do NOT abort the whole debate",
|
|
690
|
+
"- If the same debater fails in 2 consecutive cycles, warn the user with the real display name, e.g.: \"DeepSeek 连续两轮失败,建议检查该模型是否可用\"",
|
|
691
|
+
"",
|
|
692
|
+
"### NEVER do this",
|
|
693
|
+
"- Do NOT fabricate or simulate a debater's argument",
|
|
694
|
+
"- Do NOT wait more than 3 minutes total per debater (including retries)",
|
|
695
|
+
"- Do NOT abort the entire debate because one debater failed",
|
|
696
|
+
"- Do NOT get stuck in an infinite retry loop — 3 attempts max per debater per cycle",
|
|
697
|
+
"",
|
|
634
698
|
"## Rules",
|
|
635
699
|
"- NEVER stop at a predetermined count. Only convergence or user intervention ends this debate.",
|
|
636
700
|
"- All responses in Chinese (中文).",
|