Commit

From govctl-org/govctl · View interactive version

Commit is an AI agent skill from the GitHub repository govctl-org/govctl. Record a focused VCS commit with govctl validation and Work Item traceability

How to use this skill

Skill file

Commit

Record the current coherent change without inventing governance work or

touching unrelated files.

Detect The VCS

Run jj root first. If it succeeds, use only jj: a colocated repository also

contains .git, so probing Git first picks the wrong tool. Only if jj root

fails, use git rev-parse --git-dir.

Inspect changes with jj status and jj diff, or git status --short,

git diff, and git diff --cached. The repository is governed when gov/

exists.

Hard Stops

Item and is not spec-only governance maintenance.

Traceability

In a governed repository, run govctl check and govctl work list active. Use

the Work Item already identified by context or the diff; query

govctl work list done only if none is. Spec-only changes need no Work Item.

For a matching active Work Item:

validation output, review state, or the commit itself.

An item may already be done; keep the closure and implementation in one

commit.

Commit Boundary

Review the full diff, including generated and governance files. The commit is

one explainable outcome. If unrelated work shares the current jj change, stop

and split it (jj split --help) or ask the user. With Git, stop if the index

already holds unrelated staged changes.

Message format, with the type chosen from the outcome (feat, fix,

refactor, docs, test, chore):

<type>(<area>): <short summary>

Record it without opening an editor; use stdin for multi-line messages:

jj describe -m "<type>(<area>): <summary>"
jj new
git add -- <reviewed-path>...
git commit -m "<type>(<area>): <summary>"

Report

The commit ID and subject, the Work Item status if any, the govctl check

result, and whether the working copy is clean afterwards.

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.