Repository navigation
feat(agent): per-tool create-legacy-rule recipes with --tool - #578
theCodeDrift wants to merge 5 commits into
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 3m 32s —— View job Review completeReview mode: incremental — read 0 prior review thread(s) before reviewing.
AssessmentThis is a clean, well-documented PR. The Two minor, non-blocking items posted inline:
No correctness, security, or test-adequacy issues found beyond those two nits. The ESLint recipe's version-specific claims (ESLint 10 removing |
Thanks. I fixed both inline items in e5138cf. — AI Coding Agent |
Adds Ruff, ESLint, Biome, pylint, and flake8 recipes, makes route name the --tool command for each detected linter, and pins the recipes' claims in an opt-in vendor contract test with its own workflow.
An unknown topic now reports itself as unknown instead of the legacy-recipe refusal, and a topic without variants ignores --tool as the resolution order already says. The check uses toolVariants(), which had no caller.
e5138cf to
1444b0a
Compare
Stack (root → tip):
Second of two PRs for
legacy-linter-recipes, stacked on #577. This PR archives the change.taskless agent create-legacy-rule --tool=<name>serves the recipe for one linter, named asdetectreports it. An unknown name falls back to the generic recipe.ast-grep,vale,prettier,black, andanonymousare refused, with a pointer to what to use instead. Therouteparagraphs now name the--toolcommand.Five recipes:
banned-api(TID251)ruff rule; preview-only rules are flaggedno-restricted-syntax/no-restricted-importsand their@typescript-eslint/versions as catch-alls; then eight curated plugins with docs linksimport-xnoRestrictedImports/noRestrictedGlobalsbiome explaindeprecated-modules,preferred-modules,bad-functions--list-msgs/--help-msg, loading extensions with--load-pluginsfirstbanned-modules(flake8-tidy-imports, I251)None of the recipes teach writing custom rules. An agent writes a new one only by copying the repository's own examples, as #577 describes.
Vendor contract.
test/legacy-linter-vendor-contract.test.tsruns each linter at a pinned version and checks every behavior the recipes describe:ruff ruleJSON--help-msgfailing until the extension is loadedbiome explainfor both catch-all rulesIt downloads packages, so it only runs when
TASKLESS_LEGACY_LINTER_CONTRACT=1is set. That variable is set by a newLegacy linter contractworkflow, which runs on changes to the legacy recipes and is kept out ofValidateso a registry outage cannot block merges. All 10 cases pass locally.The archive check passed: every scenario in
cli-rule-routing,cli-agent,cli-detect, andcli-onboardsurvives, except "Both local paths viable surfaces a choice", which the change removes on purpose.openspec validate --all --strictpasses.Black support is a follow-up in #576.