Objective
Split pkg/constants/constants.go (1,083 lines) into domain-grouped constant files to improve discoverability and adhere to the 300-line guideline.
Context
From discussion #23903 (Repository Quality: File Size Discipline). All constants are bundled regardless of domain, making navigation difficult. The type system is well-designed (semantic types with String()/IsValid() methods) — just group them by domain into separate files.
Approach
Split by domain:
pkg/constants/engine_constants.go — EngineName type + String()/IsValid() methods + all engine name constants (CopilotEngine, ClaudeEngine, CodexEngine, CustomEngine, etc.)
pkg/constants/job_constants.go — JobName and StepID types with their methods and all job name / step ID constants
pkg/constants/url_constants.go — URL and DocURL types with their methods and all URL constants
pkg/constants/version_constants.go — Version and ModelName types with their methods and all version/model name constants
pkg/constants/feature_constants.go — FeatureFlag type with its methods and all feature flag constants
- Keep
pkg/constants/constants.go for CommandPrefix, LineLength, WorkflowID, and any truly general constants
Rules
- Same package (
package constants)
- Do NOT change type names, constant names, or method signatures
- Run
make fmt after changes
- Run
go test ./pkg/constants/... to validate
- Run
make agent-finish before committing
Acceptance Criteria
Generated by Plan Command for issue #discussion #23903 · ◷
Objective
Split
pkg/constants/constants.go(1,083 lines) into domain-grouped constant files to improve discoverability and adhere to the 300-line guideline.Context
From discussion #23903 (Repository Quality: File Size Discipline). All constants are bundled regardless of domain, making navigation difficult. The type system is well-designed (semantic types with
String()/IsValid()methods) — just group them by domain into separate files.Approach
Split by domain:
pkg/constants/engine_constants.go—EngineNametype +String()/IsValid()methods + all engine name constants (CopilotEngine,ClaudeEngine,CodexEngine,CustomEngine, etc.)pkg/constants/job_constants.go—JobNameandStepIDtypes with their methods and all job name / step ID constantspkg/constants/url_constants.go—URLandDocURLtypes with their methods and all URL constantspkg/constants/version_constants.go—VersionandModelNametypes with their methods and all version/model name constantspkg/constants/feature_constants.go—FeatureFlagtype with its methods and all feature flag constantspkg/constants/constants.goforCommandPrefix,LineLength,WorkflowID, and any truly general constantsRules
package constants)make fmtafter changesgo test ./pkg/constants/...to validatemake agent-finishbefore committingAcceptance Criteria
constants.goreduced to general constants — under 300 linesgo test ./pkg/constants/...)