[WIP] Refactor code organization for Go files based on semantic analysis#11679
Closed
[WIP] Refactor code organization for Go files based on semantic analysis#11679
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original prompt
This section details on the original issue you should resolve
<issue_title>[refactor] Semantic Function Clustering Analysis - Code Organization and Refactoring Opportunities</issue_title>
<issue_description>A comprehensive semantic analysis of 462 non-test Go files across the pkg/ directory identified significant opportunities for improving code organization through function clustering, consolidation, and refactoring.
Executive Summary
Analysis Scope:
pkg/workflow/: 241 files (52% of codebase)pkg/cli/: 151 files (33%)pkg/parser/: 29 files (6%)pkg/campaign/: 11 files (2%)Key Findings:
Critical Issues Identified
Issue #1: Compiler Safe Outputs Fragmentation (14 files → 4 files)
Current structure: 14 separate files for safe outputs compilation
compiler_safe_outputs.go,compiler_safe_outputs_core.gocompiler_safe_outputs_config.go,compiler_safe_outputs_env.gocompiler_safe_outputs_job.go,compiler_safe_outputs_jobs.go,compiler_safe_outputs_steps.gocompiler_safe_outputs_shared.go,compiler_safe_outputs_specialized.gocompiler_safe_outputs_discussions.goIssue: Related functions split across too many files (6-12 functions per file), making code navigation difficult.
Recommendation: