-
Notifications
You must be signed in to change notification settings - Fork 159
Test code quality rubric with static datasets (Meta-Evals) #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
reidbaker
merged 10 commits into
flutter:main
from
reidbaker:feature/test-code-quality-rubric
Jul 24, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3c92a1e
Add static dataset and meta-eval for code quality rubric
reidbaker 5e71e4f
Add positive test case and README docs for meta-evals
reidbaker 139b5a1
Update evals.json schema: move repo_criteria to top and remove skill_…
reidbaker 3104642
Address remaining PR 194 feedback: fix test-rubric lints
reidbaker cc0793a
Address PR review: resolve package directory dynamically in tests usi…
reidbaker aafba2e
Add contributor-pr-description to prevent-skills-sh-publishing config
reidbaker a3616a8
Refactor test-rubric dummy skill into standalone code_quality_rubric_…
reidbaker 8cb2f8f
Update baseline execution prompt to avoid fixing code on grading tasks
reidbaker bc82b1f
Add copyright headers to test fixtures
reidbaker 95b7efc
Update with_skill execution prompt to avoid fixing code on grading tasks
reidbaker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
31 changes: 31 additions & 0 deletions
31
tool/dart_skills_lint/evals/code_quality_rubric_evals.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "repo_criteria": [ | ||
| "evals/code_quality_rubric.json" | ||
| ], | ||
| "evals": [ | ||
| { | ||
| "id": 1, | ||
| "prompt": "Grade the code in 'evals/test_data/bad_code/tmp/bad_script.dart' using the code_quality_rubric.json.", | ||
| "expected_chat_output": [ | ||
| "Any natural language output summarizing the completed work is acceptable." | ||
| ], | ||
| "expected_repo_state": [ | ||
| "The evaluation artifact explicitly flags a failure for directory placement hygiene.", | ||
| "The evaluation artifact explicitly flags a failure for effective Dart idioms.", | ||
| "The evaluation artifact explicitly flags a failure for cross platform compatibility." | ||
| ], | ||
| "agent_config": "reidbaker-agent" | ||
| }, | ||
| { | ||
| "id": 2, | ||
| "prompt": "Grade the code in 'evals/test_data/ok_code/bin/good_script.dart' using the code_quality_rubric.json.", | ||
| "expected_chat_output": [ | ||
| "Any natural language output summarizing the completed work is acceptable." | ||
| ], | ||
| "expected_repo_state": [ | ||
| "The evaluation artifact explicitly flags that all code quality criteria passed successfully without any failures." | ||
| ], | ||
| "agent_config": "reidbaker-agent" | ||
| } | ||
| ] | ||
| } |
19 changes: 19 additions & 0 deletions
19
tool/dart_skills_lint/evals/test_data/bad_code/tmp/bad_script.dart
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file | ||
| // for details. All rights reserved. Use of this source code is governed by a | ||
| // BSD-style license that can be found in the LICENSE file. | ||
|
|
||
| // ignore_for_file: unused_local_variable, prefer_final_locals, avoid_print, use_raw_strings | ||
|
|
||
| // Violates placement hygiene (in tmp/ instead of bin/ or lib/) | ||
| // Violates cross-platform compatibility (hardcoded Windows path) | ||
| // Violates effective Dart idioms (raw strings instead of interpolation) | ||
|
|
||
| void main() { | ||
| var user = 'Test'; | ||
|
|
||
| // Anti-pattern: Raw string concatenation instead of interpolation | ||
| print(r'Hello ' + user); | ||
|
|
||
| // Anti-pattern: Hardcoded platform specific path | ||
| var path = 'C:\\my\\path\\data.txt'; | ||
| } | ||
19 changes: 19 additions & 0 deletions
19
tool/dart_skills_lint/evals/test_data/ok_code/bin/good_script.dart
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file | ||
| // for details. All rights reserved. Use of this source code is governed by a | ||
| // BSD-style license that can be found in the LICENSE file. | ||
|
|
||
| import 'package:path/path.dart' as p; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file needs a copyright statement. |
||
|
|
||
| void main() { | ||
| const user = 'Test'; | ||
|
|
||
| // Interpolation (clean Dart idiom) | ||
| const message = 'Hello $user'; | ||
|
|
||
| // Cross platform path | ||
| final String path = p.join('my', 'path', 'data.txt'); | ||
|
|
||
| if (message.isEmpty || path.isEmpty) { | ||
| throw Exception('Validation failed'); | ||
| } | ||
| } | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs a copyright statement.