AGENT SKILL

commit-lineage

commit message 必带 lineage 锚点——若改动来自 spec / lesson / 决策原文,message 必须引用源路径。Use when 准备 git commit、用户说「提交」「commit」「频繁 commit」、或起草 commit message 时。

License 许可
MIT
所属仓库
KarryViber/Orb
最近更新
2026-05-14
Stars
★ 66
Forks
8

01 前言 Front Matter

name
commit-lineage
provenance
user-authored
description
commit message 必带 lineage 锚点——若改动来自 spec / lesson / 决策原文,message 必须引用源路径。Use when 准备 git commit、用户说「提交」「commit」「频繁 commit」、或起草 commit message 时。

03 SKILL.md 正文

Commit Lineage

每次 commit 把代码改动反向锚定到 spec / lesson / 决策原文,长期可审计「为什么这行长这样」。

借鉴 Yansu traceable lineage 原则:每行代码都该能追溯到引发它的需求或决策。

When to Use

  • 准备执行 git commit 时
  • 起草 commit message 时
  • 用户说「提交」「commit」「先 commit 一下」

规则

commit message 末尾按需追加 lineage 行,使用以下锚点:

锚点 何时用 例
Spec: 改动来自 workspace/specs/*.md 的实施 Spec: specs/dm-routing.md#实施步骤-3
Lesson: 改动是为了规避某条踩坑复盘 Lesson: lessons/slack-stream-chunk-semantics.md
Decision: 改动来自架构决策原文(CLAUDE.md / soul / spec 的 Decision Log) Decision: CLAUDE.md#Worker-IPC-Protocol
Issue: 改动是为了修复一个 issue / 用户报告的 bug Issue: 2026-04-25 Karry 反馈 cron 卡死
Followup: 来自之前 commit 的遗留 TODO Followup: 40b358a

没有源头的改动(探索性 / 临时调试 / 重构)不强制带 lineage,但 message 主体要写清「为什么」。

模板

conventional commits + lineage 行:

{type}({scope}): {简述}

{可选 body}

Spec: specs/xxx.md[#section]
Lesson: lessons/yyy.md

例子

好:

feat(execplan): 加 ## 验收场景 段

借鉴 Yansu scenario-simulation,spec 草稿后增加 Karry 拍板 gate。

Spec: specs/yansu-borrow.md
Decision: CLAUDE.md#Surgical-Changes

好(无源头但 why 清晰):

fix(worker): typo 导致 inject 失败

变量名 `injectId` 写成 `injetId`。

坏(有 spec 来源但没引用):

feat: 新增场景段

Gotchas

  • 不要为了凑 lineage 编造来源——没源头的改动主体写清 why 即可
  • 不要把 lineage 行写在 message 第一行(影响 oneline 可读性),只放末尾
  • 引用 lessons 时用相对路径 lessons/xxx.md,不要绝对路径(commit history 跨机器看也能 grep)
  • spec 引用最好带 #anchor 锚到具体段,否则 spec 长了找不到
  • 多源头时一个锚点一行,不要堆在同一行

反模式

  • :x: 每个 commit 都硬塞 lineage(没源头就别加)
  • :x: Spec: see above / Lesson: 见之前讨论(不可追溯)
  • :x: lineage 写在 message 主标题里

04 同仓库更多 Skills

KarryViber
KarryViber/Orb

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

测试与质量前端开发
★ 66
KarryViber
KarryViber/Orb

vendor-doc-actionability

对外合作文档(交付文档 / POC 文档 / Solution Doc / 提案书)必须为每个「需对方执行」的动作写清具体操作入口(URL / 工单系统 / 脚本路径 / 联系人 + 联系方式 / 步骤编号)。Use when 给客户、vendor、合作方写交付文档、POC 文档、Solution Doc、提案书;或检视已有对外文档是否抽象到无法执行。

★ 66
KarryViber
KarryViber/Orb

vendor-api-param-validation

第三方 API / SDK 集成开工前,强制先列参数 checklist 并对照官方文档逐项验证(名称 / 类型 / 必填 / 默认 / 上限),通过后再编码——不是「写完再调通」。Use when 新接 vendor API/SDK(Slack / LongPort / freee / LLM API 等)、既有集成追加新 endpoint 或新字段、用户说「调通某接口」「接入 X」「集成 X」。

开发工程师后端与接口
★ 66
KarryViber
KarryViber/Orb

truth-ladder

状态放行三层阶梯(attempted / observed / confirmed)—— 汇报任务、API、命令、消息或外部动作状态时强制分层,避免把"动作已发起"误写成"结果已达成"。Use when 准备写「任务已完成」「API 返回成功」「exit code 0」「用户已收到」「ok:true」类状态汇报;或在 cron 报告 / Slack 回报 / project status / receipt 中表达完成度时。

开发工程师
★ 66
KarryViber
KarryViber/Orb

thread-object-realignment

长 thread 切题后的对象重定协议——thread 历史 ≥5 条且检测到切题信号时,回复前必做「用户最后显式问题对象 vs 待发回复对象」一致性校验,不一致则改写或反问。Use when Slack thread 历史 ≥5 条且当前用户消息出现切题信号(主题词突变、问句指向新实体、时间线跳跃、出现「另外」「话说」「回到 X」「换个话题」等切题语,或 ≥3 turn 后用户显式问题对象与最近 assistant 回复对象不同)。

★ 66
KarryViber
KarryViber/Orb

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

视觉设计
★ 66