Skip to content

[lint-monster] [Code Quality] Shared function-length refactoring backlog for pkg/workflow and pkg/cli (677 findings) #46514

Description

@github-actions

Shared backlog: function-length refactoring

Current make golint-custom run reports 677 long-function findings across the shared pkg/workflow + pkg/cli backlog. Per the LintMonster grouping rule, treat these findings as one authoritative tracking topic instead of separate workflow/cli slices.

Current count

  • 677 total findings in the shared backlog
  • Affected path prefixes: pkg/workflow/, pkg/cli/

Representative diagnostics

  • pkg/workflow/maintenance_workflow_yaml.go: buildMaintenanceWorkflowYAML is 961 lines
  • pkg/workflow/frontmatter_on_section_cleanup.go: commentOutProcessedFieldsInOnSection is 697 lines
  • pkg/workflow/side_repo_maintenance.go: generateSideRepoMaintenanceWorkflow is 447 lines
  • pkg/cli/run_workflow_execution.go: RunWorkflowOnGitHub is 438 lines
  • pkg/workflow/mcp_config_custom.go: renderSharedMCPConfig is 428 lines
  • pkg/workflow/repo_memory.go: extractRepoMemoryConfig is 415 lines
  • pkg/workflow/engine.go: ExtractEngineConfig is 410 lines
  • pkg/cli/logs_command.go: NewLogsCommand is 376 lines

Expected outcome

Reduce the shared function-length backlog by extracting small helpers and focused files while preserving behavior.

Next refactoring slices

  • Maintenance/compiler YAML generators (pkg/workflow/maintenance_workflow_yaml.go, pkg/workflow/compiler_yaml*.go)
  • Frontmatter cleanup and config extraction hotspots (pkg/workflow/frontmatter_on_section_cleanup.go, pkg/workflow/*config*.go)
  • Engine and MCP config renderers (pkg/workflow/engine.go, pkg/workflow/mcp_config_custom.go, pkg/workflow/*engine*.go)
  • CLI execution/logging hotspots (pkg/cli/run_workflow_execution.go, pkg/cli/logs_command.go, nearby orchestration helpers)
  • Shared parsing/rendering helpers directly supporting the above files

Remediation checklist

  • Keep remediation scoped to the selected slice only
  • Prefer minimal, targeted helper extraction and small file splits
  • Preserve behavior, output, and public interfaces unless a tiny internal change is safer
  • Validate with make golint-custom

Related issues

Fused skill guidance

  • Validate fixes by running make golint-custom
  • Keep remediation scoped to findings in the assigned lint group
  • Prefer minimal, targeted code edits

Generated by 🧌 LintMonster · 39.6 AIC · ⌖ 9.74 AIC · ⊞ 4.4K ·

  • expires on Jul 25, 2026, 7:49 PM UTC-08:00

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions