| name | finish-work |
| description | Pre-commit quality checklist covering lint, typecheck, tests, code-spec sync, API changes, database migrations, cross-layer verification, and manual testing. Blocks commit if infra or cross-layer specs lack executable depth. Use when code is written and tested but not yet committed, before submitting changes, or as a final review before git commit. |
Finish Work - Pre-Commit Checklist
Before submitting or committing, use this checklist to ensure work completeness.
Timing: After code is written and tested, before commit
Checklist
1. Code Quality
pnpm lint
pnpm type-check
pnpm test
2. Code-Spec Sync
Code-Spec Docs:
Key Question:
"If I fixed a bug or discovered something non-obvious, should I document it so future me (or others) won't hit the same issue?"
If YES -> Update the relevant code-spec doc.
2.5. Code-Spec Hard Block (Infra/Cross-Layer)
If this change touches infra or cross-layer contracts, this is a blocking checklist:
Block Rule:
If infra/cross-layer changed but the related spec is still abstract, do NOT finish. Run $update-spec manually first.
3. API Changes
If you modified API endpoints:
4. Database Changes
If you modified database schema:
5. Cross-Layer Verification
If the change spans multiple layers:
6. Manual Testing
Quick Check Flow
pnpm lint && pnpm type-check
git status
git diff --name-only
Common Oversights
| Oversight | Consequence | Check |
|---|
| Code-spec docs not updated | Others don't know the change | Check .trellis/spec/ |
| Spec text is abstract only | Easy regressions in infra/cross-layer changes | Require signature/contract/matrix/cases/tests |
| Migration not created | Schema out of sync | Check db/migrations/ |
| Types not synced | Runtime errors | Check shared types |
| Tests not updated | False confidence | Run full test suite |
| Console.log left in | Noisy production logs | Search for console.log |
Relationship to Other Commands
Development Flow:
Write code -> Test -> $finish-work -> git commit -> $record-session
| |
Ensure completeness Record progress
Debug Flow:
Hit bug -> Fix -> $break-loop -> Knowledge capture
|
Deep analysis
$finish-work - Check work completeness (this skill)
$record-session - Record session and commits
$break-loop - Deep analysis after debugging
Core Principle
Delivery includes not just code, but also documentation, verification, and knowledge capture.
Complete work = Code + Docs + Tests + Verification