[camera_android_camerax] Migrate check-readiness skill from bash to Dart#11943
[camera_android_camerax] Migrate check-readiness skill from bash to Dart#11943reidbaker wants to merge 41 commits into
Conversation
- Add dart_skills_lint dependency and configuration - Create .agents/skills and skills directories with documentation - Set up isolated third_party skills installation for remote skills - Symlink remote skills into .agents/skills - Add validate_skills_test.dart for CI integration
There was a problem hiding this comment.
Code Review
This pull request introduces a new local agent skill check-readiness to verify the environment, adds a custom lint rule to enforce that tracked skills are marked as internal, and implements proxy tests to run unit tests and validate skills. It also integrates several third-party skills via symlinks. The review feedback highlights several critical improvements: ensuring dependencies are resolved with pub get before running tests, avoiding crashes on broken symlinks by setting followLinks: false, adding safe type checks before casting YAML to a map, using Directory.current.path to robustly determine the workspace root, handling ProcessException when executing git commands, and updating the skill documentation to reference the Dart implementation instead of the duplicate bash script.
e1801ee to
d98795b
Compare
b113c22 to
a03abb1
Compare
a03abb1 to
307eb67
Compare
307eb67 to
f17e516
Compare
# Conflicts: # packages/camera/camera_android_camerax/.agents/skills/check-readiness/SKILL.md
There was a problem hiding this comment.
Code Review
This pull request replaces the bash-based readiness check script with a Dart-based tool, introduces a new --analyze-skills-for flag to the analyze command, and adds support for skipping packages ignored by .pubignore during validation. The review feedback suggests enhancing the .pubignore matching logic to recursively check ancestor path segments for directory patterns without trailing slashes, adding corresponding test cases, and enabling followLinks: true when scanning for Dart files in .agents/skills to support symlinked directories.
1. Migrated
check-readinessSkill to Dartscripts/check.shwith a Dart implementation.test/check_test.dart2. Tooling & CI Support for Agent Skills
--analyze-skills-forflag to theanalyzecommand. When set, it explicitly runsdart analyzeon the.agents/skillsdirectories of the configured packages.analyzeworkflow in.ci/targets/analyze.yamlto run analysis on camera's skills viascript/configs/skills_analysis.yaml..agents/skills/check-readinessis set up as a standalone Dart package with its ownpubspec.yaml, the repository's existingdart-testcommand automatically discovers and runs its unit tests..pubignoreparsing support toRepositoryPackageand integrated it into thevalidatecommand. Any subpackage matching.pubignorepatterns (e.g..agents/skills/) is now skipped by thevalidatecommand, ensuring internal/contributor-only tools do not fail publishing hygiene checks..agents/as developer-only changes. This exempts skill-only or script-only modifications within the.agents/directory from triggering version-bump and CHANGELOG update requirements.I asked my agent to articulate the interaction between top level packages tool commands and .agents/skills. Then I filtered the list to the command I thought reviewers or people looking at this pr later would find interesting.
Interaction of Packages Tool Commands with
.agents/skills.agents/skills?analyzetopLevelOnlypub geton the main package and all subpackages (including those in.agents/skills). If the main package is listed in--analyze-skills-for(configured in CI viascript/configs/skills_analysis.yaml), it explicitly runsdart analyze --fatal-infos .agents/skills.validateincludeAllSubpackages.pubignorespecifies.agents/, the skill packages are marked as ignored (isPubIgnored = true). Thevalidatecommand skips them entirely (SKIPPING: Ignored by .pubignore), exempting developer-only helper tools from public-facing package hygiene rules.dart-testincludeAllSubpackages.agents/skills/*. If a skill package contains atest/directory, it executes the Dart/Flutter unit tests inside it.formattopLevelOnlygetFilesForPackage) under the main package directory, formatting all Dart, C++, Java, Kotlin, and Swift files under.agents/skills/. It does not filter files using.pubignore.license-checkgit ls-files. Any file checked into Git under.agents/skills/is validated for standard first-party or recognized third-party license headers.fixincludeAllSubpackagesdart fix --applyinside any skill package directory that contains apubspec.yaml.update-dependencyincludeAllSubpackagespubspec.yamlwill be updated.update-min-sdkincludeAllSubpackagespubspec.yamlwhen run.remove-dev-dependenciesincludeAllSubpackagespubspec.yamlwhen targeted.publish-checktopLevelOnly.agents/is listed in.pubignore, the directory is excluded from the package archive and not uploaded or checked.publishtopLevelOnlypublish-check, the.agents/directory is skipped during publish due to.pubignore.fetch-depstopLevelOnlylistPre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2