[lint-monster] Function Length Refactoring Tracking
Status
Current Issue Count: 636 long functions
Last Updated: 2026-06-05
Overview
This is the authoritative tracking issue for the function-length custom linter finding. The linter enforces a 60-line limit per function across pkg/workflow/ and pkg/cli/.
Directories Affected
| Path |
Count |
Status |
| pkg/workflow/ |
~600 |
Not started |
| pkg/cli/ |
~36 |
Partial (1 issue open: #36947) |
Largest Functions Requiring Refactoring
Critical (500+ lines)
buildMaintenanceWorkflowYAML (936 lines) — pkg/workflow/maintenance_workflow_yaml.go:33
commentOutProcessedFieldsInOnSection (625 lines) — pkg/workflow/frontmatter_extraction_yaml.go:107
buildConclusionJob (592 lines) — pkg/workflow/notify_comment.go:28
buildPreActivationJob (489 lines) — pkg/workflow/compiler_pre_activation_job.go:20
Very Large (200-400 lines)
GetExecutionSteps (382 lines) — pkg/workflow/claude_engine.go:138
GetExecutionSteps (350 lines) — pkg/workflow/engine.go:216
GetExecutionSteps (338 lines) — pkg/workflow/codex_engine.go:161
buildMainJob (385 lines) — pkg/workflow/compiler_main_job.go:26
Refactoring Strategy
Extract Logical Sub-Functions
- Identify distinct phases or operations within each function
- Extract into private helper functions prefixed with appropriate naming
- Preserve function signatures (no breaking changes)
Use Local Structs for Intermediate Results
- Group related intermediate values into temporary structs
- Reduces parameter passing between sub-functions
Options Struct Pattern
- For complex configuration building (many parameters)
- Reference:
.github/skills/developer/SKILL.md code organization guidelines
Validation Workflow
After each refactoring:
make golint-custom # Verify function passes length check
make build # Ensure compilation
make fmt # Format code
Next Steps
Related Issues
Generated by 🧌 LintMonster · 177 AIC · ◷
[lint-monster] Function Length Refactoring Tracking
Status
Current Issue Count: 636 long functions
Last Updated: 2026-06-05
Overview
This is the authoritative tracking issue for the
function-lengthcustom linter finding. The linter enforces a 60-line limit per function acrosspkg/workflow/andpkg/cli/.Directories Affected
Largest Functions Requiring Refactoring
Critical (500+ lines)
buildMaintenanceWorkflowYAML(936 lines) — pkg/workflow/maintenance_workflow_yaml.go:33commentOutProcessedFieldsInOnSection(625 lines) — pkg/workflow/frontmatter_extraction_yaml.go:107buildConclusionJob(592 lines) — pkg/workflow/notify_comment.go:28buildPreActivationJob(489 lines) — pkg/workflow/compiler_pre_activation_job.go:20Very Large (200-400 lines)
GetExecutionSteps(382 lines) — pkg/workflow/claude_engine.go:138GetExecutionSteps(350 lines) — pkg/workflow/engine.go:216GetExecutionSteps(338 lines) — pkg/workflow/codex_engine.go:161buildMainJob(385 lines) — pkg/workflow/compiler_main_job.go:26Refactoring Strategy
Extract Logical Sub-Functions
Use Local Structs for Intermediate Results
Options Struct Pattern
.github/skills/developer/SKILL.mdcode organization guidelinesValidation Workflow
After each refactoring:
Next Steps
Related Issues
computeModelEffectiveTokensWithWeights(parameters refactor)