Skip to content

[refactoring] Extract Serena Go Analysis Tool Configuration into shared component #17750

@github-actions

Description

@github-actions

Skill Overview

16 workflows use the Serena MCP server for Go code analysis (serena: ["go"]), all with nearly identical tool configurations and none of them importing a shared Serena component. Extracting this pattern into a shared component would standardize the tool setup, reduce duplication, and ensure all workflows benefit from any improvements to the Serena configuration.

Current Usage

This skill appears in the following workflows (all manually configured, no shared import):

  • archie.md
  • cloclo.md
  • daily-compiler-quality.md
  • daily-file-diet.md
  • daily-testify-uber-super-expert.md
  • developer-docs-consolidator.md
  • duplicate-code-detector.md
  • glossary-maintainer.md
  • go-fan.md
  • mcp-inspector.md
  • q.md
  • repository-quality-improver.md
  • semantic-function-refactor.md
  • sergo.md
  • terminal-stylist.md
  • typist.md

Proposed Shared Component

File: .github/workflows/shared/mcp/serena-go.md

Configuration:

---
tools:
  serena: ["go"]
  edit:
  bash:
    - "find pkg -name '*.go' ! -name '*_test.go' -type f"
    - "find pkg -type f -name '*.go' ! -name '*_test.go'"
    - "find pkg/ -maxdepth 1 -ls"
    - "wc -l pkg/**/*.go"
    - "cat pkg/**/*.go"
    - "head -n * pkg/**/*.go"
    - "grep -r 'func ' pkg --include='*.go'"
---

Markdown body (prompt guidance):

## Serena Go Code Analysis

The Serena MCP server is configured for Go code analysis in this workspace:
- **Workspace**: `$\{\{ github.workspace }}`
- **Memory**: `/tmp/gh-aw/cache-memory/serena/`

### Project Activation

Before analyzing code, activate the Serena project:
```
Tool: activate_project
Args: { "path": "$\{\{ github.workspace }}" }
```

### Analysis Constraints

1. **Only analyze `.go` files** — Ignore all other file types
2. **Skip test files** — Never analyze files ending in `_test.go`
3. **Focus on `pkg/` directory** — Primary analysis area
4. **Use Serena for semantic analysis** — Leverage LSP capabilities for deeper insights

Usage Example:

imports:
  - shared/mcp/serena-go.md

Workflows needing edit: or github: toolsets can still declare them inline — the shared component only adds the serena tool config and common bash allowlists.

Impact

  • Workflows affected: 16 workflows
  • Lines saved: ~10–15 lines of tool configuration per workflow = ~160–240 lines total
  • Maintenance benefit: Serena tool updates (version bumps, new bash patterns) propagate to all 16 workflows automatically instead of requiring 16 separate edits

Implementation Plan

  1. Create .github/workflows/shared/mcp/serena-go.md with standardized tool config and activation guidance
  2. Update glossary-maintainer.md to import the shared component
  3. Update daily-file-diet.md to import the shared component
  4. Update semantic-function-refactor.md to import the shared component
  5. Update typist.md to import the shared component
  6. Update remaining 12 workflows to import the shared component
  7. Run make recompile to regenerate all lock files
  8. Verify all workflows compile without errors
  9. Update documentation

Related Analysis

This recommendation comes from the Workflow Skill Extractor analysis run on 2026-02-22.

See full analysis report in the linked discussion.

Generated by Workflow Skill Extractor

  • expires on Feb 24, 2026, 4:19 PM UTC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions