From 390ab875e2abbab37c519ddc76b3f09fdd52e418 Mon Sep 17 00:00:00 2001 From: xsser Date: Sun, 19 Apr 2026 18:53:06 +0800 Subject: [PATCH] fix(skills): p7/p9/p10 reference paths resolve to ../pua/references/ (#146) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codebuddy-plugin/marketplace.json | 4 +-- .codebuddy-plugin/plugin.json | 2 +- evals/test-yaml-frontmatter.sh | 48 ++++++++++++++++++++++++++++++ plugin.json | 2 +- skills/p10/SKILL.md | 2 +- skills/p7/SKILL.md | 2 +- skills/p9/SKILL.md | 4 +-- 9 files changed, 58 insertions(+), 10 deletions(-) create mode 100755 evals/test-yaml-frontmatter.sh diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 9a387d8..b42f45c 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ { "name": "pua", "description": "PUA 我们不养闲 Agent — 11 modular skills, 13 corporate flavors, L0-L4 pressure, auto-iteration loop, ENFP yes-mode, Chinese-mom nagging mode, concentrated shot mode, agent lifecycle teardown protocol, feedback system. v3.2: SubagentStop hook + 3 ops commands.", - "version": "3.2.1", + "version": "3.2.2", "source": "./", "author": { "name": "探微安全实验室", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index b31fcb2..7acf24e 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pua", - "version": "3.2.1", + "version": "3.2.2", "description": "Forces high-agency exhaustive problem-solving with corporate PUA pressure. Triggers on user frustration, repeated failures, passive behavior, or quality complaints. Common triggers: try harder, figure it out, stop giving up, you keep failing, stop spinning, you broke it, why does this still not work, 加油, 别偷懒, 你再试试, 又错了, 降智了, 你又在原地打转, 你把之前的改坏了, 别让我手动处理, /pua. All task types.", "author": { "name": "探微安全实验室", diff --git a/.codebuddy-plugin/marketplace.json b/.codebuddy-plugin/marketplace.json index a4de365..09b3a7f 100644 --- a/.codebuddy-plugin/marketplace.json +++ b/.codebuddy-plugin/marketplace.json @@ -1,7 +1,7 @@ { "name": "pua-skills", "description": "PUA Motivator for CodeBuddy -- forces AI to exhaust all solutions before giving up, using corporate PUA rhetoric from Chinese and Western tech giants", - "version": "3.2.1", + "version": "3.2.2", "owner": { "name": "探微安全实验室", "url": "https://github.com/tanweai" @@ -10,7 +10,7 @@ { "name": "pua", "description": "PUA Motivator -- forces CodeBuddy to exhaust all solutions before giving up, using corporate PUA rhetoric (Alibaba, ByteDance, Huawei, Tencent, Netflix, Musk, Jobs)", - "version": "3.2.1", + "version": "3.2.2", "source": "./" } ] diff --git a/.codebuddy-plugin/plugin.json b/.codebuddy-plugin/plugin.json index 2a9ee9f..af7a5d1 100644 --- a/.codebuddy-plugin/plugin.json +++ b/.codebuddy-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pua", - "version": "3.2.1", + "version": "3.2.2", "description": "PUA Motivator -- forces AI to exhaust all solutions before giving up. Chinese version: corporate PUA rhetoric (Alibaba, ByteDance, Huawei, Tencent). English 'PIP Edition': Performance Improvement Plan (Amazon, Google, Meta, Netflix, Stripe). Same engine, two cultural faces. All task types: code, research, writing, deployment, infra.", "author": { "name": "探微安全实验室", diff --git a/evals/test-yaml-frontmatter.sh b/evals/test-yaml-frontmatter.sh new file mode 100755 index 0000000..685a6f6 --- /dev/null +++ b/evals/test-yaml-frontmatter.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# Test: validate YAML frontmatter in all SKILL.md files (#147) +# Ensures description fields with colons are properly quoted +set -euo pipefail + +PLUGIN_DIR="${PLUGIN_DIR:-$(cd "$(dirname "$0")/.." && pwd)}" +PASS=0 +FAIL=0 + +echo "=== YAML Frontmatter Validation ===" +echo "" + +while IFS= read -r file; do + rel="${file#$PLUGIN_DIR/}" + + frontmatter=$(sed -n '/^---$/,/^---$/p' "$file" | sed '1d;$d') + if [ -z "$frontmatter" ]; then + echo " ⚠ SKIP: $rel (no frontmatter)" + continue + fi + + desc_line=$(echo "$frontmatter" | grep '^description:' || true) + if [ -z "$desc_line" ]; then + echo " ⚠ SKIP: $rel (no description field)" + continue + fi + + desc_value="${desc_line#description: }" + if [[ "$desc_value" == \"*\" ]]; then + echo " ✅ PASS: $rel" + PASS=$((PASS+1)) + elif echo "$desc_value" | grep -q ':'; then + echo " ❌ FAIL: $rel — description contains ':' but is NOT quoted" + FAIL=$((FAIL+1)) + else + echo " ✅ PASS: $rel (no colon, quoting optional)" + PASS=$((PASS+1)) + fi +done < <(find "$PLUGIN_DIR" -name 'SKILL.md' -not -path '*/node_modules/*') + +echo "" +echo "===========================================" +echo "Passed: $PASS" +echo "Failed: $FAIL" +echo "Total: $((PASS+FAIL))" +echo "===========================================" + +[ "$FAIL" -eq 0 ] || exit 1 diff --git a/plugin.json b/plugin.json index 7d027be..009a695 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "pua", - "version": "3.2.0", + "version": "3.2.2", "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": "探微安全实验室", diff --git a/skills/p10/SKILL.md b/skills/p10/SKILL.md index 09580b6..5c1ab0a 100644 --- a/skills/p10/SKILL.md +++ b/skills/p10/SKILL.md @@ -8,6 +8,6 @@ license: MIT > 定战略、造土壤、断事用人。写战略输入不写 Prompt,管 P9 不管 P8。 -详细协议见 `references/p10-protocol.md`。加载后按协议执行。 +详细协议见 `../pua/references/p10-protocol.md`。加载后按协议执行。 核心行为遵循 `/pua` 核心 skill 的三条红线和旁白协议。 diff --git a/skills/p7/SKILL.md b/skills/p7/SKILL.md index 98c1c0c..6f42391 100644 --- a/skills/p7/SKILL.md +++ b/skills/p7/SKILL.md @@ -8,6 +8,6 @@ license: MIT > 在 P8 管理下执行子任务。先设计方案 + 影响分析,再实施编码,完成后三问自审查。 -详细协议见 `references/p7-protocol.md`。加载后按协议执行。 +详细协议见 `../pua/references/p7-protocol.md`。加载后按协议执行。 核心行为遵循 `/pua` 核心 skill 的三条红线和旁白协议。 diff --git a/skills/p9/SKILL.md b/skills/p9/SKILL.md index a6c830a..b01fd52 100644 --- a/skills/p9/SKILL.md +++ b/skills/p9/SKILL.md @@ -8,8 +8,8 @@ license: MIT > 懂战略、搭班子、做导演。管 P8 不管 P7。你的代码是 Prompt。 -详细协议见 `references/p9-protocol.md`。加载后按协议执行。 +详细协议见 `../pua/references/p9-protocol.md`。加载后按协议执行。 -Agent Team 架构详见 `references/agent-team.md`。 +Agent Team 架构详见 `../pua/references/agent-team.md`。 核心行为遵循 `/pua` 核心 skill 的三条红线和旁白协议。