🎯 Repository Quality Improvement Report - Workflow Compilation Error Messages #4085
Replies: 1 comment 1 reply
-
|
/plan |
Beta Was this translation helpful? Give feedback.
1 reply
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 Compilation Error Messages
Analysis Date: 2025-11-15
Focus Area: Workflow Compilation Error Messages and Developer Feedback
Strategy Type: Custom
Custom Area: Yes - This focus area was specifically chosen to address gh-aw's core user experience challenge: helping developers debug workflow compilation and validation issues efficiently.
Executive Summary
This analysis examines the quality, clarity, and actionability of error messages throughout the gh-aw workflow compilation and validation system. With 839 total error points across the codebase and only 17.28% adoption of the error message style guide (145 errors with examples), there's significant opportunity to improve the developer experience when workflows fail to compile or validate.
The repository has excellent infrastructure in place: a comprehensive error message style guide (
.github/instructions/error-messages.instructions.md), console formatting utilities, and dedicated error message quality tests. However, the relatively low adoption rate indicates that many error messages could benefit from enhancement to include actionable examples and clearer guidance. Given that gh-aw is a developer-facing tool where compilation errors directly impact productivity, investing in error message quality will yield high returns in user satisfaction and reduced support burden.Key findings show strong patterns in recently-updated files (like
time_delta.goandmcp-config.go) following best practices, while older validation code may need modernization.Full Analysis Report
Focus Area: Workflow Compilation Error Messages
Current State Assessment
Codebase Error Inventory:
pkg/workflow/andpkg/cli/)console.FormatError*functionsInfrastructure Assets:
.github/instructions/error-messages.instructions.md)pkg/console/)error_message_quality_test.go,error_validation_test.go)Metrics Collected:
Findings
Strengths
time_delta.godemonstrate exemplary error messages:consolepackage provides structured error formatting withFormatError,FormatErrorMessage, andFormatErrorWithSuggestionsAreas for Improvement
"failed to parse: %w"without context - Medium Impactcompiler.go(1617 lines) andpermissions.go(905 lines) may contain older error patterns - Low ImpactDetailed Analysis
Error Message Quality Distribution
Exemplary Files (>30% adoption):
time_delta.go- Nearly all errors include examples and clear guidancemcp-config.go- Recent updates show multi-line YAML examplesmanual_approval.go- Type validation with examplesFiles Needing Improvement:
compiler.go- 23 errors without examples (core compilation logic)runtime_setup.go- Generic "failed to" messagesrepository_features_validation.go- Wrapped errors without actionable guidanceError Message Categories
Category 1: Format/Syntax Errors (Good Coverage)
Category 2: Type Validation (Moderate Coverage)
Category 3: Configuration Errors (Mixed Coverage)
Category 4: Wrapped Errors (Needs Improvement)
Console Formatting Adoption
Current Usage:
console.FormatError()- Used for structured compiler errorsconsole.FormatErrorMessage()- Used for simple error displayconsole.FormatErrorWithSuggestions()- Used for actionable errors with hintsGap Analysis:
pkg/workflow/use plainfmt.Errorfwithout console formattingpkg/cli/show better console formatting adoption🤖 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 Permission Validation Error Messages
Priority: High
Estimated Effort: Medium
Focus Area: Configuration Validation
Description:
Improve error messages in
pkg/workflow/permissions.goto follow the three-part template: what's wrong + what's expected + example. The file is 905 lines and handles critical permission validation logic. Currently, many errors don't provide examples or clear guidance on valid permission configurations.Acceptance Criteria:
Code Region:
pkg/workflow/permissions.goTask 2: Add Examples to Compiler Error Messages
Priority: High
Estimated Effort: Large
Focus Area: Core Compilation Logic
Description:
The
pkg/workflow/compiler.gofile (1617 lines) contains 23 error messages without examples. This is a critical file for the user experience as compilation errors are frequently encountered. Enhance these errors to provide actionable guidance.Acceptance Criteria:
Code Region:
pkg/workflow/compiler.goTask 3: Standardize Runtime Setup Error Messages
Priority: Medium
Estimated Effort: Small
Focus Area: Error Context and Wrapping
Description:
The
pkg/workflow/runtime_setup.gofile contains several generic "failed to" error messages that wrap underlying errors without adding sufficient context. Enhance these to provide better debugging information.Acceptance Criteria:
Code Region:
pkg/workflow/runtime_setup.goTask 4: Create Error Reference Documentation
Priority: Medium
Estimated Effort: Medium
Focus Area: User-Facing Documentation
Description:
Create a comprehensive error reference page in the documentation (
docs/src/content/docs/reference/) that catalogs common workflow compilation and validation errors with solutions.Acceptance Criteria:
docs/src/content/docs/reference/errors.mdCode Region:
docs/src/content/docs/reference/errors.md(new file)Solution: Use combinations of h (hours), d (days), w (weeks), mo (months). Minimum unit is hours.
[Continue for 15-20 most common errors...]
MCP Configuration Errors
[...]
Permission Errors
[...]
Validation Errors
[...]
Use tables, code examples, and cross-links to related documentation. Follow the Diátaxis reference documentation style: organized by structure, comprehensive, authoritative.
Leave internal/wrapped errors unchanged. Focus on errors displayed directly to users.
Beta Was this translation helpful? Give feedback.
All reactions