39 Commits

Author SHA1 Message Date
Reid Baker f8408b8e76 feat: migrate from dart_skills_lint to skills_lint package (#226)
* feat: migrate from dart_skills_lint to skills_lint package

* Apply suggestion from @reidbaker

* test: improve skill linting and validation test robustness

* Update .github/workflows/skills_tool.yaml

* style: format test/lint_skills_test.dart

---------

Co-authored-by: Reid-Agent <269567208+reidbaker-agent@users.noreply.github.com>
2026-08-24 11:59:07 -04:00
John Ryan 8d2cd605fe Fix sync bot output
This sets the changes_detected variable, ensures that the exit code is
set, and that output are printed to $GITHUB_OUTPUT to help with
debugging.
2026-08-04 09:57:00 -07:00
Reid-Agent 7bddfa245c dart_skills_lint reduce enforced cognitive complexity (#212)
* Refactor internal return types and cognitive complexity

- Eliminate named record return types in _buildContext and _loadIgnores in favor of standard Future<T> single-value returns

- Audit and document _parse* methods in config_parser.dart and helper methods in test suites

- Extract top-level test helpers _createMockRelease and _runInstallScriptTest in install_script_test.dart to lower main function cognitive complexity score

- Update definition-of-done skill fail-threshold to 20

* Tighten CI cognitive complexity fail-threshold to 20 (#212)

* Automate CI threshold assertion and delegate DOD skill to CI workflow (#212)

* Move CI workflow consistency test out of recipe drift into dedicated test suite (#212)

* Remove unused normalizedSkillPath from _getIgnoresForSkill (#212)
2026-08-04 11:58:32 -04:00
Reid-Agent 135f796201 Migrate complexity linting to package:cognitive_complexity (#211)
* Migrate complexity linting to package:cognitive_complexity

* Fix cognitive_complexity target path in workflow

* Fix cognitive_complexity steps and coverage workflow in CI

* Pass repo-relative package paths to cognitive_complexity in workflow

* Fix zizmor audit findings for archived-uses and dependabot cooldown

* Trigger CI presubmit checks

* Update zizmor ignore comment position for archived-uses

* Inline zizmor ignore comment on uses line

* Address PR review: preserve dart_code_linter rules and revert dependabot/changelog edits

* Restore dart_code_linter comments in analysis_options.yaml

* Combine cognitive complexity checks into single multi-directory step

* Update definition-of-done SKILL.md metrics command to include test directory

* Add cognitive_complexity execution expectation to definition-of-done evals.json

---------

Co-authored-by: Reid Baker <reidbaker@google.com>
2026-08-03 17:30:11 -04:00
John Ryan b191b5da0a use very_good_workflows coverage_excludes
https://workflows.vgv.dev/docs/workflows/dart_package#coverage_excludes
2026-08-03 10:17:44 -07:00
dependabot[bot] 6195d6f060 Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [actions/github-script](https://github.com/actions/github-script) and [VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml](https://github.com/verygoodopensource/very_good_workflows).


Updates `actions/github-script` from 7.1.0 to 9.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/f28e40c7f34bde8b3046d885e986cb6290c5673b...3a2844b7e9c422d3c10d287c895573f7108da1b3)

Updates `VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml` from 86e2d68bb1e27b2518e4a2277205d23d21cb413c to 75f342c5d0b8c8adde3a2b7ea101e7e47897d1fc
- [Release notes](https://github.com/verygoodopensource/very_good_workflows/releases)
- [Changelog](https://github.com/VeryGoodOpenSource/very_good_workflows/blob/main/CHANGELOG.md)
- [Commits](https://github.com/verygoodopensource/very_good_workflows/compare/86e2d68bb1e27b2518e4a2277205d23d21cb413c...75f342c5d0b8c8adde3a2b7ea101e7e47897d1fc)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml
  dependency-version: 75f342c5d0b8c8adde3a2b7ea101e7e47897d1fc
  dependency-type: direct:production
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-03 16:54:46 +00:00
John Ryan b7e79966fe use actions/checkout version 7.0.1 2026-08-03 09:16:32 -07:00
John Ryan 922cba5e67 Add explanation for zizmore: ignore comments 2026-07-31 13:52:12 -07:00
John Ryan b700630091 Fix unpinned-uses error by stripping leading 'v' from 40-character commit SHA 2026-07-31 13:48:30 -07:00
John Ryan d8f8dffdad Fix coverage tool 2026-07-31 13:46:25 -07:00
John Ryan bb86ea49db use full commit SHA 2026-07-31 13:44:39 -07:00
John Ryan f911d210b5 Fix zizmor unpinned-uses by pinning very_good_coverage to hash with inline ignore comment 2026-07-31 13:41:58 -07:00
John Ryan f67e39d36b update hash 2026-07-31 13:40:03 -07:00
John Ryan 89a5f753cc Fix zizmor warning 2026-07-31 13:37:31 -07:00
John Ryan 09973e9f3e use very_good_workflows to avoid zizmor warning 2026-07-31 13:34:09 -07:00
John Ryan b630da4120 Fix / ignore zizmor warnings 2026-07-31 13:33:08 -07:00
John Ryan 1b81a4f70e Fix zizmor warnings 2026-07-31 13:18:09 -07:00
John Ryan 185b954b36 Pin GitHub actions to hash 2026-07-31 13:02:12 -07:00
John Ryan 119d735204 Configure bot to sync skills
This configures the GitHub user to flutter-skills-sync-bot. The PAT for this account is stored as the SYNC_PAT secret in settings.

Fixes #197
2026-07-31 12:44:10 -07:00
Keerti Parthasarathy 9e7239c433 Add a workflow to block external PR's against dart skills 2026-07-22 06:06:43 -07:00
dependabot[bot] 7da45757d4 Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


Updates `actions/checkout` from 4 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

Updates `peter-evans/create-pull-request` from 6 to 8
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-20 20:54:36 +00:00
Reid Baker 52a959374c Migrate tool/generator test to ConfigParser.loadConfig and clean up workflow (#186)
* Migrate generator test off deprecated resolvedRules onto resolvedRuleConfigs

* Remove duplicate validate_skills CLI workflow job

* Ensure lint_skills_test is path-resilient and asserts non-empty directoryConfigs

* Fix omit_local_variable_types lints in lint_skills_test.dart

* Simplify lint_skills_test to direct ConfigParser.loadConfig() call

* Update onboarding docs and skills to include directoryConfigs.isNotEmpty assertion when loading config

* Address PR discussion r3617291798: handle working directory when run from repo root

* Make working directory path resolution cross-platform for Windows, macOS, and Linux

* Format lint_skills_test.dart with dart format

---------

Co-authored-by: Reid-Agent <269567208+reidbaker-agent@users.noreply.github.com>
2026-07-20 16:52:02 -04:00
Reid-Agent b161bf2906 feat: add API boundary runner, relocate fixtures, and configure CI check (#183)
* feat: export RuleConfig and RuleConfigPatch in dart_skills_lint.dart

* docs: enforce diagnostic consumer migration step right inside check-downstream-consumers skill

* refactor: relocate examples, add API boundary runner and GHA validation config

* refactor: apply PR code review suggestions on API boundary path resolution and VM clean exit rules

---------

Co-authored-by: Reid Baker <reidbaker@google.com>
2026-07-17 11:23:23 -04:00
Keerti Parthasarathy fbb6bbcc0d Add configutation files for Claude Code plugin definition (#172)
* test: add sync workflow and dart tool script

* chore: auto-sync skills directory from dart-lang/skills

* Update workflow to support trigger from dart-lang/skills

* Update repo name

* Applied suggestions

* Address comments

---------

Co-authored-by: keertip <2192312+keertip@users.noreply.github.com>
2026-07-14 10:04:40 -07:00
Reid-Agent 0d624f342a build(ci): use macos-15-intel instead of deprecated macos-13 for release (#169)
* build(ci): update release workflow to use macos-15-intel instead of deprecated macos-13

* build(ci): replace unallowed softprops/action-gh-release with gh cli

---------

Co-authored-by: Reid Baker <reidbaker@google.com>
2026-06-18 18:20:28 -04:00
Reid Baker 12de4eb624 dart_skills_lint v0.4 prep: native binary preview track (#158)
* Add v0.4.0-dev.1 preview: native binary distribution

- New tag-triggered release workflow builds dart_skills_lint as a
  standalone native binary for macOS arm64/x64 and Linux x64/arm64
  via `dart compile exe`, packages each as a tarball with SHA256,
  and cuts a GitHub Release with release notes extracted from
  CHANGELOG.md.
- New install.sh detects OS/arch, downloads the matching tarball,
  verifies SHA256, and installs to INSTALL_DIR (default /usr/local/bin
  with sudo fallback). REPO/VERSION/INSTALL_DIR are env-configurable
  so the script survives the impending dart_skills_lint repo move
  with a single default-value edit.
- Pub.dev install paths (`dart pub global activate` and dev_dependency)
  are unchanged; binaries are a parallel channel.
- macOS binaries in this preview are unsigned. Homebrew formula is
  deferred until the new home repo is settled to avoid forcing
  early adopters through a re-tap on migration.

* Bump GitHub Actions to Node 24-compatible versions

- actions/upload-artifact: v4 → v7 (was the Node 20 deprecation
  warning source from the first fork test)
- actions/download-artifact: v4 → v8
- softprops/action-gh-release: v2 → v3

All three were on Node 20, which GitHub forces to Node 24 on
2026-06-16. Each matrix job uploads with a unique artifact
name, so v5+'s duplicate-name restriction is non-issue.
download-artifact v8's new error-on-hash-mismatch default is
a security upgrade.

* Update README install section for v0.4.0-dev.1 binary preview

Lead with install.sh as the recommended path; add a direct-curl
variant for environments that don't pipe scripts to bash. Keep
the pub.dev paths (dev_dependency and `dart pub global activate`)
unchanged under a "Dart developers" section.

Documents the macOS Gatekeeper workaround for unsigned preview
binaries, a brief note that Homebrew is coming after the imminent
repo migration, and the pinning syntax to opt into the preview
track. Bumps the stable caret range example from ^0.2.0 to ^0.3.0.

* Address Gemini review on install.sh

- install.sh:118 (high): print the macOS Gatekeeper note BEFORE the
  --help launch check so users see the xattr workaround even when
  Gatekeeper blocks the binary. On macOS, downgrade the --help
  failure from a hard err to an informational message since the
  install itself succeeded; the launch will work once quarantine
  is cleared. Non-macOS still hard-errs on launch failure.
- install.sh:80 (medium): strip leading '*' from SHA256SUMS field 2
  before comparison so binary-mode hash files (sha256sum -b output)
  work as well as text-mode.

* Address self-review on PR #158

- install.sh: collapse three hand-rolled "Supported: ..." messages
  behind one SUPPORTED_TARGETS constant, so the error text and the
  final platform check share a source of truth. Error text now lists
  normalized targets (macos-arm64, macos-x64, linux-x64, linux-arm64)
  instead of raw uname variants.
- CHANGELOG.md: shrink the 0.4.0-dev.1 entry to match the 0.3.1
  style — flat user-facing bullets, no internal workflow detail or
  Homebrew roadmap.
- README.md: reorder the Installation section so the pub.dev path
  (existing Dart audience) comes first, followed by install.sh and
  the direct-download path for the no-Dart preview audience.

* Refactor install.sh tests to be robust, add Linux tests and missing error coverage

* Fix custom linter warnings and format test file

* Fix omit_obvious_local_variable_types analyzer warning in test

* Pin softprops/action-gh-release to commit SHA to resolve review feedback

* Pin VeryGoodOpenSource/very_good_coverage to commit SHA

* Add tag mapping comments to pinned action commit SHAs
2026-06-17 14:27:27 -04:00
Reid Baker c1542ccd77 Remove dart_hooks directory and references (#155) 2026-06-04 17:12:35 -04:00
Reid Baker 0ecf358b05 dart_skills_lint v0.3 prep: paperwork, diagnostics, recipes, RULES.md (#143)
Better lint diagnostics
New ci integrations 
Better test coverage of documentation. 
Pana integration
2026-05-22 14:31:44 -04:00
Reid Baker 5519cc09e1 Fix flaky Windows dart analyze; enforce dart_code_linter on test/ (#145)
* Fix flaky Windows dart analyze; enforce dart_code_linter on test/

Drop the dart_code_linter analyzer `plugin` registration from
analysis_options.yaml. When registered, `dart analyze` loaded the plugin
in a separate isolate that re-emitted the `dart_code_linter:` rules as
diagnostics over the plugin protocol for all non-excluded files. Delivery
of those diagnostics to the CLI is asynchronous and racy, so on slower
Windows CI runners they intermittently appeared and `--fatal-infos` turned
them fatal -- a flaky, platform-specific failure (#144). `dart analyze` now
enforces only core lints, deterministically across platforms.

The dedicated `dart run dart_code_linter:metrics` step is the deterministic
enforcement path for those rules; extend it to cover `test` as well as
`lib` so the test suite gets real, cross-platform coverage instead of the
accidental flaky version.

Fix the test-file violations this surfaces:
- avoid-late-keyword: replace `late Directory tempDir` fixtures with a
  shared createTempDir() helper that registers cleanup via addTearDown,
  removing duplicated tearDown blocks.
- avoid-dynamic: `dynamic noSuchMethod` -> `Object?`.
- avoid-redundant-async: drop the redundant async in a setUp.

Exclude prefer-match-file-name for test/**: test files must be named
`*_test.dart` and commonly hold several small fixture classes, so they
cannot match the rule's "file name == first class name" convention.

* Exclude avoid-late-keyword for tests instead of placeholder workaround

Address review feedback: rather than initializing tempDir fixtures to a
placeholder to satisfy avoid-late-keyword, exclude the rule for test/**
(as already done for prefer-match-file-name). `late` for fields assigned
in setUp is the idiomatic Dart test pattern. Reverts the createTempDir
helper and placeholder initializations; fixtures are plain `late` again.

The genuine, non-late fixes are kept: avoid-dynamic (Object? noSuchMethod)
and avoid-redundant-async (drop async from a sync setUp).

* Apply suggestion from @reidbaker
2026-05-22 09:55:52 -04:00
Reid Baker ffe7a5d6b2 Add CI line-coverage gate for dart_skills_lint (#142)
* Add CI line-coverage gate for dart_skills_lint

Collect coverage with `dart test --coverage`, convert to LCOV via the
already-transitive package:coverage, and enforce a minimum threshold in
CI with the VeryGoodOpenSource/very_good_coverage action (min 73%,
excluding *.g.dart). Adds contributor docs and a CHANGELOG entry. No new
pub dependencies and no custom coverage parsing to maintain.

* Document --ignore-files to exclude *.g.dart from local coverage
2026-05-21 21:15:26 -04:00
Reid Baker b12e69ad9e Add workflow, fix presubmits to run on workflow and run formatting with dart 3.12 2026-05-07 14:36:03 -04:00
Reid Baker a21ed42c99 Add cyclomatic complexity linting to dart_skills_lint codebase 2026-05-01 18:06:01 -04:00
Reid Baker 50520e2583 Fix PR failures: update workflow and format files 2026-04-10 15:03:46 -04:00
Reid Baker 4603098a56 Setup precommit linting, formatting, analyzing 2026-04-07 11:39:18 -04:00
dependabot[bot] e87ed2944a Bump actions/checkout from 4 to 6 in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 10:24:05 +00:00
Jaime Wren 47f1911697 chore: restrict workflow trigger paths and working directory to tool/generator 2026-03-31 14:57:46 -07:00
Jaime Wren 90636dc21d Add Flutter integrate dart test into the CI workflow.
Expected to fail on initial PR creation, not out for review yet.

https://github.com/flutter/flutter/issues/183124
2026-03-02 13:08:39 -08:00
Jaime Wren 11b066705f Add a second GitHub actions workflow
Adds a GitHub Actions workflow to automatically run CI checks for the skills CLI tool. Tests are run on both Ubuntu, Mac and Windows for the `stable` and `dev` Dart SDK channels. The workflow triggers on pushes and pull requests to the main branch that modify the `tool/` directory, and runs:
- `dart pub get`
- `dart analyze --fatal-infos`
- `dart format` (on the dev channel only)
- `dart test` - is currently omitted as the test suite needs to be refactored to work properly without relying on real API keys in the CI environment

https://github.com/flutter/flutter/issues/183124
2026-03-02 10:41:30 -08:00
Jaime Wren 1d08991346 Create the initial github action for the skills repo
Same as content in dart-lang/ai: https://github.com/dart-lang/ai/commit/5ecadd3f967b6f663bb36504a589c5ae8ba2dab8
2026-02-27 12:30:22 -08:00