Skip to content

Added code simplification workflows for GH#26419

Open
dhr-verma wants to merge 12 commits intomicrosoft:mainfrom
dhr-verma:vermadhr/ghawWorkflowsForSimplification
Open

Added code simplification workflows for GH#26419
dhr-verma wants to merge 12 commits intomicrosoft:mainfrom
dhr-verma:vermadhr/ghawWorkflowsForSimplification

Conversation

@dhr-verma
Copy link
Contributor

@dhr-verma dhr-verma commented Feb 11, 2026

Description

GitHub Agentic Workflows (GH AW) are AI powered workflows that leverage tools available in GitHub to create automated workflows. This PR is a POC of sorts where I wish to test the GH AW workflows for code simplication.

These two workflows do the following:

  1. Code simpification: The first workflow looks at PRs over the past 24 hours and creates PRs to "simplify" code. The only available safe_output for this flow is PR generation (if the model decides simplification is needed).
  2. Code de-dupe: The second workflows looks at existing code and PRs to de-dupe code across the repo. If a de-dupe oppurtunity exists, the model creates an issue in the Microsoft/FluidFramework repo.

These flows are currently for testing and DO NOT have any intrusive elevated permissions. They only have the least privilege to perform the needed tasks.

Breaking Changes

There are no breaking changes.

Reviewer Guidance

Happy to get reviews on any changes to prompts, validation flows etc.

Copilot AI review requested due to automatic review settings February 11, 2026 22:18
@dhr-verma dhr-verma changed the title Vermadhr/ghaw workflows for simplification Added code simplification workflows for GH Feb 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds GitHub Agentic Workflows (gh-aw) - an AI-powered automation framework that uses GitHub Copilot to perform automated code quality tasks on a scheduled basis.

Changes:

  • Adds two automated workflows: "Duplicate Code Detector" (runs daily to find code duplication) and "Code Simplifier" (runs daily to simplify recently modified code)
  • Adds maintenance workflow to auto-close expired issues/PRs created by the automation
  • Includes workflow configuration files (.md), generated lock files (.lock.yml), and supporting infrastructure (imports, git attributes, action locks)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/duplicate-code-detector.md Configuration for AI-powered duplicate code detection workflow
.github/workflows/duplicate-code-detector.lock.yml Generated YAML workflow file for duplicate code detection (auto-generated, not manually edited)
.github/workflows/code-simplifier.md Configuration for AI-powered code simplification workflow
.github/workflows/code-simplifier.lock.yml Generated YAML workflow file for code simplification (auto-generated, not manually edited)
.github/workflows/agentics-maintenance.yml Maintenance workflow to close expired automation-created issues/PRs every 2 hours
.github/aw/imports/github/gh-aw/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github_workflows_shared_reporting.md Cached import of shared reporting guidelines for workflow outputs
.github/aw/imports/.gitattributes Git attributes marking imported files as generated with 'ours' merge strategy
.github/aw/actions-lock.json Version lock file for GitHub Actions dependencies
.gitattributes Updated to mark generated workflow lock files with linguist-generated and merge=ours

create-issue:
expires: 2d
title-prefix: "[duplicate-code] "
labels: [code-quality, automated-analysis, cookie]
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label "cookie" in the labels array appears unusual for a code quality workflow. Typically, workflow labels should be descriptive of the issue category (e.g., "duplicate-code", "refactoring", "code-quality").

The "cookie" label seems out of place unless it has a specific meaning in your repository's labeling system. Consider:

  • Verifying this label exists in the repository
  • Using a more descriptive label name if "cookie" was unintentional
  • Documenting the purpose of this label if it's intentional
Suggested change
labels: [code-quality, automated-analysis, cookie]
labels: [code-quality, automated-analysis, duplicate-code]

Copilot uses AI. Check for mistakes.

Identify and analyze modified files:
- Determine files changed in the recent commits
- **ONLY analyze .ts and .cjs files** - exclude all other file types
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file type restrictions appear inconsistent with the tool configuration. Line 15 specifies serena: ["go"] for analyzing Go code, but lines 59-60 state "ONLY analyze .ts and .cjs files" and explicitly exclude all other file types.

This creates a contradiction:

  • The tool is configured for Go analysis (serena: ["go"])
  • The instructions restrict analysis to TypeScript (.ts) and CommonJS (.cjs) files only
  • Go files (.go) would be excluded by the "ONLY analyze .ts and .cjs files" restriction

Either:

  1. Update the serena tool configuration to include TypeScript if that's the intended scope
  2. Update the file type restrictions to include .go files if Go analysis is intended
  3. Remove the serena tool configuration if Go analysis is not needed

The test file exclusion patterns also include Go test files (*_test.go) which suggests Go was initially intended to be analyzed.

Suggested change
- **ONLY analyze .ts and .cjs files** - exclude all other file types
- **Analyze .ts, .cjs, and .go files** and exclude all other file types

Copilot uses AI. Check for mistakes.
```bash
pnpm run lint

pnpm run format --fix
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command pnpm run format --fix (line 209) is incorrect for this repository. The repository's package.json defines the format script as fluid-build --task format, which doesn't accept a --fix flag.

Based on the package.json, the correct commands should be:

  • pnpm run format - runs formatting via fluid-build
  • pnpm run format:repo - uses biome to format with --write flag (which actually fixes)

Consider changing line 209 to either:

pnpm run format:repo

or simply:

pnpm run format

The current command will likely pass the --fix flag to fluid-build, which may not handle it correctly.

Suggested change
pnpm run format --fix
pnpm run format:repo

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  257699 links
    1822 destination URLs
    2063 URLs ignored
       0 warnings
       0 errors


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.

1 participant