Commit

From shenxingy/Clade · View interactive version

Commit is an AI agent skill from the GitHub repository shenxingy/Clade. Create repository-adaptive checkpoint commits for coherent work, including requests to split changes into commits and push; publication remains separately authorized

How to use this skill

Skill file

Clade for Codex

This package composes the provider-neutral Clade core contract with the native

Codex surface adapter. Run the workflow directly in Codex; do not launch

another agent CLI or route it through Clade MCP.

Package provenance:

Canonical Clade workflow

You are the Commit skill. Create repository-adaptive checkpoint commits for the

current coherent delivery slice.

Arguments

repository policy already authorizes it

Optional oracle gate. When CLADE_ORACLE_GATE=1 is set in the environment,

run the same judge the orchestrator uses over the staged diff before committing:

# Repo-relative; the installed copy is on PATH as oracle-review.sh
configs/scripts/oracle-review.sh --staged --task "<the commit message>"

Exit 0 approves. Exit 1 is a rejection — report what it said and fix the diff

rather than committing over it. Exit 2 means it could not review (no key, no

model); that is NOT approval, so say the gate did not run. The variable was

documented in CLAUDE.md and read by nothing until 2026-09-12.

checkpoints

1. Enter the shared delivery workflow

Locate the sibling delivery skill and read its prompt plus the relevant

surface overlay. Run its deterministic context and list commands.

Do not commit until:

If no record exists for a user-requested coding task, initialize one through

delivery start. Do not manufacture ownership from a branch-name prefix.

2. Scope the checkpoint

Inspect staged, unstaged, untracked, and commits since the resolved base. Group

files by coherent behavior/evidence slice—not merely file type.

One commit should leave a useful recovery point. Cross-layer behavior, its

tests, generated contracts, migrations, and supporting documentation normally

belong together. Unrelated fixes require another commit and usually another

delivery/PR.

Never make unrelated universal mutations such as adding README counts,

flowcharts, TODO entries, attribution trailers, or Conventional Commit syntax

unless the target repository requires them.

Check secret risk and refuse credentials, raw provider endpoints with secrets,

private keys, token files, or machine-local state.

3. Discover commit policy

Resolve, in precedence order:

  1. explicit user constraints and hard safety;
  2. trusted closest AGENTS.md/CLAUDE.md;
  3. CONTRIBUTING*, commit templates, hooks, pre-commit config, DCO/signing;
  4. package/monorepo affected-test conventions;
  5. conservative Clade defaults.

Do not bypass hooks with --no-verify. Do not invent Conventional Commits,

signoff, or signatures where the repository does not require them.

Body mandate: when the repository uses Conventional Commits, give

substantive feat/fix/refactor/perf commits a short body after a blank

line. Record the mechanism, the hazard avoided or root cause, and material

constraints honored. Trivial chore/docs commits may remain subject-only.

Never add attribution trailers unless repository policy requires them.

4. Verify at the right evidence level

For a normal checkpoint, run affected syntax/tests/lint/typecheck sufficient to

show this slice is coherent. Full CI is not a prerequisite for preserving

useful work.

For --candidate, first align/restack against the resolved intended base, then

run every repository-required build/test/generated-file gate on exact HEAD.

Show actual command and result. A known syntactically broken checkpoint is not

coherent; fix it or preserve an explicit patch/blocker.

5. Commit explicit files

Present the file grouping, then execute unless --dry-run.

authority and explicit force-with-lease.

After each successful commit, record focused evidence through:

python3 "$DELIVERY_PY" checkpoint \
  --id "<id>" --command "<command>" --result "<result>"

When --candidate is requested, record complete evidence after the final

commit:

python3 "$DELIVERY_PY" candidate \
  --id "<id>" --head-sha "$(git rev-parse HEAD)" \
  --command "<full commands>" --result "<result>"

Any subsequent commit invalidates candidate evidence.

6. Publish only when authorized

--publish is task authority to push the current owned topic branch, not to

push a default/shared/protected branch, open a PR, merge, or delete anything.

Without --publish, push only if the active delivery already records

task-request/repository-policy. Otherwise report the local checkpoint and

the exact publication action still pending.

Before push, verify remote name, upstream, branch ownership, and remote head.

Use an explicit refspec when setting a new upstream. Never let git push

default to the tracked default branch. Never plain-force.

If the checkout cannot commit, use delivery preserve-ref or export-patch

and report why. “Done with uncommitted changes” is not a completion state.

Output

Report commit SHA/message, files, focused/candidate evidence, branch/upstream,

whether publication occurred and under what authority, active delivery id, and

the next required transition. Do not claim PR-ready without exact candidate

evidence; name any hosted checks still running as the receipt, not the gate.

Codex surface adapter

Codex surface adapter

$clade:delivery, and use $clade:<skill-name> for companion workflows.

AGENTS.override.md before AGENTS.md at each scope and does not merge

them, so where an override exists that scope's AGENTS.md is not in effect.

CLAUDE.md is Clade's legacy fallback rather than a filename Codex resolves;

read it only when it is trusted repository guidance.

is valid, but create/attach an owned branch or preserve a reachable Clade ref

before the runtime deletes the worktree.

one branch cannot be checked out by multiple worktrees.

not launch Claude Code or a nested Codex CLI to emulate the workflow.

connections remain user-scoped and cannot be donated by repository files.

Additional skill reference

Commit

Create one or more truthful checkpoint commits on an owned delivery branch.

Discover repository message, signing, DCO, hook, and verification policy before

committing. A commit preserves work; it does not automatically authorize push,

PR publication, merge, or branch deletion.

This skill is the BUILD/checkpoint operation of $clade:delivery. Run the shared

delivery context probe and use its active record rather than assuming

origin/main, GitHub, branch ownership, or a writable attached checkout.

Delivery completion

If this workflow changes files or external state:

repository task.

$clade:delivery and create a repository-compliant checkpoint or preserve

the work when committing is unavailable.

deployment, or live verification part of the task, do not silently downgrade

the result to local-only work.

or reachable external state, report BLOCKED or NEEDS_CONTEXT rather than

appending a "not committed/pushed/deployed" caveat after DONE.

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.