@maxiaochao/pi-toolkit 0.7.2 → 0.8.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 2026-09-24 - v0.8.1
2
+
3
+ - lowercase the herdr skill name in its description and H1 (a deliberate local edit over the upstream v0.9.1 copy, now recorded in NOTICE, README and AGENTS.md); drop the stale `herdr --skill` pointer from the agent-team skill
4
+
5
+ ## 2026-09-24 - v0.8.0
6
+
7
+ - add the agent-team skill: cross-vendor adversarial review in herdr panes, with the model roster in skills/agent-team/models.json
8
+
1
9
  ## 2026-09-24 - v0.7.2
2
10
 
3
11
  - bundle the calldiff skill (copied verbatim from tanishqkancharla/calldiff, MIT, pinned to a main commit since upstream has no release tags) for call-stack diffs across git commits; the previous v0.7.1 tarball was briefly unavailable on the registry right after publish and is now served normally
package/README.md CHANGED
@@ -85,7 +85,7 @@ The bundled `show-me` skill (derived from [humanlayer/skills](https://github.com
85
85
 
86
86
  The bundled `pdlog` skill decompresses and reads Pudu `.pdlog` proprietary log files, which are binary gibberish when opened directly. It ships a self-contained `ppmd` decompressor (`skills/pdlog/tools/ppmd`, Linux x86-64) and triggers automatically on `.pdlog` files, Pudu logs, ppmd decompression, or logs that open as binary gibberish.
87
87
 
88
- The bundled `herdr` skill (copied verbatim from [herdrdev/herdr](https://github.com/herdrdev/herdr) at tag `v0.9.1`, Apache-2.0) drives Herdr, a terminal multiplexer for coding agents: inspecting workspaces, tabs, and panes, starting and prompting other agents, running commands in background panes without stealing focus, reading pane output, and waiting on agent lifecycle states. It activates only when you explicitly mention Herdr, and only when the agent itself runs inside a Herdr pane (`HERDR_ENV=1`); outside a pane it refuses to control the session and stops.
88
+ The bundled `herdr` skill (from [herdrdev/herdr](https://github.com/herdrdev/herdr) at tag `v0.9.1` with the skill name lowercased, Apache-2.0) drives Herdr, a terminal multiplexer for coding agents: inspecting workspaces, tabs, and panes, starting and prompting other agents, running commands in background panes without stealing focus, reading pane output, and waiting on agent lifecycle states. It activates only when you explicitly mention Herdr, and only when the agent itself runs inside a Herdr pane (`HERDR_ENV=1`); outside a pane it refuses to control the session and stops.
89
89
 
90
90
  The bundled `tapd` skill documents the third-party `tapd` CLI ([studyzy/tapd-ai-cli](https://github.com/studyzy/tapd-ai-cli)) for TAPD: requirements, defects, tasks, iterations, wikis, comments, attachments, timesheets, and workflow status maps, including the `--filter` advanced query syntax. It is the CLI's own command reference, so refresh the file with `tapd skill init` when the CLI changes.
91
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxiaochao/pi-toolkit",
3
- "version": "0.7.2",
3
+ "version": "0.8.1",
4
4
  "description": "Personal pi coding agent toolkit: /todos, /btw, /cache_export extensions, browser automation, and bundled theme/skills.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: agent-team
3
+ description: 以对抗评审的方式让不同厂商的模型交叉验证同一个结论,当前会话担任管理者。Use when the user asks for 对抗评审 / 交叉验证, or wants a long-running investigation red-teamed by independent agents.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ 当前会话是**管理者**,不是转述人:自己也承担一份实证工作,并对每一轮的裁决负责。队员是长驻的 herdr pane,不是一次性 subagent —— 它们要能被反复追问、被点名互相反驳。
8
+
9
+ ## 何时值得开
10
+
11
+ 只在用户要求组队时开,它会在用户的终端里真的分屏。值得开的条件:结论会驱动一个代价高的动作(改内核、下线设备、向客户定责),或者证据链已经长到单模型会自我确认。查一个事实、读一份文件用不上。
12
+
13
+ ## 1. 建队
14
+
15
+ **必须跨厂商。** 同厂同代模型共享盲区,三个一起点头等于一个点头。
16
+
17
+ 名单在同目录的 `models.json`,先读它,照里面的 `model` 字段写命令;用户指定了别的模型就用用户的。每个成员有 `name` / `model` / `role` / `charter`,`defaults` 里是共用的 `kind` 与 `thinking`。
18
+
19
+ ```bash
20
+ herdr pane split --current --direction right --cwd "$PWD" --no-focus
21
+ herdr agent start <name> --kind pi --pane <pane> -- --model <model> --thinking <thinking>
22
+ echo <pane> > /tmp/pane_<name>
23
+ ```
24
+
25
+ pane id 落盘,后面所有广播脚本都从这里取。开完把该成员的 `charter` 作为第一条 prompt 发过去,立常设职责。`herdr agent list` 确认都是 idle 再开工。
26
+
27
+ ## 2. 分角色:互不重叠的攻击面
28
+
29
+ 每个 pane 领一个**方法论上互斥**的职责:`auditor` 审源码、`replicator` 复算数据、`adversary` 攻方法学。具体措辞是 `models.json` 里各自的 `charter`,改职责改那里。
30
+
31
+ ## 3. 交底与通信
32
+
33
+ herdr 没有邮箱,只有 `agent prompt`(往别人输入框塞文字)和 `agent read`(把别人屏幕刮下来)。拓扑是星型,管理者是唯一的路由:跨 pane 的话全部由管理者转述,把 A 的原话引进 B 的下一条 prompt(「opus 说你这个计数可能一对多,用数据回应」)。
34
+
35
+ ```
36
+ 管理者(本会话)
37
+ 唯一写 FINDINGS 的人
38
+ │ │ │
39
+ 下行:消息 │ │ │ herdr agent prompt
40
+ (短指针) ▼ ▼ ▼
41
+ ┌────┐ ┌──────┐ ┌──────┐
42
+ │ sol│ │ grok │ │ opus │ 彼此不相连
43
+ └──┬──┘ └──┬───┘ └──┬───┘
44
+ │ │ │
45
+ 上行:文件 └───────┴───────┘
46
+ ▼
47
+ /tmp/<轮次>-<name>.md ← 管理者从磁盘读
48
+ ```
49
+
50
+ 技术上任何 pane 都能 prompt 任何 pane,让它们直连有四个代价:管理者看不见这次交换,ledger 就缺一环;对正在 working 的 agent 发 prompt 会被拒(`agent_blocked`)或插进它当前那一轮;没有投递回执;而且两两串供会让它们彼此收敛,恰好毁掉跨厂商独立性这唯一的价值来源。
51
+
52
+ 下行只发短指针,正文留在文件里:长文本经终端会被折断或触发意外快捷键。上行走文件:队员把结论写 `/tmp/<轮次>-<name>.md`,终端只回一行路径,管理者从磁盘读。`agent read` 是终端截图,会截断、会按宽度折行、会混进 TUI 边框,拿它收长输出必丢内容;只用它确认回执和状态。
53
+
54
+ 基准文档 `FINDINGS-stageN.md` 是**唯一事实源**,只有管理者写,新版本整体取代旧版本而不是打补丁。必含四块:机制链、编号发现、已推翻清单、未闭合点。
55
+
56
+ ```bash
57
+ MSG='【N17】读 /tmp/FINDINGS-stage4.md 全文。本轮你的攻击点:……。结论写 /tmp/N17-<你的名字>.md,终端只回一行路径。'
58
+ for a in sol grok opus; do herdr agent prompt "$a" "$MSG"; done
59
+ for a in sol grok opus; do herdr agent wait "$a" --until idle --timeout 900000; done
60
+ ```
61
+
62
+ ## 4. 回合
63
+
64
+ 一轮 = 广播 → 各自独立干 → 管理者从磁盘收文件 → 裁决 → 更新文档 → 再广播。
65
+
66
+ 每轮广播里给每个 pane 一个**具体到能证伪的攻击点**(「查 ART 的 adbconnection.cc,确认这条错误日志与被销毁的 fd 是不是 1:1」),而不是「你看看有没有问题」。
67
+
68
+ ## 5. 纪律
69
+
70
+ - **ledger**:发现按 `N1, N2…` 只增不改;每一条被推翻的结论进 `X1, X2…` 清单,写明是谁推翻的。这份 X 清单是最终交付里最有价值的部分。
71
+ - **retraction 要公开**:管理者被驳倒时,在下一次广播开头显式写「我错了,更正为……」。管理者一旦开始维护自己的结论,pane 就会停止攻击,整个队伍塌成回音室。
72
+ - **replication**:任何承载结论的数字至少两方独立算。对不上先查口径再查代码。
73
+ - **control**:任何「异常」指标必须配阴性样本才进文档。拿不出对照的指标只是一个数。
74
+ - **grading**:每条结论标注 `源码读取 / 实测 / 推断` 和置信度。推断不能和实测并列陈述。
75
+ - **裁决**:两个 pane 冲突时判出谁对,并说明依据。把冲突的结论平均掉会同时丢掉两边的信息。
76
+
77
+ ## 6. 收尾
78
+
79
+ 收敛判据:完整一轮广播后没有任何 pane 能产出新的 X。
80
+
81
+ 最终文档必须单列**未闭合点**,以及**每一个需要人或设备批准才能执行的动作**。
82
+
83
+ 用完 `herdr pane close <pane_id>` 关掉,pane 不会自己退出。
84
+
85
+ ## 故障
86
+
87
+ - pane 额度耗尽:降级为剩余 pane 继续,并在文档里记下缺失的是哪个视角。
88
+ - agent 卡在 blocked:`herdr agent read <name> --source visible` 看它在等什么,多半是在等一个确认。
89
+ - 广播后无人响应:`herdr agent list` 核对 pane 是否还活着,pane id 会随布局变化。
@@ -0,0 +1,26 @@
1
+ {
2
+ "defaults": {
3
+ "kind": "pi",
4
+ "thinking": "high"
5
+ },
6
+ "members": [
7
+ {
8
+ "name": "sol",
9
+ "model": "pudu/gpt-5.6-sol",
10
+ "role": "auditor",
11
+ "charter": "只接受能逐行引用的源码、规范、commit,输出必须带 文件:行号。负责把「机制上可能」变成「代码里确实如此」;查不到就说查不到,不要用常识补。"
12
+ },
13
+ {
14
+ "name": "grok",
15
+ "model": "pudu/grok-4.6",
16
+ "role": "replicator",
17
+ "charter": "拿原始数据和口径,不看管理者的脚本,独立重算同一个指标,只报自己的数和差异。数对不上就是一次发现,先查口径再查代码。"
18
+ },
19
+ {
20
+ "name": "opus",
21
+ "model": "pudu/claude-opus-5",
22
+ "role": "adversary",
23
+ "charter": "攻前提和方法学,不攻结论。指出指标对样本组成的敏感性、计数的一对多、缺失的阴性对照。附议没有价值,找不到问题就说明理由。"
24
+ }
25
+ ]
26
+ }
@@ -1,12 +1,13 @@
1
1
  Herdr Skill
2
2
 
3
- This directory is copied verbatim from the Herdr repository:
3
+ This directory is based on the Herdr repository:
4
4
  https://github.com/herdrdev/herdr (skills/herdr/SKILL.md, tag v0.9.1)
5
5
 
6
6
  The upstream repository is licensed under Apache License 2.0. A copy of that
7
7
  license is included in LICENSE.
8
8
 
9
- pi-toolkit ships the file unchanged, so the installed skill always matches the
10
- stable Herdr release it was taken from. Upstream updates SKILL.md only on stable
11
- releases; to refresh it, copy skills/herdr/SKILL.md and LICENSE from a newer
12
- Herdr tag and update the tag above.
9
+ pi-toolkit ships the file with one deliberate local edit: the skill name is
10
+ lowercased ("Herdr" -> "herdr") in the frontmatter description and the H1.
11
+ Everything else matches tag v0.9.1 byte for byte. Upstream updates SKILL.md only
12
+ on stable releases; to refresh it, copy skills/herdr/SKILL.md and LICENSE from a
13
+ newer Herdr tag, update the tag above, and re-apply the lowercase edit.
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: herdr
3
- description: "Control Herdr, a terminal multiplexer for coding agents. Use only when the user explicitly mentions Herdr or asks to use Herdr to inspect or control panes, tabs, workspaces, commands, or another agent. Do not use merely because a task could benefit from a background terminal, delegation, or parallel work. Requires HERDR_ENV=1."
3
+ description: "Control herdr, a terminal multiplexer for coding agents. Use only when the user explicitly mentions herdr or asks to use Herdr to inspect or control panes, tabs, workspaces, commands, or another agent. Do not use merely because a task could benefit from a background terminal, delegation, or parallel work. Requires HERDR_ENV=1."
4
4
  ---
5
5
 
6
- # Herdr
6
+ # herdr
7
7
 
8
8
  Herdr organizes terminals into workspaces, tabs, and panes, recognizes coding agents running inside panes, and exposes the current session through the `herdr` CLI.
9
9