Squashed 'docs/standards/playbook/' changes from e504a68..b529012

b529012  test(tests): avoid hardcoded missing path
07583c8 🐛 fix(tests): make doc link check awk-portable
6244aa3 🔧 chore(ci): relax gitattributes check
31dd0c5 🐛 fix(scripts): require existing project root
15d4d63 🔧 chore(ci): install python3-pip
90c6313 🔧 chore(ci): run tests in a single job
d84eff0 🔧 chore(ci): make actions base url configurable
395598d 🔧 chore(ci): fix yaml step names
4ae2733  feat(sync_standards): auto-detect existing languages
e97fb00  feat(sync_standards): default gitattributes to append
da0ef2b  test: add automated tests and ci workflow
99bef30 🎨 style(markdown): format all markdown files with prettier
7e96bc8 ♻️ refactor(tsl): split function.md into 44 modular files
0d6b2a0 📝 docs(readme): add quick decision table and TL;DR for distribution methods
3b2188f 🎨 style(markdown): format markdown files with prettier
41fc43b 📝 docs(tsl): document {Unit.}Type source annotation
3dceaf7 📝 docs(tsl): clarify tsf-only top-level rules and type annotations
3a63829 📝 docs(skills): add create-plan skill
f02a707 🐛 fix(scripts): escape markdown backticks in vendor_playbook
064aa92 🐛 fix(scripts): correct bat scripts
4881feb 🔧 chore(gitattributes): enforce crlf for bat files
1fa3e2a 🐛 fix(scripts): escape parentheses in sync_standards output
3958cad 📝 docs(vendor_playbook): mention ci templates
9d059cf  feat(templates): add gitea ci example
a52bb24 📝 docs(codex_skills): normalize markdown formatting
cc8ad4c 📝 docs(skills): slim commit-message
2a98e15 🐛 fix(skills): quote YAML descriptions
8f78d22 🐛 fix(sync_standards): generate minimal AGENTS.md
5547665  feat(skills): add commit-message suggestion skill
3fe8bd7 🔧 chore(sync_standards): create AGENTS.md on sync
283d311  feat(playbook): add syntax book and codex skills tooling
5b97ed5 📝 docs(tsl): clarify syntax references
27e0700  feat(skills): add pdf/docx/pptx/xlsx wrapper workflows
5551363  feat(skills): add debugging and bulk refactor workflows
1d4f548  feat(skills): add built-in workflow skills
c0895dd 📝 docs(skills): add anthropics document-skills integration
cf9f80d 🔧 chore(playbook): add Claude Code skills guide and align python templates

git-subtree-dir: docs/standards/playbook
git-subtree-split: b529012c59c5d67c3073884d7b617763647417fd
This commit is contained in:
csh
2026-01-08 15:56:36 +08:00
parent eada742d75
commit ac794a6a70
113 changed files with 254751 additions and 176 deletions
+58
View File
@@ -0,0 +1,58 @@
---
name: commit-message
description:
"基于 staged diff 生成符合 commit_message.md 的提交信息建议(:emoji:
type(scope): subject)。Triggers: commit message, 提交信息, 写提交说明,
生成提交信息, emoji commit, git commit."
---
# Commit Message(提交信息建议器)
目标:基于 `git diff --cached`staged
diff)生成 1–3 条提交信息建议:`:emoji: type(scope): subject`(可选 body/footer)。
权威规范(单一真源,优先就近路径):
- `docs/common/commit_message.md`
- `docs/standards/playbook/docs/common/commit_message.md`Playbook
vendoring 场景)
## When to use
- 用户要“写提交信息 / 生成 commit message / 按规范写提交说明 / emoji commit”
- 已经 `git add` 了一批改动,准备 `git commit`
## Proceduredefault
1. **收集 staged 概览(尽量小上下文)**
- `git diff --cached --name-status`
- `git diff --cached --stat`
- 必要时只看关键文件:`git diff --cached -- <path>`
2. **读取并遵循权威规范**
- 优先读取就近的
`commit_message.md`(见上方路径),以其中的 type/emoji/格式为准。
3. **生成 1 条主建议 + 2 条备选**
- 格式固定:`:emoji: type(scope): subject`scope 可省略)。
- subject 用一句话描述“做了什么”,避免含糊词;尽量 ≤ 72 字符,不加句号。
4. **判断是否建议拆分提交**
- 当 staged 同时包含多个不相关模块/目的时:建议拆分,并给出拆分方式(按目录/功能点/风险)。
5. **可选:补充 body/footer(如需要)**
- body:说明 why/impact/verify(按规范建议换行)。
- footer:任务号或 `BREAKING CHANGE:`(若有)。
6. **只给建议,不默认执行 `git commit`**
- 仅当用户明确要求时,才根据选定方案生成最终提交信息。
## Output contract(固定输出)
- Detected: staged files summary(文件数 + 关键路径 + 是否可能需要拆分)
- Proposed:
- Option Arecommended):`:emoji: type(scope): subject`
- Option B...
- Option C...
- Optional body/footer(如适用)
- Notes:规范路径命中情况(哪个 `commit_message.md` 被使用)