Skip to content

Add repository audit workflow for identifying agentic workflow opportunities#10226

Merged
pelikhan merged 2 commits intomainfrom
copilot/audit-github-actions-repo
Jan 16, 2026
Merged

Add repository audit workflow for identifying agentic workflow opportunities#10226
pelikhan merged 2 commits intomainfrom
copilot/audit-github-actions-repo

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Creates an on-demand workflow that audits repositories to identify automation opportunities using agentic workflows. Designed for FStar but works with any GitHub repository.

Implementation

Workflow structure:

  • Manual trigger with configurable repository input (default: FStarLang/FStar)
  • 45-minute timeout for comprehensive analysis across 6 phases
  • Cache memory persists audit results for trend analysis
  • Outputs detailed GitHub Discussion with prioritized recommendations

Analysis phases:

  1. Repository metadata and contributor analysis via GitHub API
  2. Source code structure, patterns, and technical debt scanning
  3. GitHub Actions workflow health and efficiency assessment
  4. Issue history pattern recognition and categorization
  5. Opportunity identification (daily improvers, event-driven automation)
  6. Implementation roadmap with effort/impact prioritization

Key features:

  • Clones target repo for deep inspection (structure, docs, build files, code metrics)
  • Generates 5-8 prioritized opportunities with implementation sketches for top 3
  • Repository-specific recommendations (not generic advice)
  • Creates single Discussion per run (closes older audits)

Usage

# Audit default repository (FStar)
gh workflow run repo-audit-analyzer.yml

# Audit any repository
gh workflow run repo-audit-analyzer.yml --field repository=owner/repo

Files

  • .github/workflows/repo-audit-analyzer.md - Workflow definition (951 bytes)
  • .github/agentics/repo-audit-analyzer.md - Agent prompt, editable without recompilation (22 KB)
  • .github/workflows/repo-audit-analyzer.lock.yml - Compiled workflow (54 KB)

Output Structure

Discussion includes:

  • Repository overview (language, contributors, structure)
  • GitHub Actions health metrics and inefficiencies
  • Issue pattern analysis with automation potential
  • Prioritized workflow opportunities (High/Medium/Future)
  • Implementation roadmap (Quick wins → High impact → Long-term)
  • Code quality insights and technical debt indicators
Original prompt

Create an agentic workflow that audits an existing repository and it action workflows and identify potential productivity / improvements using agentic workflows.

  • research the project
  • do a deep survey of existing github actions
  • identify source code patterns
  • inspect issue history

Apply patterns to discover daily improvers.

Keep a cache memory to store results as the search will be done repreatidley

Apply analyzis to https://github.com/FStarLang/FStar

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@pelikhan
Copy link
Contributor

@copilot ensure the project related handler are handled together, the GitHub_token related handlers, the then the assign to agent

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Create agentic workflow for repository audit and analysis Add repository audit workflow for identifying agentic workflow opportunities Jan 16, 2026
Copilot AI requested a review from pelikhan January 16, 2026 07:01
@pelikhan pelikhan marked this pull request as ready for review January 16, 2026 07:04
@pelikhan pelikhan merged commit f8b5d0f into main Jan 16, 2026
1 check failed
@pelikhan pelikhan deleted the copilot/audit-github-actions-repo branch January 16, 2026 07:04
Copilot stopped work on behalf of pelikhan due to an error January 16, 2026 07:05
Mossaka pushed a commit that referenced this pull request Jan 16, 2026
The repo-audit-analyzer workflow has expression validation issues where
the parser incorrectly extracts bash pipe syntax as unauthorized expressions.
This appears to be a bug in the expression parser when handling multi-line
bash commands containing GitHub expressions.

Temporarily renaming to .md.skip to unblock the build while we investigate
and fix the parser issue separately.

The workflow was recently added in PR #10226 and this issue prevents
successful compilation of all workflows.

Related to repo-audit-analyzer expression validation error

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Mossaka pushed a commit that referenced this pull request Jan 17, 2026
The repo-audit-analyzer workflow has expression validation issues where
the parser incorrectly extracts bash pipe syntax as unauthorized expressions.
This appears to be a bug in the expression parser when handling multi-line
bash commands containing GitHub expressions.

Temporarily renaming to .md.skip to unblock the build while we investigate
and fix the parser issue separately.

The workflow was recently added in PR #10226 and this issue prevents
successful compilation of all workflows.

Related to repo-audit-analyzer expression validation error

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Mossaka pushed a commit that referenced this pull request Jan 17, 2026
The repo-audit-analyzer workflow has expression validation issues where
the parser incorrectly extracts bash pipe syntax as unauthorized expressions.
This appears to be a bug in the expression parser when handling multi-line
bash commands containing GitHub expressions.

Temporarily renaming to .md.skip to unblock the build while we investigate
and fix the parser issue separately.

The workflow was recently added in PR #10226 and this issue prevents
successful compilation of all workflows.

Related to repo-audit-analyzer expression validation error

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants