Skip to content
/ CoderLap
Pre-commit

/ship

Pre-commit checklist. Auto-updates docs + validates citations + drafts commit message.

What it does

Reads git status, git diff, and git diff --cached. Categorises changes. Auto-updates relevant docs itself instead of just asking. Validates every <!-- src: --> citation in docs/** is still accurate. Drafts a why-focused commit message.

When to use

Before every commit that touches multiple files, especially after sessions with:

Smart doc updates

When routes, components, or schema change, /ship offers to update the relevant doc itself:

/api/invite changed — update docs/api.md?

Preview:
  ### POST /api/invite (updated)
  Rate limit: 5 requests/min/user (429 on exceed)
  <!-- src: app/api/invite/route.ts:8-65 -->

Add to docs/api.md? (y/n/edit)

Citation validator

Walks every docs/**.md and re-checks each <!-- src: path:range --> marker. Flags:

Doesn’t block commit — just warns.

Adaptive checklist

Skips items that don’t apply. Only asks about the things your diff actually touched:

Commit message drafting

Reads the last 5 commit messages to match your project’s style, then drafts:

<type>: short summary in imperative mood

Why: <1-2 sentences — business or technical reason>
What: <terse list if multi-file>

Closes: <issue ref if any>

Focuses on why, not just what. Does not add AI attribution unless your project already uses it.

Output

Produces a ready-to-copy commit command. Does not run it — committing is a user-confirmed action.