π·οΈ Go Function Rename Plan
Package Analyzed: pkg/workflow
Analysis Date: 2026-08-12
Round-Robin Position: package 8 of 48 total packages
Functions Analyzed: 355 functions across 66 files
Why This Matters
When AI coding agents search for functions to complete a task, they rely on function
names to understand what code does. Clear, descriptive names increase the likelihood
that an agent will find the right function instead of reimplementing existing logic.
Functions in the same package also call each other, so reviewing them together gives
better context for rename decisions.
Rename Suggestions
pkg/workflow/tools.go
| Current Name |
Suggested Name |
Reason |
detectTriggerType() |
detectImplicitTriggerType() |
The function does not detect arbitrary trigger types. It specifically infers whether default on: generation should treat the workflow as a slash/command or label-command workflow, including a fallback read from frontmatter when WorkflowData is still incomplete. The new name makes that narrow purpose easier for an agent to find. |
All functions in this file (for reference):
(*Compiler).applyDefaults() β β
Clear, no change needed
populateWorkflowDataCache() β β
Clear, no change needed
detectTriggerType() β β οΈ Rename suggested (see table above)
(*Compiler).applyDefaultOnSection() β β
Clear, no change needed
applyDefaultPermissions() β β
Clear, no change needed
(*Compiler).applyCommandTriggerOnSection() β β
Clear, no change needed
(*Compiler).buildCommandTriggerEventsMap() β β
Clear, no change needed
(*Compiler).applyLabelCommandTriggerOnSection() β β
Clear, no change needed
(*Compiler).buildLabelCommandEventsMap() β β
Clear, no change needed
mergeLabelCommandOtherEvents() β β
Clear, no change needed
ensureWorkflowDispatchItemNumberInput() β β
Clear, no change needed
(*Compiler).mergeToolsAndMCPServers() β β
Clear, no change needed
mergeRuntimes() β β
Clear, no change needed
(*Compiler).hasIssueTrigger() β β
Clear, no change needed
(*Compiler).injectWorkflowDispatchForIssue() β β
Clear, no change needed
(*Compiler).replaceIssueNumberReferences() β β
Clear, no change needed
isBashFullyDisabled() β β
Clear, no change needed
(*Compiler).applyDefaultTools() β β
Clear, no change needed
pkg/workflow/time_delta.go
| Current Name |
Suggested Name |
Reason |
parseTimeDeltaForStopAfter() |
parseStopAfterTimeDelta() |
This helper is specific to the stop-after field rather than a generic βfor Xβ variant. The suggested name leads with the domain concept an agent would likely search for. |
parseTimeDeltaWithMinutes() |
parseTimeDeltaWithOptionalMinutes() |
The current name sounds like it always parses minute-bearing input. The boolean parameter actually toggles minute support on and off, so the rename better matches behavior. |
All functions in this file (for reference):
parseTimeDelta() β β
Clear, no change needed
parseTimeDeltaForStopAfter() β β οΈ Rename suggested (see table above)
parseTimeDeltaWithMinutes() β β οΈ Rename suggested (see table above)
(*TimeDelta).String() β β
Standard stringer, no change needed
isRelativeStopTime() β β
Clear, no change needed
parseAbsoluteDateTime() β β
Clear, no change needed
isRelativeDate() β β
Clear, no change needed
parseRelativeDate() β β
Clear, no change needed
ResolveRelativeDate() β β
Clear, no change needed
parseExpiresFromConfig() β β
Clear, no change needed
parseRelativeTimeSpec() β β
Clear, no change needed
pkg/workflow/template_injection_utils.go
| Current Name |
Suggested Name |
Reason |
extractRunBlocks() |
extractRunScriptBlocks() |
The function recursively walks parsed workflow data and collects run: script contents, not arbitrary YAML blocks. Adding Script makes its output and use in injection validation much easier to infer. |
All functions in this file (for reference):
extractRunBlocks() β β οΈ Rename suggested (see table above)
removeHeredocContent() β β
Clear, no change needed
stripShellLineComments() β β
Clear, no change needed
isShellCommentStart() β β
Clear, no change needed
replaceOutsideQuotedHeredocs() β β
Clear, no change needed
replaceOutsideShellLineComments() β β
Clear, no change needed
extractRunSnippet() β β
Clear, no change needed
detectExpressionContext() β β
Clear, no change needed
formatTemplateInjectionError() β β
Clear, no change needed
formatRunScriptExpressionGuardrailError() β β
Clear, no change needed
pkg/workflow/tool_description_enhancer.go
| Current Name |
Suggested Name |
Reason |
buildConstraints() |
buildToolConstraints() |
In this package, βconstraintsβ always refers to tool-description constraint text. The current generic name is hard to search for and easy to overlook. The new name anchors it to the package domain. |
All functions in this file (for reference):
toolConstraintBuilder() β β
Type alias is clear, no change needed
formatStringList() β β
Clear, no change needed
appendAllowedIssueFieldsConstraint() β β
Clear, no change needed
appendMaxConstraint() β β
Clear, no change needed
buildConstraints() β β οΈ Rename suggested (see table above)
appendStringConstraint() β β
Clear, no change needed
appendTargetConstraint() β β
Clear, no change needed
enhanceToolDescription() β β
Clear, no change needed
buildToolDescriptionConstraints() β β
Clear, no change needed
- Remaining per-tool
*Constraints() helpers β β
Clear, no change needed
pkg/workflow/trigger_parser.go
| Current Name |
Suggested Name |
Reason |
parseSourceControlTrigger() |
parseGitRefTrigger() |
The function only dispatches push and pull_request shorthand parsing. βSource controlβ is broader than the implementation and gives weak search cues. βGit ref triggerβ better signals branch/tag/PR event parsing. |
All functions in this file (for reference):
ParseTriggerShorthand() β β
Clear, no change needed
(*TriggerIR).ToYAMLMap() β β
Clear, no change needed
parseSlashCommandTrigger() β β
Clear, no change needed
parseLabelTrigger() β β
Clear, no change needed
parseSourceControlTrigger() β β οΈ Rename suggested (see table above)
parsePushTrigger() β β
Clear, no change needed
parsePullRequestTrigger() β β
Clear, no change needed
parseIssueDiscussionTrigger() β β
Clear, no change needed
- Remaining
parse*Trigger() helpers β β
Clear, no change needed
mergeCommandOtherEvents() β β
Clear, no change needed
mergeEventConfig() β β
Clear, no change needed
parseEventTypes() β β
Clear, no change needed
(*Compiler).parseOnSection() β β
Clear, no change needed
parseOnMapPreamble() β β
Clear, no change needed
parseCommandTriggerFromOnMap() β β
Clear, no change needed
parseLabelCommandFromOnMap() β β
Clear, no change needed
(*Compiler).finalizeCommandTriggerState() β β
Clear, no change needed
parseStatusCommentFromOnMap() β β
Clear, no change needed
parseLockForAgentFromOnMap() β β
Clear, no change needed
pkg/workflow/workflow_builder.go
| Current Name |
Suggested Name |
Reason |
(*Compiler).extractYAMLSections() |
(*Compiler).extractWorkflowYAMLSections() |
The method extracts top-level workflow YAML snippets into WorkflowData, not generic YAML sections. The added qualifier improves package-level searchability and reduces ambiguity with other YAML extraction helpers. |
All functions in this file (for reference):
(*Compiler).buildInitialWorkflowData() β β
Clear, no change needed
extractEnclavesConfig() β β
Clear, no change needed
extractLSPConfig() β β
Clear, no change needed
extractFrontmatterSkills() β β
Clear, no change needed
extractFrontmatterSkillReferences() β β
Clear, no change needed
extractMainModelCostsOverlay() β β
Clear, no change needed
mergeModelCostOverlays() β β
Clear, no change needed
mergeModelCostOverlayPair() β β
Clear, no change needed
extractMainModelPolicyOverlay() β β
Clear, no change needed
toFloat64() β β
Local utility name is acceptable, no change needed
resolveDefaultAiCreditsPricing() β β
Clear, no change needed
extractDefaultAiCreditsPricingFromModels() β β
Clear, no change needed
extractDefaultAiCreditsPricingFromModelsMap() β β
Clear, no change needed
extractDefaultAiCreditsPricingFromObject() β β
Clear, no change needed
mergeModelPolicyOverlays() β β
Clear, no change needed
filterAllowedModelConflictsWithSet() β β
Clear, no change needed
modelConflictsWithDisallowedPolicy() β β
Clear, no change needed
modelPolicyPatternMatches() β β
Clear, no change needed
resolveInlinedImports() β β
Clear, no change needed
mergeExcludedEnvVarNames() β β
Clear, no change needed
(*Compiler).extractYAMLSections() β β οΈ Rename suggested (see table above)
- Remaining workflow-builder helpers β β
Clear, no change needed
π€ Agentic Implementation Plan
Agentic Implementation Plan
This issue is designed to be assigned to a coding agent. The agent should implement
all rename suggestions below in a single pull request.
Prerequisites
Implementation Steps
For each rename suggestion, follow this sequence:
1. Rename the function in the indicated file
// Old
func oldName(args) returnType {
// New
func newName(args) returnType {
Target renames for this package:
pkg/workflow/tools.go: detectTriggerType β detectImplicitTriggerType
pkg/workflow/time_delta.go: parseTimeDeltaForStopAfter β parseStopAfterTimeDelta
pkg/workflow/time_delta.go: parseTimeDeltaWithMinutes β parseTimeDeltaWithOptionalMinutes
pkg/workflow/template_injection_utils.go: extractRunBlocks β extractRunScriptBlocks
pkg/workflow/tool_description_enhancer.go: buildConstraints β buildToolConstraints
pkg/workflow/trigger_parser.go: parseSourceControlTrigger β parseGitRefTrigger
pkg/workflow/workflow_builder.go: (*Compiler).extractYAMLSections β (*Compiler).extractWorkflowYAMLSections
2. Update all call sites
Use grep to find every caller and update the reference:
grep -rn "oldName" pkg/ --include="*.go"
Also check test files:
grep -rn "oldName" pkg/ --include="*_test.go"
Known call sites from this analysis:
detectTriggerType is called by (*Compiler).applyDefaults in pkg/workflow/tools.go
parseTimeDeltaForStopAfter is called by resolveStopTime in pkg/workflow/stop_after.go and related tests in pkg/workflow/time_delta_test.go
parseTimeDeltaWithMinutes is called by parseTimeDelta and parseTimeDeltaForStopAfter in pkg/workflow/time_delta.go
extractRunBlocks is called by validateNoTemplateInjectionFromParsed and validateNoGitHubExpressionsInRunScriptsFromParsed in pkg/workflow/template_injection_validation.go
buildConstraints is called broadly by the per-tool *Constraints helpers in pkg/workflow/tool_description_enhancer.go
parseSourceControlTrigger is called by ParseTriggerShorthand in pkg/workflow/trigger_parser.go
(*Compiler).extractYAMLSections is called by (*Compiler).populateWorkflowBuildContext, (*Compiler).ParseWorkflowString, and associated tests
3. Verify compilation after each rename
4. Run tests after all renames are complete
Commit Convention
Each rename should be a focused commit:
refactor: rename <oldName> to <newName> for clarity
Validation Checklist
Notes for the Agent
- This is a pure rename refactor β behavior must not change, only names
- If a rename causes unexpected complexity (e.g., name conflicts, interface constraints),
skip it and leave a comment in the PR explaining why
- Follow existing naming conventions documented in
AGENTS.md
- Unexported functions used only as closures or immediately-invoked can be skipped
Generated by the Daily Go Function Namer workflow
Run: 31593990868
Generated by π§ Daily Go Function Namer Β· gpt54 Β· 21.8 AIC Β· β 7.48 AIC Β· β 8.3K Β· β·
π·οΈ Go Function Rename Plan
Package Analyzed:
pkg/workflowAnalysis Date: 2026-08-12
Round-Robin Position: package 8 of 48 total packages
Functions Analyzed: 355 functions across 66 files
Why This Matters
When AI coding agents search for functions to complete a task, they rely on function
names to understand what code does. Clear, descriptive names increase the likelihood
that an agent will find the right function instead of reimplementing existing logic.
Functions in the same package also call each other, so reviewing them together gives
better context for rename decisions.
Rename Suggestions
pkg/workflow/tools.godetectTriggerType()detectImplicitTriggerType()on:generation should treat the workflow as a slash/command or label-command workflow, including a fallback read from frontmatter whenWorkflowDatais still incomplete. The new name makes that narrow purpose easier for an agent to find.All functions in this file (for reference):
(*Compiler).applyDefaults()β β Clear, no change neededpopulateWorkflowDataCache()β β Clear, no change neededdetectTriggerType()β(*Compiler).applyDefaultOnSection()β β Clear, no change neededapplyDefaultPermissions()β β Clear, no change needed(*Compiler).applyCommandTriggerOnSection()β β Clear, no change needed(*Compiler).buildCommandTriggerEventsMap()β β Clear, no change needed(*Compiler).applyLabelCommandTriggerOnSection()β β Clear, no change needed(*Compiler).buildLabelCommandEventsMap()β β Clear, no change neededmergeLabelCommandOtherEvents()β β Clear, no change neededensureWorkflowDispatchItemNumberInput()β β Clear, no change needed(*Compiler).mergeToolsAndMCPServers()β β Clear, no change neededmergeRuntimes()β β Clear, no change needed(*Compiler).hasIssueTrigger()β β Clear, no change needed(*Compiler).injectWorkflowDispatchForIssue()β β Clear, no change needed(*Compiler).replaceIssueNumberReferences()β β Clear, no change neededisBashFullyDisabled()β β Clear, no change needed(*Compiler).applyDefaultTools()β β Clear, no change neededpkg/workflow/time_delta.goparseTimeDeltaForStopAfter()parseStopAfterTimeDelta()stop-afterfield rather than a generic βfor Xβ variant. The suggested name leads with the domain concept an agent would likely search for.parseTimeDeltaWithMinutes()parseTimeDeltaWithOptionalMinutes()All functions in this file (for reference):
parseTimeDelta()β β Clear, no change neededparseTimeDeltaForStopAfter()βparseTimeDeltaWithMinutes()β(*TimeDelta).String()β β Standard stringer, no change neededisRelativeStopTime()β β Clear, no change neededparseAbsoluteDateTime()β β Clear, no change neededisRelativeDate()β β Clear, no change neededparseRelativeDate()β β Clear, no change neededResolveRelativeDate()β β Clear, no change neededparseExpiresFromConfig()β β Clear, no change neededparseRelativeTimeSpec()β β Clear, no change neededpkg/workflow/template_injection_utils.goextractRunBlocks()extractRunScriptBlocks()run:script contents, not arbitrary YAML blocks. AddingScriptmakes its output and use in injection validation much easier to infer.All functions in this file (for reference):
extractRunBlocks()βremoveHeredocContent()β β Clear, no change neededstripShellLineComments()β β Clear, no change neededisShellCommentStart()β β Clear, no change neededreplaceOutsideQuotedHeredocs()β β Clear, no change neededreplaceOutsideShellLineComments()β β Clear, no change neededextractRunSnippet()β β Clear, no change neededdetectExpressionContext()β β Clear, no change neededformatTemplateInjectionError()β β Clear, no change neededformatRunScriptExpressionGuardrailError()β β Clear, no change neededpkg/workflow/tool_description_enhancer.gobuildConstraints()buildToolConstraints()All functions in this file (for reference):
toolConstraintBuilder()β β Type alias is clear, no change neededformatStringList()β β Clear, no change neededappendAllowedIssueFieldsConstraint()β β Clear, no change neededappendMaxConstraint()β β Clear, no change neededbuildConstraints()βappendStringConstraint()β β Clear, no change neededappendTargetConstraint()β β Clear, no change neededenhanceToolDescription()β β Clear, no change neededbuildToolDescriptionConstraints()β β Clear, no change needed*Constraints()helpers β β Clear, no change neededpkg/workflow/trigger_parser.goparseSourceControlTrigger()parseGitRefTrigger()pushandpull_requestshorthand parsing. βSource controlβ is broader than the implementation and gives weak search cues. βGit ref triggerβ better signals branch/tag/PR event parsing.All functions in this file (for reference):
ParseTriggerShorthand()β β Clear, no change needed(*TriggerIR).ToYAMLMap()β β Clear, no change neededparseSlashCommandTrigger()β β Clear, no change neededparseLabelTrigger()β β Clear, no change neededparseSourceControlTrigger()βparsePushTrigger()β β Clear, no change neededparsePullRequestTrigger()β β Clear, no change neededparseIssueDiscussionTrigger()β β Clear, no change neededparse*Trigger()helpers β β Clear, no change neededmergeCommandOtherEvents()β β Clear, no change neededmergeEventConfig()β β Clear, no change neededparseEventTypes()β β Clear, no change needed(*Compiler).parseOnSection()β β Clear, no change neededparseOnMapPreamble()β β Clear, no change neededparseCommandTriggerFromOnMap()β β Clear, no change neededparseLabelCommandFromOnMap()β β Clear, no change needed(*Compiler).finalizeCommandTriggerState()β β Clear, no change neededparseStatusCommentFromOnMap()β β Clear, no change neededparseLockForAgentFromOnMap()β β Clear, no change neededpkg/workflow/workflow_builder.go(*Compiler).extractYAMLSections()(*Compiler).extractWorkflowYAMLSections()WorkflowData, not generic YAML sections. The added qualifier improves package-level searchability and reduces ambiguity with other YAML extraction helpers.All functions in this file (for reference):
(*Compiler).buildInitialWorkflowData()β β Clear, no change neededextractEnclavesConfig()β β Clear, no change neededextractLSPConfig()β β Clear, no change neededextractFrontmatterSkills()β β Clear, no change neededextractFrontmatterSkillReferences()β β Clear, no change neededextractMainModelCostsOverlay()β β Clear, no change neededmergeModelCostOverlays()β β Clear, no change neededmergeModelCostOverlayPair()β β Clear, no change neededextractMainModelPolicyOverlay()β β Clear, no change neededtoFloat64()β β Local utility name is acceptable, no change neededresolveDefaultAiCreditsPricing()β β Clear, no change neededextractDefaultAiCreditsPricingFromModels()β β Clear, no change neededextractDefaultAiCreditsPricingFromModelsMap()β β Clear, no change neededextractDefaultAiCreditsPricingFromObject()β β Clear, no change neededmergeModelPolicyOverlays()β β Clear, no change neededfilterAllowedModelConflictsWithSet()β β Clear, no change neededmodelConflictsWithDisallowedPolicy()β β Clear, no change neededmodelPolicyPatternMatches()β β Clear, no change neededresolveInlinedImports()β β Clear, no change neededmergeExcludedEnvVarNames()β β Clear, no change needed(*Compiler).extractYAMLSections()βπ€ Agentic Implementation Plan
Agentic Implementation Plan
This issue is designed to be assigned to a coding agent. The agent should implement
all rename suggestions below in a single pull request.
Prerequisites
Implementation Steps
For each rename suggestion, follow this sequence:
1. Rename the function in the indicated file
Target renames for this package:
pkg/workflow/tools.go:detectTriggerTypeβdetectImplicitTriggerTypepkg/workflow/time_delta.go:parseTimeDeltaForStopAfterβparseStopAfterTimeDeltapkg/workflow/time_delta.go:parseTimeDeltaWithMinutesβparseTimeDeltaWithOptionalMinutespkg/workflow/template_injection_utils.go:extractRunBlocksβextractRunScriptBlockspkg/workflow/tool_description_enhancer.go:buildConstraintsβbuildToolConstraintspkg/workflow/trigger_parser.go:parseSourceControlTriggerβparseGitRefTriggerpkg/workflow/workflow_builder.go:(*Compiler).extractYAMLSectionsβ(*Compiler).extractWorkflowYAMLSections2. Update all call sites
Use
grepto find every caller and update the reference:Also check test files:
Known call sites from this analysis:
detectTriggerTypeis called by(*Compiler).applyDefaultsinpkg/workflow/tools.goparseTimeDeltaForStopAfteris called byresolveStopTimeinpkg/workflow/stop_after.goand related tests inpkg/workflow/time_delta_test.goparseTimeDeltaWithMinutesis called byparseTimeDeltaandparseTimeDeltaForStopAfterinpkg/workflow/time_delta.goextractRunBlocksis called byvalidateNoTemplateInjectionFromParsedandvalidateNoGitHubExpressionsInRunScriptsFromParsedinpkg/workflow/template_injection_validation.gobuildConstraintsis called broadly by the per-tool*Constraintshelpers inpkg/workflow/tool_description_enhancer.goparseSourceControlTriggeris called byParseTriggerShorthandinpkg/workflow/trigger_parser.go(*Compiler).extractYAMLSectionsis called by(*Compiler).populateWorkflowBuildContext,(*Compiler).ParseWorkflowString, and associated tests3. Verify compilation after each rename
4. Run tests after all renames are complete
Commit Convention
Each rename should be a focused commit:
Validation Checklist
make buildpasses with no errorsmake test-unitpassesmake lintpassesNotes for the Agent
skip it and leave a comment in the PR explaining why
AGENTS.mdGenerated by the Daily Go Function Namer workflow
Run: 31593990868