2.9 KiB
2.9 KiB
allowed-tools, description, argument-hint
| allowed-tools | description | argument-hint | |||
|---|---|---|---|---|---|
| Bash, Read, Write, Task | Intelligent commits with hook-aware strategy detection |
|
Commit
Use the git-flow-manager sub-agent to intelligently analyze staging area and project formatting hooks, then execute optimal commit strategy (PARALLEL/COORDINATED/HYBRID) to prevent conflicts while maintaining commit organization. Parse $ARGUMENTS for commit options, run pre-commit checks, analyze changes for atomic splitting, and execute commits with conventional messages.
Variables:
COMMIT_OPTIONS: $ARGUMENTS STRATEGY_MODE: auto-detected COMMIT_COUNT: auto-calculated HOOK_ANALYSIS: auto-performed
Instructions:
- Parse
COMMIT_OPTIONSto extract flags like--no-verifyor custom messages - Use the git-flow-manager sub-agent for comprehensive workflow management with automatic strategy detection
- Auto-detect formatting hook aggressiveness and choose optimal commit strategy
- Run pre-commit checks unless
--no-verifyflag is present - Validate
.gitignoreconfiguration and alert for large files (>1MB) - Auto-stage modified files if none staged, analyze changes for atomic splitting
- Execute commits using detected strategy with conventional messages and emoji
- Include issue references for GitHub/Linear integration when applicable
Workflow:
- Deploy git-flow-manager sub-agent with strategy detection capabilities
- Run
!git status --porcelainto analyze current repository state - Execute formatting hook analysis to determine optimal commit strategy
- Check for
--no-verifyflag inCOMMIT_OPTIONS, skip pre-commit checks if present - Run pre-commit validation:
!pnpm lint,!pnpm build,!pnpm generate:docs - Validate
.gitignoreconfiguration and check for large files - Auto-stage files with
!git add .if no files currently staged - Execute
!git diff --staged --name-statusto analyze staged changes - Analyze changes for atomic commit splitting opportunities
- Execute commits using detected strategy (PARALLEL/COORDINATED/HYBRID)
- Generate conventional commit messages with appropriate emoji from @ai-docs/emoji-commit-ref.yaml
- Include issue references in commit body for automatic linking
- Execute
!git commitwith generated messages - Display commit summary using
!git log --oneline -1
Report:
Intelligent Commit Complete
Strategy: STRATEGY_MODE (auto-detected based on formatting hook analysis)
Files: COMMIT_COUNT commits created and executed
Topic: Hook-aware commit processing with adaptive strategy selection
Key Components:
- Automatic strategy detection preventing formatting hook conflicts
- Conventional commit messages with appropriate emoji
- Pre-commit validation and quality gates
- Atomic commit splitting for logical organization
- GitHub/Linear issue integration
- Clean working directory achieved without conflicts
Relevant Files:
- @~/.claude/agents/git-flow-manager.md
- @ai-docs/emoji-commit-ref.yaml