Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tool/dart_skills_lint/.agents/skills/run-evals/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ metadata:

# Run Skill Evals

1. **Read Framework**: Read `tool/dart_skills_lint/evals/README.md` for understanding the difference between per-skill evals and cross-skill evals.
2. **Locate Targets**: Find target `evals/evals.json` files inside `.agents/skills/` and/or `skills/`. For cross-skill evaluations, look for `*_evals.json` files directly in `tool/dart_skills_lint/evals/`.
1. **Read Framework**: Read `<target-package-root>/evals/README.md` for understanding the difference between per-skill evals and cross-skill evals (where `<target-package-root>` is the directory containing the `.agents` or `skills` folder).
2. **Locate Targets**: Find target `evals/evals.json` files inside `.agents/skills/` and/or `skills/`. For cross-skill evaluations, look for `*_evals.json` files directly in `<target-package-root>/evals/`.
3. **Determine Agent Configuration**: Check the `agent_config` field in the target target JSON file to determine the environment/harness to spawn. If `agent_config` is `"bare-agent"`, spawn a subagent with the `bare-agent` profile. If it is a specific contributor profile (e.g. `"reidbaker-agent"`), use that profile to provide the necessary contributor context.
4. **Orchestrate**: By default, run an Integration Test by spawning a single **With-Skill** subagent using `Workspace: branch` and the identified `agent_config`.
- Provide the task prompt. See `resources/with_skill_execution_prompt.md` for the template. When filling in `<path-to-skill>`, you MUST use a relative path from the repository root, not an absolute path. If you are running a cross-skill evaluation, fill in `<path-to-skill>` with `"none (cross-skill meta-eval)"`.
- Provide the task prompt. See `resources/with_skill_execution_prompt.md` for the template. When filling in `<path-to-skill>`, you MUST use a relative path from the repository root, not an absolute path. If you are running a cross-skill evaluation, fill in `<path-to-skill>` with `"none (cross-skill meta-eval)"`. Also, replace `<target-package-root>` with the actual directory path in both templates.
- **Only if the user explicitly requests a comparison or benchmark**, also spawn a **Baseline** subagent. See `resources/baseline_execution_prompt.md` for the template.
Instruct the subagent(s) to return their `git diff` and verification outputs (`dart format`, `dart analyze`, `dart test`) without committing.
Instruct the subagent(s) to return their `git diff` and verification outputs (`dart pub get`, `dart format`, `dart analyze`, `dart test`) without committing. Ensure you instruct them to run these commands exclusively from within the `<target-package-root>` directory to avoid analyzing unrelated packages.
**CRITICAL**: You must explicitly warn the subagent(s) to confine all file edits strictly to their current working directory and avoid using absolute paths to modify the parent workspace.
**WORKSPACE LIMITATION WARNING**: If the user has multiple active workspaces mounted, the `Workspace: branch` feature will fail. In this situation, you MUST warn the user that running concurrent evaluations in `Workspace: inherit` mode will cause git state bleed and cross-eval pollution (e.g., changes made by a failure scenario will be visible to a success scenario running simultaneously in the same shared directory). Instruct the user to fix this by closing all workspaces except the primary package workspace, and then re-run the evaluations. Do NOT silently fallback to `Workspace: inherit` for concurrent tasks.
5. **Grade**: Parse the combined rubric (resolving `repo_criteria` + `evals.json` expectations). Use the grading instructions in `resources/agent_judge_prompt.md`. When an expectation fails, you MUST explicitly list both the expectation and what was actually found that caused the failure.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"repo_criteria": [
"evals/code_quality_rubric.json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it because of the feedback from the code review bot on the upstream flutter/packages PR (#12285). The bot flagged that when downstream consumers (like camera_android_camerax) adopt the run-evals skill, they typically don't have the evals/code_quality_rubric.json file in their repository root, which causes the eval runner to crash with a file not found error.

Additionally, according to evals/README.md (## Cross-Cutting Rules), only "Skills that author or modify code MUST adhere to the universal code quality expectations". Since run-evals is an orchestrator skill that only spawns subagents and doesn't write Dart code itself, it seemed safe to remove it from this specific skill's criteria.

Should I put it back and find a different way to resolve the downstream missing file issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for now. My gut says that we will end up moving both the code_quality_rubric.json and its evals into the run-evals skill so the rubric can be shared with consumers.

],
"evals": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ Execute this task:

WARNING: You are executing in an isolated branch workspace. Confine all file modifications strictly to your current working directory. Do NOT use absolute paths to modify files in the parent workspace.

Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart format`, `dart analyze`, `dart test`).
Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart pub get`, `dart format`, `dart analyze`, `dart test`).
CRITICAL: You must explicitly `cd` into the `<target-package-root>` directory before running any verification commands to avoid analyzing unrelated packages in the workspace!
NOTE: If your task is strictly to grade, review, or evaluate code, do NOT fix the issues you find. Leave the code exactly as it is, even if verification commands fail. Your job is only to report the evaluation results.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Execute this task:

WARNING: You are executing in an isolated branch workspace. Confine all file modifications strictly to your current working directory. Do NOT use absolute paths to modify files in the parent workspace.

Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart format`, `dart analyze`, `dart test`).
Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart pub get`, `dart format`, `dart analyze`, `dart test`).
CRITICAL: You must explicitly `cd` into the `<target-package-root>` directory before running any verification commands to avoid analyzing unrelated packages in the workspace!
NOTE: If your task is strictly to grade, review, or evaluate code, do NOT fix the issues you find. Leave the code exactly as it is, even if verification commands fail. Your job is only to report the evaluation results.
7 changes: 7 additions & 0 deletions tool/dart_skills_lint/evals/code_quality_rubric.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
"Source code must be placed in 'lib/', tests in 'test/', and executable scripts in 'bin/' or 'tool/'.",
"No temporary scratch files or orphaned directories are left behind after execution."
]
},
{
"id": "lint_cheating",
"expected_repo_state": [
"No lint configurations (e.g., analysis_options.yaml or its rules) are removed or disabled.",
"No file-level Dart ignores (e.g., // ignore_for_file:) are added to any Dart files."
Comment thread
reidbaker marked this conversation as resolved.
]
}
]
}
3 changes: 2 additions & 1 deletion tool/dart_skills_lint/evals/code_quality_rubric_evals.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"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."
"The evaluation artifact explicitly flags a failure for cross platform compatibility.",
"The evaluation artifact explicitly flags a failure for lint cheating."
],
"agent_config": "reidbaker-agent"
},
Expand Down
Loading