Skip to content

fix(plan): avoid impossible top-level field suggestions#3

Merged
sandover merged 1 commit intomainfrom
fix/plan-top-level-suggestions
Feb 28, 2026
Merged

fix(plan): avoid impossible top-level field suggestions#3
sandover merged 1 commit intomainfrom
fix/plan-top-level-suggestions

Conversation

@sandover
Copy link
Copy Markdown
Owner

@sandover sandover commented Feb 28, 2026

Summary

  • scope ergo plan typo suggestions to valid top-level keys only (title, body, tasks)
  • stop suggesting nested-only after for unknown top-level fields
  • add a regression test for top-level typo input (aftr)

Why

Top-level typos were receiving a misleading suggestion (after) that is only valid inside tasks[], which can send agents and humans down the wrong correction path.

Validation

  • go test ./...
  • pre-push CI hook (task ci): go mod tidy, golangci-lint, go test -race ./...

Constrain `ergo plan` unknown-field suggestions to top-level schema keys only.\nThis prevents suggesting `after` for unknown top-level keys, which is misleading because `after` is task-scoped only.\nRename the candidate list to clarify intent and preserve existing parser behavior.\nAdd a focused regression test for top-level typo input (`aftr`) to ensure no nested-only suggestion leaks through.\nKeep existing behavior for valid top-level suggestions (like `boddy` -> `body`).\nNo CLI contract changes beyond clearer parse_error messaging for this edge case.\nThis keeps feedback aligned with quickstart/spec input shape and reduces correction loops for agents.\nRisk is low: change is scoped to suggestion candidate selection for plan parsing only.\nTests: go test ./...
@sandover sandover merged commit 2ad1ea0 into main Feb 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant