[Schema Consistency] Example Coverage & Dead Code Detection #5058
Closed
Replies: 1 comment
-
|
⚓ Avast! This discussion be marked as outdated by Schema Consistency Checker. |
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.
-
Analyzed documentation examples, real workflow usage patterns, and schema definitions to identify consistency gaps and documentation completeness issues. Found one dead code field, multiple fields lacking practical examples, and opportunities to improve feature discoverability.
Key Findings: Discovered
githubActionsStepas dead code in schema (not in parser, never used, undocumented), identified 20+ advanced fields without practical examples, and confirmed 60% of schema fields lack both documentation examples and real-world usage.Complete Analysis Report
Summary
Critical Issues
1. githubActionsStep: Dead Schema Definition
Severity: HIGH - False capability advertisement
Description: Complete GitHub Actions step object definition exists in schema but is completely unused throughout the codebase.
Evidence:
pkg/parser/schemas/main_workflow_schema.jsonname,id,if,uses,run,with,env,continue-on-error,timeout-minutes,working-directory,shellpkg/parser/frontmatter.go)Impact:
Location:
pkg/parser/schemas/main_workflow_schema.json:L[property: githubActionsStep]Recommendation:
2. runtimes Field: Zero Adoption
Severity: MEDIUM - Documented feature with no usage
Description: Runtime overrides field defined in schema and mentioned in documentation but never used in any workflow.
Evidence:
Impact:
Location:
pkg/parser/schemas/main_workflow_schema.json:properties.runtimesRecommendation:
3. sandbox Field: Copilot-Only, Low Adoption
Severity: MEDIUM - Important feature but underdiscoverable
Description: Sandbox runtime configuration for AI engines only used in 2 workflows despite being important for Copilot engine.
Evidence:
Impact:
Location:
pkg/parser/schemas/main_workflow_schema.json:properties.sandbox.github/workflows/smoke-srt.md,.github/workflows/smoke-srt-custom-config.mdRecommendation:
docs/src/content/docs/reference/engines.md(Copilot section)Documentation Gaps
4. Missing Practical Examples for Advanced Fields
Severity: MEDIUM - Discoverability issue
Description: 20+ schema fields lack practical documentation examples despite being fully implemented.
Fields without examples (never used in 90 workflows):
command- Command triggers (complex object form with events)concurrency- Concurrency control patternscontainer- Container configurationenv- Environment variables in frontmatter contextenvironment- Environment protection rulesfeatures- Feature flags for experimental capabilitiesgithub-token- Token configuration and precedencejobs- Custom pre-execution jobsmcp-servers- MCP server configuration patternspost-steps- Post-execution cleanup stepsroles- Repository access role configurationrun-name- Custom workflow run namingruns-on- Runner specification beyond defaultssafe-outputs- Safe output configuration examplessecret-masking- Secret masking configurationservices- Service container patternstracker-id- Asset tracking identifier usageImpact:
Current State:
Recommendation:
jobs,post-steps,github-token,safe-outputs,concurrencycommand(object form),container,services,mcp-servers,env5. Documentation Examples Not Validated Against Schema
Severity: LOW - Quality assurance gap
Description: Code examples in documentation are not programmatically validated against the JSON Schema, risking example drift as schema evolves.
Evidence:
Risk:
Recommendation:
gh aw compileon all doc examples6. Example Distribution Imbalance
Severity: LOW - User experience issue
Description: Documentation and real workflows heavily favor basic features while advanced features lack representation.
Usage Distribution:
Pattern Analysis:
Recommendation:
Schema Improvements Needed
7. Schema Dead Code Cleanup
Required Actions:
githubActionsStepdefinition (47 lines)runtimesif no use case clarified (36 lines)sandboxas Copilot-only in schema descriptionImpact: Cleaner schema, reduced confusion, smaller validation surface
8. Schema Metadata Enhancements
Current State:
examplesfield)Recommendations:
examplesarrays to frequently-used fieldsx-engine-supportcustom property:["claude", "copilot", "codex"]x-maturityproperty:"stable","experimental","deprecated"x-see-alsolinks to documentation sectionsParser Updates Required
None required for current findings. All investigated fields either:
Parser-schema consistency is GOOD for all active fields.
Workflow Violations
No violations found. All 90+ workflows validate correctly against schema. This analysis focused on:
Recommendations
Immediate Actions (This Week)
Remove
githubActionsStepfrom schema - Dead code cleanuppkg/parser/schemas/main_workflow_schema.jsonAdd "Advanced Examples" documentation section
docs/src/content/docs/examples/advanced-patterns.mdDocument sandbox in Copilot engine docs
docs/src/content/docs/reference/engines.mdShort Term (Next Sprint)
Create example validation CI
gh aw compileon each exampleAdd practical examples for top 10 fields
Clarify or remove runtimes field
Long Term (Next Quarter)
Create "Cookbook" documentation section
Implement schema metadata enhancements
Monitor field adoption metrics
Strategy Performance
Results
Comparison to Previous Run (2025-10-26)
Strategy Strengths
Strategy Limitations
Should Reuse?
YES - Highly recommended every 4-6 weeks
Reasons:
Best Used With:
Next Steps
For Repository Maintainers
Review and approve githubActionsStep removal
Prioritize example documentation
Set up example validation CI
For Users
If you're using gh-aw and wondering about features:
githubActionsStep- it doesn't work (will be removed)Appendix: Field Usage Statistics
Universal Fields (Used in 100% of workflows)
description- 20/20 (100%)Very Common (50%+ usage)
on- 10/20 (50%)permissions- 10/20 (50%)Common (25-49% usage)
tools- 9/20 (45%)engine- 9/20 (45%)strict- 5/20 (25%)network- 5/20 (25%)imports- 5/20 (25%)Occasional (10-24% usage)
name- 3/20 (15%)if- 2/20 (10%)Rare (1-9% usage)
steps- 1/20 (5%)source- 1/20 (5%)sandbox- 2/90 (2.2% of full corpus)Never Used (0% in samples)
All other schema fields - see "Documentation Gaps" section above
Methodology Notes
Data Collection
Analysis Techniques
Validation
Limitations
Key Insights Summary
Implementation Priority
Must Do (High Impact, Low Effort)
githubActionsStepfrom schemaShould Do (High Impact, Medium Effort)
Nice to Have (Medium Impact, Various Effort)
Beta Was this translation helpful? Give feedback.
All reactions