Skip to content

[refactoring] Extract git bash navigation tools into shared/git-bash-tools.md #25450

Closed as not planned

Description

@github-actions

Skill Overview

Eight or more workflows that perform git history and code change analysis independently define nearly-identical bash tool allowlists containing git log, git diff, git show, and common filesystem navigation commands (find, grep, cat, wc, etc.). Extracting these into a shared component would eliminate ~10-15 lines of repetition per workflow and ensure consistent permissions across all code-analysis agents.

Current Usage

This pattern appears in the following workflows:

  • architecture-guardian.md (lines ~21-33): full git log:*, git diff:*, git show:*, find:*, wc:*, grep:*, cat:*, head:*, awk:*, sed:*, sort:*
  • breaking-change-checker.md (lines ~21-27): git diff:*, git log:*, git show:*, cat:*, grep:*
  • test-quality-sentinel.md (lines ~23-33): git diff:*, git show:*, git log:*, grep:*, find:*, cat:*, wc:*, awk:*, sed:*
  • design-decision-gate.md (lines ~17-26): git diff:*, git log:*, git show:*, cat:*, grep:*, ls:*, wc:*, find:*
  • daily-compiler-quality.md (lines ~18-23): specific git commands with wildcards
  • copilot-cli-deep-research.md: git commands with wildcards
  • daily-mcp-concurrency-analysis.md: git commands with wildcards
  • mergefest.md: git analysis commands

Proposed Shared Component

File: .github/workflows/shared/git-bash-tools.md

Configuration:

---
# Git and filesystem navigation tools for code analysis workflows.
# Provides bash allowlist for git history access and standard file navigation.
tools:
  bash:
    - "git log:*"
    - "git diff:*"
    - "git show:*"
    - "find:*"
    - "grep:*"
    - "cat:*"
    - "wc:*"
    - "head:*"
    - "awk:*"
    - "sed:*"
    - "sort:*"
    - "echo:*"
    - "ls:*"
---

## Git Navigation Tools

Standard bash tools for analyzing git history and repository source code are available.

### Available Commands

- `git log:*` — browse commit history with any flags
- `git diff:*` — compare commits, branches, or files
- `git show:*` — inspect commit details and file contents at a point in time
- `find:*`, `grep:*`, `cat:*`, `head:*` — filesystem navigation and content search
- `wc:*`, `awk:*`, `sed:*`, `sort:*` — text processing and statistics

Usage Example:

# In a workflow
imports:
  - shared/git-bash-tools.md

Impact

  • Workflows affected: 8+ workflows
  • Lines saved: ~10-15 per workflow, ~80-120 total
  • Maintenance benefit: A single place to audit what git operations are allowed across all code-analysis agents. When adding a new navigation command (e.g. git blame:*), one change propagates everywhere.

Implementation Plan

  1. Create .github/workflows/shared/git-bash-tools.md with the configuration above
  2. Update architecture-guardian.md — replace inline bash allowlist with imports: - shared/git-bash-tools.md
  3. Update breaking-change-checker.md similarly
  4. Update test-quality-sentinel.md similarly
  5. Update design-decision-gate.md similarly
  6. Update daily-compiler-quality.md similarly
  7. Update remaining identified workflows
  8. Run make recompile and verify all lock files regenerate cleanly
  9. Update documentation if any references to per-workflow bash tool config exist

Related Analysis

This recommendation comes from the Workflow Skill Extractor analysis run on 2026-04-09.

Generated by Workflow Skill Extractor · ● 2.6M · ◷

  • expires on Apr 11, 2026, 11:43 AM UTC

Activity

  1. Copilot commented on Apr 9, 2026

    Copilot
    Contributor

    The agent encountered an error and was unable to start working on this issue: This may be caused by a repository ruleset violation. See granting bypass permissions for the agent, or please contact support if the issue persists. (Request id: 2001:376B9B:371E154:DF93345:69D7949C)

  2. github-actions commented on Apr 9, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster has assigned this to Copilot!

    I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot coding agent.

    The Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · ● 423K · ◷

  3. github-actions commented on Apr 11, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-04-11T11:43:32.396Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions