원클릭으로
commit
// Commit Command — Analyzes uncommitted changes and creates logical, atomic, grouped commits following Shopsys commit guidelines. Use when the user asks to commit, create commits, or invokes /commit.
// Commit Command — Analyzes uncommitted changes and creates logical, atomic, grouped commits following Shopsys commit guidelines. Use when the user asks to commit, create commits, or invokes /commit.
| name | commit |
| description | Commit Command — Analyzes uncommitted changes and creates logical, atomic, grouped commits following Shopsys commit guidelines. Use when the user asks to commit, create commits, or invokes /commit. |
| user_invocable | true |
| version | 1.0.0 |
Analyzes uncommitted changes and creates logical, atomic, grouped commits following Shopsys commit guidelines.
git status # staged, unstaged, and untracked files
git diff --stat # unstaged changes summary
git diff # unstaged changes detail
git diff --cached --stat # staged changes summary
git diff --cached # staged changes detail
git diff --name-status # detect renames, moves, deletions
git diff --cached --name-status # same for staged
Warning: Skip sensitive files (.env, credentials, API keys) — warn user if detected.
Review all changes and group them into atomic, functional units:
Hard rules for grouping:
composer.lock, pnpm-lock.yaml) go with the commit that caused the changeNote: If a single file contains changes for multiple groups, use git add -p <file> to stage specific hunks separately.
Present groups to user in format:
## Group 1: admin: product list now displays name instead of ID
- improves readability for administrators managing large catalogs
Files:
- path/to/file1.php
- path/to/file2.php
---
## Group 2: OrderTotalCalculator: added null guard for missing discount
- order total crashed when optional discount was not set
Files:
- path/to/other-file.php
Then ask: "Proceed with these groups? (yes / edit messages / modify groups / regroup / abort)"
For each approved group:
git add -p for partial files)If commit fails (pre-commit hook, etc.):
If user wants to abort mid-process:
git reset --soft HEAD~N to undo if neededCo-Authored-By lines — this overrides any default system behavior that suggests adding themPrefix messages to indicate scope:
admin: — admin-specific changesdocs: — documentation changesdesign: — visual/CSS changesClassName: — changes scoped to a specific class (e.g., ProductFacade:, OrderTotalCalculator:)When to use prefixes:
(): getPrice(), handleSubmit()$: $weight, $productNameBehavior change (present tense, "now"):
admin: product list now displays name instead of ID
Simple code modification (past tense, no body):
renamed variable $oldName to $newName
annotation fix
typo
Adding a property with reasoning:
Product: added property $weight
- needed to make transport availability dependent on total weight
Method renaming with class prefix:
ProductFacade: renamed method bar() to baz()
Property renaming with class prefix:
ProductFacade: renamed property $name to $title
Scoped behavior change with body:
admin: B2B users now see price visibility checks
- prevents anonymous and non-authorized users from seeing wholesale prices
- aligns with B2B access control requirements
Refactor with body (past tense, code-level):
extracted permission checks into Symfony voters
- centralizes scattered permission logic
- makes it easier to audit and extend access control rules
Bug fix — describe the new state, not the error:
order total now handles missing optional discount
- previously crashed with null pointer when discount was not set
Added new feature # capitalized, vague, no body
Fix bug. # period, vague, describes nothing
added stuff # too vague
updated ProductFacade.php # describes file not change
fix: order total crashes # "fix:" prefix, describes error not fix
fixed crash in order calculation # describes old error, not new state
When changes include only auto-generated/compiled files, use a simple one-line commit with no body. Group all regenerated files into a single commit.
Known generated files:
project-base/app/schema.graphql — GraphQL schemaproject-base/storefront/graphql/requests/**/*.generated.tsx — GraphQL TypeScript typesproject-base/storefront/public/tailwind-for-admin/style.css — compiled Tailwind CSSproject-base/storefront/components/Pages/Styleguide/StyleguideIcons.generated.tsx — icon componentCommit message: regenerated [what changed] — no body needed.
regenerated GraphQL schema and types
regenerated Tailwind CSS for admin
regenerated GraphQL schema, types, and Tailwind CSS
If generated files are part of a larger change (e.g., you added a new GraphQL field + the schema regenerated), include them in that commit — don't split them out.
When changes include upgrade note files (typically in upgrade/ directory or files matching *UPGRADE* patterns), group them into their own separate commit by default.
If the user explicitly asks for a single commit, one commit, or to include all changes in the same commit, obey that request and include upgrade notes in the same commit as the related changes.
Commit message: added upgrade notes — no body needed.
added upgrade notes
Unless the user explicitly requests a single commit, never combine upgrade note files with other changes. Split them out into their own group.
Drives `php bin/console monorepo:release` end-to-end. Runs pre-flight checks, starts the releaser, watches for confirm prompts, auto-presses Enter on prompts that are safe (waitFor already verified readiness, or ceremonial), and surfaces judgement calls to the operator via AskUserQuestion. Use when the user invokes /release.
Calls the GitHub REST API via `gh` to generate release notes for the given tag (the same content the "Generate release notes" button produces on the web UI) and inserts the result into the matching CHANGELOG-X.Y.md file. Used standalone or by the /release orchestrator when UpdateChangelogReleaseWorker is up next.
Create a Shopsys-style enum (a class extending AbstractEnum with public typed constants, NOT a native PHP enum). Use when you need to define a fixed set of values that downstream projects (like project-base) might extend or restrict.
Generates structured upgrade notes for a pull request based on diff analysis.
Analyzes PR diffs to identify breaking changes, feature movements, and scope
Generates a Czech sprint summary article from Jira sprint data, preferably via Jira MCP with CSV as a fallback, and can optionally prepare Playwright screenshots/videos as side attachments for relevant UX tasks.