Skip to content

Published schema docstrings name taskless rule verify <id>, a command form that does not exist #283

Description

@thecodedrift

packages/cli/src/schemas/index.ts:78-83 documents two published schemas as belonging to a command form that does not exist:

/** `taskless rule verify <id> --json`, for an ast-grep rule. */
verifyOutputSchema,
/** The same, for a Vale rule — a different shape, discriminated on `engine`. */
valeVerifyOutputSchema,

taskless rule has exactly four subcommands, and verify is not among them:

$ taskless rule --help
   create   improve   meta   delete

verify is a top-level command (taskless verify), and it takes a path, not an id. That distinction is the entire point of the current design: resolve-path.ts:25 explains that verify and test are path-addressed precisely because an id can exist under two engines. The docstring reintroduces the id-addressed framing that the code removed, in the artifact another team reads.

Scope

The schemas themselves are correct and exercised. This is the published documentation being wrong, in @taskless/cli/schemas, which the cloud team consumes.

Two adjacent points worth a look while fixing:

  • getSchemaPayload and schemaOutputSchema appear to be orphaned alongside these exports; worth confirming whether anything still reads them.
  • The schemas for rule create and rule improve (schemas/rules-create.ts, schemas/rules-improve.ts, both extended with notices this range) are not published, while these are. If that asymmetry is deliberate, it is worth saying so; if not, it is the more useful pair to export.

test/schemas-export.test.ts:39-43 only name-checks the export list, and :67 exercises verifyTestOutputSchema against real CLI output but nothing exercises these two, which is why the mismatch was invisible.

Found in a pre-release review of v0.11.0..main.

Activity

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

    CLIRelated to the taskless CLIdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions