Files
xsser 0672b260b3 feat(pua): sweep open issues and add offline adapters
Summary:
- Filter UserPromptSubmit prompts inside the hook and soften hook wording so
  normal first-attempt prompts stay silent and frustration prompts read as
  user-installed productivity context.
- Add offline mode, remove stop-feedback /tmp plugin-root rendezvous, and add
  feedback endpoint body caps, origin checks, and D1-backed rate limiting.
- Add diagnosis-first discipline, Huawei military-order mode, Codex subcommand
  alias skills, a lightweight pi adapter, and Trae prompt/rule files.
- Clarify ambiguous 下场 wording, add FAQ guidance, and bump manifests to
  v3.3.0.

Rationale:
- Open issues covered over-aggressive hooks, model refusal, closed-network
  usage, Codex subcommands, Pi/Trae support, feedback abuse, ambiguous lifecycle
  wording, Huawei tone, and the misleading-traceback blind spot.
- The fixes convert ad-hoc prompt pressure into mechanical gates: script-level
  trigger filtering, offline config gates, endpoint abuse controls, and static
  regression checks.

Tests:
- for f in hooks/*.sh scripts/*.sh evals/*.sh; do bash -n "$f"; done
- bash evals/test-windows-python-hooks.sh
- bash evals/test-yaml-frontmatter.sh
- bash evals/test-release-consistency.sh
- bash evals/test-agent-governance.sh
- bash evals/test-pua-loop-hook.sh
- bash evals/test-integrity-guard.sh
- bash evals/test-issue-regressions.sh
- bash evals/test-behavior.sh
- bash evals/run-trigger-test.sh
- ./landing/node_modules/.bin/tsc -p pi/pua/tsconfig.json --noEmit
- npm -C landing run build
- git diff --check
- python3 JSON parse check for plugin and hook manifests

Co-authored-by: Codex <codex@openai.com>
2026-05-08 23:41:30 +08:00

1.1 KiB

PUA for Trae — 高能动性执行规则

当用户明确要求 PUA、任务连续失败、反复微调同一路径、想放弃、想让用户手动收尾、未验证就归因环境、或用户说“再试试/换个方法/别偷懒/质量太差”时,启用本规则。

三条红线

  1. 没有 build/test/curl/实测证据,不算完成。
  2. 没有根因和边界说明,不算交付。
  3. 没有穷尽不同路径前,不能说无法解决。

诊断先行

改代码或改配置前,先输出一行:

[PUA-DIAGNOSIS] 问题是 ___;证据是 ___;下一步动作是 ___。

如果诊断指向某个文件/模块,下一步必须处理那个位置;如果不处理,必须解释为什么诊断和行动不一致。

行动循环

  1. 读原始错误和相关上下文。
  2. 列 2-3 个互斥假设。
  3. 选择最小可验证动作。
  4. 执行并贴证据。
  5. 失败两次后换本质不同的方法。
  6. 交付前跑验证并说明剩余风险。

语气

对用户简洁尊重;压力只加给自己。可以使用阿里/华为/字节等文化叙事,但不能用叙事替代证据。