Commit Changes
Create a single local commit for Foldkit changes. Do not push.
Workflow
- Inspect the worktree with
git status --short, git diff HEAD, git branch --show-current, and git log --oneline -10.
- Identify changed files owned by the current task. Do not stage unrelated user changes.
- Check whether changed files touch any published package path:
packages/foldkit/ -> foldkit
packages/ui/ -> @foldkit/ui
packages/devtools/ -> @foldkit/devtools
packages/create-foldkit-app/ -> create-foldkit-app
packages/vite-plugin-foldkit/ -> @foldkit/vite-plugin
packages/devtools-mcp/ -> @foldkit/devtools-mcp
packages/oxlint-plugin-foldkit/ -> @foldkit/oxlint-plugin
- If a published package changed, inspect
.changeset/*.md excluding README.md and config.json. Verify a changeset covers each changed package.
- If a changed published package has no covering changeset, create one:
---
'package-name': patch
---
Concise description of the change.
Use an empty changeset, a file holding only the two frontmatter delimiters, for an internal change with no user-facing effect, such as a pure refactor, a move between modules that leaves the published surface and behavior unchanged, or a test-only change. It satisfies changeset status without adding a release entry. Use patch for bug fixes, docs, and metadata changes. Use minor for new features, non-breaking API additions, and breaking changes while the project is pre-1.0. Do not use major.
For breaking changes, include a brief migration note in the changeset description.
- Run
pnpm format. Inspect formatting changes and stage only files that belong to the requested commit.
- Stage relevant files with
git add.
- Create one Conventional Commit with
git commit.
- Verify the final commit message with
git log -1 --format=%B. If any
body line is longer than 80 characters, amend the commit before stopping.
Re-check the subject, scope, author, and branch shape after every amend.
Commit Message Rules
- Use a valid scope from
AGENTS.md when one scope describes the commit's
primary intent. If no valid scope cleanly describes the whole change set,
omit the scope.
- Inspect the full staged diff before choosing the subject: run
git diff --cached --stat and git diff --cached --name-status. If amending an existing commit message, inspect git show --stat --name-status HEAD.
- Make the subject describe the whole change set, not just one file, one subtask, or the latest edit.
- Choose the scope from the whole change set's primary intent, not from the
last file edited, a helper file, or any single path in the diff.
- Use only literal valid scopes from
AGENTS.md. Do not invent broad scopes such as tooling or infrastructure.
- Use an imperative title.
- Keep the subject concise.
- Include a body when the commit changes behavior, fixes a bug, adds migration or debugging context, or needs rationale that the subject cannot carry. Do not rely on changesets, PR text, or chat context to explain why the change exists.
- Use the body to explain the problem and why this approach was taken. Avoid merely restating the staged file list.
- Subject-only commits are acceptable only for trivial mechanical changes where the context is obvious from the subject and diff.
- Wrap commit body lines at 80 characters. Do this before committing or
amending, and verify it afterward.
- Add
! after the scope for breaking changes.
- Do not add co-author lines.
- Do not mention Codex, Claude, or any AI assistant.
Before stopping after a commit or amend, verify:
- The subject describes the whole final diff.
- The scope is valid, or intentionally omitted for a cross-scope change.
- Body lines are wrapped at 80 characters.
- Author and committer are correct.
- The branch has the intended number of commits.
Boundaries
- Do not run the release process. Releases are automated.
- Do not edit changelogs manually.
- Do not push unless the user explicitly asks.
- If the worktree contains unrelated changes that make staging ambiguous, stop and ask which files belong in the commit.
1---2name: commit-changes3description: Create a git commit in the Foldkit monorepo with changeset enforcement and formatting. Use when the user asks Codex to commit current changes, make a commit, create a changeset-backed commit, or prepare a local Foldkit commit.4---56# Commit Changes78Create a single local commit for Foldkit changes. Do not push.910## Workflow11121. Inspect the worktree with `git status --short`, `git diff HEAD`, `git branch --show-current`, and `git log --oneline -10`.132. Identify changed files owned by the current task. Do not stage unrelated user changes.143. Check whether changed files touch any published package path:15 - `packages/foldkit/` -> `foldkit`16 - `packages/ui/` -> `@foldkit/ui`17 - `packages/devtools/` -> `@foldkit/devtools`18 - `packages/create-foldkit-app/` -> `create-foldkit-app`19 - `packages/vite-plugin-foldkit/` -> `@foldkit/vite-plugin`20 - `packages/devtools-mcp/` -> `@foldkit/devtools-mcp`21 - `packages/oxlint-plugin-foldkit/` -> `@foldkit/oxlint-plugin`224. If a published package changed, inspect `.changeset/*.md` excluding `README.md` and `config.json`. Verify a changeset covers each changed package.235. If a changed published package has no covering changeset, create one:2425```markdown26---27'package-name': patch28---2930Concise description of the change.31```3233Use an empty changeset, a file holding only the two frontmatter delimiters, for an internal change with no user-facing effect, such as a pure refactor, a move between modules that leaves the published surface and behavior unchanged, or a test-only change. It satisfies `changeset status` without adding a release entry. Use `patch` for bug fixes, docs, and metadata changes. Use `minor` for new features, non-breaking API additions, and breaking changes while the project is pre-1.0. Do not use `major`.3435For breaking changes, include a brief migration note in the changeset description.36376. Run `pnpm format`. Inspect formatting changes and stage only files that belong to the requested commit.387. Stage relevant files with `git add`.398. Create one Conventional Commit with `git commit`.409. Verify the final commit message with `git log -1 --format=%B`. If any41 body line is longer than 80 characters, amend the commit before stopping.42 Re-check the subject, scope, author, and branch shape after every amend.4344## Commit Message Rules4546- Use a valid scope from `AGENTS.md` when one scope describes the commit's47 primary intent. If no valid scope cleanly describes the whole change set,48 omit the scope.49- Inspect the full staged diff before choosing the subject: run `git diff --cached --stat` and `git diff --cached --name-status`. If amending an existing commit message, inspect `git show --stat --name-status HEAD`.50- Make the subject describe the whole change set, not just one file, one subtask, or the latest edit.51- Choose the scope from the whole change set's primary intent, not from the52 last file edited, a helper file, or any single path in the diff.53- Use only literal valid scopes from `AGENTS.md`. Do not invent broad scopes such as `tooling` or `infrastructure`.54- Use an imperative title.55- Keep the subject concise.56- Include a body when the commit changes behavior, fixes a bug, adds migration or debugging context, or needs rationale that the subject cannot carry. Do not rely on changesets, PR text, or chat context to explain why the change exists.57- Use the body to explain the problem and why this approach was taken. Avoid merely restating the staged file list.58- Subject-only commits are acceptable only for trivial mechanical changes where the context is obvious from the subject and diff.59- Wrap commit body lines at 80 characters. Do this before committing or60 amending, and verify it afterward.61- Add `!` after the scope for breaking changes.62- Do not add co-author lines.63- Do not mention Codex, Claude, or any AI assistant.6465Before stopping after a commit or amend, verify:6667- The subject describes the whole final diff.68- The scope is valid, or intentionally omitted for a cross-scope change.69- Body lines are wrapped at 80 characters.70- Author and committer are correct.71- The branch has the intended number of commits.7273## Boundaries7475- Do not run the release process. Releases are automated.76- Do not edit changelogs manually.77- Do not push unless the user explicitly asks.78- If the worktree contains unrelated changes that make staging ambiguous, stop and ask which files belong in the commit.