Add no-invalid-agent-fields and enum-return-needs-as-const lint rules - #257
Merged
pelikhan merged 2 commits intoJul 28, 2026
Merged
Conversation
… rules Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Daily rig evaluation for July 28, 2026
Add no-invalid-agent-fields and enum-return-needs-as-const lint rules
Jul 28, 2026
pelikhan
marked this pull request as ready for review
July 28, 2026 19:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two friction points identified in the daily rig evaluation: misspelled
agent()spec keys are silently dropped at runtime, and bare string literal returns indefineToolhandlers widen tostring, causing type errors at the schema comparison site rather than the return site.New rules
rig/no-invalid-agent-fieldsFlags unknown keys on the
agent({...})spec object. TypeScript's excess property checking doesn't reliably catch these.Available in both the tokenizer-based standalone linter (
lint.js) and the ESLint plugin. No autofix.rig/enum-return-needs-as-constFlags bare string literal returns inside
handler:bodies that lackas const.ESLint-plugin only — the tokenizer cannot track scope to limit checks to
handler:bodies.Documentation
references/linting.md: added rule docs with examples for both rulesSKILL.md:addons: repair()→addons: [repair()]for consistency with the array form; added composition invariants for valid agent fields and theas constrequirement