[Quality] Workflow Error Message Quality and Actionability - 2025-11-15 #4046
Closed
Replies: 2 comments 1 reply
-
|
/plan |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
This discussion was automatically closed because it was created by an agentic workflow more than 1 week ago. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🎯 Repository Quality Improvement Report - Workflow Error Message Quality and Actionability
Analysis Date: 2025-11-15
Focus Area: Workflow Error Message Quality and Actionability
Strategy Type: Custom
Custom Area: Yes - This focus area was specifically chosen for gh-aw because clear, actionable error messages are critical for developer experience when compiling markdown workflows to GitHub Actions YAML. When validation fails, users need precise guidance to fix their workflow configurations.
Executive Summary
The gh-aw repository has established an excellent Error Message Style Guide (
.github/instructions/error-messages.instructions.md) that defines a three-part template for error messages: [what's wrong] + [what's expected] + [example]. However, analysis reveals significant room for improvement in adoption and consistency across the codebase.Key Findings:
pkg/workflow/time_delta.goand dedicated test coverage inerror_message_quality_test.goThe codebase demonstrates best practices in isolated areas but needs systematic application of the error message template across all validation paths, especially in compiler validation, MCP configuration errors, and CLI command errors.
Full Analysis Report
Focus Area: Workflow Error Message Quality and Actionability
Current State Assessment
Codebase Scale:
Error Message Quality Metrics:
error_message_quality_test.go)Findings
Strengths
Excellent Style Guide -
.github/instructions/error-messages.instructions.mdprovides comprehensive guidance with:Exemplary Reference Implementation -
pkg/workflow/time_delta.godemonstrates best practices:Strong Test Coverage -
pkg/workflow/error_message_quality_test.govalidates error message quality with assertions for:Console Formatting Infrastructure - The
pkg/consolepackage provides consistent formatting helpers that are used in some areasAreas for Improvement
Low Example Inclusion Rate (5.6%)
Inconsistent CLI Error Formatting
console.FormatErrorMessage()fmt.Fprintf(os.Stderr)and formatted outputVague Error Messages Without Context
Examples needing improvement:
Missing Type Information in Type Errors
%Tverb to show concrete typeValidation Errors That Need Enhancement
Files with improvement opportunities:
pkg/workflow/compiler.go- MCP config and engine validation errorspkg/workflow/stop_after.go- Time-based validation errorspkg/cli/trial_command.go- CLI argument validationpkg/cli/add_command.go- Workflow specification parsingpkg/parser/schema.go- JSON schema validation errorsDetailed Analysis
Pattern Analysis: What Works Well
Time Delta Validation (
pkg/workflow/time_delta.go):Manual Approval Validation (
pkg/workflow/manual_approval.go):Pattern Analysis: Needs Improvement
Compiler Validation Errors:
Repository Format Errors:
Stop-After Validation:
CLI Error Message Consistency Issues
Current State:
console.FormatErrorMessage()(36.8%)fmt.Fprintf(os.Stderr)(63.2%)Inconsistency Example from
pkg/cli/compile_command.go:🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: The following tasks are designed for GitHub Copilot agent execution. Please split these into individual work items for Claude to process.
Improvement Tasks
The following code regions and tasks should be processed by the Copilot agent. Each section is marked for easy identification by the planner agent.
Task 1: Enhance Compiler Validation Error Messages
Priority: High
Estimated Effort: Medium
Focus Area: Workflow Error Message Quality
Description:
Improve error messages in
pkg/workflow/compiler.goto follow the error message style guide. Focus on validation errors that currently wrap underlying errors without providing user-facing context or examples.Acceptance Criteria:
%Tto show received type\nCode Region:
pkg/workflow/compiler.go(validation error messages)Task 2: Standardize CLI Error Message Formatting
Priority: High
Estimated Effort: Large
Focus Area: Workflow Error Message Quality
Description:
Standardize all CLI error messages in
pkg/cli/to use console formatting helpers consistently. Currently only 36.8% of CLI errors use the console package, leading to inconsistent user experience.Acceptance Criteria:
console.FormatErrorMessage(err.Error())console.FormatWarningMessage(message)console.FormatInfoMessage(message)fmt.Fprintf(os.Stderr, "Error: ...")patternsCode Region:
pkg/cli/*.go(all CLI command files)Task 3: Add Examples to Repository Format Validation Errors
Priority: High
Estimated Effort: Small
Focus Area: Workflow Error Message Quality
Description:
Add concrete examples to repository format validation errors across the codebase. These are common user-facing errors that currently lack actionable guidance.
Acceptance Criteria:
Code Region:
pkg/workflow/repository_features_validation.gopkg/cli/trial_command.gopkg/cli/repo.goImproved pattern:
Apply to all repository validation errors in:
Each error should clearly state:
Apply similar quality to all MCP validation in:
Each error should include:
Improved pattern:
Search in pkg/workflow/ for all type validation errors and enhance them with:
This makes errors immediately actionable - users can see "got string" vs "expected integer" and know exactly what to change.
Beta Was this translation helpful? Give feedback.
All reactions