Files
tanweai__pua/plugin.json
T
xsser 1be1c478b6 release: v3.2.0 — teardown protocol (agent lifecycle accounting)
PUA v3.1 之前覆盖 agent 生命周期的前 4 阶段(Define → Spawn → Monitor →
Accept),缺后 3 阶段(Release → Cleanup → Orphan handling),导致验收通过的
agent 堆在上下文、worktree 变孤儿、tmux pane 常驻、后台 agent 永久吃 token。
v3.2 补齐会计层:SubagentStop hook + 3 个新 slash 命令 + teardown 协议文档。

Why (Netflix Keeper Test): 职业球队里打完比赛的球员必须下场,继续站场上只会
拖垮全队节奏。agent 也一样。

What:
- NEW hooks/subagent-teardown.sh — SubagentStop 会计,写 teardown.jsonl +
  从 active-agents.json 移除(单行 compact jsonl)
- NEW commands/team-status.md — 列在场阵容(活跃 agent / PID / TTL / age)
- NEW commands/reap-orphans.md — 扫 stale agent(mtime > 30min)批量回收
- NEW commands/teardown-all.md — 级联释放 P10 → P9 → P8 → P7 全员下场
- NEW skills/pua/references/teardown-protocol.md — 生命周期 7 阶段协议 +
  6 条 Release 规则 + Cleanup checklist + Orphan 三层防御

Bugfix:
- hooks/pua-loop-hook.sh: 新增 Gate 0(SubagentStop isolation),state file
  路径改为绝对路径 $HOME/.claude/pua/loop-active.md(SESSION_ID 在 setup
  时不可用,固定名)+ legacy fallback
- scripts/setup-pua-loop.sh: ABS + legacy 双写 state
- hooks/hooks.json: 注册 SubagentStop → subagent-teardown.sh
- commands/on.md: 修复 feedback_frequency=0 tombstone 不恢复的不对称 bug
- commands/cancel-pua-loop.md + team-status.md: 移除不支持的
  Read(~/...) tilde 权限语法

E2E 验证 (10/10 全绿):
T1 hooks.json syntax | T2 teardown jsonl compact | T3 active-agents 选择性清除
T4 setup 双写 MD5 identical | T5 Gate 0 真拦截 SubagentStop
T6 主会话 Stop 注入 decision:block valid JSON | T7 Gate 0 对带 transcript
的 sub 仍拦截 | T8 无 tilde | T9 feedback_frequency 恢复 | T10 SubagentStop 注册
2026-04-18 02:40:57 +08:00

24 lines
986 B
JSON

{
"name": "pua",
"version": "3.2.0",
"description": "Forces high-agency exhaustive problem-solving with corporate PUA pressure escalation. Use when AI is passive, gives up easily, not verifying results, or producing low-quality work. Triggers on: 'try harder', '加油', '别偷懒', 'stop giving up', 'PUA模式', '质量太差', '重新做', '你再试试', '为什么还不行', '你怎么又失败了', user frustration or quality complaints, repeated failures (2+), or when agent needs motivation.",
"author": {
"name": "探微安全实验室",
"url": "https://github.com/tanweai"
},
"homepage": "https://github.com/tanweai/pua",
"repository": "https://github.com/tanweai/pua",
"license": "MIT",
"keywords": [
"pua",
"motivation",
"never-give-up",
"alibaba",
"corporate-culture",
"agent-team",
"p7-p8-p9-p10",
"parallel-execution",
"self-evolution"
]
}