Description
pkg/parser — the primary frontmatter/workflow validation surface (import_field_extractor.go, mcp.go, inline_skill_extractor.go, sub_agent_extractor.go, etc.) — has zero usages of the project's own NewValidationError(field, value, reason, suggestion string) helper (defined pkg/workflow/workflow_errors.go:81), despite the error-messages skill recommending it for *_validation.go-style logic. Two concrete duplicate-name sites verified live on main (commit f2e8122):
pkg/parser/inline_skill_extractor.go:118 → fmt.Errorf("duplicate inline skill name %q", name)
pkg/parser/sub_agent_extractor.go:238 → fmt.Errorf("duplicate inline sub-agent name %q", name)
Neither states what's expected or suggests a fix (rename/remove the duplicate).
Fix
Convert both sites to NewValidationError, providing a field (e.g. "skills" / "sub-agents"), the duplicate name as value, a reason ("duplicate name already defined"), and a suggestion showing how to rename or remove one of the duplicates. Update/add tests in pkg/parser covering the duplicate-name error. Run make fmt and go test ./pkg/parser/....
Expected Impact
First real adoption of the structured validation-error helper in pkg/parser, giving actionable errors for a common frontmatter authoring mistake (duplicate skill/sub-agent names) and setting a pattern for future validation sites in the package.
Suggested Agent
Copilot coding agent.
Estimated Effort
Medium (1-4 hours)
Data Source
DeepReport Intelligence Briefing 2026-08-21, mining discussion #54543, Task 4.
Generated by 🔬 Deep Report · agent · 106.7 AIC · ⌖ 8.62 AIC · ⊞ 12.4K · ◷
Description
pkg/parser— the primary frontmatter/workflow validation surface (import_field_extractor.go,mcp.go,inline_skill_extractor.go,sub_agent_extractor.go, etc.) — has zero usages of the project's ownNewValidationError(field, value, reason, suggestion string)helper (definedpkg/workflow/workflow_errors.go:81), despite theerror-messagesskill recommending it for*_validation.go-style logic. Two concrete duplicate-name sites verified live onmain(commit f2e8122):pkg/parser/inline_skill_extractor.go:118→fmt.Errorf("duplicate inline skill name %q", name)pkg/parser/sub_agent_extractor.go:238→fmt.Errorf("duplicate inline sub-agent name %q", name)Neither states what's expected or suggests a fix (rename/remove the duplicate).
Fix
Convert both sites to
NewValidationError, providing afield(e.g."skills"/"sub-agents"), the duplicatenameasvalue, areason("duplicate name already defined"), and asuggestionshowing how to rename or remove one of the duplicates. Update/add tests inpkg/parsercovering the duplicate-name error. Runmake fmtandgo test ./pkg/parser/....Expected Impact
First real adoption of the structured validation-error helper in
pkg/parser, giving actionable errors for a common frontmatter authoring mistake (duplicate skill/sub-agent names) and setting a pattern for future validation sites in the package.Suggested Agent
Copilot coding agent.
Estimated Effort
Medium (1-4 hours)
Data Source
DeepReport Intelligence Briefing 2026-08-21, mining discussion #54543, Task 4.