feat(engine): carry rule rationale on every check note - #7
Merged
Conversation
A check note gave an agent the one-line message and nothing else -- to learn why a flag was a tell (and decide whether an info-severity one was worth acting on) it had to shell out to `explain` separately. That's the whole value of the info tier, so it shouldn't be a second round trip. Note gains a `rationale` field, populated from the owning rule and threaded through both output formats: JSON carries it plainly, and human output gets a `why:` line between `excerpt` and `fix`, mirroring explain's Why/Fix order. README and docs/SPEC.md examples updated to match, including the CLI help banner's note-schema summary. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KKRi7mTZKtDeo47FnYMP3t
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.
Summary
Follow-up from #6:
checkgave an agent a one-line message and nothing else — to learn why a flag was a tell (and decide whether aninfo-severity one was worth acting on) it had to shell out toexplainseparately. That's the whole value of theinfotier, so it shouldn't be a second round trip.Notegains arationalefield, populated from the owning rule.why:line betweenexcerptandfix, mirroringexplain's Why/Fix order.docs/SPEC.mdexamples updated to match, including the CLI help banner's note-schema summary.Example
Testing
rspec— 226 examples, 0 failures.🤖 Generated with Claude Code
https://claude.ai/code/session_01KKRi7mTZKtDeo47FnYMP3t