wxpub-cli 0.3.0 → 0.3.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/README.md +6 -1
- package/package.json +3 -2
- package/skill/claude/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -127,11 +127,16 @@ npm install
|
|
|
127
127
|
npm run lint # ESLint 9 (flat config)
|
|
128
128
|
npm run typecheck # tsc --noEmit
|
|
129
129
|
npm test # vitest(wire 契约测试)
|
|
130
|
+
npm run eval # agent evals(真 agent 回归 SKILL.md 行为,~$0.2/次)
|
|
130
131
|
npm run build # 产出 dist/
|
|
131
132
|
node dist/index.js --help
|
|
132
133
|
```
|
|
133
134
|
|
|
135
|
+
### agent evals
|
|
136
|
+
|
|
137
|
+
`evals/` 用 `claude -p` 无头模式做 **skill 行为回归**:把 SKILL.md + 场景指令喂给干净 agent,对它的"将执行的命令 + 说明"按规则评分(ordered 顺序 / must_match / must_not_match)。改 SKILL.md 或 CLI 行为后跑 `npm run eval`,红灯 = 说明书没教好。首跑即抓到真问题:场景歧义(转发现成稿要不要拉调性)促成了铁律 1 的措辞收紧。
|
|
138
|
+
|
|
134
139
|
## 路线图
|
|
135
140
|
|
|
136
|
-
- ✅ v0.3:`wxpub install` 分发 Agent Skill(遵循 [Agent Skills 开放规范](https://agentskills.io/specification)),Claude Code
|
|
141
|
+
- ✅ v0.3:`wxpub install` 分发 Agent Skill(遵循 [Agent Skills 开放规范](https://agentskills.io/specification)),Claude Code 自动发现发文工作流;`npm run eval` agent evals 持续回归 skill 行为(vercel 式)
|
|
137
142
|
- ✅ v0.2:`wxpub tone` 拉账号调性(写文前注入 agent 上下文);`wxpub illustrate` AI 生成文中插图(依赖服务端 `/api/mp/account-tone` 与 `/api/mp/ai-image`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wxpub-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "WeChat Official Account publishing CLI — markdown 直投公众号草稿箱(wechat-publish-service 客户端,API-Key 通道)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"format:check": "prettier --check .",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
26
|
"test": "vitest run",
|
|
27
|
-
"prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build"
|
|
27
|
+
"prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build",
|
|
28
|
+
"eval": "node evals/run.mjs"
|
|
28
29
|
},
|
|
29
30
|
"keywords": [
|
|
30
31
|
"wechat",
|
package/skill/claude/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ description: "公众号发文 CLI(wechat-publish-service 客户端)。当用
|
|
|
30
30
|
|
|
31
31
|
## ⚠️ 铁律(必守)
|
|
32
32
|
|
|
33
|
-
1.
|
|
33
|
+
1. **写文前先拉调性**——要动笔写(而非原样转发现成稿)就必须先 `tone`,除非用户明说"不用管调性"。调性就是该号的人设,跳过=成稿风格不符。
|
|
34
34
|
2. **别改主题**:publish 永远不传 theme,账号在服务端配置的默认主题(丹心红/明灯绿/AI浪蓝)自动生效。
|
|
35
35
|
3. **illustrate 是同步长任务**(10-60 秒出图+上传),命令退出即完成——不要轮询、不要并行跑多个、失败读 message 决定是否换 prompt 重试一次。
|
|
36
36
|
4. **重复投递返回 `duplicate:true` 不是失败**——内容没变被幂等去重,草稿箱还是原来那篇。要强制新建草稿才加 `--force`(须用户明确要求)。
|