285 Commits

Author SHA1 Message Date
Tanwe AI 3fd4e5a1cb Update README.md 2026-07-16 13:58:57 +08:00
xsser f0a2f913a0 chore: update WeChat group QR code (v10) 2026-07-05 09:53:57 +08:00
xsser d602b75218 chore: update WeChat group QR code (v9) 2026-06-17 23:14:24 +08:00
xsser f16769945d chore: bump pi/package version to 3.5.0 2026-06-12 17:46:32 +08:00
xsser b2c4f913f2 feat(ding): v3.5.0 — 钉味 skill 全面升级 blockquote + 来源标注
- 所有钉味输出从 ▎ Unicode 前缀改为 markdown blockquote(> )语法
  Claude Code 渲染器仅对 > 语法触发 dim ▎ + italic 灰色块样式
- 每条 blockquote 开头标注来源:《置身钉内》或《置身钉外》
- 新增独立 skills/ding/ skill 目录(SKILL.md + references/)
- 新增 commands/ding.md、evidence.md、again.md、done-check.md
- 新增 evals/test-trigger-regex.sh(38 条触发正则测试)
- hooks/session-restore.sh、flavor-helper.sh 同步更新格式
- 版本号 3.4.6 → 3.5.0(plugin.json + 两个 marketplace manifest)
v3.5.0
2026-06-12 17:44:35 +08:00
xsser 9d8569e192 chore: update WeChat group QR to group 8 2026-06-05 17:43:59 +08:00
Tanwe AI 196032e7d2 Merge pull request #171 from cnhx/fix/bash32-heredoc-eof
Complement to #169: extract UTF-8 pattern replacement into variables for bash 3.2 compat on line 150
2026-05-31 12:21:22 +08:00
Tanwe AI 242f1ff7c3 Merge pull request #167 from DongDongBear/fix/integrity-guard-shell-eval-false-positive
Fix false positive: shell builtins (eval/test/spec) no longer matched as path candidates
2026-05-31 12:21:08 +08:00
Tanwe AI 704825ead5 Merge pull request #169 from sinnohzeng/fix/stop-feedback-bash32-parse-error
Root fix for bash 3.2 heredoc parsing — replaces $(cat <<'HEREDOC') with IFS= read -r -d ''
2026-05-31 12:21:03 +08:00
xsser 82b8efc6ff feat(hooks): add pattern-aware failure analysis + de-escalation breakthrough detection
- Upgrade failure-detector.sh from simple counter to pattern-aware state machine
  - Track error signatures (MD5 hash) for SPINNING/EXPLORING/MIXED classification
  - Detect SUCCESS after L2+ struggle → trigger flavor-aware de-escalation
  - Fix false positive: exit_code=0 is now primary signal, text grep is secondary
  - Record error history in .error_history.jsonl (capped at 10 entries)
- Add de-escalation-protocol.md: breakthrough reward + 4-level cognitive reframe
  - Variable ratio reinforcement: reward only on L2+ breakthrough (not every success)
  - 14 flavor-specific recognition messages (alibaba→Owner, musk→Algorithm, etc.)
  - Deep reframe layers: switch perspective → abstraction level → constraints → inversion
- Update SKILL.md: integrate de-escalation, pattern analysis, and reframe protocols
2026-05-31 00:36:38 +08:00
Bryan Hua 0cdc3ab3ee fix(hooks): stop-feedback.sh fails to parse on macOS bash 3.2
The quoted heredoc `<<'FEEDBACK'` should suppress all parameter
expansion and quote interpretation, but bash 3.2.57 (the system
bash shipped with every macOS) still scans the body for unmatched
single quotes. The apostrophe in `user's explicit choice` on
line 126 was therefore treated as the start of a quoted string,
producing:

    line 150: unexpected EOF while looking for matching \`''
    line 151: syntax error: unexpected end of file

The hook then exits non-zero on every Stop event for any macOS user
running the default bash. Every Claude Code session shows the parse
error in the Stop hook feedback channel.

Two changes:

1. Reword the body to remove the apostrophe ('user's' -> 'the user').
   This is the actual fix for the EOF crash and is the minimum needed
   to make bash 3.2 happy.

2. Rewrite the trailing parameter substitution to use intermediate
   variables instead of a five-level-deep backslash-quote chain. Same
   behaviour, but readable and safer against future quoting regressions.

Verified:
- bash -n hooks/stop-feedback.sh passes
- dry-run with a minimal Stop event exits 0
- tested on bash 3.2.57 (macOS) which previously crashed
2026-05-20 14:56:48 -07:00
Sinnoh a77a7f2eb3 fix(hooks): make stop-feedback.sh parse on bash 3.2 (macOS default)
Replace `$(cat <<'FEEDBACK' ... FEEDBACK)` command-substitution-wrapped
heredoc with `IFS= read -r -d '' ... <<'FEEDBACK' ... FEEDBACK`.

Root cause: bash 3.2's `$(...)` scanner tracks single-quote balance
inside the heredoc body even when the heredoc delimiter is quoted.
v3.4.6 added "user's explicit choice" to the body — that single
apostrophe flipped the body's `'` count from even to odd, leaving the
scanner waiting for a closing quote and reporting `unexpected EOF` at
the next statement boundary (line 150). bash 4+ parses both versions
fine; macOS ships only bash 3.2 due to the GPLv3 cutoff, so every
macOS user's stop-feedback hook fails silently with the regression.

`read -r -d ''` reads until NUL (never present in the body) and
populates the variable as a side effect, returning non-zero at EOF —
hence `|| true`. No `\$(...)` involved, so the parser never has to
scan the heredoc body for matching delimiters. Robust against future
copy-edits that change apostrophe parity.

Verified:
- `bash -n` clean on /bin/bash 3.2.57 (Darwin 25.5.0 arm64) and
  Homebrew bash 5.x
- Runtime: feeds minimal HOOK_INPUT, exits 0, produces 72 lines of
  feedback text on stdout, empty stderr
- Placeholder substitutions `__PUA_PLUGIN_ROOT__`,
  `__PUA_SESSION_PATH__`, and `"flavor":"阿里" → "flavor":"\$_ACTUAL_FLAVOR"`
  all still execute correctly

Fixes #166. Closes #165.

Credit to @ShunmeiCho who diagnosed the exact root cause and proposed
this exact fix in #166's comments.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 00:46:53 -07:00
xsser 56332fe2eb fix(hooks): make integrity guard advisory-only v3.4.6 2026-05-13 23:39:49 +08:00
DongDongBear 7e5f772345 fix(integrity-guard): skip bare identifiers as path candidates
Shell builtins like `eval`, `test`, and `spec` were treated as path
candidates because `path_candidates` yielded every token unconditionally,
which then matched `(^|/)(evals?|tests?|spec|...)(/|$)` and flagged
innocuous commands as scoring-adjacent.

Repro:
    eval rg -n $opts '...' . 2>/dev/null
    -> Grader gaming risk. Target: eval

Fix: require a candidate to contain a directory separator or end in a
file-extension suffix before yielding it. Embedded paths inside quoted
code (e.g. `tests/fixtures.json` in a python -c string) are still picked
up by the existing path-regex pass, and real path args like
`evals/runner.sh` are unchanged.

Adds four regression cases:
- bare `eval`, `test`, `spec` no longer fire as path candidates
- a mutating `sed -i ... evals/runner.sh` still asks approval (positive control)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 21:32:54 +08:00
xsser 92850d9db2 feat(upload): allow consented anonymous session uploads 2026-05-09 17:25:49 +08:00
xsser 534b91c65f fix(upload): make contribution uploads reliable
Summary:
- Treat /contribute.html and /contribute as first-class SPA routes so
  GitHub OAuth callback and documented upload links land on the uploader.
- Switch the browser uploader from multipart/base64 to raw JSONL POSTs
  with metadata headers, while keeping JSON file_data and multipart
  compatibility on the API.
- Add static upload-flow gates and Vitest coverage for authenticated
  upload sanitization, R2 writes, and D1 metadata recording.
- Bump plugin and marketplace versions to 3.4.4.

Rationale:
- The upload path had two breakpoints: documented /contribute.html links
  rendered the homepage because routing only checked hash, and multipart
  browser uploads could be stripped by proxy/custom-domain behavior.
- Raw JSONL avoids multipart body loss and avoids base64 size/memory bloat
  for large session files.

Tests:
- bash evals/test-upload-flow.sh
- bash evals/test-release-consistency.sh
- npm --prefix landing test -- --run src/test/upload-function.test.ts
- static eval suite: governance, feedback auth, heartbeat, integrity
  guard, issue regressions, Microsoft flavor, platform compat, loop hook,
  Windows Python hooks, YAML frontmatter
- npm --prefix landing run build
- ./landing/node_modules/.bin/tsc -p pi/pua/tsconfig.json
- git diff --check

Co-authored-by: Codex <codex@openai.com>
2026-05-09 17:15:54 +08:00
xsser d3219862d9 fix(landing): make d1 migrations idempotent
Summary:
- Make the initial uploads index migration use IF NOT EXISTS.
- Add a release consistency gate that rejects non-idempotent D1 CREATE
  INDEX statements.

Rationale:
- Production D1 already had the old uploads index before Wrangler's
  migration journal was used, so migrations apply could fail on 0001
  before reaching newer migrations.
- Keeping migrations idempotent makes future Cloudflare release gates
  mechanical instead of relying on manual SQL execution.

Tests:
- bash evals/test-release-consistency.sh
- git diff --check

Co-authored-by: Codex <codex@openai.com>
2026-05-09 17:04:56 +08:00
xsser d40ca8a164 feat(pua): add silent heartbeat stats
Summary:
- Add a silent SessionStart heartbeat hook that posts minimal anonymous
  install activity to Cloudflare without emitting stdout, stderr, or
  additionalContext.
- Add the Cloudflare Pages heartbeat endpoint, D1 migration, and
  admin-only stats page at #/admin/heartbeats.
- Add heartbeat regression gates, release consistency checks, FAQ/design
  notes, and bump marketplace/package versions to 3.4.3.

Rationale:
- Active-user measurement belongs in a hook-side mechanical gate, not in
  the model prompt, so the worker context cannot narrate or leak the
  telemetry behavior.
- Privacy gates disable the signal for offline mode, telemetry opt-out,
  and feedback-off users before any local telemetry identity is created.

Tests:
- bash evals/test-heartbeat.sh
- bash evals/test-release-consistency.sh
- static eval suite: governance, feedback auth, integrity guard, issue
  regressions, Microsoft flavor, platform compat, loop hook, Windows
  Python hooks, YAML frontmatter
- bash evals/test-behavior.sh
- npm --prefix landing run build
- ./landing/node_modules/.bin/tsc -p pi/pua/tsconfig.json
- git diff --check

Co-authored-by: Codex <codex@openai.com>
2026-05-09 17:01:38 +08:00
xsser 308767f107 feat(pua): restore authentic Microsoft flavor 2026-05-09 14:29:47 +08:00
xsser aee3d5c2fa feat(pua): add Microsoft growth flavor 2026-05-09 14:23:39 +08:00
xsser ee09e3153a feat(pua): add Trae and pi package gates 2026-05-09 00:13:50 +08:00
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
xsser 2e9d3b9bf6 fix(pua): respect off on Windows Git Bash
Summary:
- Add shared Python launcher fallback, Git Bash path conversion, and JSON
  config readers for hook configuration access.
- Route UserPromptSubmit, PostToolUse, SessionStart, Stop, and integrity
  hooks through the shared config reader so /pua:off and feedback_frequency=0
  work when only python is available.
- Add issue #159 Windows Git Bash regression coverage and bump all plugin
  manifests to v3.2.8.

Rationale:
- Native Windows Python cannot open Git Bash /c/... paths directly, and some
  Windows installations provide python without python3.
- The previous fallback treated config read failures as always_on=true, so
  /pua:off could still inject PUA on frustration prompts.

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-behavior.sh
- bash evals/run-trigger-test.sh
- git diff --check
- python3 JSON parse check for plugin and hook manifests

Co-authored-by: Codex <codex@openai.com>
2026-05-08 23:15:35 +08:00
xsser f2e5716055 feat(pua): add four-power governance agents
Summary:
- Add four context-isolated governance agents for action,
  self-evaluation, verifier recommendation, and policy review.
- Bind each power to PUA cultural narratives: Alibaba/Musk for
  execution, Huawei/Netflix/Jobs for review, ByteDance/JD for
  verification, and Tencent/Amazon/Alibaba internal control for policy.
- Document the multi-agent topology in the PUA skill and harness
  reference, inject it on SessionStart, add static agent governance evals,
  and bump manifests to v3.2.7.
- Harden trigger evals to accept observable PUA behavior when Claude
  applies pressure without emitting a Skill tool event before max-turns.

Rationale:
- v3.2.6 created mechanical hook gates; v3.2.7 separates the thinking
  contexts too, so execution, review, verification, and environment
  approval cannot collapse into one self-proving narrative.
- Cultural narratives provide role-specific pressure, but the agents still
  remain advisory compartments under hook/external/human authority.

Tests:
- for f in hooks/*.sh scripts/*.sh evals/*.sh; do bash -n "$f"; done
- 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-behavior.sh
- bash evals/run-trigger-test.sh
- git diff --check
- python3 JSON manifest validation

Co-authored-by: Codex <codex@openai.com>
2026-05-08 22:49:53 +08:00
xsser 86746c26b1 feat(pua): add harness integrity governance
Summary:
- Add harness governance reference for four-power separation,
  task contracts, verifier-owned status, and memory boundaries.
- Add PreToolUse integrity guard for grader-gaming, solution
  contamination, capability-abuse, status, CI, and memory risks.
- Add integrity-guard eval coverage and release gates, then bump
  marketplace/plugin manifests to v3.2.6.

Rationale:
- PUA should not just pressure agents to try harder; it should make
  it difficult to fake completion by modifying tests, verifier assets,
  hidden answers, secrets, or persistent status/memory.
- The guard uses ask/deny decisions so ordinary code changes still
  proceed while governance assets require verifier or human approval.

Tests:
- for f in hooks/*.sh scripts/*.sh evals/*.sh; do bash -n "$f"; done
- bash evals/test-yaml-frontmatter.sh
- bash evals/test-release-consistency.sh
- bash evals/test-pua-loop-hook.sh
- bash evals/test-integrity-guard.sh
- bash evals/test-behavior.sh
- bash evals/run-trigger-test.sh
- git diff --check
- python3 JSON manifest validation

Co-authored-by: Codex <codex@openai.com>
2026-05-08 21:30:24 +08:00
xsser b995858141 fix(pua): harden confidence gate and trigger evals
Summary:
- Replace the one-line confidence loop with an explicit Confidence Gate
  that enumerates claims, finds risks, fixes or discloses them, and
  reruns evidence before delivery.
- Make pua-loop Oracle verification portable on macOS/Linux and add
  hook smoke tests for verified, rejected, and quoted verify commands.
- Fix trigger/behavior evals so they use portable timeouts, isolated
  PUA config, a neutral workspace, and the Claude CLI stream-json
  verbose requirement.
- Tighten PUA skill and slash-command descriptions to avoid triggering
  on normal first-attempt coding or information requests.
- Bump marketplace/plugin manifests to v3.2.5 with an updated Claude
  marketplace changelog summary.

Rationale:
- The previous strategy relied on vague "100% confidence" wording and
  left the verification system itself vulnerable to false failures on
  macOS, local user config leakage, and workspace-biased false triggers.
- Confidence is now defined as evidence-backed gates: all runnable
  checks pass, known high-risk issues are fixed, and residual risks are
  disclosed.

Tests:
- bash -n hooks/*.sh scripts/*.sh evals/*.sh
- bash evals/test-yaml-frontmatter.sh
- bash evals/test-release-consistency.sh
- bash evals/test-pua-loop-hook.sh
- bash evals/test-behavior.sh
- bash evals/run-trigger-test.sh

Co-authored-by: Codex <codex@openai.com>
2026-05-08 20:54:48 +08:00
xsser 45b2dd38ba feat: add confidence loop gate + bump to v3.2.4
- Add "信心闭环" self-verification loop before delivery in pua SKILL.md
- Fix puav2→pua path references in shot SKILL.md
- Fix flavor detection in stop-feedback hook (read from config)
- Bump version 3.2.3 → 3.2.4 across all plugin manifests
2026-05-08 19:55:58 +08:00
xsser 34cf090efa fix: use Glob discovery for protocol file paths in P7/P9/P10 agents
Agent files referenced "同目录下的 references/p{7,9,10}-protocol.md"
which resolves to agents/references/ — a directory that doesn't exist.
Protocol files live at skills/pua/references/. Now uses Glob pattern
(**//pua/skills/pua/references/*.md) consistent with SKILL.md discovery.

Reported-by: NLPM automated audit (#156)
2026-04-27 14:07:08 +08:00
xsser ff830d3089 chore: bump version to 3.2.3
- fix: pua-loop state file isolation (multi-directory)
- fix: hooks.json path quoting for Windows spaces
- feat: Kimi Code + Hermes Agent support
2026-04-23 01:40:23 +08:00
xsser 2b92d17093 fix: quote CLAUDE_PLUGIN_ROOT in hooks.json for paths with spaces
On Windows, usernames with spaces (e.g. /c/Users/Lewis Dong/) cause
bash to split the path. All 7 hook commands now use escaped quotes
around the variable expansion.

Fixes #148
2026-04-23 00:02:35 +08:00
xsser 991fdb9123 fix: update comments and help text to match v3.2 state file naming
Hook comment block still referenced v3.1 single-file design; setup help
text pointed to obsolete .claude/pua-loop.local.md for monitoring.
2026-04-19 22:23:47 +08:00
xsser 08e70525ed fix: pua-loop state file isolation — prevent cross-directory task bleed
State file was written to a single global path (~/.claude/pua/loop-active.md),
causing two Claude Code instances in different directories to overwrite each
other's loop state. Now uses cwd hash in filename (loop-<hash>.md) so each
project directory has an independent loop instance.

Fixes: multiple users reporting task A executing task B's commands when
running pua-loop in two directories simultaneously.
2026-04-19 22:20:25 +08:00
xsser a0313a408a feat: add Kimi Code support (#124)
- Add kimi/pua, kimi/pua-en, kimi/pua-ja SKILL.md adapters
- Add Kimi Code install tab to landing page
- Add Kimi Code to platform pills
2026-04-19 19:13:05 +08:00
xsser de14b0c781 feat: add Hermes Agent support (#142)
- Add hermes/pua, hermes/pua-en, hermes/pua-ja SKILL.md adapters
- Add Hermes Agent install tab to landing page
- Add Hermes Agent to platform pills
2026-04-19 19:04:15 +08:00
xsser 8c926e5965 feat(landing): add missing main.tsx entry + motion-primitives components
Landing page was missing src/main.tsx (Vite entry) and
src/components/motion-primitives.tsx (13 animation primitives).
Build now succeeds and deploys to openpua.ai.
2026-04-19 18:56:18 +08:00
xsser 390ab875e2 fix(skills): p7/p9/p10 reference paths resolve to ../pua/references/ (#146)
- skills/p7, p9, p10 SKILL.md referenced `references/xxx.md` but the
  files live under `skills/pua/references/` — fix to `../pua/references/`
- Add evals/test-yaml-frontmatter.sh regression test for #147
- Bump version to 3.2.2
2026-04-19 18:53:06 +08:00
xsser 69a0202f31 release: v3.2.1 — hotfix flavor-helper.sh unbound variable (#144)
Ship the #144 fix (ccaa9c0) to all marketplace users via synchronized
version bump across all distribution channels.

Version bumps:
- .claude-plugin/plugin.json:       3.2.0 → 3.2.1
- .claude-plugin/marketplace.json:  3.2.0 → 3.2.1
- .codebuddy-plugin/plugin.json:    3.2.0 → 3.2.1
- .codebuddy-plugin/marketplace.json (top + plugins[0]): 3.2.0 → 3.2.1
- landing/dist/index.html: add v3.2.1 hotfix entry in zh/en/ja changelogs

Fix content (already in main @ ccaa9c0):
- hooks/flavor-helper.sh: initialize PUA_LANGUAGE="" before the config
  file existence check so first-run users whose shells run with
  set -euo pipefail don't trip 'PUA_LANGUAGE: unbound variable'.

No functional changes beyond #144 — hero brand (v3.2) intentionally
preserved; only manifest-level patch version increments so marketplace
clients will pick up the fix on next sync.
v3.2.1
2026-04-19 01:10:08 +08:00
xsser ccaa9c0227 fix(flavor-helper): initialize PUA_LANGUAGE to avoid unbound var under set -u
get_flavor() only assigned PUA_LANGUAGE inside the `if [ -f "$config" ]`
branch. Callers (frustration-trigger.sh / pua-loop-hook.sh /
failure-detector.sh) run under `set -euo pipefail`, so on first-run
users without ~/.pua/config.json, line 179's `[ "$PUA_LANGUAGE" = "zh" ]`
tripped `unbound variable` and exit 1 — throwing a red hook error on
every UserPromptSubmit.

Fix: declare `PUA_LANGUAGE=""` unconditionally at the top of get_flavor
so it always has a definition regardless of config file presence.

E2E verified: `set -euo pipefail; source flavor-helper.sh; get_flavor`
with no config → exits 0 instead of trapping.

Closes #144
Reported-by: @maj1999 (thorough repro + root-cause analysis)
2026-04-19 01:01:44 +08:00
xsser 38ab18f41d marketplace: sync .codebuddy-plugin manifests to v3.2.0
.codebuddy-plugin/{plugin,marketplace}.json: bump versions
  - plugin.json: 1.2.0 → 3.2.0
  - marketplace.json top-level: 1.0.0 → 3.2.0
  - marketplace.json plugin entry: 1.2.0 → 3.2.0

Keeper Test finding: codebuddy manifest was last touched 1 month ago
(cc50d9f). It's a pure manifest wrapper (no independent code), so the
version must track the main project; leaving it at 1.x made the
CodeBuddy marketplace card claim the plugin hadn't shipped since
January. Descriptions stay platform-neutral (no Claude-specific slash
commands) since CodeBuddy command mapping may differ.
2026-04-18 02:51:35 +08:00
xsser 7a68267ebe marketplace: sync .claude-plugin manifests to v3.2.0
.claude-plugin/plugin.json: bump version 3.1.0 → 3.2.0
.claude-plugin/marketplace.json:
- bump plugin version 2.9.0 → 3.2.0 (was 3 releases stale)
- update skill count 9 → 11 (add /pua:mama, /pua:shot)
- add 'Mama-mode' to flavor list
- add agent lifecycle accounting description
  (SubagentStop + team-status/reap-orphans/teardown-all)

Keeper Test finding: marketplace card was showing 2.9.0 product spec
while the top-level plugin shipped 3.2.0. Shelf-product mismatch.
2026-04-18 02:50:44 +08:00
xsser 7e016aaacf landing: add v3.2 changelog entry · fix wrangler project name
dist/index.html: prepend v3.2 release note (agent lifecycle accounting:
SubagentStop hook + team-status/reap-orphans/teardown-all) to the
changelog in all 3 locales (zh/en/ja); bump hero badge, meta description,
footer version v3.1 → v3.2.

wrangler.toml: fix project name drift pua-landing → pua-skill (actual
Cloudflare Pages project hosting openpua.ai). Deployed live at
https://openpua.ai
2026-04-18 02:46:21 +08:00
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
Tanwe AI 6eb54b0cc3 Merge pull request #138 from ssly/main
fix: 修复 /pua:off 无法禁用沮丧检测和失败升级 hook 的问题
2026-04-15 21:36:52 +08:00
ssly 62f8a1a66d fix: 修复 /pua:off 无法禁用沮丧检测和失败升级 hook 的问题
当 always_on 为 false 时(即用户执行了 /pua:off),frustration-trigger.sh
和 failure-detector.sh 应跳过注入。此前这两个 hook 未检查配置状态,
在用户明确关闭 PUA 后仍会无条件注入内容。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 00:08:55 +08:00
xsser 4edff910bb chore: update WeChat QR to group 7, bump cache v5→v7 2026-03-31 14:48:29 +08:00
xsser 5789b84767 docs: add Star History chart to README (EN + ZH) 2026-03-27 20:21:53 +08:00
xsser dfc0c31ac1 fix(mama): expand nagging text length — too short, not authentic
- L0-L5 escalation: table → full paragraphs with authentic long-form nagging
- L2: 1 line → 5 sentences of genuine 正式唠叨
- L3: 1 line → 8 sentences of 翻旧账 with childhood references
- L4: 1 line → 6 sentences of 社会比较
- L5: full 情感核弹 with 假装放弃 4-step protocol
- 碎碎念话术库: all entries expanded 3-4x
- 抗借口表: all entries doubled in length
- 96 → 117 lines, flavor density significantly increased
2026-03-26 18:29:13 +08:00
xsser 47073f2c1f release: v3.1.0 — mama mode + shot mode + landing updates
- Bump version 3.0.0 → 3.1.0
- Add mama/shot to README.md command tables (EN + ZH)
- Add mama/shot to architecture section
- Update landing index.html: v3.1, 11 skills, release timeline
- Update guide.html: mama command section (ZH/EN/JA) with example output
- Add mama-mode, chinese-mom keywords to plugin.json
2026-03-26 18:19:56 +08:00
xsser abf880460d fix(upload): guard empty body + bump compat date to 2025-04-01
Root cause: Cloudflare custom domain sometimes strips POST body (POST→GET
rewrite), causing request.json() to throw 'SyntaxError: Unexpected end of
JSON input' which was caught and shown to user verbatim.

Fix:
- Read body as text first, return 400 with clear message if empty
- Parse JSON manually to give specific parse error vs generic crash
- Bump compatibility_date 2024-12-01 → 2025-04-01 (fixes some CF edge cases)
2026-03-26 18:00:19 +08:00
xsser b94de65270 feat: add mama command route and individual command file
- Add mama route to commands/pua.md router (was missing entirely)
- Create commands/mama.md for /pua:mama direct invocation
- Update argument-hint and trigger list to include mama
- Fixes: /pua mama and /pua:mama now both work correctly
2026-03-26 17:57:13 +08:00