@windagency/valora-plugin-engineering 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,788 @@
1
+ ---
2
+ name: commit
3
+ description: Analyze changes and create atomic, conventional commits with intelligent message generation, version management, changelog updates, and quality insights
4
+ experimental: true
5
+ argument-hint: '[--scope=<area>] [--breaking] [--message="<custom-message>"] [--amend] [--no-verify] [--version-bump=<auto|major|minor|patch>] [--tag] [--update-changelog] [--interactive] [--insights] [--sign] [--auto-ticket] [--template=<name>]'
6
+ allowed-tools:
7
+ - codebase_search
8
+ - read_file
9
+ - grep
10
+ - list_dir
11
+ - glob_file_search
12
+ - run_terminal_cmd
13
+ - web_search
14
+ # MCP: GitHub for issue/ticket linking
15
+ - mcp_github
16
+ model: claude-haiku-4.5
17
+ agent: lead
18
+ prompts:
19
+ pipeline:
20
+ # Stage 1: Context Analysis - Gather all necessary information
21
+ - stage: context
22
+ prompt: context.analyze-git-status
23
+ required: true
24
+ outputs:
25
+ - changed_files
26
+ - staged_files
27
+ - untracked_files
28
+ - git_status_summary
29
+
30
+ - stage: context
31
+ prompt: context.load-commit-template
32
+ required: false
33
+ conditional: template_specified == true
34
+ inputs:
35
+ template_name: $ARG_template
36
+ outputs:
37
+ - template_config
38
+ - required_fields
39
+
40
+ - stage: context
41
+ prompt: context.extract-ticket-info
42
+ required: false
43
+ conditional: auto_ticket == true
44
+ inputs:
45
+ branch_name: $CONTEXT_branch
46
+ outputs:
47
+ - ticket_number
48
+ - ticket_details
49
+
50
+ - stage: context
51
+ prompt: context.analyze-change-scope
52
+ required: true
53
+ inputs:
54
+ changed_files: $STAGE_context.changed_files
55
+ outputs:
56
+ - change_type
57
+ - affected_areas
58
+ - breaking_changes
59
+ - change_summary
60
+ - risk_level
61
+
62
+ # Stage 2: Quality Review (Optional, Parallel) - AI-powered insights
63
+ - stage: review
64
+ prompt: review.generate-commit-insights
65
+ required: false
66
+ conditional: insights_enabled == true
67
+ parallel: true
68
+ inputs:
69
+ change_summary: $STAGE_context.change_summary
70
+ changed_files: $STAGE_context.changed_files
71
+ breaking_changes: $STAGE_context.breaking_changes
72
+ outputs:
73
+ - quality_score
74
+ - impact_analysis
75
+ - security_issues
76
+ - recommendations
77
+
78
+ # Stage 3: Strategy & Execution - Generate and execute commits
79
+ - stage: code
80
+ prompt: code.determine-commit-strategy
81
+ required: true
82
+ inputs:
83
+ change_summary: $STAGE_context.change_summary
84
+ affected_areas: $STAGE_context.affected_areas
85
+ breaking_changes: $STAGE_context.breaking_changes
86
+ outputs:
87
+ - should_split
88
+ - commit_groups
89
+ - commit_strategy
90
+
91
+ - stage: code
92
+ prompt: code.calculate-version-bump
93
+ required: false
94
+ conditional: version_bump_enabled == true
95
+ inputs:
96
+ change_type: $STAGE_context.change_type
97
+ breaking_changes: $STAGE_context.breaking_changes
98
+ version_bump_arg: $ARG_version_bump
99
+ outputs:
100
+ - version_bump_type
101
+ - current_version
102
+ - next_version
103
+
104
+ - stage: code
105
+ prompt: code.generate-commit-messages
106
+ required: true
107
+ inputs:
108
+ commit_groups: $STAGE_code.commit_groups
109
+ change_type: $STAGE_context.change_type
110
+ scope: $ARG_scope
111
+ breaking: $ARG_breaking
112
+ custom_message: $ARG_message
113
+ template_config: $STAGE_context.template_config
114
+ ticket_number: $STAGE_context.ticket_number
115
+ insights: $STAGE_review.recommendations
116
+ outputs:
117
+ - commit_messages
118
+ - commit_descriptions
119
+ - commit_footers
120
+
121
+ - stage: code
122
+ prompt: code.interactive-review
123
+ required: false
124
+ conditional: interactive_mode == true
125
+ inputs:
126
+ commit_messages: $STAGE_code.commit_messages
127
+ commit_groups: $STAGE_code.commit_groups
128
+ quality_score: $STAGE_review.quality_score
129
+ recommendations: $STAGE_review.recommendations
130
+ outputs:
131
+ - approved_messages
132
+ - user_modifications
133
+
134
+ - stage: code
135
+ prompt: code.stage-and-commit
136
+ required: true
137
+ inputs:
138
+ commit_groups: $STAGE_code.commit_groups
139
+ commit_messages: $STAGE_code.commit_messages
140
+ commit_descriptions: $STAGE_code.commit_descriptions
141
+ commit_footers: $STAGE_code.commit_footers
142
+ amend: $ARG_amend
143
+ no_verify: $ARG_no_verify
144
+ sign: $ARG_sign
145
+ outputs:
146
+ - commits_created
147
+ - commit_hashes
148
+ - commit_summary
149
+
150
+ # Stage 4: Post-Commit Actions (Optional) - Versioning and documentation
151
+ - stage: code
152
+ prompt: code.create-version-tag
153
+ required: false
154
+ conditional: tag_enabled == true
155
+ inputs:
156
+ next_version: $STAGE_code.next_version
157
+ commit_hashes: $STAGE_code.commit_hashes
158
+ outputs:
159
+ - tag_created
160
+ - tag_name
161
+
162
+ - stage: documentation
163
+ prompt: documentation.update-changelog
164
+ required: false
165
+ conditional: update_changelog == true
166
+ inputs:
167
+ commit_messages: $STAGE_code.commit_messages
168
+ version: $STAGE_code.next_version
169
+ change_type: $STAGE_context.change_type
170
+ outputs:
171
+ - changelog_updated
172
+ - changelog_entry
173
+
174
+ # Stage 5: Verification - Validate and report
175
+ - stage: review
176
+ prompt: review.verify-commits
177
+ required: true
178
+ inputs:
179
+ commits_created: $STAGE_code.commits_created
180
+ commit_hashes: $STAGE_code.commit_hashes
181
+ tag_created: $STAGE_code.tag_created
182
+ outputs:
183
+ - verification_status
184
+ - commit_log
185
+ - final_summary
186
+
187
+ merge_strategy: sequential
188
+ rollback_on_failure: context
189
+ cache_strategy: stage
190
+ retry_policy:
191
+ max_attempts: 2
192
+ backoff_ms: 500
193
+ retry_on:
194
+ - error
195
+ ---
196
+
197
+ # Commit Command
198
+
199
+ ## Role
200
+
201
+ Use the [agent] profile
202
+
203
+ ## Goal
204
+
205
+ **Create atomic, intelligent commits** with automated message generation, version management, changelog updates, quality insights, and security validation. This command provides a comprehensive commit workflow that analyzes changes, generates conventional commit messages, manages semantic versioning, updates documentation, provides AI-powered insights, and supports interactive review.
206
+
207
+ ### Success Criteria
208
+
209
+ - ✅ All relevant changes are staged and committed atomically
210
+ - ✅ Commit messages follow Conventional Commits specification
211
+ - ✅ Semantic versioning is automatically calculated and applied (when enabled)
212
+ - ✅ CHANGELOG.md is updated with structured release notes (when enabled)
213
+ - ✅ Breaking changes are properly flagged with `BREAKING CHANGE:` footer
214
+ - ✅ AI-powered quality insights identify potential issues (when enabled)
215
+ - ✅ Issue tracker integration links commits to tickets (when enabled)
216
+ - ✅ Commit signing ensures cryptographic verification (when enabled)
217
+ - ✅ Interactive review allows human oversight (when enabled)
218
+ - ✅ Pre-commit hooks pass (unless `--no-verify` specified)
219
+ - ✅ Commit history is clean, meaningful, and traceable
220
+
221
+ ## Rules
222
+
223
+ ### Conventional Commits Format
224
+
225
+ Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
226
+
227
+ ```plaintext
228
+ <type>[optional scope]: <description>
229
+
230
+ [optional body]
231
+
232
+ [optional footer(s)]
233
+ ```
234
+
235
+ #### Commit Types
236
+
237
+ | Type | Description | Example |
238
+ | ---------- | --------------------------------------------------- | ------------------------------------------- |
239
+ | `feat` | New feature implementation | `feat(auth): add OAuth2 authentication` |
240
+ | `fix` | Bug fix | `fix(api): resolve race condition in cache` |
241
+ | `docs` | Documentation changes | `docs(readme): update installation steps` |
242
+ | `style` | Code style changes (formatting, no logic change) | `style(components): apply Prettier rules` |
243
+ | `refactor` | Code refactoring (no feature change or bug fix) | `refactor(db): extract query builders` |
244
+ | `perf` | Performance improvements | `perf(api): optimize database query` |
245
+ | `test` | Adding or updating tests | `test(auth): add OAuth2 integration tests` |
246
+ | `build` | Build system or dependency changes | `build(deps): upgrade React to v18` |
247
+ | `ci` | CI/CD configuration changes | `ci(github): add automated deployments` |
248
+ | `chore` | Maintenance tasks, tooling updates | `chore(deps): update development tools` |
249
+ | `revert` | Revert a previous commit | `revert: feat(auth): add OAuth2` |
250
+ | `wip` | Work in progress (should not appear in main branch) | `wip: experimenting with GraphQL` |
251
+
252
+ #### Scope Guidelines
253
+
254
+ - Use clear, concise scope names (kebab-case)
255
+ - Align with architectural boundaries (e.g., `auth`, `api`, `ui`, `db`)
256
+ - Omit scope if change affects multiple areas broadly
257
+ - Examples: `auth`, `user-profile`, `payment-gateway`, `logging`
258
+
259
+ #### Breaking Changes
260
+
261
+ For breaking changes, add `!` after scope and include footer:
262
+
263
+ ```plaintext
264
+ feat(api)!: redesign authentication endpoints
265
+
266
+ BREAKING CHANGE: /api/login endpoint now requires JWT tokens
267
+ instead of session cookies. Clients must update authentication flow.
268
+ ```
269
+
270
+ ### Commit Strategy
271
+
272
+ #### When to Create Single Commit
273
+
274
+ - Changes form a single logical unit
275
+ - All files relate to the same feature/fix
276
+ - Total changes are < 500 lines
277
+ - No mixed concerns (feature + refactor, fix + feature)
278
+
279
+ #### When to Split into Multiple Commits
280
+
281
+ - Multiple distinct features/fixes in changeset
282
+ - Mixed concerns (separate feature from refactor)
283
+ - Large changesets (> 500 lines) that can be logically separated
284
+ - Frontend + backend changes (separate when appropriate)
285
+ - Schema migrations + code changes
286
+
287
+ #### Commit Order Priority
288
+
289
+ 1. **Schema/migrations** (database, API contracts)
290
+ 2. **Backend/core logic** (business logic, APIs)
291
+ 3. **Frontend/UI** (components, pages)
292
+ 4. **Tests** (unless tightly coupled to feature)
293
+ 5. **Documentation** (README, API docs)
294
+ 6. **Configuration** (CI/CD, tooling)
295
+
296
+ ### Staging Strategy
297
+
298
+ - **Auto-stage** all modified tracked files by default
299
+ - **Exclude** untracked files unless explicitly added
300
+ - **Respect** `.gitignore` and workspace ignore rules
301
+ - **Prompt** for confirmation before staging large changesets (> 1000 lines)
302
+
303
+ ### Commit Message Quality
304
+
305
+ #### Subject Line (< 72 characters)
306
+
307
+ - Start with lowercase (after type/scope)
308
+ - Use imperative mood ("add", not "added" or "adds")
309
+ - No period at the end
310
+ - Be specific and descriptive
311
+
312
+ ✅ **Good Examples:**
313
+
314
+ ```plaintext
315
+ feat(auth): implement JWT refresh token rotation
316
+ fix(payments): prevent duplicate charge on retry
317
+ docs(api): document rate limiting behavior
318
+ ```
319
+
320
+ ❌ **Bad Examples:**
321
+
322
+ ```plaintext
323
+ updated files
324
+ fix bug
325
+ WIP
326
+ feat: changes
327
+ ```
328
+
329
+ #### Body (Optional, Wrap at 72 Characters)
330
+
331
+ - Explain **what** and **why**, not **how**
332
+ - Reference related issues, tickets, or design docs
333
+ - Include context for complex changes
334
+ - Use bullet points for multiple points
335
+
336
+ #### Footer (Optional)
337
+
338
+ - `BREAKING CHANGE:` - Document breaking changes
339
+ - `Closes #123` - Auto-close GitHub issues
340
+ - `Refs #456` - Reference related issues
341
+ - `Co-authored-by:` - Credit collaborators
342
+
343
+ ### Pre-commit Verification
344
+
345
+ Before committing, ensure:
346
+
347
+ 1. ✅ Linting passes (no critical errors)
348
+ 2. ✅ Type checking passes
349
+ 3. ✅ Tests pass locally (if `--no-verify` not set)
350
+ 4. ✅ No debug code (console.log, debugger, etc.)
351
+ 5. ✅ No sensitive data (secrets, tokens, PII)
352
+ 6. ✅ No unresolved merge conflicts
353
+
354
+ ## Context
355
+
356
+ ### User-Provided Arguments
357
+
358
+ ```plaintext
359
+ $ARGUMENTS
360
+ ```
361
+
362
+ ### Available Arguments
363
+
364
+ #### Core Arguments
365
+
366
+ - `--scope=<area>` - Force specific scope (overrides auto-detection)
367
+ - `--breaking` - Flag as breaking change with `BREAKING CHANGE:` footer
368
+ - `--message="<msg>"` - Custom commit message (overrides auto-generation)
369
+ - `--amend` - Amend last commit instead of creating new one
370
+ - `--no-verify` - Skip pre-commit hooks (use sparingly)
371
+
372
+ #### Version Management
373
+
374
+ - `--version-bump=<auto|major|minor|patch>` - Calculate and apply semantic version bump
375
+ - `auto` - Auto-detect from commit type (feat→minor, fix→patch, breaking→major)
376
+ - `major` - Force major version bump (x.0.0)
377
+ - `minor` - Force minor version bump (0.x.0)
378
+ - `patch` - Force patch version bump (0.0.x)
379
+ - `--tag` - Create git tag with version number after commit
380
+
381
+ #### Documentation
382
+
383
+ - `--update-changelog` - Automatically update CHANGELOG.md with structured entries
384
+ - `--changelog-format=<keepachangelog|github>` - Changelog format (default: keepachangelog)
385
+
386
+ #### Quality & Insights
387
+
388
+ - `--insights` - Generate AI-powered commit quality insights and recommendations
389
+ - `--quality-check` - Run quality validation (score message, detect issues)
390
+ - `--impact-analysis` - Analyze potential impact of changes (breaking changes, dependencies)
391
+
392
+ #### Security
393
+
394
+ - `--sign` - Sign commit with GPG/SSH key for cryptographic verification
395
+ - `--sign-key=<key-id>` - Sign with specific GPG/SSH key
396
+ - `--security-scan` - Scan commit for secrets, vulnerabilities, suspicious patterns
397
+
398
+ #### Issue Tracking
399
+
400
+ - `--auto-ticket` - Extract ticket number from branch name (e.g., feature/PROJ-123-foo)
401
+ - `--ticket=<number>` - Manually specify ticket/issue number
402
+ - `--update-tracker` - Update issue tracker status (In Progress → In Review)
403
+
404
+ #### Templates
405
+
406
+ - `--template=<name>` - Use project-specific commit template from `.commitrc.json`
407
+ - `--template-var <key>=<value>` - Set template variable value
408
+
409
+ #### Interactive Mode
410
+
411
+ - `--interactive` - Review and edit AI-generated messages before committing
412
+ - `--dry-run` - Show what would be committed without executing
413
+ - `--preview` - Preview commit message and impact analysis
414
+
415
+ ### Git Status
416
+
417
+ Current repository state will be automatically analyzed.
418
+
419
+ ## Process Overview
420
+
421
+ The commit command follows a **staged pipeline** that orchestrates the following workflow:
422
+
423
+ ### Pipeline Stages
424
+
425
+ **1. Context Analysis** (`context` stage)
426
+
427
+ - Analyze git status and identify changed files
428
+ - Load commit templates (if specified)
429
+ - Extract ticket information from branch name (if enabled)
430
+ - Analyze change scope (type, areas, breaking changes, risk)
431
+
432
+ **2. Quality Review** (`review` stage - parallel)
433
+
434
+ - Generate AI-powered commit insights (if enabled)
435
+ - Quality scoring, impact analysis, security scanning
436
+ - Provide recommendations for improvement
437
+
438
+ **3. Strategy & Generation** (`code` stage)
439
+
440
+ - Determine commit strategy (single vs split commits)
441
+ - Calculate version bump (if enabled)
442
+ - Generate conventional commit messages
443
+ - Interactive review (if enabled)
444
+ - Stage files and execute commits
445
+ - Create version tags (if enabled)
446
+
447
+ **4. Documentation** (`documentation` stage)
448
+
449
+ - Update CHANGELOG.md (if enabled)
450
+
451
+ **5. Final Verification** (`review` stage)
452
+
453
+ - Verify commits created successfully
454
+ - Validate message format compliance
455
+ - Display comprehensive summary
456
+ - Provide next steps
457
+
458
+ ### Key Features
459
+
460
+ - **Automated Message Generation**: AI-generated conventional commit messages
461
+ - **Smart Commit Splitting**: Automatically groups changes into logical commits
462
+ - **Semantic Versioning**: Auto-calculates and applies version bumps
463
+ - **Changelog Management**: Keeps CHANGELOG.md up-to-date automatically
464
+ - **Quality Insights**: AI-powered analysis with recommendations
465
+ - **Security Scanning**: Detects secrets, vulnerabilities, and suspicious patterns
466
+ - **Interactive Mode**: Human review and editing before commit
467
+ - **Template Support**: Project-specific commit templates
468
+ - **Issue Tracking**: Auto-links commits to tickets/issues
469
+
470
+ ### Process Flow
471
+
472
+ ```mermaid
473
+ flowchart TD
474
+ A[Analyze Git Status] --> B[Analyze Change Scope]
475
+ B --> C{Insights Enabled?}
476
+ C -- YES --> D[Generate Insights]
477
+ C -- NO --> E[Determine Strategy]
478
+ D --> E
479
+ E --> F[Generate Messages]
480
+ F --> G{Interactive?}
481
+ G -- YES --> H[User Review]
482
+ G -- NO --> I[Stage & Commit]
483
+ H --> I
484
+ I --> J{Version & Tag?}
485
+ J -- YES --> K[Create Tag & Update Changelog]
486
+ J -- NO --> L[Verify Commits]
487
+ K --> L
488
+ L --> M[Display Summary]
489
+ ```
490
+
491
+ **Note**: All detailed instructions for each stage are defined in the individual prompts within the pipeline. The command orchestrates the flow, while prompts contain the specific implementation logic.
492
+
493
+ ## Error Handling
494
+
495
+ ### No Changes to Commit
496
+
497
+ ```plaintext
498
+ ⚠️ No changes detected to commit.
499
+ Working tree is clean.
500
+ ```
501
+
502
+ **Resolution:** Make code changes first, then run commit command.
503
+
504
+ ### Commit Message Validation Failed
505
+
506
+ ```plaintext
507
+ ❌ Commit message does not follow Conventional Commits format:
508
+ "Updated files"
509
+
510
+ Expected format: <type>(<scope>): <description>
511
+ Example: feat(auth): add OAuth2 support
512
+ ```
513
+
514
+ **Resolution:** AI will regenerate message following standards.
515
+
516
+ ### Pre-commit Hooks Failed
517
+
518
+ ```plaintext
519
+ ❌ Pre-commit hooks failed. Commit aborted.
520
+
521
+ Linting errors:
522
+ - src/auth/oauth.ts:45 - Unused variable 'token'
523
+
524
+ Options:
525
+ 1. Fix errors and commit again
526
+ 2. Use --no-verify to skip hooks (not recommended)
527
+ ```
528
+
529
+ **Resolution:** Fix errors or use `--no-verify` if intentional.
530
+
531
+ ### Merge Conflicts Detected
532
+
533
+ ```plaintext
534
+ ❌ Cannot commit: unresolved merge conflicts detected
535
+
536
+ Conflicting files:
537
+ - src/auth/oauth.ts
538
+
539
+ Resolve conflicts first, then commit.
540
+ ```
541
+
542
+ **Resolution:** Resolve conflicts manually, then run commit command.
543
+
544
+ ## Examples
545
+
546
+ ### Example 1: Simple Feature Commit
547
+
548
+ **Input:**
549
+
550
+ ```bash
551
+ commit
552
+ ```
553
+
554
+ **Analysis:**
555
+
556
+ - Changed: `src/auth/login.ts`, `src/auth/validation.ts`
557
+ - Type: Feature
558
+ - Scope: auth
559
+
560
+ **Output:**
561
+
562
+ ```plaintext
563
+ ✅ Created commit: feat(auth): add email validation for login
564
+
565
+ a4f7c9e feat(auth): add email validation for login
566
+ - src/auth/login.ts | 25 ++++++++++++++++++++
567
+ - src/auth/validation.ts | 15 ++++++++++++
568
+ ```
569
+
570
+ ### Example 3: Breaking Change
571
+
572
+ **Input:**
573
+
574
+ ```bash
575
+ commit --breaking
576
+ ```
577
+
578
+ **Output:**
579
+
580
+ ```plaintext
581
+ ✅ Created commit: feat(api)!: redesign authentication endpoints
582
+
583
+ BREAKING CHANGE: /api/login endpoint now requires JWT tokens instead of session cookies
584
+
585
+ e5f9a2b feat(api)!: redesign authentication endpoints
586
+ - src/api/auth.ts | 145 +++++++++++++++++++++++++++++++-------------
587
+ ```
588
+
589
+ ### Example 4: Split Commits (Auto-detected)
590
+
591
+ **Input:**
592
+
593
+ ```bash
594
+ commit
595
+ ```
596
+
597
+ **Analysis:**
598
+
599
+ - Multiple areas: auth + payments
600
+ - Strategy: Split
601
+
602
+ **Output:**
603
+
604
+ ```plaintext
605
+ ✅ Created 2 commits:
606
+
607
+ c6d8e3a feat(auth): implement OAuth2 refresh tokens
608
+ - src/auth/oauth.ts | 95 ++++++++++++++++++++++++
609
+ - src/auth/tokens.ts | 50 +++++++++++--
610
+
611
+ f7a9b4c feat(payments): add Stripe webhook handlers
612
+ - src/payments/webhooks.ts | 120 ++++++++++++++++++++++++++++++
613
+ ```
614
+
615
+ ## Integration with Workflow
616
+
617
+ ### Position in Development Lifecycle
618
+
619
+ ```mermaid
620
+ flowchart LR
621
+ A[review-functional] --> B{Reviews passed?}
622
+ B -- YES --> C[commit]
623
+ C --> D[create-pr]
624
+ B -- NO --> E[implement]
625
+ E --> A
626
+ ```
627
+
628
+ ### Typical Usage Patterns
629
+
630
+ #### Pattern 1: After Implementation
631
+
632
+ ```bash
633
+ implement "Add user authentication"
634
+ test
635
+ review-code
636
+ review-functional
637
+ commit # ← Executed here
638
+ create-pr
639
+ ```
640
+
641
+ #### Pattern 2: Incremental Commits
642
+
643
+ ```bash
644
+ implement step-by-step "Large feature"
645
+ commit # ← After first step
646
+ implement step-by-step
647
+ commit # ← After second step
648
+ # ... continue ...
649
+ create-pr
650
+ ```
651
+
652
+ #### Pattern 3: Fix and Recommit
653
+
654
+ ```bash
655
+ review-code # Found issues
656
+ implement "Fix review feedback"
657
+ commit
658
+ create-pr
659
+ ```
660
+
661
+ ## Best Practices
662
+
663
+ ### ✅ DO
664
+
665
+ - **Commit frequently** - Small, atomic commits are better than large ones
666
+ - **Write descriptive messages** - Future you will thank present you
667
+ - **Follow conventions** - Consistent format improves team collaboration
668
+ - **Review before committing** - Use `git diff` to verify changes
669
+ - **Group related changes** - Keep feature and tests together (if small)
670
+ - **Reference issues** - Link commits to tracking system
671
+
672
+ ### ❌ DON'T
673
+
674
+ - **Commit WIP code** - Unless on feature branch with clear intent
675
+ - **Mix concerns** - Don't combine feature + refactor in one commit
676
+ - **Skip commit messages** - "update" or "changes" are not helpful
677
+ - **Commit generated files** - Unless they're meant to be versioned
678
+ - **Commit secrets** - Always review for sensitive data
679
+ - **Break the build** - Ensure each commit is buildable
680
+
681
+ ## Quality Checklist
682
+
683
+ Before finalizing commits, verify:
684
+
685
+ - [ ] Commit messages follow Conventional Commits format
686
+ - [ ] Subject lines are < 72 characters
687
+ - [ ] Changes are atomic (one logical unit per commit)
688
+ - [ ] No debug code or commented-out code
689
+ - [ ] No sensitive data (API keys, passwords, tokens)
690
+ - [ ] Linting passes (or --no-verify justified)
691
+ - [ ] Tests pass locally
692
+ - [ ] Breaking changes are properly flagged
693
+ - [ ] Related issues are referenced in footer
694
+
695
+ ## Performance Considerations
696
+
697
+ - **Fast operations** - Analysis and commit creation should take < 5 seconds
698
+ - **Large changesets** - Split into logical commits automatically
699
+ - **Hook timeouts** - Pre-commit hooks should complete within 30 seconds
700
+ - **Diff analysis** - Optimize file reading for large diffs (> 10 files)
701
+
702
+ ## Document Generation
703
+
704
+ **File** (optional): `CHANGELOG.md` entry
705
+
706
+ **Ask user**: "Would you like me to update `CHANGELOG.md` with this release?" (only if `--update-changelog` or version bump)
707
+
708
+ ## Command Output Summary
709
+
710
+ Print the following summary at command completion:
711
+
712
+ **For successful commit:**
713
+
714
+ ```markdown
715
+ ## ✅ Commit Created
716
+
717
+ **Commits**: [N] commit(s)
718
+ **Hash**: [short-hash]
719
+
720
+ ### Commit Summary
721
+ ```
722
+
723
+ [type]([scope]): [description]
724
+
725
+ ```
726
+
727
+ ### Files Committed
728
+ - [file1.ts] | +[N] -[N]
729
+ - [file2.ts] | +[N] -[N]
730
+
731
+ ### Quality Insights
732
+ - ✅ Linting: Pass
733
+ - ✅ Security: No issues
734
+ - ✅ Conventional format: Valid
735
+
736
+ ### Documents Updated
737
+ → `CHANGELOG.md` (if --update-changelog)
738
+
739
+ ### Next Step
740
+ → `/create-pr` to create pull request
741
+ ```
742
+
743
+ **For version bump:**
744
+
745
+ ```markdown
746
+ ## ✅ Commit & Version Created
747
+
748
+ **Commits**: [N] commit(s)
749
+ **Version**: [old-version] → [new-version]
750
+ **Tag**: v[new-version]
751
+
752
+ ### Commit Summary
753
+ ```
754
+
755
+ [type]([scope]): [description]
756
+
757
+ ```
758
+
759
+ ### Version Bump Reason
760
+ - [Type of changes that triggered bump]
761
+
762
+ ### Documents Updated
763
+ → `CHANGELOG.md` (updated with release notes)
764
+ → `package.json` (version bumped)
765
+
766
+ ### Next Step
767
+ → `/create-pr` to create pull request
768
+ ```
769
+
770
+ **For commit failure:**
771
+
772
+ ```markdown
773
+ ## ❌ Commit Failed
774
+
775
+ **Reason**: [Pre-commit hook failure | Validation error | etc.]
776
+
777
+ ### Error Details
778
+
779
+ [Error message]
780
+
781
+ ### Suggested Fix
782
+
783
+ - [How to resolve the issue]
784
+
785
+ ### Next Step
786
+
787
+ → Fix issues and re-run `/commit`
788
+ ```