Commit graph

62 commits

Author SHA1 Message Date
wangzhuc
7a4f345bb1 fix: align exemplar injection across user/seed paths, clarify priority
- Add transition segment to user exemplar injection (was 3 segments,
  now 4 to match seeds path)
- Clarify priority chain: playbook > persona > exemplar > writing-guide
- Add exemplar fallback row to error handling table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:57:19 +08:00
wangzhuc
d2b87c489c feat: add universal exemplar seeds for users without articles
Seeds demonstrate anti-AI structural patterns (sentence variance, real
negative emotion, self-correction, abrupt closings) without imposing a
specific writing style. Step 4.4 falls back to seeds when the user's
exemplar library is empty.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:53:37 +08:00
wangzhuc
fbe2709bb5 feat: add exemplar library check to Step 1 environment scan
Prompts users to import articles when exemplar library is empty,
without blocking the pipeline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:49:57 +08:00
wangzhuc
83c963527c fix: use filename as fallback source when article has no H1 title
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:42:23 +08:00
wangzhuc
885cae8e7d feat: add SICO-style exemplar extraction system for few-shot writing
- New script: scripts/extract_exemplar.py
  Extracts style fingerprints from human-written articles (opening hook,
  emotional peak, transition/self-correction, closing) with statistical
  analysis (sentence stddev, vocab temperature, negative ratio, paragraph CV).
  Auto-detects category, supports batch import.

- SKILL.md: Add Step 4.4 exemplar injection
  Loads matching exemplars by category before writing, injects segments
  as few-shot style examples in the prompt.

- learn_edits.py: Auto-grow exemplar library
  After user edits, auto-extracts the final version into the exemplar
  library if humanness_score <= 50.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:32:02 +08:00
wangzhuc
e54137ce3e chore: bump VERSION to 1.3.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:53:33 +08:00
wangzhuc
4c09df31b3 chore: gitignore CLAUDE.md, remove from tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:51:25 +08:00
wangzhuc
f38cfb3dfd docs: update CLAUDE.md with anti-AI system, self-learning flywheel, new commands
Add: anti-AI detection 3-tier architecture, self-learning flywheel
(scoring feedback + edit learning + param optimization), diagnose
and scoring commands, X.Y numbering convention, VERSION tracking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:49:41 +08:00
github-actions[bot]
a49dc98273 chore: rebuild dist/openclaw from source 2026-03-30 12:30:08 +00:00
wangzhuc
65cba3ccf1 refactor: clean up SKILL.md numbering, add TaskCreate progress tracking
- Renumber all sub-steps to consistent X.Y format (1a-2→1.2, 4a-0→4.1, 5b-2→5.3)
- Add TaskCreate directive: create 8 tasks at pipeline start, update status per step
- Clean up internal references (Step 3b→3.2, Step 4b→4.3, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:29:57 +08:00
github-actions[bot]
023bf26af9 chore: rebuild dist/openclaw from source 2026-03-30 12:25:57 +00:00
wangzhuc
3443ef371f fix: update stale references in SKILL.md (7层 → 3层)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:25:48 +08:00
github-actions[bot]
333e7c46b1 chore: rebuild dist/openclaw from source 2026-03-30 12:23:43 +00:00
wangzhuc
344f7509f1 feat: structured edit learning with typed patterns and confidence scoring
learn_edits.py: patterns now have type/key/description/rule fields,
confidence auto-computed from occurrences + recency with 30-day decay.
--summarize --json outputs aggregated patterns sorted by confidence.

learn-edits.md: playbook.md format changed from free text to structured
YAML rules with confidence levels. Rules with confidence ≥ 5 become
hard constraints in Step 4, < 5 are soft references, < 2 get pruned.

SKILL.md Step 4: playbook priority now confidence-gated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:23:34 +08:00
github-actions[bot]
2d3d8e5f54 chore: rebuild dist/openclaw from source 2026-03-30 12:20:09 +00:00
wangzhuc
a98a99e773 feat: close the scoring feedback loop in pipeline
Step 8a: write composite_score + writing_config_snapshot to history.yaml,
recording which parameters produced which anti-AI score.

Step 4a-0: before writing, read history for the best-scoring article's
parameter combination and use it as reference for the current article.

This closes the feedback loop: write → score → record → learn → write better.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:19:57 +08:00
wangzhuc
70bfca61b0 docs: sync README with restructured writing-guide and new features
Update references from "7层去AI" to "3层反检测", "9项自检" to "14项",
add diagnose.py to directory tree, add "优化参数" to quick start.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:11:01 +08:00
github-actions[bot]
ed73813d03 chore: rebuild dist/openclaw from source 2026-03-30 11:59:47 +00:00
wangzhuc
bd85fc5c6b chore: bump VERSION to 1.3.0
Scoring rewrite (11 checks, continuous scores, param mapping) +
agent-driven optimization replacing optimize_loop.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:58:40 +08:00
wangzhuc
5fb20083af refactor: remove optimize_loop.py, replace with agent-driven optimization
optimize_loop.py was framework-only (needed external LLM API). The
optimization is now an auxiliary function in SKILL.md driven by the
already-running agent. All references updated across README, CLAUDE.md,
diagnose.py, and writing-config.example.yaml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:58:20 +08:00
wangzhuc
c7d618a0d1 feat: add optimization auxiliary function to SKILL.md, integrate scoring into Step 5
- New auxiliary: "优化写作参数" triggers agent-driven optimization loop
  (write test article → score → adjust lowest params → repeat N rounds)
- Step 5b-2: call humanness_score.py --json --tier3 after manual checklist
- Composite thresholds: <30 pass, 30-50 targeted fix, >50 major rewrite
- Step 8c: add optimization trigger to post-publishing actions table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:55:44 +08:00
wangzhuc
df72e51ea1 feat: rewrite humanness_score.py with continuous scoring and param mapping
- 11 checks across 2 tiers (6 statistical + 5 pattern), up from 6
- Continuous 0-1 scores instead of pass/fail booleans
- Each check maps to a writing-config parameter via param field
- New checks: negative emotion ratio, adverb density, vocabulary richness,
  sentence length range, self-correction patterns
- New --tier3 flag for agent to pass LLM structural analysis score
- param_scores in JSON output: flat param→score map for optimization
- Standalone mode redistributes weights (T1=62.5%, T2=37.5%)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:54:11 +08:00
wangzhuc
b9ead663ac chore: bump VERSION to 1.2.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:01:17 +08:00
github-actions[bot]
7a41f6fcc0 chore: rebuild dist/openclaw from source 2026-03-30 10:48:54 +00:00
wangzhuc
4fbbd185ca refactor: restructure writing-guide from action-based to detection-signal-based
Reorganize anti-AI rules into 3 tiers mapped to detector signals:
- Tier 1 (Statistical): sentence variance, vocab temperature, paragraph
  rhythm, emotion polarity, adverb density, style drift
- Tier 2 (Linguistic): banned words, broken sentences, unexpected words,
  coherence breaking
- Tier 3 (Content): real data anchoring, specificity, density waves,
  dimension randomization

New rules added: emotion polarity distribution (1.4), adverb density
control (1.5), inter-paragraph style drift (1.6), unexpected word
usage (2.3). Each rule now references the detection signal it counters.

writing-config.example.yaml updated with corresponding new parameters.
SKILL.md Step 5 checklist aligned to new structure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 18:48:44 +08:00
github-actions[bot]
4ba26b2f0f chore: rebuild dist/openclaw from source 2026-03-30 07:20:55 +00:00
wangzhuc
f1e9c084d9 feat: add version tracking and update mechanism
- Add VERSION file (1.2.0)
- SKILL.md Step 1: auto-check for updates on each run
- SKILL.md: add "更新" auxiliary function (git pull)
- README: install via git clone instead of cp/ln
- build_openclaw.py: include VERSION in dist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:20:44 +08:00
github-actions[bot]
1e4a74f930 chore: rebuild dist/openclaw from source 2026-03-30 07:02:06 +00:00
wangzhuc
350fec3c49 chore: add workflow_dispatch trigger to build-openclaw CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:01:48 +08:00
wangzhuc
639a6e78bb fix: grant write permission to build-openclaw CI workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:00:26 +08:00
wangzhuc
b7d91523cc chore: gitignore docs/, remove internal dev docs from tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 14:56:37 +08:00
wangzhuc
c7701a8733 docs: add diagnose command to README 2026-03-30 14:46:59 +08:00
wangzhuc
219941f08f feat: add diagnose auxiliary function to SKILL.md 2026-03-30 14:45:24 +08:00
wangzhuc
5fcceb7c72 feat: add anti-AI diagnostic command (scripts/diagnose.py)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 14:43:55 +08:00
wangzhuc
b0df62f3bc docs: add anti-AI diagnostic implementation plan
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 14:36:01 +08:00
wangzhuc
ea6b9924f8 docs: add anti-AI diagnostic command design spec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 14:32:33 +08:00
wangzhuc
ca502cf6d3 fix: build_openclaw 排除 __pycache__,清理 dist 运行时残留
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:35:29 +08:00
wangzhuc
4c842c4a08 README 更新:OpenClaw 安装方式 + 目录结构补充 build_openclaw
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:07:48 +08:00
wangzhuc
e1a0d6ef47 新增 OpenClaw 兼容:build 脚本 + CI + 首次产物
- scripts/build_openclaw.py:SKILL.md 转换({skill_dir}→{baseDir}、WebSearch→web_search、移除 allowed-tools)
- .github/workflows/build-openclaw.yml:push to main 时自动构建 dist/openclaw/
- dist/openclaw/:首次构建产物入库,OpenClaw 用户可直接使用

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:00:07 +08:00
wangzhuc
7c2dc4adc9 README 更新:新增小绿书、预检、image-post 命令
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:36:10 +08:00
wangzhuc
52cff3dd8f 新增小绿书/图片帖支持(WeChat newspic 格式)
publisher.py 新增 create_image_post():
- article_type="newspic",横滑轮播 3:4 比例
- 1-20 张图片,第一张自动当封面
- 标题 ≤ 32 字,纯文本描述 ~1000 字
- 使用 upload_thumb(永久素材)上传图片

cli.py 新增 image-post 子命令:
  python3 cli.py image-post img1.jpg img2.jpg -t "标题" -c "描述"

SKILL.md Step 8c 新增"做一个小绿书"触发入口。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:33:42 +08:00
wangzhuc
9bcb9bdd23 Step 7 新增 metadata 预检(借鉴 md2wechat inspect 模式)
发布前检查:标题长度、摘要字节数、封面存在、正文字数、图片数量。
预检全部通过才进入排版,减少发布失败率。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:27:26 +08:00
wangzhuc
5cb1f99ecf 修复首次使用者模拟发现的 5 个卡点
#1: {skill_dir} 显式定义(24处引用,从未声明)
#2: 行为声明新增"Onboard 例外"(交互式不受全自动约束)
#4: WebSearch 不可用时告知用户 AI 检测通过率会降低
#5: Step 8a history.yaml 不存在则创建
#7: learn-edits.md 引导用户从微信编辑器粘贴 final 版本

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:14:19 +08:00
wangzhuc
b80baa4c73 修复 7 个闭环审查问题
#1 HIGH: 用户给选题时跳到 Step 4 → 改为跳到 Step 3(保留素材采集)
#2 MEDIUM: writing-guide.md "Step 3.75" → "Step 3b"(2处)
#3 MEDIUM: history.yaml 新增 writing_persona 字段记录
#4 MEDIUM: 声明优先级 playbook > persona > writing-guide
#5 LOW: onboard.md 新增 tone → persona 自动映射表
#6 LOW: 错误处理表新增 persona 文件不存在的降级
#7 LOW: 错误处理表新增 WebSearch 降级

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:05:05 +08:00
wangzhuc
d87897288d README 新增写作人格系统 + 朱雀 benchmark 数据
- 新增"写作人格"章节:5 个人格 + 朱雀实测结果表
- 更新"关于 AI 检测":展示 100% AI → 10% AI 的优化路径
- 目录结构新增 personas/ 目录

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:00:44 +08:00
wangzhuc
3f84dc837d 写作人格朱雀 benchmark 数据更新
5 个人格全部经过朱雀实测,结果写入各 persona yaml 注释:
- midnight-friend: 39% 人工 / 10% AI(最优)
- warm-editor: 10% 人工 / 33% AI
- industry-observer: 10% 人工 / 40% AI(含 0.06 最低片段)
- sharp-journalist: 0% 人工 / 72% AI(需编辑锚点)
- cold-analyst: 0% 人工 / 74% AI(需编辑锚点)

核心发现:个人声音浓度与人工特征比例几乎线性相关。
onboard.md 人格选择表新增朱雀实测列。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 00:58:47 +08:00
wangzhuc
ddcf15796f 新增写作人格系统:5 个预设人格,像选排版主题一样选写作风格
基于优化 loop 实测(R5 朱雀 39% 人工/10% AI),将验证过的写作模式
抽象为可选的"写作人格"预设,用户在 style.yaml 中一行配置即可:

personas/midnight-friend.yaml — 深夜好友(已验证,39% 人工)
personas/industry-observer.yaml — 行业观察者(待验证)
personas/sharp-journalist.yaml — 锐评记者(待验证)
personas/warm-editor.yaml — 温暖编辑(待验证)
personas/cold-analyst.yaml — 冷静研究员(待验证)

每个人格定义:语气浓度、数据呈现方式、情绪弧线、段落节奏、
不确定性表达模板、破句风格、禁止项。

SKILL.md Step 4 新增 4b 加载写作人格步骤。
Onboard 新增写作人格选择。
style.example.yaml 新增 writing_persona 字段。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 00:48:34 +08:00
ystyleb
039a6caa9d
fix: normalize hotspot scores across platforms for fair sorting
Previously, hotspots were sorted by raw hot values directly, but different
platforms use vastly different scales (Toutiao ~10M, Weibo ~1M, Baidu ~100K),
causing Toutiao to dominate all results while Weibo and Baidu entries were
always truncated.

Now uses rank-based normalization (0-100) within each source before merging,
so cross-platform sorting gives equal weight to each platform's top stories.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 00:13:35 +08:00
wangzhuc
eef748f9c3 README 全面更新:反映结构重构 + 素材采集 + 编辑锚点 + 优化循环
- 顶部流程图新增素材采集和编辑锚点环节
- 新增"关于 AI 检测"章节:诚实定位为高质量初稿生成器
- 核心能力表新增素材采集、效果复盘、风格飞轮
- 目录结构反映重构后的 references/(新增 onboard/learn-edits/effect-review)
- 目录结构新增 humanness_score.py 和 optimize_loop.py
- 工作流程图与 SKILL.md Step 1-8 对齐(去掉 .5/.75 编号)
- 新增"优化循环"章节介绍 autoresearch 风格调优
- 快速开始新增"学习我的修改"示例

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 00:04:15 +08:00
wangzhuc
78e8fd666e SKILL.md 结构重构:571行→273行,学习 gstack 模式
拆分:
- Onboard → references/onboard.md
- 学习飞轮 → references/learn-edits.md
- 效果复盘 → references/effect-review.md
SKILL.md 只保留主管道(写文章)+ 错误处理。

重编号:
- 去掉 0, 2.5, 3.5, 3.75, 7.5 等补丁式编号
- Step 1-8 连续编号,子步骤用 a/b/c

新增行为声明区(学习 gstack preamble 模式):
- 角色、模式、降级原则一次性声明
- 完成协议:DONE / DONE_WITH_CONCERNS / BLOCKED / NEEDS_CONTEXT
- 辅助功能用 读取: references/xxx.md 按需加载
- frontmatter 新增 allowed-tools

结构:11 个 section header(原 34 个),Agent 认知负荷大幅降低。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 00:01:04 +08:00