Commit graph

6 commits

Author SHA1 Message Date
wangzhuc
73a67fffc7 fix: improve local file matching for WeChat draft sync
- learn_edits.py: prioritize output_file field from history.yaml,
  fall back to title slug matching, then largest file
- SKILL.md: add output_file field to history.yaml schema
- Fixes wrong file match when multiple articles share the same date

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:20:17 +08:00
wangzhuc
2773a8bb9b feat: sync edits from WeChat draft box for learn-edits
- publisher.py: add get_draft() to fetch draft content by media_id,
  add html_to_plaintext() for HTML→text conversion
- learn_edits.py: add --from-wechat flag that auto-fetches latest draft
  from WeChat, converts both sides to plaintext, and diffs
- learn_edits.py: add markdown_to_plaintext() for local file conversion
- SKILL.md: update edit workflow — both local and WeChat edits supported

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:20:17 +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
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
wangzhuc
dd1de0d1e9 重构为单用户模式:去掉多客户架构 + 新增 Onboard/环境检查 + 修复 10 项问题
架构转变:从代运营多客户模式改为开源单用户模式。
- 去掉 clients/ 目录,style.yaml/history.yaml 扁平化到 skill root
- Step 1 简化(不再提取客户名,直接读 style.yaml)
- 新增 Step 0 环境检查(config/依赖/API 配置,降级标记传递到后续 Step)
- Onboard 改为首次设置流程(交互式问答 + 支持"用默认的直接写")
- 3 个脚本去掉 --client 参数,路径扁平化
- 修复 10 项 workflow 问题(降级传递、历史写入、wechat-constraints 引用等)
- evals 更新为单用户模式的 3 个场景
- 新增 style.example.yaml 作为默认模板

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 22:36:36 +08:00
wangzhuc
1ab34fa450 Initial release — 公众号文章全流程 AI Skill
热点抓取 → 选题 → 框架 → 写作 → SEO → 视觉AI → 排版 → 微信草稿箱,
一句话触发完整流程。适用于 Claude Code skill 格式。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:16:18 +08:00