Skip to content

Support Black in legacy linter routing #576

Closed as not planned
Closed as not planned

Description

@theCodeDrift

detect already recognizes Black (src/detect/scan.ts), but the legacy-linter-recipes change refuses it: taskless agent create-legacy-rule --tool=black exits with a pointer elsewhere, because Black is a formatter and cannot hold a rule.

That leaves a gap for Python repositories that run Black. A formatting-shaped request ("use double quotes", "wrap at 100 columns", "trailing commas in multi-line calls") is often already settled by Black or by one of its few options (line-length, target-version, skip-string-normalization, skip-magic-trailing-comma, preview). Today an agent may write an sg rule that fights the formatter, or one that duplicates what it already does.

Support would mean:

  • A create-legacy-rule.black.md recipe whose job is step 1 of the legacy ladder: decide whether Black already settles the request, or would with one of its options, and say so instead of writing a rule.
  • A route paragraph for Black when detect finds it.
  • Removing black from the refused --tool names.

The open question is the hand-off when Black does not settle the request: send it back to route, or treat formatting requests as out of scope for Taskless rules entirely.

Follows the legacy-linter-recipes OpenSpec change (Ruff, ESLint, Biome, pylint, flake8 at launch).

Activity

  1. theCodeDrift commented on Oct 23, 2026

    @theCodeDrift
    MemberAuthor

    Closing as won't fix. Black is a formatter and holds no rules, so create-legacy-rule --tool=black refusing it and sending the agent back to route is the right behavior. A formatting request is almost always settled by Black or one of its options, which an agent can see without a dedicated recipe, and the remaining risk (a Taskless rule contradicting a formatter's output) is small and not specific to Black.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions