You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
7+ workflows use shared/mcp/serena-go.md for Go code analysis combined with a near-identical set of bash permissions for navigating Go source files. However, every workflow independently re-declares the same find pkg, wc -l, cat pkg/**, grep -r 'func ' bash allowlist. Extracting a shared/go-source-analysis.md component that bundles serena-go.md + the standard bash permissions + standard Go source navigation instructions would reduce duplication across all Go code quality workflows.
Each workflow also includes similar prompt instructions: "activate_project with workspace path", "analyze .go files only, skip test files, focus on pkg/".
---
# Go Source Code Analysis Base# Bundles Serena Go LSP analysis + standard bash permissions for Go source navigation.## Usage:# imports:# - shared/go-source-analysis.mdimports:
- shared/mcp/serena-go.md
- shared/reporting.mdtools:
bash:
- "find pkg -name '*.go' ! -name '*_test.go' -type f"
- "find pkg -type f -name '*.go' ! -name '*_test.go'"
- "find pkg/ -maxdepth 1 -ls"
- "find pkg/workflow/ -maxdepth 1 -ls"
- "wc -l pkg/**/*.go"
- "head -n * pkg/**/*.go"
- "grep -r 'func ' pkg --include='*.go'"
- "cat pkg/**/*.go"
---
## Go Source Code Analysis SetupSerena Go LSP analysis is configured for this workspace. Standard bash tools for Go source navigation are available.### Serena ActivationBefore analyzing code, activate the Serena project:
```Tool: activate_projectArgs: { "path": "$\{\{ github.workspace }}" }```### Go Analysis Constraints1. **Only analyze `.go` files** — Ignore all other file types2. **Skip test files** — Never analyze files ending in `_test.go`3. **Focus on `pkg/` directory** — Primary analysis area4. **Use Serena for semantic analysis** — Leverage LSP capabilities for deeper insights (go to definition, find references, type inference)5. **Use bash `find`/`grep` for quick navigation** — Supplement Serena with text-based searches
Usage Example:
# In semantic-function-refactor.mdimports:
- shared/go-source-analysis.md# Remove previous separate imports of shared/mcp/serena-go.md and shared/reporting.md
Maintenance benefit: When the standard Go source analysis bash permissions need updating (e.g., adding cmd/ directory, adding internal/ patterns), one file change propagates to all workflows. Currently, each workflow independently maintains its bash allowlist.
Implementation Plan
Create shared component at .github/workflows/shared/go-source-analysis.md
Update duplicate-code-detector.md to use new component (simplest case)
Update semantic-function-refactor.md
Update daily-function-namer.md
Update daily-file-diet.md
Update daily-compiler-quality.md
Update remaining workflows
Recompile affected workflows with make recompile
Test compilation and run smoke tests
Related Analysis
This recommendation comes from the Workflow Skill Extractor analysis run on 2026-04-02. See full analysis report in the discussions for details.
Skill Overview
7+ workflows use
shared/mcp/serena-go.mdfor Go code analysis combined with a near-identical set of bash permissions for navigating Go source files. However, every workflow independently re-declares the samefind pkg,wc -l,cat pkg/**,grep -r 'func 'bash allowlist. Extracting ashared/go-source-analysis.mdcomponent that bundlesserena-go.md+ the standard bash permissions + standard Go source navigation instructions would reduce duplication across all Go code quality workflows.Current Pattern
Every affected workflow independently declares:
Each workflow also includes similar prompt instructions: "activate_project with workspace path", "analyze .go files only, skip test files, focus on pkg/".
Current Usage
This skill appears in the following workflows:
daily-function-namer.md(lines 1–30)duplicate-code-detector.md(lines 1–20)semantic-function-refactor.md(lines 1–28)daily-file-diet.md(lines 1–35)daily-compiler-quality.md(lines 1–30)go-fan.md(partial pattern)daily-testify-uber-super-expert.md(partial bash perms)Proposed Shared Component
File:
.github/workflows/shared/go-source-analysis.mdUsage Example:
Impact
cmd/directory, addinginternal/patterns), one file change propagates to all workflows. Currently, each workflow independently maintains its bash allowlist.Implementation Plan
.github/workflows/shared/go-source-analysis.mdduplicate-code-detector.mdto use new component (simplest case)semantic-function-refactor.mddaily-function-namer.mddaily-file-diet.mddaily-compiler-quality.mdmake recompileRelated Analysis
This recommendation comes from the Workflow Skill Extractor analysis run on 2026-04-02. See full analysis report in the discussions for details.