Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

Adds a daily workflow that identifies duplicated type definitions and untyped usages in Go codebases, posting findings as a formatted discussion.

Implementation

Workflow: .github/workflows/typist.md

  • Runs weekdays at 11 AM UTC via cron 0 11 * * 1-5
  • Uses Serena MCP server for semantic Go type analysis
  • Imports shared/mcp/serena.md and shared/reporting.md
  • Posts single discussion via safe-outputs.create-discussion

Analysis Coverage

  • Duplicated types: Exact, near (>80% similar), and semantic duplicates across packages
  • Untyped usages: interface{}, any, untyped constants, generic map values
  • Output: Executive summary + collapsible detailed findings with before/after examples

4-Phase Analysis

  1. Activate Serena, discover non-test Go files in pkg/
  2. Collect and cluster type definitions by similarity
  3. Identify untyped patterns with Serena's find_symbol, search_for_pattern, find_referencing_symbols
  4. Generate formatted discussion with prioritized refactoring recommendations

Configuration

  • Engine: Claude
  • Permissions: Read-only (contents, issues, PRs)
  • Timeout: 20 minutes
  • Strict mode: Enabled
  • Tools: GitHub default toolsets, edit, bash patterns for Go file discovery

The compiled workflow (.github/workflows/typist.lock.yml, 4512 lines) includes proper job dependencies: activation → agent → create_discussion.

Original prompt

create a github agentic workflow that: identifies duplicated Go types and untyped usages, then posts a formatted discussion summarizing refactoring opportunities.

Objective

Create a GitHub Agentic Workflow called "Typist" that scans a Go codebase for duplicated types and untyped usages. It then generates a single GitHub discussion summarizing all refactoring suggestions.

Context

This workflow ensures type consistency in Go projects by identifying duplicated types and converting untyped values to strong types. Instead of creating multiple issues, it compiles findings into a single formatted discussion.

Requirements

  • The workflow runs daily or on manual dispatch.
  • It posts one GitHub discussion summarizing all detected refactoring opportunities.
  • It uses the shared "report" agentic workflow to format the discussion.
  • Import the "serena" and "report" shared agentic workflows as dependencies.

Custom agent used: create-agentic-workflow
Design agentic workflows using GitHub Agentic Workflows (gh-aw) extension with interactive guidance on triggers, tools, and security best practices.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Typist workflow to identify duplicated Go types Add Typist workflow for Go type analysis Nov 7, 2025
Copilot AI requested a review from pelikhan November 7, 2025 03:55
Copilot finished work on behalf of pelikhan November 7, 2025 03:55
@pelikhan pelikhan marked this pull request as ready for review November 7, 2025 04:06
Copilot AI review requested due to automatic review settings November 7, 2025 04:06
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 PR adds a new agentic workflow called "Typist" that performs Go type consistency analysis. The workflow analyzes Go source code to identify duplicated type definitions and untyped usages (like interface{}, any, or untyped constants), providing actionable refactoring recommendations.

Key Features

  • Scheduled to run daily at 11 AM UTC on weekdays
  • Uses Claude engine with Serena MCP server for semantic analysis
  • Creates discussions with findings
  • Analyzes only non-test Go files in the pkg/ directory
  • Provides detailed refactoring recommendations with priority levels

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/typist.md New workflow definition with configuration, tools, and detailed analysis instructions
.github/workflows/typist.lock.yml Compiled GitHub Actions workflow YAML (auto-generated from .md file)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan pelikhan merged commit b41b5d9 into main Nov 7, 2025
88 of 92 checks passed
@pelikhan pelikhan deleted the copilot/create-typist-github-workflow branch November 7, 2025 04:09
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