Bismillah! I'll commit and push the current changes to the remote repository.
Arguments: [commit message] (optional)
Using with Thinking Mode
If an extended-reasoning mode is available in your environment, use it for this task. When running with extended reasoning, I will:
- Analyze each changed file thoroughly before staging
- Review the logical grouping of changes for better commit organization
- Consider if changes should be split into multiple commits for clarity
- Examine the impact and relationships between modified files
- Craft more descriptive commit messages based on the deeper analysis
- Verify that all changes align with the intended purpose
This thoughtful approach ensures higher quality commits with better documentation and logical organization.
Let me:
Check repository status
- Verify we're in a git repository
- Check for staged and unstaged changes
- Review current branch status
Analyze version bump necessity
- Examine changes to determine if version increment is needed
- Analyze file modifications, additions, and deletions
- Check for breaking changes, new features, or bug fixes
- Review package.json, Cargo.toml, or similar version files
- Provide intelligent suggestions based on change analysis:
- Major bump (X.0.0): Breaking changes, removed APIs, incompatible changes
- Minor bump (0.X.0): New features, added APIs, backward-compatible enhancements
- Patch bump (0.0.X): Bug fixes, small improvements, security patches
- No bump needed: Documentation, formatting, tests, internal refactoring
- Consider conventional commit patterns in existing history
- Alert user if version bump is recommended with specific reasoning
Version Bump Detection Logic:
- Scan git diff for API signature changes, removed exports, or breaking modifications
- Check for new public functions, classes, or modules (minor bump indicators)
- Look for bug fix patterns in code changes (patch bump indicators)
- Analyze package.json/Cargo.toml/pyproject.toml for dependency changes
- Review CHANGELOG.md or similar files for version patterns
- Examine file extensions (.js, .ts, .py, .rs, .go) vs documentation (.md, .txt)
- Parse conventional commits (feat:, fix:, BREAKING CHANGE:) if present
- Consider migration files, schema changes, or configuration updates
- Evaluate test additions/changes as feature indicators
- Check for security-related fixes requiring immediate patch bumps
Documentation Impact Analysis
- Analyze staged changes to identify potential documentation impacts
- Discover related documentation files and cross-references
- Detect outdated content that needs updating
- Suggest specific documentation improvements
Documentation Discovery Logic:
- Find README.md, CHANGELOG.md, docs/ folders, *.md files in project
- Locate API documentation, JSDoc, docstrings, inline comments
- Identify configuration files (package.json, Config.toml, etc.)
- Check for example files, tutorials, and usage guides
- Map relationships between code files and their documentation
Outdated Content Detection:
- Function/Class/API Changes: Scan docs for references to renamed/deleted functions, classes, or APIs
- Import/Export Changes: Find documentation examples using old import paths or module names
- Configuration Changes: Detect outdated config examples, environment variables, or settings
- File Path Changes: Identify broken file path references in documentation
- Version References: Find hardcoded version numbers that need updating
- Installation Instructions: Check if install commands, dependencies, or setup steps changed
- Code Examples: Verify that code snippets still work with current implementation
- API Signatures: Check for function signatures that changed in examples
- CLI Commands: Validate command-line examples against actual script/tool changes
- Feature Descriptions: Ensure feature lists match actual implemented functionality
Documentation Analysis Rules:
High Priority Updates:
- Broken code examples → Fix immediately
- Non-existent function references → Remove/update
- Incorrect API signatures → Update signatures
- Wrong file paths → Fix paths
- Outdated installation steps → Update instructions
Medium Priority Updates:
- Version number mismatches → Update versions
- Missing new features → Add documentation
- Deprecated feature mentions → Mark as deprecated
- Outdated configuration examples → Update configs
Low Priority Updates:
- Minor wording improvements → Suggest enhancements
- Additional examples → Propose new examples
- Cross-reference opportunities → Suggest links
Intelligent Content Mapping:
- For each modified code file, find documentation that references it
- Extract function/class names from code changes and search docs
- Check import statements and find corresponding documentation
- Analyze configuration changes and find related config docs
- Map CLI argument changes to command documentation
- Link test file changes to testing documentation
Comprehensive Change Decision Point
- Present complete analysis with actionable recommendations
- Show version bump analysis AND documentation impact assessment
- Provide user with clear options for comprehensive updates
Decision Matrix:
Scenario A: Version bump needed + Documentation outdated
→ "🔍 **Comprehensive Update Needed**"
→ "Version: X.Y.Z → A.B.C | Documentation: N outdated references found"
→ Options: 1) Fix all now, 2) Version bump only, 3) Docs only, 4) Commit as-is
Scenario B: Version bump needed + Documentation current
→ "🔍 **Version Bump Detected**: X.Y.Z → A.B.C | Documentation appears current"
→ Options: 1) Bump version first, 2) Commit as-is
Scenario C: No version bump + Documentation outdated
→ "📚 **Documentation Updates Needed**: N outdated references found"
→ Options: 1) Update docs first, 2) Commit as-is
Scenario D: No version bump + Documentation current
→ Proceed directly to commit
Smart Recommendations:
- If breaking changes detected: "⚠️ BREAKING CHANGE: Consider major version bump + comprehensive doc review"
- If new features added: "✨ NEW FEATURES: Minor version bump + feature documentation recommended"
- If API examples outdated: "🔧 API EXAMPLES: Update code examples before release"
- If installation changed: "📦 INSTALLATION: Update setup instructions for users"
Execute Selected Actions (based on user choice)
- Option 1 - Fix All: Update version + documentation + commit + push
- Option 2 - Version Only: Bump version + commit + push (leave docs for later)
- Option 3 - Docs Only: Update documentation + commit + push (leave version for later)
- Option 4 - Commit As-Is: Direct commit + push (user accepts current state)
Documentation Update Execution (when selected)
- Automatically fix high-priority documentation issues
- Update broken code examples with working implementations
- Fix incorrect API signatures and function references
- Update file paths and import statements
- Correct version references and installation instructions
- Present medium/low priority suggestions for user review
Smart Commit Message Generation
- Analyze all changes to create comprehensive commit message
- Include version bump information if applicable
- Summarize documentation updates if performed
- Follow conventional commit format when appropriate
- Use provided argument as override if specified
Push to remote (only after successful commit)
- Push current branch to remote repository
- Handle upstream branch setup if needed
- Dual-push: If configured,
git push automatically syncs to both GitHub and GitLab
Comprehensive Completion Report
- Show final status and remote sync confirmation
- Summarize what was updated (code + version + docs)
- Highlight any remaining recommendations for future commits
- Provide links to updated documentation if applicable
Implementation Steps
Step 1: Repository Analysis
- Check git repository status and analyze staged changes
- Identify modified, added, and deleted files
- Extract function/class/API changes from diffs
Step 2: Version Bump Analysis
Version Bump Rules:
- MAJOR (X.0.0): Breaking changes, API removal, incompatible modifications
- MINOR (0.X.0): New features, API additions, backward-compatible enhancements
- PATCH (0.0.X): Bug fixes, small improvements, security patches
- NONE: Documentation only, formatting, comments, tests only
Smart Detection:
- API signature changes → MAJOR
- New public functions/features → MINOR
- Bug fixes in logic → PATCH
- install.sh enhancements → MINOR
- Configuration changes → MINOR/PATCH
- Documentation only → NONE
Step 3: Documentation Impact Analysis
Discovery Process:
1. Find all documentation files (*.md, docs/, inline comments)
2. Map code changes to related documentation
3. Extract references (functions, imports, configs, examples)
4. Cross-reference against actual changes
Outdated Content Detection:
- Broken function/API references → HIGH PRIORITY
- Incorrect code examples → HIGH PRIORITY
- Wrong file paths → HIGH PRIORITY
- Outdated version numbers → MEDIUM PRIORITY
- Missing new features → MEDIUM PRIORITY
- Minor improvements → LOW PRIORITY
Intelligent Mapping:
- Code file changes → Related documentation files
- Function name changes → Documentation references
- Configuration changes → Config documentation
- CLI changes → Command documentation
Step 4: Comprehensive Decision Point
Present complete analysis with 4 scenarios:
- A) Version bump + Documentation outdated → Full update recommended
- B) Version bump + Documentation current → Version-only update
- C) No version bump + Documentation outdated → Documentation-only update
- D) No version bump + Documentation current → Direct commit
Step 5: Execute User Choice
- Fix All: Version bump + documentation updates + commit + push
- Version Only: Version bump + commit + push (docs later)
- Docs Only: Documentation updates + commit + push (version later)
- Commit As-Is: Direct commit + push (accept current state)
Step 6: Smart Documentation Updates (when selected)
- Automatically fix high-priority issues (broken references, examples)
- Update version numbers and file paths
- Suggest medium/low priority improvements
- Validate all code examples work with current implementation
Step 7: Intelligent Commit Message
- Combine all changes into meaningful commit message
- Include version bump details if applicable
- Summarize documentation updates if performed
- Use conventional commit format when appropriate
Step 8: Completion and Reporting
- Commit and push changes
- Provide comprehensive summary of all updates
- Highlight remaining recommendations for future commits
This enhanced approach ensures every commit maintains comprehensive consistency between code, version, and documentation - creating a more maintainable and professional codebase. InshaAllah, this will significantly improve the quality and completeness of all commits.
1---2name: git-tools-commit3description: Commit and push current changes to remote repository4---56Bismillah! I'll commit and push the current changes to the remote repository.78Arguments: [commit message] (optional)910## Using with Thinking Mode1112If an extended-reasoning mode is available in your environment, use it for this task. When running with extended reasoning, I will:1314- Analyze each changed file thoroughly before staging15- Review the logical grouping of changes for better commit organization16- Consider if changes should be split into multiple commits for clarity17- Examine the impact and relationships between modified files18- Craft more descriptive commit messages based on the deeper analysis19- Verify that all changes align with the intended purpose2021This thoughtful approach ensures higher quality commits with better documentation and logical organization.2223Let me:24251. **Check repository status**26 - Verify we're in a git repository27 - Check for staged and unstaged changes28 - Review current branch status29302. **Analyze version bump necessity**31 - Examine changes to determine if version increment is needed32 - Analyze file modifications, additions, and deletions33 - Check for breaking changes, new features, or bug fixes34 - Review package.json, Cargo.toml, or similar version files35 - Provide intelligent suggestions based on change analysis:36 - **Major bump** (X.0.0): Breaking changes, removed APIs, incompatible changes37 - **Minor bump** (0.X.0): New features, added APIs, backward-compatible enhancements38 - **Patch bump** (0.0.X): Bug fixes, small improvements, security patches39 - **No bump needed**: Documentation, formatting, tests, internal refactoring40 - Consider conventional commit patterns in existing history41 - Alert user if version bump is recommended with specific reasoning4243 **Version Bump Detection Logic:**44 - Scan git diff for API signature changes, removed exports, or breaking modifications45 - Check for new public functions, classes, or modules (minor bump indicators)46 - Look for bug fix patterns in code changes (patch bump indicators)47 - Analyze package.json/Cargo.toml/pyproject.toml for dependency changes48 - Review CHANGELOG.md or similar files for version patterns49 - Examine file extensions (.js, .ts, .py, .rs, .go) vs documentation (.md, .txt)50 - Parse conventional commits (feat:, fix:, BREAKING CHANGE:) if present51 - Consider migration files, schema changes, or configuration updates52 - Evaluate test additions/changes as feature indicators53 - Check for security-related fixes requiring immediate patch bumps54553. **Documentation Impact Analysis**56 - Analyze staged changes to identify potential documentation impacts57 - Discover related documentation files and cross-references58 - Detect outdated content that needs updating59 - Suggest specific documentation improvements6061 **Documentation Discovery Logic:**62 - Find README.md, CHANGELOG.md, docs/ folders, *.md files in project63 - Locate API documentation, JSDoc, docstrings, inline comments64 - Identify configuration files (package.json, Config.toml, etc.)65 - Check for example files, tutorials, and usage guides66 - Map relationships between code files and their documentation6768 **Outdated Content Detection:**69 - **Function/Class/API Changes**: Scan docs for references to renamed/deleted functions, classes, or APIs70 - **Import/Export Changes**: Find documentation examples using old import paths or module names71 - **Configuration Changes**: Detect outdated config examples, environment variables, or settings72 - **File Path Changes**: Identify broken file path references in documentation73 - **Version References**: Find hardcoded version numbers that need updating74 - **Installation Instructions**: Check if install commands, dependencies, or setup steps changed75 - **Code Examples**: Verify that code snippets still work with current implementation76 - **API Signatures**: Check for function signatures that changed in examples77 - **CLI Commands**: Validate command-line examples against actual script/tool changes78 - **Feature Descriptions**: Ensure feature lists match actual implemented functionality7980 **Documentation Analysis Rules:**8182 ```83 High Priority Updates:84 - Broken code examples → Fix immediately85 - Non-existent function references → Remove/update86 - Incorrect API signatures → Update signatures87 - Wrong file paths → Fix paths88 - Outdated installation steps → Update instructions8990 Medium Priority Updates:91 - Version number mismatches → Update versions92 - Missing new features → Add documentation93 - Deprecated feature mentions → Mark as deprecated94 - Outdated configuration examples → Update configs9596 Low Priority Updates:97 - Minor wording improvements → Suggest enhancements98 - Additional examples → Propose new examples99 - Cross-reference opportunities → Suggest links100 ```101102 **Intelligent Content Mapping:**103 - For each modified code file, find documentation that references it104 - Extract function/class names from code changes and search docs105 - Check import statements and find corresponding documentation106 - Analyze configuration changes and find related config docs107 - Map CLI argument changes to command documentation108 - Link test file changes to testing documentation1091104. **Comprehensive Change Decision Point**111 - Present complete analysis with actionable recommendations112 - Show version bump analysis AND documentation impact assessment113 - Provide user with clear options for comprehensive updates114115 **Decision Matrix:**116117 ```118 Scenario A: Version bump needed + Documentation outdated119 → "🔍 **Comprehensive Update Needed**"120 → "Version: X.Y.Z → A.B.C | Documentation: N outdated references found"121 → Options: 1) Fix all now, 2) Version bump only, 3) Docs only, 4) Commit as-is122123 Scenario B: Version bump needed + Documentation current 124 → "🔍 **Version Bump Detected**: X.Y.Z → A.B.C | Documentation appears current"125 → Options: 1) Bump version first, 2) Commit as-is126127 Scenario C: No version bump + Documentation outdated128 → "📚 **Documentation Updates Needed**: N outdated references found"129 → Options: 1) Update docs first, 2) Commit as-is130131 Scenario D: No version bump + Documentation current132 → Proceed directly to commit133 ```134135 **Smart Recommendations:**136 - If breaking changes detected: "⚠️ BREAKING CHANGE: Consider major version bump + comprehensive doc review"137 - If new features added: "✨ NEW FEATURES: Minor version bump + feature documentation recommended"138 - If API examples outdated: "🔧 API EXAMPLES: Update code examples before release"139 - If installation changed: "📦 INSTALLATION: Update setup instructions for users"1401415. **Execute Selected Actions** (based on user choice)142 - **Option 1 - Fix All**: Update version + documentation + commit + push143 - **Option 2 - Version Only**: Bump version + commit + push (leave docs for later)144 - **Option 3 - Docs Only**: Update documentation + commit + push (leave version for later)145 - **Option 4 - Commit As-Is**: Direct commit + push (user accepts current state)1461476. **Documentation Update Execution** (when selected)148 - Automatically fix high-priority documentation issues149 - Update broken code examples with working implementations150 - Fix incorrect API signatures and function references151 - Update file paths and import statements152 - Correct version references and installation instructions153 - Present medium/low priority suggestions for user review1541557. **Smart Commit Message Generation**156 - Analyze all changes to create comprehensive commit message157 - Include version bump information if applicable158 - Summarize documentation updates if performed159 - Follow conventional commit format when appropriate160 - Use provided argument as override if specified1611628. **Push to remote** (only after successful commit)163 - Push current branch to remote repository164 - Handle upstream branch setup if needed165 - **Dual-push**: If configured, `git push` automatically syncs to both GitHub and GitLab1661679. **Comprehensive Completion Report**168 - Show final status and remote sync confirmation169 - Summarize what was updated (code + version + docs)170 - Highlight any remaining recommendations for future commits171 - Provide links to updated documentation if applicable172173## Implementation Steps174175**Step 1:** Repository Analysis176177- Check git repository status and analyze staged changes178- Identify modified, added, and deleted files179- Extract function/class/API changes from diffs180181**Step 2:** Version Bump Analysis182183```184Version Bump Rules:185- MAJOR (X.0.0): Breaking changes, API removal, incompatible modifications186- MINOR (0.X.0): New features, API additions, backward-compatible enhancements 187- PATCH (0.0.X): Bug fixes, small improvements, security patches188- NONE: Documentation only, formatting, comments, tests only189190Smart Detection:191- API signature changes → MAJOR192- New public functions/features → MINOR193- Bug fixes in logic → PATCH194- install.sh enhancements → MINOR195- Configuration changes → MINOR/PATCH196- Documentation only → NONE197```198199**Step 3:** Documentation Impact Analysis200201```202Discovery Process:2031. Find all documentation files (*.md, docs/, inline comments)2042. Map code changes to related documentation2053. Extract references (functions, imports, configs, examples)2064. Cross-reference against actual changes207208Outdated Content Detection:209- Broken function/API references → HIGH PRIORITY210- Incorrect code examples → HIGH PRIORITY 211- Wrong file paths → HIGH PRIORITY212- Outdated version numbers → MEDIUM PRIORITY213- Missing new features → MEDIUM PRIORITY214- Minor improvements → LOW PRIORITY215216Intelligent Mapping:217- Code file changes → Related documentation files218- Function name changes → Documentation references219- Configuration changes → Config documentation220- CLI changes → Command documentation221```222223**Step 4:** Comprehensive Decision Point224Present complete analysis with 4 scenarios:225226- A) Version bump + Documentation outdated → Full update recommended227- B) Version bump + Documentation current → Version-only update228- C) No version bump + Documentation outdated → Documentation-only update 229- D) No version bump + Documentation current → Direct commit230231**Step 5:** Execute User Choice232233- **Fix All**: Version bump + documentation updates + commit + push234- **Version Only**: Version bump + commit + push (docs later)235- **Docs Only**: Documentation updates + commit + push (version later)236- **Commit As-Is**: Direct commit + push (accept current state)237238**Step 6:** Smart Documentation Updates (when selected)239240- Automatically fix high-priority issues (broken references, examples)241- Update version numbers and file paths242- Suggest medium/low priority improvements243- Validate all code examples work with current implementation244245**Step 7:** Intelligent Commit Message246247- Combine all changes into meaningful commit message248- Include version bump details if applicable249- Summarize documentation updates if performed250- Use conventional commit format when appropriate251252**Step 8:** Completion and Reporting253254- Commit and push changes255- Provide comprehensive summary of all updates256- Highlight remaining recommendations for future commits257258This enhanced approach ensures every commit maintains comprehensive consistency between code, version, and documentation - creating a more maintainable and professional codebase. InshaAllah, this will significantly improve the quality and completeness of all commits.259