🎯 Repository Quality Improvement Report - Workflow Validation and Error Feedback Quality #3956
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 Validation and Error Feedback Quality
Analysis Date: 2025-11-14
Focus Area: Workflow Validation and Error Feedback Quality
Strategy Type: Custom
Custom Area: Yes - This focus area examines repository-specific concerns around how the gh-aw compiler validates agentic workflows and provides actionable feedback to users when errors occur.
Executive Summary
The gh-aw repository demonstrates a mature and well-architected validation system with 16 dedicated validation implementation files, 510+ validation references, and comprehensive JSON schema validation with strict
additionalProperties: falseenforcement. The validation architecture is thoughtfully organized by domain (strict mode, permissions, expressions, packages, etc.) with clear separation of concerns.However, error message quality and actionability present opportunities for improvement. While the codebase has 257 error generation points and includes helpful error formatting utilities (
console.FormatErrorMessage,frontmatter_error.go), many error messages lack actionable suggestions, examples, or "did you mean" guidance. Thetime_delta.gofile demonstrates excellent error message patterns with specific format examples, but this pattern isn't consistently applied across the codebase.Key Findings:
Full Analysis Report
Focus Area: Workflow Validation and Error Feedback Quality
Current State Assessment
Metrics Collected:
additionalProperties: falseFindings
Strengths
validation.goheader documentation, separate files forstrict_mode_validation.go,pip_validation.go,npm_validation.go, etc.) demonstrates excellent software designadditionalProperties: falsecatch typos and invalid fields before they cause runtime issuesconsolepackage andfrontmatter_error.goprovide excellent error formatting capabilities with file/line/column positioningstrict_mode_validation.go) enforces security constraints for production workflowstime_delta.godemonstrates excellent error messages with format examples and specific guidanceAreas for Improvement
time_delta.goprovides examples like"Expected format like +25h, +3d, +1w, +1mo, +1d12h30m", many other error messages lack similar guidancepermisionsinstead ofpermissions)console.FormatErrorMessagedespite 257 error generation pointsDetailed Analysis
Validation System Architecture
The validation system is exemplary in its organization:
This structure follows the Single Responsibility Principle and makes the codebase highly maintainable.
Error Message Quality Analysis
Excellent Error Messages (time_delta.go):
These messages are excellent because they:
Typical Error Messages (strict_mode_validation.go):
These messages are clear but could be improved with:
Generic Error Messages:
These messages need:
Schema Validation Effectiveness
The JSON schemas are comprehensive (3,564 lines for main schema) and use strict validation with
additionalProperties: false(120 instances). This catches typos likepermisions,engnie,toolzearly in the compilation process.However, the schema validation errors could be enhanced with:
permisionsError Formatting Infrastructure
The
consolepackage provides excellent error formatting:But only ~24 uses of
console.FormatErrorMessagesuggests this infrastructure is underutilized. Many errors use plainfmt.Errorfinstead.🤖 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 processing.
Improvement Tasks
Task 1: Implement "Did You Mean" Suggestions for Schema Validation
Priority: High
Estimated Effort: Medium
Focus Area: Workflow Validation and Error Feedback Quality
Description:
When users make typos in workflow frontmatter fields (e.g.,
permisionsinstead ofpermissions,engnieinstead ofengine,toolzinstead oftools), the compiler should suggest the correct field name using fuzzy string matching.Implement Levenshtein distance-based suggestion system that:
Acceptance Criteria:
console.FormatErrorMessageinfrastructurepermisions,engnie,toolz,timeout_minute,runs_onCode Region:
pkg/workflow/schema_validation.go,pkg/parser/Task 2: Add Actionable Hints to Strict Mode Validation Errors
Priority: High
Estimated Effort: Small
Focus Area: Workflow Validation and Error Feedback Quality
Description:
Enhance strict mode validation error messages to include actionable hints about alternative approaches. When strict mode rejects an operation, users should understand why and how to achieve their goal safely.
Update all strict mode error messages in
pkg/workflow/strict_mode_validation.goto:Acceptance Criteria:
console.FormatErrorMessagewith hint fieldCode Region:
pkg/workflow/strict_mode_validation.goTask 3: Standardize Error Message Format with Examples
Priority: Medium
Estimated Effort: Medium
Focus Area: Workflow Validation and Error Feedback Quality
Description:
Create and enforce a standard format for validation error messages across the codebase, following the excellent pattern established in
time_delta.go. All validation errors should include: (1) what's wrong, (2) what was expected/valid format, (3) example of correct usage when applicable.Acceptance Criteria:
.github/instructions/error-messages.instructions.mdCode Region:
pkg/workflow/*.go(validation files),.github/instructions/**(redacted)
pkg/workflow/manual_approval.go**(redacted)
pkg/workflow/engine_validation.gopkg/workflow/manual_approval.gopkg/workflow/engine_validation.gopkg/workflow/mcp_config_validation.gopkg/workflow/permissions_validator.gopkg/workflow/docker_validation.gounknown field 'permisions' in frontmatter
Invalid Engine Value
Error Message:
Cause: Misspelled or unsupported engine identifier.
Solution: Use one of the supported engines:
copilot,claude,codex, orcustom.See also: Engine Configuration
Strict Mode Errors
Write Permission Not Allowed
Error Message:
Cause: Strict mode enforces security by restricting write permissions.
Solution: Use safe-outputs instead:
See also: Safe Outputs, Strict Mode
[Continue with 12+ more error scenarios...]
pkg/console/validation_summary.go:Beta Was this translation helpful? Give feedback.
All reactions