Objective
Enhance gh aw status output to provide clear, actionable guidance when workflows are stale or uncompiled. Add color-coded status, "Action Needed" column, summary line with bulk commands, and optional fix script generation.
Context
Current status output shows "Compiled: No" but provides no guidance on what to do next. Users must figure out commands themselves, leading to confusion and inconsistent workflow states.
Approach
1. Enhance WorkflowStatus Struct
Add new field:
ActionNeeded string `json:"action_needed" console:"header:Action Needed,omitempty"`
Generate commands based on staleness type:
- Never compiled:
"Run: gh aw compile workflow.md"
- Stale (hash):
"Run: gh aw compile workflow.md (content changed)"
- Stale (timestamp):
"Run: gh aw compile workflow.md (timestamp mismatch)"
- Up-to-date:
"" (empty)
2. Add Summary Footer
After status table, print:
⚠️ 5 workflows need compilation
Run: gh aw compile --all
Or if all up-to-date:
✓ All workflows are up-to-date
3. Add Color Coding
Using console package:
- Green: Compiled == "Yes" (up-to-date)
- Yellow: Compiled contains "Stale"
- Red: Compiled == "No" (never compiled)
4. Add --fix-suggestions Flag
Generate executable shell script:
gh aw status --fix-suggestions > fix-workflows.sh
Output:
#!/bin/bash
# Generated by gh aw status --fix-suggestions
gh aw compile workflow1.md
gh aw compile workflow2.md
git add .github/workflows/*.lock.yml
echo "Done! Review changes with: git diff --cached"
Files to Modify
pkg/cli/status_command.go - Enhance output and add features
pkg/console/*.go - Add color formatting utilities if needed
pkg/cli/status_command_test.go - Test new output format
Acceptance Criteria
AI generated by Plan Command for discussion #6133
Objective
Enhance
gh aw statusoutput to provide clear, actionable guidance when workflows are stale or uncompiled. Add color-coded status, "Action Needed" column, summary line with bulk commands, and optional fix script generation.Context
Current status output shows "Compiled: No" but provides no guidance on what to do next. Users must figure out commands themselves, leading to confusion and inconsistent workflow states.
Approach
1. Enhance WorkflowStatus Struct
Add new field:
Generate commands based on staleness type:
"Run: gh aw compile workflow.md""Run: gh aw compile workflow.md (content changed)""Run: gh aw compile workflow.md (timestamp mismatch)"""(empty)2. Add Summary Footer
After status table, print:
Or if all up-to-date:
3. Add Color Coding
Using console package:
4. Add --fix-suggestions Flag
Generate executable shell script:
gh aw status --fix-suggestions > fix-workflows.shOutput:
Files to Modify
pkg/cli/status_command.go- Enhance output and add featurespkg/console/*.go- Add color formatting utilities if neededpkg/cli/status_command_test.go- Test new output formatAcceptance Criteria
--fix-suggestionsgenerates valid shell scriptRelated to [plan] Workflow Lifecycle Management & Staleness Detection Improvements #6181