Objective
Add a codemod that lowercases discussion_comment / discussion trigger category strings in workflow frontmatter source, so source matches the runtime-normalized form.
Context
From compatibility audit issue #31667. Observed in Z3Prover/z3 with 11 occurrences. gh-aw normalizes Agentic Workflows → agentic workflows at compile time silently. Over time the source file drifts from what the workflow actually matches, causing confusion.
Approach
- Find where discussion-category normalization (lowercasing) happens at compile time (search for
discussion trigger handling and ToLower/lowercase in pkg/workflow/ and pkg/parser/)
- Add a codemod (in the
gh aw fix pipeline or as a default-on codemod) that:
- Scans
on.discussion.types, on.discussion_comment.types, or any frontmatter field holding discussion category strings
- Lowercases any mixed-case category values in-place in the source file
- Since this is low-risk (compiler already normalizes at compile time), it can be a default-on codemod (no opt-in flag needed)
- Add tests covering: mixed-case input lowercased, already-lowercase is a no-op
Files to Investigate
pkg/workflow/ — search for toLower, strings.ToLower, discussion trigger handling
pkg/cli/fix_command.go — codemod entry point
pkg/parser/ — frontmatter parsing for discussion triggers
Acceptance Criteria
Generated by Plan Command · ● 3.8M · ◷
Objective
Add a codemod that lowercases
discussion_comment/discussiontrigger category strings in workflow frontmatter source, so source matches the runtime-normalized form.Context
From compatibility audit issue #31667. Observed in
Z3Prover/z3with 11 occurrences. gh-aw normalizesAgentic Workflows→agentic workflowsat compile time silently. Over time the source file drifts from what the workflow actually matches, causing confusion.Approach
discussiontrigger handling andToLower/lowercaseinpkg/workflow/andpkg/parser/)gh aw fixpipeline or as a default-on codemod) that:on.discussion.types,on.discussion_comment.types, or any frontmatter field holding discussion category stringsFiles to Investigate
pkg/workflow/— search fortoLower,strings.ToLower,discussiontrigger handlingpkg/cli/fix_command.go— codemod entry pointpkg/parser/— frontmatter parsing for discussion triggersAcceptance Criteria
gh aw fix --writelowercases discussion category strings (e.g.Agentic Workflows→agentic workflows)