feat: add workflow position tracking to SessionStart hook#26
Conversation
Show current step in workflow cycle and next recommended action at session start: - 📚 导入对标 → /cheat-learn-from - 📊 复盘 → /cheat-retro - 📤 发布 → /cheat-publish - 🎬 拍摄 → /cheat-shoot - 🔧 升级公式 → /cheat-bump - ✍️ 选题写稿 → /cheat-seed (default) Priority-ordered detection based on state fields: benchmark_status, pending_retros, shoots, in_progress_session, calibration_samples, last_bump_at, consecutive_directional_errors. Also includes contextual tips (aihot, humanizer-zh, dbs skill).
Jooonnn
left a comment
There was a problem hiding this comment.
谢谢 @wyttao120 这个 PR,核心 feature 有用——把"我现在该做什么"在会话开始时主动呈现,跟 cheat-status 哲学对齐。bash 写得也很干净(优先级链 + jq 安全读取 + edge case 周到)。
合并前希望先清理 3 处:
1. 删 docs/workflow-position.patch
这是 PR 自己 diff 的复制,与实际 hooks/session-start.sh 的改动重复。一旦合并后这文件零价值且会让 future readers 困惑。建议直接 git rm。
2. 删 docs/workflow-position-guide.md(或完全重写)
当前内容是"作者本地保留补丁、每次 git pull 后重新 apply"的指引——这是开发者本地工件,对于 git pull 后已经直接拥有 feature 的用户来说是误导。
两个选项:
- A(推荐):直接删——README + CHANGELOG 提一句新功能即可,hook 自身的 header 注释足够文档化
- B:重写成真正的 user-facing 功能介绍("这个 hook 会在每次会话开始显示当前工作流位置 + 下一步建议;不喜欢的话注释掉 SessionStart hook 那段即可"),≤ 30 行
3. 去掉 "第 N 步" 硬编码序号
"第 2 步:导入对标" / "第 7 步:复盘" / "第 8 步:升级" —— 但项目没有任何文档定义过 "1-8 步" 这个序号,这是这个 PR 凭空发明的。会造成两个问题:
- 用户看到 "第 7 步" 会找 "前 6 步在哪",结果发现找不到
- future contributor 加新场景时怎么编号?11 步?10.5 步?
建议简单去掉序号,只留 emoji + 描述就够清楚:
- workflow_step="📚 第 2 步:导入对标账号"
+ workflow_step="📚 导入对标账号"
- workflow_step="📊 第 7 步:数据复盘"
+ workflow_step="📊 数据复盘"(保留 emoji 的视觉层级感,但不假装存在一个 canonical step sequence。)
小问题:tips 引用非本仓库 skill
"💡 说'今天 AI 圈有什么'可调用 aihot 获取 AI 热点"
aihot 在我们 README 里有提(合理)。但 PR description 提到的 humanizer-zh / dbs 这俩不在 cheat-on-content 仓库的 SKILLS 列表——是你自己另装的外部 skill。普通用户看到没装会困惑。
→ tips 段只引用本仓库已知存在的 skill(cheat-* + aihot 都行,因为 README 里有),或者把 tip 改成 generic("按需调用 trend / news 类 skill 获取热点")。
3 处清理完我们就合。CHANGELOG 条目我们 merge 时帮你补,不用你写。
如果对哪一点不同意可以在 PR comment 里争——上面是 reviewer 视角,最终怎么改你拍板。
Show current step in workflow cycle and next recommended action at session start:
Priority-ordered detection based on state fields:
benchmark_status, pending_retros, shoots, in_progress_session, calibration_samples, last_bump_at, consecutive_directional_errors.
Also includes contextual tips (aihot, humanizer-zh, dbs skill).