work-unit-commits
Plan commits as reviewable work units.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- work-unit-commits
- triggers
- work unit, commit splitting, commit organization, reviewable commits, split commit, stacked PR, chained PR commits
- changelog
- docs/ciclos/cycle28-20260815.md
- description
- Plan commits as reviewable work units.
- token_budget
- 2722
03 SKILL.md 正文
When to Use
Splitting feature into reviewable work units · preparing commits before PR · large change into chained/stacked PRs · healthy reviewer cognitive load · SDD tasks without exceeding 400 lines.
Rules
| Rule | Req |
|---|---|
| Commit by work unit | A commit = deliverable behavior/fix/migration/docs |
| NOT by file type | Avoid models→services→tests if none works alone |
| Tests with code | Same commit as behavior they verify |
| Docs with change | Same commit as feature/workflow they explain |
| Tell a story | Reviewer understands why each commit exists from diff+message |
| Future PR-ready | Each commit = candidate chained PR slice |
| SDD guard | >400-line forecast → chain before implementing |
Checklist (pre-commit)
- [ ] One clear purpose
- [ ] Repo works after this commit alone
- [ ] Tests/docs included when relevant
- [ ] Rollback without reverting unrelated work
- [ ] Message explains outcome, not file list
Chained PRs from Work Units
- Build smallest independent unit → include verification → commit conventional. 2. If PR→400 lines → promote commits into chained PRs.
Commands
git diff --stat
git diff --cached --stat
git log --oneline -5
Anti-Rationalization
| Rationalization | Red Flag | Verification |
|---|---|---|
| "code sin su test en el mismo unit" | Commit de code sin tests que lo verifican | Verificar Rules: Tests with code en mismo commit + checklist repo works after commit + rollback sin revert unrelated |
| "docs post-hoc" | Docs en commit separado post-hoc | Verificar Rules: Docs with change en mismo commit que feature/workflow + Tell a story + Chained PR slice |
| "commit por file type o >400 sin chain" | Commit por tipo archivo models→services→tests o >400 sin chain | Verificar NOT by file type + SDD guard >400-line forecast → chain + future PR-ready por commit |
Red Flags
- Doing work without checking output format → STOP, re-read skill
- Second occurrence of same rationalization → force RED zone
Verification
- Output matches skill ## Output contract + file:line citaton
- cross-ref-check.ps1 → SKILL.md OK
Refs
commit-crafter · chained-pr · branch-pr · sdd · quality-gate
Anti-Patterns
Commit by file type · Separate tests from code · >400 lines without chaining · Messages that list files · No SDD forecast check
docs/skills/work-unit-commits/reference.md
04 同仓库更多 Skills
web-quality-audit
Comprehensive web audit: performance, a11y, SEO, responsive, animation, design tokens.
ui-engine
UI system — Grid/Flexbox/@layer/:has(), container queries, compositor-only animation, OKLCH tokens, component patterns
baseline-ui
Anti-slop UI — layout, typography, responsive, animation, tokens. Use for cleanup or polish.
skill-creator
Create new AI agent skills following Agent Skills spec -- auto-bootstrap unknown tasks, define structure, register in AGENTS.md
senior-engineer
Apply senior engineering competencies — system design, trade-off analysis, delegation, mentoring, and tech debt strategy
prompt-engineering
Design effective prompts using SPEARS framework — scope, principles, examples, assertions, refinements, with ReAct and multi-agent patterns