Finish work

From jlifeng/JobPilot · View interactive version

Finish work is an AI agent skill from the GitHub repository jlifeng/JobPilot. Finish Work - Pre-Commit Checklist

How to use this skill

Skill file

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

# Must pass
pnpm lint
pnpm type-check

# If the project defines a test script, it must pass too
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

# 1. Code checks
pnpm lint && pnpm type-check

# 1.5 Optional: if package.json defines a test script
pnpm test

# 2. View changes
git status
git diff --name-only

# 3. Based on changed files, check relevant items above

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

explicit user authorization


Core Principle

Delivery includes not just code, but also documentation, verification, and knowledge capture.

Complete work = Code + Docs + Tests + Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.