Repository navigation
Ship tested rules files for 18 stacks, with a test harness - #22
Merged
Merged
Conversation
docs/rules-files.md sets the layout and the quality bar for shipped rules files. tools/Invoke-RulesEval.ps1 builds the exact prompt the pipeline sends for each sample change under evals/, asks a model (Anthropic, OpenAI, Azure OpenAI, or manual answers), and scores caught, missed and noisy comments. Pester checks that every sample is well formed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
The samples contain made-up credentials on purpose. gitleaks flagged a role definition GUID in the Bicep clean sample as a generic API key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Retry rate limits and overloads, fall back to tool_choice auto for models that refuse a forced tool, accept answers nested or sent as a JSON string, count an unparseable answer against the stack instead of stopping the run, save every answer, add -Rescore, alsoAt locations and an all-runs summary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Model runs against the rules samples showed reviewers posting WARNING comments that conclude the code is fine, posting questions about code outside the diff as WARNING, and lowering the severity a repository rule names. Three rules now cover these cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Opus found real bugs in four clean samples (a stale error state, a same-wallet transfer and lock order, a PATCH that erased a field, a rate limiter that grew without bound); those samples are fixed or replaced. Some expectations now accept a second fair line or a lower severity where the planted bug could not be judged from the diff alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn
Shipped rules files must pass on a large model in three runs. Scores for a large and a small model are published per stack in docs/rules-results.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn Signed-off-by: Claude <noreply@anthropic.com>
ziadantar90
marked this pull request as ready for review
November 2, 2026 16:08
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.
Requested by Ziad · project thread
What
PullPicket now ships production-grade rules files instead of three short examples. Each file has sample pull requests that test it.
docs/rules-files.mddefines the file layout and how a good rule is written. A file ships only when, on a large model at default settings and in each of three runs, every planted CRITICAL is caught at CRITICAL, at least 80% of planted WARNINGs are caught, and no clean sample gets a CRITICAL or WARNING comment. Small-model scores are published per stack instead of held to the same bar (Ziad's call).tools/Invoke-RulesEval.ps1(functions intools/RulesEval.ps1) uses the engine's own functions to build the exact prompt the pipeline sends. It calls Anthropic, OpenAI or Azure OpenAI, or scores saved answers (-Provider manual,-Rescore), and reports caught, underrated, missed and noise per stack and run. It exits 1 on a failure.evals/<stack>/<sample>/, each abefore//after/tree plus anexpect.json. Every stack has a clean sample.ai-code-review/tests/RulesEval.Tests.ps1checks every sample and the scoring logic. No model is called in CI.docs/rules-results.mdpublishes the per-stack scores. README, CHANGELOG and CONTRIBUTING are updated.Results (3 runs per sample, 2 Nov 2026)
The one large-model miss was a
latestimage tag rated SUGGESTION instead of WARNING in one run. The small model catches most bugs but adds noise on clean Terraform, Bicep, Django, Next.js and C++ samples, and rates SQL migration and Terraform criticals lower. The docs recommend a mid-sized or large model. Full table:docs/rules-results.md.Checks run locally
🤖 Generated with Claude Code
https://claude.ai/code/session_01D8A4vxmHJ5PCcJknu3yJHn