Description
The Repository Quality Improvement agent (discussion #29116) found that pkg/workflow/compiler_validators.go is 465 lines — 55% over the AGENTS.md hard limit of 300 lines. The file mixes multiple validation concerns, with validatePermissions alone spanning ~100 lines.
AGENTS.md specifies:
- Hard limit: 300 lines per validation file
- 30% comment coverage minimum
- Each validator file should have a single responsibility
Currently oversized validation files (all violating the hard limit):
| File |
Lines |
pkg/workflow/compiler_validators.go |
465 |
pkg/workflow/safe_outputs_validation_config.go |
440 |
pkg/workflow/permissions_validation.go |
359 |
pkg/cli/run_workflow_validation.go |
350 |
Expected Fix
- Extract
validatePermissions from compiler_validators.go into a new pkg/workflow/permissions_compiler_validator.go
- Verify that
compiler_validators.go drops below 300 lines after extraction
- Ensure comment coverage meets the 30% minimum in extracted file
Expected Impact
AGENTS.md compliance, improved navigability and testability of the validator layer.
Suggested Agent
Copilot or Claude code agent — mechanical extraction with existing patterns in the codebase as guidance.
Estimated Effort
Quick (< 1 hour)
Data Source
DeepReport Intelligence Briefing — 2026-04-29 · Repository Quality discussion #29116 · Run §25117657405
Generated by DeepReport - Intelligence Gathering Agent · ● 654.3K · ◷
Description
The Repository Quality Improvement agent (discussion #29116) found that
pkg/workflow/compiler_validators.gois 465 lines — 55% over the AGENTS.md hard limit of 300 lines. The file mixes multiple validation concerns, withvalidatePermissionsalone spanning ~100 lines.AGENTS.md specifies:
Currently oversized validation files (all violating the hard limit):
pkg/workflow/compiler_validators.gopkg/workflow/safe_outputs_validation_config.gopkg/workflow/permissions_validation.gopkg/cli/run_workflow_validation.goExpected Fix
validatePermissionsfromcompiler_validators.gointo a newpkg/workflow/permissions_compiler_validator.gocompiler_validators.godrops below 300 lines after extractionExpected Impact
AGENTS.md compliance, improved navigability and testability of the validator layer.
Suggested Agent
Copilot or Claude code agent — mechanical extraction with existing patterns in the codebase as guidance.
Estimated Effort
Quick (< 1 hour)
Data Source
DeepReport Intelligence Briefing — 2026-04-29 · Repository Quality discussion #29116 · Run §25117657405