Taskless v0.13.8: Smaller Steps, Summaries, and Syntax Trees

Jakob Heuser

0.13.8 is a patch release with 13 changesets. Most of it is about the size of what your agent reads. Long recipes now arrive as an outline that fits one tool call, a new taskless ast command shows the exact node kinds a rule can match, and check --summary measures a whole repository without hundreds of kilobytes of findings. detect also learns Dart, Flutter, and a C# repository's own Roslyn analyzers.

npx @taskless/cli

Recipes print as an outline

Some agent harnesses cut a long tool result and keep the start and the end. A Taskless recipe like create-sg-rule puts its steps first and its reference material (quirk tables, language lists, input schemas) after them, so a cut usually landed right in the part the agent needed next.

taskless agent <topic> now prints a long topic as its steps plus a list of sections it serves on request:

## Sections on request
Not printed above. When the text names one, print it with `npx @taskless/cli agent create-sg-rule --section <name>`:
- `one-rule-one-directory`
- `fixtures`
- `feedback-loop`
- `reading-kinds`
- `languages`
- `quirks`
- ...

The steps name the section they depend on, so your agent fetches quirks when it gets to the quirks step. --full still prints the whole recipe in one go. onboard and update use the same outline, and @taskless/cli/prompts still renders whole recipes for anyone building on it.

taskless ast shows a file's node kinds

An ast-grep rule matches on node kinds, and a kind that's spelled wrong matches nothing without complaint. Until now the recipe sent agents to ast-grep's --debug-query, which left them hunting for an ast-grep binary the project didn't have.

taskless ast <file> prints the file's named-node tree, parsed by the bundled ast-grep as whatever language the extension resolves to. Every kind it shows is one a rule's kind: accepts. --range cuts it down to the lines you care about:

$ npx @taskless/cli ast demo.ts --range 2
demo.ts as TypeScript. Named nodes only, so every kind below is valid in `kind:`.
Positions are line:column, with 1-based lines and 0-based byte columns.
program [1:0-3:0]
if_statement [2:0-2:38]
condition: parenthesized_expression [2:3-2:10]
unary_expression [2:4-2:9]
argument: identifier [2:5-2:9] "user"
consequence: throw_statement [2:11-2:38]
new_expression [2:17-2:37]
constructor: identifier [2:21-2:26] "Error"
arguments: arguments [2:26-2:37]
string [2:27-2:36]
string_fragment [2:28-2:35] "missing"

--lang overrides the language and --json returns the tree as data. create-sg-rule now points authors here for kinds.

check --summary measures a whole repository

check --json lists every finding, which can run to hundreds of kilobytes on a large repository. An agent asked "how many violations do we have?" either counted that by hand or ran out of room trying.

Every check --json now includes a summary with the totals, the distinct files, counts by severity, and one entry per rule that fired:

"summary": {
"total": 1,
"files": 1,
"severities": { "error": 1, "warning": 0, "info": 0, "hint": 0 },
"rules": [
{ "engine": "sg", "ruleId": "no-eval", "total": 1, "files": 1,
"severities": { "error": 1, "warning": 0, "info": 0, "hint": 0 } }
]
}

Add --summary and check --json drops results, keeping only the summary. Without --json, --summary prints a count per rule. results and every existing key stay the same unless you pass --summary, so scripts that read them keep working.

Findings from check --json and verify --json now share one schema, published as findingSchema from @taskless/cli/schemas next to checkOutputSchema.

detect learns Dart and Roslyn analyzers

taskless detect recognizes Dart and Flutter repositories from a pubspec.yaml. The new dart-analyzer linter is found from any of these:

  • an analysis_options.yaml
  • the lints, flutter_lints, or very_good_analysis package
  • a CI or hook command that runs dart analyze or flutter analyze

0.13.7 taught detect C# and the analyzers you install from NuGet. This one finds the analyzers a team writes itself. A ProjectReference with OutputItemType="Analyzer" in a project file, .props, or .targets shows up as custom-analyzer. Its evidence names the referenced project, and customRules counts the [DiagnosticAnalyzer] classes in it.

Onboarding reads the whole review window

gh pr list and gh search stop at 1,000 results, so on a busy repository an onboarding agent was only reading the newest pull requests. The review-comment step now gives the agent ready commands to count the window, list it by date range, and pull every inline review comment since it opened through gh api --paginate, then sample evenly across it. GitLab gets the same through glab api --paginate.

Onboarding also keeps track of where each rule came from. A rule drawn from repeated fix-up commits, docs, or tests used to publish to the report as raised in zero reviews. The facts file now takes optional sources and evidence on every rule, and taskless report credits each one, "N times in reviews" and "N times in conventions", the same way the report page does. Facts without the new fields publish exactly as before.

Rule authoring catches more silent misses

sg-regex-needs-kind moved into the ast-grep rule schema the CLI publishes, so a schema-aware editor flags a regex without a kind in the same place validate refuses it. It now covers every regex at any depth, including constraints, utils, and nested any/all/not/has/inside rules. A sibling any: whose every branch sets a kind counts as the anchor, so you no longer have to split a constraint into one branch per kind.

validate also notices a has or inside with no stopBy, as it already did for follows and precedes. Both look one level by default, so this exclusion stops working on anything nested deeper than a direct parent:

not:
inside:
kind: try_statement

A relation that names a field is left alone, and stopBy: neighbor says you meant one level.

The authoring recipes also show how to prove a scope excludes a path: put the excluded file in a pass/ case beside a clean file the scope admits. When verify rejects a pass/ case because the scope excluded every file in it, the error now suggests that.

Old Node gets a real error

On a Node older than 22.22.0, Taskless used to crash with a SyntaxError about globSync that pointed nowhere useful. It now stops with this and exits 1:

Taskless needs Node >=22.22.0, you have 20.19.0. Install a newer Node and run it again.

That holds for npx, pnpm dlx, and the project launcher at .taskless/bin/cli.mjs. Launchers pick up the check the next time your agent updates Taskless. The ci recipe now says the job needs Node 22.22 or later.

The installer shows your git hooks

When the installer offered to commit the Taskless files, a repository with lefthook, husky, or pre-commit looked hung while the hooks ran. git now runs in your terminal exactly as if you'd typed git commit, so hook output and prompts show up as usual, and the installer says the hooks are running before it starts.

If the commit doesn't go through, because a hook refused it or you pressed Ctrl-C, the installer asks whether to try again, commit without hooks, or leave the commit to you. It never skips your hooks unless you pick that. The install survives either way.

Smaller fixes

  • route and onboard agree on when an agent may ask you a question. onboard limits questions, and route used to read as permission to ask them anyway. It now defers to onboard, which says what to do instead: write the local rule, or skip the candidate and name it in the report summary.
  • Vale moves to 3.27.0. No rule reports anything different. Vale now ships the grammars it uses to read code comments separately, so they arrive pinned as @taskless/vale-grammars. A config/grammars/ directory under .taskless/rules/vale/ is refused by validate and check, and a VALE_GRAMMARS_PATH in your shell is ignored, since either one would replace the pinned grammars.
  • The bundled ast-grep moves to 0.51.3.

The full changelog is on taskless/cli#696.

Getting it

npx @taskless/cli